Initial Commit

This commit is contained in:
2024-02-08 12:07:49 -07:00
parent 5813b1109f
commit 43077b57ed
5471 changed files with 682195 additions and 0 deletions
@@ -0,0 +1,205 @@
<?php
/*===============================================*\
|| ############################################# ||
|| # JAKWEB.CH / Version 2.0 # ||
|| # ----------------------------------------- # ||
|| # Copyright 2021 JAKWEB All Rights Reserved # ||
|| ############################################# ||
\*===============================================*/
// Language file goes global
global $jkl;
global $BT_LANGUAGE;
/* Leave a var empty if not in use or set to false */
$wtplsett = array();
// Custom Settings
$wtplsett["chatposition"] = "bottom:0;left:0;";
$wtplsett["customjs"] = "js/contact.js";
$wtplsett["customcss"] = "";
// Only for the edit page in the operator panel
if (isset($page) && $page == "widget") {
/* Leave a var empty if not in use or set to false */
$contactsett = array();
$contactsett["previewchat"] = "preview/contact.jpg";
/* Now we need custom input fields */
/* Following options are available:
1. Input
2. Textarea
3. Radio
4. Checkbox
5. Select
***
Title (you can use the lang vars from the operator/lang language files)
***
Options (for radio 3, checkbox 4, select 5) = Green,Red,Blue
Options (for Input) = colour or icon
***
Multiple (0 = No / 1 = Yes)
***
The english language var for the input field
*/
$contactsett["formoptions"] = array("1" => "1:#:".$jkl['cw44'].":#:0:#:0:#:contact_custom_logo", "2" => "3:#:".$jkl['cw35'].":#:Yes,No:#:0:#:contact_phone_required", "3" => "5:#:".$jkl['cw36'].":#:blue,green,orange,red,pink,grey:#:0:#:contact_colour_theme", "4" => "5:#:".$jkl['cw37'].":#:animate__fadeIn,animate__flash,animate__pulse,animate__headShake,animate__slideInUp,animate__slideInRight:#:0:#:contact_animation");
} else {
// Check the vars for this start
$contact_animate = "animate__fadeIn";
$contact_custom = "";
$btn_custom = "blue";
$contact_logo = '<i class="fa fa fa-user-circle '.(isset($ismobile) && !empty($ismobile) ? 'fa-3x' : 'fa-4x').' jaklcb_popup_avatar"></i>';
// We can have custom online icon
if (isset($widgetsettings[$widgetid]['contact_animation']) && !empty($widgetsettings[$widgetid]['contact_animation'])) {
$contact_animate = $widgetsettings[$widgetid]['contact_animation'];
}
// We can have custom online icon
if (isset($widgetsettings[$widgetid]['contact_colour_theme']) && !empty($widgetsettings[$widgetid]['contact_colour_theme']) && $widgetsettings[$widgetid]['contact_colour_theme'] != "blue") {
$contact_custom = " ".$widgetsettings[$widgetid]['contact_colour_theme'];
$btn_custom = $widgetsettings[$widgetid]['contact_colour_theme'];
}
// We can have custom online icon
if (isset($widgetsettings[$widgetid]['contact_custom_logo']) && !empty($widgetsettings[$widgetid]['contact_custom_logo'])) {
$contact_logo = '<img src="'.$widgetsettings[$widgetid]['contact_custom_logo'].'" class="jaklcb_popup_avatar" alt="logo">';
}
// Let's get the header welcome message
$headermsg = '';
if (empty($headermsg)) {
if (!empty($HD_ANSWERS) && is_array($HD_ANSWERS)) foreach ($HD_ANSWERS as $v) {
$msgtype = 8;
if ($v["msgtype"] == $msgtype && $v["lang"] == $BT_LANGUAGE && $v["department"] == 0) {
$phold = array("%operator%","%client%","%email%");
$replace = array("", "", JAK_EMAIL);
$headermsg = str_replace($phold, $replace, $v["message"]);
}
}
}
// Big or small
if (isset($page1) && $page1 == "big") {
$livecode = '<div id="lccontainersize" class="jak_chatopen_panel'.(isset($ismobile) ? $ismobile : '').' animate__animated '.$contact_animate.'">
<form id="lcjak_ajaxform" method="post" action="'.$_SERVER['REQUEST_URI'].'">
<section class="jaklcb_panel left'.$contact_custom.'">
<header class="jaklcb_panel_header">
<aside style="flex:3">'.$contact_logo.'
</aside>
<aside style="flex:6">
<h1>'.$jkl['g1'].'</h1>
</aside>
<aside style="flex:3;text-align:right;">
<button class="jaklcb_minimize lcb_backtochat" onclick="lcjak_smallchat(\'slideOutDown\')" type="button"><i class="fa fa-window-restore"></i></button>
<button class="jaklcb_panelclose lcb_close" onclick="lcjak_closechat()" type="button"><i class="fa fa-times"></i></button>
</aside>
</header>
<main class="jaklcb_panel_main" id="lcjak_formfields" style="flex:1">
<h2>'.$headermsg.'</h2>
<div class="jaklcb_input">
<label for="name">'.$jkl["g4"].'</label>
<input id="name" name="name" type="text" class="lcjak_input" placeholder="'.$jkl["g4"].'">
</div>
<div class="jaklcb_input">
<label for="email">'.$jkl["g5"].'</label>
<input id="email" name="email" type="text" class="lcjak_input" placeholder="'.$jkl["g5"].'">
</div>
<div class="jaklcb_input">
<label for="phone">'.$jkl["g49"].'</label>
<input id="phone" name="phone" type="text" class="lcjak_input" placeholder="'.$jkl["g49"].'">
</div>
<div class="jaklcb_input">
<label for="message">'.$jkl["g6"].'</label>
<textarea id="message" name="message" placeholder="'.$jkl['g25'].'"></textarea>
</div>
'.(isset($jakwidget[$widgetid]['dsgvo']) && !empty($jakwidget[$widgetid]['dsgvo']) ? '<div class="jaklcb_input">
<label>
<input type="checkbox" name="dsgvo" id="dsgvo" value="1"> '.$jakwidget[$widgetid]['dsgvo'].'
</label>
</div>' : '<input type="hidden" name="dsgvo" value="0">').'
<button class="lcb_sendcontact jakbtn btn-simple btn-'.$btn_custom.'" onclick="lcjak_contactchat()" type="button" id="send_c_button"><i class="fa fa-paper-plane" id="send_contact"></i> '.$jkl['g10'].'</button>
</main>
</section>
<input type="hidden" name="mycustomfields" value="">
</form>
</div>';
} else {
$livecode = '<div id="lccontainersize" class="jak_chatopen_sm'.(isset($ismobile) ? $ismobile : '').' animate__animated '.$contact_animate.'">
<form id="lcjak_ajaxform" method="post" action="'.$_SERVER['REQUEST_URI'].'">
<button class="jaklcb_sendcontact left lcb_sendcontact" type="button" onclick="lcjak_contactchat()" id="send_c_button">
<i class="fa fa-paper-plane" id="send_contact"></i>
</button>
<button class="jaklcb_close left lcb_close" type="button" onclick="lcjak_closechat()">
<i class="fa fa-times fa-lg"></i>
</button>
<section class="jaklcb_popup'.$contact_custom.'">
<header class="jaklcb_popup_header">
<aside style="flex:3">'.$contact_logo.'
</aside>
<aside style="flex:8">
<h1>'.$jkl['g1'].'</h1>
</aside>
<aside style="flex:1">
<button class="jaklcb_maximise lcb_max" onclick="lcjak_bigchat(\'slideOutUp\')" type="button"><i class="fa fa-window-maximize"></i></button>
</aside>
</header>
<main class="jaklcb_form_main" id="lcjak_formfields">
<h2>'.$headermsg.'</h2>
<div class="input_group">
<div class="jaklcb_input">
<label for="name">'.$jkl["g4"].'</label>
<input id="name" name="name" type="text" class="lcjak_input" placeholder="'.$jkl["g4"].'" value="">
</div>
<div class="jaklcb_input flex-right">
<label for="email">'.$jkl["g5"].'</label>
<input id="email" name="email" type="text" class="lcjak_input" placeholder="'.$jkl["g5"].'" value="">
</div>
</div>
<div class="jaklcb_input">
<label for="phone">'.$jkl["g49"].'</label>
<input id="phone" name="phone" type="text" class="lcjak_input" placeholder="'.$jkl["g49"].'">
</div>
<div class="jaklcb_input">
<label for="message">'.$jkl["g6"].'</label>
<textarea id="message" name="message" placeholder="'.$jkl['g25'].'"></textarea>
</div>
'.(isset($jakwidget[$widgetid]['dsgvo']) && !empty($jakwidget[$widgetid]['dsgvo']) ? '<div class="jaklcb_input">
<label>
<input type="checkbox" name="dsgvo" id="dsgvo" value="1"> '.$jakwidget[$widgetid]['dsgvo'].'
</label>
</div>' : '<input type="hidden" name="dsgvo" value="0">').'
</main>
<input type="hidden" name="mycustomfields" value="">
'.(!empty(JAK_COPYRIGHT_LINK) ? '<div class="copyright">'.JAK_COPYRIGHT_LINK.'</div>' : '').'
</section></form></div>';
}
}
?>
@@ -0,0 +1,205 @@
<?php
/*===============================================*\
|| ############################################# ||
|| # JAKWEB.CH / Version 2.0 # ||
|| # ----------------------------------------- # ||
|| # Copyright 2021 JAKWEB All Rights Reserved # ||
|| ############################################# ||
\*===============================================*/
// Language file goes global
global $jkl;
global $BT_LANGUAGE;
/* Leave a var empty if not in use or set to false */
$wtplsett = array();
// Custom Settings
$wtplsett["chatposition"] = "bottom:0;right:0;";
$wtplsett["customjs"] = "js/contact.js";
$wtplsett["customcss"] = "";
// Only for the edit page in the operator panel
if (isset($page) && $page == "widget") {
/* Leave a var empty if not in use or set to false */
$contactsett = array();
$contactsett["previewchat"] = "preview/contact.jpg";
/* Now we need custom input fields */
/* Following options are available:
1. Input
2. Textarea
3. Radio
4. Checkbox
5. Select
***
Title (you can use the lang vars from the operator/lang language files)
***
Options (for radio 3, checkbox 4, select 5) = Green,Red,Blue
Options (for Input) = colour or icon
***
Multiple (0 = No / 1 = Yes)
***
The english language var for the input field
*/
$contactsett["formoptions"] = array("1" => "1:#:".$jkl['cw44'].":#:0:#:0:#:contact_custom_logo", "2" => "3:#:".$jkl['cw35'].":#:Yes,No:#:0:#:contact_phone_required", "3" => "5:#:".$jkl['cw36'].":#:blue,green,orange,red,pink,grey:#:0:#:contact_colour_theme", "4" => "5:#:".$jkl['cw37'].":#:animate__fadeIn,animate__flash,animate__pulse,animate__headShake,animate__slideInUp,animate__slideInRight:#:0:#:contact_animation");
} else {
// Check the vars for this start
$contact_animate = "animate__fadeIn";
$contact_custom = "";
$btn_custom = "blue";
$contact_logo = '<i class="fa fa fa-user-circle '.(isset($ismobile) && !empty($ismobile) ? 'fa-3x' : 'fa-4x').' jaklcb_popup_avatar"></i>';
// We can have custom online icon
if (isset($widgetsettings[$widgetid]['contact_animation']) && !empty($widgetsettings[$widgetid]['contact_animation'])) {
$contact_animate = $widgetsettings[$widgetid]['contact_animation'];
}
// We can have custom online icon
if (isset($widgetsettings[$widgetid]['contact_colour_theme']) && !empty($widgetsettings[$widgetid]['contact_colour_theme']) && $widgetsettings[$widgetid]['contact_colour_theme'] != "blue") {
$contact_custom = " ".$widgetsettings[$widgetid]['contact_colour_theme'];
$btn_custom = $widgetsettings[$widgetid]['contact_colour_theme'];
}
// We can have custom online icon
if (isset($widgetsettings[$widgetid]['contact_custom_logo']) && !empty($widgetsettings[$widgetid]['contact_custom_logo'])) {
$contact_logo = '<img src="'.$widgetsettings[$widgetid]['contact_custom_logo'].'" class="jaklcb_popup_avatar" alt="logo">';
}
// Let's get the header welcome message
$headermsg = '';
if (empty($headermsg)) {
if (!empty($HD_ANSWERS) && is_array($HD_ANSWERS)) foreach ($HD_ANSWERS as $v) {
$msgtype = 8;
if ($v["msgtype"] == $msgtype && $v["lang"] == $BT_LANGUAGE && $v["department"] == 0) {
$phold = array("%operator%","%client%","%email%");
$replace = array("", "", JAK_EMAIL);
$headermsg = str_replace($phold, $replace, $v["message"]);
}
}
}
// Big or small
if (isset($page1) && $page1 == "big") {
$livecode = '<div id="lccontainersize" class="jak_chatopen_panel'.(isset($ismobile) ? $ismobile : '').' animate__animated '.$contact_animate.'">
<form id="lcjak_ajaxform" method="post" action="'.$_SERVER['REQUEST_URI'].'">
<section class="jaklcb_panel'.$contact_custom.'">
<header class="jaklcb_panel_header">
<aside style="flex:3">'.$contact_logo.'
</aside>
<aside style="flex:6">
<h1>'.$jkl['g1'].'</h1>
</aside>
<aside style="flex:3;text-align:right;">
<button class="jaklcb_minimize lcb_backtochat" onclick="lcjak_smallchat(\'slideOutDown\')" type="button"><i class="fa fa-window-restore"></i></button>
<button class="jaklcb_panelclose lcb_close" onclick="lcjak_closechat()" type="button"><i class="fa fa-times"></i></button>
</aside>
</header>
<main class="jaklcb_panel_main" id="lcjak_formfields" style="flex:1">
<h2>'.$headermsg.'</h2>
<div class="jaklcb_input">
<label for="name">'.$jkl["g4"].'</label>
<input id="name" name="name" type="text" class="lcjak_input" placeholder="'.$jkl["g4"].'">
</div>
<div class="jaklcb_input">
<label for="email">'.$jkl["g5"].'</label>
<input id="email" name="email" type="text" class="lcjak_input" placeholder="'.$jkl["g5"].'">
</div>
<div class="jaklcb_input">
<label for="phone">'.$jkl["g49"].'</label>
<input id="phone" name="phone" type="text" class="lcjak_input" placeholder="'.$jkl["g49"].'">
</div>
<div class="jaklcb_input">
<label for="message">'.$jkl["g6"].'</label>
<textarea id="message" name="message" placeholder="'.$jkl['g25'].'"></textarea>
</div>
'.(isset($jakwidget[$widgetid]['dsgvo']) && !empty($jakwidget[$widgetid]['dsgvo']) ? '<div class="jaklcb_input">
<label>
<input type="checkbox" name="dsgvo" id="dsgvo" value="1"> '.$jakwidget[$widgetid]['dsgvo'].'
</label>
</div>' : '<input type="hidden" name="dsgvo" value="0">').'
<button class="lcb_sendcontact jakbtn btn-simple btn-'.$btn_custom.'" onclick="lcjak_contactchat()" type="button" id="send_c_button"><i class="fa fa-paper-plane" id="send_contact"></i> '.$jkl['g10'].'</button>
</main>
</section>
<input type="hidden" name="mycustomfields" value="">
</form>
</div>';
} else {
$livecode = '<div id="lccontainersize" class="jak_chatopen_sm'.(isset($ismobile) ? $ismobile : '').' animate__animated '.$contact_animate.'">
<form id="lcjak_ajaxform" method="post" action="'.$_SERVER['REQUEST_URI'].'">
<button class="jaklcb_sendcontact lcb_sendcontact" type="button" onclick="lcjak_contactchat()" id="send_c_button">
<i class="fa fa-paper-plane" id="send_contact"></i>
</button>
<button class="jaklcb_close lcb_close" type="button" onclick="lcjak_closechat()">
<i class="fa fa-times fa-lg"></i>
</button>
<section class="jaklcb_popup'.$contact_custom.'">
<header class="jaklcb_popup_header">
<aside style="flex:3">'.$contact_logo.'
</aside>
<aside style="flex:8">
<h1>'.$jkl['g1'].'</h1>
</aside>
<aside style="flex:1">
<button class="jaklcb_maximise lcb_max" onclick="lcjak_bigchat(\'slideOutUp\')" type="button"><i class="fa fa-window-maximize"></i></button>
</aside>
</header>
<main class="jaklcb_form_main" id="lcjak_formfields">
<h2>'.$headermsg.'</h2>
<div class="input_group">
<div class="jaklcb_input">
<label for="name">'.$jkl["g4"].'</label>
<input id="name" name="name" type="text" class="lcjak_input" placeholder="'.$jkl["g4"].'" value="">
</div>
<div class="jaklcb_input flex-right">
<label for="email">'.$jkl["g5"].'</label>
<input id="email" name="email" type="text" class="lcjak_input" placeholder="'.$jkl["g5"].'" value="">
</div>
</div>
<div class="jaklcb_input">
<label for="phone">'.$jkl["g49"].'</label>
<input id="phone" name="phone" type="text" class="lcjak_input" placeholder="'.$jkl["g49"].'">
</div>
<div class="jaklcb_input">
<label for="message">'.$jkl["g6"].'</label>
<textarea id="message" name="message" placeholder="'.$jkl['g25'].'"></textarea>
</div>
'.(isset($jakwidget[$widgetid]['dsgvo']) && !empty($jakwidget[$widgetid]['dsgvo']) ? '<div class="jaklcb_input">
<label>
<input type="checkbox" name="dsgvo" id="dsgvo" value="1"> '.$jakwidget[$widgetid]['dsgvo'].'
</label>
</div>' : '<input type="hidden" name="dsgvo" value="0">').'
</main>
<input type="hidden" name="mycustomfields" value="">
'.(!empty(JAK_COPYRIGHT_LINK) ? '<div class="copyright">'.JAK_COPYRIGHT_LINK.'</div>' : '').'
</section></form></div>';
}
}
?>
@@ -0,0 +1,174 @@
<?php
/*===============================================*\
|| ############################################# ||
|| # JAKWEB.CH / Version 2.0 # ||
|| # ----------------------------------------- # ||
|| # Copyright 2021 JAKWEB All Rights Reserved # ||
|| ############################################# ||
\*===============================================*/
// Language file goes global
global $jkl;
global $BT_LANGUAGE;
/* Leave a var empty if not in use or set to false */
$wtplsett = array();
// Custom Settings
$wtplsett["chatposition"] = "bottom:0;left:0;";
$wtplsett["customjs"] = "js/contact.js";
$wtplsett["customcss"] = "";
// Only for the edit page in the operator panel
if (isset($page) && $page == "widget") {
/* Leave a var empty if not in use or set to false */
$contactsett = array();
$contactsett["previewchat"] = "preview/whatsapp_start.jpg";
/* Now we need custom input fields */
/* Following options are available:
1. Input
2. Textarea
3. Radio
4. Checkbox
5. Select
***
Title (you can use the lang vars from the operator/lang language files)
***
Options (for radio 3, checkbox 4, select 5) = Green,Red,Blue
Options (for Input) = colour or icon
***
Multiple (0 = No / 1 = Yes)
***
The english language var for the input field
*/
$contactsett["formoptions"] = array("1" => "1:#:".$jkl['cw44'].":#:0:#:0:#:contact_custom_logo", "2" => "1:#:".$jkl['cw40'].":#:0:#:0:#:whatsapp_message", "3" => "5:#:".$jkl['cw36'].":#:blue,green,orange,red,pink,grey:#:0:#:contact_colour_theme", "4" => "5:#:".$jkl['cw37'].":#:animate__fadeIn,animate__flash,animate__pulse,animate__headShake,animate__slideInUp,animate__slideInRight:#:0:#:contact_animation");
} else {
// Check the vars for this start
$start_animate = "animate__fadeIn";
$start_custom = "";
$start_logo = '<i class="fa fa fa-user-circle '.(isset($ismobile) && !empty($ismobile) ? 'fa-3x' : 'fa-4x').' jaklcb_popup_avatar"></i>';
// We can have custom online icon
if (isset($widgetsettings[$widgetid]['contact_animation']) && !empty($widgetsettings[$widgetid]['contact_animation'])) {
$start_animate = $widgetsettings[$widgetid]['contact_animation'];
}
// We can have custom online icon
if (isset($widgetsettings[$widgetid]['contact_colour_theme']) && !empty($widgetsettings[$widgetid]['contact_colour_theme']) && $widgetsettings[$widgetid]['contact_colour_theme'] != "blue") {
$start_custom = " ".$widgetsettings[$widgetid]['contact_colour_theme'];
}
// We can have custom online icon
if (isset($widgetsettings[$widgetid]['contact_custom_logo']) && !empty($widgetsettings[$widgetid]['contact_custom_logo'])) {
$start_logo = '<img src="'.$widgetsettings[$widgetid]['contact_custom_logo'].'" class="jaklcb_popup_avatar" alt="logo">';
}
// Let's get the header welcome message
$headermsg = '';
if (empty($headermsg)) {
if (!empty($HD_ANSWERS) && is_array($HD_ANSWERS)) foreach ($HD_ANSWERS as $v) {
$msgtype = 27;
if ($v["msgtype"] == $msgtype && $v["lang"] == $BT_LANGUAGE && $v["department"] == 0) {
$phold = array("%operator%","%client%","%email%");
$replace = array("", "", JAK_EMAIL);
$headermsg = str_replace($phold, $replace, $v["message"]);
}
}
}
// Get all Operators that have WhatsApp
$online_oplist_whatsapp = online_operator_list_whatsapp($opcacheid, $HD_DEPARTMENTS, $jakwidget[$widgetid]['depid'], $jakwidget[$widgetid]['singleopid']);
$op_wame = "";
if (isset($online_oplist_whatsapp) && !empty($online_oplist_whatsapp)) foreach ($online_oplist_whatsapp as $o) {
$op_wame .= '<div class="whatsapp_list">
<a href="'.(isset($ismobile) && !empty($ismobile) ? 'https://api.whatsapp.com/send?phone=' : 'https://web.whatsapp.com/send?phone=').$o["whatsappnumber"].(isset($widgetsettings[$widgetid]["whatsapp_message"]) && !empty($widgetsettings[$widgetid]["whatsapp_message"]) ? '&amp;text='.urlencode($widgetsettings[$widgetid]["whatsapp_message"]) : "").'" data-auto-text="'.(isset($widgetsettings[$widgetid]["whatsapp_message"]) && !empty($widgetsettings[$widgetid]["whatsapp_message"]) ? $widgetsettings[$widgetid]["whatsapp_message"] : "").'" target="_blank"><div class="wp_item avatar_wp">
<img src="'.BASE_URL.JAK_FILES_DIRECTORY.'/'.$o["picture"].'" alt="'.$o["name"].'" width="60" class="wo_op_avatar">
<img src="'.BASE_URL.'img/whatsapp_'.($o["isonline"] ? 'on' : 'off').'.png" alt="whatsapp_'.($o["isonline"] ? 'online' : 'offline').'" class="avatar_whatsapp">
</div></a>
<div class="wp_item whatsapp_body">
<h4>'.$o["name"].'</h4>
<p>'.$o["aboutme"].'</p>
<p>'.($o["title"] ? sprintf($jkl["g63"], $o["title"]) : $jkl["g88"]).'</p>
</div>
</div>';
}
// Big or small
if (isset($page1) && $page1 == "big") {
$livecode = '<div id="lccontainersize" class="jak_chatopen_panel'.(isset($ismobile) ? $ismobile : '').' animate__animated '.$start_animate.'">
<form id="lcjak_ajaxform" method="post" action="'.$_SERVER['REQUEST_URI'].'">
<section class="jaklcb_panel left'.$start_custom.'">
<header class="jaklcb_panel_header">
<aside style="flex:3">'.$start_logo.'
</aside>
<aside style="flex:6">
<h1>'.$jakwidget[$widgetid]['title'].'</h1>
</aside>
<aside style="flex:3;text-align:right;">
<button class="jaklcb_minimize" onclick="lcjak_smallchat()" type="button"><i class="fa fa-window-restore"></i></button>
<button class="jaklcb_panelclose lcb_close" onclick="lcjak_closechat()" type="button"><i class="fa fa-times"></i></button>
</aside>
</header>
<main class="jaklcb_panel_main">
<h2>'.$headermsg.'</h2>
'.$op_wame.'
</main>
</section>
</form>
</div>';
} else {
$livecode = '<div id="lccontainersize" class="jak_chatopen_sm'.(isset($ismobile) ? $ismobile : '').' animate__animated '.$start_animate.'">
<button class="jaklcb_close left lcb_close" onclick="lcjak_closechat()">
<i class="fa fa-times fa-lg"></i>
</button>
<form id="lcjak_ajaxform" method="post" action="'.$_SERVER['REQUEST_URI'].'">
<section class="jaklcb_popup'.$start_custom.'">
<header class="jaklcb_popup_header">
<aside style="flex:3">'.$start_logo.'
</aside>
<aside style="flex:8">
<h1>'.$jakwidget[$widgetid]['title'].'</h1>
</aside>
<aside style="flex:1">
<button class="jaklcb_maximise" onclick="lcjak_bigchat()" type="button"><i class="fa fa-window-maximize"></i></button>
</aside>
</header>
<main class="jaklcb_form_main">
<h2>'.$headermsg.'</h2>
'.$op_wame.'
</main>
</section></form></div>';
}
}
?>
@@ -0,0 +1,174 @@
<?php
/*===============================================*\
|| ############################################# ||
|| # JAKWEB.CH / Version 2.0.4 # ||
|| # ----------------------------------------- # ||
|| # Copyright 2022 JAKWEB All Rights Reserved # ||
|| ############################################# ||
\*===============================================*/
// Language file goes global
global $jkl;
global $BT_LANGUAGE;
/* Leave a var empty if not in use or set to false */
$wtplsett = array();
// Custom Settings
$wtplsett["chatposition"] = "bottom:0;right:0;";
$wtplsett["customjs"] = "js/contact.js";
$wtplsett["customcss"] = "";
// Only for the edit page in the operator panel
if (isset($page) && $page == "widget") {
/* Leave a var empty if not in use or set to false */
$contactsett = array();
$contactsett["previewchat"] = "preview/whatsapp_start.jpg";
/* Now we need custom input fields */
/* Following options are available:
1. Input
2. Textarea
3. Radio
4. Checkbox
5. Select
***
Title (you can use the lang vars from the operator/lang language files)
***
Options (for radio 3, checkbox 4, select 5) = Green,Red,Blue
Options (for Input) = colour or icon
***
Multiple (0 = No / 1 = Yes)
***
The english language var for the input field
*/
$contactsett["formoptions"] = array("1" => "1:#:".$jkl['cw44'].":#:0:#:0:#:contact_custom_logo", "2" => "1:#:".$jkl['cw40'].":#:0:#:0:#:whatsapp_message", "3" => "5:#:".$jkl['cw36'].":#:blue,green,orange,red,pink,grey:#:0:#:contact_colour_theme", "4" => "5:#:".$jkl['cw37'].":#:animate__fadeIn,animate__flash,animate__pulse,animate__headShake,animate__slideInUp,animate__slideInRight:#:0:#:contact_animation");
} else {
// Check the vars for this start
$start_animate = "animate__fadeIn";
$start_custom = "";
$start_logo = '<i class="fa fa fa-user-circle '.(isset($ismobile) && !empty($ismobile) ? 'fa-3x' : 'fa-4x').' jaklcb_popup_avatar"></i>';
// We can have custom online icon
if (isset($widgetsettings[$widgetid]['contact_animation']) && !empty($widgetsettings[$widgetid]['contact_animation'])) {
$start_animate = $widgetsettings[$widgetid]['contact_animation'];
}
// We can have custom online icon
if (isset($widgetsettings[$widgetid]['contact_colour_theme']) && !empty($widgetsettings[$widgetid]['contact_colour_theme']) && $widgetsettings[$widgetid]['contact_colour_theme'] != "blue") {
$start_custom = " ".$widgetsettings[$widgetid]['contact_colour_theme'];
}
// We can have custom online icon
if (isset($widgetsettings[$widgetid]['contact_custom_logo']) && !empty($widgetsettings[$widgetid]['contact_custom_logo'])) {
$start_logo = '<img src="'.$widgetsettings[$widgetid]['contact_custom_logo'].'" class="jaklcb_popup_avatar" alt="logo">';
}
// Let's get the header welcome message
$headermsg = '';
if (empty($headermsg)) {
if (!empty($HD_ANSWERS) && is_array($HD_ANSWERS)) foreach ($HD_ANSWERS as $v) {
$msgtype = 27;
if ($v["msgtype"] == $msgtype && $v["lang"] == $BT_LANGUAGE && $v["department"] == 0) {
$phold = array("%operator%","%client%","%email%");
$replace = array("", "", JAK_EMAIL);
$headermsg = str_replace($phold, $replace, $v["message"]);
}
}
}
// Get all Operators that have WhatsApp
$online_oplist_whatsapp = online_operator_list_whatsapp($opcacheid, $HD_DEPARTMENTS, $jakwidget[$widgetid]['depid'], $jakwidget[$widgetid]['singleopid']);
$op_wame = "";
if (isset($online_oplist_whatsapp) && !empty($online_oplist_whatsapp)) foreach ($online_oplist_whatsapp as $o) {
$op_wame .= '<div class="whatsapp_list">
<a href="'.(isset($ismobile) && !empty($ismobile) ? 'https://api.whatsapp.com/send?phone=' : 'https://web.whatsapp.com/send?phone=').$o["whatsappnumber"].(isset($widgetsettings[$widgetid]["whatsapp_message"]) && !empty($widgetsettings[$widgetid]["whatsapp_message"]) ? '&amp;text='.urlencode($widgetsettings[$widgetid]["whatsapp_message"]) : "").'" data-auto-text="'.(isset($widgetsettings[$widgetid]["whatsapp_message"]) && !empty($widgetsettings[$widgetid]["whatsapp_message"]) ? $widgetsettings[$widgetid]["whatsapp_message"] : "").'" target="_blank"><div class="wp_item avatar_wp">
<img src="'.BASE_URL.JAK_FILES_DIRECTORY.'/'.$o["picture"].'" alt="'.$o["name"].'" width="60" class="wo_op_avatar">
<img src="'.BASE_URL.'img/whatsapp_'.($o["isonline"] ? 'on' : 'off').'.png" alt="whatsapp_'.($o["isonline"] ? 'online' : 'offline').'" class="avatar_whatsapp">
</div></a>
<div class="wp_item whatsapp_body">
<h4>'.$o["name"].'</h4>
<p>'.$o["aboutme"].'</p>
<p>'.($o["title"] ? sprintf($jkl["g63"], $o["title"]) : $jkl["g88"]).'</p>
</div>
</div>';
}
// Big or small
if (isset($page1) && $page1 == "big") {
$livecode = '<div id="lccontainersize" class="jak_chatopen_panel'.(isset($ismobile) ? $ismobile : '').' animate__animated '.$start_animate.'">
<form id="lcjak_ajaxform" method="post" action="'.$_SERVER['REQUEST_URI'].'">
<section class="jaklcb_panel'.$start_custom.'">
<header class="jaklcb_panel_header">
<aside style="flex:3">'.$start_logo.'
</aside>
<aside style="flex:6">
<h1>'.$jakwidget[$widgetid]['title'].'</h1>
</aside>
<aside style="flex:3;text-align:right;">
<button class="jaklcb_minimize" onclick="lcjak_smallchat()" type="button"><i class="fa fa-window-restore"></i></button>
<button class="jaklcb_panelclose lcb_close" onclick="lcjak_closechat()" type="button"><i class="fa fa-times"></i></button>
</aside>
</header>
<main class="jaklcb_panel_main">
<h2>'.$headermsg.'</h2>
'.$op_wame.'
</main>
</section>
</form>
</div>';
} else {
$livecode = '<div id="lccontainersize" class="jak_chatopen_sm'.(isset($ismobile) ? $ismobile : '').' animate__animated '.$start_animate.'">
<button class="jaklcb_close lcb_close" onclick="lcjak_closechat()">
<i class="fa fa-times fa-lg"></i>
</button>
<form id="lcjak_ajaxform" method="post" action="'.$_SERVER['REQUEST_URI'].'">
<section class="jaklcb_popup'.$start_custom.'">
<header class="jaklcb_popup_header">
<aside style="flex:3">'.$start_logo.'
</aside>
<aside style="flex:8">
<h1>'.$jakwidget[$widgetid]['title'].'</h1>
</aside>
<aside style="flex:1">
<button class="jaklcb_maximise" onclick="lcjak_bigchat()" type="button"><i class="fa fa-window-maximize"></i></button>
</aside>
</header>
<main class="jaklcb_form_main">
<h2>'.$headermsg.'</h2>
'.$op_wame.'
</main>
</section></form></div>';
}
}
?>
@@ -0,0 +1,150 @@
<?php
/*===============================================*\
|| ############################################# ||
|| # JAKWEB.CH / Version 2.1.4 # ||
|| # ----------------------------------------- # ||
|| # Copyright 2023 JAKWEB All Rights Reserved # ||
|| ############################################# ||
\*===============================================*/
// Language file goes global
global $jkl;
global $BT_LANGUAGE;
/* Leave a var empty if not in use or set to false */
$wtplsett = array();
// Custom Settings
$wtplsett["chatposition"] = "bottom:0;left:0;";
$wtplsett["customjs"] = "js/contact.js";
$wtplsett["customcss"] = "";
// Only for the edit page in the operator panel
if (isset($page) && $page == "widget") {
/* Leave a var empty if not in use or set to false */
$contactsett = array();
$contactsett["previewchat"] = "preview/contact.jpg";
/* Now we need custom input fields */
/* Following options are available:
1. Input
2. Textarea
3. Radio
4. Checkbox
5. Select
***
Title (you can use the lang vars from the operator/lang language files)
***
Options (for radio 3, checkbox 4, select 5) = Green,Red,Blue
Options (for Input) = colour or icon
***
Multiple (0 = No / 1 = Yes)
***
The english language var for the input field
*/
$contactsett["formoptions"] = array("1" => "1:#:".$jkl['cw44'].":#:0:#:0:#:contact_custom_logo", "2" => "3:#:".$jkl['cw35'].":#:Yes,No:#:0:#:contact_phone_required", "3" => "5:#:".$jkl['cw36'].":#:blue,green,orange,red,pink,grey:#:0:#:contact_colour_theme", "4" => "5:#:".$jkl['cw37'].":#:animate__fadeIn,animate__flash,animate__pulse,animate__headShake,animate__slideInUp,animate__slideInRight:#:0:#:contact_animation");
} else {
// Check the vars for this start
$contact_animate = "animate__fadeIn";
$contact_custom = "";
$btn_custom = "blue";
$contact_logo = '<i class="fa fa fa-user-circle '.(isset($ismobile) && !empty($ismobile) ? 'fa-3x' : 'fa-4x').' jaklcb_popup_avatar" aria-hidden="true"></i>';
// We can have custom online icon
if (isset($widgetsettings['contact_animation']) && !empty($widgetsettings['contact_animation'])) {
$contact_animate = $widgetsettings['contact_animation'];
}
// We can have custom online icon
if (isset($widgetsettings['contact_colour_theme']) && !empty($widgetsettings['contact_colour_theme']) && $widgetsettings['contact_colour_theme'] != "blue") {
$contact_custom = " ".$widgetsettings['contact_colour_theme'];
$btn_custom = $widgetsettings['contact_colour_theme'];
}
// We can have custom online icon
if (isset($widgetsettings['contact_custom_logo']) && !empty($widgetsettings['contact_custom_logo'])) {
$contact_logo = '<img src="'.$widgetsettings['contact_custom_logo'].'" class="jaklcb_popup_avatar" alt="logo">';
}
// Let's get the header welcome message
$headermsg = '';
if (empty($headermsg)) {
if (!empty($HD_ANSWERS) && is_array($HD_ANSWERS)) foreach ($HD_ANSWERS as $v) {
$msgtype = 8;
if ($v["msgtype"] == $msgtype && $v["lang"] == $BT_LANGUAGE && $v["department"] == 0) {
$phold = array("%operator%","%client%","%email%");
$replace = array("", "", JAK_EMAIL);
$headermsg = str_replace($phold, $replace, $v["message"]);
}
}
}
// We only go small in this template
$livecode = '<div id="lccontainersize" class="jak_chatopen_sm'.(isset($ismobile) ? $ismobile : '').' animate__animated '.$contact_animate.'">
<form id="lcjak_ajaxform" method="post" action="'.$_SERVER['REQUEST_URI'].'">
<button class="jaklcb_sendcontact left lcb_sendcontact" type="button" onclick="lcjak_contactchat()" id="send_c_button">
<i class="fa fa-paper-plane" id="send_contact" aria-hidden="true"></i>
</button>
<button class="jaklcb_close left lcb_close" type="button" onclick="lcjak_closechat()">
<i class="fa fa-times fa-lg" aria-hidden="true"></i>
</button>
<section class="jaklcb_popup'.$contact_custom.'">
<header class="jaklcb_popup_header">
<aside style="flex:3">'.$contact_logo.'
</aside>
<aside style="flex:9">
<h1>'.$jkl['g1'].'</h1>
</aside>
</header>
<main class="jaklcb_form_main" id="lcjak_formfields">
<h2>'.$headermsg.'</h2>
<div class="input_group">
<div class="jaklcb_input">
<label for="name">'.$jkl["g4"].'</label>
<input id="name" name="name" type="text" class="lcjak_input" placeholder="'.$jkl["g4"].'" value="">
</div>
<div class="jaklcb_input flex-right">
<label for="email">'.$jkl["g5"].'</label>
<input id="email" name="email" type="text" class="lcjak_input" placeholder="'.$jkl["g5"].'" value="">
</div>
</div>
<div class="jaklcb_input">
<label for="phone">'.$jkl["g49"].'</label>
<input id="phone" name="phone" type="text" class="lcjak_input" placeholder="'.$jkl["g49"].'">
</div>
<div class="jaklcb_input">
<label for="message">'.$jkl["g25"].'</label>
<textarea id="message" name="message" placeholder="'.$jkl['g25'].'"></textarea>
</div>
'.(isset($jakwidget['dsgvo']) && !empty($jakwidget['dsgvo']) ? '<div class="jaklcb_input">
<label>
<input type="checkbox" name="dsgvo" id="dsgvo" value="1"> '.$jakwidget['dsgvo'].'
</label>
</div>' : '<input type="hidden" name="dsgvo" value="0">').'
</main>
<input type="hidden" name="mycustomfields" value="">
</section></form></div>';
}
?>
@@ -0,0 +1,150 @@
<?php
/*===============================================*\
|| ############################################# ||
|| # JAKWEB.CH / Version 2.1.4 # ||
|| # ----------------------------------------- # ||
|| # Copyright 2023 JAKWEB All Rights Reserved # ||
|| ############################################# ||
\*===============================================*/
// Language file goes global
global $jkl;
global $BT_LANGUAGE;
/* Leave a var empty if not in use or set to false */
$wtplsett = array();
// Custom Settings
$wtplsett["chatposition"] = "bottom:0;right:0;";
$wtplsett["customjs"] = "js/contact.js";
$wtplsett["customcss"] = "";
// Only for the edit page in the operator panel
if (isset($page) && $page == "widget") {
/* Leave a var empty if not in use or set to false */
$contactsett = array();
$contactsett["previewchat"] = "preview/contact.jpg";
/* Now we need custom input fields */
/* Following options are available:
1. Input
2. Textarea
3. Radio
4. Checkbox
5. Select
***
Title (you can use the lang vars from the operator/lang language files)
***
Options (for radio 3, checkbox 4, select 5) = Green,Red,Blue
Options (for Input) = colour or icon
***
Multiple (0 = No / 1 = Yes)
***
The english language var for the input field
*/
$contactsett["formoptions"] = array("1" => "1:#:".$jkl['cw44'].":#:0:#:0:#:contact_custom_logo", "2" => "3:#:".$jkl['cw35'].":#:Yes,No:#:0:#:contact_phone_required", "3" => "5:#:".$jkl['cw36'].":#:blue,green,orange,red,pink,grey:#:0:#:contact_colour_theme", "4" => "5:#:".$jkl['cw37'].":#:animate__fadeIn,animate__flash,animate__pulse,animate__headShake,animate__slideInUp,animate__slideInRight:#:0:#:contact_animation");
} else {
// Check the vars for this start
$contact_animate = "animate__fadeIn";
$contact_custom = "";
$btn_custom = "blue";
$contact_logo = '<i class="fa fa fa-user-circle '.(isset($ismobile) && !empty($ismobile) ? 'fa-3x' : 'fa-4x').' jaklcb_popup_avatar" aria-hidden="true"></i>';
// We can have custom online icon
if (isset($widgetsettings['contact_animation']) && !empty($widgetsettings['contact_animation'])) {
$contact_animate = $widgetsettings['contact_animation'];
}
// We can have custom online icon
if (isset($widgetsettings['contact_colour_theme']) && !empty($widgetsettings['contact_colour_theme']) && $widgetsettings['contact_colour_theme'] != "blue") {
$contact_custom = " ".$widgetsettings['contact_colour_theme'];
$btn_custom = $widgetsettings['contact_colour_theme'];
}
// We can have custom online icon
if (isset($widgetsettings['contact_custom_logo']) && !empty($widgetsettings['contact_custom_logo'])) {
$contact_logo = '<img src="'.$widgetsettings['contact_custom_logo'].'" class="jaklcb_popup_avatar" alt="logo">';
}
// Let's get the header welcome message
$headermsg = '';
if (empty($headermsg)) {
if (!empty($HD_ANSWERS) && is_array($HD_ANSWERS)) foreach ($HD_ANSWERS as $v) {
$msgtype = 8;
if ($v["msgtype"] == $msgtype && $v["lang"] == $BT_LANGUAGE && $v["department"] == 0) {
$phold = array("%operator%","%client%","%email%");
$replace = array("", "", JAK_EMAIL);
$headermsg = str_replace($phold, $replace, $v["message"]);
}
}
}
// We only go small in this template
$livecode = '<div id="lccontainersize" class="jak_chatopen_sm'.(isset($ismobile) ? $ismobile : '').' animate__animated '.$contact_animate.'">
<form id="lcjak_ajaxform" method="post" action="'.$_SERVER['REQUEST_URI'].'">
<button class="jaklcb_sendcontact lcb_sendcontact" type="button" onclick="lcjak_contactchat()" id="send_c_button">
<i class="fa fa-paper-plane" id="send_contact" aria-hidden="true"></i>
</button>
<button class="jaklcb_close lcb_close" type="button" onclick="lcjak_closechat()">
<i class="fa fa-times fa-lg" aria-hidden="true"></i>
</button>
<section class="jaklcb_popup'.$contact_custom.'">
<header class="jaklcb_popup_header">
<aside style="flex:3">'.$contact_logo.'
</aside>
<aside style="flex:9">
<h1>'.$jkl['g1'].'</h1>
</aside>
</header>
<main class="jaklcb_form_main" id="lcjak_formfields">
<h2>'.$headermsg.'</h2>
<div class="input_group">
<div class="jaklcb_input">
<label for="name">'.$jkl["g4"].'</label>
<input id="name" name="name" type="text" class="lcjak_input" placeholder="'.$jkl["g4"].'" value="">
</div>
<div class="jaklcb_input flex-right">
<label for="email">'.$jkl["g5"].'</label>
<input id="email" name="email" type="text" class="lcjak_input" placeholder="'.$jkl["g5"].'" value="">
</div>
</div>
<div class="jaklcb_input">
<label for="phone">'.$jkl["g49"].'</label>
<input id="phone" name="phone" type="text" class="lcjak_input" placeholder="'.$jkl["g49"].'">
</div>
<div class="jaklcb_input">
<label for="message">'.$jkl["g25"].'</label>
<textarea id="message" name="message" placeholder="'.$jkl['g25'].'"></textarea>
</div>
'.(isset($jakwidget['dsgvo']) && !empty($jakwidget['dsgvo']) ? '<div class="jaklcb_input">
<label>
<input type="checkbox" name="dsgvo" id="dsgvo" value="1"> '.$jakwidget['dsgvo'].'
</label>
</div>' : '<input type="hidden" name="dsgvo" value="0">').'
</main>
<input type="hidden" name="mycustomfields" value="">
</section></form></div>';
}
?>