new website

This commit is contained in:
Ulf Gebhardt 2018-05-17 18:34:18 +02:00
parent 6c94385789
commit 50881ce931
244 changed files with 3590 additions and 2117 deletions

View File

@ -1 +0,0 @@
<html><head><script>window.location.href="./#!ceta"</script></head></html>

View File

@ -1,43 +1,38 @@
<?php
class api_democracy extends \SYSTEM\API\api_system {
public static function call_send_mail_faq($data){
require((new \SYSTEM\PROOT('PHPMailer-master/PHPMailerAutoload.php'))->SERVERPATH());
date_default_timezone_set('Europe/Berlin');
public static function call_send_mail($data){
/*$tbody = array_reduce($data, function($a, $b){return $a.="<tr><td>".implode("</td><td>",$b)."</td></tr>";});
$thead = "<tr><th>" . implode("</th><th>", array_keys($rows[0])) . "</th></tr>";
$mail = new PHPMailer;
$new_data = "<table>\n$thead\n$tbody\n</table>";*/
$data['files'] = json_decode($data['files']);
$new_data = str_replace('\/', '/',json_encode($data,JSON_PRETTY_PRINT));
//SendMail
$bcc = null;
$delay = 0;
$from = 'Website | DEMOCRACY <contact@democracy-deutschland.de>';
$subject = '📱 DEMOCRACY: EMail from democracy-deutschland.de';
$html_file = (new \PAPI('tpl/send_mail.tpl'))->SERVERPATH();
$text_file = (new \PAPI('tpl/send_mail.txt'))->SERVERPATH();
$to = 'contact@democracy-deutschland.de';
$unsubscribe_list = null;
$images = ["democracy_logo" => (new \PAPI('img/logo.png'))->SERVERPATH()];
$attachments = [];
$replacements = ['data' => ['value' => ['text' => $new_data]]];
$smtp = [ "host" => "ssl://atmanspacher.eu",
"port" => 465,
"auth" => true,
"username" => "prototyping@democracy-deutschland.de",
"password" => "7$7ar0pZ"
];
$silent = true;
\mailcannon::fire($bcc, $delay, $from, $subject, $html_file, $text_file, $to, $unsubscribe_list, $images, $attachments, $replacements,$smtp, $silent);
$mail->CharSet = 'utf-8';
$mail->Encoding = 'base64';
$mail->Host = 'atmanspacher.eu';
$mail->Port = 465;
$mail->SMTPSecure = 'tls';
$mail->SMTPAuth = true;
$mail->setFrom( $data["email"], 'Neue Frage von - '. $data["vorname"] .' '. $data["nachname"]);
$mail->addReplyTo( $data["email"], $data["vorname"] .' '. $data["nachname"]);
$mail->addAddress( 'contact@democracy-deutschland.de', 'democracy-deutschland.de');
$vars = $data;
$vars['datum'] = date("d.m.Y");
$vars['uhrzeit'] = date("H:i");
$html = \SYSTEM\PAGE\replace::replaceFile((new PAPI('tpl/send_mail_faq.tpl'))->SERVERPATH(), $vars);
$mail->Subject = 'DEMOCRACY: Frage von '.$data["vorname"] .' '. $data["nachname"].' erhalten!';
$mail->Body = $html;
$mail->IsHTML(true);
//send the message, check for errors
if(!$mail->send()){
throw new \SYSTEM\LOG\ERROR("Mailer Error: " . $mail->ErrorInfo);}
return \SYSTEM\LOG\JsonResult::ok();
}
public static function call_send_subscribe($data){
$beta = $data['beta'] == 'true' ? 1 : 0;
$android = $data['android'] == 'true' ? 1 : 0;
$ios = $data['ios'] == 'true' ? 1 : 0;
\SQL\SUBSCRIBE_ADD::Q1(array($data['email'],$beta,$android,$ios,$beta,$android,$ios));
\SQL\SUBSCRIBE_ADD::Q1(array($data['email']));
$sub = \SQL\SUBSCRIBE_GET::Q1(array($data['email']));
if(!$sub['confirmed']){
@ -140,4 +135,12 @@ class api_democracy extends \SYSTEM\API\api_system {
public static function validate_code($code){
return \SQL\BETA_CODE_VALIDATE::Q1(array($code))['count'] !== 0 ? true: false;
}
public static function call_upload(){
$file_name = md5_file($_FILES['datei']['tmp_name']).'_'.basename($_FILES['datei']['name']);
if(!\SYSTEM\FILES\files::put('upload', $file_name , $_FILES['datei']['tmp_name'])){
throw new \SYSTEM\LOG\ERROR("Upload Problem");}
return \SYSTEM\LOG\JsonResult::toString(['file_name' => $file_name]);
}
}

View File

@ -4,7 +4,6 @@ namespace SQL;
class SUBSCRIBE_ADD extends \SYSTEM\DB\QP {
public static function get_class(){return \get_class();}
public static function mysql(){return
'INSERT INTO subscribe (`email`, `beta`, `android`, `ios`) VALUES (?, ?, ?, ?)'.
' ON DUPLICATE KEY UPDATE beta=?, android=?, ios=?;';
'INSERT IGNORE INTO subscribe (`email`) VALUES (?)';
}
}

View File

@ -0,0 +1,7 @@
Eine Nachricht ist über die Website eingegangen:<br>
<br>
<pre>${data}</pre>
<br>
Achtung: Diese EMail ist die einzige Kopie dieser Daten<br>
<br>
<span><img src="cid:democracy_logo"></span>

View File

@ -0,0 +1,5 @@
Eine Nachricht ist über die Website eingegangen:
${data}
Achtung: Diese EMail ist die einzige Kopie dieser Daten

View File

@ -9,4 +9,5 @@
\SYSTEM\FILES\files::registerFolder(dirname(__FILE__).'/references/','references','*.*');
\SYSTEM\FILES\files::registerFolder(dirname(__FILE__).'/download/','download','*.*');
\SYSTEM\FILES\files::registerFolder(dirname(__FILE__).'/org/','org','*.*');
\SYSTEM\FILES\files::registerFolder(dirname(__FILE__).'/invite/','invite','*.*');
\SYSTEM\FILES\files::registerFolder(dirname(__FILE__).'/invite/','invite','*.*');
\SYSTEM\FILES\files::registerFolder(dirname(__FILE__).'/upload/','upload','*.*');

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 57 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 MiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 526 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 341 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 690 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 462 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 306 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 126 KiB

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 386 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 289 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 244 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 700 B

After

Width:  |  Height:  |  Size: 558 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 558 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 292 KiB

After

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.7 KiB

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 113 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 210 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 526 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 341 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 690 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 462 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 306 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 126 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 806 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 163 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 700 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 292 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 371 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

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