included menu, button function (RANDOM VOTE HILARIOUS!)
@ -5,8 +5,8 @@ class PageApi extends \SYSTEM\PAGE\PageClass {
|
||||
public static function default_page(){
|
||||
return new default_page();}
|
||||
|
||||
public static function default_myVote(){
|
||||
return new default_myVote();}
|
||||
public static function action_myvote(){
|
||||
return new default_myvote();}
|
||||
|
||||
public static function action_media(){
|
||||
throw new ERROR("test");
|
||||
|
||||
@ -1,100 +0,0 @@
|
||||
<!--
|
||||
To change this template, choose Tools | Templates
|
||||
and open the template in the editor.
|
||||
-->
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>myVote</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="description" content="">
|
||||
<meta name="author" content="">
|
||||
|
||||
<!-- Le styles -->
|
||||
<link href="lib/bootstrap/css/bootstrap.css" rel="stylesheet">
|
||||
<link href="lib/font-awesome/css/font-awesome.css" rel="stylesheet">
|
||||
<style type="text/css">
|
||||
body {
|
||||
padding-top: 60px;
|
||||
padding-bottom: 40px;
|
||||
}
|
||||
</style>
|
||||
<link href="lib/bootstrap/css/bootstrap-responsive.css" rel="stylesheet">
|
||||
<link href="lib/font-awesome/css/font-awesome.css" rel="stylesheet">
|
||||
<!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
|
||||
<!--[if lt IE 9]>
|
||||
<script src="../assets/js/html5shiv.js"></script>
|
||||
<![endif]-->
|
||||
|
||||
<!-- Fav and touch icons -->
|
||||
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="../assets/ico/apple-touch-icon-144-precomposed.png">
|
||||
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="../assets/ico/apple-touch-icon-114-precomposed.png">
|
||||
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="../assets/ico/apple-touch-icon-72-precomposed.png">
|
||||
<link rel="apple-touch-icon-precomposed" href="../assets/ico/apple-touch-icon-57-precomposed.png">
|
||||
<link rel="shortcut icon" href="../assets/ico/favicon.png">
|
||||
</head>
|
||||
|
||||
<body style="background-color: #f2f2f2;">
|
||||
|
||||
<div class="navbar navbar-inverse navbar-fixed-top">
|
||||
<div class="navbar-inner">
|
||||
<div class="container">
|
||||
<button type="button" class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="brand">myVote</a>
|
||||
<div class="nav-collapse collapse">
|
||||
<ul class="nav">
|
||||
|
||||
<li><a href="D:/Webdesign/iVote/uVote/page/default_page/page.html">uVote</a></li>
|
||||
<li><a href="#about">Dokumentation</a></li>
|
||||
<li><a href="#contact">Download</a></li>
|
||||
|
||||
</ul>
|
||||
<form class="navbar-form pull-right">
|
||||
<input class="span2" type="text" placeholder="E-Mail">
|
||||
<input class="span2" type="password" placeholder="Passwort">
|
||||
<button type="submit" class="btn">Login</button>
|
||||
</form>
|
||||
</div><!--/.nav-collapse -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container">
|
||||
|
||||
<!-- Main hero unit for a primary marketing message or call to action -->
|
||||
|
||||
<div class="hero-unit" style="padding: 1px; margin: 1px; margin-top: -30px; background: white;">
|
||||
<div class="hero-unit" style="height: 200px; background: white;">
|
||||
<div class="row">
|
||||
<img src="pics/logo2.png" width="600" style="margin-top: -40px;" />
|
||||
</div>
|
||||
<!-- <div class="hero-unit" style="height: 300px; padding: 5px; padding-top: 50px; width: 400px; margin-left: 700px; margin-top: -260px; background: white;">
|
||||
<i class="icon-tags" style="margin-left: 20px; margin-top: -30px;" ></i>Informieren
|
||||
<p></p>
|
||||
<i class="icon-tags" style="margin-left: 20px; margin-top: 10px;"></i>Diskutieren
|
||||
<p></p>
|
||||
<i class="icon-tags" style="margin-left: 20px;"></i>Abstimmen
|
||||
<p></p>
|
||||
<i class="icon-tags" style="margin-left: 20px;"></i>Vergleichen
|
||||
<p></p>
|
||||
<i class="icon-tags" style="margin-left: 20px;"></i>Verändern
|
||||
<p></p>
|
||||
</div>-->
|
||||
</div>
|
||||
</div>
|
||||
<div class="navbar-inner" style="background: black;">
|
||||
<div class="container" >
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="hero-unit" style="padding: 5px;">
|
||||
${comparelist}
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
25
uVote/page/default_myvote/default_myvote.php
Normal file
@ -0,0 +1,25 @@
|
||||
<?php
|
||||
class default_myvote extends SYSTEM\PAGE\Page {
|
||||
|
||||
private function js(){
|
||||
return '';
|
||||
}
|
||||
|
||||
public function generate_votelist(){
|
||||
$result = "";
|
||||
$votes = votes::getAllVotesOfGroup(1);
|
||||
foreach($votes as $vote){
|
||||
$vars = array('vote_title' => $vote['title'], 'vote_text' => $vote['text']);
|
||||
$result .= SYSTEM\PAGE\replace::replaceFile(SYSTEM\SERVERPATH(new PPAGE(),'default_page/vote.tpl'), $vars);
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
|
||||
public function html(){
|
||||
$vars = array();
|
||||
$vars['js'] = $this->js();
|
||||
$vars['PIC_PATH'] = SYSTEM\WEBPATH(new PPAGE(),'default_myvote/pics/');
|
||||
return SYSTEM\PAGE\replace::replaceFile(SYSTEM\SERVERPATH(new PPAGE(),'default_myvote/myvote.html'), $vars);
|
||||
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 8.6 KiB After Width: | Height: | Size: 8.6 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 158 KiB After Width: | Height: | Size: 158 KiB |
30
uVote/page/default_myvote/myvote.html
Normal file
@ -0,0 +1,30 @@
|
||||
|
||||
<div class="hero-unit" style="padding: 1px; margin: 1px; margin-top: -30px; background: white;">
|
||||
<div class="hero-unit" style="height: 200px; background: white;">
|
||||
<div class="row">
|
||||
<img src="${PIC_PATH}/myVote.png" width="600" style="margin-top: -40px;" />
|
||||
</div>
|
||||
<!-- <div class="hero-unit" style="height: 300px; padding: 5px; padding-top: 50px; width: 400px; margin-left: 700px; margin-top: -260px; background: white;">
|
||||
<i class="icon-tags" style="margin-left: 20px; margin-top: -30px;" ></i>Informieren
|
||||
<p></p>
|
||||
<i class="icon-tags" style="margin-left: 20px; margin-top: 10px;"></i>Diskutieren
|
||||
<p></p>
|
||||
<i class="icon-tags" style="margin-left: 20px;"></i>Abstimmen
|
||||
<p></p>
|
||||
<i class="icon-tags" style="margin-left: 20px;"></i>Vergleichen
|
||||
<p></p>
|
||||
<i class="icon-tags" style="margin-left: 20px;"></i>Verändern
|
||||
<p></p>
|
||||
</div>-->
|
||||
</div>
|
||||
</div>
|
||||
<div class="navbar-inner" style="background: black;">
|
||||
<div class="container" >
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="hero-unit" style="padding: 5px;">
|
||||
${comparelist}
|
||||
</div>
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 112 KiB After Width: | Height: | Size: 112 KiB |
|
Before Width: | Height: | Size: 114 KiB After Width: | Height: | Size: 114 KiB |
@ -3,14 +3,17 @@
|
||||
class default_page extends SYSTEM\PAGE\Page {
|
||||
|
||||
private function js(){
|
||||
return '<script src="'.SYSTEM\WEBPATH(new PPAGE(),'default_page/js/timer.js').'"></script>';
|
||||
return '<script type="text/javascript" language="JavaScript" src="'.SYSTEM\WEBPATH(new PJQUERY(),'jquery-1.9.1.min.js').'"></script>'.
|
||||
'<script type="text/javascript" language="JavaScript" src="'.SYSTEM\WEBPATH(new PBOOTSTRAP(),'js/bootstrap.min.js').'"></script>'.
|
||||
'<script src="'.SYSTEM\WEBPATH(new PPAGE(),'default_page/js/timer.js').'"></script>'.
|
||||
'<script src="'.SYSTEM\WEBPATH(new PPAGE(),'default_page/js/loadtexts.js').'"></script>';
|
||||
}
|
||||
|
||||
public function generate_votelist(){
|
||||
$result = "";
|
||||
$votes = votes::getAllVotesOfGroup(1);
|
||||
foreach($votes as $vote){
|
||||
$vars = array('vote_title' => $vote['title'], 'vote_text' => $vote['text']);
|
||||
$vars = array('vote_title' => $vote['title'], 'vote_text' => $vote['text'], 'poll_ID' => rand(1, 100));
|
||||
$result .= SYSTEM\PAGE\replace::replaceFile(SYSTEM\SERVERPATH(new PPAGE(),'default_page/vote.tpl'), $vars);
|
||||
}
|
||||
return $result;
|
||||
|
||||
67
uVote/page/default_page/js/loadtexts.js
Normal file
@ -0,0 +1,67 @@
|
||||
/* jQuery on document ready */
|
||||
$(document).ready(function() {
|
||||
// handle navigation link click
|
||||
$('.navbar ul li a').not('#menu_uvote').click(function () {
|
||||
loadAjaxContent($(this).attr('url'));
|
||||
|
||||
//loadUrlPic($(this).attr('url'));
|
||||
});
|
||||
$('.btnvote_yes').click(function () {
|
||||
vote_click($(this).attr('poll_ID'),1);
|
||||
});
|
||||
$('.btnvote_no').click(function () {
|
||||
vote_click($(this).attr('poll_ID'),2);
|
||||
});
|
||||
$('.btnvote_off').click(function () {
|
||||
vote_click($(this).attr('poll_ID'),3);
|
||||
});
|
||||
});
|
||||
function vote_click (poll_ID, vote) {
|
||||
$.get('./api.php?call=vote&action=vote&poll_ID=' + poll_ID + '&vote=' + vote, function (data) {
|
||||
dataTmp = data;
|
||||
}).complete(function() {
|
||||
alert (poll_ID);
|
||||
});
|
||||
}
|
||||
|
||||
function loadAjaxContent(url) {
|
||||
var dataTmp;
|
||||
$.get(url, function (data) {
|
||||
dataTmp = data;
|
||||
bodyelem = $("html,body");
|
||||
bodyelem.animate();
|
||||
}).complete(function() {
|
||||
$('#site-content-wrapper').slideUp({duration: 'slow',
|
||||
complete: function(){
|
||||
$('#site-content').html(dataTmp);
|
||||
$('#site-content-wrapper').slideDown('slow');
|
||||
site_content_is_visible = true;
|
||||
}});
|
||||
});
|
||||
}
|
||||
function loadUrlPic(url_pic) {
|
||||
var dataTmp;
|
||||
$.get(url_pic, function (data) {
|
||||
dataTmp = data;
|
||||
bodyelem = $("html,body");
|
||||
bodyelem.animate();
|
||||
}).complete(function() {
|
||||
$('.carousel-inner').slideUp({duration: 'slow',
|
||||
complete: function(){
|
||||
$('#pic').html(dataTmp);
|
||||
$('.carousel-inner').slideDown('slow');
|
||||
site_content_is_visible = true;
|
||||
}});
|
||||
});
|
||||
}
|
||||
|
||||
function loadApiPic(id) {
|
||||
var dataTmp;
|
||||
$.get('./api.php?call=img&id='+id, function (data) {
|
||||
dataTmp = data;
|
||||
bodyelem = $("html,body");
|
||||
bodyelem.animate();
|
||||
}).complete(function() {
|
||||
|
||||
});
|
||||
}
|
||||
14
uVote/page/default_page/js/vote_positive.js
Normal file
@ -0,0 +1,14 @@
|
||||
|
||||
$(function(){
|
||||
|
||||
$('#btn btn-large btn-green').on('click', function (e) {
|
||||
|
||||
var poll_ID = "15";
|
||||
var vote = "4";
|
||||
|
||||
document.write('href="mojotrollz.eu/web/uVote/api.php?call=vote&action=vote&poll_ID=' + poll_ID + '&vote=' + vote + '"');
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
|
||||
@ -1,8 +1,9 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
|
||||
<title>iVote</title>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="description" content="">
|
||||
<meta name="author" content="">
|
||||
@ -43,13 +44,13 @@
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="brand">uVote</a>
|
||||
<a class="brand" href="" id="menu_uvote">uVote</a>
|
||||
<div class="nav-collapse collapse">
|
||||
<ul class="nav">
|
||||
|
||||
<li><a href="D:/Webdesign/iVote/uVote/page/default_myVote/default_myvote.html">myVote</a></li>
|
||||
<li><a href="#about">Dokumentation</a></li>
|
||||
<li><a href="#contact">Download</a></li>
|
||||
<li><a href="#" url="?action=myvote">myVote</a></li>
|
||||
<li><a href="#" url="?action=Dokumentation">Dokumentation</a></li>
|
||||
<li><a href="#" url="?action=Download">Download</a></li>
|
||||
|
||||
</ul>
|
||||
<form class="navbar-form pull-right">
|
||||
@ -62,10 +63,10 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container">
|
||||
<div class="container" id="site-content-wrapper">
|
||||
|
||||
<!-- Main hero unit for a primary marketing message or call to action -->
|
||||
|
||||
<div id="site-content">
|
||||
<div class="hero-unit" style="padding: 1px; margin: 1px; margin-top: -30px; background: white;">
|
||||
<div class="hero-unit" style="height: 200px; background: white;">
|
||||
<div class="row">
|
||||
@ -101,7 +102,7 @@
|
||||
<p>Entwurf der Seite von Tobias Rechel, Mojotrollz.eu</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@ -8,25 +8,12 @@
|
||||
|
||||
<div class="span5" style="">
|
||||
<h2>Abstimmung</h2>
|
||||
<a class="btn btn-large btn-green" style="width: 110px;">Pro »
|
||||
<script language="javascript">
|
||||
$(function(){
|
||||
<a class="btn btn-large btn-green btnvote_yes" style="width: 110px;" poll_ID="${poll_ID}">Pro »
|
||||
|
||||
$('#btn btn-large btn-green').on('click', function (e) {
|
||||
|
||||
var poll_ID = "15";
|
||||
var vote = "4";
|
||||
|
||||
document.write('href="mojotrollz.eu/web/uVote/api.php?call=vote&action=vote&poll_ID=' + poll_ID + '&vote=' + vote + '"');
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
</script>
|
||||
</a>
|
||||
|
||||
<a class="btn btn-large btn-red" style="width: 110px; background-color: red;" href="#">Contra »</a>
|
||||
<a class="btn btn-large btn-grey" style="width: 110px; background-color: grey;" href="#">Enthaltung »</a>
|
||||
<a class="btn btn-large btn-red btnvote_no" style="width: 110px; background-color: red;" href="#" poll_ID="${poll_ID}">Contra »</a>
|
||||
<a class="btn btn-large btn-grey btnvote_off" style="width: 110px; background-color: grey;" href="#" poll_ID="${poll_ID}">Enthaltung »</a>
|
||||
|
||||
<!-- Countdown-Generator by www.coolplace.cc -->
|
||||
<form name="coolcccount">
|
||||
|
||||
@ -4,6 +4,5 @@ $autoload = SYSTEM\autoload::getInstance();
|
||||
|
||||
$autoload->registerFolder(dirname(__FILE__),'');
|
||||
$autoload->registerFolder(dirname(__FILE__).'/default_page','');
|
||||
|
||||
$autoload->registerFolder(dirname(__FILE__),'');
|
||||
$autoload->registerFolder(dirname(__FILE__).'/default_myvote','');
|
||||
$autoload->registerFolder(dirname(__FILE__).'/default_register','');
|
||||
|
||||