require_once dirname(dirname(dirname(dirname(__FILE__)))) . DIRECTORY_SEPARATOR . 'bootstrap.php'; require_once dirname(dirname(dirname(dirname(__FILE__)))) . DIRECTORY_SEPARATOR . AC_FOLDER_INCLUDES . DIRECTORY_SEPARATOR . 'init.php'; // ########################### INITILIZATION ############################# $response = array(); $messages = array(); $buddyList = array(); $time = time(); if (var_check('popout')) { $popout = true; } else { $popout = false; } // ###################### START BUDDY LIST RECEIVE ####################### if (logged_in($userid)) { // Refresh the user's session updateUserSession(); if ($disable_buddy_list == 1 or check_if_guest($userid) or NO_FREIND_SYSTEM == 1 or $is_admin == 1 and $admin_chat_all == 1) { $sql = get_online_list($userid, $time); } else { $sql = get_friend_list($userid, $time); } $result = $db->execute($sql); while ($chat = $db->fetch_array($result)) { if ($chat['userid'] != $userid) { if ($time - $chat['lastactivity'] < $online_timeout and $chat['status'] != 'invisible' and $chat['status'] != 'offline') { if ($chat['status'] != 'busy' and $chat['status'] != 'away') { $chat['status'] = 'available'; } } else { if ($chat['status'] == 'invisible') { if ($is_admin == 1) {
<?php include 'connect.php'; $sessionId = $_REQUEST["sessionId"]; $serviceCode = $_REQUEST["serviceCode"]; $phoneNumber = $_REQUEST["phoneNumber"]; $text = $_REQUEST["text"]; $session = registerUser($phoneNumber, $sessionId); if ($session == $sessionId) { echo "Continuing user"; //continuing user } else { updateUserSession($phoneNumber, $sessionId); echo "Welcome back"; } exit; //implement revisit mode; //$response = "This is a test"; //Mshwari Mockup //*384*2014# //switch if (!empty($text)) { $exploded_text = explode("*", $text); $level = count($exploded_text); } else { $level = 0; } //print_r(count($exploded_text)); //exit; switch (trim(strtolower($level))) { case 0: