changed name

This commit is contained in:
Ulf Gebhardt 2017-12-26 18:02:31 +01:00
parent 8a942ed3f8
commit 5c9a9d89e0
131 changed files with 1091 additions and 7 deletions

View File

@ -1,9 +1,9 @@
<?php
require_once 'lib/autoload.inc'; //SYSTEM Classes
require_once 'buergerkandidaten/autoload.inc'; //Project Classes
require_once 'buergerkomitee/autoload.inc'; //Project Classes
require_once '/home/web/web/config/get_config.php';
\SYSTEM\system::start(\WEBCRAFT\get_config(dirname(__FILE__)));
echo \SYSTEM\API\api::run('\SYSTEM\API\verify','api_buergerkandidaten',array_merge($_POST,$_GET));
echo \SYSTEM\API\api::run('\SYSTEM\API\verify','api_buergerkomitee',array_merge($_POST,$_GET));
new \SYSTEM\LOG\COUNTER("API was called sucessfully.");

View File

@ -0,0 +1,6 @@
<?php
class api_buergerkomitee extends \SYSTEM\API\api_system {
public static function call_email($to,$from,$text){
return default_kontakt::email($to,$from,$text);}
}

View File

@ -0,0 +1,3 @@
<?php
SYSTEM\autoload::registerFolder(dirname(__FILE__),'');
//SYSTEM\autoload::registerFolder(dirname(__FILE__).'/elements','');

View File

@ -0,0 +1,2 @@
<?php
\SYSTEM\autoload::registerFolder(dirname(__FILE__),'');

View File

@ -0,0 +1,4 @@
<?php
class config_ids extends \SYSTEM\CONFIG\config_ids {
const WEBCRAFT_BILLING_TOKEN = 1000;
}

View File

@ -0,0 +1,6 @@
<?php
\SYSTEM\autoload::registerFolder(dirname(__FILE__),'');
\SYSTEM\FILES\files::registerFolder(dirname(__FILE__).'/img/','img','*.*');
\SYSTEM\FILES\files::registerFolder(dirname(__FILE__).'/org/','org','*.*');
\SYSTEM\FILES\files::registerFolder(dirname(__FILE__).'/download/','download','*.*');
\SYSTEM\FILES\files::registerFolder(dirname(__FILE__).'/protocol/','protocol','*.*');

3
buergerkomitee/files/cache/.gitignore vendored Normal file
View File

@ -0,0 +1,3 @@
*
*/
!.gitignore

Binary file not shown.

After

Width:  |  Height:  |  Size: 247 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 346 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 281 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 242 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 285 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 288 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 254 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 284 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 277 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 212 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 232 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 183 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 177 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 167 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 159 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 141 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 178 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 263 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 259 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 246 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 147 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 242 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 213 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 148 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 168 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 88 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 285 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 290 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 163 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 113 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 381 KiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 814 KiB

Binary file not shown.

View File

@ -0,0 +1,22 @@
<?php
class account_account implements \SYSTEM\PAGE\Page {
public static function title(){
return \SYSTEM\PAGE\text::get('title_account');}
public static function meta(){
return \SYSTEM\PAGE\text::tag('meta_account');}
public function html(){
if(!\SYSTEM\SECURITY\security::isLoggedIn()){
return '<script>system.load("login")</script>';}
$vars = array();
$user = \SYSTEM\SECURITY\security::getUser();
$vars['username'] = $user->username;
$vars['email'] = $user->email;
$vars['confirmed'] = $user->email_confirmed ? 'Ja' : 'Nein';
return SYSTEM\PAGE\replace::replaceFile((new PPAGE('account_account/tpl/account_account.tpl'))->SERVERPATH(), $vars);
}
public static function js(){
return array( new PPAGE('account_account/js/account_account.js'));
}
public static function css(){return array();}
}

View File

@ -0,0 +1,72 @@
function init_account(){
$('#logout').click(function(){
system.account_logout(function (data) {
if(data.status){
$('.help-block').html("Logout successfull.</br>");
system.load('start');
} else {
$('.help-block').html("Logout not successfull.</br>")
}
});
});
$('#confirm_email').click(function(){
system.account_confirm_email(function(data){
if(data.status){
$('.help-block').html("EMail gesendet.");
} else {
$('.help-block').html("Ein Problem ist aufgetreten: "+data.result.message);
}
})
});
$('#save').click(function(){
var data = JSON.stringify({
name: $('#input_name').val(),
lastname: $('#input_lastname').val()
});
$.ajax({type :'POST',
url : './api.php?',
data : { call: 'account',
action: 'detail',
data: data},
success : function(data) {
if(data.status){
system.reload();
} else {
$('.help-block').html('Ein Problem ist aufgetreten: '+data.result.message);
}
}
});
});
$('#grade').css('background-color',getColorForPercentage($('#grade').attr('grade')));
$('[data-toggle="tooltip"]').tooltip();
}
var percentColors = [
{ pct: 0.0, color: { r: 0xff, g: 0x00, b: 0 } },
{ pct: 0.5, color: { r: 0xff, g: 0xff, b: 0 } },
{ pct: 1.0, color: { r: 0x00, g: 0xff, b: 0 } } ];
var getColorForPercentage = function(pct) {
for (var i = 1; i < percentColors.length - 1; i++) {
if (pct < percentColors[i].pct) {
break;
}
}
var lower = percentColors[i - 1];
var upper = percentColors[i];
var range = upper.pct - lower.pct;
var rangePct = (pct - lower.pct) / range;
var pctLower = 1 - rangePct;
var pctUpper = rangePct;
var color = {
r: Math.floor(lower.color.r * pctLower + upper.color.r * pctUpper),
g: Math.floor(lower.color.g * pctLower + upper.color.g * pctUpper),
b: Math.floor(lower.color.b * pctLower + upper.color.b * pctUpper)
};
return 'rgb(' + [color.r, color.g, color.b].join(',') + ')';
// or output as hex if preferred
}

View File

@ -0,0 +1,24 @@
<div class="panel panel-default panel-default" style="margin-right: 5px; margin-left: 5px;">
<div class="panel-heading">
<h4 class="panel-title">
<i class="glyphicon glyphicon-user"></i>&nbsp;&nbsp;Account
</h4>
</div>
<div class="panel-body">
<span><b>Username: </b>${username}</span>
<br>
<span><b>EMail: </b>${email}</span>
<br>
<span><b>EMail bestätigt: </b>${confirmed}</span>
<br>
<br>
<a href="#!changepassword">Passwort ändern</a>
<br><br>
<button class="btn-sm btn btn-primary" style="clear: left; height: 32px; font-size: 13px;" type="submit" id="logout"><span class="glyphicon glyphicon-log-in" aria-hidden="true"></span> Logout</button>
<br>
<br>
<button class="btn-sm btn btn-success" style="clear: left; height: 32px; font-size: 13px;" type="submit" id="confirm_email"><span class="glyphicon glyphicon-check" aria-hidden="true"></span> EMail-Bestätigung anfordern</button>
<br>
<div class="help-block" style="float: left; padding-left: 15px;"></div>
</div>
</div>

View File

@ -0,0 +1,16 @@
<?php
class account_changepassword implements SYSTEM\PAGE\Page {
public static function title(){
return \SYSTEM\PAGE\text::get('title_changepassword');}
public static function meta(){
return \SYSTEM\PAGE\text::tag('meta_changepassword');}
public static function js(){
return array( \LIB\lib_jqbootstrapvalidation::js(),
new PPAGE('account_changepassword/js/account_changepassword.js'));}
public static function css(){
return array( new PPAGE('account_changepassword/css/account_changepassword.css'));}
public function html(){
$vars = \SYSTEM\PAGE\text::tag('changepassword');
return SYSTEM\PAGE\replace::replaceFile((new PPAGE('account_changepassword/tpl/account_changepassword.tpl'))->SERVERPATH(), $vars);
}
}

View File

@ -0,0 +1,16 @@
function init_changepassword(){
$('#btn_changepassword').click(function(){
//TODO: use jqbootstrap validation here
if($('#input_new_password1').val() !== $('#input_new_password2').val()){
$('.help-block').html('Passwort stimmt nicht überein.');
} else {
system.account_change_password($('#input_old_password').val(),$('#input_new_password1').val(),function(data){
if(data.status){
$('.help-block').html('Passwort wurde geändert.');
} else {
$('.help-block').html(data.result.message);
}
});
}
});
}

View File

@ -0,0 +1,31 @@
<div class="row">
<div class="col-md-12">
<div class="panel panel-default panel-danger margin-bottom0" style="margin-right: 5px; margin-left: 5px;">
<div class="panel-heading">
<h4 class="panel-title">
<i class="glyphicon glyphicon-user"></i>&nbsp;&nbsp;Passwort ändern
</h4>
</div>
<div class="panel-body">
<input type="password"
size="35"
style="margin-bottom: 15px; width: 100%;"
id="input_old_password"
placeholder="Altes Passwort"/>
<input type="password"
size="35"
style="margin-bottom: 15px; width: 100%;"
id="input_new_password1"
placeholder="Neues Passwort"/>
<input type="password"
size="35"
style="margin-bottom: 15px; width: 100%;"
id="input_new_password2"
placeholder="Passwort wiederholen"/>
<br>
<button class="btn-sm btn btn-warning" style="float: left; height: 32px; font-size: 13px;" id="btn_changepassword"><span class="glyphicon glyphicon-pencil" aria-hidden="true"></span>&nbsp;&nbsp;Passwort ändern</button>
<p class="help-block" style="float: left; padding-left: 15px;"></p>
</div>
</div>
</div>
</div>

View File

@ -0,0 +1,15 @@
<?php
\SYSTEM\autoload::registerFolder(dirname(__FILE__));
\SYSTEM\autoload::registerFolder(dirname(__FILE__).'/default_page');
\SYSTEM\autoload::registerFolder(dirname(__FILE__).'/default_start');
\SYSTEM\autoload::registerFolder(dirname(__FILE__).'/default_impressum');
\SYSTEM\autoload::registerFolder(dirname(__FILE__).'/default_faq');
\SYSTEM\autoload::registerFolder(dirname(__FILE__).'/default_kandidat');
\SYSTEM\autoload::registerFolder(dirname(__FILE__).'/default_kontakt');
\SYSTEM\autoload::registerFolder(dirname(__FILE__).'/default_unterstuetzen');
\SYSTEM\autoload::registerFolder(dirname(__FILE__).'/default_komitee');
require_once dirname(__FILE__).'/default_komitee/autoload.inc';
\SYSTEM\autoload::registerFolder(dirname(__FILE__).'/default_login');
\SYSTEM\autoload::registerFolder(dirname(__FILE__).'/default_resetpassword');
\SYSTEM\autoload::registerFolder(dirname(__FILE__).'/account_account');
\SYSTEM\autoload::registerFolder(dirname(__FILE__).'/account_changepassword');

View File

@ -0,0 +1,15 @@
<?php
class default_faq implements \SYSTEM\PAGE\Page {
public static function title(){
return \SYSTEM\PAGE\text::get('title_faq');}
public static function meta(){
return \SYSTEM\PAGE\text::tag('meta_faq');}
public function html(){
$vars = \SYSTEM\PAGE\text::tag('buergerkandidat');
return SYSTEM\PAGE\replace::replaceFile((new PPAGE('default_faq/tpl/default_faq.tpl'))->SERVERPATH(), $vars);
}
public static function js(){
return array( new PPAGE('default_faq/js/default_faq.js'));
}
public static function css(){return array();}
}

View File

@ -0,0 +1,2 @@
function init_faq(){
}

View File

@ -0,0 +1,10 @@
<div class="panel panel-default panel-default" style="margin-right: 5px; margin-left: 5px;">
<div class="panel-heading">
<h2 class="panel-title">
<i class="glyphicon glyphicon-info-sign"></i>&nbsp;&nbsp;FAQ
</h2>
</div>
<div class="panel-body">
${content_faq}
</div>
</div>

View File

@ -0,0 +1,15 @@
<?php
class default_impressum implements \SYSTEM\PAGE\Page {
public static function title(){
return \SYSTEM\PAGE\text::get('title_impressum');}
public static function meta(){
return \SYSTEM\PAGE\text::tag('meta_impressum');}
public function html(){
$vars = \SYSTEM\PAGE\text::tag('buergerkandidat');
return SYSTEM\PAGE\replace::replaceFile((new PPAGE('default_impressum/tpl/default_impressum.tpl'))->SERVERPATH(), $vars);
}
public static function js(){
return array( new PPAGE('default_impressum/js/default_impressum.js'));
}
public static function css(){return array();}
}

View File

@ -0,0 +1,2 @@
function init_impressum(){
}

View File

@ -0,0 +1,10 @@
<div class="panel panel-default panel-default" style="margin-right: 5px; margin-left: 5px;">
<div class="panel-heading">
<h2 class="panel-title">
<i class="glyphicon glyphicon-education"></i>&nbsp;&nbsp;Impressum
</h2>
</div>
<div class="panel-body">
${content_impressum}
</div>
</div>

View File

@ -0,0 +1,13 @@
<?php
class default_kandidat implements \SYSTEM\PAGE\Page {
public static function title(){
return \SYSTEM\PAGE\text::get('title_kandidat');}
public static function meta(){
return \SYSTEM\PAGE\text::tag('meta_kandidat');}
public function html(){
$vars = \SYSTEM\PAGE\text::tag('buergerkandidat');
return SYSTEM\PAGE\replace::replaceFile((new PPAGE('default_kandidat/tpl/default_kandidat.tpl'))->SERVERPATH(), $vars);
}
public static function js(){return array(new PPAGE('default_kandidat/js/default_kandidat.js'));}
public static function css(){return array();}
}

View File

@ -0,0 +1,2 @@
function init_kandidat(){
}

View File

@ -0,0 +1,11 @@
<div class="panel panel-default panel-default" style="margin-right: 5px; margin-left: 5px;">
<div class="panel-heading">
<h2 class="panel-title">
<i class="glyphicon glyphicon-user"></i>&nbsp;&nbsp;Kandidat
</h2>
</div>
<div class="panel-body">
${content_kandidat}
</div>
<a class="twitter-timeline" href="https://twitter.com/Sebastian_B75">Tweets by Sebastian_B75</a> <script async src="//platform.twitter.com/widgets.js" charset="utf-8"></script>
</div>

View File

@ -0,0 +1,3 @@
<?php
\SYSTEM\autoload::registerFolder(dirname(__FILE__));
\SYSTEM\autoload::registerFolder(dirname(__FILE__).'/sql','SQL');

View File

@ -0,0 +1,18 @@
<?php
class default_komitee implements \SYSTEM\PAGE\Page {
public static function title(){
return \SYSTEM\PAGE\text::get('title_komitee');}
public static function meta(){
return \SYSTEM\PAGE\text::tag('meta_komitee');}
public function html(){
$vars = \SYSTEM\PAGE\text::tag('buergerkandidat');
$vars['protocols'] = '';
$res = \SQL\PROTOCOL::QQ();
while($row = $res->next()){
$vars['protocols'] .= \SYSTEM\PAGE\replace::replaceFile((new PPAGE('default_komitee/tpl/protocol_row.tpl'))->SERVERPATH(), $row);
}
return \SYSTEM\PAGE\replace::replaceFile((new PPAGE('default_komitee/tpl/default_komitee.tpl'))->SERVERPATH(), $vars);
}
public static function js(){return array(new PPAGE('default_komitee/js/default_komitee.js'));}
public static function css(){return array();}
}

View File

@ -0,0 +1,2 @@
function init_komitee(){
}

View File

@ -0,0 +1,10 @@
<?php
namespace SQL;
class PROTOCOL extends \SYSTEM\DB\QQ {
public static function get_class(){return \get_class();}
public static function mysql(){return
'SELECT * FROM protocol;';
}
}

View File

@ -0,0 +1,29 @@
<div class="panel panel-default panel-default" style="margin-right: 5px; margin-left: 5px;">
<div class="panel-heading">
<h2 class="panel-title">
<i class="fa fa-users"></i>&nbsp;&nbsp;Komitee
</h2>
</div>
<div class="panel-body">
${content_komitee}
</div>
</div>
<div class="panel panel-default panel-default" style="margin-right: 5px; margin-left: 5px;">
<div class="panel-heading">
<h2 class="panel-title">
<i class="fa fa-file-text"></i>&nbsp;&nbsp;Protokolle
</h2>
</div>
<div class="panel-body">
${content_protocol}
<br><br>
<table class="table table-striped">
<tr>
<th>Datum</th>
<th>Ort</th>
<th>PDF</th>
</tr>
${protocols}
</table>
</div>
</div>

View File

@ -0,0 +1,5 @@
<tr>
<td>${date}</td>
<td>${location}</td>
<td><a href="./files/protocol/${pdf}" target="blank">${pdf}&nbsp;&nbsp;<span class="glyphicon glyphicon-download-alt"></span></a></td>
</tr>

View File

@ -0,0 +1,39 @@
<?php
class default_kontakt implements \SYSTEM\PAGE\Page {
var $zu = null;
public function __construct($zu = null) {
$this->zu = $zu;}
public static function title(){
return \SYSTEM\PAGE\text::get('title_kontakt');}
public static function meta(){
return \SYSTEM\PAGE\text::tag('meta_kontakt');}
public function html(){
$vars = \SYSTEM\PAGE\text::tag('buergerkandidat');
$vars['selected_sebastian_bucher'] = ($this->zu == 'sebastian_bucher' ? 'selected' : '');
$vars['selected_gerhard_kugler'] = ($this->zu == 'gerhard_kugler' ? 'selected' : '');
$vars['selected_ulf_gebhardt'] = ($this->zu == 'ulf_gebhardt' ? 'selected' : '');
return SYSTEM\PAGE\replace::replaceFile((new PPAGE('default_kontakt/tpl/default_kontakt.tpl'))->SERVERPATH(), $vars);
}
public static function email($to,$from,$text){
switch($to){
case 'sebastian_bucher':
$to = 'buergerkandidat-hp@web.de';
break;
case 'gerhard_kugler':
$to = 'G.W.Kugler@web.de';
break;
default:
$to = 'ulf.gebhardt@webcraft-media.de';
break;
}
$header = 'From: '.$from."\r\n".
'Reply-To: '.$from."\r\n";
return mail($to, 'Kontaktanfrage direktkandidat-hp.de', $text, $header) ? \SYSTEM\LOG\JsonResult::ok() : \SYSTEM\LOG\JsonResult::fail();
}
public static function js(){return array( \LIB\lib_jqbootstrapvalidation::js(),
new PPAGE('default_kontakt/js/default_kontakt.js'));}
public static function css(){return array();}
}

View File

@ -0,0 +1,23 @@
function init_kontakt(){
$("#contact_form input, select, textarea").not("[type=submit]").jqBootstrapValidation({
preventSubmit: true,
submitError: function($form, event, errors) {},
submitSuccess: function($form, event){
$.ajax({type :'POST',
url : './api.php?',
data : { call: 'email',
from: $('#input_contact_email').val(),
to: $('#input_contact_to').val(),
text: $('#input_contact_message').val()},
success : function(data) {
if(data.status){
$('.help-block').html("EMail erfolgreich abgeschickt.");
$('#input_contact_message').val('');
}else{
$('.help-block').html("EMail nicht erfolgreich abgeschickt - wir kümmern uns umgehend darum!");}
}
});
event.preventDefault();
}
});
}

View File

@ -0,0 +1,41 @@
<div class="panel panel-default panel-default" style="margin-right: 5px; margin-left: 5px;">
<div class="panel-heading">
<h2 class="panel-title">
<i class="glyphicon glyphicon-pencil"></i>&nbsp;&nbsp;Kontakt
</h2>
</div>
<div class="panel-body">
<form class="textbox trojan" id="contact_form">
<div class="control-group">
<div class="controls col-lg-12 col-md-12 col-sm-12 col-xs-12 padding0" style="margin-bottom: 15px;">
<label>Empfänger:</label>
<select class="form-control" id="input_contact_to">
<option value="sebastian_bucher" ${selected_sebastian_bucher}>Sebastian Bucher - Direktkandidat für die Bergstraße</option>
<option value="gerhard_kugler" ${selected_gerhard_kugler}>Gerhard Kugler - Sprecher des Bürgerkomitees Bergstraße</option>
<option value="ulf_gebhardt" ${selected_ulf_gebhardt}>Ulf Gebhardt - Administrator</option>
</select>
</div>
<div class="controls col-lg-12 col-md-12 col-sm-12 col-xs-12 padding0" style="margin-bottom: 15px;">
<label>Antwort an:</label>
<input class="form-control text_width"
type="email"
id="input_contact_email"
placeholder="Email Adresse"
data-validation-email-message="Bitte gebe doch eine gültige EMail-Adresse an!"
required data-validation-required-message="Bitte gebe doch eine EMail-Adresse an!">
</div>
<div class="controls col-lg-12 col-md-12 col-sm-12 col-xs-12 padding0">
<label>Ihre Nachricht:</label>
<textarea class="form-control text_width"
id="input_contact_message"
rows="7"
required data-validation-required-message="Bitte beschreibe kurz dein Anliegen ;-)."></textarea>
</div>
<div class="col-md-12 padding0">
<div class="help-block"></div>
<button type="submit" class="btn-sm btn btn-success" id="btn_send"><span class="glyphicon glyphicon-envelope" aria-hidden="true"></span>&nbsp;Email senden!</button>
</div>
</div>
</form>
</div>
</div>

View File

@ -0,0 +1,16 @@
<?php
class default_login implements SYSTEM\PAGE\Page {
public static function title(){
return \SYSTEM\PAGE\text::get('title_login');}
public static function meta(){
return \SYSTEM\PAGE\text::tag('meta_login');}
public static function js(){
return array( \LIB\lib_jqbootstrapvalidation::js(),
new PPAGE('default_login/js/default_login.js'));}
public static function css(){
return array( new PPAGE('default_login/css/default_login.css'));}
public function html(){
$vars = \SYSTEM\PAGE\text::tag('login');
return SYSTEM\PAGE\replace::replaceFile((new PPAGE('default_login/tpl/default_login.tpl'))->SERVERPATH(), $vars);
}
}

View File

@ -0,0 +1,17 @@
function init_login(){
$("#login_form input").not("[type=submit]").jqBootstrapValidation({
preventSubmit: true,
submitError: function($form, event, errors) {},
submitSuccess: function($form, event){
system.account_login($('#bt_login_email').val(),$('#bt_login_password').val(),function(data){
if(data.status){
$('.help-block').html("Login successfull.</br>");
system.load('account');
} else {
$('.help-block').html("Login not successfull.</br> User & Password combination wrong.");
}
});
event.preventDefault();
}
});
}

View File

@ -0,0 +1,34 @@
<div class="panel panel-default panel-default" style="margin-right: 5px; margin-left: 5px;">
<div class="panel-heading">
<h4 class="panel-title">
<i class="glyphicon glyphicon-user"></i>&nbsp;&nbsp;Login
</h4>
</div>
<div class="panel-body">
<form class="textbox" id="login_form">
<div class="control-group">
<div class="controls">
<input type="text"
size="30"
style="margin-bottom: 15px; width: 100%;"
id="bt_login_email"
placeholder="peter@world.org"
required data-validation-required-message="Nutzername fehlt"/>
</div>
<div class="controls">
<input type="password"
size="30"
style="margin-bottom: 5px; width: 100%;"
id="bt_login_password"
placeholder="geheim23"
minlength="5" data-validation-minlength-message="Passwort zu kurz"
required data-validation-required-message="passwort fehlt"/>
</div>
<br>
<button class="btn-sm btn btn-primary" style="float:left; height: 32px; font-size: 13px;" type="submit" id="login_submit"><span class="glyphicon glyphicon-log-in" aria-hidden="true"></span> Login</button>
<a style="float: right;" href="#!resetpassword">Passwort vergessen?</a>
<div class="help-block" style="float: left; padding-left: 15px;"></div>
</div>
</form>
</div>
</div>

View File

@ -0,0 +1,15 @@
.padding0{
padding: 0 !important;
}
.margin0{
margin: 0 !important;
}
#footer-right{
text-align: right;
}
.active, .active a{
background-color: #e7e7e7 !important;
}

View File

@ -0,0 +1,32 @@
<?php
class default_page implements \SYSTEM\PAGE\DefaultPage {
public static function js(){
return \SYSTEM\HTML\html::script(\SYSTEM\CACHE\cache_js::minify(array(
\LIB\lib_jquery::js(),
\LIB\lib_bootstrap::js(),
\LIB\lib_system::js(),
new PPAGE('default_page/js/default_page.js')
)));
}
public static function css(){
return \SYSTEM\HTML\html::link(\LIB\lib_bootstrap::css()->WEBPATH(false)).
\SYSTEM\HTML\html::link(\LIB\lib_font_awesome::css()->WEBPATH(false)).
\SYSTEM\HTML\html::link(\SYSTEM\CACHE\cache_css::minify(array(
new PPAGE('default_page/css/default_page.css')
)));
}
public function html($_escaped_fragment_ = null){
$vars = array();
$vars['js'] = '';
if(!$_escaped_fragment_){
$vars['js'] = self::js();}
$vars['css'] = self::css();
$vars['menu_account'] = \SYSTEM\SECURITY\security::isLoggedIn() ?
\SYSTEM\PAGE\replace::replaceFile((new PPAGE('default_page/tpl/menu_account.tpl'))->SERVERPATH(), array('username' => \SYSTEM\SECURITY\security::getUser()->username)) :
'';
$vars = array_merge($vars, \SYSTEM\PAGE\text::tag('buergerkandidat'));
return \SYSTEM\PAGE\replace::replaceFile((new PPAGE('default_page/tpl/default_page.tpl'))->SERVERPATH(), $vars);
}
}

View File

@ -0,0 +1,19 @@
$(document).ready(function() {
new SYSTEM('./api.php',1,'start',sys_hashchange);
$('.navbar-collapse a').click(function(){
$(".navbar-collapse").collapse('hide');
});
});
function sys_hashchange(state){
var state_ = state ? state.split(';')[0].split('(')[0] : state;
var state_ = state_ ? state_.split('#')[0] : state;
$('.nav li').each(function(){
$(this).removeClass('active');});
$('.navbar-header').removeClass('active');
if($('#menu_'+state_).parent().length){
$('#menu_'+state_).parent().addClass('active');
} else {
$('.navbar-header').addClass('active');}
window.scrollTo(0,0);
}

Some files were not shown because too many files have changed in this diff Show More