Google2Fa ready to upload

This commit is contained in:
Kevin Adametz 2021-11-09 18:38:44 +01:00
parent e3495be8b8
commit 73e38a006e
127 changed files with 2637 additions and 589 deletions

View file

@ -10,7 +10,7 @@ class Placeholder
{
public static $placeholder_booking = [
'dear' => '#geehrte/r#',
'dear' => '#geehrte:r#',
'salutation' => '#Anrede#',
'title' => '#Titel#',
'first_name' => '#Vorname#',
@ -26,6 +26,7 @@ class Placeholder
'net_price_travel' => '#Nettopreise_Rundreise#',
'net_price_extra_services' => '#Nettopreise_zugebuchte_Leistungen#',
'booked_rooms' => '#Gebuchte_Zimmer#',
'myjack_nr' => "#MyJackNr#",
'filekey' => "#Filekey#",
'flight_info' => "#Airline_Fluginfo#",
'check_in' => "#Airline_Checkin#",
@ -35,7 +36,7 @@ class Placeholder
];
public static $placeholder_lead = [
'dear' => '#geehrte/r#',
'dear' => '#geehrte:r#',
'salutation' => '#Anrede#',
'title' => '#Titel#',
'first_name' => '#Vorname#',
@ -49,7 +50,7 @@ class Placeholder
];
public static $placeholder_fewo= [
'dear' => '#geehrte/r#',
'dear' => '#geehrte:r#',
'salutation' => '#Anrede#',
'title' => '#Titel#',
'first_name' => '#Vorname#',
@ -60,6 +61,36 @@ class Placeholder
'booking_date' => '#Buchungsdatum#',
];
public static function getOptionsSummernote($key){
/*
[{value:'blockChainId', content:'blockChainId'},
{value:'attachement', content:'attachement'},
{value:'address', content:'address'}]*/
$ret = "";
switch ($key) {
case 'booking':
$placehoder = self::$placeholder_booking;
break;
case 'lead':
$placehoder = self::$placeholder_lead;
break;
case 'fewo':
$placehoder = self::$placeholder_fewo;
break;
default:
$placehoder = self::$placeholder_booking;
break;
}
foreach ($placehoder as $key => $value) {
$value = str_replace('#', '', $value);
$ret .= "'".$value."',";
}
return $ret;
}
public static function getOptionsQuill($key){
$ret = "";
switch ($key) {
@ -93,6 +124,7 @@ class Placeholder
}
return $ret;
}
public static function getLeadOptions(){
$ret = "";
foreach (self::$placeholder_lead as $key => $value) {
@ -140,6 +172,8 @@ class Placeholder
$net_price_extra_services = self::getBookingPlaceholdersBy('net_price_extra_services', $booking);
$booked_rooms = self::getBookingPlaceholdersBy('booked_rooms', $booking);
$myjack_nr = $booking->merlin_order_number;
$participants = "Teilnehmer:<br>";
//first
if($booking->participant_firstname){
@ -164,10 +198,8 @@ class Placeholder
$replace = [];
foreach (self::$placeholder_booking as $key => $value) {
if(isset(${$key})){
$search[] = $value;
$replace[] = ${$key};
}
$search[] = $value;
$replace[] = isset(${$key}) ? ${$key} : "";
}
$content = str_replace($search, $replace, $content);
$content = preg_replace('/<placeholder.*?>(.*?)<\/placeholder>/', '$1', $content);
@ -234,11 +266,7 @@ class Placeholder
return $content;
}
private static function getBookingPlaceholdersBy($key, $booking){
if($booking->new_drafts){
$booked_rooms = '';
$extra_services = '';
@ -281,7 +309,6 @@ class Placeholder
}
}
}
private static function cleanText($text){