updat to match new system
This commit is contained in:
parent
08b212fe20
commit
a47a8decba
@ -1,3 +1,6 @@
|
|||||||
RewriteEngine On
|
RewriteEngine On
|
||||||
RewriteCond %{HTTP_HOST} !^www\.u-vote\.eu$ [NC]
|
RewriteRule ^(.*)/fonts/fontawesome-webfont(.*)$ lib/system/lib/font_awesome/lib/fonts/fontawesome-webfont$2 [L]
|
||||||
RewriteRule ^(.*)$ http://www.u-vote.eu/$1 [R=301,L]
|
RewriteRule ^sai$ sai.php$1 [L]
|
||||||
|
|
||||||
|
RewriteRule ^(.*)/files/([^/]+)/([^/]+)$ api.php?call=files&cat=$2&id=$3 [L]
|
||||||
|
RewriteRule ^cache/([^/]+)/([^/]+)$ api.php?call=cache&id=$1&ident=$2 [L]
|
||||||
10
api.php
10
api.php
@ -1,13 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
require_once 'lib/autoload.inc'; //SYSTEM Classes
|
require_once 'include.inc';
|
||||||
require_once 'uvote/autoload.inc'; //Project Classes
|
|
||||||
require_once '/home/web/web/config/get_config.php';
|
|
||||||
|
|
||||||
\SYSTEM\system::start(\WEBCRAFT\get_config(dirname(__FILE__)));
|
|
||||||
\SYSTEM\system::include_ExceptionShortcut();
|
|
||||||
\SYSTEM\system::include_ResultShortcut();
|
|
||||||
\SYSTEM\system::register_errorhandler_dbwriter();
|
|
||||||
\SYSTEM\system::register_errorhandler_jsonoutput();
|
|
||||||
|
|
||||||
echo \SYSTEM\API\api::run('\SYSTEM\API\verify','api_uvote',array_merge($_POST,$_GET));
|
echo \SYSTEM\API\api::run('\SYSTEM\API\verify','api_uvote',array_merge($_POST,$_GET));
|
||||||
new \SYSTEM\LOG\COUNTER("API was called sucessfully.");
|
new \SYSTEM\LOG\COUNTER("API was called sucessfully.");
|
||||||
6
include.inc
Normal file
6
include.inc
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
<?php
|
||||||
|
require_once 'lib/autoload.inc'; //SYSTEM Classes
|
||||||
|
require_once 'uvote/autoload.inc'; //Project Classes
|
||||||
|
require_once '../../config/get_config.php';
|
||||||
|
|
||||||
|
\SYSTEM\system::start(\WEBCRAFT\get_config(dirname(__FILE__)));
|
||||||
10
index.php
10
index.php
@ -1,13 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
require_once 'lib/autoload.inc'; //SYSTEM Classes
|
require_once 'include.inc';
|
||||||
require_once 'uvote/autoload.inc'; //Project Classes
|
|
||||||
require_once '/home/web/web/config/get_config.php';
|
|
||||||
|
|
||||||
\SYSTEM\system::start(\WEBCRAFT\get_config(dirname(__FILE__)));
|
|
||||||
\SYSTEM\system::include_ExceptionShortcut();
|
|
||||||
\SYSTEM\system::include_ResultShortcut();
|
|
||||||
\SYSTEM\system::register_errorhandler_dbwriter();
|
|
||||||
\SYSTEM\system::register_errorhandler_jsonoutput();
|
|
||||||
|
|
||||||
echo \SYSTEM\API\api::run('\SYSTEM\API\verify','page_uvote',array_merge($_POST,$_GET),1,false,true);
|
echo \SYSTEM\API\api::run('\SYSTEM\API\verify','page_uvote',array_merge($_POST,$_GET),1,false,true);
|
||||||
new \SYSTEM\LOG\COUNTER("Page was called sucessfully.");
|
new \SYSTEM\LOG\COUNTER("Page was called sucessfully.");
|
||||||
12
sai.php
12
sai.php
@ -1,12 +1,4 @@
|
|||||||
<?php
|
<?php
|
||||||
require_once 'lib/autoload.inc'; //SYSTEM Classes
|
require_once 'include.inc';
|
||||||
require_once 'uvote/autoload.inc'; //Project Classes
|
|
||||||
require_once '/home/web/web/config/get_config.php';
|
|
||||||
|
|
||||||
\SYSTEM\system::start(\WEBCRAFT\get_config(dirname(__FILE__)));
|
echo (new SYSTEM\SAI\sai_gui())->html();
|
||||||
SYSTEM\system::include_ExceptionShortcut(); //allow ERROR() instead of \SYSTEM\LOG\ERROR()
|
|
||||||
SYSTEM\system::include_ResultShortcut(); //allow JsonResult() instead of \SYSTEM\LOG\JsonResult()
|
|
||||||
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 (new SYSTEM\SAI\saigui())->html();
|
|
||||||
10
setup.php
10
setup.php
@ -1,12 +1,4 @@
|
|||||||
<?php
|
<?php
|
||||||
require_once 'lib/autoload.inc'; //SYSTEM Classes
|
require_once 'include.inc';
|
||||||
require_once 'uvote/autoload.inc'; //Project Classes
|
|
||||||
require_once '/home/web/web/config/get_config.php';
|
|
||||||
|
|
||||||
\SYSTEM\system::start(\WEBCRAFT\get_config(dirname(__FILE__)));
|
|
||||||
\SYSTEM\system::include_ExceptionShortcut();
|
|
||||||
\SYSTEM\system::include_ResultShortcut();
|
|
||||||
\SYSTEM\system::register_errorhandler_dbwriter();
|
|
||||||
\SYSTEM\system::register_errorhandler_jsonoutput();
|
|
||||||
|
|
||||||
echo \SYSTEM\SQL\setup::install();
|
echo \SYSTEM\SQL\setup::install();
|
||||||
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
class default_page extends SYSTEM\PAGE\Page {
|
class default_page implements SYSTEM\PAGE\DefaultPage {
|
||||||
private function js(){
|
public static function js(){
|
||||||
return \SYSTEM\HTML\html::script(\LIB\lib_jquery::js()->WEBPATH()).
|
return \SYSTEM\HTML\html::script(\LIB\lib_jquery::js()->WEBPATH()).
|
||||||
\SYSTEM\HTML\html::script(\LIB\lib_bootstrap::js()->WEBPATH()).
|
\SYSTEM\HTML\html::script(\LIB\lib_bootstrap::js()->WEBPATH()).
|
||||||
\SYSTEM\HTML\html::script(\LIB\lib_jqbootstrapvalidation::js()->WEBPATH()).
|
\SYSTEM\HTML\html::script(\LIB\lib_jqbootstrapvalidation::js()->WEBPATH()).
|
||||||
@ -10,7 +10,7 @@ class default_page extends SYSTEM\PAGE\Page {
|
|||||||
'<script type="text/javascript">google.load("visualization", "1", {packages:["corechart"]});</script>';
|
'<script type="text/javascript">google.load("visualization", "1", {packages:["corechart"]});</script>';
|
||||||
}
|
}
|
||||||
|
|
||||||
private function css(){
|
public static function css(){
|
||||||
return \SYSTEM\HTML\html::link(\LIB\lib_bootstrap::css()->WEBPATH(false)).
|
return \SYSTEM\HTML\html::link(\LIB\lib_bootstrap::css()->WEBPATH(false)).
|
||||||
\SYSTEM\HTML\html::link((new \PPAGE('default_page/css/default_page.css'))->WEBPATH()).
|
\SYSTEM\HTML\html::link((new \PPAGE('default_page/css/default_page.css'))->WEBPATH()).
|
||||||
\SYSTEM\HTML\html::link(\LIB\lib_font_awesome::css()->WEBPATH(false));
|
\SYSTEM\HTML\html::link(\LIB\lib_font_awesome::css()->WEBPATH(false));
|
||||||
@ -38,9 +38,9 @@ class default_page extends SYSTEM\PAGE\Page {
|
|||||||
if(!$_escaped_fragment_){
|
if(!$_escaped_fragment_){
|
||||||
$vars['js'] = $this->js();}
|
$vars['js'] = $this->js();}
|
||||||
$vars['css'] = $this->css();
|
$vars['css'] = $this->css();
|
||||||
$vars['menu'] = \SYSTEM\SECURITY\Security::isLoggedIn() ? $this->get_menu() : $this->exchange_menu();
|
$vars['menu'] = \SYSTEM\SECURITY\security::isLoggedIn() ? $this->get_menu() : $this->exchange_menu();
|
||||||
$vars['registerform'] = \SYSTEM\SECURITY\Security::isLoggedIn() ? $this->getloggedinform() : $this->exchange_registerform();
|
$vars['registerform'] = \SYSTEM\SECURITY\security::isLoggedIn() ? $this->getloggedinform() : $this->exchange_registerform();
|
||||||
$vars['loginform'] = \SYSTEM\SECURITY\Security::isLoggedIn() ? $this->exchange_loginform() : $this->getloginform() ;
|
$vars['loginform'] = \SYSTEM\SECURITY\security::isLoggedIn() ? $this->exchange_loginform() : $this->getloginform() ;
|
||||||
$vars['frontend_logos'] = \SYSTEM\CONFIG\config::get(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_PATH_BASEURL).'api.php?call=files&cat=frontend_logos&id=';
|
$vars['frontend_logos'] = \SYSTEM\CONFIG\config::get(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_PATH_BASEURL).'api.php?call=files&cat=frontend_logos&id=';
|
||||||
|
|
||||||
$vars = array_merge($vars, \SYSTEM\PAGE\text::tag('uvote'));
|
$vars = array_merge($vars, \SYSTEM\PAGE\text::tag('uvote'));
|
||||||
|
|||||||
@ -1,6 +1,12 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
class page_uvote extends \SYSTEM\API\api_default {
|
class page_uvote extends \SYSTEM\API\api_default {
|
||||||
|
public static function get_apigroup(){
|
||||||
|
return 1;}
|
||||||
|
public static function get_class($params = null){
|
||||||
|
return self::class;}
|
||||||
|
public static function get_default_state() {
|
||||||
|
return 'start';}
|
||||||
|
|
||||||
public static function default_page($_escaped_fragment_ = NULL){
|
public static function default_page($_escaped_fragment_ = NULL){
|
||||||
return (new default_page())->html($_escaped_fragment_);}
|
return (new default_page())->html($_escaped_fragment_);}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
namespace SAI;
|
namespace SAI;
|
||||||
class saimod_uvote_vote_edit extends \SYSTEM\SAI\SaiModule {
|
class saimod_uvote_vote_edit extends \SYSTEM\SAI\sai_module {
|
||||||
public static function sai_mod__SYSTEM_SAI_saimod_uvote_vote_edit_action_new_vote($data){
|
public static function sai_mod__SYSTEM_SAI_saimod_uvote_vote_edit_action_new_vote($data){
|
||||||
new \SYSTEM\LOG\INFO('json kommt im php an');
|
new \SYSTEM\LOG\INFO('json kommt im php an');
|
||||||
$vote = $data;
|
$vote = $data;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user