diff --git a/index.php b/index.php index 7e4945c..7f34abc 100644 --- a/index.php +++ b/index.php @@ -6,14 +6,14 @@ require_once '../system/log/register_exception_shortcut.php'; 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/iVote/'), - array(SYSTEM\CONFIG\config_ids::SYS_CONFIG_PATH_BASEPATH, '/home/web/webdir/iVote/'), + 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_danube'))); + 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'))); $page = new \SYSTEM\PAGE\PageApi(new SYSTEM\verifyclass(), new PageApi()); echo $page->CALL(array_merge($_POST,$_GET))->html(); \ No newline at end of file diff --git a/uVote/api/autoload.inc.php b/uVote/api/autoload.inc.php new file mode 100644 index 0000000..4246ac3 --- /dev/null +++ b/uVote/api/autoload.inc.php @@ -0,0 +1,6 @@ +registerFolder(dirname(__FILE__),''); +$autoload->registerFolder(dirname(__FILE__).'/votes',''); diff --git a/uVote/api/votes/votes.php b/uVote/api/votes/votes.php new file mode 100644 index 0000000..9009469 --- /dev/null +++ b/uVote/api/votes/votes.php @@ -0,0 +1,22 @@ +prepare( 'selVoteByGrp', + 'SELECT * FROM `uvote_votes` WHERE `group` = ?;', + array($groupid)); + $result = array(); + + //$r = array(); + while($r = $res->next()){ + //print_r($r); + //$result[] = array('title' => $r['title'],'text' => $r['text']); + $result[] = $r; + //print_r($result); + //echo ""; + } + //print_r($result); + return $result; + } +} diff --git a/uVote/autoload.inc.php b/uVote/autoload.inc.php index 91c759e..c974a96 100644 --- a/uVote/autoload.inc.php +++ b/uVote/autoload.inc.php @@ -3,6 +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'; +require_once dirname(__FILE__).'/dbd/autoload.inc.php'; -//require_once dirname(__FILE__).'/api/autoload.inc.php'; \ No newline at end of file +require_once dirname(__FILE__).'/api/autoload.inc.php'; \ No newline at end of file diff --git a/uVote/dbd/autoload.inc.php b/uVote/dbd/autoload.inc.php new file mode 100644 index 0000000..d87380a --- /dev/null +++ b/uVote/dbd/autoload.inc.php @@ -0,0 +1,9 @@ +registerFolder(dirname(__FILE__).'/db/','DBD'); +$autoload->registerFolder(dirname(__FILE__).'/tbl/','DBD'); +//$autoload->registerFolder(dirname(__FILE__).'/tbl/definitions/','DBD\DEFINITIONS'); +//$autoload->registerFolder(dirname(__FILE__).'/tbl/data/','DBD\DATA'); +//$autoload->registerFolder(dirname(__FILE__).'/tbl/data_processed/','DBD\DATA_PROCESSED'); \ No newline at end of file diff --git a/uVote/dbd/db/uVote.php b/uVote/dbd/db/uVote.php new file mode 100644 index 0000000..936ec7b --- /dev/null +++ b/uVote/dbd/db/uVote.php @@ -0,0 +1,8 @@ + -
Donec sed odio dui. Cras justo odio, dapibus ac facilisis in, egestas eget quam. Vestibulum id ligula porta felis euismod semper.
- -Donec sed odio dui. Cras justo odio, dapibus ac facilisis in, egestas eget quam. Vestibulum id ligula porta felis euismod semper.
- -${vote_text}
+ +