"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 = '';
// 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 = '';
}
// 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 = '';
} 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 .= '';
} }
$dep_stuff = '