$response = unfollowContact($_REQUEST['username']); break; case "get_contact_list": $response = getContactList(); break; case "add_link": $response = addLink($_REQUEST['from_url'], $_REQUEST['from_url_param'], $_REQUEST['to_url'], $_REQUEST['to_url_param'], $_REQUEST['note']); break; case "delete_link": $response = deleteLink($_REQUEST['from_url'], $_REQUEST['from_url_param'], $_REQUEST['to_url'], $_REQUEST['to_url_param']); break; case "get_links": $response = getLinks($_REQUEST['url'], $_REQUEST['url_param']); break; case "rate_link": $response = rateLink($_REQUEST['from_url'], $_REQUEST['from_url_param'], $_REQUEST['to_url'], $_REQUEST['to_url_param'], $_REQUEST['up']); break; case "get_link_comment": $response = getLinkComment($_REQUEST['from_url'], $_REQUEST['from_url_param'], $_REQUEST['to_url'], $_REQUEST['to_url_param']); break; case "verify_user": $response = verifyUser($_REQUEST['confirm_code']); break; case "invite_user": $response = inviteUser($_REQUEST['email']); break; case "get_title": $response = getTitle($_REQUEST['url'], $_REQUEST['url_param']); break; case "update_title": $response = updateTitle($_REQUEST['url'], $_REQUEST['url_param'], $_REQUEST['title']);
<?php include 'db.php'; error_reporting(E_ALL); ini_set('display_errors', 1); $type = $_POST['type']; $data = $_POST['data']; if ($type == "loadLinks") { loadLinks($data); } if ($type == "loadRatedLinks") { loadRatedLinks($data); } if ($type == "rateLink") { rateLink($data); } if ($type == "loadRatedLinksByAllJudges") { loadRatedLinksByAllJudges(); } function loadRatedLinks($data) { $jid = $data["jid"]; $rowStatus = 0; $array = array(); $sql = "SELECT l.url , l.posted_date , l.title , vr.rating FROM video_rating vr , links l where vr.link_id = l.id AND vr.judge_id = '{$jid}' "; $retval = mysql_query($sql); if (!$retval) { die('Could not enter data: ' . mysql_error()); } else { while ($row = mysql_fetch_assoc($retval)) { $array[] = $row;