basic working
This commit is contained in:
parent
b02ea53bcb
commit
338ebedc40
@ -1 +1 @@
|
||||
Subproject commit 5a6fee7cbaf6ae85329ead3d48beb6169b25c071
|
||||
Subproject commit 433f0919ccd244e314f8082560e72c70c079a0f0
|
||||
@ -1,21 +1,10 @@
|
||||
$(document).ready(function() {
|
||||
//load_user_main();
|
||||
//load_user_list();
|
||||
//register_login();
|
||||
//register_logout();
|
||||
$(document).ready(function() {
|
||||
new SYSTEM('./api.php',1,'start');
|
||||
register_login();
|
||||
register_logout();
|
||||
});
|
||||
|
||||
function load_user_list(){
|
||||
$('#user_list').load('./?action=user_list', function(){
|
||||
register_user_list();});
|
||||
}
|
||||
function load_user_main(){
|
||||
$('#user_main').load('./?action=user_main', function(){
|
||||
register_user_main();
|
||||
});
|
||||
}
|
||||
|
||||
function register_user_list(){
|
||||
function init_user_list(){
|
||||
$('#tabs_user_list a').click(function (e) {
|
||||
e.preventDefault();
|
||||
load_user_list_tab($(this).attr('action'));
|
||||
@ -31,7 +20,7 @@ function register_user_list(){
|
||||
$('#vote_data_panel' + $(this).attr('poll_ID')).toggle();
|
||||
});
|
||||
}
|
||||
function register_user_main(){
|
||||
function init_user_main(){
|
||||
register_registerform();
|
||||
$('#feedback_submit').click(function (data){
|
||||
var test = $('textarea#feedback_text').val();
|
||||
@ -49,7 +38,7 @@ function register_login(){
|
||||
//load_user_main_tab('user_main_uVote');
|
||||
});
|
||||
|
||||
$('#user_list').load('./?action=user_list', function(){
|
||||
/*$('#user_list').load('./?action=user_list', function(){
|
||||
$('#tabs_user_list a').click(function (e) {
|
||||
e.preventDefault();
|
||||
$(this).tab('show');
|
||||
@ -67,7 +56,7 @@ function register_login(){
|
||||
});
|
||||
|
||||
//load_user_main_tab('user_main_uVote');
|
||||
});
|
||||
}); */
|
||||
$("#form_login input").not("[type=submit]").jqBootstrapValidation({
|
||||
|
||||
preventSubmit: true,
|
||||
|
||||
@ -5,28 +5,28 @@ class page_uvote extends \SYSTEM\API\api_default {
|
||||
public static function default_page($_escaped_fragment_ = NULL){
|
||||
return (new default_page())->html($_escaped_fragment_);}
|
||||
|
||||
public static function action_open_bulletin ($poll_ID){
|
||||
public static function page_open_bulletin ($poll_ID){
|
||||
if(!\SYSTEM\SECURITY\Security::isLoggedIn()){
|
||||
return (new default_register ())->html();}
|
||||
return (new default_bulletin($poll_ID))->html();}
|
||||
|
||||
public static function action_user_main(){
|
||||
public static function page_user_main(){
|
||||
if(!\SYSTEM\SECURITY\Security::isLoggedIn()){
|
||||
return (new default_register ())->html();}
|
||||
return (new user_main())->html();}
|
||||
|
||||
public static function action_user_list(){
|
||||
public static function page_user_list(){
|
||||
return (new user_list())->html();}
|
||||
|
||||
public static function action_user_list_active(){
|
||||
public static function page_user_list_active(){
|
||||
return (new user_list_active())->html();}
|
||||
|
||||
public static function action_user_list_ended(){
|
||||
public static function page_user_list_ended(){
|
||||
return (new user_list_ended())->html();}
|
||||
|
||||
public static function action_user_main_urVote(){
|
||||
public static function page_user_main_urVote(){
|
||||
return (new user_main_urVote())->html();}
|
||||
|
||||
public static function action_user_main_myVote(){
|
||||
public static function page_user_main_myVote(){
|
||||
return (new user_main_myVote())->html();}
|
||||
}
|
||||
@ -4,10 +4,10 @@ class DATA_UVOTE extends \SYSTEM\DB\QI {
|
||||
public static function get_class(){return \get_class();}
|
||||
public static function files_mysql(){
|
||||
return array( \SYSTEM\SERVERPATH(new \PSQL(),'/mysql/schema_uvote_votes.sql'),
|
||||
\SYSTEM\SERVERPATH(new \PSQL(),'/mysql/schema_uvote_data.sql'),
|
||||
\SYSTEM\SERVERPATH(new \PSQL(),'/mysql/schema_uvote_votes_per_party.sql'),
|
||||
\SYSTEM\SERVERPATH(new \PSQL(),'/mysql/.sql'),
|
||||
\SYSTEM\SERVERPATH(new \PSQL(),'/mysql/.sql'),
|
||||
\SYSTEM\SERVERPATH(new \PSQL(),'/mysql/.sql'),
|
||||
\SYSTEM\SERVERPATH(new \PSQL(),'/mysql/.sql'),
|
||||
\SYSTEM\SERVERPATH(new \PSQL(),'/mysql/.sql'));
|
||||
\SYSTEM\SERVERPATH(new \PSQL(),'/mysql/system_page.sql'));
|
||||
}
|
||||
}
|
||||
11
uvote/sql/mysql/schema_uvote_data.sql
Normal file
11
uvote/sql/mysql/schema_uvote_data.sql
Normal file
@ -0,0 +1,11 @@
|
||||
CREATE TABLE `uvote_data` (
|
||||
`poll_ID` INT(10) NOT NULL DEFAULT '0',
|
||||
`user_ID` INT(10) NOT NULL DEFAULT '0',
|
||||
`choice` INT(10) NULL DEFAULT NULL,
|
||||
`group` INT(10) NULL DEFAULT NULL,
|
||||
`timestamp` DATETIME NULL DEFAULT NULL,
|
||||
PRIMARY KEY (`poll_ID`, `user_ID`)
|
||||
)
|
||||
COLLATE='utf8_general_ci'
|
||||
ENGINE=MyISAM
|
||||
;
|
||||
13
uvote/sql/mysql/schema_uvote_votes_per_party.sql
Normal file
13
uvote/sql/mysql/schema_uvote_votes_per_party.sql
Normal file
@ -0,0 +1,13 @@
|
||||
CREATE TABLE `uvote_votes_per_party` (
|
||||
`poll_ID` INT(10) NOT NULL,
|
||||
`party` TINYTEXT NOT NULL,
|
||||
`votes_pro` INT(10) NULL DEFAULT NULL,
|
||||
`votes_contra` INT(10) NULL DEFAULT NULL,
|
||||
`nr_attending` INT(10) NULL DEFAULT NULL,
|
||||
`total` INT(10) NULL DEFAULT NULL,
|
||||
`choice` INT(10) NULL DEFAULT NULL,
|
||||
`bt_choice` INT(10) NULL DEFAULT NULL
|
||||
)
|
||||
COLLATE='utf8_general_ci'
|
||||
ENGINE=MyISAM
|
||||
;
|
||||
2
uvote/sql/mysql/system_page.sql
Normal file
2
uvote/sql/mysql/system_page.sql
Normal file
@ -0,0 +1,2 @@
|
||||
INSERT INTO `system_page` (`id`, `group`, `name`, `state`, `parent_id`, `login`, `type`, `div`, `url`, `func`, `php_class`) VALUES (10, 1, 'user_list', 'start', -1, 0, 0, '#user_list', './?page=user_list', 'init_user_list', 'user_list');
|
||||
INSERT INTO `system_page` (`id`, `group`, `name`, `state`, `parent_id`, `login`, `type`, `div`, `url`, `func`, `php_class`) VALUES (11, 1, 'user_main', 'start', -1, 0, 0, '#user_main', './?page=user_main', 'init_user_main', 'user_main');
|
||||
Loading…
x
Reference in New Issue
Block a user