galleries @ system

This commit is contained in:
Ulf Gebhardt 2013-12-15 19:40:55 +01:00
parent dc79f8ba6e
commit 060b9b81fe
51 changed files with 59 additions and 40 deletions

View File

@ -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));

View File

@ -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, ''),

View File

@ -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 {
}

View File

@ -1,3 +1,2 @@
<?php
\SYSTEM\autoload::registerFolder(dirname(__FILE__),'');
\SYSTEM\autoload::registerFolder(dirname(__FILE__).'/picfolder','');
\SYSTEM\autoload::registerFolder(dirname(__FILE__),'');

View 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]);
}
}

View File

@ -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';

View File

@ -0,0 +1,3 @@
<?php
\SYSTEM\autoload::registerFolder(dirname(__FILE__),'');
require_once dirname(__FILE__).'/register_img.php';

View File

Before

Width:  |  Height:  |  Size: 52 KiB

After

Width:  |  Height:  |  Size: 52 KiB

View File

Before

Width:  |  Height:  |  Size: 50 KiB

After

Width:  |  Height:  |  Size: 50 KiB

View File

Before

Width:  |  Height:  |  Size: 37 KiB

After

Width:  |  Height:  |  Size: 37 KiB

View File

Before

Width:  |  Height:  |  Size: 76 KiB

After

Width:  |  Height:  |  Size: 76 KiB

View File

Before

Width:  |  Height:  |  Size: 49 KiB

After

Width:  |  Height:  |  Size: 49 KiB

View File

Before

Width:  |  Height:  |  Size: 85 KiB

After

Width:  |  Height:  |  Size: 85 KiB

View File

Before

Width:  |  Height:  |  Size: 84 KiB

After

Width:  |  Height:  |  Size: 84 KiB

View File

Before

Width:  |  Height:  |  Size: 47 KiB

After

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1004 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1015 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 972 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

View File

Before

Width:  |  Height:  |  Size: 84 KiB

After

Width:  |  Height:  |  Size: 84 KiB

BIN
danube/img/partners/2.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 181 KiB

BIN
danube/img/partners/3.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 164 KiB

BIN
danube/img/partners/4.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 931 KiB

BIN
danube/img/partners/5.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 KiB

BIN
danube/img/partners/6.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 131 KiB

View 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');

View File

@ -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');

View File

@ -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;
}
}

View File

@ -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;
}
}

View File

@ -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');

View File

@ -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;
}
}

View File

@ -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');