diff --git a/api.php b/api.php new file mode 100644 index 0000000..76b13bc --- /dev/null +++ b/api.php @@ -0,0 +1,19 @@ +CALL(array_merge($_POST,$_GET)); \ No newline at end of file diff --git a/danube/api/ApiClass.php b/danube/api/ApiClass.php new file mode 100644 index 0000000..0219c23 --- /dev/null +++ b/danube/api/ApiClass.php @@ -0,0 +1,8 @@ +registerFolder(dirname(__FILE__),''); +$autoload->registerFolder(dirname(__FILE__).'/picfolder',''); \ No newline at end of file diff --git a/danube/api/picfolder/picfolder.php b/danube/api/picfolder/picfolder.php new file mode 100644 index 0000000..fbf8ffa --- /dev/null +++ b/danube/api/picfolder/picfolder.php @@ -0,0 +1,23 @@ + 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]); + } +} \ No newline at end of file diff --git a/danube/autoload.inc.php b/danube/autoload.inc.php index 2e9a29e..c974a96 100644 --- a/danube/autoload.inc.php +++ b/danube/autoload.inc.php @@ -3,4 +3,6 @@ //keep this 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'; \ No newline at end of file +require_once dirname(__FILE__).'/dbd/autoload.inc.php'; + +require_once dirname(__FILE__).'/api/autoload.inc.php'; \ No newline at end of file diff --git a/danube/page/PageApi.php b/danube/page/PageApi.php index e446c0f..538755c 100644 --- a/danube/page/PageApi.php +++ b/danube/page/PageApi.php @@ -3,8 +3,7 @@ class PageApi extends \SYSTEM\PAGE\PageClass { public static function default_page(){ - return new default_page(); - } + return new default_page();} public static function action_media(){ throw new ERROR("test"); @@ -23,15 +22,16 @@ class PageApi extends \SYSTEM\PAGE\PageClass { } public static function action_prices(){ - return new default_prices(); - } + return new default_prices();} public static function action_contact(){ - return new default_contact(); - } + return new default_contact();} public static function action_pic(){ return new pic(); } + public static function action_developer(){ + return new \SYSTEM\SAI\saigui();} + } \ No newline at end of file diff --git a/danube/page/default_page/js/loadtexts.js b/danube/page/default_page/js/loadtexts.js index 9cfd080..aa9acf8 100644 --- a/danube/page/default_page/js/loadtexts.js +++ b/danube/page/default_page/js/loadtexts.js @@ -5,6 +5,10 @@ $(document).ready(function() { loadAjaxContent($(this).attr('url')); loadUrlPic($(this).attr('url')); }); + //handle arrowclicks + $('.right, .left').click(function () { + loadApiPic(-1); + }); }); function loadAjaxContent(url) { @@ -36,4 +40,14 @@ function loadUrlPic(url_pic) { site_content_is_visible = true; }}); }); +} + +function loadApiPic(id) { + var dataTmp; + $.get('./api.php?call=img&id='+id, function (data) { + dataTmp = data; + bodyelem = $("html,body"); + bodyelem.animate(); + }).complete(function() { + }); } \ No newline at end of file