changed name
4
api.php
@ -1,9 +1,9 @@
|
|||||||
<?php
|
<?php
|
||||||
require_once 'lib/autoload.inc'; //SYSTEM Classes
|
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';
|
require_once '/home/web/web/config/get_config.php';
|
||||||
|
|
||||||
\SYSTEM\system::start(\WEBCRAFT\get_config(dirname(__FILE__)));
|
\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.");
|
new \SYSTEM\LOG\COUNTER("API was called sucessfully.");
|
||||||
6
buergerkomitee/api/api_buergerkomitee.php
Normal 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);}
|
||||||
|
|
||||||
|
}
|
||||||
3
buergerkomitee/api/autoload.inc
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
<?php
|
||||||
|
SYSTEM\autoload::registerFolder(dirname(__FILE__),'');
|
||||||
|
//SYSTEM\autoload::registerFolder(dirname(__FILE__).'/elements','');
|
||||||
2
buergerkomitee/config/autoload.inc
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
<?php
|
||||||
|
\SYSTEM\autoload::registerFolder(dirname(__FILE__),'');
|
||||||
4
buergerkomitee/config/config_ids.php
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
<?php
|
||||||
|
class config_ids extends \SYSTEM\CONFIG\config_ids {
|
||||||
|
const WEBCRAFT_BILLING_TOKEN = 1000;
|
||||||
|
}
|
||||||
6
buergerkomitee/files/autoload.inc
Normal 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
@ -0,0 +1,3 @@
|
|||||||
|
*
|
||||||
|
*/
|
||||||
|
!.gitignore
|
||||||
BIN
buergerkomitee/files/download/flyer_buergerkomitee_s_bucher.pdf
Normal file
BIN
buergerkomitee/files/img/3391.jpg
Normal file
|
After Width: | Height: | Size: 247 KiB |
BIN
buergerkomitee/files/img/3417.jpg
Normal file
|
After Width: | Height: | Size: 346 KiB |
BIN
buergerkomitee/files/img/3422.jpg
Normal file
|
After Width: | Height: | Size: 281 KiB |
BIN
buergerkomitee/files/img/3422b.jpg
Normal file
|
After Width: | Height: | Size: 242 KiB |
BIN
buergerkomitee/files/img/3440.jpg
Normal file
|
After Width: | Height: | Size: 285 KiB |
BIN
buergerkomitee/files/img/3459.jpg
Normal file
|
After Width: | Height: | Size: 288 KiB |
BIN
buergerkomitee/files/img/3461.jpg
Normal file
|
After Width: | Height: | Size: 254 KiB |
BIN
buergerkomitee/files/img/3475.jpg
Normal file
|
After Width: | Height: | Size: 284 KiB |
BIN
buergerkomitee/files/img/3484.jpg
Normal file
|
After Width: | Height: | Size: 277 KiB |
BIN
buergerkomitee/files/img/3484b.jpg
Normal file
|
After Width: | Height: | Size: 212 KiB |
BIN
buergerkomitee/files/img/3484c.jpg
Normal file
|
After Width: | Height: | Size: 232 KiB |
BIN
buergerkomitee/files/img/Bucher_Sebastian_skal.jpg
Normal file
|
After Width: | Height: | Size: 183 KiB |
BIN
buergerkomitee/files/img/DSCN0373.jpg
Normal file
|
After Width: | Height: | Size: 177 KiB |
BIN
buergerkomitee/files/img/DSCN1142.jpg
Normal file
|
After Width: | Height: | Size: 66 KiB |
BIN
buergerkomitee/files/img/DSC_0142.jpg
Normal file
|
After Width: | Height: | Size: 167 KiB |
BIN
buergerkomitee/files/img/DSC_0147.jpg
Normal file
|
After Width: | Height: | Size: 159 KiB |
BIN
buergerkomitee/files/img/DSC_0701.jpg
Normal file
|
After Width: | Height: | Size: 141 KiB |
BIN
buergerkomitee/files/img/DSC_4575.jpg
Normal file
|
After Width: | Height: | Size: 178 KiB |
BIN
buergerkomitee/files/img/DSC_6666.jpg
Normal file
|
After Width: | Height: | Size: 263 KiB |
BIN
buergerkomitee/files/img/DSC_6678-Bearbeitet.jpg
Normal file
|
After Width: | Height: | Size: 259 KiB |
BIN
buergerkomitee/files/img/DSC_6678.jpg
Normal file
|
After Width: | Height: | Size: 246 KiB |
BIN
buergerkomitee/files/img/DSC_9585.jpg
Normal file
|
After Width: | Height: | Size: 147 KiB |
BIN
buergerkomitee/files/img/_DSC1718.jpg
Normal file
|
After Width: | Height: | Size: 242 KiB |
BIN
buergerkomitee/files/img/_DSC1729.jpg
Normal file
|
After Width: | Height: | Size: 213 KiB |
BIN
buergerkomitee/files/img/buerger_logo_kopf.png
Normal file
|
After Width: | Height: | Size: 148 KiB |
BIN
buergerkomitee/files/img/buerger_logo_kopf_transparent.png
Normal file
|
After Width: | Height: | Size: 168 KiB |
BIN
buergerkomitee/files/img/favicon.png
Normal file
|
After Width: | Height: | Size: 19 KiB |
BIN
buergerkomitee/files/org/Abgeordnetenwatch.de_Logo.svg.png
Normal file
|
After Width: | Height: | Size: 88 KiB |
BIN
buergerkomitee/files/org/Mehr_Demokratie_Logo.jpg
Normal file
|
After Width: | Height: | Size: 47 KiB |
BIN
buergerkomitee/files/org/attac.png
Normal file
|
After Width: | Height: | Size: 14 KiB |
BIN
buergerkomitee/files/org/buergerhilfe.png
Normal file
|
After Width: | Height: | Size: 48 KiB |
BIN
buergerkomitee/files/org/energietransparent.jpg
Normal file
|
After Width: | Height: | Size: 6.5 KiB |
BIN
buergerkomitee/files/org/foodwatch-facebook_1200x627.jpg
Normal file
|
After Width: | Height: | Size: 34 KiB |
BIN
buergerkomitee/files/other/26E6F799289F4FC8A4390050ED534851.jpg
Normal file
|
After Width: | Height: | Size: 9.1 KiB |
BIN
buergerkomitee/files/other/DSC_4570.jpg
Normal file
|
After Width: | Height: | Size: 285 KiB |
BIN
buergerkomitee/files/other/DSC_8745.jpg
Normal file
|
After Width: | Height: | Size: 290 KiB |
BIN
buergerkomitee/files/other/DSC_8972.jpg
Normal file
|
After Width: | Height: | Size: 163 KiB |
BIN
buergerkomitee/files/other/DSC_8976.jpg
Normal file
|
After Width: | Height: | Size: 113 KiB |
BIN
buergerkomitee/files/other/Foto.JPG
Normal file
|
After Width: | Height: | Size: 381 KiB |
BIN
buergerkomitee/files/other/attac_gemeinwohl.pdf
Normal file
BIN
buergerkomitee/files/other/autoaufkleber.odt
Normal file
BIN
buergerkomitee/files/other/autoaufkleber.pdf
Normal file
BIN
buergerkomitee/files/other/befragungsthemen-copy.pdf
Normal file
BIN
buergerkomitee/files/other/flyer_buergerkomitee_s_bucher.pdf
Normal file
BIN
buergerkomitee/files/other/globales_dorf.png
Normal file
|
After Width: | Height: | Size: 814 KiB |
BIN
buergerkomitee/files/other/plakat.pdf
Normal file
22
buergerkomitee/page/account_account/account_account.php
Normal 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();}
|
||||||
|
}
|
||||||
72
buergerkomitee/page/account_account/js/account_account.js
Normal 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
|
||||||
|
}
|
||||||
24
buergerkomitee/page/account_account/tpl/account_account.tpl
Normal 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> 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>
|
||||||
@ -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);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -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);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
@ -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> 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> Passwort ändern</button>
|
||||||
|
<p class="help-block" style="float: left; padding-left: 15px;"></p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
15
buergerkomitee/page/autoload.inc
Normal 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');
|
||||||
15
buergerkomitee/page/default_faq/default_faq.php
Normal 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();}
|
||||||
|
}
|
||||||
2
buergerkomitee/page/default_faq/js/default_faq.js
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
function init_faq(){
|
||||||
|
}
|
||||||
10
buergerkomitee/page/default_faq/tpl/default_faq.tpl
Normal 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> FAQ
|
||||||
|
</h2>
|
||||||
|
</div>
|
||||||
|
<div class="panel-body">
|
||||||
|
${content_faq}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
15
buergerkomitee/page/default_impressum/default_impressum.php
Normal 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();}
|
||||||
|
}
|
||||||
@ -0,0 +1,2 @@
|
|||||||
|
function init_impressum(){
|
||||||
|
}
|
||||||
@ -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> Impressum
|
||||||
|
</h2>
|
||||||
|
</div>
|
||||||
|
<div class="panel-body">
|
||||||
|
${content_impressum}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
13
buergerkomitee/page/default_kandidat/default_kandidat.php
Normal 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();}
|
||||||
|
}
|
||||||
@ -0,0 +1,2 @@
|
|||||||
|
function init_kandidat(){
|
||||||
|
}
|
||||||
@ -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> 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>
|
||||||
3
buergerkomitee/page/default_komitee/autoload.inc
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
<?php
|
||||||
|
\SYSTEM\autoload::registerFolder(dirname(__FILE__));
|
||||||
|
\SYSTEM\autoload::registerFolder(dirname(__FILE__).'/sql','SQL');
|
||||||
18
buergerkomitee/page/default_komitee/default_komitee.php
Normal 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();}
|
||||||
|
}
|
||||||
@ -0,0 +1,2 @@
|
|||||||
|
function init_komitee(){
|
||||||
|
}
|
||||||
10
buergerkomitee/page/default_komitee/sql/PROTOCOL.php
Normal 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;';
|
||||||
|
}
|
||||||
|
}
|
||||||
29
buergerkomitee/page/default_komitee/tpl/default_komitee.tpl
Normal 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> 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> 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>
|
||||||
5
buergerkomitee/page/default_komitee/tpl/protocol_row.tpl
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
<tr>
|
||||||
|
<td>${date}</td>
|
||||||
|
<td>${location}</td>
|
||||||
|
<td><a href="./files/protocol/${pdf}" target="blank">${pdf} <span class="glyphicon glyphicon-download-alt"></span></a></td>
|
||||||
|
</tr>
|
||||||
39
buergerkomitee/page/default_kontakt/default_kontakt.php
Normal 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();}
|
||||||
|
}
|
||||||
23
buergerkomitee/page/default_kontakt/js/default_kontakt.js
Normal 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();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
41
buergerkomitee/page/default_kontakt/tpl/default_kontakt.tpl
Normal 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> 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> Email senden!</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
16
buergerkomitee/page/default_login/default_login.php
Normal 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);
|
||||||
|
}
|
||||||
|
}
|
||||||
17
buergerkomitee/page/default_login/js/default_login.js
Normal 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();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
34
buergerkomitee/page/default_login/tpl/default_login.tpl
Normal 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> 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>
|
||||||
15
buergerkomitee/page/default_page/css/default_page.css
Normal 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;
|
||||||
|
}
|
||||||
32
buergerkomitee/page/default_page/default_page.php
Normal 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);
|
||||||
|
}
|
||||||
|
}
|
||||||
19
buergerkomitee/page/default_page/js/default_page.js
Normal 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);
|
||||||
|
}
|
||||||