isMobile()) $ismobile = " ismobile"; // First we need to check if the chat is active, if not... if ($jakosub['active'] == 0) jak_redirect(BASE_URL."signup/"); // Now we check all the necessary stuff in one file and load the correct templates depend on sessions // First we will need to know if the chat window is closed or open if (isset($page1) && in_array($page1, array("open", "big", "profile", "bigprofile", "feedback", "bigfeedback", "contactform"))) { // Let's make sure to remove all unwanted sessions if (isset($page4) && is_numeric($page4) && isset($page5) && !empty($page5) && JAK_base::jakCheckSession($page4, $page5)) { // It looks like we are having a session $sessLogged = true; } // Now let's find out if we have a session to close the chat if ($sessLogged) { // Do we wont to stop the chat and with feedback if ($page1 == "feedback" || $page1 == "bigfeedback") { // Yes, but do we want to show the feedback if (isset($jakwidget[$widgetid]["feedback_tpl"]) && !empty($jakwidget[$widgetid]["feedback_tpl"])) { include_once APP_PATH.'lctemplate/'.$jakwidget[$widgetid]['template'].'/tplblocks/feedback/'.$jakwidget[$widgetid]["feedback_tpl"]; // Ok there is no template we load the standard one } else { include_once APP_PATH.'lctemplate/'.$jakwidget[$widgetid]['template'].'/tplblocks/feedback/small_big_bottom_right.php.php'; } // Nope, we want to show the chat } else { if ($page1 == "profile" || $page1 == "bigprofile") { if (isset($jakwidget[$widgetid]["profile_tpl"]) && !empty($jakwidget[$widgetid]["profile_tpl"])) { include_once APP_PATH.'lctemplate/'.$jakwidget[$widgetid]['template'].'/tplblocks/profile/'.$jakwidget[$widgetid]["profile_tpl"]; // Ok there is no template we load the standard one } else { include_once APP_PATH.'lctemplate/'.$jakwidget[$widgetid]['template'].'/tplblocks/chat/small_big_bottom_right.php.php'; } } else { if (isset($jakwidget[$widgetid]["chat_tpl"]) && !empty($jakwidget[$widgetid]["chat_tpl"])) { include_once APP_PATH.'lctemplate/'.$jakwidget[$widgetid]['template'].'/tplblocks/chat/'.$jakwidget[$widgetid]["chat_tpl"]; // Ok there is no template we load the standard one } else { include_once APP_PATH.'lctemplate/'.$jakwidget[$widgetid]['template'].'/tplblocks/chat/small_big_bottom_right.php'; } } } } else { if ($online_op && $page1 != "contactform") { if (isset($jakwidget[$widgetid]['start_tpl']) && !empty($jakwidget[$widgetid]["start_tpl"])) { include_once APP_PATH.'lctemplate/'.$jakwidget[$widgetid]['template'].'/tplblocks/start/'.$jakwidget[$widgetid]["start_tpl"]; // Ok there is no template we load the standard one } else { include_once APP_PATH.'lctemplate/'.$jakwidget[$widgetid]['template'].'/tplblocks/start/small_big_bottom_right.php.php'; } // Load the javascript file for the start if (!empty($wtplsett["startjs"])) $customjs = $wtplsett["startjs"]; } else { if (isset($jakwidget[$widgetid]["contact_tpl"]) && !empty($jakwidget[$widgetid]["contact_tpl"])) { include_once APP_PATH.'lctemplate/'.$jakwidget[$widgetid]['template'].'/tplblocks/contact/'.$jakwidget[$widgetid]["contact_tpl"]; // Ok there is no template we load the standard one } else { include_once APP_PATH.'lctemplate/'.$jakwidget[$widgetid]['template'].'/tplblocks/contact/small_big_bottom_right.php.php'; } } } // Chat is closed we need to show for sure the opening button } else { // We load the template chosen for this widget if (isset($jakwidget[$widgetid]["btn_tpl"]) && !empty($jakwidget[$widgetid]["btn_tpl"])) { include_once APP_PATH.'lctemplate/'.$jakwidget[$widgetid]['template'].'/tplblocks/btn/'.$jakwidget[$widgetid]["btn_tpl"]; // Ok there is no template we load the standard one } else { include_once APP_PATH.'lctemplate/'.$jakwidget[$widgetid]['template'].'/tplblocks/btn/icon_button_right.php'; } // Are we online of offline if ($online_op) { $livecode = $livecode_online; } elseif ($jakwidget[$widgetid]['hidewhenoff']) { $livecode = $livecode_hide; } else { $livecode = $livecode_offline; } } // start buffer ob_start(); ?>