external config or uvote

This commit is contained in:
Ulf Gebhardt 2013-06-26 15:01:48 +02:00
parent f68fb67288
commit 404eee9d9f
3 changed files with 16 additions and 18 deletions

11
api.php
View File

@ -6,15 +6,8 @@ require_once '../system/log/register_exception_shortcut.php';
require_once '../system/log/register_errorhandler_jsonoutput.php'; //print errors as json to caller
require_once '../system/log/register_result_shortcut.php';
SYSTEM\system::start(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/uVote/'),
array(SYSTEM\CONFIG\config_ids::SYS_CONFIG_PATH_BASEPATH, '/home/web/webdir/uVote/'),
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, ''),
array(SYSTEM\CONFIG\config_ids::SYS_CONFIG_DB_USER, 'mojotrolls_mysql'),
array(SYSTEM\CONFIG\config_ids::SYS_CONFIG_DB_PASSWORD, 'dajsabeaisvd345'),
array(SYSTEM\CONFIG\config_ids::SYS_CONFIG_DB_DBNAME, 'host_uVote')));
require_once 'config.php';
SYSTEM\system::start($uvote_config);
$api = new \SYSTEM\API\Api (new SYSTEM\verifyclass(), new ApiClass());
echo $api->CALL(array_merge($_POST,$_GET));

12
config.php Normal file
View File

@ -0,0 +1,12 @@
<?php
$uvote_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/uVote/'),
array(SYSTEM\CONFIG\config_ids::SYS_CONFIG_PATH_BASEPATH, '/home/web/webdir/uVote/'),
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, ''),
array(SYSTEM\CONFIG\config_ids::SYS_CONFIG_DB_USER, 'mojotrolls_dev'),
array(SYSTEM\CONFIG\config_ids::SYS_CONFIG_DB_PASSWORD, 'dsjgfasudzfsvad'),
array(SYSTEM\CONFIG\config_ids::SYS_CONFIG_DB_DBNAME, 'host_uVote'),
array(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_PATH_SYSTEMPATHREL, '../system/'));

View File

@ -5,15 +5,8 @@ require_once 'uVote/autoload.inc.php';
require_once '../system/log/register_exception_shortcut.php'; //allow ERROR() instead of \SYSTEM\LOG\ERROR()
require_once '../system/log/register_errorhandler_jsonoutput.php'; //print errors as json to caller
SYSTEM\system::start(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/uVote/'),
array(SYSTEM\CONFIG\config_ids::SYS_CONFIG_PATH_BASEPATH, '/home/web/webdir/uVote/'),
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, ''),
array(SYSTEM\CONFIG\config_ids::SYS_CONFIG_DB_USER, 'mojotrolls_dev'),
array(SYSTEM\CONFIG\config_ids::SYS_CONFIG_DB_PASSWORD, 'dsjgfasudzfsvad'),
array(SYSTEM\CONFIG\config_ids::SYS_CONFIG_DB_DBNAME, 'host_uVote')));
require_once 'config.php';
SYSTEM\system::start($uvote_config);
$page = new \SYSTEM\PAGE\PageApi(new SYSTEM\verifyclass(), new PageApi());
echo $page->CALL(array_merge($_POST,$_GET))->html();