fixes for invite mechanism
This commit is contained in:
parent
c192125174
commit
6c94385789
@ -113,6 +113,27 @@ class api_democracy extends \SYSTEM\API\api_system {
|
||||
\SQL\BETA_INSERT::QI(array($code,$email,$android,$ios));
|
||||
}
|
||||
|
||||
//SendMail
|
||||
$bcc = null;
|
||||
$delay = 0;
|
||||
$from = 'Prototyp | DEMOCRACY <prototyping@democracy-deutschland.de>';
|
||||
$subject = '📱 DEMOCRACY: Deine Prototyp Bewerbung ist eingegangen!';
|
||||
$html_file = (new \PAPI('tpl/send_mail_beta.tpl'))->SERVERPATH();
|
||||
$text_file = (new \PAPI('tpl/send_mail_beta.txt'))->SERVERPATH();
|
||||
$to = $email;
|
||||
$unsubscribe_list = null;
|
||||
$images = ["democracy_logo" => (new \PAPI('img/logo.png'))->SERVERPATH()];
|
||||
$attachments = [];
|
||||
$replacements = [];
|
||||
$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);
|
||||
|
||||
return \SYSTEM\LOG\JsonResult::ok();
|
||||
}
|
||||
|
||||
|
||||
BIN
democracy/api/img/logo.png
Normal file
BIN
democracy/api/img/logo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 6.3 KiB |
14
democracy/api/tpl/send_mail_beta.tpl
Normal file
14
democracy/api/tpl/send_mail_beta.tpl
Normal file
@ -0,0 +1,14 @@
|
||||
Hallo liebe/r DEMOCRACY-Interessierte/r,<br>
|
||||
<br>
|
||||
wir freuen uns sehr über Ihr Interesse am Prototyp der DEMOCRACY App und bemühen uns, Sie so schnell wie möglich in die DEMOCRACY Beta einzuladen. <strong>Derzeit befinden Sie sich auf der Warteliste</strong>. Bitte haben Sie noch einen Moment Geduld, bis wir Sie auf die Testliste des jeweiligen Stores setzen – dies kann im Regelfall bis zu 2 Tage dauern. <strong>Wir werden Sie wieder kontaktieren, sobald Sie Zugang zur App haben</strong>.<br>
|
||||
<br>
|
||||
Demokratische Grüße<br>
|
||||
<br>
|
||||
Ihr Team DEMOCRACY<br>
|
||||
<br><br>
|
||||
<span><img src="cid:democracy_logo"></span>
|
||||
<br><br><br>
|
||||
DEMOCRACY Deutschland e.V.<br>
|
||||
IBAN: DE33 5003 1000 1049 7560 00<br>
|
||||
BIC: TRODDEF1<br>
|
||||
mobil +49 176 470 40 213
|
||||
13
democracy/api/tpl/send_mail_beta.txt
Normal file
13
democracy/api/tpl/send_mail_beta.txt
Normal file
@ -0,0 +1,13 @@
|
||||
Hallo liebe/r DEMOCRACY-Interessierte/r,
|
||||
|
||||
wir freuen uns sehr über Ihr Interesse am Prototyp der DEMOCRACY App und bemühen uns, Sie so schnell wie möglich in die DEMOCRACY Beta einzuladen. Derzeit befinden Sie sich auf der Warteliste. Bitte haben Sie noch einen Moment Geduld, bis wir Sie auf die Testliste des jeweiligen Stores setzen – dies kann im Regelfall bis zu 2 Tage dauern. Wir werden Sie wieder kontaktieren, sobald Sie Zugang zur App haben.
|
||||
|
||||
Demokratische Grüße
|
||||
|
||||
Ihr Team DEMOCRACY
|
||||
|
||||
|
||||
DEMOCRACY Deutschland e.V.
|
||||
IBAN: DE33 5003 1000 1049 7560 00
|
||||
BIC: TRODDEF1
|
||||
mobil +49 176 470 40 213
|
||||
BIN
democracy/files/invite/Wallpaper.jpg
Normal file
BIN
democracy/files/invite/Wallpaper.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 135 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 764 KiB |
@ -14,7 +14,7 @@ html {
|
||||
body {
|
||||
font-family:'helvetica',sans-serif;
|
||||
height: 100%;
|
||||
background: url('../files/invite/Wallpaper.png') no-repeat center center fixed;
|
||||
background: url('../files/invite/Wallpaper.jpg') no-repeat center center fixed;
|
||||
background-size: cover;
|
||||
}
|
||||
|
||||
|
||||
@ -114,7 +114,7 @@
|
||||
</div>
|
||||
<div id="final_ios" class="row step">
|
||||
<div class="col-10 col-md-8 offset-1 offset-md-2" style="padding: 0; font-size: 24px;">
|
||||
Sobald Du im AppStore freigeschaltet wurdest, erhälst Du eine EMail mit einer genauen Anleitung von uns.<br>
|
||||
Sobald Du im AppStore freigeschaltet wurdest, erhälst Du eine E-Mail mit einer genauen Anleitung von uns.<br>
|
||||
<br>
|
||||
<span style="color: red;">Bitte überprüfe auch Deinen Spam-Ordner!</span>
|
||||
</div>
|
||||
@ -131,7 +131,7 @@
|
||||
</div>
|
||||
<div id="final_android" class="row step">
|
||||
<div class="col-10 col-md-8 offset-1 offset-md-2" style="padding: 0; font-size: 24px;">
|
||||
Sobald Du im PlayStore freigeschaltet wurdest, erhälst Du eine EMail mit einer genauen Anleitung von uns.<br>
|
||||
Sobald Du im PlayStore freigeschaltet wurdest, erhälst Du eine E-Mail mit einer genauen Anleitung von uns.<br>
|
||||
<br>
|
||||
<span style="color: red;">Bitte überprüfe auch Deinen Spam-Ordner!</span>
|
||||
</div>
|
||||
|
||||
@ -81,8 +81,9 @@ function init_saimod_beta_store_android() {
|
||||
$(this).removeClass('active');});
|
||||
$('#menu_tag_store_android').addClass('active');
|
||||
$('.code_android').click(function(){
|
||||
var code = $(this).attr('code');
|
||||
var email = $(this).attr('email');
|
||||
var android = $(this).attr('android');
|
||||
var ios = $(this).attr('ios');
|
||||
$.ajax({
|
||||
async: true,
|
||||
url: this.endpoint,
|
||||
@ -91,8 +92,9 @@ function init_saimod_beta_store_android() {
|
||||
data: {
|
||||
sai_mod: '.SAI.saimod_beta',
|
||||
action: 'store',
|
||||
code: code,
|
||||
email: email
|
||||
email: email,
|
||||
android: android,
|
||||
ios: ios
|
||||
},
|
||||
success: function(){
|
||||
system.reload();
|
||||
@ -118,8 +120,9 @@ function init_saimod_beta_store_ios() {
|
||||
$(this).removeClass('active');});
|
||||
$('#menu_tag_store_ios').addClass('active');
|
||||
$('.code_ios').click(function(){
|
||||
var code = $(this).attr('code');
|
||||
var email = $(this).attr('email');
|
||||
var android = $(this).attr('android');
|
||||
var ios = $(this).attr('ios');
|
||||
$.ajax({
|
||||
async: true,
|
||||
url: this.endpoint,
|
||||
@ -128,8 +131,9 @@ function init_saimod_beta_store_ios() {
|
||||
data: {
|
||||
sai_mod: '.SAI.saimod_beta',
|
||||
action: 'store',
|
||||
code: code,
|
||||
email: email
|
||||
email: email,
|
||||
android: android,
|
||||
ios: ios
|
||||
},
|
||||
success: function(){
|
||||
system.reload();
|
||||
@ -149,7 +153,7 @@ function init_saimod_beta_store_ios() {
|
||||
});
|
||||
email_delete();
|
||||
};
|
||||
function init_saimod_beta_mail() {
|
||||
/* function init_saimod_beta_mail() {
|
||||
$("#table_beta_mail").tablesorter();
|
||||
$('#tabs_beta li a').each(function(){
|
||||
$(this).removeClass('active');});
|
||||
@ -179,7 +183,7 @@ function init_saimod_beta_mail() {
|
||||
});
|
||||
});
|
||||
email_delete();
|
||||
};
|
||||
}; */
|
||||
|
||||
function email_delete(){
|
||||
$('.email_delete').click(function(){
|
||||
|
||||
@ -5,7 +5,7 @@ class saimod_beta extends \SYSTEM\SAI\sai_module{
|
||||
$vars = array();
|
||||
$vars['store_android_count'] = \SQL\BETA_COUNT_STORE_ANDROID::Q1()['count'];
|
||||
$vars['store_ios_count'] = \SQL\BETA_COUNT_STORE_IOS::Q1()['count'];
|
||||
$vars['mail_count'] = \SQL\BETA_COUNT_MAIL::Q1()['count'];
|
||||
//$vars['mail_count'] = \SQL\BETA_COUNT_MAIL::Q1()['count'];
|
||||
return \SYSTEM\PAGE\replace::replaceFile((new \PSAI('saimod_beta/tpl/saimod_beta.tpl'))->SERVERPATH(),$vars);}
|
||||
|
||||
public static function sai_mod__SAI_saimod_beta_action_all(){
|
||||
@ -171,12 +171,13 @@ class saimod_beta extends \SYSTEM\SAI\sai_module{
|
||||
return \SYSTEM\PAGE\replace::replaceFile((new \PSAI('saimod_beta/tpl/store_ios.tpl'))->SERVERPATH(),$vars);
|
||||
}
|
||||
|
||||
public static function sai_mod__SAI_saimod_beta_action_store($email){
|
||||
public static function sai_mod__SAI_saimod_beta_action_store($email,$android,$ios){
|
||||
\SQL\BETA_STORE::QI(array($email));
|
||||
return \JsonResult::ok();
|
||||
|
||||
return self::action_email($email,$android,$ios);
|
||||
}
|
||||
|
||||
public static function sai_mod__SAI_saimod_beta_action_mail(){
|
||||
/* public static function sai_mod__SAI_saimod_beta_action_mail(){
|
||||
$vars = array();
|
||||
|
||||
$vars['data'] = '';
|
||||
@ -221,44 +222,9 @@ class saimod_beta extends \SYSTEM\SAI\sai_module{
|
||||
}
|
||||
$vars = array_merge($vars, \SYSTEM\PAGE\text::tag('time'));
|
||||
return \SYSTEM\PAGE\replace::replaceFile((new \PSAI('saimod_beta/tpl/mail.tpl'))->SERVERPATH(),$vars);
|
||||
}
|
||||
} */
|
||||
|
||||
public static function sai_mod__SAI_saimod_beta_action_email($email,$android,$ios){
|
||||
/*require((new \SYSTEM\PROOT('PHPMailer-master/PHPMailerAutoload.php'))->SERVERPATH());
|
||||
date_default_timezone_set('Europe/Berlin');
|
||||
|
||||
$mail = new \PHPMailer;
|
||||
|
||||
$mail->CharSet = 'utf-8';
|
||||
$mail->Encoding = 'base64';
|
||||
|
||||
$mail->Host = 'atmanspacher.eu';
|
||||
$mail->Port = 465;
|
||||
$mail->SMTPSecure = 'tls';
|
||||
$mail->SMTPAuth = true;
|
||||
|
||||
$mail->setFrom( 'prototyping@democracy-deutschland.de', 'DEMOCRACY Deutschland Prototyp');
|
||||
$mail->addReplyTo( 'prototyping@democracy-deutschland.de', 'DEMOCRACY Deutschland Prototyp');
|
||||
$mail->addAddress( $email);
|
||||
|
||||
$vars = array();
|
||||
$vars['datum'] = date("d.m.Y");
|
||||
$vars['uhrzeit'] = date("H:i");
|
||||
if($android){
|
||||
$html = \SYSTEM\PAGE\replace::replaceFile((new \PSAI('saimod_beta/tpl/mail_android.tpl'))->SERVERPATH(), $vars);
|
||||
} else {
|
||||
$html = \SYSTEM\PAGE\replace::replaceFile((new \PSAI('saimod_beta/tpl/mail_ios.tpl'))->SERVERPATH(), $vars);
|
||||
}
|
||||
|
||||
$mail->Subject = '📱 DEMOCRACY: Dein Prototyp Zugang';
|
||||
$mail->Body = $html;
|
||||
$mail->IsHTML(true);
|
||||
$mail->AddEmbeddedImage((new \PSAI('saimod_beta/img/logo.png'))->SERVERPATH(), 'democracy_logo', 'logo.png');
|
||||
|
||||
//send the message, check for errors
|
||||
if(!$mail->send()){
|
||||
throw new \SYSTEM\LOG\ERROR("Mailer Error: " . $mail->ErrorInfo);}*/
|
||||
|
||||
public static function action_email($email,$android,$ios){
|
||||
$bcc = null;
|
||||
$delay = 0;
|
||||
$from = 'Prototyp | DEMOCRACY <prototyping@democracy-deutschland.de>';
|
||||
|
||||
@ -6,10 +6,12 @@ REPLACE INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `na
|
||||
REPLACE INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (7021, 42, 2, 7000, 'comment', 'comment', 'STRING');
|
||||
|
||||
REPLACE INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (7030, 42, 2, 7000, 'store', 'email', 'STRING');
|
||||
REPLACE INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (7031, 42, 2, 7000, 'store', 'android', 'BOOL');
|
||||
REPLACE INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (7032, 42, 2, 7000, 'store', 'ios', 'BOOL');
|
||||
|
||||
REPLACE INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (7040, 42, 2, 7000, 'email', 'email', 'STRING');
|
||||
REPLACE INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (7041, 42, 2, 7000, 'email', 'android', 'BOOL');
|
||||
REPLACE INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (7042, 42, 2, 7000, 'email', 'ios', 'BOOL');
|
||||
-- REPLACE INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (7040, 42, 2, 7000, 'email', 'email', 'STRING');
|
||||
-- REPLACE INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (7041, 42, 2, 7000, 'email', 'android', 'BOOL');
|
||||
-- REPLACE INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (7042, 42, 2, 7000, 'email', 'ios', 'BOOL');
|
||||
|
||||
REPLACE INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (7050, 42, 2, 7000, 'code_delete', 'code', 'STRING');
|
||||
REPLACE INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (7060, 42, 2, 7000, 'email_delete', 'email', 'STRING');
|
||||
@ -3,4 +3,4 @@ REPLACE INTO `system_page` (`id`, `group`, `name`, `state`, `parent_id`, `login`
|
||||
REPLACE INTO `system_page` (`id`, `group`, `name`, `state`, `parent_id`, `login`, `type`, `div`, `url`, `func`, `php_class`) VALUES (702, 42, 'code', 'beta', 700, 0, 1, '#content_beta', './sai.php?sai_mod=.SAI.saimod_beta&action=code', 'init_saimod_beta_code', '\\SAI\\saimod_beta');
|
||||
REPLACE INTO `system_page` (`id`, `group`, `name`, `state`, `parent_id`, `login`, `type`, `div`, `url`, `func`, `php_class`) VALUES (703, 42, 'store_android', 'beta', 700, 0, 1, '#content_beta', './sai.php?sai_mod=.SAI.saimod_beta&action=store_android', 'init_saimod_beta_store_android', '\\SAI\\saimod_beta');
|
||||
REPLACE INTO `system_page` (`id`, `group`, `name`, `state`, `parent_id`, `login`, `type`, `div`, `url`, `func`, `php_class`) VALUES (704, 42, 'store_ios', 'beta', 700, 0, 1, '#content_beta', './sai.php?sai_mod=.SAI.saimod_beta&action=store_ios', 'init_saimod_beta_store_ios', '\\SAI\\saimod_beta');
|
||||
REPLACE INTO `system_page` (`id`, `group`, `name`, `state`, `parent_id`, `login`, `type`, `div`, `url`, `func`, `php_class`) VALUES (705, 42, 'mail', 'beta', 700, 0, 1, '#content_beta', './sai.php?sai_mod=.SAI.saimod_beta&action=mail', 'init_saimod_beta_mail', '\\SAI\\saimod_beta');
|
||||
-- REPLACE INTO `system_page` (`id`, `group`, `name`, `state`, `parent_id`, `login`, `type`, `div`, `url`, `func`, `php_class`) VALUES (705, 42, 'mail', 'beta', 700, 0, 1, '#content_beta', './sai.php?sai_mod=.SAI.saimod_beta&action=mail', 'init_saimod_beta_mail', '\\SAI\\saimod_beta');
|
||||
@ -8,7 +8,7 @@
|
||||
<li class="nav-item"><a class="nav-link" href="#!beta(code)" id="menu_tag_code">1. Code</a></li>
|
||||
<li class="nav-item"><a class="nav-link" href="#!beta(store_android)" id="menu_tag_store_android">2. Store (Android) <span class="pull-right badge badge-pill badge-danger">${store_android_count}</span></a></li>
|
||||
<li class="nav-item"><a class="nav-link" href="#!beta(store_ios)" id="menu_tag_store_ios">2. Store (iOS) <span class="pull-right badge badge-pill badge-danger">${store_ios_count}</span></a></li>
|
||||
<li class="nav-item"><a class="nav-link" href="#!beta(mail)" id="menu_tag_mail">3. Send Mail <span class="pull-right badge badge-pill badge-danger">${mail_count}</span></a></li>
|
||||
<!--<li class="nav-item"><a class="nav-link" href="#!beta(mail)" id="menu_tag_mail">3. Send Mail <span class="pull-right badge badge-pill badge-danger">${mail_count}</span></a></li>-->
|
||||
</ul>
|
||||
</div>
|
||||
<div class="col-md-10 sai_padding_off sai_border_left" id="content_beta">
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
<td><i class="fa fa-${stored}"></i> ${stored_time}</td>
|
||||
<td>${comment}</td>
|
||||
<td>
|
||||
<button type="button" class="btn btn-warning code_android" ${disabled} email="${email}"><i class="fa fa-android"></i> Habe ich dem Store hinzugefügt</button>
|
||||
<button type="button" class="btn btn-warning code_android" ${disabled} email="${email}" ios="${ios}" android="${android}"><i class="fa fa-android"></i> Habe ich dem Store hinzugefügt -> Mail</button>
|
||||
<button type="button" class="btn btn-danger email_delete" email="${email}"><i class="fa fa-trash"></i></button>
|
||||
</td>
|
||||
</tr>
|
||||
@ -7,7 +7,7 @@
|
||||
<td><i class="fa fa-${stored}"></i> ${stored_time}</td>
|
||||
<td>${comment}</td>
|
||||
<td>
|
||||
<button type="button" class="btn btn-warning code_ios" ${disabled} email="${email}"><i class="fa fa-apple"></i> Habe ich dem Store hinzugefügt</button>
|
||||
<button type="button" class="btn btn-warning code_ios" ${disabled} email="${email}" ios="${ios}" android="${android}"><i class="fa fa-apple"></i> Habe ich dem Store hinzugefügt -> Mail</button>
|
||||
<button type="button" class="btn btn-danger email_delete" email="${email}"><i class="fa fa-trash"></i></button>
|
||||
</td>
|
||||
</tr>
|
||||
Reference in New Issue
Block a user