case 'getUserData': json('username', genUname(0), 'login', 'active_user', 'avatar', '/images/temp/small-pic1.png'); break; case 'getuserinfo': json('contactUname', genUname($_POST['uid']), 'contactLogin', 'login_' . $_POST['uid'], 'contactAvatar', '/images/temp/small-pic1.png', 'uid', $_POST['uid']); break; case 'getcontactslist': $top = 25; if ($_POST['type'] == 'all_contacts') { $top = 40; } $sz = rand(10, $top); $list = array(); for ($i = 0; $i < $sz; ++$i) { $o['uid'] = $i + 1; $o['name'] = genUname($i + 1); $o['login'] = '******' . ($i + 1); $online = rand(0, 1); if ($_POST['online'] == 1) { $online = 1; } $o['isOnline'] = $online; $o['avatar'] = rand(0, 1) ? '/images/temp/small-pic1.png' : '/images/temp/small-pic.gif'; $o['isEmpl'] = rand(0, 1); $list[] = $o; } json('list', $list); break; case 'gethistory': $list = array(); if (!is_array($_SESSION['qchtesthistory_' . $_POST['uid']])) {
case "getUserData": json("username", genUname(0), "login", "active_user", "avatar", "/images/temp/small-pic1.png"); break; case "getuserinfo": json("contactUname", genUname($_POST["uid"]), "contactLogin", "login_" . $_POST["uid"], "contactAvatar", "/images/temp/small-pic1.png", "uid", $_POST["uid"]); break; case "getcontactslist": $top = 25; if ($_POST['type'] == 'all_contacts') { $top = 40; } $sz = rand(10, $top); $list = array(); for ($i = 0; $i < $sz; $i++) { $o["uid"] = $i + 1; $o["name"] = genUname($i + 1); $o["login"] = "******" . ($i + 1); $online = rand(0, 1); if ($_POST["online"] == 1) { $online = 1; } $o["isOnline"] = $online; $o['avatar'] = rand(0, 1) ? "/images/temp/small-pic1.png" : "/images/temp/small-pic.gif"; $o['isEmpl'] = rand(0, 1); $list[] = $o; } json("list", $list); break; case "gethistory": $list = array(); if (!is_array($_SESSION["qchtesthistory_" . $_POST["uid"]])) {