galleries @ system
6
api.php
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
require_once '../system/autoload.inc.php'; //SYSTEM Classes
|
||||
require_once 'danube/autoload.inc.php'; //Project Classes
|
||||
require_once '../system/autoload.inc.php'; //SYSTEM Classes
|
||||
require_once 'danube/autoload.inc.php'; //Project Classes
|
||||
|
||||
require_once 'config.php';
|
||||
SYSTEM\system::start($danube_config); //Start System time + config
|
||||
@ -10,4 +10,4 @@ SYSTEM\system::include_ResultShortcut();
|
||||
SYSTEM\system::register_errorhandler_dbwriter(); //write errors to database (must be first errorhandler to register)
|
||||
SYSTEM\system::register_errorhandler_jsonoutput(); //print errors as json to caller
|
||||
|
||||
echo \SYSTEM\API\Api::run('\SYSTEM\API\verify', 'api_danube',array_merge($_POST,$_GET));
|
||||
echo \SYSTEM\API\api::run('\SYSTEM\API\verify', 'api_danube',array_merge($_POST,$_GET));
|
||||
@ -2,6 +2,7 @@
|
||||
$danube_config = array( array(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_ERRORREPORTING, E_ALL | E_STRICT),
|
||||
array(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_PATH_BASEURL, 'http://www.mojotrollz.eu/web/danube/'),
|
||||
array(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_PATH_BASEPATH, '/home/web/webdir/danube/'),
|
||||
array(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_DEFAULT_RESULT, 'json'),
|
||||
array(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_DB_TYPE, SYSTEM\CONFIG\config_ids::SYS_CONFIG_DB_TYPE_MYS),
|
||||
array(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_DB_HOST, '127.0.0.1'),
|
||||
array(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_DB_PORT, ''),
|
||||
|
||||
@ -1,8 +1,4 @@
|
||||
<?php
|
||||
|
||||
class api_danube extends \SYSTEM\API\api_login {
|
||||
|
||||
public static function call_img($id){
|
||||
return picfolder::get(\SYSTEM\SERVERPATH(new PPAGE,'pics'),$id);
|
||||
}
|
||||
class api_danube extends \SYSTEM\API\api_system {
|
||||
}
|
||||
@ -1,3 +1,2 @@
|
||||
<?php
|
||||
\SYSTEM\autoload::registerFolder(dirname(__FILE__),'');
|
||||
\SYSTEM\autoload::registerFolder(dirname(__FILE__).'/picfolder','');
|
||||
\SYSTEM\autoload::registerFolder(dirname(__FILE__),'');
|
||||
@ -1,23 +0,0 @@
|
||||
<?php
|
||||
|
||||
class picfolder {
|
||||
public static function get($path, $id){
|
||||
if(!is_dir($path)){
|
||||
throw new ERROR("Picfolder -> invalid folder");}
|
||||
|
||||
$filelist = array();
|
||||
$it = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($path));
|
||||
while($it->valid()) {
|
||||
if (!$it->isDot()) {
|
||||
$filelist[] = $it->key();}
|
||||
$it->next();
|
||||
}
|
||||
|
||||
//random
|
||||
if($id == -1 || $id < 0 || $id >= count($filelist)){
|
||||
$id = rand(0, count($filelist)-1);}
|
||||
|
||||
\SYSTEM\HEADER::PNG();
|
||||
return file_get_contents($filelist[$id]);
|
||||
}
|
||||
}
|
||||
@ -5,4 +5,6 @@ require_once dirname(__FILE__).'/path/register_path_classes.php';
|
||||
require_once dirname(__FILE__).'/page/register_page_classes.php';
|
||||
require_once dirname(__FILE__).'/dbd/autoload.inc.php';
|
||||
|
||||
require_once dirname(__FILE__).'/api/autoload.inc.php';
|
||||
require_once dirname(__FILE__).'/api/autoload.inc.php';
|
||||
|
||||
require_once dirname(__FILE__).'/img/autoload.inc.php';
|
||||
3
danube/img/autoload.inc.php
Normal file
@ -0,0 +1,3 @@
|
||||
<?php
|
||||
\SYSTEM\autoload::registerFolder(dirname(__FILE__),'');
|
||||
require_once dirname(__FILE__).'/register_img.php';
|
||||
|
Before Width: | Height: | Size: 52 KiB After Width: | Height: | Size: 52 KiB |
|
Before Width: | Height: | Size: 50 KiB After Width: | Height: | Size: 50 KiB |
|
Before Width: | Height: | Size: 37 KiB After Width: | Height: | Size: 37 KiB |
|
Before Width: | Height: | Size: 76 KiB After Width: | Height: | Size: 76 KiB |
|
Before Width: | Height: | Size: 49 KiB After Width: | Height: | Size: 49 KiB |
|
Before Width: | Height: | Size: 85 KiB After Width: | Height: | Size: 85 KiB |
|
Before Width: | Height: | Size: 84 KiB After Width: | Height: | Size: 84 KiB |
|
Before Width: | Height: | Size: 47 KiB After Width: | Height: | Size: 47 KiB |
BIN
danube/img/impressions/1.JPG
Normal file
|
After Width: | Height: | Size: 1.1 MiB |
BIN
danube/img/impressions/10.JPG
Normal file
|
After Width: | Height: | Size: 1.0 MiB |
BIN
danube/img/impressions/11.JPG
Normal file
|
After Width: | Height: | Size: 1.1 MiB |
BIN
danube/img/impressions/12.JPG
Normal file
|
After Width: | Height: | Size: 1004 KiB |
BIN
danube/img/impressions/13.JPG
Normal file
|
After Width: | Height: | Size: 1.1 MiB |
BIN
danube/img/impressions/14.JPG
Normal file
|
After Width: | Height: | Size: 1.0 MiB |
BIN
danube/img/impressions/15.JPG
Normal file
|
After Width: | Height: | Size: 1015 KiB |
BIN
danube/img/impressions/16.JPG
Normal file
|
After Width: | Height: | Size: 1.1 MiB |
BIN
danube/img/impressions/17.JPG
Normal file
|
After Width: | Height: | Size: 1.0 MiB |
BIN
danube/img/impressions/18.JPG
Normal file
|
After Width: | Height: | Size: 1.1 MiB |
BIN
danube/img/impressions/19.JPG
Normal file
|
After Width: | Height: | Size: 1.1 MiB |
BIN
danube/img/impressions/2.JPG
Normal file
|
After Width: | Height: | Size: 1.1 MiB |
BIN
danube/img/impressions/20.JPG
Normal file
|
After Width: | Height: | Size: 972 KiB |
BIN
danube/img/impressions/21.JPG
Normal file
|
After Width: | Height: | Size: 1.0 MiB |
BIN
danube/img/impressions/22.JPG
Normal file
|
After Width: | Height: | Size: 1.0 MiB |
BIN
danube/img/impressions/3.JPG
Normal file
|
After Width: | Height: | Size: 1.1 MiB |
BIN
danube/img/impressions/4.JPG
Normal file
|
After Width: | Height: | Size: 1.1 MiB |
BIN
danube/img/impressions/5.JPG
Normal file
|
After Width: | Height: | Size: 1.1 MiB |
BIN
danube/img/impressions/6.JPG
Normal file
|
After Width: | Height: | Size: 1.0 MiB |
BIN
danube/img/impressions/7.JPG
Normal file
|
After Width: | Height: | Size: 1.0 MiB |
BIN
danube/img/impressions/8.JPG
Normal file
|
After Width: | Height: | Size: 1.0 MiB |
BIN
danube/img/impressions/9.JPG
Normal file
|
After Width: | Height: | Size: 1.0 MiB |
BIN
danube/img/impressions/sun.JPG
Normal file
|
After Width: | Height: | Size: 66 KiB |
|
Before Width: | Height: | Size: 84 KiB After Width: | Height: | Size: 84 KiB |
BIN
danube/img/partners/2.jpg
Normal file
|
After Width: | Height: | Size: 181 KiB |
BIN
danube/img/partners/3.jpg
Normal file
|
After Width: | Height: | Size: 164 KiB |
BIN
danube/img/partners/4.jpg
Normal file
|
After Width: | Height: | Size: 931 KiB |
BIN
danube/img/partners/5.jpg
Normal file
|
After Width: | Height: | Size: 53 KiB |
BIN
danube/img/partners/6.jpg
Normal file
|
After Width: | Height: | Size: 131 KiB |
4
danube/img/register_img.php
Normal file
@ -0,0 +1,4 @@
|
||||
<?php
|
||||
\SYSTEM\IMG\img::registerFolder(dirname(__FILE__).'/certificates/','certificates','*.jpg');
|
||||
\SYSTEM\IMG\img::registerFolder(dirname(__FILE__).'/partners/','partners','*.jpg');
|
||||
\SYSTEM\IMG\img::registerFolder(dirname(__FILE__).'/impressions/','impressions','*.JPG');
|
||||
@ -1,7 +1,10 @@
|
||||
<div style="margin-left: auto; margin-right: auto; text-align: center; border-radius: 5px; width: 100%;">
|
||||
<div id="galleria" style="border-radius: 5px; width: 100%; background: none;">
|
||||
${danube_page_certificates}
|
||||
</div>
|
||||
<div id="galleria" style="border-radius: 5px; width: 100%; background: none;">
|
||||
<div id="galleria" style="border-radius: 5px;">
|
||||
${gallery_certifictes}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
Galleria.loadTheme('danube/page/default_page/js/galleria/themes/classic/galleria.classic.min.js');
|
||||
Galleria.run('#galleria');
|
||||
|
||||
@ -4,8 +4,18 @@ class default_certificates extends SYSTEM\PAGE\Page {
|
||||
public function html(){
|
||||
$vars = array();
|
||||
|
||||
$vars['gallery_certifictes'] = $this->gallery();
|
||||
$vars = array_merge($vars, \SYSTEM\locale::getStrings(\DBD\locale_string::VALUE_CATEGORY_DASENSE));
|
||||
|
||||
return SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new PPAGE(),'default_certificates/cerfiticates.tpl'), $vars);
|
||||
}
|
||||
|
||||
private function gallery(){
|
||||
$pics = \SYSTEM\IMG\img::get('certificates');
|
||||
$result = '';
|
||||
foreach($pics as $pic){
|
||||
$result .= '<img src="api.php?call=img&cat=certificates&id='.$pic.'" alt="" />';
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
}
|
||||
@ -3,9 +3,19 @@
|
||||
class default_impressions extends SYSTEM\PAGE\Page {
|
||||
public function html(){
|
||||
$vars = array();
|
||||
|
||||
|
||||
$vars['gallery_impressions'] = $this->gallery();
|
||||
$vars = array_merge($vars, \SYSTEM\locale::getStrings(\DBD\locale_string::VALUE_CATEGORY_DASENSE));
|
||||
|
||||
return SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new PPAGE(),'default_impressions/impressions.tpl'), $vars);
|
||||
}
|
||||
|
||||
private function gallery(){
|
||||
$pics = \SYSTEM\IMG\img::get('impressions');
|
||||
$result = '';
|
||||
foreach($pics as $pic){
|
||||
$result .= '<img src="api.php?call=img&cat=impressions&id='.$pic.'" alt="" />';
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
}
|
||||
@ -1,6 +1,6 @@
|
||||
<div style="margin-left: auto; margin-right: auto; text-align: center; border-radius: 5px; width: 100%;">
|
||||
<div id="galleria" style="border-radius: 5px; width: 100%; background: none;">
|
||||
${danube_page_impressions}
|
||||
${gallery_impressions}
|
||||
</div>
|
||||
<script>
|
||||
Galleria.loadTheme('danube/page/default_page/js/galleria/themes/classic/galleria.classic.min.js');
|
||||
|
||||
@ -4,8 +4,19 @@ class default_partners extends SYSTEM\PAGE\Page {
|
||||
public function html(){
|
||||
$vars = array();
|
||||
|
||||
$vars['gallery_partners'] = $this->gallery();
|
||||
$vars = array_merge($vars, \SYSTEM\locale::getStrings(\DBD\locale_string::VALUE_CATEGORY_DASENSE));
|
||||
|
||||
return SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new PPAGE(),'default_partners/partners.tpl'), $vars);
|
||||
}
|
||||
|
||||
private function gallery(){
|
||||
$pics = \SYSTEM\IMG\img::get('partners');
|
||||
$result = '';
|
||||
foreach($pics as $pic){
|
||||
$result .= '<img src="api.php?call=img&cat=partners&id='.$pic.'" alt="" />';
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,5 +1,8 @@
|
||||
<div id="text" style="margin-left: auto; margin-right: auto;">
|
||||
${danube_page_partners}
|
||||
${danube_page_partners}
|
||||
<div id="galleria" style="border-radius: 5px;">
|
||||
${gallery_partners}
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
Galleria.loadTheme('danube/page/default_page/js/galleria/themes/classic/galleria.classic.min.js');
|
||||
|
||||