updat to match new system
This commit is contained in:
parent
08b212fe20
commit
a47a8decba
@ -1,3 +1,6 @@
|
||||
RewriteEngine On
|
||||
RewriteCond %{HTTP_HOST} !^www\.u-vote\.eu$ [NC]
|
||||
RewriteRule ^(.*)$ http://www.u-vote.eu/$1 [R=301,L]
|
||||
RewriteRule ^(.*)/fonts/fontawesome-webfont(.*)$ lib/system/lib/font_awesome/lib/fonts/fontawesome-webfont$2 [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
|
||||
require_once 'lib/autoload.inc'; //SYSTEM Classes
|
||||
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();
|
||||
require_once 'include.inc';
|
||||
|
||||
echo \SYSTEM\API\api::run('\SYSTEM\API\verify','api_uvote',array_merge($_POST,$_GET));
|
||||
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
|
||||
require_once 'lib/autoload.inc'; //SYSTEM Classes
|
||||
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();
|
||||
require_once 'include.inc';
|
||||
|
||||
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.");
|
||||
12
sai.php
12
sai.php
@ -1,12 +1,4 @@
|
||||
<?php
|
||||
require_once 'lib/autoload.inc'; //SYSTEM Classes
|
||||
require_once 'uvote/autoload.inc'; //Project Classes
|
||||
require_once '/home/web/web/config/get_config.php';
|
||||
require_once 'include.inc';
|
||||
|
||||
\SYSTEM\system::start(\WEBCRAFT\get_config(dirname(__FILE__)));
|
||||
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();
|
||||
echo (new SYSTEM\SAI\sai_gui())->html();
|
||||
10
setup.php
10
setup.php
@ -1,12 +1,4 @@
|
||||
<?php
|
||||
require_once 'lib/autoload.inc'; //SYSTEM Classes
|
||||
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();
|
||||
require_once 'include.inc';
|
||||
|
||||
echo \SYSTEM\SQL\setup::install();
|
||||
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
class default_page extends SYSTEM\PAGE\Page {
|
||||
private function js(){
|
||||
class default_page implements SYSTEM\PAGE\DefaultPage {
|
||||
public static function js(){
|
||||
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_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>';
|
||||
}
|
||||
|
||||
private function css(){
|
||||
public static function css(){
|
||||
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(\LIB\lib_font_awesome::css()->WEBPATH(false));
|
||||
@ -38,9 +38,9 @@ class default_page extends SYSTEM\PAGE\Page {
|
||||
if(!$_escaped_fragment_){
|
||||
$vars['js'] = $this->js();}
|
||||
$vars['css'] = $this->css();
|
||||
$vars['menu'] = \SYSTEM\SECURITY\Security::isLoggedIn() ? $this->get_menu() : $this->exchange_menu();
|
||||
$vars['registerform'] = \SYSTEM\SECURITY\Security::isLoggedIn() ? $this->getloggedinform() : $this->exchange_registerform();
|
||||
$vars['loginform'] = \SYSTEM\SECURITY\Security::isLoggedIn() ? $this->exchange_loginform() : $this->getloginform() ;
|
||||
$vars['menu'] = \SYSTEM\SECURITY\security::isLoggedIn() ? $this->get_menu() : $this->exchange_menu();
|
||||
$vars['registerform'] = \SYSTEM\SECURITY\security::isLoggedIn() ? $this->getloggedinform() : $this->exchange_registerform();
|
||||
$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 = array_merge($vars, \SYSTEM\PAGE\text::tag('uvote'));
|
||||
|
||||
@ -1,6 +1,12 @@
|
||||
<?php
|
||||
|
||||
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){
|
||||
return (new default_page())->html($_escaped_fragment_);}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
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){
|
||||
new \SYSTEM\LOG\INFO('json kommt im php an');
|
||||
$vote = $data;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user