-
+
+
+
${vote_title}
- Initiiert von: ${vote_init}
+
+
+ Initiiert von: ${vote_init}
+
+
+
+
+ ${vote_text}
+
-
-
-
-
-
\ No newline at end of file
+
+
+
\ No newline at end of file
diff --git a/uVote/page/default_page/js/loadtexts.js b/uVote/page/default_page/js/loadtexts.js
index bfeaaf0..9eea037 100644
--- a/uVote/page/default_page/js/loadtexts.js
+++ b/uVote/page/default_page/js/loadtexts.js
@@ -1,16 +1,17 @@
/* jQuery on document ready */
$(document).ready(function() {
// handle navigation link click
- $('.navbar ul li a').not('#menu_uvote').click(function () {
+ /*$('.navbar ul li a').not('#menu_uvote').click(function () {
loadAjaxContent($(this).attr('url'));
//loadUrlPic($(this).attr('url'));
- });
+ });*/
$('.btn_vote').click(function () {
//vote_click($(this).attr('poll_ID'));
open_vote($(this).attr('poll_ID'));
+ $('#user_main').load('./?action=open_bulletin&poll_ID=' + $(this).attr('poll_ID'));
});
- $('.btnvote_yes').click(function () {
+ /*$('.btnvote_yes').click(function () {
vote_click($(this).attr('poll_ID'),1);
});
$('.btnvote_no').click(function () {
@@ -26,33 +27,16 @@ $(document).ready(function() {
}else{
load_openvoteinfo($(this).attr('poll_ID'));
}
- });
+ });*/
//jqBootstrapValidation
- $("#form_register input").not("[type=submit]").jqBootstrapValidation(
- {
- preventSubmit: true,
- submitError: function($form, event, errors) {},
- submitSuccess: function($form, event){
-// alert ('.api.php?call=account&action=create&username=' + $('#bt_login_user').val() + '&password_sha=' + $.sha1($('#bt_login_password').val()) + '&email=' + $('#bt_login_user').val() + '&locale=deDE');
- $.get('./api.php?call=account&action=create&username=' + $('#bt_login_user').val() + '&password_sha=' + $.sha1($('#bt_login_password').val()) + '&email=' + $('#bt_login_user').val() + '&locale=deDE', function (data) {
- if(data == 1){
- window.location.reload();
- } else {
- $('#help-block-user-password-combi-wrong').attr('style', 'display: block;');
- }
- });
- event.preventDefault();
- }
- });
-
- $("#form_login input").not("[type=submit]").jqBootstrapValidation(
- {
- preventSubmit: true,
- submitError: function($form, event, errors) {},
- submitSuccess: function($form, event){
-// alert ('.api.php?call=account&action=create&username=' + $('#bt_login_user').val() + '&password_sha=' + $.sha1($('#bt_login_password').val()) + '&email=' + $('#bt_login_user').val() + '&locale=deDE');
- $.get('./api.php?call=account&action=login&username=' + $('#login_email').val() + '&password_sha=' + $.sha1($('#login_password').val()) + '&password_md5=' + $.md5($('#login_password').val()), function (data) {
+
+
+ $("#form_login input").not("[type=submit]").jqBootstrapValidation({
+ preventSubmit: true,
+ submitError: function($form, event, errors) {},
+ submitSuccess: function($form, event){
+ $.get('./api.php?call=account&action=login&username=' + $('#bt_login_user').val()+'&password_sha='+$.sha1($('#bt_login_password').val())+'&password_md5='+$.md5($('#bt_login_password').val()), function (data) {
if(data == 1){
window.location.reload();
} else {
@@ -74,9 +58,47 @@ $(document).ready(function() {
event.preventDefault();
}
});
-
+
+ $('#user_main').load('./?action=user_main', function(){
+ $("#register_user_form input").not("[type=submit]").jqBootstrapValidation(
+ {
+ preventSubmit: true,
+ submitError: function($form, event, errors) {},
+ submitSuccess: function($form, event){
+ $.get('./api.php?call=account&action=create&username=' + $('#register_username').val() + '&password_sha=' + $.sha1($('#user_register_password1').val()) + '&email=' + $('#register_email').val() + '&locale=deDE', function (data) {
+ if(data == 1){
+ window.location.reload();
+ } else {
+ $('#help-block-user-password-combi-wrong').attr('style', 'display: block;');
+ }
+ });
+ event.preventDefault();
+ }
+ });
+ $('#tabs_user_main a').click(function (e) {
+ e.preventDefault();
+ $(this).tab('show');
+ load_user_main_tab($(this).attr('action'));
+ });
+ });
+
});
+function load_user_main_tab(action){
+ switch(action){
+ case 'user_main_uVote':
+ $('#tab_uVote').load('./?action='+ action);
+ return;
+ case 'user_main_urVote':
+ $('#tab_urVote').load('./?action='+ action);
+ return;
+ case 'user_main_myVote':
+ $('#tab_myVote').load('./?action='+ action);
+ return;
+ default:
+ }
+}
+
function account_create(inputEmail, inputPassword){
$.get('./api.php?call=account&action=create&username=' + NULL + '&password_sha=' + password + '&email=' + email + '&locale=deDE', function (data) {
dataTmp = data;
@@ -122,14 +144,7 @@ function vote_click (poll_ID, vote) {
}
function open_vote (poll_ID) {
- $.getJSON('./api.php?call=vote&action=open_vote&poll_ID=' + poll_ID , function(data) {
- var items = [];
- if(data.status == true){
- alert("sucess");
- } else {
- alert(data.result.message);
- }
- });
+ $('#list').load('./api.php?call=vote&action=open_vote&poll_ID=' + poll_ID);
}
function loadAjaxContent(url) {
diff --git a/uVote/page/default_page/loginform.tpl b/uVote/page/default_page/loginform.tpl
index de60f06..d6ef44c 100644
--- a/uVote/page/default_page/loginform.tpl
+++ b/uVote/page/default_page/loginform.tpl
@@ -1,5 +1,35 @@
-
\ No newline at end of file
diff --git a/uVote/page/default_page/page.html b/uVote/page/default_page/page.html
index 81c5db5..5667f58 100644
--- a/uVote/page/default_page/page.html
+++ b/uVote/page/default_page/page.html
@@ -19,7 +19,7 @@
-
+
@@ -47,10 +47,10 @@
-
+
${votelist}
-
diff --git a/uVote/page/default_page/vote.tpl b/uVote/page/default_page/vote.tpl
index dcb3cbc..60c7af2 100644
--- a/uVote/page/default_page/vote.tpl
+++ b/uVote/page/default_page/vote.tpl
@@ -1,4 +1,4 @@
-
+
${vote_title}
diff --git a/uVote/page/default_register/default_register.php b/uVote/page/default_register/default_register.php
index 6474a65..25184ce 100644
--- a/uVote/page/default_register/default_register.php
+++ b/uVote/page/default_register/default_register.php
@@ -1,12 +1,11 @@
js();
- $vars['PIC_PATH'] = SYSTEM\WEBPATH(new PPAGE(),'uVote/page/default_page/pics/');
- return SYSTEM\PAGE\replace::replaceFile(SYSTEM\SERVERPATH(new PPAGE(),'default_register/register.html'), $vars);
+ return SYSTEM\PAGE\replace::replaceFile(SYSTEM\SERVERPATH(new PPAGE(),'default_register/register.tpl'), $vars);
+ $vars['PIC_PATH'] = SYSTEM\WEBPATH(new PPAGE(),'default_register/pics/');
}
}
\ No newline at end of file
diff --git a/uVote/page/default_register/pics/logo2.png b/uVote/page/default_register/pics/logo2.png
new file mode 100644
index 0000000..e2e514e
Binary files /dev/null and b/uVote/page/default_register/pics/logo2.png differ
diff --git a/uVote/page/default_register/register.tpl b/uVote/page/default_register/register.tpl
new file mode 100644
index 0000000..6807cd9
--- /dev/null
+++ b/uVote/page/default_register/register.tpl
@@ -0,0 +1,87 @@
+
${register}
+
+
+
\ No newline at end of file
diff --git a/uVote/page/page_uvote.php b/uVote/page/page_uvote.php
index 1f73dc6..877ffb3 100644
--- a/uVote/page/page_uvote.php
+++ b/uVote/page/page_uvote.php
@@ -7,6 +7,23 @@ class page_uvote extends \SYSTEM\API\api_default {
public static function action_myvote(){
return new default_myvote();}
+
+ public static function action_open_bulletin ($poll_ID){
+ return new default_bulletin($poll_ID);}
+
+ public static function action_user_main(){
+ if(!\SYSTEM\SECURITY\Security::isLoggedIn()){
+ return new default_register ();}
+ return new user_main();}
+
+ public static function action_user_main_uVote(){
+ return new user_main_uVote();}
+
+ public static function action_user_main_urVote(){
+ return new user_main_urVote();}
+
+ public static function action_user_main_myVote(){
+ return new user_main_myVote();}
public static function action_media(){
throw new ERROR("test");
diff --git a/uVote/page/register_page_classes.php b/uVote/page/register_page_classes.php
index d5fe93b..20a4109 100644
--- a/uVote/page/register_page_classes.php
+++ b/uVote/page/register_page_classes.php
@@ -4,3 +4,6 @@ SYSTEM\autoload::registerFolder(dirname(__FILE__).'/default_page','');
SYSTEM\autoload::registerFolder(dirname(__FILE__).'/default_myvote','');
SYSTEM\autoload::registerFolder(dirname(__FILE__).'/default_register','');
SYSTEM\autoload::registerFolder(dirname(__FILE__).'/default_openinfo','');
+SYSTEM\autoload::registerFolder(dirname(__FILE__).'/default_bulletin','');
+SYSTEM\autoload::registerFolder(dirname(__FILE__).'/user_main','');
+SYSTEM\autoload::registerFolder(dirname(__FILE__).'/user_main_uVote','');
\ No newline at end of file
diff --git a/uVote/page/user_main/main_menu.tpl b/uVote/page/user_main/main_menu.tpl
new file mode 100644
index 0000000..47edbb8
--- /dev/null
+++ b/uVote/page/user_main/main_menu.tpl
@@ -0,0 +1,12 @@
+
\ No newline at end of file
diff --git a/uVote/page/user_main/user_main.php b/uVote/page/user_main/user_main.php
new file mode 100644
index 0000000..d6baa21
--- /dev/null
+++ b/uVote/page/user_main/user_main.php
@@ -0,0 +1,8 @@
+