Initial Commit
This commit is contained in:
@@ -0,0 +1,123 @@
|
||||
<?php
|
||||
|
||||
/*===============================================*\
|
||||
|| ############################################# ||
|
||||
|| # JAKWEB.CH / Version 2.1.2 # ||
|
||||
|| # ----------------------------------------- # ||
|
||||
|| # Copyright 2023 JAKWEB All Rights Reserved # ||
|
||||
|| ############################################# ||
|
||||
\*===============================================*/
|
||||
|
||||
// Language file goes global
|
||||
global $jkl;
|
||||
|
||||
/* Leave a var empty if not in use or set to false */
|
||||
$wtplsett = array();
|
||||
|
||||
// Custom Settings
|
||||
$wtplsett["chatposition"] = "position:fixed;z-index:9999;bottom:0;left:0;";
|
||||
$wtplsett["customjs"] = "js/btn.js";
|
||||
$wtplsett["customcss"] = "";
|
||||
// Standard vars for the button
|
||||
$wtplsett["standardvars"] = array("btn_image" => "space_on.png", "btn_image_mobile" => "space-mobile_on.png");
|
||||
|
||||
// We only load when we need to receive messages
|
||||
if (isset($lcdrm) && $lcdrm === true) {
|
||||
$wtplsett["engagehtml"] = '<div class="jaklc_engage_img left animate__animated animate__fadeIn">'.(isset($engimg) && !empty($engimg) ? '<p><img src="'.$engimg.'" alt="engage_img" max-width="100"></p>' : (isset($engicon) && !empty($engicon) ? '<p><i class="'.$engicon.' fa-lg"></i></p>' : '')).(isset($engtitle) && !empty($engtitle) ? '<h1>'.$engtitle.'</h1>' : '').'<p>'.(isset($engmsg) && !empty($engmsg) ? $engmsg : '').'</p><p><a href="javascript:void(0)" onclick="lcjak_openchat(this)" class="jakbtn btn-green btn-small btn-underline">'.(isset($engconfirm) && !empty($engconfirm) ? $engconfirm : $jkl['g72']).'</a> <a href="javascript:void(0)" onclick="lcjak_closechat(this)" class="jakbtn btn-red btn-small btn-underline">'.(isset($engcancel) && !empty($engcancel) ? $engcancel : $jkl['g73']).'</a></p></figcaption>';
|
||||
}
|
||||
|
||||
if (isset($page) && $page == "widget") {
|
||||
|
||||
/* Leave a var empty if not in use or set to false */
|
||||
$btnsett = array();
|
||||
|
||||
$btnsett["previewbtn"] = '<div><img src="" id="btn_preview" alt="live chat" class="img-responsive"></div>';
|
||||
$btnsett["previewbtnmobile"] = '<div><img src="" id="btn_preview_mobile" alt="live chat" class="img-responsive"></div>';
|
||||
|
||||
/* 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
|
||||
Options for select = btn
|
||||
Options for select = slideimg
|
||||
|
||||
***
|
||||
|
||||
Multiple (0 = No / 1 = Yes)
|
||||
|
||||
***
|
||||
|
||||
The english language var for the input field
|
||||
|
||||
*/
|
||||
|
||||
$btnsett["formoptions"] = array("1" => "5:#:".$jkl['cw41'].":#:btn:#:0:#:btn_image", "2" => "5:#:".$jkl['cw42'].":#:btn:#:0:#:btn_image_mobile", "3" => "5:#:".$jkl['cw18'].":#:animate__fadeIn,animate__flash,animate__pulse,animate__headShake,animate__slideInUp,animate__slideInRight:#:0:#:btn_animation", "4" => "5:#:".$jkl['cw19'].":#:animate__fadeIn,animate__flash,animate__pulse,animate__headShake,animate__slideInUp,animate__slideInRight:#:0:#:btn_animation_offline");
|
||||
|
||||
}
|
||||
|
||||
// Check the vars for this button
|
||||
$btn_on_icon = "far fa-comments-alt";
|
||||
$btn_off_icon = "far fa-envelope";
|
||||
$btn_on_animate = "animate__fadeIn";
|
||||
$btn_off_animate = "animate__fadeIn";
|
||||
$btnimg = "";
|
||||
|
||||
// Custom Button animation
|
||||
if (isset($widgetsettings[$widgetid]['btn_animation']) && !empty($widgetsettings[$widgetid]['btn_animation'])) {
|
||||
$btn_on_animate = $widgetsettings[$widgetid]['btn_animation'];
|
||||
}
|
||||
|
||||
|
||||
// Custom button animation for offline use
|
||||
if (isset($widgetsettings[$widgetid]['btn_animation_offline']) && !empty($widgetsettings[$widgetid]['btn_animation_offline'])) {
|
||||
$btn_off_animate = $widgetsettings[$widgetid]['btn_animation_offline'];
|
||||
}
|
||||
|
||||
// Set the button image
|
||||
if (isset($widgetsettings[$widgetid]['btn_image']) && !empty($widgetsettings[$widgetid]['btn_image'])) {
|
||||
|
||||
$btnimgmodify = $widgetsettings[$widgetid]['btn_image'];
|
||||
if (isset($_SESSION["clientismobile"]) && isset($widgetsettings[$widgetid]['btn_image_mobile']) && !empty($widgetsettings[$widgetid]['btn_image_mobile'])) {
|
||||
$btnimgmodify = $widgetsettings[$widgetid]['btn_image_mobile'];
|
||||
}
|
||||
|
||||
// Get image size
|
||||
if (isset($online_op) && $online_op) {
|
||||
list($btnwidth, $btnheight) = getimagesize(APP_PATH.JAK_FILES_DIRECTORY.'/buttons/'.$btnimgmodify);
|
||||
$buttonimg = $btnimgmodify;
|
||||
} else {
|
||||
list($btnwidth, $btnheight) = getimagesize(APP_PATH.JAK_FILES_DIRECTORY.'/buttons/'.str_replace("_on", "_off", $btnimgmodify));
|
||||
$buttonimg = str_replace("_on", "_off", $btnimgmodify);
|
||||
}
|
||||
|
||||
// Get the width of the button and add 50px for the hover
|
||||
$btnwidthdiv = 'style="width:'.($btnwidth+20).'px;height:'.($btnheight+20).'px;"';
|
||||
|
||||
$btnimg = '<div class="jaklcb_custom left"><img src="'.str_replace('include/', '', BASE_URL).JAK_FILES_DIRECTORY.'/buttons/'.$buttonimg.'" id="lcjak_openchat" width="'.$btnwidth.'" height="'.$btnheight.'" alt="live chat"></div>';
|
||||
|
||||
}
|
||||
|
||||
$livecode_online = '<div id="lccontainersize" class="jak_custombtn animate__animated '.$btn_on_animate.'"'.$btnwidthdiv.'>
|
||||
'.$btnimg.'
|
||||
</div>';
|
||||
|
||||
$livecode_offline = '<div id="lccontainersize" class="jak_custombtn animate__animated '.$btn_off_animate.'"'.$btnwidthdiv.'>
|
||||
'.$btnimg.'
|
||||
</div>';
|
||||
|
||||
$livecode_hide = '<div id="lccontainersize" class="jak_hidewhenoff"></div>';
|
||||
|
||||
?>
|
||||
@@ -0,0 +1,122 @@
|
||||
<?php
|
||||
|
||||
/*===============================================*\
|
||||
|| ############################################# ||
|
||||
|| # JAKWEB.CH / Version 2.1.2 # ||
|
||||
|| # ----------------------------------------- # ||
|
||||
|| # Copyright 2023 JAKWEB All Rights Reserved # ||
|
||||
|| ############################################# ||
|
||||
\*===============================================*/
|
||||
|
||||
// Language file goes global
|
||||
global $jkl;
|
||||
|
||||
/* Leave a var empty if not in use or set to false */
|
||||
$wtplsett = array();
|
||||
|
||||
// Custom Settings
|
||||
$wtplsett["chatposition"] = "position:fixed;z-index:9999;bottom:0;right:0;";
|
||||
$wtplsett["customjs"] = "js/btn.js";
|
||||
$wtplsett["customcss"] = "";
|
||||
// Standard vars for the button
|
||||
$wtplsett["standardvars"] = array("btn_image" => "space_on.png", "btn_image_mobile" => "space-mobile_on.png");
|
||||
|
||||
// We only load when we need to receive messages
|
||||
if (isset($lcdrm) && $lcdrm === true) {
|
||||
$wtplsett["engagehtml"] = '<div class="jaklc_engage_img animate__animated animate__fadeIn">'.(isset($engimg) && !empty($engimg) ? '<p><img src="'.$engimg.'" alt="engage_img" max-width="100"></p>' : (isset($engicon) && !empty($engicon) ? '<p><i class="'.$engicon.' fa-lg"></i></p>' : '')).(isset($engtitle) && !empty($engtitle) ? '<h1>'.$engtitle.'</h1>' : '').'<p>'.(isset($engmsg) && !empty($engmsg) ? $engmsg : '').'</p><p><a href="javascript:void(0)" onclick="lcjak_openchat(this)" class="jakbtn btn-green btn-small btn-underline">'.(isset($engconfirm) && !empty($engconfirm) ? $engconfirm : $jkl['g72']).'</a> <a href="javascript:void(0)" onclick="lcjak_closechat(this)" class="jakbtn btn-red btn-small btn-underline">'.(isset($engcancel) && !empty($engcancel) ? $engcancel : $jkl['g73']).'</a></p></figcaption>';
|
||||
}
|
||||
|
||||
if (isset($page) && $page == "widget") {
|
||||
|
||||
/* Leave a var empty if not in use or set to false */
|
||||
$btnsett = array();
|
||||
|
||||
$btnsett["previewbtn"] = '<div><img src="" id="btn_preview" alt="live chat" class="img-responsive"></div>';
|
||||
$btnsett["previewbtnmobile"] = '<div><img src="" id="btn_preview_mobile" alt="live chat" class="img-responsive"></div>';
|
||||
|
||||
/* 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
|
||||
Options for select = btn
|
||||
Options for select = slideimg
|
||||
|
||||
***
|
||||
|
||||
Multiple (0 = No / 1 = Yes)
|
||||
|
||||
***
|
||||
|
||||
The english language var for the input field
|
||||
|
||||
*/
|
||||
|
||||
$btnsett["formoptions"] = array("1" => "5:#:".$jkl['cw41'].":#:btn:#:0:#:btn_image", "2" => "5:#:".$jkl['cw42'].":#:btn:#:0:#:btn_image_mobile", "3" => "5:#:".$jkl['cw18'].":#:animate__fadeIn,animate__flash,animate__pulse,animate__headShake,animate__slideInUp,animate__slideInRight:#:0:#:btn_animation", "4" => "5:#:".$jkl['cw19'].":#:animate__fadeIn,animate__flash,animate__pulse,animate__headShake,animate__slideInUp,animate__slideInRight:#:0:#:btn_animation_offline");
|
||||
|
||||
}
|
||||
|
||||
// Check the vars for this button
|
||||
$btn_on_icon = "far fa-comments-alt";
|
||||
$btn_off_icon = "far fa-envelope";
|
||||
$btn_on_animate = "animate__fadeIn";
|
||||
$btn_off_animate = "animate__fadeIn";
|
||||
|
||||
// Custom Button animation
|
||||
if (isset($widgetsettings[$widgetid]['btn_animation']) && !empty($widgetsettings[$widgetid]['btn_animation'])) {
|
||||
$btn_on_animate = $widgetsettings[$widgetid]['btn_animation'];
|
||||
}
|
||||
|
||||
|
||||
// Custom button animation for offline use
|
||||
if (isset($widgetsettings[$widgetid]['btn_animation_offline']) && !empty($widgetsettings[$widgetid]['btn_animation_offline'])) {
|
||||
$btn_off_animate = $widgetsettings[$widgetid]['btn_animation_offline'];
|
||||
}
|
||||
|
||||
// Set the button image
|
||||
if (isset($widgetsettings[$widgetid]['btn_image']) && !empty($widgetsettings[$widgetid]['btn_image'])) {
|
||||
|
||||
$btnimgmodify = $widgetsettings[$widgetid]['btn_image'];
|
||||
if (isset($_SESSION["clientismobile"]) && isset($widgetsettings[$widgetid]['btn_image_mobile']) && !empty($widgetsettings[$widgetid]['btn_image_mobile'])) {
|
||||
$btnimgmodify = $widgetsettings[$widgetid]['btn_image_mobile'];
|
||||
}
|
||||
|
||||
// Get image size
|
||||
if (isset($online_op) && $online_op) {
|
||||
list($btnwidth, $btnheight) = getimagesize(APP_PATH.JAK_FILES_DIRECTORY.'/buttons/'.$btnimgmodify);
|
||||
$buttonimg = $btnimgmodify;
|
||||
} else {
|
||||
list($btnwidth, $btnheight) = getimagesize(APP_PATH.JAK_FILES_DIRECTORY.'/buttons/'.str_replace("_on", "_off", $btnimgmodify));
|
||||
$buttonimg = str_replace("_on", "_off", $btnimgmodify);
|
||||
}
|
||||
|
||||
// Get the width of the button and add 50px for the hover
|
||||
$btnwidthdiv = 'style="width:'.($btnwidth+20).'px;height:'.($btnheight+20).'px;"';
|
||||
|
||||
$btnimg = '<div class="jaklcb_custom"><img src="'.str_replace('include/', '', BASE_URL).JAK_FILES_DIRECTORY.'/buttons/'.$buttonimg.'" id="lcjak_openchat" width="'.$btnwidth.'" height="'.$btnheight.'" alt="live chat"></div>';
|
||||
|
||||
}
|
||||
|
||||
$livecode_online = '<div id="lccontainersize" class="jak_custombtn animate__animated '.$btn_on_animate.'"'.$btnwidthdiv.'>
|
||||
'.$btnimg.'
|
||||
</div>';
|
||||
|
||||
$livecode_offline = '<div id="lccontainersize" class="jak_custombtn animate__animated '.$btn_off_animate.'"'.$btnwidthdiv.'>
|
||||
'.$btnimg.'
|
||||
</div>';
|
||||
|
||||
$livecode_hide = '<div id="lccontainersize" class="jak_hidewhenoff"></div>';
|
||||
|
||||
?>
|
||||
@@ -0,0 +1,144 @@
|
||||
<?php
|
||||
|
||||
/*===============================================*\
|
||||
|| ############################################# ||
|
||||
|| # JAKWEB.CH / Version 2.1.2 # ||
|
||||
|| # ----------------------------------------- # ||
|
||||
|| # Copyright 2023 JAKWEB All Rights Reserved # ||
|
||||
|| ############################################# ||
|
||||
\*===============================================*/
|
||||
|
||||
// Language file goes global
|
||||
global $jkl;
|
||||
|
||||
// Check the vars for this button
|
||||
$btn_on_icon = "far fa-comments-alt";
|
||||
$btn_off_icon = "far fa-envelope";
|
||||
$btn_on_animate = "animate__fadeIn";
|
||||
$btn_off_animate = "animate__fadeIn";
|
||||
$btn_on_custom = $btn_off_custom = "";
|
||||
|
||||
/* Leave a var empty if not in use or set to false */
|
||||
$wtplsett = array();
|
||||
|
||||
// Custom Settings
|
||||
$wtplsett["chatposition"] = "position:fixed;z-index:9999;bottom:0;left:0;";
|
||||
$wtplsett["customjs"] = "js/btn.js";
|
||||
$wtplsett["customcss"] = "";
|
||||
|
||||
// We only load when we need to receive messages
|
||||
if (isset($lcdrm) && $lcdrm === true) {
|
||||
$wtplsett["engagehtml"] = '<div class="jaklc_engage left animate__animated animate__fadeIn">'.(isset($engimg) && !empty($engimg) ? '<p><img src="'.$engimg.'" alt="engage_img" max-width="100"></p>' : (isset($engicon) && !empty($engicon) ? '<p><i class="'.$engicon.' fa-lg"></i></p>' : '')).(isset($engtitle) && !empty($engtitle) ? '<h1>'.$engtitle.'</h1>' : '').'<p>'.(isset($engmsg) && !empty($engmsg) ? $engmsg : '').'</p><p><a href="javascript:void(0)" onclick="lcjak_openchat(this)" class="jakbtn btn-green btn-small btn-underline">'.(isset($engconfirm) && !empty($engconfirm) ? $engconfirm : $jkl['g72']).'</a> <a href="javascript:void(0)" onclick="lcjak_closechat(this)" class="jakbtn btn-red btn-small btn-underline">'.(isset($engcancel) && !empty($engcancel) ? $engcancel : $jkl['g73']).'</a></p></figcaption>';
|
||||
}
|
||||
|
||||
if (isset($page) && $page == "widget") {
|
||||
|
||||
/* Leave a var empty if not in use or set to false */
|
||||
$btnsett = array();
|
||||
|
||||
$btnsett["previewbtn"] = '<button style="width: 52px;height: 52px;color: #fff;background-color: #039af2;background-position: center center;background-repeat: no-repeat;box-shadow: 12px 15px 20px 0 rgba(46, 61, 73, 0.15);border: 0;border-radius: 50%;cursor: pointer;margin: 16px;" type="button" id="lcjak_openchat">
|
||||
<i class="'.$btn_on_icon.' fa-lg" style="margin-top: 2px;"></i>
|
||||
</button>';
|
||||
|
||||
/* 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
|
||||
|
||||
*/
|
||||
|
||||
$btnsett["formoptions"] = array("1" => "1:#:".$jkl['cw10'].":#:icon:#:0:#:btn_icon", "2" => "1:#:".$jkl['cw11'].":#:colour:#:0:#:btn_icon_colour", "3" => "1:#:".$jkl['cw12'].":#:colour:#:0:#:btn_background_colour", "4" => "5:#:".$jkl['cw18'].":#:animate__fadeIn,animate__flash,animate__pulse,animate__headShake,animate__slideInUp,animate__slideInRight:#:0:#:btn_animation", "5" => "1:#:".$jkl['cw15'].":#:icon:#:0:#:btn_icon_offline", "6" => "1:#:".$jkl['cw16'].":#:colour:#:0:#:btn_icon_off_colour", "7" => "1:#:".$jkl['cw17'].":#:colour:#:0:#:btn_background_off_colour", "8" => "5:#:".$jkl['cw19'].":#:animate__fadeIn,animate__flash,animate__pulse,animate__headShake,animate__slideInUp,animate__slideInRight:#:0:#:btn_animation_offline");
|
||||
|
||||
}
|
||||
|
||||
// We can have custom online icon
|
||||
if (isset($widgetsettings[$widgetid]['btn_icon']) && !empty($widgetsettings[$widgetid]['btn_icon'])) {
|
||||
$btn_on_icon = $widgetsettings[$widgetid]['btn_icon'];
|
||||
}
|
||||
|
||||
// We can have custom online icon
|
||||
if (isset($widgetsettings[$widgetid]['btn_animation']) && !empty($widgetsettings[$widgetid]['btn_animation'])) {
|
||||
$btn_on_animate = $widgetsettings[$widgetid]['btn_animation'];
|
||||
}
|
||||
|
||||
// We can have custom online colours
|
||||
if (isset($widgetsettings[$widgetid]['btn_icon_colour']) && !empty($widgetsettings[$widgetid]['btn_icon_colour']) || isset($widgetsettings[$widgetid]['btn_background_colour']) && !empty($widgetsettings[$widgetid]['btn_background_colour'])) {
|
||||
|
||||
$btn_on_custom .= 'style="';
|
||||
|
||||
if (isset($widgetsettings[$widgetid]['btn_icon_colour']) && !empty($widgetsettings[$widgetid]['btn_icon_colour'])) {
|
||||
$btn_on_custom .= 'color:'.$widgetsettings[$widgetid]['btn_icon_colour'].';';
|
||||
}
|
||||
|
||||
if (isset($widgetsettings[$widgetid]['btn_background_colour']) && !empty($widgetsettings[$widgetid]['btn_background_colour'])) {
|
||||
$btn_on_custom .= 'background-color:'.$widgetsettings[$widgetid]['btn_background_colour'].';';
|
||||
}
|
||||
|
||||
$btn_on_custom .= '"';
|
||||
|
||||
}
|
||||
|
||||
// We can have custom online icon
|
||||
if (isset($widgetsettings[$widgetid]['btn_icon_offline']) && !empty($widgetsettings[$widgetid]['btn_icon_offline'])) {
|
||||
$btn_off_icon = $widgetsettings[$widgetid]['btn_icon_offline'];
|
||||
}
|
||||
|
||||
// We can have custom online icon
|
||||
if (isset($widgetsettings[$widgetid]['btn_animation_offline']) && !empty($widgetsettings[$widgetid]['btn_animation_offline'])) {
|
||||
$btn_off_animate = $widgetsettings[$widgetid]['btn_animation_offline'];
|
||||
}
|
||||
|
||||
// We can have custom online colours
|
||||
if (isset($widgetsettings[$widgetid]['btn_icon_off_colour']) && !empty($widgetsettings[$widgetid]['btn_icon_off_colour']) || isset($widgetsettings[$widgetid]['btn_background_off_colour']) && !empty($widgetsettings[$widgetid]['btn_background_off_colour'])) {
|
||||
|
||||
$btn_off_custom .= 'style="';
|
||||
|
||||
if (isset($widgetsettings[$widgetid]['btn_icon_off_colour']) && !empty($widgetsettings[$widgetid]['btn_icon_off_colour'])) {
|
||||
$btn_off_custom .= 'color:#'.$widgetsettings[$widgetid]['btn_icon_off_colour'].';';
|
||||
}
|
||||
|
||||
if (isset($widgetsettings[$widgetid]['btn_background_off_colour']) && !empty($widgetsettings[$widgetid]['btn_background_off_colour'])) {
|
||||
$btn_off_custom .= 'background-color:#'.$widgetsettings[$widgetid]['btn_background_off_colour'].';"';
|
||||
}
|
||||
|
||||
$btn_off_custom .= '"';
|
||||
|
||||
}
|
||||
|
||||
// The html code to display
|
||||
$livecode_online = '<div id="lccontainersize" class="jak_roundbtn animate__animated '.$btn_on_animate.'">
|
||||
<button class="jaklcb_open left"'.$btn_on_custom.' type="button" id="lcjak_openchat">
|
||||
<i class="'.$btn_on_icon.' fa-lg"></i>
|
||||
</button>
|
||||
</div>';
|
||||
|
||||
$livecode_offline = '<div id="lccontainersize" class="jak_roundbtn animate__animated '.$btn_off_animate.'">
|
||||
<button class="jaklcb_open left offline"'.$btn_off_custom.' type="button" id="lcjak_openchat">
|
||||
<i class="'.$btn_off_icon.' fa-lg"></i>
|
||||
</button>
|
||||
</div>';
|
||||
|
||||
$livecode_hide = '<div id="lccontainersize" class="jak_hidewhenoff"></div>';
|
||||
|
||||
?>
|
||||
@@ -0,0 +1,148 @@
|
||||
<?php
|
||||
|
||||
/*===============================================*\
|
||||
|| ############################################# ||
|
||||
|| # JAKWEB.CH / Version 2.1.2 # ||
|
||||
|| # ----------------------------------------- # ||
|
||||
|| # Copyright 2023 JAKWEB All Rights Reserved # ||
|
||||
|| ############################################# ||
|
||||
\*===============================================*/
|
||||
|
||||
// Language file goes global
|
||||
global $jkl;
|
||||
|
||||
// Check the vars for this button
|
||||
$btn_on_icon = "far fa-comments-alt";
|
||||
$btn_off_icon = "far fa-envelope";
|
||||
$btn_on_animate = "animate__fadeIn";
|
||||
$btn_off_animate = "animate__fadeIn";
|
||||
$btn_on_custom = $btn_off_custom = "";
|
||||
|
||||
/* Leave a var empty if not in use or set to false */
|
||||
$wtplsett = array();
|
||||
|
||||
// Custom Settings
|
||||
$wtplsett["chatposition"] = "position:fixed;z-index:9999;bottom:0;right:0;";
|
||||
$wtplsett["customjs"] = "js/btn.js";
|
||||
$wtplsett["customcss"] = "";
|
||||
|
||||
// We only load when we need to receive messages
|
||||
if (isset($lcdrm) && $lcdrm === true) {
|
||||
$wtplsett["engagehtml"] = '<div class="jaklc_engage animate__animated animate__fadeIn">'.(isset($engimg) && !empty($engimg) ? '<p><img src="'.$engimg.'" alt="engage_img" max-width="100"></p>' : (isset($engicon) && !empty($engicon) ? '<p><i class="'.$engicon.' fa-lg"></i></p>' : '')).(isset($engtitle) && !empty($engtitle) ? '<h1>'.$engtitle.'</h1>' : '').'<p>'.(isset($engmsg) && !empty($engmsg) ? $engmsg : '').'</p><p><a href="javascript:void(0)" onclick="lcjak_openchat(this)" class="jakbtn btn-green btn-small btn-underline">'.(isset($engconfirm) && !empty($engconfirm) ? $engconfirm : $jkl['g72']).'</a> <a href="javascript:void(0)" onclick="lcjak_closechat(this)" class="jakbtn btn-red btn-small btn-underline">'.(isset($engcancel) && !empty($engcancel) ? $engcancel : $jkl['g73']).'</a></p></figcaption>';
|
||||
}
|
||||
|
||||
if (isset($page) && $page == "widget") {
|
||||
|
||||
/* Leave a var empty if not in use or set to false */
|
||||
$btnsett = array();
|
||||
|
||||
$btnsett["previewbtn"] = '<button style="width: 52px;height: 52px;color: #fff;background-color: #039af2;background-position: center center;background-repeat: no-repeat;box-shadow: 12px 15px 20px 0 rgba(46, 61, 73, 0.15);border: 0;border-radius: 50%;cursor: pointer;margin: 16px;" type="button" id="btn_preview">
|
||||
<i class="'.$btn_on_icon.' fa-lg" style="margin-top: 2px;"></i>
|
||||
</button>';
|
||||
|
||||
$btnsett["previewbtnmobile"] = '<button style="width: 52px;height: 52px;color: #fff;background-color: #B4B3B3;background-position: center center;background-repeat: no-repeat;box-shadow: 12px 15px 20px 0 rgba(46, 61, 73, 0.15);border: 0;border-radius: 50%;cursor: pointer;margin: 16px;" type="button" id="btn_preview_mobile">
|
||||
<i class="'.$btn_on_icon.' fa-lg" style="margin-top: 2px;"></i>
|
||||
</button>';
|
||||
|
||||
/* 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
|
||||
|
||||
*/
|
||||
|
||||
$btnsett["formoptions"] = array("1" => "1:#:".$jkl['cw10'].":#:icon:#:0:#:btn_icon", "2" => "1:#:".$jkl['cw11'].":#:colour:#:0:#:btn_icon_colour", "3" => "1:#:".$jkl['cw12'].":#:colour:#:0:#:btn_background_colour", "4" => "5:#:".$jkl['cw18'].":#:animate__fadeIn,animate__flash,animate__pulse,animate__headShake,animate__slideInUp,animate__slideInRight:#:0:#:btn_animation", "5" => "1:#:".$jkl['cw15'].":#:icon:#:0:#:btn_icon_offline", "6" => "1:#:".$jkl['cw16'].":#:colour:#:0:#:btn_icon_off_colour", "7" => "1:#:".$jkl['cw17'].":#:colour:#:0:#:btn_background_off_colour", "8" => "5:#:".$jkl['cw19'].":#:animate__fadeIn,animate__flash,animate__pulse,animate__headShake,animate__slideInUp,animate__slideInRight:#:0:#:btn_animation_offline");
|
||||
|
||||
}
|
||||
|
||||
// We can have custom online icon
|
||||
if (isset($widgetsettings[$widgetid]['btn_icon']) && !empty($widgetsettings[$widgetid]['btn_icon'])) {
|
||||
$btn_on_icon = $widgetsettings[$widgetid]['btn_icon'];
|
||||
}
|
||||
|
||||
// We can have custom online icon
|
||||
if (isset($widgetsettings[$widgetid]['btn_animation']) && !empty($widgetsettings[$widgetid]['btn_animation'])) {
|
||||
$btn_on_animate = $widgetsettings[$widgetid]['btn_animation'];
|
||||
}
|
||||
|
||||
// We can have custom online colours
|
||||
if (isset($widgetsettings[$widgetid]['btn_icon_colour']) && !empty($widgetsettings[$widgetid]['btn_icon_colour']) || isset($widgetsettings[$widgetid]['btn_background_colour']) && !empty($widgetsettings[$widgetid]['btn_background_colour'])) {
|
||||
|
||||
$btn_on_custom .= 'style="';
|
||||
|
||||
if (isset($widgetsettings[$widgetid]['btn_icon_colour']) && !empty($widgetsettings[$widgetid]['btn_icon_colour'])) {
|
||||
$btn_on_custom .= 'color:'.$widgetsettings[$widgetid]['btn_icon_colour'].';';
|
||||
}
|
||||
|
||||
if (isset($widgetsettings[$widgetid]['btn_background_colour']) && !empty($widgetsettings[$widgetid]['btn_background_colour'])) {
|
||||
$btn_on_custom .= 'background-color:'.$widgetsettings[$widgetid]['btn_background_colour'].';';
|
||||
}
|
||||
|
||||
$btn_on_custom .= '"';
|
||||
|
||||
}
|
||||
|
||||
// We can have custom online icon
|
||||
if (isset($widgetsettings[$widgetid]['btn_icon_offline']) && !empty($widgetsettings[$widgetid]['btn_icon_offline'])) {
|
||||
$btn_off_icon = $widgetsettings[$widgetid]['btn_icon_offline'];
|
||||
}
|
||||
|
||||
// We can have custom online icon
|
||||
if (isset($widgetsettings[$widgetid]['btn_animation_offline']) && !empty($widgetsettings[$widgetid]['btn_animation_offline'])) {
|
||||
$btn_off_animate = $widgetsettings[$widgetid]['btn_animation_offline'];
|
||||
}
|
||||
|
||||
// We can have custom online colours
|
||||
if (isset($widgetsettings[$widgetid]['btn_icon_off_colour']) && !empty($widgetsettings[$widgetid]['btn_icon_off_colour']) || isset($widgetsettings[$widgetid]['btn_background_off_colour']) && !empty($widgetsettings[$widgetid]['btn_background_off_colour'])) {
|
||||
|
||||
$btn_off_custom .= 'style="';
|
||||
|
||||
if (isset($widgetsettings[$widgetid]['btn_icon_off_colour']) && !empty($widgetsettings[$widgetid]['btn_icon_off_colour'])) {
|
||||
$btn_off_custom .= 'color:#'.$widgetsettings[$widgetid]['btn_icon_off_colour'].';';
|
||||
}
|
||||
|
||||
if (isset($widgetsettings[$widgetid]['btn_background_off_colour']) && !empty($widgetsettings[$widgetid]['btn_background_off_colour'])) {
|
||||
$btn_off_custom .= 'background-color:#'.$widgetsettings[$widgetid]['btn_background_off_colour'].';"';
|
||||
}
|
||||
|
||||
$btn_off_custom .= '"';
|
||||
|
||||
}
|
||||
|
||||
// The html code to display
|
||||
$livecode_online = '<div id="lccontainersize" class="jak_roundbtn animate__animated '.$btn_on_animate.'">
|
||||
<button class="jaklcb_open"'.$btn_on_custom.' type="button" id="lcjak_openchat">
|
||||
<i class="'.$btn_on_icon.' fa-lg"></i>
|
||||
</button>
|
||||
</div>';
|
||||
|
||||
$livecode_offline = '<div id="lccontainersize" class="jak_roundbtn animate__animated '.$btn_off_animate.'">
|
||||
<button class="jaklcb_open offline"'.$btn_off_custom.' type="button" id="lcjak_openchat">
|
||||
<i class="'.$btn_off_icon.' fa-lg"></i>
|
||||
</button>
|
||||
</div>';
|
||||
|
||||
$livecode_hide = '<div id="lccontainersize" class="jak_hidewhenoff"></div>';
|
||||
|
||||
?>
|
||||
@@ -0,0 +1,173 @@
|
||||
<?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/chat.js";
|
||||
$wtplsett["customcss"] = "";
|
||||
|
||||
// We only load when we need to receive messages
|
||||
if (isset($lcdrm) && $lcdrm === true) {
|
||||
$wtplsett["operatormsg"] = '<div class="lc_item lc_operator" id="postid_'.$row['id'].'">
|
||||
<div class="lc_avatar"><img src="'.$avaimg.'" alt="'.$row['name'].'"></div>
|
||||
<div class="lc_message" id="msg'.$row['id'].'">'.($row['quoted'] ? '<blockquote class="blockquote"><i class="fa fa-reply"></i> '.$quotemsg.'</blockquote>' : '').stripcslashes($message).(!empty(JAK_OPENAI_APIKEY) ? '<div class="chat_translation" id="aitranslate'.$row['id'].'"></div>' : '').'</div>
|
||||
<div class="lc_status"><i class="far fa-clock"></i> '.JAK_base::jakTimesince($row['time'], "", JAK_TIMEFORMAT).'<span id="edited_'.$row['id'].'">'.($row['editoid'] ? ' | <i class="fa fa-edit"></i> '.JAK_base::jakTimesince($row['edited'], "", JAK_TIMEFORMAT) : '').'</span>'.(!empty(JAK_OPENAI_APIKEY) ? ' <a href="javascript:" onclick="lcjak_translationAI('.$row['id'].')" class="translate-chat" data-id="'.$row['id'].'"><i class="fa fa-language"></i></a>' : '').'</div>
|
||||
</div>';
|
||||
$wtplsett["clientmsg"] = '<div class="lc_item lc_user" id="postid_'.$row['id'].'">
|
||||
<div class="lc_message" id="msg'.$row['id'].'">'.($row['quoted'] ? '<blockquote class="blockquote"><i class="fa fa-reply"></i> '.$quotemsg.'</blockquote>' : '').stripcslashes($message).'</div>
|
||||
<div class="lc_status"><i class="far fa-clock"></i> '.JAK_base::jakTimesince($row['time'], "", JAK_TIMEFORMAT).'<span id="edited_'.$row['id'].'">'.($row['editoid'] ? ' | <i class="fa fa-edit"></i> '.JAK_base::jakTimesince($row['edited'], "", JAK_TIMEFORMAT) : '').'</span></div>
|
||||
</div>';
|
||||
$wtplsett["infomsg"] = '<div class="lc_item lc_system" id="postid_'.$row['id'].'">
|
||||
<div class="lc_message" id="msg'.$row['id'].'">'.stripcslashes($message).'</div>
|
||||
<div class="lc_status"><i class="far fa-clock"></i> '.JAK_base::jakTimesince($row['time'], "", JAK_TIMEFORMAT).'</div>
|
||||
</div>';
|
||||
$wtplsett["download"] = '<div class="lc_item lc_download" id="postid_'.$row['id'].'">
|
||||
<div class="lc_message" id="msg'.$row['id'].'">'.stripcslashes($message).'</div>
|
||||
<div class="lc_status"><i class="far fa-clock"></i> '.JAK_base::jakTimesince($row['time'], "", JAK_TIMEFORMAT).'</div>
|
||||
</div>';
|
||||
$wtplsett["chatbot"] = '<div class="lc_item lc_bot" id="postid_'.(isset($lastid) ? $lastid : 0).'">
|
||||
<div class="lc_message" id="msg'.(isset($lastid) ? $lastid : 0).'">'.(isset($message) ? stripcslashes($message) : '').'</div>
|
||||
<div class="lc_status"><i class="far fa-clock"></i> '.JAK_base::jakTimesince(date('Y-m-d H:i:s'), "", JAK_TIMEFORMAT).'</div>
|
||||
</div>';
|
||||
}
|
||||
|
||||
// We only load when we have new messages
|
||||
if (isset($lcdnm) && $lcdnm === true) {
|
||||
/* Chat Design bot */
|
||||
$wtplsett["chatbotinsert"] = '<div class="lc_item lc_bot" id="postid_'.(isset($lastidbot) ? $lastidbot : 0).'">
|
||||
<div class="lc_message" id="msg'.(isset($lastidbot) ? $lastidbot : 0).'">'.(isset($botdisp) ? stripcslashes($botdisp) : '').'</div>
|
||||
<div class="lc_status"><i class="far fa-clock"></i> '.JAK_base::jakTimesince(date('Y-m-d H:i:s'), "", JAK_TIMEFORMAT).'</div>
|
||||
</div>';
|
||||
|
||||
/* Chat Design Insert */
|
||||
$wtplsett["chatinsert"] = '<div class="lc_item lc_user" id="postid_'.(isset($lastid) ? $lastid : 0).'">
|
||||
<div class="lc_message" id="groupmsg'.(isset($lastid) ? $lastid : 0).'"><span id="msg'.(isset($lastid) ? $lastid : 0).'">'.(isset($messagedisp) ? stripcslashes($messagedisp) : '').'</span></div>
|
||||
<div class="lc_status"><i class="far fa-clock"></i> '.JAK_base::jakTimesince(date('Y-m-d H:i:s'), "", JAK_TIMEFORMAT).'</div>
|
||||
</div>';
|
||||
|
||||
/* Chat Design Insert ended */
|
||||
$wtplsett["chatinsertended"] = '<div class="lc_item lc_system" id="postid_'.(isset($lastid) ? $lastid : 0).'">
|
||||
<div class="lc_message" id="msg'.(isset($lastid) ? $lastid : 0).'">'.(isset($message) ? stripcslashes($message) : '').'</div>
|
||||
<div class="lc_status"><i class="far fa-clock"></i> '.JAK_base::jakTimesince(date('Y-m-d H:i:s'), "", JAK_TIMEFORMAT).'</div>
|
||||
</div>';
|
||||
}
|
||||
|
||||
// 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 */
|
||||
$chatsett = array();
|
||||
|
||||
$chatsett["previewchat"] = "preview/chat.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
|
||||
|
||||
*/
|
||||
|
||||
$chatsett["formoptions"] = array("1" => "5:#:".$jkl['cw22'].":#:blue,green,orange,red,pink,grey:#:0:#:chat_colour_theme", "2" => "5:#:".$jkl['cw23'].":#:animate__fadeIn,animate__flash,animate__pulse,animate__headShake,animate__slideInUp,animate__slideInRight:#:0:#:chat_animation");
|
||||
|
||||
} else {
|
||||
|
||||
// Check the vars for this start
|
||||
$chat_animate = "animate__fadeIn";
|
||||
$chat_custom = "";
|
||||
$chat_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['chat_animation']) && !empty($widgetsettings['chat_animation'])) {
|
||||
$chat_animate = $widgetsettings['chat_animation'];
|
||||
}
|
||||
|
||||
// We can have custom online icon
|
||||
if (isset($widgetsettings['chat_colour_theme']) && !empty($widgetsettings['chat_colour_theme']) && $widgetsettings['chat_colour_theme'] != "blue") {
|
||||
$chat_custom = " ".$widgetsettings['chat_colour_theme'];
|
||||
}
|
||||
|
||||
// Let's get the header connecting message
|
||||
$headermsg = $jkl['g59'];
|
||||
|
||||
// We only go big
|
||||
$livecode = '<div id="lccontainersize" class="jak_chatopen_panel'.(isset($ismobile) ? $ismobile : '').' animate__animated '.$chat_animate.'">
|
||||
<form id="lcjak_ajaxform" method="post" action="'.$_SERVER['REQUEST_URI'].'">
|
||||
<section class="jaklcb_panel left'.$chat_custom.'">
|
||||
<header class="jaklcb_panel_header">
|
||||
<aside style="flex:3" id="jaklcb_oimage">'.$chat_logo.'
|
||||
</aside>
|
||||
<aside style="flex:5">
|
||||
<h1 id="jaklcb_oname">'.$jakwidget['title'].'</h1>
|
||||
<h5 id="jaklcb_oabout">'.$headermsg.'</h5>
|
||||
</aside>
|
||||
<aside style="flex:4;text-align:right;">
|
||||
<button class="jaklcb_profilesm lcb_profile" onclick="lcjak_profilebig()" type="button"><i class="far fa-id-card-alt"></i></button>
|
||||
<button class="jaklcb_endsm lcb_end" onclick="lcjak_endchatbig()" type="button"><i class="fas fa-power-off"></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="lc_messages">
|
||||
</main>
|
||||
<div id="lc_typing" class="lc_typing"><div class="dot-pulse"></div></div>
|
||||
<div id="ai-thinking"></div>
|
||||
<footer class="jaklcb_panel_footer">
|
||||
<aside class="jaklcb_start_extra">
|
||||
<i class="fa fa-camera dropzone animate__animated" id="cUploadDrop"></i>
|
||||
<i class="fa fa-smile emoticons" id="emoticons"></i>
|
||||
<div class="emoticons_btn animate__animated" id="emoticons_btn">
|
||||
<span class="icon1"><i class="fa fa-smile fa-lg" onclick="sendEmo(\':slight_smile:\')"></i></span>
|
||||
<span class="icon2"><i class="fa fa-laugh fa-lg" onclick="sendEmo(\':smile:\')"></i></span>
|
||||
<span class="icon3"><i class="fa fa-smile-wink fa-lg" onclick="sendEmo(\':wink:\')"></i></span>
|
||||
<span class="icon4"><i class="fa fa-frown fa-lg" onclick="sendEmo(\':frowning:\')"></i></span>
|
||||
<span class="icon5"><i class="fa fa-sad-tear fa-lg" onclick="sendEmo(\':cry:\')"></i></span>
|
||||
<span class="icon6"><i class="fa fa-heart fa-lg" onclick="sendEmo(\':heart:\')"></i></span>
|
||||
</div>
|
||||
</aside>
|
||||
<aside class="jaklcb_start_message">
|
||||
<textarea type="text" name="lc_chat_msg" id="lc_chat_msg" placeholder="'.$jkl["g6"].'"></textarea>
|
||||
</aside>
|
||||
<aside class="jaklcb_start_chat">
|
||||
<button id="lc_send_msg" type="submit"><i class="fa fa-paper-plane" id="lc_msg_load"></i></button>
|
||||
</aside>
|
||||
</footer>
|
||||
</section>
|
||||
<input type="hidden" name="allowedFiles" id="allowedFiles" value="'.JAK_ALLOWED_FILES.'">
|
||||
</form>
|
||||
</div>';
|
||||
}
|
||||
?>
|
||||
@@ -0,0 +1,173 @@
|
||||
<?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/chat.js";
|
||||
$wtplsett["customcss"] = "";
|
||||
|
||||
// We only load when we need to receive messages
|
||||
if (isset($lcdrm) && $lcdrm === true) {
|
||||
$wtplsett["operatormsg"] = '<div class="lc_item lc_operator" id="postid_'.$row['id'].'">
|
||||
<div class="lc_avatar"><img src="'.$avaimg.'" alt="'.$row['name'].'"></div>
|
||||
<div class="lc_message" id="msg'.$row['id'].'">'.($row['quoted'] ? '<blockquote class="blockquote"><i class="fa fa-reply"></i> '.$quotemsg.'</blockquote>' : '').stripcslashes($message).(!empty(JAK_OPENAI_APIKEY) ? '<div class="chat_translation" id="aitranslate'.$row['id'].'"></div>' : '').'</div>
|
||||
<div class="lc_status"><i class="far fa-clock"></i> '.JAK_base::jakTimesince($row['time'], "", JAK_TIMEFORMAT).'<span id="edited_'.$row['id'].'">'.($row['editoid'] ? ' | <i class="fa fa-edit"></i> '.JAK_base::jakTimesince($row['edited'], "", JAK_TIMEFORMAT) : '').'</span>'.(!empty(JAK_OPENAI_APIKEY) ? ' <a href="javascript:" onclick="lcjak_translationAI('.$row['id'].')" class="translate-chat" data-id="'.$row['id'].'"><i class="fa fa-language"></i></a>' : '').'</div>
|
||||
</div>';
|
||||
$wtplsett["clientmsg"] = '<div class="lc_item lc_user" id="postid_'.$row['id'].'">
|
||||
<div class="lc_message" id="msg'.$row['id'].'">'.($row['quoted'] ? '<blockquote class="blockquote"><i class="fa fa-reply"></i> '.$quotemsg.'</blockquote>' : '').stripcslashes($message).'</div>
|
||||
<div class="lc_status"><i class="far fa-clock"></i> '.JAK_base::jakTimesince($row['time'], "", JAK_TIMEFORMAT).'<span id="edited_'.$row['id'].'">'.($row['editoid'] ? ' | <i class="fa fa-edit"></i> '.JAK_base::jakTimesince($row['edited'], "", JAK_TIMEFORMAT) : '').'</span></div>
|
||||
</div>';
|
||||
$wtplsett["infomsg"] = '<div class="lc_item lc_system" id="postid_'.$row['id'].'">
|
||||
<div class="lc_message" id="msg'.$row['id'].'">'.stripcslashes($message).'</div>
|
||||
<div class="lc_status"><i class="far fa-clock"></i> '.JAK_base::jakTimesince($row['time'], "", JAK_TIMEFORMAT).'</div>
|
||||
</div>';
|
||||
$wtplsett["download"] = '<div class="lc_item lc_download" id="postid_'.$row['id'].'">
|
||||
<div class="lc_message" id="msg'.$row['id'].'">'.stripcslashes($message).'</div>
|
||||
<div class="lc_status"><i class="far fa-clock"></i> '.JAK_base::jakTimesince($row['time'], "", JAK_TIMEFORMAT).'</div>
|
||||
</div>';
|
||||
$wtplsett["chatbot"] = '<div class="lc_item lc_bot" id="postid_'.(isset($lastid) ? $lastid : 0).'">
|
||||
<div class="lc_message" id="msg'.(isset($lastid) ? $lastid : 0).'">'.(isset($message) ? stripcslashes($message) : '').'</div>
|
||||
<div class="lc_status"><i class="far fa-clock"></i> '.JAK_base::jakTimesince(date('Y-m-d H:i:s'), "", JAK_TIMEFORMAT).'</div>
|
||||
</div>';
|
||||
}
|
||||
|
||||
// We only load when we have new messages
|
||||
if (isset($lcdnm) && $lcdnm === true) {
|
||||
/* Chat Design bot */
|
||||
$wtplsett["chatbotinsert"] = '<div class="lc_item lc_bot" id="postid_'.(isset($lastidbot) ? $lastidbot : 0).'">
|
||||
<div class="lc_message" id="msg'.(isset($lastidbot) ? $lastidbot : 0).'">'.(isset($botdisp) ? stripcslashes($botdisp) : '').'</div>
|
||||
<div class="lc_status"><i class="far fa-clock"></i> '.JAK_base::jakTimesince(date('Y-m-d H:i:s'), "", JAK_TIMEFORMAT).'</div>
|
||||
</div>';
|
||||
|
||||
/* Chat Design Insert */
|
||||
$wtplsett["chatinsert"] = '<div class="lc_item lc_user" id="postid_'.(isset($lastid) ? $lastid : 0).'">
|
||||
<div class="lc_message" id="groupmsg'.(isset($lastid) ? $lastid : 0).'"><span id="msg'.(isset($lastid) ? $lastid : 0).'">'.(isset($messagedisp) ? stripcslashes($messagedisp) : '').'</span></div>
|
||||
<div class="lc_status"><i class="far fa-clock"></i> '.JAK_base::jakTimesince(date('Y-m-d H:i:s'), "", JAK_TIMEFORMAT).'</div>
|
||||
</div>';
|
||||
|
||||
/* Chat Design Insert ended */
|
||||
$wtplsett["chatinsertended"] = '<div class="lc_item lc_system" id="postid_'.(isset($lastid) ? $lastid : 0).'">
|
||||
<div class="lc_message" id="msg'.(isset($lastid) ? $lastid : 0).'">'.(isset($message) ? stripcslashes($message) : '').'</div>
|
||||
<div class="lc_status"><i class="far fa-clock"></i> '.JAK_base::jakTimesince(date('Y-m-d H:i:s'), "", JAK_TIMEFORMAT).'</div>
|
||||
</div>';
|
||||
}
|
||||
|
||||
// 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 */
|
||||
$chatsett = array();
|
||||
|
||||
$chatsett["previewchat"] = "preview/chat.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
|
||||
|
||||
*/
|
||||
|
||||
$chatsett["formoptions"] = array("1" => "5:#:".$jkl['cw22'].":#:blue,green,orange,red,pink,grey:#:0:#:chat_colour_theme", "2" => "5:#:".$jkl['cw23'].":#:animate__fadeIn,animate__flash,animate__pulse,animate__headShake,animate__slideInUp,animate__slideInRight:#:0:#:chat_animation");
|
||||
|
||||
} else {
|
||||
|
||||
// Check the vars for this start
|
||||
$chat_animate = "animate__fadeIn";
|
||||
$chat_custom = "";
|
||||
$chat_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['chat_animation']) && !empty($widgetsettings['chat_animation'])) {
|
||||
$chat_animate = $widgetsettings['chat_animation'];
|
||||
}
|
||||
|
||||
// We can have custom online icon
|
||||
if (isset($widgetsettings['chat_colour_theme']) && !empty($widgetsettings['chat_colour_theme']) && $widgetsettings['chat_colour_theme'] != "blue") {
|
||||
$chat_custom = " ".$widgetsettings['chat_colour_theme'];
|
||||
}
|
||||
|
||||
// Let's get the header connecting message
|
||||
$headermsg = $jkl['g59'];
|
||||
|
||||
// We only go big
|
||||
$livecode = '<div id="lccontainersize" class="jak_chatopen_panel'.(isset($ismobile) ? $ismobile : '').' animate__animated '.$chat_animate.'">
|
||||
<form id="lcjak_ajaxform" method="post" action="'.$_SERVER['REQUEST_URI'].'">
|
||||
<section class="jaklcb_panel'.$chat_custom.'">
|
||||
<header class="jaklcb_panel_header">
|
||||
<aside style="flex:3" id="jaklcb_oimage">'.$chat_logo.'
|
||||
</aside>
|
||||
<aside style="flex:5">
|
||||
<h1 id="jaklcb_oname">'.$jakwidget['title'].'</h1>
|
||||
<h5 id="jaklcb_oabout">'.$headermsg.'</h5>
|
||||
</aside>
|
||||
<aside style="flex:4;text-align:right;">
|
||||
<button class="jaklcb_profilesm lcb_profile" onclick="lcjak_profilebig()" type="button"><i class="far fa-id-card-alt"></i></button>
|
||||
<button class="jaklcb_endsm lcb_end" onclick="lcjak_endchatbig()" type="button"><i class="fas fa-power-off"></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="lc_messages">
|
||||
</main>
|
||||
<div id="lc_typing" class="lc_typing"><div class="dot-pulse"></div></div>
|
||||
<div id="ai-thinking"></div>
|
||||
<footer class="jaklcb_panel_footer">
|
||||
<aside class="jaklcb_start_extra">
|
||||
<i class="fa fa-camera dropzone animate__animated" id="cUploadDrop"></i>
|
||||
<i class="fa fa-smile emoticons" id="emoticons"></i>
|
||||
<div class="emoticons_btn animate__animated" id="emoticons_btn">
|
||||
<span class="icon1"><i class="fa fa-smile fa-lg" onclick="sendEmo(\':slight_smile:\')"></i></span>
|
||||
<span class="icon2"><i class="fa fa-laugh fa-lg" onclick="sendEmo(\':smile:\')"></i></span>
|
||||
<span class="icon3"><i class="fa fa-smile-wink fa-lg" onclick="sendEmo(\':wink:\')"></i></span>
|
||||
<span class="icon4"><i class="fa fa-frown fa-lg" onclick="sendEmo(\':frowning:\')"></i></span>
|
||||
<span class="icon5"><i class="fa fa-sad-tear fa-lg" onclick="sendEmo(\':cry:\')"></i></span>
|
||||
<span class="icon6"><i class="fa fa-heart fa-lg" onclick="sendEmo(\':heart:\')"></i></span>
|
||||
</div>
|
||||
</aside>
|
||||
<aside class="jaklcb_start_message">
|
||||
<textarea type="text" name="lc_chat_msg" id="lc_chat_msg" placeholder="'.$jkl["g6"].'"></textarea>
|
||||
</aside>
|
||||
<aside class="jaklcb_start_chat">
|
||||
<button id="lc_send_msg" type="submit"><i class="fa fa-paper-plane" id="lc_msg_load"></i></button>
|
||||
</aside>
|
||||
</footer>
|
||||
</section>
|
||||
<input type="hidden" name="allowedFiles" id="allowedFiles" value="'.JAK_ALLOWED_FILES.'">
|
||||
</form>
|
||||
</div>';
|
||||
}
|
||||
?>
|
||||
@@ -0,0 +1,229 @@
|
||||
<?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/chat.js";
|
||||
$wtplsett["customcss"] = "";
|
||||
|
||||
// We only load when we need to receive messages
|
||||
if (isset($lcdrm) && $lcdrm === true) {
|
||||
$wtplsett["operatormsg"] = '<div class="lc_item lc_operator" id="postid_'.$row['id'].'">
|
||||
<div class="lc_avatar"><img src="'.$avaimg.'" alt="'.$row['name'].'"></div>
|
||||
<div class="lc_message" id="msg'.$row['id'].'">'.($row['quoted'] ? '<blockquote class="blockquote"><i class="fa fa-reply"></i> '.$quotemsg.'</blockquote>' : '').stripcslashes($message).(!empty(JAK_OPENAI_APIKEY) ? '<div class="chat_translation" id="aitranslate'.$row['id'].'"></div>' : '').'</div>
|
||||
<div class="lc_status"><i class="far fa-clock"></i> '.JAK_base::jakTimesince($row['time'], "", JAK_TIMEFORMAT).'<span id="edited_'.$row['id'].'">'.($row['editoid'] ? ' | <i class="fa fa-edit"></i> '.JAK_base::jakTimesince($row['edited'], "", JAK_TIMEFORMAT) : '').'</span>'.(!empty(JAK_OPENAI_APIKEY) ? ' <a href="javascript:" onclick="lcjak_translationAI('.$row['id'].')" class="translate-chat" data-id="'.$row['id'].'"><i class="fa fa-language"></i></a>' : '').'</div>
|
||||
</div>';
|
||||
$wtplsett["clientmsg"] = '<div class="lc_item lc_user" id="postid_'.$row['id'].'">
|
||||
<div class="lc_message" id="msg'.$row['id'].'">'.($row['quoted'] ? '<blockquote class="blockquote"><i class="fa fa-reply"></i> '.$quotemsg.'</blockquote>' : '').stripcslashes($message).'</div>
|
||||
<div class="lc_status"><i class="far fa-clock"></i> '.JAK_base::jakTimesince($row['time'], "", JAK_TIMEFORMAT).'<span id="edited_'.$row['id'].'">'.($row['editoid'] ? ' | <i class="fa fa-edit"></i> '.JAK_base::jakTimesince($row['edited'], "", JAK_TIMEFORMAT) : '').'</span></div>
|
||||
</div>';
|
||||
$wtplsett["infomsg"] = '<div class="lc_item lc_system" id="postid_'.$row['id'].'">
|
||||
<div class="lc_message" id="msg'.$row['id'].'">'.stripcslashes($message).'</div>
|
||||
<div class="lc_status"><i class="far fa-clock"></i> '.JAK_base::jakTimesince($row['time'], "", JAK_TIMEFORMAT).'</div>
|
||||
</div>';
|
||||
$wtplsett["download"] = '<div class="lc_item lc_download" id="postid_'.$row['id'].'">
|
||||
<div class="lc_message" id="msg'.$row['id'].'">'.stripcslashes($message).'</div>
|
||||
<div class="lc_status"><i class="far fa-clock"></i> '.JAK_base::jakTimesince($row['time'], "", JAK_TIMEFORMAT).'</div>
|
||||
</div>';
|
||||
$wtplsett["chatbot"] = '<div class="lc_item lc_bot" id="postid_'.(isset($lastid) ? $lastid : 0).'">
|
||||
<div class="lc_message" id="msg'.(isset($lastid) ? $lastid : 0).'">'.(isset($message) ? stripcslashes($message) : '').'</div>
|
||||
<div class="lc_status"><i class="far fa-clock"></i> '.JAK_base::jakTimesince(date('Y-m-d H:i:s'), "", JAK_TIMEFORMAT).'</div>
|
||||
</div>';
|
||||
}
|
||||
|
||||
// We only load when we have new messages
|
||||
if (isset($lcdnm) && $lcdnm === true) {
|
||||
/* Chat Design bot */
|
||||
$wtplsett["chatbotinsert"] = '<div class="lc_item lc_bot" id="postid_'.(isset($lastidbot) ? $lastidbot : 0).'">
|
||||
<div class="lc_message" id="msg'.(isset($lastidbot) ? $lastidbot : 0).'">'.(isset($botdisp) ? stripcslashes($botdisp) : '').'</div>
|
||||
<div class="lc_status"><i class="far fa-clock"></i> '.JAK_base::jakTimesince(date('Y-m-d H:i:s'), "", JAK_TIMEFORMAT).'</div>
|
||||
</div>';
|
||||
|
||||
/* Chat Design Insert */
|
||||
$wtplsett["chatinsert"] = '<div class="lc_item lc_user" id="postid_'.(isset($lastid) ? $lastid : 0).'">
|
||||
<div class="lc_message" id="groupmsg'.(isset($lastid) ? $lastid : 0).'"><span id="msg'.(isset($lastid) ? $lastid : 0).'">'.(isset($messagedisp) ? stripcslashes($messagedisp) : '').'</span></div>
|
||||
<div class="lc_status"><i class="far fa-clock"></i> '.JAK_base::jakTimesince(date('Y-m-d H:i:s'), "", JAK_TIMEFORMAT).'</div>
|
||||
</div>';
|
||||
|
||||
/* Chat Design Insert ended */
|
||||
$wtplsett["chatinsertended"] = '<div class="lc_item lc_system" id="postid_'.(isset($lastid) ? $lastid : 0).'">
|
||||
<div class="lc_message" id="msg'.(isset($lastid) ? $lastid : 0).'">'.(isset($message) ? stripcslashes($message) : '').'</div>
|
||||
<div class="lc_status"><i class="far fa-clock"></i> '.JAK_base::jakTimesince(date('Y-m-d H:i:s'), "", JAK_TIMEFORMAT).'</div>
|
||||
</div>';
|
||||
}
|
||||
|
||||
// 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 */
|
||||
$chatsett = array();
|
||||
|
||||
$chatsett["previewchat"] = "preview/chat.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
|
||||
|
||||
*/
|
||||
|
||||
$chatsett["formoptions"] = array("1" => "5:#:".$jkl['cw22'].":#:blue,green,orange,red,pink,grey:#:0:#:chat_colour_theme", "2" => "5:#:".$jkl['cw23'].":#:animate__fadeIn,animate__flash,animate__pulse,animate__headShake,animate__slideInUp,animate__slideInRight:#:0:#:chat_animation");
|
||||
|
||||
} else {
|
||||
|
||||
// Check the vars for this start
|
||||
$chat_animate = "animate__fadeIn";
|
||||
$chat_custom = "";
|
||||
$chat_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]['chat_animation']) && !empty($widgetsettings[$widgetid]['chat_animation'])) {
|
||||
$chat_animate = $widgetsettings[$widgetid]['chat_animation'];
|
||||
}
|
||||
|
||||
// We can have custom online icon
|
||||
if (isset($widgetsettings[$widgetid]['chat_colour_theme']) && !empty($widgetsettings[$widgetid]['chat_colour_theme']) && $widgetsettings[$widgetid]['chat_colour_theme'] != "blue") {
|
||||
$chat_custom = " ".$widgetsettings[$widgetid]['chat_colour_theme'];
|
||||
}
|
||||
|
||||
// Let's get the header connecting message
|
||||
$headermsg = $jkl['g59'];
|
||||
|
||||
if (isset($page1) && $page1 == "big") {
|
||||
|
||||
$livecode = '<div id="lccontainersize" class="jak_chatopen_panel'.(isset($ismobile) ? $ismobile : '').' animate__animated '.$chat_animate.'">
|
||||
<form id="lcjak_ajaxform" method="post" action="'.$_SERVER['REQUEST_URI'].'">
|
||||
<section class="jaklcb_panel left'.$chat_custom.'">
|
||||
<header class="jaklcb_panel_header">
|
||||
<aside style="flex:3" id="jaklcb_oimage">'.$chat_logo.'
|
||||
</aside>
|
||||
<aside style="flex:5">
|
||||
<h1 id="jaklcb_oname">'.$jakwidget[$widgetid]['title'].'</h1>
|
||||
<h5 id="jaklcb_oabout">'.$headermsg.'</h5>
|
||||
</aside>
|
||||
<aside style="flex:4;text-align:right;">
|
||||
<button class="jaklcb_minimize" onclick="lcjak_smallchat()" type="button"><i class="fa fa-window-restore"></i></button>
|
||||
<button class="jaklcb_profilesm lcb_profile" onclick="lcjak_profilebig()" type="button"><i class="far fa-id-card-alt"></i></button>
|
||||
<button class="jaklcb_endsm lcb_end" onclick="lcjak_endchatbig()" type="button"><i class="fas fa-power-off"></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="lc_messages">
|
||||
</main>
|
||||
<div id="lc_typing" class="lc_typing"><div class="dot-pulse"></div></div>
|
||||
<div id="ai-thinking"></div>
|
||||
<footer class="jaklcb_panel_footer">
|
||||
<aside class="jaklcb_start_extra">
|
||||
<i class="fa fa-camera dropzone animate__animated" id="cUploadDrop"></i>
|
||||
<i class="fa fa-smile emoticons" id="emoticons"></i>
|
||||
<div class="emoticons_btn animate__animated" id="emoticons_btn">
|
||||
<span class="icon1"><i class="fa fa-smile fa-lg" onclick="sendEmo(\':slight_smile:\')"></i></span>
|
||||
<span class="icon2"><i class="fa fa-laugh fa-lg" onclick="sendEmo(\':smile:\')"></i></span>
|
||||
<span class="icon3"><i class="fa fa-smile-wink fa-lg" onclick="sendEmo(\':wink:\')"></i></span>
|
||||
<span class="icon4"><i class="fa fa-frown fa-lg" onclick="sendEmo(\':frowning:\')"></i></span>
|
||||
<span class="icon5"><i class="fa fa-sad-tear fa-lg" onclick="sendEmo(\':cry:\')"></i></span>
|
||||
<span class="icon6"><i class="fa fa-heart fa-lg" onclick="sendEmo(\':heart:\')"></i></span>
|
||||
</div>
|
||||
</aside>
|
||||
<aside class="jaklcb_start_message">
|
||||
<textarea type="text" name="lc_chat_msg" id="lc_chat_msg" placeholder="'.$jkl["g60"].'"></textarea>
|
||||
</aside>
|
||||
<aside class="jaklcb_start_chat">
|
||||
<button id="lc_send_msg" type="submit"><i class="fa fa-paper-plane" id="lc_msg_load"></i></button>
|
||||
</aside>
|
||||
</footer>
|
||||
</section>
|
||||
<input type="hidden" name="allowedFiles" id="allowedFiles" value="'.JAK_ALLOWED_FILES.'">
|
||||
</form>
|
||||
</div>';
|
||||
|
||||
} else {
|
||||
|
||||
$livecode = '<div id="lccontainersize" class="jak_chatopen_sm'.(isset($ismobile) ? $ismobile : '').' animate__animated '.$chat_animate.'">
|
||||
<button class="jaklcb_profile left lcb_profile" onclick="lcjak_profile()">
|
||||
<i class="far fa-id-card-alt"></i>
|
||||
</button>
|
||||
<button class="jaklcb_end left lcb_end" onclick="lcjak_endchat()">
|
||||
<i class="fas fa-power-off"></i>
|
||||
</button>
|
||||
<button class="jaklcb_close left lcb_close" onclick="lcjak_closechat()">
|
||||
<i class="fa fa-times"></i>
|
||||
</button>
|
||||
<form id="lcjak_ajaxform" method="post" action="'.$_SERVER['REQUEST_URI'].'">
|
||||
<section class="jaklcb_popup'.$chat_custom.'">
|
||||
<header class="jaklcb_popup_header">
|
||||
<aside style="flex:3" id="jaklcb_oimage">'.$chat_logo.'
|
||||
</aside>
|
||||
<aside style="flex:8">
|
||||
<h1 id="jaklcb_oname">'.$jakwidget[$widgetid]['title'].'</h1>
|
||||
<h5 id="jaklcb_oabout">'.$headermsg.'</h5>
|
||||
</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_popup_main" id="lc_messages">
|
||||
</main>
|
||||
<div id="lc_typing" class="lc_typing"><div class="dot-pulse"></div></div>
|
||||
<div id="ai-thinking"></div>
|
||||
<footer class="jaklcb_popup_footer">
|
||||
<aside class="jaklcb_start_extra">
|
||||
<i class="fa fa-camera dropzone animate__animated" id="cUploadDrop"></i>
|
||||
<i class="fa fa-smile emoticons" id="emoticons"></i>
|
||||
<div class="emoticons_btn animate__animated" id="emoticons_btn">
|
||||
<span class="icon1"><i class="fa fa-smile fa-lg" onclick="sendEmo(\':slight_smile:\')"></i></span>
|
||||
<span class="icon2"><i class="fa fa-laugh fa-lg" onclick="sendEmo(\':smile:\')"></i></span>
|
||||
<span class="icon3"><i class="fa fa-smile-wink fa-lg" onclick="sendEmo(\':wink:\')"></i></span>
|
||||
<span class="icon4"><i class="fa fa-frown fa-lg" onclick="sendEmo(\':frowning:\')"></i></span>
|
||||
<span class="icon5"><i class="fa fa-sad-tear fa-lg" onclick="sendEmo(\':cry:\')"></i></span>
|
||||
<span class="icon6"><i class="fa fa-heart fa-lg" onclick="sendEmo(\':heart:\')"></i></span>
|
||||
</div>
|
||||
</aside>
|
||||
<aside class="jaklcb_start_message">
|
||||
<textarea type="text" name="lc_chat_msg" id="lc_chat_msg" placeholder="'.$jkl["g60"].'"></textarea>
|
||||
</aside>
|
||||
<aside class="jaklcb_start_chat">
|
||||
<button id="lc_send_msg" type="submit"><i class="fa fa-paper-plane" id="lc_msg_load"></i></button>
|
||||
</aside>
|
||||
</footer>
|
||||
</section>
|
||||
<input type="hidden" name="allowedFiles" id="allowedFiles" value="'.JAK_ALLOWED_FILES.'">
|
||||
</form>
|
||||
</div>';
|
||||
} }
|
||||
?>
|
||||
@@ -0,0 +1,229 @@
|
||||
<?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/chat.js";
|
||||
$wtplsett["customcss"] = "";
|
||||
|
||||
// We only load when we need to receive messages
|
||||
if (isset($lcdrm) && $lcdrm === true) {
|
||||
$wtplsett["operatormsg"] = '<div class="lc_item lc_operator" id="postid_'.$row['id'].'">
|
||||
<div class="lc_avatar"><img src="'.$avaimg.'" alt="'.$row['name'].'"></div>
|
||||
<div class="lc_message" id="msg'.$row['id'].'">'.($row['quoted'] ? '<blockquote class="blockquote"><i class="fa fa-reply"></i> '.$quotemsg.'</blockquote>' : '').stripcslashes($message).(!empty(JAK_OPENAI_APIKEY) ? '<div class="chat_translation" id="aitranslate'.$row['id'].'"></div>' : '').'</div>
|
||||
<div class="lc_status"><i class="far fa-clock"></i> '.JAK_base::jakTimesince($row['time'], "", JAK_TIMEFORMAT).'<span id="edited_'.$row['id'].'">'.($row['editoid'] ? ' | <i class="fa fa-edit"></i> '.JAK_base::jakTimesince($row['edited'], "", JAK_TIMEFORMAT) : '').'</span>'.(!empty(JAK_OPENAI_APIKEY) ? ' <a href="javascript:" onclick="lcjak_translationAI('.$row['id'].')" class="translate-chat" data-id="'.$row['id'].'"><i class="fa fa-language"></i></a>' : '').'</div>
|
||||
</div>';
|
||||
$wtplsett["clientmsg"] = '<div class="lc_item lc_user" id="postid_'.$row['id'].'">
|
||||
<div class="lc_message" id="msg'.$row['id'].'">'.($row['quoted'] ? '<blockquote class="blockquote"><i class="fa fa-reply"></i> '.$quotemsg.'</blockquote>' : '').stripcslashes($message).'</div>
|
||||
<div class="lc_status"><i class="far fa-clock"></i> '.JAK_base::jakTimesince($row['time'], "", JAK_TIMEFORMAT).'<span id="edited_'.$row['id'].'">'.($row['editoid'] ? ' | <i class="fa fa-edit"></i> '.JAK_base::jakTimesince($row['edited'], "", JAK_TIMEFORMAT) : '').'</span></div>
|
||||
</div>';
|
||||
$wtplsett["infomsg"] = '<div class="lc_item lc_system" id="postid_'.$row['id'].'">
|
||||
<div class="lc_message" id="msg'.$row['id'].'">'.stripcslashes($message).'</div>
|
||||
<div class="lc_status"><i class="far fa-clock"></i> '.JAK_base::jakTimesince($row['time'], "", JAK_TIMEFORMAT).'</div>
|
||||
</div>';
|
||||
$wtplsett["download"] = '<div class="lc_item lc_download" id="postid_'.$row['id'].'">
|
||||
<div class="lc_message" id="msg'.$row['id'].'">'.stripcslashes($message).'</div>
|
||||
<div class="lc_status"><i class="far fa-clock"></i> '.JAK_base::jakTimesince($row['time'], "", JAK_TIMEFORMAT).'</div>
|
||||
</div>';
|
||||
$wtplsett["chatbot"] = '<div class="lc_item lc_bot" id="postid_'.(isset($lastid) ? $lastid : 0).'">
|
||||
<div class="lc_message" id="msg'.(isset($lastid) ? $lastid : 0).'">'.(isset($message) ? stripcslashes($message) : '').'</div>
|
||||
<div class="lc_status"><i class="far fa-clock"></i> '.JAK_base::jakTimesince(date('Y-m-d H:i:s'), "", JAK_TIMEFORMAT).'</div>
|
||||
</div>';
|
||||
}
|
||||
|
||||
// We only load when we have new messages
|
||||
if (isset($lcdnm) && $lcdnm === true) {
|
||||
/* Chat Design bot */
|
||||
$wtplsett["chatbotinsert"] = '<div class="lc_item lc_bot" id="postid_'.(isset($lastidbot) ? $lastidbot : 0).'">
|
||||
<div class="lc_message" id="msg'.(isset($lastidbot) ? $lastidbot : 0).'">'.(isset($botdisp) ? stripcslashes($botdisp) : '').'</div>
|
||||
<div class="lc_status"><i class="far fa-clock"></i> '.JAK_base::jakTimesince(date('Y-m-d H:i:s'), "", JAK_TIMEFORMAT).'</div>
|
||||
</div>';
|
||||
|
||||
/* Chat Design Insert */
|
||||
$wtplsett["chatinsert"] = '<div class="lc_item lc_user" id="postid_'.(isset($lastid) ? $lastid : 0).'">
|
||||
<div class="lc_message" id="groupmsg'.(isset($lastid) ? $lastid : 0).'"><span id="msg'.(isset($lastid) ? $lastid : 0).'">'.(isset($messagedisp) ? stripcslashes($messagedisp) : '').'</span></div>
|
||||
<div class="lc_status"><i class="far fa-clock"></i> '.JAK_base::jakTimesince(date('Y-m-d H:i:s'), "", JAK_TIMEFORMAT).'</div>
|
||||
</div>';
|
||||
|
||||
/* Chat Design Insert ended */
|
||||
$wtplsett["chatinsertended"] = '<div class="lc_item lc_system" id="postid_'.(isset($lastid) ? $lastid : 0).'">
|
||||
<div class="lc_message" id="msg'.(isset($lastid) ? $lastid : 0).'">'.(isset($message) ? stripcslashes($message) : '').'</div>
|
||||
<div class="lc_status"><i class="far fa-clock"></i> '.JAK_base::jakTimesince(date('Y-m-d H:i:s'), "", JAK_TIMEFORMAT).'</div>
|
||||
</div>';
|
||||
}
|
||||
|
||||
// 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 */
|
||||
$chatsett = array();
|
||||
|
||||
$chatsett["previewchat"] = "preview/chat.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
|
||||
|
||||
*/
|
||||
|
||||
$chatsett["formoptions"] = array("1" => "5:#:".$jkl['cw22'].":#:blue,green,orange,red,pink,grey:#:0:#:chat_colour_theme", "2" => "5:#:".$jkl['cw23'].":#:animate__fadeIn,animate__flash,animate__pulse,animate__headShake,animate__slideInUp,animate__slideInRight:#:0:#:chat_animation");
|
||||
|
||||
} else {
|
||||
|
||||
// Check the vars for this start
|
||||
$chat_animate = "animate__fadeIn";
|
||||
$chat_custom = "";
|
||||
$chat_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]['chat_animation']) && !empty($widgetsettings[$widgetid]['chat_animation'])) {
|
||||
$chat_animate = $widgetsettings[$widgetid]['chat_animation'];
|
||||
}
|
||||
|
||||
// We can have custom online icon
|
||||
if (isset($widgetsettings[$widgetid]['chat_colour_theme']) && !empty($widgetsettings[$widgetid]['chat_colour_theme']) && $widgetsettings[$widgetid]['chat_colour_theme'] != "blue") {
|
||||
$chat_custom = " ".$widgetsettings[$widgetid]['chat_colour_theme'];
|
||||
}
|
||||
|
||||
// Let's get the header connecting message
|
||||
$headermsg = $jkl['g59'];
|
||||
|
||||
if (isset($page1) && $page1 == "big") {
|
||||
|
||||
$livecode = '<div id="lccontainersize" class="jak_chatopen_panel'.(isset($ismobile) ? $ismobile : '').' animate__animated '.$chat_animate.'">
|
||||
<form id="lcjak_ajaxform" method="post" action="'.$_SERVER['REQUEST_URI'].'">
|
||||
<section class="jaklcb_panel'.$chat_custom.'">
|
||||
<header class="jaklcb_panel_header">
|
||||
<aside style="flex:3" id="jaklcb_oimage">'.$chat_logo.'
|
||||
</aside>
|
||||
<aside style="flex:5">
|
||||
<h1 id="jaklcb_oname">'.$jakwidget[$widgetid]['title'].'</h1>
|
||||
<h5 id="jaklcb_oabout">'.$headermsg.'</h5>
|
||||
</aside>
|
||||
<aside style="flex:4;text-align:right;">
|
||||
<button class="jaklcb_minimize" onclick="lcjak_smallchat()" type="button"><i class="fa fa-window-restore"></i></button>
|
||||
<button class="jaklcb_profilesm lcb_profile" onclick="lcjak_profilebig()" type="button"><i class="far fa-id-card-alt"></i></button>
|
||||
<button class="jaklcb_endsm lcb_end" onclick="lcjak_endchatbig()" type="button"><i class="fas fa-power-off"></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="lc_messages">
|
||||
</main>
|
||||
<div id="lc_typing" class="lc_typing"><div class="dot-pulse"></div></div>
|
||||
<div id="ai-thinking"></div>
|
||||
<footer class="jaklcb_panel_footer">
|
||||
<aside class="jaklcb_start_extra">
|
||||
<i class="fa fa-camera dropzone animate__animated" id="cUploadDrop"></i>
|
||||
<i class="fa fa-smile emoticons" id="emoticons"></i>
|
||||
<div class="emoticons_btn animate__animated" id="emoticons_btn">
|
||||
<span class="icon1"><i class="fa fa-smile fa-lg" onclick="sendEmo(\':slight_smile:\')"></i></span>
|
||||
<span class="icon2"><i class="fa fa-laugh fa-lg" onclick="sendEmo(\':smile:\')"></i></span>
|
||||
<span class="icon3"><i class="fa fa-smile-wink fa-lg" onclick="sendEmo(\':wink:\')"></i></span>
|
||||
<span class="icon4"><i class="fa fa-frown fa-lg" onclick="sendEmo(\':frowning:\')"></i></span>
|
||||
<span class="icon5"><i class="fa fa-sad-tear fa-lg" onclick="sendEmo(\':cry:\')"></i></span>
|
||||
<span class="icon6"><i class="fa fa-heart fa-lg" onclick="sendEmo(\':heart:\')"></i></span>
|
||||
</div>
|
||||
</aside>
|
||||
<aside class="jaklcb_start_message">
|
||||
<textarea type="text" name="lc_chat_msg" id="lc_chat_msg" placeholder="'.$jkl["g60"].'"></textarea>
|
||||
</aside>
|
||||
<aside class="jaklcb_start_chat">
|
||||
<button id="lc_send_msg" type="submit"><i class="fa fa-paper-plane" id="lc_msg_load"></i></button>
|
||||
</aside>
|
||||
</footer>
|
||||
</section>
|
||||
<input type="hidden" name="allowedFiles" id="allowedFiles" value="'.JAK_ALLOWED_FILES.'">
|
||||
</form>
|
||||
</div>';
|
||||
|
||||
} else {
|
||||
|
||||
$livecode = '<div id="lccontainersize" class="jak_chatopen_sm'.(isset($ismobile) ? $ismobile : '').' animate__animated '.$chat_animate.'">
|
||||
<button class="jaklcb_profile lcb_profile" onclick="lcjak_profile()">
|
||||
<i class="far fa-id-card-alt"></i>
|
||||
</button>
|
||||
<button class="jaklcb_end lcb_end" onclick="lcjak_endchat()">
|
||||
<i class="fas fa-power-off"></i>
|
||||
</button>
|
||||
<button class="jaklcb_close lcb_close" onclick="lcjak_closechat()">
|
||||
<i class="fa fa-times"></i>
|
||||
</button>
|
||||
<form id="lcjak_ajaxform" method="post" action="'.$_SERVER['REQUEST_URI'].'">
|
||||
<section class="jaklcb_popup'.$chat_custom.'">
|
||||
<header class="jaklcb_popup_header">
|
||||
<aside style="flex:3" id="jaklcb_oimage">'.$chat_logo.'
|
||||
</aside>
|
||||
<aside style="flex:8">
|
||||
<h1 id="jaklcb_oname">'.$jakwidget[$widgetid]['title'].'</h1>
|
||||
<h5 id="jaklcb_oabout">'.$headermsg.'</h5>
|
||||
</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_popup_main" id="lc_messages">
|
||||
</main>
|
||||
<div id="lc_typing" class="lc_typing"><div class="dot-pulse"></div></div>
|
||||
<div id="ai-thinking"></div>
|
||||
<footer class="jaklcb_popup_footer">
|
||||
<aside class="jaklcb_start_extra">
|
||||
<i class="fa fa-camera dropzone animate__animated" id="cUploadDrop"></i>
|
||||
<i class="fa fa-smile emoticons" id="emoticons"></i>
|
||||
<div class="emoticons_btn animate__animated" id="emoticons_btn">
|
||||
<span class="icon1"><i class="fa fa-smile fa-lg" onclick="sendEmo(\':slight_smile:\')"></i></span>
|
||||
<span class="icon2"><i class="fa fa-laugh fa-lg" onclick="sendEmo(\':smile:\')"></i></span>
|
||||
<span class="icon3"><i class="fa fa-smile-wink fa-lg" onclick="sendEmo(\':wink:\')"></i></span>
|
||||
<span class="icon4"><i class="fa fa-frown fa-lg" onclick="sendEmo(\':frowning:\')"></i></span>
|
||||
<span class="icon5"><i class="fa fa-sad-tear fa-lg" onclick="sendEmo(\':cry:\')"></i></span>
|
||||
<span class="icon6"><i class="fa fa-heart fa-lg" onclick="sendEmo(\':heart:\')"></i></span>
|
||||
</div>
|
||||
</aside>
|
||||
<aside class="jaklcb_start_message">
|
||||
<textarea type="text" name="lc_chat_msg" id="lc_chat_msg" placeholder="'.$jkl["g60"].'"></textarea>
|
||||
</aside>
|
||||
<aside class="jaklcb_start_chat">
|
||||
<button id="lc_send_msg" type="submit"><i class="fa fa-paper-plane" id="lc_msg_load"></i></button>
|
||||
</aside>
|
||||
</footer>
|
||||
</section>
|
||||
<input type="hidden" name="allowedFiles" id="allowedFiles" value="'.JAK_ALLOWED_FILES.'">
|
||||
</form>
|
||||
</div>';
|
||||
} }
|
||||
?>
|
||||
@@ -0,0 +1,177 @@
|
||||
<?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/chat.js";
|
||||
$wtplsett["customcss"] = "";
|
||||
|
||||
// We only load when we need to receive messages
|
||||
if (isset($lcdrm) && $lcdrm === true) {
|
||||
$wtplsett["operatormsg"] = '<div class="lc_item lc_operator" id="postid_'.$row['id'].'">
|
||||
<div class="lc_avatar"><img src="'.$avaimg.'" alt="'.$row['name'].'"></div>
|
||||
<div class="lc_message" id="msg'.$row['id'].'">'.($row['quoted'] ? '<blockquote class="blockquote"><i class="fa fa-reply"></i> '.$quotemsg.'</blockquote>' : '').stripcslashes($message).(!empty(JAK_OPENAI_APIKEY) ? '<div class="chat_translation" id="aitranslate'.$row['id'].'"></div>' : '').'</div>
|
||||
<div class="lc_status"><i class="far fa-clock"></i> '.JAK_base::jakTimesince($row['time'], "", JAK_TIMEFORMAT).'<span id="edited_'.$row['id'].'">'.($row['editoid'] ? ' | <i class="fa fa-edit"></i> '.JAK_base::jakTimesince($row['edited'], "", JAK_TIMEFORMAT) : '').'</span>'.(!empty(JAK_OPENAI_APIKEY) ? ' <a href="javascript:" onclick="lcjak_translationAI('.$row['id'].')" class="translate-chat" data-id="'.$row['id'].'"><i class="fa fa-language"></i></a>' : '').'</div>
|
||||
</div>';
|
||||
$wtplsett["clientmsg"] = '<div class="lc_item lc_user" id="postid_'.$row['id'].'">
|
||||
<div class="lc_message" id="msg'.$row['id'].'">'.($row['quoted'] ? '<blockquote class="blockquote"><i class="fa fa-reply"></i> '.$quotemsg.'</blockquote>' : '').stripcslashes($message).'</div>
|
||||
<div class="lc_status"><i class="far fa-clock"></i> '.JAK_base::jakTimesince($row['time'], "", JAK_TIMEFORMAT).'<span id="edited_'.$row['id'].'">'.($row['editoid'] ? ' | <i class="fa fa-edit"></i> '.JAK_base::jakTimesince($row['edited'], "", JAK_TIMEFORMAT) : '').'</span></div>
|
||||
</div>';
|
||||
$wtplsett["infomsg"] = '<div class="lc_item lc_system" id="postid_'.$row['id'].'">
|
||||
<div class="lc_message" id="msg'.$row['id'].'">'.stripcslashes($message).'</div>
|
||||
<div class="lc_status"><i class="far fa-clock"></i> '.JAK_base::jakTimesince($row['time'], "", JAK_TIMEFORMAT).'</div>
|
||||
</div>';
|
||||
$wtplsett["download"] = '<div class="lc_item lc_download" id="postid_'.$row['id'].'">
|
||||
<div class="lc_message" id="msg'.$row['id'].'">'.stripcslashes($message).'</div>
|
||||
<div class="lc_status"><i class="far fa-clock"></i> '.JAK_base::jakTimesince($row['time'], "", JAK_TIMEFORMAT).'</div>
|
||||
</div>';
|
||||
$wtplsett["chatbot"] = '<div class="lc_item lc_bot" id="postid_'.(isset($lastid) ? $lastid : 0).'">
|
||||
<div class="lc_message" id="msg'.(isset($lastid) ? $lastid : 0).'">'.(isset($message) ? stripcslashes($message) : '').'</div>
|
||||
<div class="lc_status"><i class="far fa-clock"></i> '.JAK_base::jakTimesince(date('Y-m-d H:i:s'), "", JAK_TIMEFORMAT).'</div>
|
||||
</div>';
|
||||
}
|
||||
|
||||
// We only load when we have new messages
|
||||
if (isset($lcdnm) && $lcdnm === true) {
|
||||
/* Chat Design bot */
|
||||
$wtplsett["chatbotinsert"] = '<div class="lc_item lc_bot" id="postid_'.(isset($lastidbot) ? $lastidbot : 0).'">
|
||||
<div class="lc_message" id="msg'.(isset($lastidbot) ? $lastidbot : 0).'">'.(isset($botdisp) ? stripcslashes($botdisp) : '').'</div>
|
||||
<div class="lc_status"><i class="far fa-clock"></i> '.JAK_base::jakTimesince(date('Y-m-d H:i:s'), "", JAK_TIMEFORMAT).'</div>
|
||||
</div>';
|
||||
|
||||
/* Chat Design Insert */
|
||||
$wtplsett["chatinsert"] = '<div class="lc_item lc_user" id="postid_'.(isset($lastid) ? $lastid : 0).'">
|
||||
<div class="lc_message" id="groupmsg'.(isset($lastid) ? $lastid : 0).'"><span id="msg'.(isset($lastid) ? $lastid : 0).'">'.(isset($messagedisp) ? stripcslashes($messagedisp) : '').'</span></div>
|
||||
<div class="lc_status"><i class="far fa-clock"></i> '.JAK_base::jakTimesince(date('Y-m-d H:i:s'), "", JAK_TIMEFORMAT).'</div>
|
||||
</div>';
|
||||
|
||||
/* Chat Design Insert ended */
|
||||
$wtplsett["chatinsertended"] = '<div class="lc_item lc_system" id="postid_'.(isset($lastid) ? $lastid : 0).'">
|
||||
<div class="lc_message" id="msg'.(isset($lastid) ? $lastid : 0).'">'.(isset($message) ? stripcslashes($message) : '').'</div>
|
||||
<div class="lc_status"><i class="far fa-clock"></i> '.JAK_base::jakTimesince(date('Y-m-d H:i:s'), "", JAK_TIMEFORMAT).'</div>
|
||||
</div>';
|
||||
}
|
||||
|
||||
// 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 */
|
||||
$chatsett = array();
|
||||
|
||||
$chatsett["previewchat"] = "preview/chat.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
|
||||
|
||||
*/
|
||||
|
||||
$chatsett["formoptions"] = array("1" => "5:#:".$jkl['cw22'].":#:blue,green,orange,red,pink,grey:#:0:#:chat_colour_theme", "2" => "5:#:".$jkl['cw23'].":#:animate__fadeIn,animate__flash,animate__pulse,animate__headShake,animate__slideInUp,animate__slideInRight:#:0:#:chat_animation");
|
||||
|
||||
} else {
|
||||
|
||||
// Check the vars for this start
|
||||
$chat_animate = "animate__fadeIn";
|
||||
$chat_custom = "";
|
||||
$chat_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['chat_animation']) && !empty($widgetsettings['chat_animation'])) {
|
||||
$chat_animate = $widgetsettings['chat_animation'];
|
||||
}
|
||||
|
||||
// We can have custom online icon
|
||||
if (isset($widgetsettings['chat_colour_theme']) && !empty($widgetsettings['chat_colour_theme']) && $widgetsettings['chat_colour_theme'] != "blue") {
|
||||
$chat_custom = " ".$widgetsettings['chat_colour_theme'];
|
||||
}
|
||||
|
||||
// Let's get the header connecting message
|
||||
$headermsg = $jkl['g59'];
|
||||
|
||||
// We just allow small
|
||||
$livecode = '<div id="lccontainersize" class="jak_chatopen_sm'.(isset($ismobile) ? $ismobile : '').' animate__animated '.$chat_animate.'">
|
||||
<button class="jaklcb_profile left lcb_profile" onclick="lcjak_profile()">
|
||||
<i class="far fa-id-card-alt"></i>
|
||||
</button>
|
||||
<button class="jaklcb_end left lcb_end" onclick="lcjak_endchat()">
|
||||
<i class="fas fa-power-off"></i>
|
||||
</button>
|
||||
<button class="jaklcb_close left lcb_close" onclick="lcjak_closechat()">
|
||||
<i class="fa fa-times"></i>
|
||||
</button>
|
||||
<form id="lcjak_ajaxform" method="post" action="'.$_SERVER['REQUEST_URI'].'">
|
||||
<section class="jaklcb_popup'.$chat_custom.'">
|
||||
<header class="jaklcb_popup_header">
|
||||
<aside style="flex:3" id="jaklcb_oimage">'.$chat_logo.'
|
||||
</aside>
|
||||
<aside style="flex:9">
|
||||
<h1 id="jaklcb_oname">'.$jakwidget['title'].'</h1>
|
||||
<h5 id="jaklcb_oabout">'.$headermsg.'</h5>
|
||||
</aside>
|
||||
</header>
|
||||
<main class="jaklcb_popup_main" id="lc_messages">
|
||||
</main>
|
||||
<div id="lc_typing" class="lc_typing"><div class="dot-pulse"></div></div>
|
||||
<div id="ai-thinking"></div>
|
||||
<footer class="jaklcb_popup_footer">
|
||||
<aside class="jaklcb_start_extra">
|
||||
<i class="fa fa-camera dropzone animate__animated" id="cUploadDrop"></i>
|
||||
<i class="fa fa-smile emoticons" id="emoticons"></i>
|
||||
<div class="emoticons_btn animate__animated" id="emoticons_btn">
|
||||
<span class="icon1"><i class="fa fa-smile fa-lg" onclick="sendEmo(\':slight_smile:\')"></i></span>
|
||||
<span class="icon2"><i class="fa fa-laugh fa-lg" onclick="sendEmo(\':smile:\')"></i></span>
|
||||
<span class="icon3"><i class="fa fa-smile-wink fa-lg" onclick="sendEmo(\':wink:\')"></i></span>
|
||||
<span class="icon4"><i class="fa fa-frown fa-lg" onclick="sendEmo(\':frowning:\')"></i></span>
|
||||
<span class="icon5"><i class="fa fa-sad-tear fa-lg" onclick="sendEmo(\':cry:\')"></i></span>
|
||||
<span class="icon6"><i class="fa fa-heart fa-lg" onclick="sendEmo(\':heart:\')"></i></span>
|
||||
</div>
|
||||
</aside>
|
||||
<aside class="jaklcb_start_message">
|
||||
<textarea type="text" name="lc_chat_msg" id="lc_chat_msg" placeholder="'.$jkl["g60"].'"></textarea>
|
||||
</aside>
|
||||
<aside class="jaklcb_start_chat">
|
||||
<button id="lc_send_msg" type="submit"><i class="fa fa-paper-plane" id="lc_msg_load"></i></button>
|
||||
</aside>
|
||||
</footer>
|
||||
</section>
|
||||
<input type="hidden" name="allowedFiles" id="allowedFiles" value="'.JAK_ALLOWED_FILES.'">
|
||||
</form>
|
||||
</div>';
|
||||
}
|
||||
?>
|
||||
@@ -0,0 +1,177 @@
|
||||
<?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/chat.js";
|
||||
$wtplsett["customcss"] = "";
|
||||
|
||||
// We only load when we need to receive messages
|
||||
if (isset($lcdrm) && $lcdrm === true) {
|
||||
$wtplsett["operatormsg"] = '<div class="lc_item lc_operator" id="postid_'.$row['id'].'">
|
||||
<div class="lc_avatar"><img src="'.$avaimg.'" alt="'.$row['name'].'"></div>
|
||||
<div class="lc_message" id="msg'.$row['id'].'">'.($row['quoted'] ? '<blockquote class="blockquote"><i class="fa fa-reply"></i> '.$quotemsg.'</blockquote>' : '').stripcslashes($message).(!empty(JAK_OPENAI_APIKEY) ? '<div class="chat_translation" id="aitranslate'.$row['id'].'"></div>' : '').'</div>
|
||||
<div class="lc_status"><i class="far fa-clock"></i> '.JAK_base::jakTimesince($row['time'], "", JAK_TIMEFORMAT).'<span id="edited_'.$row['id'].'">'.($row['editoid'] ? ' | <i class="fa fa-edit"></i> '.JAK_base::jakTimesince($row['edited'], "", JAK_TIMEFORMAT) : '').'</span>'.(!empty(JAK_OPENAI_APIKEY) ? ' <a href="javascript:" onclick="lcjak_translationAI('.$row['id'].')" class="translate-chat" data-id="'.$row['id'].'"><i class="fa fa-language"></i></a>' : '').'</div>
|
||||
</div>';
|
||||
$wtplsett["clientmsg"] = '<div class="lc_item lc_user" id="postid_'.$row['id'].'">
|
||||
<div class="lc_message" id="msg'.$row['id'].'">'.($row['quoted'] ? '<blockquote class="blockquote"><i class="fa fa-reply"></i> '.$quotemsg.'</blockquote>' : '').stripcslashes($message).'</div>
|
||||
<div class="lc_status"><i class="far fa-clock"></i> '.JAK_base::jakTimesince($row['time'], "", JAK_TIMEFORMAT).'<span id="edited_'.$row['id'].'">'.($row['editoid'] ? ' | <i class="fa fa-edit"></i> '.JAK_base::jakTimesince($row['edited'], "", JAK_TIMEFORMAT) : '').'</span></div>
|
||||
</div>';
|
||||
$wtplsett["infomsg"] = '<div class="lc_item lc_system" id="postid_'.$row['id'].'">
|
||||
<div class="lc_message" id="msg'.$row['id'].'">'.stripcslashes($message).'</div>
|
||||
<div class="lc_status"><i class="far fa-clock"></i> '.JAK_base::jakTimesince($row['time'], "", JAK_TIMEFORMAT).'</div>
|
||||
</div>';
|
||||
$wtplsett["download"] = '<div class="lc_item lc_download" id="postid_'.$row['id'].'">
|
||||
<div class="lc_message" id="msg'.$row['id'].'">'.stripcslashes($message).'</div>
|
||||
<div class="lc_status"><i class="far fa-clock"></i> '.JAK_base::jakTimesince($row['time'], "", JAK_TIMEFORMAT).'</div>
|
||||
</div>';
|
||||
$wtplsett["chatbot"] = '<div class="lc_item lc_bot" id="postid_'.(isset($lastid) ? $lastid : 0).'">
|
||||
<div class="lc_message" id="msg'.(isset($lastid) ? $lastid : 0).'">'.(isset($message) ? stripcslashes($message) : '').'</div>
|
||||
<div class="lc_status"><i class="far fa-clock"></i> '.JAK_base::jakTimesince(date('Y-m-d H:i:s'), "", JAK_TIMEFORMAT).'</div>
|
||||
</div>';
|
||||
}
|
||||
|
||||
// We only load when we have new messages
|
||||
if (isset($lcdnm) && $lcdnm === true) {
|
||||
/* Chat Design bot */
|
||||
$wtplsett["chatbotinsert"] = '<div class="lc_item lc_bot" id="postid_'.(isset($lastidbot) ? $lastidbot : 0).'">
|
||||
<div class="lc_message" id="msg'.(isset($lastidbot) ? $lastidbot : 0).'">'.(isset($botdisp) ? stripcslashes($botdisp) : '').'</div>
|
||||
<div class="lc_status"><i class="far fa-clock"></i> '.JAK_base::jakTimesince(date('Y-m-d H:i:s'), "", JAK_TIMEFORMAT).'</div>
|
||||
</div>';
|
||||
|
||||
/* Chat Design Insert */
|
||||
$wtplsett["chatinsert"] = '<div class="lc_item lc_user" id="postid_'.(isset($lastid) ? $lastid : 0).'">
|
||||
<div class="lc_message" id="groupmsg'.(isset($lastid) ? $lastid : 0).'"><span id="msg'.(isset($lastid) ? $lastid : 0).'">'.(isset($messagedisp) ? stripcslashes($messagedisp) : '').'</span></div>
|
||||
<div class="lc_status"><i class="far fa-clock"></i> '.JAK_base::jakTimesince(date('Y-m-d H:i:s'), "", JAK_TIMEFORMAT).'</div>
|
||||
</div>';
|
||||
|
||||
/* Chat Design Insert ended */
|
||||
$wtplsett["chatinsertended"] = '<div class="lc_item lc_system" id="postid_'.(isset($lastid) ? $lastid : 0).'">
|
||||
<div class="lc_message" id="msg'.(isset($lastid) ? $lastid : 0).'">'.(isset($message) ? stripcslashes($message) : '').'</div>
|
||||
<div class="lc_status"><i class="far fa-clock"></i> '.JAK_base::jakTimesince(date('Y-m-d H:i:s'), "", JAK_TIMEFORMAT).'</div>
|
||||
</div>';
|
||||
}
|
||||
|
||||
// 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 */
|
||||
$chatsett = array();
|
||||
|
||||
$chatsett["previewchat"] = "preview/chat.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
|
||||
|
||||
*/
|
||||
|
||||
$chatsett["formoptions"] = array("1" => "5:#:".$jkl['cw22'].":#:blue,green,orange,red,pink,grey:#:0:#:chat_colour_theme", "2" => "5:#:".$jkl['cw23'].":#:animate__fadeIn,animate__flash,animate__pulse,animate__headShake,animate__slideInUp,animate__slideInRight:#:0:#:chat_animation");
|
||||
|
||||
} else {
|
||||
|
||||
// Check the vars for this start
|
||||
$chat_animate = "animate__fadeIn";
|
||||
$chat_custom = "";
|
||||
$chat_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['chat_animation']) && !empty($widgetsettings['chat_animation'])) {
|
||||
$chat_animate = $widgetsettings['chat_animation'];
|
||||
}
|
||||
|
||||
// We can have custom online icon
|
||||
if (isset($widgetsettings['chat_colour_theme']) && !empty($widgetsettings['chat_colour_theme']) && $widgetsettings['chat_colour_theme'] != "blue") {
|
||||
$chat_custom = " ".$widgetsettings['chat_colour_theme'];
|
||||
}
|
||||
|
||||
// Let's get the header connecting message
|
||||
$headermsg = $jkl['g59'];
|
||||
|
||||
// We just allow small
|
||||
$livecode = '<div id="lccontainersize" class="jak_chatopen_sm'.(isset($ismobile) ? $ismobile : '').' animate__animated '.$chat_animate.'">
|
||||
<button class="jaklcb_profile lcb_profile" onclick="lcjak_profile()">
|
||||
<i class="far fa-id-card-alt"></i>
|
||||
</button>
|
||||
<button class="jaklcb_end lcb_end" onclick="lcjak_endchat()">
|
||||
<i class="fas fa-power-off"></i>
|
||||
</button>
|
||||
<button class="jaklcb_close lcb_close" onclick="lcjak_closechat()">
|
||||
<i class="fa fa-times"></i>
|
||||
</button>
|
||||
<form id="lcjak_ajaxform" method="post" action="'.$_SERVER['REQUEST_URI'].'">
|
||||
<section class="jaklcb_popup'.$chat_custom.'">
|
||||
<header class="jaklcb_popup_header">
|
||||
<aside style="flex:3" id="jaklcb_oimage">'.$chat_logo.'
|
||||
</aside>
|
||||
<aside style="flex:9">
|
||||
<h1 id="jaklcb_oname">'.$jakwidget['title'].'</h1>
|
||||
<h5 id="jaklcb_oabout">'.$headermsg.'</h5>
|
||||
</aside>
|
||||
</header>
|
||||
<main class="jaklcb_popup_main" id="lc_messages">
|
||||
</main>
|
||||
<div id="lc_typing" class="lc_typing"><div class="dot-pulse"></div></div>
|
||||
<div id="ai-thinking"></div>
|
||||
<footer class="jaklcb_popup_footer">
|
||||
<aside class="jaklcb_start_extra">
|
||||
<i class="fa fa-camera dropzone animate__animated" id="cUploadDrop"></i>
|
||||
<i class="fa fa-smile emoticons" id="emoticons"></i>
|
||||
<div class="emoticons_btn animate__animated" id="emoticons_btn">
|
||||
<span class="icon1"><i class="fa fa-smile fa-lg" onclick="sendEmo(\':slight_smile:\')"></i></span>
|
||||
<span class="icon2"><i class="fa fa-laugh fa-lg" onclick="sendEmo(\':smile:\')"></i></span>
|
||||
<span class="icon3"><i class="fa fa-smile-wink fa-lg" onclick="sendEmo(\':wink:\')"></i></span>
|
||||
<span class="icon4"><i class="fa fa-frown fa-lg" onclick="sendEmo(\':frowning:\')"></i></span>
|
||||
<span class="icon5"><i class="fa fa-sad-tear fa-lg" onclick="sendEmo(\':cry:\')"></i></span>
|
||||
<span class="icon6"><i class="fa fa-heart fa-lg" onclick="sendEmo(\':heart:\')"></i></span>
|
||||
</div>
|
||||
</aside>
|
||||
<aside class="jaklcb_start_message">
|
||||
<textarea type="text" name="lc_chat_msg" id="lc_chat_msg" placeholder="'.$jkl["g60"].'"></textarea>
|
||||
</aside>
|
||||
<aside class="jaklcb_start_chat">
|
||||
<button id="lc_send_msg" type="submit"><i class="fa fa-paper-plane" id="lc_msg_load"></i></button>
|
||||
</aside>
|
||||
</footer>
|
||||
</section>
|
||||
<input type="hidden" name="allowedFiles" id="allowedFiles" value="'.JAK_ALLOWED_FILES.'">
|
||||
</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;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"]) ? '&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"]) ? '&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>';
|
||||
|
||||
}
|
||||
?>
|
||||
@@ -0,0 +1,156 @@
|
||||
<?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/feedback.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 */
|
||||
$feedbacksett = array();
|
||||
|
||||
$feedbacksett["previewchat"] = "preview/feedback.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
|
||||
|
||||
*/
|
||||
|
||||
$feedbacksett["formoptions"] = array("1" => "1:#:".$jkl['cw44'].":#:0:#:0:#:feedback_custom_logo", "2" => "3:#:".$jkl['cw33'].":#:Yes,No:#:0:#:feedback_email_required", "3" => "3:#:".$jkl['cw34'].":#:Yes,No:#:0:#:feedback_phone_required", "4" => "5:#:".$jkl['cw31'].":#:blue,green,orange,red,pink,grey:#:0:#:feedback_colour_theme", "5" => "5:#:".$jkl['cw32'].":#:animate__fadeIn,animate__flash,animate__pulse,animate__headShake,animate__slideInUp,animate__slideInRight:#:0:#:feedback_animation");
|
||||
|
||||
} else {
|
||||
|
||||
// Check the vars for this start
|
||||
$feedback_animate = "animate__fadeIn";
|
||||
$feedback_custom = "";
|
||||
$btn_custom = "blue";
|
||||
$feedback_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['feedback_animation']) && !empty($widgetsettings['feedback_animation'])) {
|
||||
$feedback_animate = $widgetsettings['feedback_animation'];
|
||||
}
|
||||
|
||||
// We can have custom online icon
|
||||
if (isset($widgetsettings['feedback_colour_theme']) && !empty($widgetsettings['feedback_colour_theme']) && $widgetsettings['feedback_colour_theme'] != "blue") {
|
||||
$feedback_custom = " ".$widgetsettings['feedback_colour_theme'];
|
||||
$btn_custom = $widgetsettings['feedback_colour_theme'];
|
||||
}
|
||||
|
||||
// We can have custom online icon
|
||||
if (isset($widgetsettings['feedback_custom_logo']) && !empty($widgetsettings['feedback_custom_logo'])) {
|
||||
$feedback_logo = '<img src="'.$widgetsettings['feedback_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 = 9;
|
||||
|
||||
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 big
|
||||
$livecode = '<div id="lccontainersize" class="jak_chatopen_panel'.(isset($ismobile) ? $ismobile : '').' animate__animated '.$feedback_animate.'">
|
||||
<form id="lcjak_ajaxform" method="post" action="'.$_SERVER['REQUEST_URI'].'">
|
||||
<section class="jaklcb_panel left'.$feedback_custom.'">
|
||||
<header class="jaklcb_panel_header">
|
||||
<aside style="flex:3">'.$feedback_logo.'
|
||||
</aside>
|
||||
<aside style="flex:5">
|
||||
<h1>'.$jkl['g24'].'</h1>
|
||||
<h3>'.$headermsg.'</h3>
|
||||
</aside>
|
||||
<aside style="flex:4;text-align:right;">
|
||||
<button class="lcb_back" onclick="lcjak_backtochat(\'slideOutLeft\', \'bigfeedback\', \'big\')" type="button" id="back_f_button"><i class="fas fa-arrow-left" aria-hidden="true"></i></button>
|
||||
<button class="jaklcb_panelclose lcb_close" onclick="lcjak_closechat(\'rotateOut\', \'bigfeedback\', \'closed\')" type="button"><i class="fa fa-times" aria-hidden="true"></i></button>
|
||||
</aside>
|
||||
</header>
|
||||
<main class="jaklcb_panel_main" style="flex:1" id="lcjak_formfields">
|
||||
<div class="rating" style="width: 20rem">
|
||||
<input id="rating-5" type="radio" name="rating" value="5"/><label for="rating-5"><i class="fas fa-star fa-lg"></i></label>
|
||||
<input id="rating-4" type="radio" name="rating" value="4" checked /><label for="rating-4"><i class="fas fa-star fa-lg"></i></label>
|
||||
<input id="rating-3" type="radio" name="rating" value="3"/><label for="rating-3"><i class="fas fa-star fa-lg"></i></label>
|
||||
<input id="rating-2" type="radio" name="rating" value="2"/><label for="rating-2"><i class="fas fa-star fa-lg"></i></label>
|
||||
<input id="rating-1" type="radio" name="rating" value="1"/><label for="rating-1"><i class="fas fa-star fa-lg"></i></label>
|
||||
</div>
|
||||
<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">
|
||||
<label for="email">'.$jkl["g5"].'</label>
|
||||
<input id="email" name="email" type="text" class="lcjak_input" placeholder="'.$jkl["g5"].'" value="">
|
||||
</div>
|
||||
<div class="jaklcb_input">
|
||||
<label for="phone">'.$jkl["g49"].'</label>
|
||||
<input id="phone" name="phone" type="text" class="lcjak_input" placeholder="'.$jkl["g49"].'" value="">
|
||||
</div>
|
||||
<div class="jaklcb_input">
|
||||
<label for="feedback">'.$jkl["g25"].'</label>
|
||||
<textarea id="feedback" name="feedback" placeholder="'.$jkl['g25'].'"></textarea>
|
||||
</div>
|
||||
'.(JAK_SEND_TSCRIPT == 1 ? '<div>
|
||||
<label>
|
||||
<input type="checkbox" name="send_email" id="send_email" value="1"> '.$jkl["g38"].'
|
||||
</label>
|
||||
</div>' : '<input type="hidden" name="send_email" value="0">').'
|
||||
<p><button class="lcb_end jakbtn btn-simple btn-'.$btn_custom.'" onclick="lcjak_endchat()" type="button" id="send_f_button"><i class="fas fa-power-off" id="end_save" aria-hidden="true"></i> '.$jkl['g11'].'</button></p>
|
||||
</main>
|
||||
</section>
|
||||
<input type="hidden" name="mycustomfields" value="">
|
||||
</form>
|
||||
</div>';
|
||||
|
||||
}
|
||||
?>
|
||||
@@ -0,0 +1,156 @@
|
||||
<?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/feedback.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 */
|
||||
$feedbacksett = array();
|
||||
|
||||
$feedbacksett["previewchat"] = "preview/feedback.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
|
||||
|
||||
*/
|
||||
|
||||
$feedbacksett["formoptions"] = array("1" => "1:#:".$jkl['cw44'].":#:0:#:0:#:feedback_custom_logo", "2" => "3:#:".$jkl['cw33'].":#:Yes,No:#:0:#:feedback_email_required", "3" => "3:#:".$jkl['cw34'].":#:Yes,No:#:0:#:feedback_phone_required", "4" => "5:#:".$jkl['cw31'].":#:blue,green,orange,red,pink,grey:#:0:#:feedback_colour_theme", "5" => "5:#:".$jkl['cw32'].":#:animate__fadeIn,animate__flash,animate__pulse,animate__headShake,animate__slideInUp,animate__slideInRight:#:0:#:feedback_animation");
|
||||
|
||||
} else {
|
||||
|
||||
// Check the vars for this start
|
||||
$feedback_animate = "animate__fadeIn";
|
||||
$feedback_custom = "";
|
||||
$btn_custom = "blue";
|
||||
$feedback_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['feedback_animation']) && !empty($widgetsettings['feedback_animation'])) {
|
||||
$feedback_animate = $widgetsettings['feedback_animation'];
|
||||
}
|
||||
|
||||
// We can have custom online icon
|
||||
if (isset($widgetsettings['feedback_colour_theme']) && !empty($widgetsettings['feedback_colour_theme']) && $widgetsettings['feedback_colour_theme'] != "blue") {
|
||||
$feedback_custom = " ".$widgetsettings['feedback_colour_theme'];
|
||||
$btn_custom = $widgetsettings['feedback_colour_theme'];
|
||||
}
|
||||
|
||||
// We can have custom online icon
|
||||
if (isset($widgetsettings['feedback_custom_logo']) && !empty($widgetsettings['feedback_custom_logo'])) {
|
||||
$feedback_logo = '<img src="'.$widgetsettings['feedback_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 = 9;
|
||||
|
||||
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 big
|
||||
$livecode = '<div id="lccontainersize" class="jak_chatopen_panel'.(isset($ismobile) ? $ismobile : '').' animate__animated '.$feedback_animate.'">
|
||||
<form id="lcjak_ajaxform" method="post" action="'.$_SERVER['REQUEST_URI'].'">
|
||||
<section class="jaklcb_panel'.$feedback_custom.'">
|
||||
<header class="jaklcb_panel_header">
|
||||
<aside style="flex:3">'.$feedback_logo.'
|
||||
</aside>
|
||||
<aside style="flex:5">
|
||||
<h1>'.$jkl['g24'].'</h1>
|
||||
</aside>
|
||||
<aside style="flex:4;text-align:right;">
|
||||
<button class="lcb_back" onclick="lcjak_backtochat(\'slideOutLeft\', \'bigfeedback\', \'big\')" type="button" id="back_f_button"><i class="fas fa-arrow-left" aria-hidden="true"></i></button>
|
||||
<button class="jaklcb_panelclose lcb_close" onclick="lcjak_closechat(\'rotateOut\', \'bigfeedback\', \'closed\')" type="button"><i class="fa fa-times" aria-hidden="true"></i></button>
|
||||
</aside>
|
||||
</header>
|
||||
<main class="jaklcb_panel_main" style="flex:1" id="lcjak_formfields">
|
||||
<h2>'.$headermsg.'</h2>
|
||||
<div class="rating" style="width: 20rem">
|
||||
<input id="rating-5" type="radio" name="rating" value="5"/><label for="rating-5"><i class="fas fa-star fa-lg"></i></label>
|
||||
<input id="rating-4" type="radio" name="rating" value="4" checked /><label for="rating-4"><i class="fas fa-star fa-lg"></i></label>
|
||||
<input id="rating-3" type="radio" name="rating" value="3"/><label for="rating-3"><i class="fas fa-star fa-lg"></i></label>
|
||||
<input id="rating-2" type="radio" name="rating" value="2"/><label for="rating-2"><i class="fas fa-star fa-lg"></i></label>
|
||||
<input id="rating-1" type="radio" name="rating" value="1"/><label for="rating-1"><i class="fas fa-star fa-lg"></i></label>
|
||||
</div>
|
||||
<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">
|
||||
<label for="email">'.$jkl["g5"].'</label>
|
||||
<input id="email" name="email" type="text" class="lcjak_input" placeholder="'.$jkl["g5"].'" value="">
|
||||
</div>
|
||||
<div class="jaklcb_input">
|
||||
<label for="phone">'.$jkl["g49"].'</label>
|
||||
<input id="phone" name="phone" type="text" class="lcjak_input" placeholder="'.$jkl["g49"].'" value="">
|
||||
</div>
|
||||
<div class="jaklcb_input">
|
||||
<label for="feedback">'.$jkl["g25"].'</label>
|
||||
<textarea id="feedback" name="feedback" placeholder="'.$jkl['g25'].'"></textarea>
|
||||
</div>
|
||||
'.(JAK_SEND_TSCRIPT == 1 ? '<div>
|
||||
<label>
|
||||
<input type="checkbox" name="send_email" id="send_email" value="1"> '.$jkl["g38"].'
|
||||
</label>
|
||||
</div>' : '<input type="hidden" name="send_email" value="0">').'
|
||||
<p><button class="lcb_end jakbtn btn-simple btn-'.$btn_custom.'" onclick="lcjak_endchat()" type="button" id="send_f_button"><i class="fas fa-power-off" id="end_save" aria-hidden="true"></i> '.$jkl['g11'].'</button></p>
|
||||
</main>
|
||||
</section>
|
||||
<input type="hidden" name="mycustomfields" value="">
|
||||
</form>
|
||||
</div>';
|
||||
|
||||
}
|
||||
?>
|
||||
@@ -0,0 +1,222 @@
|
||||
<?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;left:0;";
|
||||
$wtplsett["customjs"] = "js/feedback.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 */
|
||||
$feedbacksett = array();
|
||||
|
||||
$feedbacksett["previewchat"] = "preview/feedback.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
|
||||
|
||||
*/
|
||||
|
||||
$feedbacksett["formoptions"] = array("1" => "1:#:".$jkl['cw44'].":#:0:#:0:#:feedback_custom_logo", "2" => "3:#:".$jkl['cw33'].":#:Yes,No:#:0:#:feedback_email_required", "3" => "3:#:".$jkl['cw34'].":#:Yes,No:#:0:#:feedback_phone_required", "4" => "5:#:".$jkl['cw31'].":#:blue,green,orange,red,pink,grey:#:0:#:feedback_colour_theme", "5" => "5:#:".$jkl['cw32'].":#:animate__fadeIn,animate__flash,animate__pulse,animate__headShake,animate__slideInUp,animate__slideInRight:#:0:#:feedback_animation");
|
||||
|
||||
} else {
|
||||
|
||||
// Check the vars for this start
|
||||
$feedback_animate = "animate__fadeIn";
|
||||
$feedback_custom = "";
|
||||
$btn_custom = "blue";
|
||||
$feedback_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]['feedback_animation']) && !empty($widgetsettings[$widgetid]['feedback_animation'])) {
|
||||
$feedback_animate = $widgetsettings[$widgetid]['feedback_animation'];
|
||||
}
|
||||
|
||||
// We can have custom online icon
|
||||
if (isset($widgetsettings[$widgetid]['feedback_colour_theme']) && !empty($widgetsettings[$widgetid]['feedback_colour_theme']) && $widgetsettings[$widgetid]['feedback_colour_theme'] != "blue") {
|
||||
$feedback_custom = " ".$widgetsettings[$widgetid]['feedback_colour_theme'];
|
||||
$btn_custom = $widgetsettings[$widgetid]['feedback_colour_theme'];
|
||||
}
|
||||
|
||||
// We can have custom online icon
|
||||
if (isset($widgetsettings[$widgetid]['feedback_custom_logo']) && !empty($widgetsettings[$widgetid]['feedback_custom_logo'])) {
|
||||
$feedback_logo = '<img src="'.$widgetsettings[$widgetid]['feedback_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 = 9;
|
||||
|
||||
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"]);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($page1) && $page1 == "bigfeedback") {
|
||||
|
||||
$livecode = '<div id="lccontainersize" class="jak_chatopen_panel'.(isset($ismobile) ? $ismobile : '').' animate__animated '.$feedback_animate.'">
|
||||
<form id="lcjak_ajaxform" method="post" action="'.$_SERVER['REQUEST_URI'].'">
|
||||
<section class="jaklcb_panel left'.$feedback_custom.'">
|
||||
<header class="jaklcb_panel_header">
|
||||
<aside style="flex:3">'.$feedback_logo.'
|
||||
</aside>
|
||||
<aside style="flex:5">
|
||||
<h1>'.$jkl['g24'].'</h1>
|
||||
<h3>'.$headermsg.'</h3>
|
||||
</aside>
|
||||
<aside style="flex:4;text-align:right;">
|
||||
<button class="lcb_back" onclick="lcjak_backtochat(\'slideOutLeft\', \'bigfeedback\', \'big\')" type="button" id="back_f_button"><i class="fas fa-arrow-left"></i></button>
|
||||
<button class="jaklcb_minimize lcb_change" onclick="lcjak_windowchange(\'slideOutDown\', \'bigfeedback\', \'feedback\')" type="button"><i class="fa fa-window-restore"></i></button>
|
||||
<button class="jaklcb_panelclose lcb_close" onclick="lcjak_closechat(\'rotateOut\', \'bigfeedback\', \'closed\')" type="button"><i class="fa fa-times"></i></button>
|
||||
</aside>
|
||||
</header>
|
||||
<main class="jaklcb_panel_main" style="flex:1" id="lcjak_formfields">
|
||||
<div class="rating" style="width: 20rem">
|
||||
<input id="rating-5" type="radio" name="rating" value="5"/><label for="rating-5"><i class="fas fa-star fa-lg"></i></label>
|
||||
<input id="rating-4" type="radio" name="rating" value="4" checked /><label for="rating-4"><i class="fas fa-star fa-lg"></i></label>
|
||||
<input id="rating-3" type="radio" name="rating" value="3"/><label for="rating-3"><i class="fas fa-star fa-lg"></i></label>
|
||||
<input id="rating-2" type="radio" name="rating" value="2"/><label for="rating-2"><i class="fas fa-star fa-lg"></i></label>
|
||||
<input id="rating-1" type="radio" name="rating" value="1"/><label for="rating-1"><i class="fas fa-star fa-lg"></i></label>
|
||||
</div>
|
||||
<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">
|
||||
<label for="email">'.$jkl["g5"].'</label>
|
||||
<input id="email" name="email" type="text" class="lcjak_input" placeholder="'.$jkl["g5"].'" value="">
|
||||
</div>
|
||||
<div class="jaklcb_input">
|
||||
<label for="phone">'.$jkl["g49"].'</label>
|
||||
<input id="phone" name="phone" type="text" class="lcjak_input" placeholder="'.$jkl["g49"].'" value="">
|
||||
</div>
|
||||
<div class="jaklcb_input">
|
||||
<label for="feedback">'.$jkl["g49"].'</label>
|
||||
<textarea id="feedback" name="feedback" placeholder="'.$jkl['g25'].'"></textarea>
|
||||
</div>
|
||||
'.(JAK_SEND_TSCRIPT == 1 ? '<div>
|
||||
<label>
|
||||
<input type="checkbox" name="send_email" id="send_email" value="1"> '.$jkl["g38"].'
|
||||
</label>
|
||||
</div>' : '<input type="hidden" name="send_email" value="0">').'
|
||||
<button class="lcb_end jakbtn btn-simple btn-'.$btn_custom.'" onclick="lcjak_endchat()" type="button" id="send_f_button"><i class="fas fa-power-off" id="end_save"></i> '.$jkl['g11'].'</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 '.$feedback_animate.'">
|
||||
<form id="lcjak_ajaxform" method="post" action="'.$_SERVER['REQUEST_URI'].'">
|
||||
<button class="jaklcb_backtochat left lcb_back" type="button" onclick="lcjak_backtochat(\'slideOutLeft\', \'feedback\', \'open\')" id="back_f_button">
|
||||
<i class="fas fa-arrow-left"></i>
|
||||
</button>
|
||||
<button class="jaklcb_end left lcb_end" type="button" onclick="lcjak_endchat()" id="send_f_button">
|
||||
<i class="fas fa-power-off" id="end_save"></i>
|
||||
</button>
|
||||
<button class="jaklcb_close left lcb_close" type="button" onclick="lcjak_closechat(\'rotateOut\', \'feedback\', \'closed\')">
|
||||
<i class="fa fa-times fa-lg"></i>
|
||||
</button>
|
||||
<section class="jaklcb_popup'.$feedback_custom.'">
|
||||
<header class="jaklcb_popup_header">
|
||||
<aside style="flex:3">'.$feedback_logo.'
|
||||
</aside>
|
||||
<aside style="flex:8">
|
||||
<h1>'.$jkl['g24'].'</h1>
|
||||
<h3>'.$headermsg.'</h3>
|
||||
</aside>
|
||||
<aside style="flex:1">
|
||||
<button class="jaklcb_maximise lcb_change" onclick="lcjak_windowchange(\'slideOutUp\', \'feedback\', \'bigfeedback\')" type="button"><i class="fa fa-window-maximize"></i></button>
|
||||
</aside>
|
||||
</header>
|
||||
<main class="jaklcb_form_main" id="lcjak_formfields">
|
||||
<div class="rating" style="width: 20rem">
|
||||
<input id="rating-5" type="radio" name="rating" value="5"/><label for="rating-5"><i class="fas fa-star fa-lg"></i></label>
|
||||
<input id="rating-4" type="radio" name="rating" value="4" checked /><label for="rating-4"><i class="fas fa-star fa-lg"></i></label>
|
||||
<input id="rating-3" type="radio" name="rating" value="3"/><label for="rating-3"><i class="fas fa-star fa-lg"></i></label>
|
||||
<input id="rating-2" type="radio" name="rating" value="2"/><label for="rating-2"><i class="fas fa-star fa-lg"></i></label>
|
||||
<input id="rating-1" type="radio" name="rating" value="1"/><label for="rating-1"><i class="fas fa-star fa-lg"></i></label>
|
||||
</div>
|
||||
<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"].'" value="">
|
||||
</div>
|
||||
<div class="jaklcb_input">
|
||||
<label for="feedback">'.$jkl["g49"].'</label>
|
||||
<textarea id="feedback" name="feedback" placeholder="'.$jkl['g25'].'"></textarea>
|
||||
</div>
|
||||
'.(JAK_SEND_TSCRIPT == 1 ? '<div>
|
||||
<label>
|
||||
<input type="checkbox" name="send_email" id="send_email" value="1"> '.$jkl["g38"].'
|
||||
</label>
|
||||
</div>' : '<input type="hidden" name="send_email" 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,222 @@
|
||||
<?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/feedback.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 */
|
||||
$feedbacksett = array();
|
||||
|
||||
$feedbacksett["previewchat"] = "preview/feedback.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
|
||||
|
||||
*/
|
||||
|
||||
$feedbacksett["formoptions"] = array("1" => "1:#:".$jkl['cw44'].":#:0:#:0:#:feedback_custom_logo", "2" => "3:#:".$jkl['cw33'].":#:Yes,No:#:0:#:feedback_email_required", "3" => "3:#:".$jkl['cw34'].":#:Yes,No:#:0:#:feedback_phone_required", "4" => "5:#:".$jkl['cw31'].":#:blue,green,orange,red,pink,grey:#:0:#:feedback_colour_theme", "5" => "5:#:".$jkl['cw32'].":#:animate__fadeIn,animate__flash,animate__pulse,animate__headShake,animate__slideInUp,animate__slideInRight:#:0:#:feedback_animation");
|
||||
|
||||
} else {
|
||||
|
||||
// Check the vars for this start
|
||||
$feedback_animate = "animate__fadeIn";
|
||||
$feedback_custom = "";
|
||||
$btn_custom = "blue";
|
||||
$feedback_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]['feedback_animation']) && !empty($widgetsettings[$widgetid]['feedback_animation'])) {
|
||||
$feedback_animate = $widgetsettings[$widgetid]['feedback_animation'];
|
||||
}
|
||||
|
||||
// We can have custom online icon
|
||||
if (isset($widgetsettings[$widgetid]['feedback_colour_theme']) && !empty($widgetsettings[$widgetid]['feedback_colour_theme']) && $widgetsettings[$widgetid]['feedback_colour_theme'] != "blue") {
|
||||
$feedback_custom = " ".$widgetsettings[$widgetid]['feedback_colour_theme'];
|
||||
$btn_custom = $widgetsettings[$widgetid]['feedback_colour_theme'];
|
||||
}
|
||||
|
||||
// We can have custom online icon
|
||||
if (isset($widgetsettings[$widgetid]['feedback_custom_logo']) && !empty($widgetsettings[$widgetid]['feedback_custom_logo'])) {
|
||||
$feedback_logo = '<img src="'.$widgetsettings[$widgetid]['feedback_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 = 9;
|
||||
|
||||
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"]);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($page1) && $page1 == "bigfeedback") {
|
||||
|
||||
$livecode = '<div id="lccontainersize" class="jak_chatopen_panel'.(isset($ismobile) ? $ismobile : '').' animate__animated '.$feedback_animate.'">
|
||||
<form id="lcjak_ajaxform" method="post" action="'.$_SERVER['REQUEST_URI'].'">
|
||||
<section class="jaklcb_panel'.$feedback_custom.'">
|
||||
<header class="jaklcb_panel_header">
|
||||
<aside style="flex:3">'.$feedback_logo.'
|
||||
</aside>
|
||||
<aside style="flex:5">
|
||||
<h1>'.$jkl['g24'].'</h1>
|
||||
<h3>'.$headermsg.'</h3>
|
||||
</aside>
|
||||
<aside style="flex:4;text-align:right;">
|
||||
<button class="lcb_back" onclick="lcjak_backtochat(\'slideOutLeft\', \'bigfeedback\', \'big\')" type="button" id="back_f_button"><i class="fas fa-arrow-left"></i></button>
|
||||
<button class="jaklcb_minimize lcb_change" onclick="lcjak_windowchange(\'slideOutDown\', \'bigfeedback\', \'feedback\')" type="button"><i class="fa fa-window-restore"></i></button>
|
||||
<button class="jaklcb_panelclose lcb_close" onclick="lcjak_closechat(\'rotateOut\', \'bigfeedback\', \'closed\')" type="button"><i class="fa fa-times"></i></button>
|
||||
</aside>
|
||||
</header>
|
||||
<main class="jaklcb_panel_main" style="flex:1">
|
||||
<div class="rating" style="width: 20rem" id="lcjak_formfields">
|
||||
<input id="rating-5" type="radio" name="rating" value="5"/><label for="rating-5"><i class="fas fa-star fa-lg"></i></label>
|
||||
<input id="rating-4" type="radio" name="rating" value="4" checked /><label for="rating-4"><i class="fas fa-star fa-lg"></i></label>
|
||||
<input id="rating-3" type="radio" name="rating" value="3"/><label for="rating-3"><i class="fas fa-star fa-lg"></i></label>
|
||||
<input id="rating-2" type="radio" name="rating" value="2"/><label for="rating-2"><i class="fas fa-star fa-lg"></i></label>
|
||||
<input id="rating-1" type="radio" name="rating" value="1"/><label for="rating-1"><i class="fas fa-star fa-lg"></i></label>
|
||||
</div>
|
||||
<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">
|
||||
<label for="email">'.$jkl["g5"].'</label>
|
||||
<input id="email" name="email" type="text" class="lcjak_input" placeholder="'.$jkl["g5"].'" value="">
|
||||
</div>
|
||||
<div class="jaklcb_input">
|
||||
<label for="phone">'.$jkl["g49"].'</label>
|
||||
<input id="phone" name="phone" type="text" class="lcjak_input" placeholder="'.$jkl["g49"].'" value="">
|
||||
</div>
|
||||
<div class="jaklcb_input">
|
||||
<label for="feedback">'.$jkl["g49"].'</label>
|
||||
<textarea id="feedback" name="feedback" placeholder="'.$jkl['g25'].'"></textarea>
|
||||
</div>
|
||||
'.(JAK_SEND_TSCRIPT == 1 ? '<div>
|
||||
<label>
|
||||
<input type="checkbox" name="send_email" id="send_email" value="1"> '.$jkl["g38"].'
|
||||
</label>
|
||||
</div>' : '<input type="hidden" name="send_email" value="0">').'
|
||||
<button class="lcb_end jakbtn btn-simple btn-'.$btn_custom.'" onclick="lcjak_endchat()" type="button" id="send_f_button"><i class="fas fa-power-off" id="end_save"></i> '.$jkl['g11'].'</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 '.$feedback_animate.'">
|
||||
<form id="lcjak_ajaxform" method="post" action="'.$_SERVER['REQUEST_URI'].'">
|
||||
<button class="jaklcb_backtochat lcb_back" type="button" onclick="lcjak_backtochat(\'slideOutLeft\', \'feedback\', \'open\')" id="back_f_button">
|
||||
<i class="fas fa-arrow-left"></i>
|
||||
</button>
|
||||
<button class="jaklcb_end lcb_end" type="button" onclick="lcjak_endchat()" id="send_f_button">
|
||||
<i class="fas fa-power-off" id="end_save"></i>
|
||||
</button>
|
||||
<button class="jaklcb_close lcb_close" type="button" onclick="lcjak_closechat(\'rotateOut\', \'feedback\', \'closed\')">
|
||||
<i class="fa fa-times fa-lg"></i>
|
||||
</button>
|
||||
<section class="jaklcb_popup'.$feedback_custom.'">
|
||||
<header class="jaklcb_popup_header">
|
||||
<aside style="flex:3">'.$feedback_logo.'
|
||||
</aside>
|
||||
<aside style="flex:8">
|
||||
<h1>'.$jkl['g24'].'</h1>
|
||||
<h3>'.$headermsg.'</h3>
|
||||
</aside>
|
||||
<aside style="flex:1">
|
||||
<button class="jaklcb_maximise lcb_change" onclick="lcjak_windowchange(\'slideOutUp\', \'feedback\', \'bigfeedback\')" type="button"><i class="fa fa-window-maximize"></i></button>
|
||||
</aside>
|
||||
</header>
|
||||
<main class="jaklcb_form_main" id="lcjak_formfields">
|
||||
<div class="rating" style="width: 20rem">
|
||||
<input id="rating-5" type="radio" name="rating" value="5"/><label for="rating-5"><i class="fas fa-star fa-lg"></i></label>
|
||||
<input id="rating-4" type="radio" name="rating" value="4" checked /><label for="rating-4"><i class="fas fa-star fa-lg"></i></label>
|
||||
<input id="rating-3" type="radio" name="rating" value="3"/><label for="rating-3"><i class="fas fa-star fa-lg"></i></label>
|
||||
<input id="rating-2" type="radio" name="rating" value="2"/><label for="rating-2"><i class="fas fa-star fa-lg"></i></label>
|
||||
<input id="rating-1" type="radio" name="rating" value="1"/><label for="rating-1"><i class="fas fa-star fa-lg"></i></label>
|
||||
</div>
|
||||
<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"].'" value="">
|
||||
</div>
|
||||
<div class="jaklcb_input">
|
||||
<label for="feedback">'.$jkl["g49"].'</label>
|
||||
<textarea id="feedback" name="feedback" placeholder="'.$jkl['g25'].'"></textarea>
|
||||
</div>
|
||||
'.(JAK_SEND_TSCRIPT == 1 ? '<div>
|
||||
<label>
|
||||
<input type="checkbox" name="send_email" id="send_email" value="1"> '.$jkl["g38"].'
|
||||
</label>
|
||||
</div>' : '<input type="hidden" name="send_email" 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,161 @@
|
||||
<?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/feedback.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 */
|
||||
$feedbacksett = array();
|
||||
|
||||
$feedbacksett["previewchat"] = "preview/feedback.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
|
||||
|
||||
*/
|
||||
|
||||
$feedbacksett["formoptions"] = array("1" => "1:#:".$jkl['cw44'].":#:0:#:0:#:feedback_custom_logo", "2" => "3:#:".$jkl['cw33'].":#:Yes,No:#:0:#:feedback_email_required", "3" => "3:#:".$jkl['cw34'].":#:Yes,No:#:0:#:feedback_phone_required", "4" => "5:#:".$jkl['cw31'].":#:blue,green,orange,red,pink,grey:#:0:#:feedback_colour_theme", "5" => "5:#:".$jkl['cw32'].":#:animate__fadeIn,animate__flash,animate__pulse,animate__headShake,animate__slideInUp,animate__slideInRight:#:0:#:feedback_animation");
|
||||
|
||||
} else {
|
||||
|
||||
// Check the vars for this start
|
||||
$feedback_animate = "animate__fadeIn";
|
||||
$feedback_custom = "";
|
||||
$btn_custom = "blue";
|
||||
$feedback_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['feedback_animation']) && !empty($widgetsettings['feedback_animation'])) {
|
||||
$feedback_animate = $widgetsettings['feedback_animation'];
|
||||
}
|
||||
|
||||
// We can have custom online icon
|
||||
if (isset($widgetsettings['feedback_colour_theme']) && !empty($widgetsettings['feedback_colour_theme']) && $widgetsettings['feedback_colour_theme'] != "blue") {
|
||||
$feedback_custom = " ".$widgetsettings['feedback_colour_theme'];
|
||||
$btn_custom = $widgetsettings['feedback_colour_theme'];
|
||||
}
|
||||
|
||||
// We can have custom online icon
|
||||
if (isset($widgetsettings['feedback_custom_logo']) && !empty($widgetsettings['feedback_custom_logo'])) {
|
||||
$feedback_logo = '<img src="'.$widgetsettings['feedback_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 = 9;
|
||||
|
||||
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 '.$feedback_animate.'">
|
||||
<form id="lcjak_ajaxform" method="post" action="'.$_SERVER['REQUEST_URI'].'">
|
||||
<button class="jaklcb_backtochat left lcb_back" type="button" onclick="lcjak_backtochat(\'slideOutLeft\', \'feedback\', \'open\')" id="back_f_button">
|
||||
<i class="fas fa-arrow-left" aria-hidden="true"></i>
|
||||
</button>
|
||||
<button class="jaklcb_end left lcb_end" type="button" onclick="lcjak_endchat()" id="send_f_button">
|
||||
<i class="fas fa-power-off" id="end_save" aria-hidden="true"></i>
|
||||
</button>
|
||||
<button class="jaklcb_close left lcb_close" type="button" onclick="lcjak_closechat(\'rotateOut\', \'feedback\', \'closed\')">
|
||||
<i class="fa fa-times fa-lg" aria-hidden="true"></i>
|
||||
</button>
|
||||
<section class="jaklcb_popup'.$feedback_custom.'">
|
||||
<header class="jaklcb_popup_header">
|
||||
<aside style="flex:3">'.$feedback_logo.'
|
||||
</aside>
|
||||
<aside style="flex:9">
|
||||
<h1>'.$jkl['g24'].'</h1>
|
||||
<h3>'.$headermsg.'</h3>
|
||||
</aside>
|
||||
</header>
|
||||
<main class="jaklcb_form_main" id="lcjak_formfields">
|
||||
<div class="rating" style="width: 20rem">
|
||||
<input id="rating-5" type="radio" name="rating" value="5"/><label for="rating-5"><i class="fas fa-star fa-lg"></i></label>
|
||||
<input id="rating-4" type="radio" name="rating" value="4" checked /><label for="rating-4"><i class="fas fa-star fa-lg"></i></label>
|
||||
<input id="rating-3" type="radio" name="rating" value="3"/><label for="rating-3"><i class="fas fa-star fa-lg"></i></label>
|
||||
<input id="rating-2" type="radio" name="rating" value="2"/><label for="rating-2"><i class="fas fa-star fa-lg"></i></label>
|
||||
<input id="rating-1" type="radio" name="rating" value="1"/><label for="rating-1"><i class="fas fa-star fa-lg"></i></label>
|
||||
</div>
|
||||
<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"].'" value="">
|
||||
</div>
|
||||
<div class="jaklcb_input">
|
||||
<label for="feedback">'.$jkl["g25"].'</label>
|
||||
<textarea id="feedback" name="feedback" placeholder="'.$jkl['g25'].'"></textarea>
|
||||
</div>
|
||||
'.(JAK_SEND_TSCRIPT == 1 ? '<div>
|
||||
<label>
|
||||
<input type="checkbox" name="send_email" id="send_email" value="1"> '.$jkl["g38"].'
|
||||
</label>
|
||||
</div>' : '<input type="hidden" name="send_email" value="0">').'
|
||||
</main>
|
||||
<input type="hidden" name="mycustomfields" value="">
|
||||
</section></form></div>';
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -0,0 +1,161 @@
|
||||
<?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/feedback.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 */
|
||||
$feedbacksett = array();
|
||||
|
||||
$feedbacksett["previewchat"] = "preview/feedback.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
|
||||
|
||||
*/
|
||||
|
||||
$feedbacksett["formoptions"] = array("1" => "1:#:".$jkl['cw44'].":#:0:#:0:#:feedback_custom_logo", "2" => "3:#:".$jkl['cw33'].":#:Yes,No:#:0:#:feedback_email_required", "3" => "3:#:".$jkl['cw34'].":#:Yes,No:#:0:#:feedback_phone_required", "4" => "5:#:".$jkl['cw31'].":#:blue,green,orange,red,pink,grey:#:0:#:feedback_colour_theme", "5" => "5:#:".$jkl['cw32'].":#:animate__fadeIn,animate__flash,animate__pulse,animate__headShake,animate__slideInUp,animate__slideInRight:#:0:#:feedback_animation");
|
||||
|
||||
} else {
|
||||
|
||||
// Check the vars for this start
|
||||
$feedback_animate = "animate__fadeIn";
|
||||
$feedback_custom = "";
|
||||
$btn_custom = "blue";
|
||||
$feedback_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['feedback_animation']) && !empty($widgetsettings['feedback_animation'])) {
|
||||
$feedback_animate = $widgetsettings['feedback_animation'];
|
||||
}
|
||||
|
||||
// We can have custom online icon
|
||||
if (isset($widgetsettings['feedback_colour_theme']) && !empty($widgetsettings['feedback_colour_theme']) && $widgetsettings['feedback_colour_theme'] != "blue") {
|
||||
$feedback_custom = " ".$widgetsettings['feedback_colour_theme'];
|
||||
$btn_custom = $widgetsettings['feedback_colour_theme'];
|
||||
}
|
||||
|
||||
// We can have custom online icon
|
||||
if (isset($widgetsettings['feedback_custom_logo']) && !empty($widgetsettings['feedback_custom_logo'])) {
|
||||
$feedback_logo = '<img src="'.$widgetsettings['feedback_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 = 9;
|
||||
|
||||
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 '.$feedback_animate.'">
|
||||
<form id="lcjak_ajaxform" method="post" action="'.$_SERVER['REQUEST_URI'].'">
|
||||
<button class="jaklcb_backtochat lcb_back" type="button" onclick="lcjak_backtochat(\'slideOutLeft\', \'feedback\', \'open\')" id="back_f_button">
|
||||
<i class="fas fa-arrow-left" aria-hidden="true"></i>
|
||||
</button>
|
||||
<button class="jaklcb_end lcb_end" type="button" onclick="lcjak_endchat()" id="send_f_button">
|
||||
<i class="fas fa-power-off" id="end_save" aria-hidden="true"></i>
|
||||
</button>
|
||||
<button class="jaklcb_close lcb_close" type="button" onclick="lcjak_closechat(\'rotateOut\', \'feedback\', \'closed\')">
|
||||
<i class="fa fa-times fa-lg" aria-hidden="true"></i>
|
||||
</button>
|
||||
<section class="jaklcb_popup'.$feedback_custom.'">
|
||||
<header class="jaklcb_popup_header">
|
||||
<aside style="flex:3">'.$feedback_logo.'
|
||||
</aside>
|
||||
<aside style="flex:9">
|
||||
<h1>'.$jkl['g24'].'</h1>
|
||||
<h3>'.$headermsg.'</h3>
|
||||
</aside>
|
||||
</header>
|
||||
<main class="jaklcb_form_main" id="lcjak_formfields">
|
||||
<div class="rating" style="width: 20rem">
|
||||
<input id="rating-5" type="radio" name="rating" value="5"/><label for="rating-5"><i class="fas fa-star fa-lg"></i></label>
|
||||
<input id="rating-4" type="radio" name="rating" value="4" checked /><label for="rating-4"><i class="fas fa-star fa-lg"></i></label>
|
||||
<input id="rating-3" type="radio" name="rating" value="3"/><label for="rating-3"><i class="fas fa-star fa-lg"></i></label>
|
||||
<input id="rating-2" type="radio" name="rating" value="2"/><label for="rating-2"><i class="fas fa-star fa-lg"></i></label>
|
||||
<input id="rating-1" type="radio" name="rating" value="1"/><label for="rating-1"><i class="fas fa-star fa-lg"></i></label>
|
||||
</div>
|
||||
<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"].'" value="">
|
||||
</div>
|
||||
<div class="jaklcb_input">
|
||||
<label for="feedback">'.$jkl["g25"].'</label>
|
||||
<textarea id="feedback" name="feedback" placeholder="'.$jkl['g25'].'"></textarea>
|
||||
</div>
|
||||
'.(JAK_SEND_TSCRIPT == 1 ? '<div class="jaklcb_input">
|
||||
<label>
|
||||
<input type="checkbox" name="send_email" id="send_email" value="1"> '.$jkl["g38"].'
|
||||
</label>
|
||||
</div>' : '<input type="hidden" name="send_email" value="0">').'
|
||||
</main>
|
||||
<input type="hidden" name="mycustomfields" value="">
|
||||
</section></form></div>';
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -0,0 +1,263 @@
|
||||
<?php
|
||||
|
||||
/*===============================================*\
|
||||
|| ############################################# ||
|
||||
|| # JAKWEB.CH / Version 2.1.4 # ||
|
||||
|| # ----------------------------------------- # ||
|
||||
|| # Copyright 2023 JAKWEB All Rights Reserved # ||
|
||||
|| ############################################# ||
|
||||
\*===============================================*/
|
||||
|
||||
// Language file goes global
|
||||
global $jkl;
|
||||
|
||||
/* 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/profile.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 */
|
||||
$profilesett = array();
|
||||
|
||||
$profilesett["previewchat"] = "preview/profile.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
|
||||
|
||||
*/
|
||||
|
||||
$profilesett["formoptions"] = array("1" => "1:#:".$jkl['cw44'].":#:0:#:0:#:profile_custom_logo", "2" => "3:#:".$jkl['cw29'].":#:Yes,No:#:0:#:profile_email_required", "3" => "3:#:".$jkl['cw30'].":#:Yes,No:#:0:#:profile_phone_required", "4" => "5:#:".$jkl['cw27'].":#:blue,green,orange,red,pink,grey:#:0:#:profile_colour_theme", "5" => "5:#:".$jkl['cw28'].":#:animate__fadeIn,animate__flash,animate__pulse,animate__headShake,animate__slideInUp,animate__slideInRight:#:0:#:profile_animation");
|
||||
|
||||
} else {
|
||||
|
||||
// Check the vars for this start
|
||||
$profile_animate = "animate__fadeIn";
|
||||
$profile_custom = "";
|
||||
$btn_custom = "blue";
|
||||
$profile_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]['profile_animation']) && !empty($widgetsettings[$widgetid]['profile_animation'])) {
|
||||
$profile_animate = $widgetsettings[$widgetid]['profile_animation'];
|
||||
}
|
||||
|
||||
// We can have custom online icon
|
||||
if (isset($widgetsettings[$widgetid]['profile_colour_theme']) && !empty($widgetsettings[$widgetid]['profile_colour_theme']) && $widgetsettings[$widgetid]['profile_colour_theme'] != "blue") {
|
||||
$profile_custom = " ".$widgetsettings[$widgetid]['profile_colour_theme'];
|
||||
$btn_custom = $widgetsettings[$widgetid]['profile_colour_theme'];
|
||||
}
|
||||
|
||||
// We can have custom online icon
|
||||
if (isset($widgetsettings[$widgetid]['profile_custom_logo']) && !empty($widgetsettings[$widgetid]['profile_custom_logo'])) {
|
||||
$profile_logo = '<img src="'.$widgetsettings[$widgetid]['profile_custom_logo'].'" class="jaklcb_popup_avatar" alt="logo">';
|
||||
}
|
||||
|
||||
// Get the languages
|
||||
$allang = "";
|
||||
foreach(jak_the_lang() as $k => $l) $allang .= '<option value="'.$k.'">'.$l.'</option>';
|
||||
$lang_stuff = '<div class="jaklcb_select">
|
||||
<label for="profile_language">'.$jkl["hd54"].'</label>
|
||||
<select name="profile_language" id="profile_language">
|
||||
'.$allang.'
|
||||
</select>
|
||||
</div>';
|
||||
|
||||
if (isset($page1) && $page1 == "bigprofile") {
|
||||
|
||||
$livecode = '<div id="lccontainersize" class="jak_chatopen_panel'.(isset($ismobile) ? $ismobile : '').' animate__animated '.$profile_animate.'">
|
||||
<form id="lcjak_ajaxform" method="post" action="'.$_SERVER['REQUEST_URI'].'">
|
||||
<section class="jaklcb_panel left'.$profile_custom.'">
|
||||
<header class="jaklcb_panel_header">
|
||||
<aside style="flex:3">'.$profile_logo.'
|
||||
</aside>
|
||||
<aside style="flex:5">
|
||||
<h1>'.$jkl['g85'].'</h1>
|
||||
</aside>
|
||||
<aside style="flex:4;text-align:right;">
|
||||
<button class="lcb_max lcb_max" onclick="lcjak_bigchatback(\'slideOutLeft\')" type="button"><i class="fas fa-arrow-left"></i></button>
|
||||
<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" style="flex:1">
|
||||
<div class="avatars">
|
||||
<div class="ava_item">
|
||||
<label>
|
||||
<span><?php echo $jkl["g18"];?></span>
|
||||
<input type="radio" name="avatar" value="/lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/standard.jpg">
|
||||
<img src="'.BASE_URL.'lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/standard.jpg" width="50" alt="avatar">
|
||||
</label>
|
||||
</div>
|
||||
<div class="ava_item">
|
||||
<label>
|
||||
<span><?php echo $jkl["g18"];?></span>
|
||||
<input type="radio" name="avatar" value="/lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/1.jpg">
|
||||
<img src="'.BASE_URL.'lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/1.jpg" width="50" alt="avatar">
|
||||
</label>
|
||||
</div>
|
||||
<div class="ava_item">
|
||||
<label>
|
||||
<span><?php echo $jkl["g18"];?></span>
|
||||
<input type="radio" name="avatar" value="/lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/2.jpg">
|
||||
<img src="'.BASE_URL.'lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/2.jpg" width="50" alt="avatar">
|
||||
</label>
|
||||
</div>
|
||||
<div class="ava_item">
|
||||
<label>
|
||||
<span><?php echo $jkl["g18"];?></span>
|
||||
<input type="radio" name="avatar" value="/lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/3.jpg">
|
||||
<img src="'.BASE_URL.'lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/3.jpg" width="50" alt="avatar">
|
||||
</label>
|
||||
</div>
|
||||
<div class="ava_item">
|
||||
<label>
|
||||
<span><?php echo $jkl["g18"];?></span>
|
||||
<input type="radio" name="avatar" value="/lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/4.jpg">
|
||||
<img src="'.BASE_URL.'lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/4.jpg" width="50" alt="avatar">
|
||||
</label>
|
||||
</div>
|
||||
<div class="ava_item">
|
||||
<label>
|
||||
<span><?php echo $jkl["g18"];?></span>
|
||||
<input type="radio" name="avatar" value="/lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/5.jpg">
|
||||
<img src="'.BASE_URL.'lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/5.jpg" width="50" alt="avatar">
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
'.$lang_stuff.'
|
||||
<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">
|
||||
<label for="email">'.$jkl["g5"].'</label>
|
||||
<input id="email" name="email" type="text" class="lcjak_input" placeholder="'.$jkl["g5"].'" value="">
|
||||
</div>
|
||||
<div class="jaklcb_input">
|
||||
<label for="phone">'.$jkl["g49"].'</label>
|
||||
<input id="phone" name="phone" type="text" class="lcjak_input" placeholder="'.$jkl["g49"].'" value="">
|
||||
</div>
|
||||
<button class="lcb_saveprofile jakbtn btn-simple btn-'.$btn_custom.'" onclick="lcjak_saveprofile()" type="button"><i class="fa fa-save" id="profile_save"></i> '.$jkl['g11'].'</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 '.$profile_animate.'">
|
||||
<form id="lcjak_ajaxform" method="post" action="'.$_SERVER['REQUEST_URI'].'">
|
||||
<button class="jaklcb_backtochat left lcb_backtochat" type="button" onclick="lcjak_smallchat(\'slideOutRight\')">
|
||||
<i class="fas fa-arrow-right"></i>
|
||||
</button>
|
||||
<button class="jaklcb_saveprofile left lcb_saveprofile" type="button" onclick="lcjak_saveprofile()">
|
||||
<i class="fa fa-save" id="profile_save"></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'.$profile_custom.'">
|
||||
<header class="jaklcb_popup_header">
|
||||
<aside style="flex:3">'.$profile_logo.'
|
||||
</aside>
|
||||
<aside style="flex:8">
|
||||
<h1>'.$jkl['g85'].'</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">
|
||||
<div class="avatars">
|
||||
<div class="ava_item">
|
||||
<label>
|
||||
<span><?php echo $jkl["g18"];?></span>
|
||||
<input type="radio" name="avatar" value="/lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/standard.jpg">
|
||||
<img src="'.BASE_URL.'lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/standard.jpg" width="50" alt="avatar">
|
||||
</label>
|
||||
</div>
|
||||
<div class="ava_item">
|
||||
<label>
|
||||
<span><?php echo $jkl["g18"];?></span>
|
||||
<input type="radio" name="avatar" value="/lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/1.jpg">
|
||||
<img src="'.BASE_URL.'lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/1.jpg" width="50" alt="avatar">
|
||||
</label>
|
||||
</div>
|
||||
<div class="ava_item">
|
||||
<label>
|
||||
<span><?php echo $jkl["g18"];?></span>
|
||||
<input type="radio" name="avatar" value="/lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/2.jpg">
|
||||
<img src="'.BASE_URL.'lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/2.jpg" width="50" alt="avatar">
|
||||
</label>
|
||||
</div>
|
||||
<div class="ava_item">
|
||||
<label>
|
||||
<span><?php echo $jkl["g18"];?></span>
|
||||
<input type="radio" name="avatar" value="/lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/3.jpg">
|
||||
<img src="'.BASE_URL.'lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/3.jpg" width="50" alt="avatar">
|
||||
</label>
|
||||
</div>
|
||||
<div class="ava_item">
|
||||
<label>
|
||||
<span><?php echo $jkl["g18"];?></span>
|
||||
<input type="radio" name="avatar" value="/lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/4.jpg">
|
||||
<img src="'.BASE_URL.'lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/4.jpg" width="50" alt="avatar">
|
||||
</label>
|
||||
</div>
|
||||
<div class="ava_item">
|
||||
<label>
|
||||
<span><?php echo $jkl["g18"];?></span>
|
||||
<input type="radio" name="avatar" value="/lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/5.jpg">
|
||||
<img src="'.BASE_URL.'lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/5.jpg" width="50" alt="avatar">
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
'.$lang_stuff.'
|
||||
<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">
|
||||
<label for="email">'.$jkl["g5"].'</label>
|
||||
<input id="email" name="email" type="text" class="lcjak_input" placeholder="'.$jkl["g5"].'" value="">
|
||||
</div>
|
||||
<div class="jaklcb_input">
|
||||
<label for="phone">'.$jkl["g49"].'</label>
|
||||
<input id="phone" name="phone" type="text" class="lcjak_input" placeholder="'.$jkl["g49"].'" value="">
|
||||
</div>
|
||||
</main>
|
||||
<input type="hidden" name="mycustomfields" value="">
|
||||
'.(!empty(JAK_COPYRIGHT_LINK) ? '<div class="copyright">'.JAK_COPYRIGHT_LINK.'</div>' : '').'
|
||||
</section></form></div>';
|
||||
} }
|
||||
?>
|
||||
@@ -0,0 +1,263 @@
|
||||
<?php
|
||||
|
||||
/*===============================================*\
|
||||
|| ############################################# ||
|
||||
|| # JAKWEB.CH / Version 2.1.4 # ||
|
||||
|| # ----------------------------------------- # ||
|
||||
|| # Copyright 2023 JAKWEB All Rights Reserved # ||
|
||||
|| ############################################# ||
|
||||
\*===============================================*/
|
||||
|
||||
// Language file goes global
|
||||
global $jkl;
|
||||
|
||||
/* 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/profile.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 */
|
||||
$profilesett = array();
|
||||
|
||||
$profilesett["previewchat"] = "preview/profile.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
|
||||
|
||||
*/
|
||||
|
||||
$profilesett["formoptions"] = array("1" => "1:#:".$jkl['cw44'].":#:0:#:0:#:profile_custom_logo", "2" => "3:#:".$jkl['cw29'].":#:Yes,No:#:0:#:profile_email_required", "3" => "3:#:".$jkl['cw30'].":#:Yes,No:#:0:#:profile_phone_required", "4" => "5:#:".$jkl['cw27'].":#:blue,green,orange,red,pink,grey:#:0:#:profile_colour_theme", "5" => "5:#:".$jkl['cw28'].":#:animate__fadeIn,animate__flash,animate__pulse,animate__headShake,animate__slideInUp,animate__slideInRight:#:0:#:profile_animation");
|
||||
|
||||
} else {
|
||||
|
||||
// Check the vars for this start
|
||||
$profile_animate = "animate__fadeIn";
|
||||
$profile_custom = "";
|
||||
$btn_custom = "blue";
|
||||
$profile_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]['profile_animation']) && !empty($widgetsettings[$widgetid]['profile_animation'])) {
|
||||
$profile_animate = $widgetsettings[$widgetid]['profile_animation'];
|
||||
}
|
||||
|
||||
// We can have custom online icon
|
||||
if (isset($widgetsettings[$widgetid]['profile_colour_theme']) && !empty($widgetsettings[$widgetid]['profile_colour_theme']) && $widgetsettings[$widgetid]['profile_colour_theme'] != "blue") {
|
||||
$profile_custom = " ".$widgetsettings[$widgetid]['profile_colour_theme'];
|
||||
$btn_custom = $widgetsettings[$widgetid]['profile_colour_theme'];
|
||||
}
|
||||
|
||||
// We can have custom online icon
|
||||
if (isset($widgetsettings[$widgetid]['profile_custom_logo']) && !empty($widgetsettings[$widgetid]['profile_custom_logo'])) {
|
||||
$profile_logo = '<img src="'.$widgetsettings[$widgetid]['profile_custom_logo'].'" class="jaklcb_popup_avatar" alt="logo">';
|
||||
}
|
||||
|
||||
// Get the languages
|
||||
$allang = "";
|
||||
foreach(jak_the_lang() as $k => $l) $allang .= '<option value="'.$k.'">'.$l.'</option>';
|
||||
$lang_stuff = '<div class="jaklcb_select">
|
||||
<label for="profile_language">'.$jkl["hd54"].'</label>
|
||||
<select name="profile_language" id="profile_language">
|
||||
'.$allang.'
|
||||
</select>
|
||||
</div>';
|
||||
|
||||
if (isset($page1) && $page1 == "bigprofile") {
|
||||
|
||||
$livecode = '<div id="lccontainersize" class="jak_chatopen_panel'.(isset($ismobile) ? $ismobile : '').' animate__animated '.$profile_animate.'">
|
||||
<form id="lcjak_ajaxform" method="post" action="'.$_SERVER['REQUEST_URI'].'">
|
||||
<section class="jaklcb_panel'.$profile_custom.'">
|
||||
<header class="jaklcb_panel_header">
|
||||
<aside style="flex:3">'.$profile_logo.'
|
||||
</aside>
|
||||
<aside style="flex:5">
|
||||
<h1>'.$jkl['g85'].'</h1>
|
||||
</aside>
|
||||
<aside style="flex:4;text-align:right;">
|
||||
<button class="lcb_max lcb_max" onclick="lcjak_bigchatback(\'slideOutLeft\')" type="button"><i class="fas fa-arrow-left"></i></button>
|
||||
<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" style="flex:1">
|
||||
<div class="avatars">
|
||||
<div class="ava_item">
|
||||
<label>
|
||||
<span><?php echo $jkl["g18"];?></span>
|
||||
<input type="radio" name="avatar" value="/lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/standard.jpg">
|
||||
<img src="'.BASE_URL.'lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/standard.jpg" width="50" alt="avatar">
|
||||
</label>
|
||||
</div>
|
||||
<div class="ava_item">
|
||||
<label>
|
||||
<span><?php echo $jkl["g18"];?></span>
|
||||
<input type="radio" name="avatar" value="/lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/1.jpg">
|
||||
<img src="'.BASE_URL.'lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/1.jpg" width="50" alt="avatar">
|
||||
</label>
|
||||
</div>
|
||||
<div class="ava_item">
|
||||
<label>
|
||||
<span><?php echo $jkl["g18"];?></span>
|
||||
<input type="radio" name="avatar" value="/lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/2.jpg">
|
||||
<img src="'.BASE_URL.'lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/2.jpg" width="50" alt="avatar">
|
||||
</label>
|
||||
</div>
|
||||
<div class="ava_item">
|
||||
<label>
|
||||
<span><?php echo $jkl["g18"];?></span>
|
||||
<input type="radio" name="avatar" value="/lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/3.jpg">
|
||||
<img src="'.BASE_URL.'lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/3.jpg" width="50" alt="avatar">
|
||||
</label>
|
||||
</div>
|
||||
<div class="ava_item">
|
||||
<label>
|
||||
<span><?php echo $jkl["g18"];?></span>
|
||||
<input type="radio" name="avatar" value="/lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/4.jpg">
|
||||
<img src="'.BASE_URL.'lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/4.jpg" width="50" alt="avatar">
|
||||
</label>
|
||||
</div>
|
||||
<div class="ava_item">
|
||||
<label>
|
||||
<span><?php echo $jkl["g18"];?></span>
|
||||
<input type="radio" name="avatar" value="/lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/5.jpg">
|
||||
<img src="'.BASE_URL.'lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/5.jpg" width="50" alt="avatar">
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
'.$lang_stuff.'
|
||||
<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">
|
||||
<label for="email">'.$jkl["g5"].'</label>
|
||||
<input id="email" name="email" type="text" class="lcjak_input" placeholder="'.$jkl["g5"].'" value="">
|
||||
</div>
|
||||
<div class="jaklcb_input">
|
||||
<label for="phone">'.$jkl["g49"].'</label>
|
||||
<input id="phone" name="phone" type="text" class="lcjak_input" placeholder="'.$jkl["g49"].'" value="">
|
||||
</div>
|
||||
<button class="lcb_saveprofile jakbtn btn-simple btn-'.$btn_custom.'" onclick="lcjak_saveprofile()" type="button"><i class="fa fa-save" id="profile_save"></i> '.$jkl['g11'].'</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 '.$profile_animate.'">
|
||||
<form id="lcjak_ajaxform" method="post" action="'.$_SERVER['REQUEST_URI'].'">
|
||||
<button class="jaklcb_backtochat lcb_backtochat" type="button" onclick="lcjak_smallchat(\'slideOutLeft\')">
|
||||
<i class="fas fa-arrow-left"></i>
|
||||
</button>
|
||||
<button class="jaklcb_saveprofile lcb_saveprofile" type="button" onclick="lcjak_saveprofile()">
|
||||
<i class="fa fa-save" id="profile_save"></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'.$profile_custom.'">
|
||||
<header class="jaklcb_popup_header">
|
||||
<aside style="flex:3">'.$profile_logo.'
|
||||
</aside>
|
||||
<aside style="flex:8">
|
||||
<h1>'.$jkl['g85'].'</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">
|
||||
<div class="avatars">
|
||||
<div class="ava_item">
|
||||
<label>
|
||||
<span><?php echo $jkl["g18"];?></span>
|
||||
<input type="radio" name="avatar" value="/lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/standard.jpg">
|
||||
<img src="'.BASE_URL.'lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/standard.jpg" width="50" alt="avatar">
|
||||
</label>
|
||||
</div>
|
||||
<div class="ava_item">
|
||||
<label>
|
||||
<span><?php echo $jkl["g18"];?></span>
|
||||
<input type="radio" name="avatar" value="/lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/1.jpg">
|
||||
<img src="'.BASE_URL.'lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/1.jpg" width="50" alt="avatar">
|
||||
</label>
|
||||
</div>
|
||||
<div class="ava_item">
|
||||
<label>
|
||||
<span><?php echo $jkl["g18"];?></span>
|
||||
<input type="radio" name="avatar" value="/lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/2.jpg">
|
||||
<img src="'.BASE_URL.'lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/2.jpg" width="50" alt="avatar">
|
||||
</label>
|
||||
</div>
|
||||
<div class="ava_item">
|
||||
<label>
|
||||
<span><?php echo $jkl["g18"];?></span>
|
||||
<input type="radio" name="avatar" value="/lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/3.jpg">
|
||||
<img src="'.BASE_URL.'lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/3.jpg" width="50" alt="avatar">
|
||||
</label>
|
||||
</div>
|
||||
<div class="ava_item">
|
||||
<label>
|
||||
<span><?php echo $jkl["g18"];?></span>
|
||||
<input type="radio" name="avatar" value="/lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/4.jpg">
|
||||
<img src="'.BASE_URL.'lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/4.jpg" width="50" alt="avatar">
|
||||
</label>
|
||||
</div>
|
||||
<div class="ava_item">
|
||||
<label>
|
||||
<span><?php echo $jkl["g18"];?></span>
|
||||
<input type="radio" name="avatar" value="/lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/5.jpg">
|
||||
<img src="'.BASE_URL.'lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/5.jpg" width="50" alt="avatar">
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
'.$lang_stuff.'
|
||||
<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">
|
||||
<label for="email">'.$jkl["g5"].'</label>
|
||||
<input id="email" name="email" type="text" class="lcjak_input" placeholder="'.$jkl["g5"].'" value="">
|
||||
</div>
|
||||
<div class="jaklcb_input">
|
||||
<label for="phone">'.$jkl["g49"].'</label>
|
||||
<input id="phone" name="phone" type="text" class="lcjak_input" placeholder="'.$jkl["g49"].'" value="">
|
||||
</div>
|
||||
</main>
|
||||
<input type="hidden" name="mycustomfields" value="">
|
||||
'.(!empty(JAK_COPYRIGHT_LINK) ? '<div class="copyright">'.JAK_COPYRIGHT_LINK.'</div>' : '').'
|
||||
</section></form></div>';
|
||||
} }
|
||||
?>
|
||||
@@ -0,0 +1,178 @@
|
||||
<?php
|
||||
|
||||
/*===============================================*\
|
||||
|| ############################################# ||
|
||||
|| # JAKWEB.CH / Version 2.1.4 # ||
|
||||
|| # ----------------------------------------- # ||
|
||||
|| # Copyright 2023 JAKWEB All Rights Reserved # ||
|
||||
|| ############################################# ||
|
||||
\*===============================================*/
|
||||
|
||||
// Language file goes global
|
||||
global $jkl;
|
||||
|
||||
/* 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/profile.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 */
|
||||
$profilesett = array();
|
||||
|
||||
$profilesett["previewchat"] = "preview/profile.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
|
||||
|
||||
*/
|
||||
|
||||
$profilesett["formoptions"] = array("1" => "1:#:".$jkl['cw44'].":#:0:#:0:#:profile_custom_logo", "2" => "3:#:".$jkl['cw29'].":#:Yes,No:#:0:#:profile_email_required", "3" => "3:#:".$jkl['cw30'].":#:Yes,No:#:0:#:profile_phone_required", "4" => "5:#:".$jkl['cw27'].":#:blue,green,orange,red,pink,grey:#:0:#:profile_colour_theme", "5" => "5:#:".$jkl['cw28'].":#:animate__fadeIn,animate__flash,animate__pulse,animate__headShake,animate__slideInUp,animate__slideInRight:#:0:#:profile_animation");
|
||||
|
||||
} else {
|
||||
|
||||
// Check the vars for this start
|
||||
$profile_animate = "animate__fadeIn";
|
||||
$profile_custom = "";
|
||||
$btn_custom = "blue";
|
||||
$profile_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['profile_animation']) && !empty($widgetsettings['profile_animation'])) {
|
||||
$profile_animate = $widgetsettings['profile_animation'];
|
||||
}
|
||||
|
||||
// We can have custom online icon
|
||||
if (isset($widgetsettings['profile_colour_theme']) && !empty($widgetsettings['profile_colour_theme']) && $widgetsettings['profile_colour_theme'] != "blue") {
|
||||
$profile_custom = " ".$widgetsettings['profile_colour_theme'];
|
||||
$btn_custom = $widgetsettings['profile_colour_theme'];
|
||||
}
|
||||
|
||||
// We can have custom online icon
|
||||
if (isset($widgetsettings['profile_custom_logo']) && !empty($widgetsettings['profile_custom_logo'])) {
|
||||
$profile_logo = '<img src="'.$widgetsettings['profile_custom_logo'].'" class="jaklcb_popup_avatar" alt="logo">';
|
||||
}
|
||||
|
||||
// Get the languages
|
||||
$allang = "";
|
||||
foreach(jak_the_lang() as $k => $l) $allang .= '<option value="'.$k.'">'.$l.'</option>';
|
||||
$lang_stuff = '<div class="jaklcb_select">
|
||||
<label for="profile_language">'.$jkl["hd54"].'</label>
|
||||
<select name="profile_language" id="profile_language">
|
||||
'.$allang.'
|
||||
</select>
|
||||
</div>';
|
||||
|
||||
// We only go small in this template
|
||||
$livecode = '<div id="lccontainersize" class="jak_chatopen_sm'.(isset($ismobile) ? $ismobile : '').' animate__animated '.$profile_animate.'">
|
||||
<form id="lcjak_ajaxform" method="post" action="'.$_SERVER['REQUEST_URI'].'">
|
||||
<button class="jaklcb_backtochat left lcb_backtochat" type="button" onclick="lcjak_smallchat(\'slideOutRight\')">
|
||||
<i class="fas fa-arrow-right" aria-hidden="true"></i>
|
||||
</button>
|
||||
<button class="jaklcb_saveprofile left lcb_saveprofile" type="button" onclick="lcjak_saveprofile()">
|
||||
<i class="fa fa-save" id="profile_save" 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'.$profile_custom.'">
|
||||
<header class="jaklcb_popup_header">
|
||||
<aside style="flex:3">'.$profile_logo.'
|
||||
</aside>
|
||||
<aside style="flex:8">
|
||||
<h1>'.$jkl['g85'].'</h1>
|
||||
</aside>
|
||||
</header>
|
||||
<main class="jaklcb_form_main">
|
||||
<div class="avatars">
|
||||
<div class="ava_item">
|
||||
<label>
|
||||
<span><?php echo $jkl["g18"];?></span>
|
||||
<input type="radio" name="avatar" value="/lctemplate/business/avatar/'.$jakwidget['avatarset'].'/standard.jpg">
|
||||
<img src="'.BASE_URL.'lctemplate/business/avatar/'.$jakwidget['avatarset'].'/standard.jpg" width="50" alt="avatar">
|
||||
</label>
|
||||
</div>
|
||||
<div class="ava_item">
|
||||
<label>
|
||||
<span><?php echo $jkl["g18"];?></span>
|
||||
<input type="radio" name="avatar" value="/lctemplate/business/avatar/'.$jakwidget['avatarset'].'/1.jpg">
|
||||
<img src="'.BASE_URL.'lctemplate/business/avatar/'.$jakwidget['avatarset'].'/1.jpg" width="50" alt="avatar">
|
||||
</label>
|
||||
</div>
|
||||
<div class="ava_item">
|
||||
<label>
|
||||
<span><?php echo $jkl["g18"];?></span>
|
||||
<input type="radio" name="avatar" value="/lctemplate/business/avatar/'.$jakwidget['avatarset'].'/2.jpg">
|
||||
<img src="'.BASE_URL.'lctemplate/business/avatar/'.$jakwidget['avatarset'].'/2.jpg" width="50" alt="avatar">
|
||||
</label>
|
||||
</div>
|
||||
<div class="ava_item">
|
||||
<label>
|
||||
<span><?php echo $jkl["g18"];?></span>
|
||||
<input type="radio" name="avatar" value="/lctemplate/business/avatar/'.$jakwidget['avatarset'].'/3.jpg">
|
||||
<img src="'.BASE_URL.'lctemplate/business/avatar/'.$jakwidget['avatarset'].'/3.jpg" width="50" alt="avatar">
|
||||
</label>
|
||||
</div>
|
||||
<div class="ava_item">
|
||||
<label>
|
||||
<span><?php echo $jkl["g18"];?></span>
|
||||
<input type="radio" name="avatar" value="/lctemplate/business/avatar/'.$jakwidget['avatarset'].'/4.jpg">
|
||||
<img src="'.BASE_URL.'lctemplate/business/avatar/'.$jakwidget['avatarset'].'/4.jpg" width="50" alt="avatar">
|
||||
</label>
|
||||
</div>
|
||||
<div class="ava_item">
|
||||
<label>
|
||||
<span><?php echo $jkl["g18"];?></span>
|
||||
<input type="radio" name="avatar" value="/lctemplate/business/avatar/'.$jakwidget['avatarset'].'/5.jpg">
|
||||
<img src="'.BASE_URL.'lctemplate/business/avatar/'.$jakwidget['avatarset'].'/5.jpg" width="50" alt="avatar">
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
'.$lang_stuff.'
|
||||
<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">
|
||||
<label for="email">'.$jkl["g5"].'</label>
|
||||
<input id="email" name="email" type="text" class="lcjak_input" placeholder="'.$jkl["g5"].'" value="">
|
||||
</div>
|
||||
<div class="jaklcb_input">
|
||||
<label for="phone">'.$jkl["g49"].'</label>
|
||||
<input id="phone" name="phone" type="text" class="lcjak_input" placeholder="'.$jkl["g49"].'" value="">
|
||||
</div>
|
||||
</main>
|
||||
<input type="hidden" name="mycustomfields" value="">
|
||||
</section></form></div>';
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -0,0 +1,178 @@
|
||||
<?php
|
||||
|
||||
/*===============================================*\
|
||||
|| ############################################# ||
|
||||
|| # JAKWEB.CH / Version 2.1.4 # ||
|
||||
|| # ----------------------------------------- # ||
|
||||
|| # Copyright 2023 JAKWEB All Rights Reserved # ||
|
||||
|| ############################################# ||
|
||||
\*===============================================*/
|
||||
|
||||
// Language file goes global
|
||||
global $jkl;
|
||||
|
||||
/* 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/profile.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 */
|
||||
$profilesett = array();
|
||||
|
||||
$profilesett["previewchat"] = "preview/profile.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
|
||||
|
||||
*/
|
||||
|
||||
$profilesett["formoptions"] = array("1" => "1:#:".$jkl['cw44'].":#:0:#:0:#:profile_custom_logo", "2" => "3:#:".$jkl['cw29'].":#:Yes,No:#:0:#:profile_email_required", "3" => "3:#:".$jkl['cw30'].":#:Yes,No:#:0:#:profile_phone_required", "4" => "5:#:".$jkl['cw27'].":#:blue,green,orange,red,pink,grey:#:0:#:profile_colour_theme", "5" => "5:#:".$jkl['cw28'].":#:animate__fadeIn,animate__flash,animate__pulse,animate__headShake,animate__slideInUp,animate__slideInRight:#:0:#:profile_animation");
|
||||
|
||||
} else {
|
||||
|
||||
// Check the vars for this start
|
||||
$profile_animate = "animate__fadeIn";
|
||||
$profile_custom = "";
|
||||
$btn_custom = "blue";
|
||||
$profile_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['profile_animation']) && !empty($widgetsettings['profile_animation'])) {
|
||||
$profile_animate = $widgetsettings['profile_animation'];
|
||||
}
|
||||
|
||||
// We can have custom online icon
|
||||
if (isset($widgetsettings['profile_colour_theme']) && !empty($widgetsettings['profile_colour_theme']) && $widgetsettings['profile_colour_theme'] != "blue") {
|
||||
$profile_custom = " ".$widgetsettings['profile_colour_theme'];
|
||||
$btn_custom = $widgetsettings['profile_colour_theme'];
|
||||
}
|
||||
|
||||
// We can have custom online icon
|
||||
if (isset($widgetsettings['profile_custom_logo']) && !empty($widgetsettings['profile_custom_logo'])) {
|
||||
$profile_logo = '<img src="'.$widgetsettings['profile_custom_logo'].'" class="jaklcb_popup_avatar" alt="logo">';
|
||||
}
|
||||
|
||||
// Get the languages
|
||||
$allang = "";
|
||||
foreach(jak_the_lang() as $k => $l) $allang .= '<option value="'.$k.'">'.$l.'</option>';
|
||||
$lang_stuff = '<div class="jaklcb_select">
|
||||
<label for="profile_language">'.$jkl["hd54"].'</label>
|
||||
<select name="profile_language" id="profile_language">
|
||||
'.$allang.'
|
||||
</select>
|
||||
</div>';
|
||||
|
||||
// We only go small in this template
|
||||
$livecode = '<div id="lccontainersize" class="jak_chatopen_sm'.(isset($ismobile) ? $ismobile : '').' animate__animated '.$profile_animate.'">
|
||||
<form id="lcjak_ajaxform" method="post" action="'.$_SERVER['REQUEST_URI'].'">
|
||||
<button class="jaklcb_backtochat lcb_backtochat" type="button" onclick="lcjak_smallchat(\'slideOutLeft\')">
|
||||
<i class="fas fa-arrow-left" aria-hidden="true"></i>
|
||||
</button>
|
||||
<button class="jaklcb_saveprofile lcb_saveprofile" type="button" onclick="lcjak_saveprofile()">
|
||||
<i class="fa fa-save" id="profile_save" 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'.$profile_custom.'">
|
||||
<header class="jaklcb_popup_header">
|
||||
<aside style="flex:3">'.$profile_logo.'
|
||||
</aside>
|
||||
<aside style="flex:9">
|
||||
<h1>'.$jkl['g85'].'</h1>
|
||||
</aside>
|
||||
</header>
|
||||
<main class="jaklcb_form_main">
|
||||
<div class="avatars">
|
||||
<div class="ava_item">
|
||||
<label>
|
||||
<span><?php echo $jkl["g18"];?></span>
|
||||
<input type="radio" name="avatar" value="/lctemplate/business/avatar/'.$jakwidget['avatarset'].'/standard.jpg">
|
||||
<img src="'.BASE_URL.'lctemplate/business/avatar/'.$jakwidget['avatarset'].'/standard.jpg" width="50" alt="avatar">
|
||||
</label>
|
||||
</div>
|
||||
<div class="ava_item">
|
||||
<label>
|
||||
<span><?php echo $jkl["g18"];?></span>
|
||||
<input type="radio" name="avatar" value="/lctemplate/business/avatar/'.$jakwidget['avatarset'].'/1.jpg">
|
||||
<img src="'.BASE_URL.'lctemplate/business/avatar/'.$jakwidget['avatarset'].'/1.jpg" width="50" alt="avatar">
|
||||
</label>
|
||||
</div>
|
||||
<div class="ava_item">
|
||||
<label>
|
||||
<span><?php echo $jkl["g18"];?></span>
|
||||
<input type="radio" name="avatar" value="/lctemplate/business/avatar/'.$jakwidget['avatarset'].'/2.jpg">
|
||||
<img src="'.BASE_URL.'lctemplate/business/avatar/'.$jakwidget['avatarset'].'/2.jpg" width="50" alt="avatar">
|
||||
</label>
|
||||
</div>
|
||||
<div class="ava_item">
|
||||
<label>
|
||||
<span><?php echo $jkl["g18"];?></span>
|
||||
<input type="radio" name="avatar" value="/lctemplate/business/avatar/'.$jakwidget['avatarset'].'/3.jpg">
|
||||
<img src="'.BASE_URL.'lctemplate/business/avatar/'.$jakwidget['avatarset'].'/3.jpg" width="50" alt="avatar">
|
||||
</label>
|
||||
</div>
|
||||
<div class="ava_item">
|
||||
<label>
|
||||
<span><?php echo $jkl["g18"];?></span>
|
||||
<input type="radio" name="avatar" value="/lctemplate/business/avatar/'.$jakwidget['avatarset'].'/4.jpg">
|
||||
<img src="'.BASE_URL.'lctemplate/business/avatar/'.$jakwidget['avatarset'].'/4.jpg" width="50" alt="avatar">
|
||||
</label>
|
||||
</div>
|
||||
<div class="ava_item">
|
||||
<label>
|
||||
<span><?php echo $jkl["g18"];?></span>
|
||||
<input type="radio" name="avatar" value="/lctemplate/business/avatar/'.$jakwidget['avatarset'].'/5.jpg">
|
||||
<img src="'.BASE_URL.'lctemplate/business/avatar/'.$jakwidget['avatarset'].'/5.jpg" width="50" alt="avatar">
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
'.$lang_stuff.'
|
||||
<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">
|
||||
<label for="email">'.$jkl["g5"].'</label>
|
||||
<input id="email" name="email" type="text" class="lcjak_input" placeholder="'.$jkl["g5"].'" value="">
|
||||
</div>
|
||||
<div class="jaklcb_input">
|
||||
<label for="phone">'.$jkl["g49"].'</label>
|
||||
<input id="phone" name="phone" type="text" class="lcjak_input" placeholder="'.$jkl["g49"].'" value="">
|
||||
</div>
|
||||
</main>
|
||||
<input type="hidden" name="mycustomfields" value="">
|
||||
</section></form></div>';
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -0,0 +1,329 @@
|
||||
<?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;left:0;";
|
||||
$wtplsett["customjs"] = "js/start.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 */
|
||||
$startsett = array();
|
||||
|
||||
$startsett["previewchat"] = "preview/advanced_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
|
||||
|
||||
*/
|
||||
|
||||
$startsett["formoptions"] = array("1" => "1:#:".$jkl['cw24'].":#:0:#:0:#:start_custom_logo", "2" => "3:#:".$jkl['cw38'].":#:Yes,No:#:0:#:start_email_required", "3" => "3:#:".$jkl['cw39'].":#:Yes,No:#:0:#:start_phone_required", "4" => "3:#:".$jkl['cw43'].":#:Yes,No:#:0:#:start_show_avatars", "5" => "5:#:".$jkl['cw22'].":#:blue,green,orange,red,pink,grey:#:0:#:start_colour_theme", "6" => "5:#:".$jkl['cw23'].":#:animate__fadeIn,animate__flash,animate__pulse,animate__headShake,animate__slideInUp,animate__slideInRight:#:0:#:start_animation");
|
||||
|
||||
} else {
|
||||
|
||||
// Check the vars for this start
|
||||
$start_animate = "animate__fadeIn";
|
||||
$start_custom = "";
|
||||
$btn_custom = "blue";
|
||||
$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]['start_animation']) && !empty($widgetsettings[$widgetid]['start_animation'])) {
|
||||
$start_animate = $widgetsettings[$widgetid]['start_animation'];
|
||||
}
|
||||
|
||||
// We can have custom online icon
|
||||
if (isset($widgetsettings[$widgetid]['start_colour_theme']) && !empty($widgetsettings[$widgetid]['start_colour_theme']) && $widgetsettings[$widgetid]['start_colour_theme'] != "blue") {
|
||||
$start_custom = " ".$widgetsettings[$widgetid]['start_colour_theme'];
|
||||
$btn_custom = $widgetsettings[$widgetid]['start_colour_theme'];
|
||||
}
|
||||
|
||||
// We can have custom online icon
|
||||
if (isset($widgetsettings[$widgetid]['start_custom_logo']) && !empty($widgetsettings[$widgetid]['start_custom_logo'])) {
|
||||
$start_logo = '<img src="'.$widgetsettings[$widgetid]['start_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 = 7;
|
||||
|
||||
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 collect the departments
|
||||
$dep_direct = 0;
|
||||
if (isset($jakwidget[$widgetid]['depid']) && is_numeric($jakwidget[$widgetid]['depid']) && $jakwidget[$widgetid]['depid'] != 0) {
|
||||
$dep_direct = 1;
|
||||
foreach ($online_op as $d) {
|
||||
if (in_array($jakwidget[$widgetid]['depid'], $d)) {
|
||||
$dep_direct = $jakwidget[$widgetid]['depid'];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Operator ID if set
|
||||
$op_direct = 0;
|
||||
if (isset($jakwidget[$widgetid]['singleopid']) && is_numeric($jakwidget[$widgetid]['singleopid']) && $jakwidget[$widgetid]['singleopid'] != 0) $op_direct = $jakwidget[$widgetid]['singleopid'];
|
||||
|
||||
$dep_all = '';
|
||||
if ($op_direct == 0 && $dep_direct != 0 && is_numeric($dep_direct)) {
|
||||
$dep_stuff = '<input type="hidden" name="start_department" value="'.$dep_direct.'">';
|
||||
} elseif ($op_direct == 0 && count($online_op) > 1) {
|
||||
|
||||
foreach($online_op as $v) { if (in_array($v["id"], explode(',', $jakwidget[$widgetid]["depid"])) || $jakwidget[$widgetid]["depid"] == 0) {
|
||||
$dep_all .= '<option value="'.$v["id"].'"'.(isset($_REQUEST["start_department"]) && $_REQUEST["start_department"] == $v["id"] ? ' selected' : '').'>'.$v["title"].'</option>';
|
||||
} }
|
||||
|
||||
$dep_stuff = '<div class="jaklcb_select">
|
||||
<label for="start_department">'.$jkl["g30"].'</label>
|
||||
<select name="start_department" id="start_department">'.$dep_all.'</select>
|
||||
</div>';
|
||||
} else {
|
||||
$dep_stuff = '<input type="hidden" name="start_department" value="'.$online_op[0]["id"].'"><input type="hidden" name="start_op_direct" value="'.$op_direct.'">';
|
||||
}
|
||||
|
||||
// We have a closed chat and showing the success message, before we go back to the chat form
|
||||
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>
|
||||
'.(isset($widgetsettings[$widgetid]['start_show_avatars']) && $widgetsettings[$widgetid]['start_show_avatars'] == "Yes" ? '
|
||||
<div class="avatars">
|
||||
<div class="ava_item">
|
||||
<label>
|
||||
<span><?php echo $jkl["g18"];?></span>
|
||||
<input type="radio" name="avatar" value="/lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/standard.jpg">
|
||||
<img src="'.BASE_URL.'lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/standard.jpg" width="50" alt="avatar">
|
||||
</label>
|
||||
</div>
|
||||
<div class="ava_item">
|
||||
<label>
|
||||
<span><?php echo $jkl["g18"];?></span>
|
||||
<input type="radio" name="avatar" value="/lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/1.jpg">
|
||||
<img src="'.BASE_URL.'lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/1.jpg" width="50" alt="avatar">
|
||||
</label>
|
||||
</div>
|
||||
<div class="ava_item">
|
||||
<label>
|
||||
<span><?php echo $jkl["g18"];?></span>
|
||||
<input type="radio" name="avatar" value="/lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/2.jpg">
|
||||
<img src="'.BASE_URL.'lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/2.jpg" width="50" alt="avatar">
|
||||
</label>
|
||||
</div>
|
||||
<div class="ava_item">
|
||||
<label>
|
||||
<span><?php echo $jkl["g18"];?></span>
|
||||
<input type="radio" name="avatar" value="/lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/3.jpg">
|
||||
<img src="'.BASE_URL.'lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/3.jpg" width="50" alt="avatar">
|
||||
</label>
|
||||
</div>
|
||||
<div class="ava_item">
|
||||
<label>
|
||||
<span><?php echo $jkl["g18"];?></span>
|
||||
<input type="radio" name="avatar" value="/lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/4.jpg">
|
||||
<img src="'.BASE_URL.'lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/4.jpg" width="50" alt="avatar">
|
||||
</label>
|
||||
</div>
|
||||
<div class="ava_item">
|
||||
<label>
|
||||
<span><?php echo $jkl["g18"];?></span>
|
||||
<input type="radio" name="avatar" value="/lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/5.jpg">
|
||||
<img src="'.BASE_URL.'lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/5.jpg" width="50" alt="avatar">
|
||||
</label>
|
||||
</div>
|
||||
</div>' : '').'
|
||||
'.$dep_stuff.'
|
||||
<div class="jaklcb_input">
|
||||
<label for="start_name">'.$jkl["g4"].'</label>
|
||||
<input id="start_name" name="start_name" type="text" class="lcjak_input" placeholder="'.$jkl["g4"].'" value="'.(isset($_REQUEST["name"]) ? $_REQUEST["name"] : '').'">
|
||||
</div>
|
||||
<div class="jaklcb_input">
|
||||
<label for="start_email">'.$jkl["g5"].'</label>
|
||||
<input id="start_email" name="start_email" type="text" class="lcjak_input" placeholder="'.$jkl["g5"].'" value="'.(isset($_REQUEST["start_email"]) ? $_REQUEST["start_email"] : '').'">
|
||||
</div>
|
||||
<div class="jaklcb_input">
|
||||
<label for="start_phone">'.$jkl["g49"].'</label>
|
||||
<input id="start_phone" name="start_phone" type="text" class="lcjak_input" placeholder="'.$jkl["g49"].'" value="'.(isset($_REQUEST["start_phone"]) ? $_REQUEST["start_phone"] : '').'">
|
||||
</div>
|
||||
<div class="jaklcb_input">
|
||||
<label for="start_chat_msg">'.$jkl["g71"].'</label>
|
||||
<textarea id="start_chat_msg" name="start_chat_msg" placeholder="'.$jkl['g71'].'">'.(isset($_REQUEST["start_chat_msg"]) ? $_REQUEST["start_chat_msg"] : '').'</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_startchat jakbtn btn-simple btn-'.$btn_custom.'" onclick="lcjak_startChat()" type="button"><i class="fa fa-paper-plane" id="start_chat_btn"></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 '.$start_animate.'">
|
||||
<button class="jaklcb_sendcontact left lcb_startchat" type="button" onclick="lcjak_startChat()">
|
||||
<i class="fa fa-paper-plane" id="start_chat_btn"></i>
|
||||
</button>
|
||||
<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>
|
||||
'.(isset($widgetsettings[$widgetid]['start_show_avatars']) && $widgetsettings[$widgetid]['start_show_avatars'] == "Yes" ? '
|
||||
<div class="avatars">
|
||||
<div class="ava_item">
|
||||
<label>
|
||||
<span><?php echo $jkl["g18"];?></span>
|
||||
<input type="radio" name="avatar" value="/lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/standard.jpg">
|
||||
<img src="'.BASE_URL.'lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/standard.jpg" width="50" alt="avatar">
|
||||
</label>
|
||||
</div>
|
||||
<div class="ava_item">
|
||||
<label>
|
||||
<span><?php echo $jkl["g18"];?></span>
|
||||
<input type="radio" name="avatar" value="/lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/1.jpg">
|
||||
<img src="'.BASE_URL.'lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/1.jpg" width="50" alt="avatar">
|
||||
</label>
|
||||
</div>
|
||||
<div class="ava_item">
|
||||
<label>
|
||||
<span><?php echo $jkl["g18"];?></span>
|
||||
<input type="radio" name="avatar" value="/lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/2.jpg">
|
||||
<img src="'.BASE_URL.'lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/2.jpg" width="50" alt="avatar">
|
||||
</label>
|
||||
</div>
|
||||
<div class="ava_item">
|
||||
<label>
|
||||
<span><?php echo $jkl["g18"];?></span>
|
||||
<input type="radio" name="avatar" value="/lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/3.jpg">
|
||||
<img src="'.BASE_URL.'lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/3.jpg" width="50" alt="avatar">
|
||||
</label>
|
||||
</div>
|
||||
<div class="ava_item">
|
||||
<label>
|
||||
<span><?php echo $jkl["g18"];?></span>
|
||||
<input type="radio" name="avatar" value="/lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/4.jpg">
|
||||
<img src="'.BASE_URL.'lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/4.jpg" width="50" alt="avatar">
|
||||
</label>
|
||||
</div>
|
||||
<div class="ava_item">
|
||||
<label>
|
||||
<span><?php echo $jkl["g18"];?></span>
|
||||
<input type="radio" name="avatar" value="/lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/5.jpg">
|
||||
<img src="'.BASE_URL.'lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/5.jpg" width="50" alt="avatar">
|
||||
</label>
|
||||
</div>
|
||||
</div>' : '').'
|
||||
'.$dep_stuff.'
|
||||
<div class="input_group">
|
||||
<div class="jaklcb_input">
|
||||
<label for="start_name">'.$jkl["g4"].'</label>
|
||||
<input id="start_name" name="start_name" type="text" class="lcjak_input" placeholder="'.$jkl["g4"].'" value="'.(isset($_REQUEST["start_name"]) ? $_REQUEST["start_name"] : '').'">
|
||||
</div>
|
||||
<div class="jaklcb_input flex-right">
|
||||
<label for="start_email">'.$jkl["g5"].'</label>
|
||||
<input id="start_email" name="start_email" type="text" class="lcjak_input" placeholder="'.$jkl["g5"].'" value="'.(isset($_REQUEST["start_email"]) ? $_REQUEST["start_email"] : '').'">
|
||||
</div>
|
||||
</div>
|
||||
<div class="jaklcb_input">
|
||||
<label for="start_phone">'.$jkl["g49"].'</label>
|
||||
<input id="start_phone" name="start_phone" type="text" class="lcjak_input" placeholder="'.$jkl["g49"].'" value="'.(isset($_REQUEST["start_phone"]) ? $_REQUEST["start_phone"] : '').'">
|
||||
</div>
|
||||
<div class="jaklcb_input">
|
||||
<label for="start_chat_msg">'.$jkl["g71"].'</label>
|
||||
<textarea id="start_chat_msg" name="start_chat_msg" placeholder="'.$jkl['g71'].'">'.(isset($_REQUEST["start_chat_msg"]) ? $_REQUEST["start_chat_msg"] : '').'</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,329 @@
|
||||
<?php
|
||||
|
||||
/*===============================================*\
|
||||
|| ############################################# ||
|
||||
|| # JAKWEB.CH / Version 2.1.3 # ||
|
||||
|| # ----------------------------------------- # ||
|
||||
|| # 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/start.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 */
|
||||
$startsett = array();
|
||||
|
||||
$startsett["previewchat"] = "preview/advanced_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
|
||||
|
||||
*/
|
||||
|
||||
$startsett["formoptions"] = array("1" => "1:#:".$jkl['cw24'].":#:0:#:0:#:start_custom_logo", "2" => "3:#:".$jkl['cw38'].":#:Yes,No:#:0:#:start_email_required", "3" => "3:#:".$jkl['cw39'].":#:Yes,No:#:0:#:start_phone_required", "4" => "3:#:".$jkl['cw43'].":#:Yes,No:#:0:#:start_show_avatars", "5" => "5:#:".$jkl['cw22'].":#:blue,green,orange,red,pink,grey:#:0:#:start_colour_theme", "6" => "5:#:".$jkl['cw23'].":#:animate__fadeIn,animate__flash,animate__pulse,animate__headShake,animate__slideInUp,animate__slideInRight:#:0:#:start_animation");
|
||||
|
||||
} else {
|
||||
|
||||
// Check the vars for this start
|
||||
$start_animate = "animate__fadeIn";
|
||||
$start_custom = "";
|
||||
$btn_custom = "blue";
|
||||
$start_logo = '<i class="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]['start_animation']) && !empty($widgetsettings[$widgetid]['start_animation'])) {
|
||||
$start_animate = $widgetsettings[$widgetid]['start_animation'];
|
||||
}
|
||||
|
||||
// We can have custom online icon
|
||||
if (isset($widgetsettings[$widgetid]['start_colour_theme']) && !empty($widgetsettings[$widgetid]['start_colour_theme']) && $widgetsettings[$widgetid]['start_colour_theme'] != "blue") {
|
||||
$start_custom = " ".$widgetsettings[$widgetid]['start_colour_theme'];
|
||||
$btn_custom = $widgetsettings[$widgetid]['start_colour_theme'];
|
||||
}
|
||||
|
||||
// We can have custom online icon
|
||||
if (isset($widgetsettings[$widgetid]['start_custom_logo']) && !empty($widgetsettings[$widgetid]['start_custom_logo'])) {
|
||||
$start_logo = '<img src="'.$widgetsettings[$widgetid]['start_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 = 7;
|
||||
|
||||
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 collect the departments
|
||||
$dep_direct = 0;
|
||||
if (isset($jakwidget[$widgetid]['depid']) && is_numeric($jakwidget[$widgetid]['depid']) && $jakwidget[$widgetid]['depid'] != 0) {
|
||||
$dep_direct = 1;
|
||||
foreach ($online_op as $d) {
|
||||
if (in_array($jakwidget[$widgetid]['depid'], $d)) {
|
||||
$dep_direct = $jakwidget[$widgetid]['depid'];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Operator ID if set
|
||||
$op_direct = 0;
|
||||
if (isset($jakwidget[$widgetid]['singleopid']) && is_numeric($jakwidget[$widgetid]['singleopid']) && $jakwidget[$widgetid]['singleopid'] != 0) $op_direct = $jakwidget[$widgetid]['singleopid'];
|
||||
|
||||
$dep_all = '';
|
||||
if ($op_direct == 0 && $dep_direct != 0 && is_numeric($dep_direct)) {
|
||||
$dep_stuff = '<input type="hidden" name="start_department" value="'.$dep_direct.'">';
|
||||
} elseif ($op_direct == 0 && count($online_op) > 1) {
|
||||
|
||||
foreach($online_op as $v) { if (in_array($v["id"], explode(',', $jakwidget[$widgetid]["depid"])) || $jakwidget[$widgetid]["depid"] == 0) {
|
||||
$dep_all .= '<option value="'.$v["id"].'"'.(isset($_REQUEST["start_department"]) && $_REQUEST["start_department"] == $v["id"] ? ' selected' : '').'>'.$v["title"].'</option>';
|
||||
} }
|
||||
|
||||
$dep_stuff = '<div class="jaklcb_select">
|
||||
<label for="start_department">'.$jkl["g30"].'</label>
|
||||
<select name="start_department" id="start_department">'.$dep_all.'</select>
|
||||
</div>';
|
||||
} else {
|
||||
$dep_stuff = '<input type="hidden" name="start_department" value="'.$online_op[0]["id"].'"><input type="hidden" name="start_op_direct" value="'.$op_direct.'">';
|
||||
}
|
||||
|
||||
// We go big
|
||||
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>
|
||||
'.(isset($widgetsettings[$widgetid]['start_show_avatars']) && $widgetsettings[$widgetid]['start_show_avatars'] == "Yes" ? '
|
||||
<div class="avatars">
|
||||
<div class="ava_item">
|
||||
<label>
|
||||
<span><?php echo $jkl["g18"];?></span>
|
||||
<input type="radio" name="avatar" value="/lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/standard.jpg">
|
||||
<img src="'.BASE_URL.'lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/standard.jpg" width="50" alt="avatar">
|
||||
</label>
|
||||
</div>
|
||||
<div class="ava_item">
|
||||
<label>
|
||||
<span><?php echo $jkl["g18"];?></span>
|
||||
<input type="radio" name="avatar" value="/lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/1.jpg">
|
||||
<img src="'.BASE_URL.'lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/1.jpg" width="50" alt="avatar">
|
||||
</label>
|
||||
</div>
|
||||
<div class="ava_item">
|
||||
<label>
|
||||
<span><?php echo $jkl["g18"];?></span>
|
||||
<input type="radio" name="avatar" value="/lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/2.jpg">
|
||||
<img src="'.BASE_URL.'lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/2.jpg" width="50" alt="avatar">
|
||||
</label>
|
||||
</div>
|
||||
<div class="ava_item">
|
||||
<label>
|
||||
<span><?php echo $jkl["g18"];?></span>
|
||||
<input type="radio" name="avatar" value="/lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/3.jpg">
|
||||
<img src="'.BASE_URL.'lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/3.jpg" width="50" alt="avatar">
|
||||
</label>
|
||||
</div>
|
||||
<div class="ava_item">
|
||||
<label>
|
||||
<span><?php echo $jkl["g18"];?></span>
|
||||
<input type="radio" name="avatar" value="/lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/4.jpg">
|
||||
<img src="'.BASE_URL.'lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/4.jpg" width="50" alt="avatar">
|
||||
</label>
|
||||
</div>
|
||||
<div class="ava_item">
|
||||
<label>
|
||||
<span><?php echo $jkl["g18"];?></span>
|
||||
<input type="radio" name="avatar" value="/lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/5.jpg">
|
||||
<img src="'.BASE_URL.'lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/5.jpg" width="50" alt="avatar">
|
||||
</label>
|
||||
</div>
|
||||
</div>' : '').'
|
||||
'.$dep_stuff.'
|
||||
<div class="jaklcb_input">
|
||||
<label for="start_name">'.$jkl["g4"].'</label>
|
||||
<input id="start_name" name="start_name" type="text" class="lcjak_input" placeholder="'.$jkl["g4"].'" value="'.(isset($_REQUEST["name"]) ? $_REQUEST["name"] : '').'">
|
||||
</div>
|
||||
<div class="jaklcb_input">
|
||||
<label for="start_email">'.$jkl["g5"].'</label>
|
||||
<input id="start_email" name="start_email" type="text" class="lcjak_input" placeholder="'.$jkl["g5"].'" value="'.(isset($_REQUEST["start_email"]) ? $_REQUEST["start_email"] : '').'">
|
||||
</div>
|
||||
<div class="jaklcb_input">
|
||||
<label for="start_phone">'.$jkl["g49"].'</label>
|
||||
<input id="start_phone" name="start_phone" type="text" class="lcjak_input" placeholder="'.$jkl["g49"].'" value="'.(isset($_REQUEST["start_phone"]) ? $_REQUEST["start_phone"] : '').'">
|
||||
</div>
|
||||
<div class="jaklcb_input">
|
||||
<label for="start_chat_msg">'.$jkl["g71"].'</label>
|
||||
<textarea id="start_chat_msg" name="start_chat_msg" placeholder="'.$jkl['g71'].'">'.(isset($_REQUEST["start_chat_msg"]) ? $_REQUEST["start_chat_msg"] : '').'</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_startchat jakbtn btn-simple btn-'.$btn_custom.'" onclick="lcjak_startChat()" type="button"><i class="fa fa-paper-plane" id="start_chat_btn"></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 '.$start_animate.'">
|
||||
<button class="jaklcb_sendcontact lcb_startchat" type="button" onclick="lcjak_startChat()">
|
||||
<i class="fa fa-paper-plane" id="start_chat_btn"></i>
|
||||
</button>
|
||||
<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>
|
||||
'.(isset($widgetsettings[$widgetid]['start_show_avatars']) && $widgetsettings[$widgetid]['start_show_avatars'] == "Yes" ? '
|
||||
<div class="avatars">
|
||||
<div class="ava_item">
|
||||
<label>
|
||||
<span><?php echo $jkl["g18"];?></span>
|
||||
<input type="radio" name="avatar" value="/lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/standard.jpg">
|
||||
<img src="'.BASE_URL.'lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/standard.jpg" width="50" alt="avatar">
|
||||
</label>
|
||||
</div>
|
||||
<div class="ava_item">
|
||||
<label>
|
||||
<span><?php echo $jkl["g18"];?></span>
|
||||
<input type="radio" name="avatar" value="/lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/1.jpg">
|
||||
<img src="'.BASE_URL.'lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/1.jpg" width="50" alt="avatar">
|
||||
</label>
|
||||
</div>
|
||||
<div class="ava_item">
|
||||
<label>
|
||||
<span><?php echo $jkl["g18"];?></span>
|
||||
<input type="radio" name="avatar" value="/lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/2.jpg">
|
||||
<img src="'.BASE_URL.'lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/2.jpg" width="50" alt="avatar">
|
||||
</label>
|
||||
</div>
|
||||
<div class="ava_item">
|
||||
<label>
|
||||
<span><?php echo $jkl["g18"];?></span>
|
||||
<input type="radio" name="avatar" value="/lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/3.jpg">
|
||||
<img src="'.BASE_URL.'lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/3.jpg" width="50" alt="avatar">
|
||||
</label>
|
||||
</div>
|
||||
<div class="ava_item">
|
||||
<label>
|
||||
<span><?php echo $jkl["g18"];?></span>
|
||||
<input type="radio" name="avatar" value="/lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/4.jpg">
|
||||
<img src="'.BASE_URL.'lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/4.jpg" width="50" alt="avatar">
|
||||
</label>
|
||||
</div>
|
||||
<div class="ava_item">
|
||||
<label>
|
||||
<span><?php echo $jkl["g18"];?></span>
|
||||
<input type="radio" name="avatar" value="/lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/5.jpg">
|
||||
<img src="'.BASE_URL.'lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/5.jpg" width="50" alt="avatar">
|
||||
</label>
|
||||
</div>
|
||||
</div>' : '').'
|
||||
'.$dep_stuff.'
|
||||
<div class="input_group">
|
||||
<div class="jaklcb_input">
|
||||
<label for="start_name">'.$jkl["g4"].'</label>
|
||||
<input id="start_name" name="start_name" type="text" class="lcjak_input" placeholder="'.$jkl["g4"].'" value="'.(isset($_REQUEST["start_name"]) ? $_REQUEST["start_name"] : '').'">
|
||||
</div>
|
||||
<div class="jaklcb_input flex-right">
|
||||
<label for="start_email">'.$jkl["g5"].'</label>
|
||||
<input id="start_email" name="start_email" type="text" class="lcjak_input" placeholder="'.$jkl["g5"].'" value="'.(isset($_REQUEST["start_email"]) ? $_REQUEST["start_email"] : '').'">
|
||||
</div>
|
||||
</div>
|
||||
<div class="jaklcb_input">
|
||||
<label for="start_phone">'.$jkl["g49"].'</label>
|
||||
<input id="start_phone" name="start_phone" type="text" class="lcjak_input" placeholder="'.$jkl["g49"].'" value="'.(isset($_REQUEST["start_phone"]) ? $_REQUEST["start_phone"] : '').'">
|
||||
</div>
|
||||
<div class="jaklcb_input">
|
||||
<label for="start_chat_msg">'.$jkl["g71"].'</label>
|
||||
<textarea id="start_chat_msg" name="start_chat_msg" placeholder="'.$jkl['g71'].'">'.(isset($_REQUEST["start_chat_msg"]) ? $_REQUEST["start_chat_msg"] : '').'</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,319 @@
|
||||
<?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;left:0;";
|
||||
$wtplsett["customjs"] = "js/start.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 */
|
||||
$startsett = array();
|
||||
|
||||
$startsett["previewchat"] = "preview/operator_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
|
||||
|
||||
*/
|
||||
|
||||
$startsett["formoptions"] = array("1" => "1:#:".$jkl['cw24'].":#:0:#:0:#:start_custom_logo", "2" => "3:#:".$jkl['cw38'].":#:Yes,No:#:0:#:start_email_required", "3" => "3:#:".$jkl['cw39'].":#:Yes,No:#:0:#:start_phone_required", "4" => "3:#:".$jkl['cw43'].":#:Yes,No:#:0:#:start_show_avatars", "5" => "5:#:".$jkl['cw22'].":#:blue,green,orange,red,pink,grey:#:0:#:start_colour_theme", "6" => "5:#:".$jkl['cw23'].":#:animate__fadeIn,animate__flash,animate__pulse,animate__headShake,animate__slideInUp,animate__slideInRight:#:0:#:start_animation");
|
||||
|
||||
} else {
|
||||
|
||||
// Check the vars for this start
|
||||
$start_animate = "animate__fadeIn";
|
||||
$start_custom = "";
|
||||
$btn_custom = "blue";
|
||||
$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]['start_animation']) && !empty($widgetsettings[$widgetid]['start_animation'])) {
|
||||
$start_animate = $widgetsettings[$widgetid]['start_animation'];
|
||||
}
|
||||
|
||||
// We can have custom online icon
|
||||
if (isset($widgetsettings[$widgetid]['start_colour_theme']) && !empty($widgetsettings[$widgetid]['start_colour_theme']) && $widgetsettings[$widgetid]['start_colour_theme'] != "blue") {
|
||||
$start_custom = " ".$widgetsettings[$widgetid]['start_colour_theme'];
|
||||
$btn_custom = $widgetsettings[$widgetid]['start_colour_theme'];
|
||||
}
|
||||
|
||||
// We can have custom online icon
|
||||
if (isset($widgetsettings[$widgetid]['start_custom_logo']) && !empty($widgetsettings[$widgetid]['start_custom_logo'])) {
|
||||
$start_logo = '<img src="'.$widgetsettings[$widgetid]['start_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 = 28;
|
||||
|
||||
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"]);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
// Let's get the operators
|
||||
$online_oplist = online_operator_list($opcacheid, $HD_DEPARTMENTS, $jakwidget[$widgetid]['depid'], $jakwidget[$widgetid]['opid']);
|
||||
|
||||
$op_list = "";
|
||||
if (isset($online_oplist) && !empty($online_oplist)) foreach ($online_oplist as $o) {
|
||||
|
||||
$op_list .= '<div class="operator_list">
|
||||
<div class="op_item avatar_op">
|
||||
<label>
|
||||
<input type="radio" name="start_opid_select" value="'.$o["id"].'">
|
||||
<img src="'.BASE_URL.JAK_FILES_DIRECTORY.'/'.$o["picture"].'" alt="'.$o["name"].'" width="60" class="wo_op_avatar">
|
||||
</label>
|
||||
</div>
|
||||
<div class="op_item oplist_body">
|
||||
<h4>'.$o["name"].'</h4>
|
||||
<p>'.$o["aboutme"].'</p>
|
||||
<p>'.($o["title"] ? sprintf($jkl["g63"], $o["title"]) : $jkl["g88"]).'</p>
|
||||
<p>'.($o['sum'] ? sprintf($jkl["g62"], $o['sum']) : '-').'</p>
|
||||
</div>
|
||||
</div>';
|
||||
|
||||
}
|
||||
|
||||
// We go big
|
||||
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_list.'
|
||||
'.(isset($widgetsettings[$widgetid]['start_show_avatars']) && $widgetsettings[$widgetid]['start_show_avatars'] == "Yes" ? '
|
||||
<div class="avatars">
|
||||
<div class="ava_item">
|
||||
<label>
|
||||
<span><?php echo $jkl["g18"];?></span>
|
||||
<input type="radio" name="avatar" value="/lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/standard.jpg">
|
||||
<img src="'.BASE_URL.'lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/standard.jpg" width="50" alt="avatar">
|
||||
</label>
|
||||
</div>
|
||||
<div class="ava_item">
|
||||
<label>
|
||||
<span><?php echo $jkl["g18"];?></span>
|
||||
<input type="radio" name="avatar" value="/lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/1.jpg">
|
||||
<img src="'.BASE_URL.'lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/1.jpg" width="50" alt="avatar">
|
||||
</label>
|
||||
</div>
|
||||
<div class="ava_item">
|
||||
<label>
|
||||
<span><?php echo $jkl["g18"];?></span>
|
||||
<input type="radio" name="avatar" value="/lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/2.jpg">
|
||||
<img src="'.BASE_URL.'lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/2.jpg" width="50" alt="avatar">
|
||||
</label>
|
||||
</div>
|
||||
<div class="ava_item">
|
||||
<label>
|
||||
<span><?php echo $jkl["g18"];?></span>
|
||||
<input type="radio" name="avatar" value="/lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/3.jpg">
|
||||
<img src="'.BASE_URL.'lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/3.jpg" width="50" alt="avatar">
|
||||
</label>
|
||||
</div>
|
||||
<div class="ava_item">
|
||||
<label>
|
||||
<span><?php echo $jkl["g18"];?></span>
|
||||
<input type="radio" name="avatar" value="/lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/4.jpg">
|
||||
<img src="'.BASE_URL.'lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/4.jpg" width="50" alt="avatar">
|
||||
</label>
|
||||
</div>
|
||||
<div class="ava_item">
|
||||
<label>
|
||||
<span><?php echo $jkl["g18"];?></span>
|
||||
<input type="radio" name="avatar" value="/lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/5.jpg">
|
||||
<img src="'.BASE_URL.'lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/5.jpg" width="50" alt="avatar">
|
||||
</label>
|
||||
</div>
|
||||
</div>' : '').'
|
||||
<div class="jaklcb_input">
|
||||
<label for="start_name">'.$jkl["g4"].'</label>
|
||||
<input id="start_name" name="start_name" type="text" class="lcjak_input" placeholder="'.$jkl["g4"].'" value="'.(isset($_REQUEST["name"]) ? $_REQUEST["name"] : '').'">
|
||||
</div>
|
||||
<div class="jaklcb_input">
|
||||
<label for="start_email">'.$jkl["g5"].'</label>
|
||||
<input id="start_email" name="start_email" type="text" class="lcjak_input" placeholder="'.$jkl["g5"].'" value="'.(isset($_REQUEST["start_email"]) ? $_REQUEST["start_email"] : '').'">
|
||||
</div>
|
||||
<div class="jaklcb_input">
|
||||
<label for="start_phone">'.$jkl["g49"].'</label>
|
||||
<input id="start_phone" name="start_phone" type="text" class="lcjak_input" placeholder="'.$jkl["g49"].'" value="'.(isset($_REQUEST["start_phone"]) ? $_REQUEST["start_phone"] : '').'">
|
||||
</div>
|
||||
<div class="jaklcb_input">
|
||||
<label for="start_chat_msg">'.$jkl["g71"].'</label>
|
||||
<textarea id="start_chat_msg" name="start_chat_msg" placeholder="'.$jkl['g71'].'">'.(isset($_REQUEST["start_chat_msg"]) ? $_REQUEST["start_chat_msg"] : '').'</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_startchat jakbtn btn-simple btn-'.$btn_custom.'" onclick="lcjak_startChat()" type="button"><i class="fa fa-paper-plane" id="start_chat_btn"></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 '.$start_animate.'">
|
||||
<button class="jaklcb_sendcontact left lcb_startchat" type="button" onclick="lcjak_startChat()">
|
||||
<i class="fa fa-paper-plane" id="start_chat_btn"></i>
|
||||
</button>
|
||||
<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_list.'
|
||||
'.(isset($widgetsettings[$widgetid]['start_show_avatars']) && $widgetsettings[$widgetid]['start_show_avatars'] == "Yes" ? '
|
||||
<div class="avatars">
|
||||
<div class="ava_item">
|
||||
<label>
|
||||
<span><?php echo $jkl["g18"];?></span>
|
||||
<input type="radio" name="avatar" value="/lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/standard.jpg">
|
||||
<img src="'.BASE_URL.'lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/standard.jpg" width="50" alt="avatar">
|
||||
</label>
|
||||
</div>
|
||||
<div class="ava_item">
|
||||
<label>
|
||||
<span><?php echo $jkl["g18"];?></span>
|
||||
<input type="radio" name="avatar" value="/lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/1.jpg">
|
||||
<img src="'.BASE_URL.'lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/1.jpg" width="50" alt="avatar">
|
||||
</label>
|
||||
</div>
|
||||
<div class="ava_item">
|
||||
<label>
|
||||
<span><?php echo $jkl["g18"];?></span>
|
||||
<input type="radio" name="avatar" value="/lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/2.jpg">
|
||||
<img src="'.BASE_URL.'lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/2.jpg" width="50" alt="avatar">
|
||||
</label>
|
||||
</div>
|
||||
<div class="ava_item">
|
||||
<label>
|
||||
<span><?php echo $jkl["g18"];?></span>
|
||||
<input type="radio" name="avatar" value="/lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/3.jpg">
|
||||
<img src="'.BASE_URL.'lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/3.jpg" width="50" alt="avatar">
|
||||
</label>
|
||||
</div>
|
||||
<div class="ava_item">
|
||||
<label>
|
||||
<span><?php echo $jkl["g18"];?></span>
|
||||
<input type="radio" name="avatar" value="/lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/4.jpg">
|
||||
<img src="'.BASE_URL.'lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/4.jpg" width="50" alt="avatar">
|
||||
</label>
|
||||
</div>
|
||||
<div class="ava_item">
|
||||
<label>
|
||||
<span><?php echo $jkl["g18"];?></span>
|
||||
<input type="radio" name="avatar" value="/lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/5.jpg">
|
||||
<img src="'.BASE_URL.'lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/5.jpg" width="50" alt="avatar">
|
||||
</label>
|
||||
</div>
|
||||
</div>' : '').'
|
||||
<div class="input_group">
|
||||
<div class="jaklcb_input">
|
||||
<label for="start_name">'.$jkl["g4"].'</label>
|
||||
<input id="start_name" name="start_name" type="text" class="lcjak_input" placeholder="'.$jkl["g4"].'" value="'.(isset($_REQUEST["start_name"]) ? $_REQUEST["start_name"] : '').'">
|
||||
</div>
|
||||
<div class="jaklcb_input flex-right">
|
||||
<label for="start_email">'.$jkl["g5"].'</label>
|
||||
<input id="start_email" name="start_email" type="text" class="lcjak_input" placeholder="'.$jkl["g5"].'" value="'.(isset($_REQUEST["start_email"]) ? $_REQUEST["start_email"] : '').'">
|
||||
</div>
|
||||
</div>
|
||||
<div class="jaklcb_input">
|
||||
<label for="start_phone">'.$jkl["g49"].'</label>
|
||||
<input id="start_phone" name="start_phone" type="text" class="lcjak_input" placeholder="'.$jkl["g49"].'" value="'.(isset($_REQUEST["start_phone"]) ? $_REQUEST["start_phone"] : '').'">
|
||||
</div>
|
||||
<div class="jaklcb_input">
|
||||
<label for="start_chat_msg">'.$jkl["g71"].'</label>
|
||||
<textarea id="start_chat_msg" name="start_chat_msg" placeholder="'.$jkl['g71'].'">'.(isset($_REQUEST["start_chat_msg"]) ? $_REQUEST["start_chat_msg"] : '').'</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="">
|
||||
</section></form></div>';
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -0,0 +1,319 @@
|
||||
<?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/start.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 */
|
||||
$startsett = array();
|
||||
|
||||
$startsett["previewchat"] = "preview/operator_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
|
||||
|
||||
*/
|
||||
|
||||
$startsett["formoptions"] = array("1" => "1:#:".$jkl['cw24'].":#:0:#:0:#:start_custom_logo", "2" => "3:#:".$jkl['cw38'].":#:Yes,No:#:0:#:start_email_required", "3" => "3:#:".$jkl['cw39'].":#:Yes,No:#:0:#:start_phone_required", "4" => "3:#:".$jkl['cw43'].":#:Yes,No:#:0:#:start_show_avatars", "5" => "5:#:".$jkl['cw22'].":#:blue,green,orange,red,pink,grey:#:0:#:start_colour_theme", "6" => "5:#:".$jkl['cw23'].":#:animate__fadeIn,animate__flash,animate__pulse,animate__headShake,animate__slideInUp,animate__slideInRight:#:0:#:start_animation");
|
||||
|
||||
} else {
|
||||
|
||||
// Check the vars for this start
|
||||
$start_animate = "animate__fadeIn";
|
||||
$start_custom = "";
|
||||
$btn_custom = "blue";
|
||||
$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]['start_animation']) && !empty($widgetsettings[$widgetid]['start_animation'])) {
|
||||
$start_animate = $widgetsettings[$widgetid]['start_animation'];
|
||||
}
|
||||
|
||||
// We can have custom online icon
|
||||
if (isset($widgetsettings[$widgetid]['start_colour_theme']) && !empty($widgetsettings[$widgetid]['start_colour_theme']) && $widgetsettings[$widgetid]['start_colour_theme'] != "blue") {
|
||||
$start_custom = " ".$widgetsettings[$widgetid]['start_colour_theme'];
|
||||
$btn_custom = $widgetsettings[$widgetid]['start_colour_theme'];
|
||||
}
|
||||
|
||||
// We can have custom online icon
|
||||
if (isset($widgetsettings[$widgetid]['start_custom_logo']) && !empty($widgetsettings[$widgetid]['start_custom_logo'])) {
|
||||
$start_logo = '<img src="'.$widgetsettings[$widgetid]['start_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 = 28;
|
||||
|
||||
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"]);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
// Let's get the operators
|
||||
$online_oplist = online_operator_list($opcacheid, $HD_DEPARTMENTS, $jakwidget[$widgetid]['depid'], $jakwidget[$widgetid]['opid']);
|
||||
|
||||
$op_list = "";
|
||||
if (isset($online_oplist) && !empty($online_oplist)) foreach ($online_oplist as $o) {
|
||||
|
||||
$op_list .= '<div class="operator_list">
|
||||
<div class="op_item avatar_op">
|
||||
<label>
|
||||
<input type="radio" name="start_opid_select" value="'.$o["id"].'">
|
||||
<img src="'.BASE_URL.JAK_FILES_DIRECTORY.'/'.$o["picture"].'" alt="'.$o["name"].'" width="60" class="wo_op_avatar">
|
||||
</label>
|
||||
</div>
|
||||
<div class="op_item oplist_body">
|
||||
<h4>'.$o["name"].'</h4>
|
||||
<p>'.$o["aboutme"].'</p>
|
||||
<p>'.($o["title"] ? sprintf($jkl["g63"], $o["title"]) : $jkl["g88"]).'</p>
|
||||
<p>'.($o['sum'] ? sprintf($jkl["g62"], $o['sum']) : '-').'</p>
|
||||
</div>
|
||||
</div>';
|
||||
|
||||
}
|
||||
|
||||
// We go big
|
||||
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_list.'
|
||||
'.(isset($widgetsettings[$widgetid]['start_show_avatars']) && $widgetsettings[$widgetid]['start_show_avatars'] == "Yes" ? '
|
||||
<div class="avatars">
|
||||
<div class="ava_item">
|
||||
<label>
|
||||
<span><?php echo $jkl["g18"];?></span>
|
||||
<input type="radio" name="avatar" value="/lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/standard.jpg">
|
||||
<img src="'.BASE_URL.'lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/standard.jpg" width="50" alt="avatar">
|
||||
</label>
|
||||
</div>
|
||||
<div class="ava_item">
|
||||
<label>
|
||||
<span><?php echo $jkl["g18"];?></span>
|
||||
<input type="radio" name="avatar" value="/lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/1.jpg">
|
||||
<img src="'.BASE_URL.'lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/1.jpg" width="50" alt="avatar">
|
||||
</label>
|
||||
</div>
|
||||
<div class="ava_item">
|
||||
<label>
|
||||
<span><?php echo $jkl["g18"];?></span>
|
||||
<input type="radio" name="avatar" value="/lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/2.jpg">
|
||||
<img src="'.BASE_URL.'lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/2.jpg" width="50" alt="avatar">
|
||||
</label>
|
||||
</div>
|
||||
<div class="ava_item">
|
||||
<label>
|
||||
<span><?php echo $jkl["g18"];?></span>
|
||||
<input type="radio" name="avatar" value="/lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/3.jpg">
|
||||
<img src="'.BASE_URL.'lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/3.jpg" width="50" alt="avatar">
|
||||
</label>
|
||||
</div>
|
||||
<div class="ava_item">
|
||||
<label>
|
||||
<span><?php echo $jkl["g18"];?></span>
|
||||
<input type="radio" name="avatar" value="/lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/4.jpg">
|
||||
<img src="'.BASE_URL.'lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/4.jpg" width="50" alt="avatar">
|
||||
</label>
|
||||
</div>
|
||||
<div class="ava_item">
|
||||
<label>
|
||||
<span><?php echo $jkl["g18"];?></span>
|
||||
<input type="radio" name="avatar" value="/lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/5.jpg">
|
||||
<img src="'.BASE_URL.'lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/5.jpg" width="50" alt="avatar">
|
||||
</label>
|
||||
</div>
|
||||
</div>' : '').'
|
||||
<div class="jaklcb_input">
|
||||
<label for="start_name">'.$jkl["g4"].'</label>
|
||||
<input id="start_name" name="start_name" type="text" class="lcjak_input" placeholder="'.$jkl["g4"].'" value="'.(isset($_REQUEST["name"]) ? $_REQUEST["name"] : '').'">
|
||||
</div>
|
||||
<div class="jaklcb_input">
|
||||
<label for="start_email">'.$jkl["g5"].'</label>
|
||||
<input id="start_email" name="start_email" type="text" class="lcjak_input" placeholder="'.$jkl["g5"].'" value="'.(isset($_REQUEST["start_email"]) ? $_REQUEST["start_email"] : '').'">
|
||||
</div>
|
||||
<div class="jaklcb_input">
|
||||
<label for="start_phone">'.$jkl["g49"].'</label>
|
||||
<input id="start_phone" name="start_phone" type="text" class="lcjak_input" placeholder="'.$jkl["g49"].'" value="'.(isset($_REQUEST["start_phone"]) ? $_REQUEST["start_phone"] : '').'">
|
||||
</div>
|
||||
<div class="jaklcb_input">
|
||||
<label for="start_chat_msg">'.$jkl["g71"].'</label>
|
||||
<textarea id="start_chat_msg" name="start_chat_msg" placeholder="'.$jkl['g71'].'">'.(isset($_REQUEST["start_chat_msg"]) ? $_REQUEST["start_chat_msg"] : '').'</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_startchat jakbtn btn-simple btn-'.$btn_custom.'" onclick="lcjak_startChat()" type="button"><i class="fa fa-paper-plane" id="start_chat_btn"></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 '.$start_animate.'">
|
||||
<button class="jaklcb_sendcontact lcb_startchat" type="button" onclick="lcjak_startChat()">
|
||||
<i class="fa fa-paper-plane" id="start_chat_btn"></i>
|
||||
</button>
|
||||
<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_list.'
|
||||
'.(isset($widgetsettings[$widgetid]['start_show_avatars']) && $widgetsettings[$widgetid]['start_show_avatars'] == "Yes" ? '
|
||||
<div class="avatars">
|
||||
<div class="ava_item">
|
||||
<label>
|
||||
<span><?php echo $jkl["g18"];?></span>
|
||||
<input type="radio" name="avatar" value="/lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/standard.jpg">
|
||||
<img src="'.BASE_URL.'lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/standard.jpg" width="50" alt="avatar">
|
||||
</label>
|
||||
</div>
|
||||
<div class="ava_item">
|
||||
<label>
|
||||
<span><?php echo $jkl["g18"];?></span>
|
||||
<input type="radio" name="avatar" value="/lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/1.jpg">
|
||||
<img src="'.BASE_URL.'lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/1.jpg" width="50" alt="avatar">
|
||||
</label>
|
||||
</div>
|
||||
<div class="ava_item">
|
||||
<label>
|
||||
<span><?php echo $jkl["g18"];?></span>
|
||||
<input type="radio" name="avatar" value="/lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/2.jpg">
|
||||
<img src="'.BASE_URL.'lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/2.jpg" width="50" alt="avatar">
|
||||
</label>
|
||||
</div>
|
||||
<div class="ava_item">
|
||||
<label>
|
||||
<span><?php echo $jkl["g18"];?></span>
|
||||
<input type="radio" name="avatar" value="/lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/3.jpg">
|
||||
<img src="'.BASE_URL.'lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/3.jpg" width="50" alt="avatar">
|
||||
</label>
|
||||
</div>
|
||||
<div class="ava_item">
|
||||
<label>
|
||||
<span><?php echo $jkl["g18"];?></span>
|
||||
<input type="radio" name="avatar" value="/lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/4.jpg">
|
||||
<img src="'.BASE_URL.'lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/4.jpg" width="50" alt="avatar">
|
||||
</label>
|
||||
</div>
|
||||
<div class="ava_item">
|
||||
<label>
|
||||
<span><?php echo $jkl["g18"];?></span>
|
||||
<input type="radio" name="avatar" value="/lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/5.jpg">
|
||||
<img src="'.BASE_URL.'lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/5.jpg" width="50" alt="avatar">
|
||||
</label>
|
||||
</div>
|
||||
</div>' : '').'
|
||||
<div class="input_group">
|
||||
<div class="jaklcb_input">
|
||||
<label for="start_name">'.$jkl["g4"].'</label>
|
||||
<input id="start_name" name="start_name" type="text" class="lcjak_input" placeholder="'.$jkl["g4"].'" value="'.(isset($_REQUEST["start_name"]) ? $_REQUEST["start_name"] : '').'">
|
||||
</div>
|
||||
<div class="jaklcb_input flex-right">
|
||||
<label for="start_email">'.$jkl["g5"].'</label>
|
||||
<input id="start_email" name="start_email" type="text" class="lcjak_input" placeholder="'.$jkl["g5"].'" value="'.(isset($_REQUEST["start_email"]) ? $_REQUEST["start_email"] : '').'">
|
||||
</div>
|
||||
</div>
|
||||
<div class="jaklcb_input">
|
||||
<label for="start_phone">'.$jkl["g49"].'</label>
|
||||
<input id="start_phone" name="start_phone" type="text" class="lcjak_input" placeholder="'.$jkl["g49"].'" value="'.(isset($_REQUEST["start_phone"]) ? $_REQUEST["start_phone"] : '').'">
|
||||
</div>
|
||||
<div class="jaklcb_input">
|
||||
<label for="start_chat_msg">'.$jkl["g71"].'</label>
|
||||
<textarea id="start_chat_msg" name="start_chat_msg" placeholder="'.$jkl['g71'].'">'.(isset($_REQUEST["start_chat_msg"]) ? $_REQUEST["start_chat_msg"] : '').'</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="">
|
||||
</section></form></div>';
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -0,0 +1,199 @@
|
||||
<?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/quickstart.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 */
|
||||
$startsett = array();
|
||||
|
||||
$startsett["previewchat"] = "preview/quick_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
|
||||
|
||||
*/
|
||||
|
||||
$startsett["formoptions"] = array("1" => "2:#:".$jkl['cw21'].":#:0:#:0:#:start_welcome_text", "2" => "1:#:".$jkl['cw24'].":#:0:#:0:#:start_custom_logo", "3" => "5:#:".$jkl['cw22'].":#:blue,green,orange,red,pink,grey:#:0:#:start_colour_theme", "4" => "5:#:".$jkl['cw23'].":#:animate__fadeIn,animate__flash,animate__pulse,animate__headShake,animate__slideInUp,animate__slideInRight:#:0:#:start_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]['start_animation']) && !empty($widgetsettings[$widgetid]['start_animation'])) {
|
||||
$start_animate = $widgetsettings[$widgetid]['start_animation'];
|
||||
}
|
||||
|
||||
// We can have custom online icon
|
||||
if (isset($widgetsettings[$widgetid]['start_colour_theme']) && !empty($widgetsettings[$widgetid]['start_colour_theme']) && $widgetsettings[$widgetid]['start_colour_theme'] != "blue") {
|
||||
$start_custom = " ".$widgetsettings[$widgetid]['start_colour_theme'];
|
||||
}
|
||||
|
||||
// We can have custom online icon
|
||||
if (isset($widgetsettings[$widgetid]['start_custom_logo']) && !empty($widgetsettings[$widgetid]['start_custom_logo'])) {
|
||||
$start_logo = '<img src="'.$widgetsettings[$widgetid]['start_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 = 10;
|
||||
|
||||
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 go big
|
||||
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:7">
|
||||
<h1>'.$jakwidget[$widgetid]['title'].'</h1>
|
||||
</aside>
|
||||
<aside style="flex:2;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" style="flex:1">
|
||||
<h3>'.$headermsg.'</h3>
|
||||
'.(isset($widgetsettings[$widgetid]["start_welcome_text"]) && !empty($widgetsettings[$widgetid]["start_welcome_text"]) ? '<p>'.$widgetsettings[$widgetid]["start_welcome_text"].'</p>' : '').'
|
||||
</main>
|
||||
<footer class="jaklcb_panel_footer">
|
||||
<aside class="jaklcb_start_extra">
|
||||
<i class="fa fa-camera"></i>
|
||||
<i class="fa fa-smile emoticons" id="emoticons"></i>
|
||||
<div class="emoticons_btn animate__animated" id="emoticons_btn">
|
||||
<span class="icon1"><i class="fa fa-smile fa-lg" onclick="sendEmo(\':slight_smile:\')"></i></span>
|
||||
<span class="icon2"><i class="fa fa-laugh fa-lg" onclick="sendEmo(\':smile:\')"></i></span>
|
||||
<span class="icon3"><i class="fa fa-smile-wink fa-lg" onclick="sendEmo(\':wink:\')"></i></span>
|
||||
<span class="icon4"><i class="fa fa-frown fa-lg" onclick="sendEmo(\':frowning:\')"></i></span>
|
||||
<span class="icon5"><i class="fa fa-sad-tear fa-lg" onclick="sendEmo(\':cry:\')"></i></span>
|
||||
<span class="icon6"><i class="fa fa-heart fa-lg" onclick="sendEmo(\':heart:\')"></i></span>
|
||||
</div>
|
||||
</aside>
|
||||
<aside class="jaklcb_start_message">
|
||||
<textarea type="text" name="quickstart_chat_msg" id="quickstart_chat_msg" placeholder="'.$jkl["g71"].'" autofocus></textarea>
|
||||
</aside>
|
||||
<aside class="jaklcb_start_chat">
|
||||
<button id="start_chat_btn" type="submit"><i class="fa fa-paper-plane" id="start_chat_load"></i></button>
|
||||
</aside>
|
||||
</footer>
|
||||
</section>
|
||||
<input type="hidden" name="start_name" value="">
|
||||
<input type="hidden" name="start_email" value="">
|
||||
</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_popup_main">
|
||||
<h3>'.$headermsg.'</h3>
|
||||
'.(isset($widgetsettings[$widgetid]["start_welcome_text"]) && !empty($widgetsettings[$widgetid]["start_welcome_text"]) ? '<p>'.$widgetsettings[$widgetid]["start_welcome_text"].'</p>' : '').'
|
||||
</main>
|
||||
<footer class="jaklcb_popup_footer">
|
||||
<aside class="jaklcb_start_extra">
|
||||
<i class="fa fa-camera"></i>
|
||||
<i class="fa fa-smile emoticons" id="emoticons"></i>
|
||||
<div class="emoticons_btn animate__animated" id="emoticons_btn">
|
||||
<span class="icon1"><i class="fa fa-smile fa-lg" onclick="sendEmo(\':slight_smile:\')"></i></span>
|
||||
<span class="icon2"><i class="fa fa-laugh fa-lg" onclick="sendEmo(\':smile:\')"></i></span>
|
||||
<span class="icon3"><i class="fa fa-smile-wink fa-lg" onclick="sendEmo(\':wink:\')"></i></span>
|
||||
<span class="icon4"><i class="fa fa-frown fa-lg" onclick="sendEmo(\':frowning:\')"></i></span>
|
||||
<span class="icon5"><i class="fa fa-sad-tear fa-lg" onclick="sendEmo(\':cry:\')"></i></span>
|
||||
<span class="icon6"><i class="fa fa-heart fa-lg" onclick="sendEmo(\':heart:\')"></i></span>
|
||||
</div>
|
||||
</aside>
|
||||
<aside class="jaklcb_start_message">
|
||||
<textarea type="text" name="quickstart_chat_msg" id="quickstart_chat_msg" placeholder="'.$jkl["g71"].'" autofocus></textarea>
|
||||
</aside>
|
||||
<aside class="jaklcb_start_chat">
|
||||
<button id="start_chat_btn" type="submit"><i class="fa fa-paper-plane" id="start_chat_load"></i></button>
|
||||
</aside>
|
||||
</footer>
|
||||
</section>
|
||||
<input type="hidden" name="start_name" value="">
|
||||
<input type="hidden" name="start_email" value="">
|
||||
</form></div>';
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -0,0 +1,199 @@
|
||||
<?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/quickstart.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 */
|
||||
$startsett = array();
|
||||
|
||||
$startsett["previewchat"] = "preview/quick_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
|
||||
|
||||
*/
|
||||
|
||||
$startsett["formoptions"] = array("1" => "2:#:".$jkl['cw21'].":#:0:#:0:#:start_welcome_text", "2" => "1:#:".$jkl['cw24'].":#:0:#:0:#:start_custom_logo", "3" => "5:#:".$jkl['cw22'].":#:blue,green,orange,red,pink,grey:#:0:#:start_colour_theme", "4" => "5:#:".$jkl['cw23'].":#:animate__fadeIn,animate__flash,animate__pulse,animate__headShake,animate__slideInUp,animate__slideInRight:#:0:#:start_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]['start_animation']) && !empty($widgetsettings[$widgetid]['start_animation'])) {
|
||||
$start_animate = $widgetsettings[$widgetid]['start_animation'];
|
||||
}
|
||||
|
||||
// We can have custom online icon
|
||||
if (isset($widgetsettings[$widgetid]['start_colour_theme']) && !empty($widgetsettings[$widgetid]['start_colour_theme']) && $widgetsettings[$widgetid]['start_colour_theme'] != "blue") {
|
||||
$start_custom = " ".$widgetsettings[$widgetid]['start_colour_theme'];
|
||||
}
|
||||
|
||||
// We can have custom online icon
|
||||
if (isset($widgetsettings[$widgetid]['start_custom_logo']) && !empty($widgetsettings[$widgetid]['start_custom_logo'])) {
|
||||
$start_logo = '<img src="'.$widgetsettings[$widgetid]['start_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 = 10;
|
||||
|
||||
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 go big
|
||||
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:7">
|
||||
<h1>'.$jakwidget[$widgetid]['title'].'</h1>
|
||||
</aside>
|
||||
<aside style="flex:2;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" style="flex:1">
|
||||
<h3>'.$headermsg.'</h3>
|
||||
'.(isset($widgetsettings[$widgetid]["start_welcome_text"]) && !empty($widgetsettings[$widgetid]["start_welcome_text"]) ? '<p>'.$widgetsettings[$widgetid]["start_welcome_text"].'</p>' : '').'
|
||||
</main>
|
||||
<footer class="jaklcb_panel_footer">
|
||||
<aside class="jaklcb_start_extra">
|
||||
<i class="fa fa-camera"></i>
|
||||
<i class="fa fa-smile emoticons" id="emoticons"></i>
|
||||
<div class="emoticons_btn animate__animated" id="emoticons_btn">
|
||||
<span class="icon1"><i class="fa fa-smile fa-lg" onclick="sendEmo(\':slight_smile:\')"></i></span>
|
||||
<span class="icon2"><i class="fa fa-laugh fa-lg" onclick="sendEmo(\':smile:\')"></i></span>
|
||||
<span class="icon3"><i class="fa fa-smile-wink fa-lg" onclick="sendEmo(\':wink:\')"></i></span>
|
||||
<span class="icon4"><i class="fa fa-frown fa-lg" onclick="sendEmo(\':frowning:\')"></i></span>
|
||||
<span class="icon5"><i class="fa fa-sad-tear fa-lg" onclick="sendEmo(\':cry:\')"></i></span>
|
||||
<span class="icon6"><i class="fa fa-heart fa-lg" onclick="sendEmo(\':heart:\')"></i></span>
|
||||
</div>
|
||||
</aside>
|
||||
<aside class="jaklcb_start_message">
|
||||
<textarea type="text" name="quickstart_chat_msg" id="quickstart_chat_msg" placeholder="'.$jkl["g71"].'" autofocus></textarea>
|
||||
</aside>
|
||||
<aside class="jaklcb_start_chat">
|
||||
<button id="start_chat_btn" type="submit"><i class="fa fa-paper-plane" id="start_chat_load"></i></button>
|
||||
</aside>
|
||||
</footer>
|
||||
</section>
|
||||
<input type="hidden" name="start_name" value="">
|
||||
<input type="hidden" name="start_email" value="">
|
||||
</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_popup_main">
|
||||
<h3>'.$headermsg.'</h3>
|
||||
'.(isset($widgetsettings[$widgetid]["start_welcome_text"]) && !empty($widgetsettings[$widgetid]["start_welcome_text"]) ? '<p>'.$widgetsettings[$widgetid]["start_welcome_text"].'</p>' : '').'
|
||||
</main>
|
||||
<footer class="jaklcb_popup_footer">
|
||||
<aside class="jaklcb_start_extra">
|
||||
<i class="fa fa-camera"></i>
|
||||
<i class="fa fa-smile emoticons" id="emoticons"></i>
|
||||
<div class="emoticons_btn animate__animated" id="emoticons_btn">
|
||||
<span class="icon1"><i class="fa fa-smile fa-lg" onclick="sendEmo(\':slight_smile:\')"></i></span>
|
||||
<span class="icon2"><i class="fa fa-laugh fa-lg" onclick="sendEmo(\':smile:\')"></i></span>
|
||||
<span class="icon3"><i class="fa fa-smile-wink fa-lg" onclick="sendEmo(\':wink:\')"></i></span>
|
||||
<span class="icon4"><i class="fa fa-frown fa-lg" onclick="sendEmo(\':frowning:\')"></i></span>
|
||||
<span class="icon5"><i class="fa fa-sad-tear fa-lg" onclick="sendEmo(\':cry:\')"></i></span>
|
||||
<span class="icon6"><i class="fa fa-heart fa-lg" onclick="sendEmo(\':heart:\')"></i></span>
|
||||
</div>
|
||||
</aside>
|
||||
<aside class="jaklcb_start_message">
|
||||
<textarea type="text" name="quickstart_chat_msg" id="quickstart_chat_msg" placeholder="'.$jkl["g71"].'" autofocus></textarea>
|
||||
</aside>
|
||||
<aside class="jaklcb_start_chat">
|
||||
<button id="start_chat_btn" type="submit"><i class="fa fa-paper-plane" id="start_chat_load"></i></button>
|
||||
</aside>
|
||||
</footer>
|
||||
</section>
|
||||
<input type="hidden" name="start_name" value="">
|
||||
<input type="hidden" name="start_email" value="">
|
||||
</form></div>';
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -0,0 +1,312 @@
|
||||
<?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;left:0;";
|
||||
$wtplsett["customjs"] = "js/start.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 */
|
||||
$startsett = array();
|
||||
|
||||
$startsett["previewchat"] = "preview/simple_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
|
||||
|
||||
*/
|
||||
|
||||
$startsett["formoptions"] = array("1" => "1:#:".$jkl['cw24'].":#:0:#:0:#:start_custom_logo", "2" => "3:#:".$jkl['cw43'].":#:Yes,No:#:0:#:start_show_avatars", "3" => "5:#:".$jkl['cw22'].":#:blue,green,orange,red,pink,grey:#:0:#:start_colour_theme", "4" => "5:#:".$jkl['cw23'].":#:animate__fadeIn,animate__flash,animate__pulse,animate__headShake,animate__slideInUp,animate__slideInRight:#:0:#:start_animation");
|
||||
|
||||
} else {
|
||||
|
||||
// Check the vars for this start
|
||||
$start_animate = "animate__fadeIn";
|
||||
$start_custom = "";
|
||||
$btn_custom = "blue";
|
||||
$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]['start_animation']) && !empty($widgetsettings[$widgetid]['start_animation'])) {
|
||||
$start_animate = $widgetsettings[$widgetid]['start_animation'];
|
||||
}
|
||||
|
||||
// We can have custom online icon
|
||||
if (isset($widgetsettings[$widgetid]['start_colour_theme']) && !empty($widgetsettings[$widgetid]['start_colour_theme']) && $widgetsettings[$widgetid]['start_colour_theme'] != "blue") {
|
||||
$start_custom = " ".$widgetsettings[$widgetid]['start_colour_theme'];
|
||||
$btn_custom = $widgetsettings[$widgetid]['start_colour_theme'];
|
||||
}
|
||||
|
||||
// We can have custom online icon
|
||||
if (isset($widgetsettings[$widgetid]['start_custom_logo']) && !empty($widgetsettings[$widgetid]['start_custom_logo'])) {
|
||||
$start_logo = '<img src="'.$widgetsettings[$widgetid]['start_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 = 7;
|
||||
|
||||
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 collect the departments
|
||||
$dep_direct = 0;
|
||||
if (isset($jakwidget[$widgetid]['depid']) && is_numeric($jakwidget[$widgetid]['depid']) && $jakwidget[$widgetid]['depid'] != 0) {
|
||||
$dep_direct = 1;
|
||||
foreach ($online_op as $d) {
|
||||
if (in_array($jakwidget[$widgetid]['depid'], $d)) {
|
||||
$dep_direct = $jakwidget[$widgetid]['depid'];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Operator ID if set
|
||||
$op_direct = 0;
|
||||
if (isset($jakwidget[$widgetid]['singleopid']) && is_numeric($jakwidget[$widgetid]['singleopid']) && $jakwidget[$widgetid]['singleopid'] != 0) $op_direct = $jakwidget[$widgetid]['singleopid'];
|
||||
|
||||
$dep_all = '';
|
||||
if ($op_direct == 0 && $dep_direct != 0 && is_numeric($dep_direct)) {
|
||||
$dep_stuff = '<input type="hidden" name="start_department" value="'.$dep_direct.'">';
|
||||
} elseif ($op_direct == 0 && count($online_op) > 1) {
|
||||
|
||||
foreach($online_op as $v) { if (in_array($v["id"], explode(',', $jakwidget[$widgetid]["depid"])) || $jakwidget[$widgetid]["depid"] == 0) {
|
||||
$dep_all .= '<option value="'.$v["id"].'"'.(isset($_REQUEST["start_department"]) && $_REQUEST["start_department"] == $v["id"] ? ' selected' : '').'>'.$v["title"].'</option>';
|
||||
} }
|
||||
|
||||
$dep_stuff = '<div class="jaklcb_select">
|
||||
<label for="start_department">'.$jkl["g30"].'</label>
|
||||
<select name="start_department" id="start_department">'.$dep_all.'</select>
|
||||
</div>';
|
||||
} else {
|
||||
$dep_stuff = '<input type="hidden" name="start_department" value="'.$online_op[0]["id"].'"><input type="hidden" name="start_op_direct" value="'.$op_direct.'">';
|
||||
}
|
||||
|
||||
// We go big
|
||||
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>
|
||||
'.(isset($widgetsettings[$widgetid]['start_show_avatars']) && $widgetsettings[$widgetid]['start_show_avatars'] == "Yes" ? '
|
||||
<div class="avatars">
|
||||
<div class="ava_item">
|
||||
<label>
|
||||
<span><?php echo $jkl["g18"];?></span>
|
||||
<input type="radio" name="avatar" value="/lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/standard.jpg">
|
||||
<img src="'.BASE_URL.'lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/standard.jpg" width="50" alt="avatar">
|
||||
</label>
|
||||
</div>
|
||||
<div class="ava_item">
|
||||
<label>
|
||||
<span><?php echo $jkl["g18"];?></span>
|
||||
<input type="radio" name="avatar" value="/lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/1.jpg">
|
||||
<img src="'.BASE_URL.'lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/1.jpg" width="50" alt="avatar">
|
||||
</label>
|
||||
</div>
|
||||
<div class="ava_item">
|
||||
<label>
|
||||
<span><?php echo $jkl["g18"];?></span>
|
||||
<input type="radio" name="avatar" value="/lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/2.jpg">
|
||||
<img src="'.BASE_URL.'lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/2.jpg" width="50" alt="avatar">
|
||||
</label>
|
||||
</div>
|
||||
<div class="ava_item">
|
||||
<label>
|
||||
<span><?php echo $jkl["g18"];?></span>
|
||||
<input type="radio" name="avatar" value="/lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/3.jpg">
|
||||
<img src="'.BASE_URL.'lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/3.jpg" width="50" alt="avatar">
|
||||
</label>
|
||||
</div>
|
||||
<div class="ava_item">
|
||||
<label>
|
||||
<span><?php echo $jkl["g18"];?></span>
|
||||
<input type="radio" name="avatar" value="/lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/4.jpg">
|
||||
<img src="'.BASE_URL.'lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/4.jpg" width="50" alt="avatar">
|
||||
</label>
|
||||
</div>
|
||||
<div class="ava_item">
|
||||
<label>
|
||||
<span><?php echo $jkl["g18"];?></span>
|
||||
<input type="radio" name="avatar" value="/lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/5.jpg">
|
||||
<img src="'.BASE_URL.'lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/5.jpg" width="50" alt="avatar">
|
||||
</label>
|
||||
</div>
|
||||
</div>' : '').'
|
||||
'.$dep_stuff.'
|
||||
<div class="jaklcb_input">
|
||||
<label for="start_name">'.$jkl["g4"].'</label>
|
||||
<input id="start_name" name="start_name" type="text" class="lcjak_input" placeholder="'.$jkl["g4"].'" value="'.(isset($_REQUEST["name"]) ? $_REQUEST["name"] : '').'">
|
||||
</div>
|
||||
<input type="hidden" name="start_email" value="'.(isset($_REQUEST["start_email"]) ? $_REQUEST["start_email"] : '').'">
|
||||
<div class="jaklcb_input">
|
||||
<label for="start_chat_msg">'.$jkl["g71"].'</label>
|
||||
<textarea id="start_chat_msg" name="start_chat_msg" placeholder="'.$jkl['g71'].'">'.(isset($_REQUEST["start_chat_msg"]) ? $_REQUEST["start_chat_msg"] : '').'</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_startchat jakbtn btn-simple btn-'.$btn_custom.'" onclick="lcjak_startChat()" type="button"><i class="fa fa-paper-plane" id="start_chat_btn"></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 '.$start_animate.'">
|
||||
<button class="jaklcb_sendcontact left lcb_startchat" type="button" onclick="lcjak_startChat()">
|
||||
<i class="fa fa-paper-plane" id="start_chat_btn"></i>
|
||||
</button>
|
||||
<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>
|
||||
'.(isset($widgetsettings[$widgetid]['start_show_avatars']) && $widgetsettings[$widgetid]['start_show_avatars'] == "Yes" ? '
|
||||
<div class="avatars">
|
||||
<div class="ava_item">
|
||||
<label>
|
||||
<span><?php echo $jkl["g18"];?></span>
|
||||
<input type="radio" name="avatar" value="/lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/standard.jpg">
|
||||
<img src="'.BASE_URL.'lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/standard.jpg" width="50" alt="avatar">
|
||||
</label>
|
||||
</div>
|
||||
<div class="ava_item">
|
||||
<label>
|
||||
<span><?php echo $jkl["g18"];?></span>
|
||||
<input type="radio" name="avatar" value="/lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/1.jpg">
|
||||
<img src="'.BASE_URL.'lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/1.jpg" width="50" alt="avatar">
|
||||
</label>
|
||||
</div>
|
||||
<div class="ava_item">
|
||||
<label>
|
||||
<span><?php echo $jkl["g18"];?></span>
|
||||
<input type="radio" name="avatar" value="/lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/2.jpg">
|
||||
<img src="'.BASE_URL.'lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/2.jpg" width="50" alt="avatar">
|
||||
</label>
|
||||
</div>
|
||||
<div class="ava_item">
|
||||
<label>
|
||||
<span><?php echo $jkl["g18"];?></span>
|
||||
<input type="radio" name="avatar" value="/lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/3.jpg">
|
||||
<img src="'.BASE_URL.'lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/3.jpg" width="50" alt="avatar">
|
||||
</label>
|
||||
</div>
|
||||
<div class="ava_item">
|
||||
<label>
|
||||
<span><?php echo $jkl["g18"];?></span>
|
||||
<input type="radio" name="avatar" value="/lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/4.jpg">
|
||||
<img src="'.BASE_URL.'lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/4.jpg" width="50" alt="avatar">
|
||||
</label>
|
||||
</div>
|
||||
<div class="ava_item">
|
||||
<label>
|
||||
<span><?php echo $jkl["g18"];?></span>
|
||||
<input type="radio" name="avatar" value="/lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/5.jpg">
|
||||
<img src="'.BASE_URL.'lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/5.jpg" width="50" alt="avatar">
|
||||
</label>
|
||||
</div>
|
||||
</div>' : '').'
|
||||
'.$dep_stuff.'
|
||||
<div class="jaklcb_input">
|
||||
<label for="start_name">'.$jkl["g4"].'</label>
|
||||
<input id="start_name" name="start_name" type="text" class="lcjak_input" placeholder="'.$jkl["g4"].'" value="'.(isset($_REQUEST["start_name"]) ? $_REQUEST["start_name"] : '').'">
|
||||
</div>
|
||||
<input type="hidden" name="start_email" value="'.(isset($_REQUEST["start_email"]) ? $_REQUEST["start_email"] : '').'">
|
||||
<div class="jaklcb_input">
|
||||
<label for="start_chat_msg">'.$jkl["g71"].'</label>
|
||||
<textarea id="start_chat_msg" name="start_chat_msg" placeholder="'.$jkl['g71'].'">'.(isset($_REQUEST["start_chat_msg"]) ? $_REQUEST["start_chat_msg"] : '').'</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="">
|
||||
</section></form></div>';
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -0,0 +1,312 @@
|
||||
<?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/start.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 */
|
||||
$startsett = array();
|
||||
|
||||
$startsett["previewchat"] = "preview/simple_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
|
||||
|
||||
*/
|
||||
|
||||
$startsett["formoptions"] = array("1" => "1:#:".$jkl['cw24'].":#:0:#:0:#:start_custom_logo", "2" => "3:#:".$jkl['cw43'].":#:Yes,No:#:0:#:start_show_avatars", "3" => "5:#:".$jkl['cw22'].":#:blue,green,orange,red,pink,grey:#:0:#:start_colour_theme", "4" => "5:#:".$jkl['cw23'].":#:animate__fadeIn,animate__flash,animate__pulse,animate__headShake,animate__slideInUp,animate__slideInRight:#:0:#:start_animation");
|
||||
|
||||
} else {
|
||||
|
||||
// Check the vars for this start
|
||||
$start_animate = "animate__fadeIn";
|
||||
$start_custom = "";
|
||||
$btn_custom = "blue";
|
||||
$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]['start_animation']) && !empty($widgetsettings[$widgetid]['start_animation'])) {
|
||||
$start_animate = $widgetsettings[$widgetid]['start_animation'];
|
||||
}
|
||||
|
||||
// We can have custom online icon
|
||||
if (isset($widgetsettings[$widgetid]['start_colour_theme']) && !empty($widgetsettings[$widgetid]['start_colour_theme']) && $widgetsettings[$widgetid]['start_colour_theme'] != "blue") {
|
||||
$start_custom = " ".$widgetsettings[$widgetid]['start_colour_theme'];
|
||||
$btn_custom = $widgetsettings[$widgetid]['start_colour_theme'];
|
||||
}
|
||||
|
||||
// We can have custom online icon
|
||||
if (isset($widgetsettings[$widgetid]['start_custom_logo']) && !empty($widgetsettings[$widgetid]['start_custom_logo'])) {
|
||||
$start_logo = '<img src="'.$widgetsettings[$widgetid]['start_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 = 7;
|
||||
|
||||
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 collect the departments
|
||||
$dep_direct = 0;
|
||||
if (isset($jakwidget[$widgetid]['depid']) && is_numeric($jakwidget[$widgetid]['depid']) && $jakwidget[$widgetid]['depid'] != 0) {
|
||||
$dep_direct = 1;
|
||||
foreach ($online_op as $d) {
|
||||
if (in_array($jakwidget[$widgetid]['depid'], $d)) {
|
||||
$dep_direct = $jakwidget[$widgetid]['depid'];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Operator ID if set
|
||||
$op_direct = 0;
|
||||
if (isset($jakwidget[$widgetid]['singleopid']) && is_numeric($jakwidget[$widgetid]['singleopid']) && $jakwidget[$widgetid]['singleopid'] != 0) $op_direct = $jakwidget[$widgetid]['singleopid'];
|
||||
|
||||
$dep_all = '';
|
||||
if ($op_direct == 0 && $dep_direct != 0 && is_numeric($dep_direct)) {
|
||||
$dep_stuff = '<input type="hidden" name="start_department" value="'.$dep_direct.'">';
|
||||
} elseif ($op_direct == 0 && count($online_op) > 1) {
|
||||
|
||||
foreach($online_op as $v) { if (in_array($v["id"], explode(',', $jakwidget[$widgetid]["depid"])) || $jakwidget[$widgetid]["depid"] == 0) {
|
||||
$dep_all .= '<option value="'.$v["id"].'"'.(isset($_REQUEST["start_department"]) && $_REQUEST["start_department"] == $v["id"] ? ' selected' : '').'>'.$v["title"].'</option>';
|
||||
} }
|
||||
|
||||
$dep_stuff = '<div class="jaklcb_select">
|
||||
<label for="start_department">'.$jkl["g30"].'</label>
|
||||
<select name="start_department" id="start_department">'.$dep_all.'</select>
|
||||
</div>';
|
||||
} else {
|
||||
$dep_stuff = '<input type="hidden" name="start_department" value="'.$online_op[0]["id"].'"><input type="hidden" name="start_op_direct" value="'.$op_direct.'">';
|
||||
}
|
||||
|
||||
// We go big
|
||||
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>
|
||||
'.(isset($widgetsettings[$widgetid]['start_show_avatars']) && $widgetsettings[$widgetid]['start_show_avatars'] == "Yes" ? '
|
||||
<div class="avatars">
|
||||
<div class="ava_item">
|
||||
<label>
|
||||
<span><?php echo $jkl["g18"];?></span>
|
||||
<input type="radio" name="avatar" value="/lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/standard.jpg">
|
||||
<img src="'.BASE_URL.'lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/standard.jpg" width="50" alt="avatar">
|
||||
</label>
|
||||
</div>
|
||||
<div class="ava_item">
|
||||
<label>
|
||||
<span><?php echo $jkl["g18"];?></span>
|
||||
<input type="radio" name="avatar" value="/lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/1.jpg">
|
||||
<img src="'.BASE_URL.'lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/1.jpg" width="50" alt="avatar">
|
||||
</label>
|
||||
</div>
|
||||
<div class="ava_item">
|
||||
<label>
|
||||
<span><?php echo $jkl["g18"];?></span>
|
||||
<input type="radio" name="avatar" value="/lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/2.jpg">
|
||||
<img src="'.BASE_URL.'lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/2.jpg" width="50" alt="avatar">
|
||||
</label>
|
||||
</div>
|
||||
<div class="ava_item">
|
||||
<label>
|
||||
<span><?php echo $jkl["g18"];?></span>
|
||||
<input type="radio" name="avatar" value="/lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/3.jpg">
|
||||
<img src="'.BASE_URL.'lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/3.jpg" width="50" alt="avatar">
|
||||
</label>
|
||||
</div>
|
||||
<div class="ava_item">
|
||||
<label>
|
||||
<span><?php echo $jkl["g18"];?></span>
|
||||
<input type="radio" name="avatar" value="/lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/4.jpg">
|
||||
<img src="'.BASE_URL.'lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/4.jpg" width="50" alt="avatar">
|
||||
</label>
|
||||
</div>
|
||||
<div class="ava_item">
|
||||
<label>
|
||||
<span><?php echo $jkl["g18"];?></span>
|
||||
<input type="radio" name="avatar" value="/lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/5.jpg">
|
||||
<img src="'.BASE_URL.'lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/5.jpg" width="50" alt="avatar">
|
||||
</label>
|
||||
</div>
|
||||
</div>' : '').'
|
||||
'.$dep_stuff.'
|
||||
<div class="jaklcb_input">
|
||||
<label for="start_name">'.$jkl["g4"].'</label>
|
||||
<input id="start_name" name="start_name" type="text" class="lcjak_input" placeholder="'.$jkl["g4"].'" value="'.(isset($_REQUEST["name"]) ? $_REQUEST["name"] : '').'">
|
||||
</div>
|
||||
<input type="hidden" name="start_email" value="'.(isset($_REQUEST["start_email"]) ? $_REQUEST["start_email"] : '').'">
|
||||
<div class="jaklcb_input">
|
||||
<label for="start_chat_msg">'.$jkl["g71"].'</label>
|
||||
<textarea id="start_chat_msg" name="start_chat_msg" placeholder="'.$jkl['g71'].'">'.(isset($_REQUEST["start_chat_msg"]) ? $_REQUEST["start_chat_msg"] : '').'</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_startchat jakbtn btn-simple btn-'.$btn_custom.'" onclick="lcjak_startChat()" type="button"><i class="fa fa-paper-plane" id="start_chat_btn"></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 '.$start_animate.'">
|
||||
<button class="jaklcb_sendcontact lcb_startchat" type="button" onclick="lcjak_startChat()">
|
||||
<i class="fa fa-paper-plane" id="start_chat_btn"></i>
|
||||
</button>
|
||||
<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>
|
||||
'.(isset($widgetsettings[$widgetid]['start_show_avatars']) && $widgetsettings[$widgetid]['start_show_avatars'] == "Yes" ? '
|
||||
<div class="avatars">
|
||||
<div class="ava_item">
|
||||
<label>
|
||||
<span><?php echo $jkl["g18"];?></span>
|
||||
<input type="radio" name="avatar" value="/lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/standard.jpg">
|
||||
<img src="'.BASE_URL.'lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/standard.jpg" width="50" alt="avatar">
|
||||
</label>
|
||||
</div>
|
||||
<div class="ava_item">
|
||||
<label>
|
||||
<span><?php echo $jkl["g18"];?></span>
|
||||
<input type="radio" name="avatar" value="/lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/1.jpg">
|
||||
<img src="'.BASE_URL.'lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/1.jpg" width="50" alt="avatar">
|
||||
</label>
|
||||
</div>
|
||||
<div class="ava_item">
|
||||
<label>
|
||||
<span><?php echo $jkl["g18"];?></span>
|
||||
<input type="radio" name="avatar" value="/lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/2.jpg">
|
||||
<img src="'.BASE_URL.'lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/2.jpg" width="50" alt="avatar">
|
||||
</label>
|
||||
</div>
|
||||
<div class="ava_item">
|
||||
<label>
|
||||
<span><?php echo $jkl["g18"];?></span>
|
||||
<input type="radio" name="avatar" value="/lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/3.jpg">
|
||||
<img src="'.BASE_URL.'lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/3.jpg" width="50" alt="avatar">
|
||||
</label>
|
||||
</div>
|
||||
<div class="ava_item">
|
||||
<label>
|
||||
<span><?php echo $jkl["g18"];?></span>
|
||||
<input type="radio" name="avatar" value="/lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/4.jpg">
|
||||
<img src="'.BASE_URL.'lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/4.jpg" width="50" alt="avatar">
|
||||
</label>
|
||||
</div>
|
||||
<div class="ava_item">
|
||||
<label>
|
||||
<span><?php echo $jkl["g18"];?></span>
|
||||
<input type="radio" name="avatar" value="/lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/5.jpg">
|
||||
<img src="'.BASE_URL.'lctemplate/business/avatar/'.$jakwidget[$widgetid]['avatarset'].'/5.jpg" width="50" alt="avatar">
|
||||
</label>
|
||||
</div>
|
||||
</div>' : '').'
|
||||
'.$dep_stuff.'
|
||||
<div class="jaklcb_input">
|
||||
<label for="start_name">'.$jkl["g4"].'</label>
|
||||
<input id="start_name" name="start_name" type="text" class="lcjak_input" placeholder="'.$jkl["g4"].'" value="'.(isset($_REQUEST["start_name"]) ? $_REQUEST["start_name"] : '').'">
|
||||
</div>
|
||||
<input type="hidden" name="start_email" value="'.(isset($_REQUEST["start_email"]) ? $_REQUEST["start_email"] : '').'">
|
||||
<div class="jaklcb_input">
|
||||
<label for="start_chat_msg">'.$jkl["g71"].'</label>
|
||||
<textarea id="start_chat_msg" name="start_chat_msg" placeholder="'.$jkl['g71'].'">'.(isset($_REQUEST["start_chat_msg"]) ? $_REQUEST["start_chat_msg"] : '').'</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="">
|
||||
</section></form></div>';
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -0,0 +1,179 @@
|
||||
<?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;left:0;";
|
||||
$wtplsett["customjs"] = "js/start.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 */
|
||||
$startsett = array();
|
||||
|
||||
$startsett["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
|
||||
|
||||
*/
|
||||
|
||||
$startsett["formoptions"] = array("1" => "1:#:".$jkl['cw24'].":#:0:#:0:#:start_custom_logo", "2" => "1:#:".$jkl['cw40'].":#:0:#:0:#:whatsapp_message", "3" => "5:#:".$jkl['cw22'].":#:blue,green,orange,red,pink,grey:#:0:#:start_colour_theme", "4" => "5:#:".$jkl['cw23'].":#:animate__fadeIn,animate__flash,animate__pulse,animate__headShake,animate__slideInUp,animate__slideInRight:#:0:#:start_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]['start_animation']) && !empty($widgetsettings[$widgetid]['start_animation'])) {
|
||||
$start_animate = $widgetsettings[$widgetid]['start_animation'];
|
||||
}
|
||||
|
||||
// We can have custom online icon
|
||||
if (isset($widgetsettings[$widgetid]['start_colour_theme']) && !empty($widgetsettings[$widgetid]['start_colour_theme']) && $widgetsettings[$widgetid]['start_colour_theme'] != "blue") {
|
||||
$start_custom = " ".$widgetsettings[$widgetid]['start_colour_theme'];
|
||||
}
|
||||
|
||||
// We can have custom online icon
|
||||
if (isset($widgetsettings[$widgetid]['start_custom_logo']) && !empty($widgetsettings[$widgetid]['start_custom_logo'])) {
|
||||
$start_logo = '<img src="'.$widgetsettings[$widgetid]['start_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 = 26;
|
||||
|
||||
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"]) ? '&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>';
|
||||
|
||||
}
|
||||
|
||||
// We go big
|
||||
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>
|
||||
<input type="hidden" name="start_name" value="">
|
||||
<input type="hidden" name="start_email" value="">
|
||||
</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>
|
||||
<input type="hidden" name="start_name" value="">
|
||||
<input type="hidden" name="start_email" value="">
|
||||
</form></div>';
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -0,0 +1,179 @@
|
||||
<?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/start.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 */
|
||||
$startsett = array();
|
||||
|
||||
$startsett["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
|
||||
|
||||
*/
|
||||
|
||||
$startsett["formoptions"] = array("1" => "1:#:".$jkl['cw24'].":#:0:#:0:#:start_custom_logo", "2" => "1:#:".$jkl['cw40'].":#:0:#:0:#:whatsapp_message", "3" => "5:#:".$jkl['cw22'].":#:blue,green,orange,red,pink,grey:#:0:#:start_colour_theme", "4" => "5:#:".$jkl['cw23'].":#:animate__fadeIn,animate__flash,animate__pulse,animate__headShake,animate__slideInUp,animate__slideInRight:#:0:#:start_animation");
|
||||
|
||||
} else {
|
||||
|
||||
// Check the vars for this start
|
||||
$start_animate = "animate__fadeIn";
|
||||
$start_custom = "";
|
||||
$start_logo = '<i class="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]['start_animation']) && !empty($widgetsettings[$widgetid]['start_animation'])) {
|
||||
$start_animate = $widgetsettings[$widgetid]['start_animation'];
|
||||
}
|
||||
|
||||
// We can have custom online icon
|
||||
if (isset($widgetsettings[$widgetid]['start_colour_theme']) && !empty($widgetsettings[$widgetid]['start_colour_theme']) && $widgetsettings[$widgetid]['start_colour_theme'] != "blue") {
|
||||
$start_custom = " ".$widgetsettings[$widgetid]['start_colour_theme'];
|
||||
}
|
||||
|
||||
// We can have custom online icon
|
||||
if (isset($widgetsettings[$widgetid]['start_custom_logo']) && !empty($widgetsettings[$widgetid]['start_custom_logo'])) {
|
||||
$start_logo = '<img src="'.$widgetsettings[$widgetid]['start_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 = 26;
|
||||
|
||||
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"]) ? '&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>';
|
||||
|
||||
}
|
||||
|
||||
// We go big
|
||||
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>
|
||||
<input type="hidden" name="start_name" value="">
|
||||
<input type="hidden" name="start_email" value="">
|
||||
</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>
|
||||
<input type="hidden" name="start_name" value="">
|
||||
<input type="hidden" name="start_email" value="">
|
||||
</form></div>';
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user