false, 'error' => "No valid ID."))); if (!file_exists('../config.php')) die('include/[clientchat_cross.php] config.php not exist'); require_once '../config.php'; // We do not load any widget code if we are on hosted and expiring date is true. if ((isset($jakosub['groupchats']) && $jakosub['groupchats'] == 0) || (isset($jakosub['active']) && $jakosub['active'] == 0)) die(json_encode(array('status' => false, 'error' => "Account expired or no access to group chats."))); // Some reset $widgethtml = $floatstyle = ''; // Get the client browser $ua = new Browser(); // Is a robot just die if ($ua->isRobot()) die(json_encode(array('status' => false, 'error' => "Robots do not need a live chat."))); // Now check the button id if (file_exists($cacheopid)) { // Group Chat is online show it if (isset($groupchat[$_GET['id']]["active"]) && $groupchat[$_GET['id']]["active"] == 1) { // Float button? Position $floatstyle = ''; if ($groupchat[$_GET['id']]['floatpopup'] && !empty($groupchat[$_GET['id']]['floatcss'])) $floatstyle = ' style="position:fixed;z-index:9999;'.$groupchat[$_GET['id']]['floatcss'].'"'; $widgethtml = ''; die(json_encode(array('status' => true, 'title' => $jakwidget[$_GET['id']]['title'], 'widgethtml' => $widgethtml))); // Chat is offline show nothing } else { die(json_encode(array('status' => false, 'error' => "Group Chat is offline"))); } } else { die(json_encode(array('status' => false, 'error' => "No Group Chat available with this ID."))); } ?>