$protocol = strpos(strtolower($_SERVER['SERVER_PROTOCOL']),'https') === FALSE ? 'http' : 'https'; $host = $_SERVER['HTTP_HOST']; $script = $_SERVER['SCRIPT_NAME']; $params = $_SERVER['QUERY_STRING']; $currentUrl = $protocol . '://' . $host . $script . '?' . $params; //Users Live Status if(userNotLive()) { $live_num = "(votes_live)+0"; } else { $live_num = "(votes_live)+1"; } $u_id = $plus->quote($User->Id); function full_url() { $s = empty($_SERVER["HTTPS"]) ? '' : ($_SERVER["HTTPS"] == "on") ? "s" : ""; $protocol = substr(strtolower($_SERVER["SERVER_PROTOCOL"]), 0, strpos(strtolower($_SERVER["SERVER_PROTOCOL"]), "/")) . $s; $port = ($_SERVER["SERVER_PORT"] == "80") ? "" : (":".$_SERVER["SERVER_PORT"]); return $protocol . "://" . $_SERVER['SERVER_NAME'] . $port . $_SERVER['REQUEST_URI']; } $actual_link = full_url(); //update request status if(!empty($User->Id)) { if(isset($_POST['fill'])) { $fill_request = $Db->query("UPDATE user_request SET `status` = '1', `date_filled` = '" .time(). "', `url` = '".$plus->quote($_POST[url])."' WHERE id = '".$plus->quote($_POST[id])."' LIMIT 1"); //email_request(#); include "/home/ac/public_html/email.php"; //include "/home/ac/public_html/add_alert.php"; # addAlertRequested($_POST['id']); @header("location:$currentUrl"); } //+1 vote for request if(isset($_POST['request'])) { $u_id = $plus->quote($User->Id); if(userNotLive()) { $fill_request = $Db->query("UPDATE user_request SET votes = concat(votes,'|{$u_id}|'), votes_num=(votes_num)+1 WHERE id = '".$plus->quote($_POST[id])."' LIMIT 1"); } else { $fill_request = $Db->query("UPDATE user_request SET votes = concat(votes,'|{$u_id}|'), votes_num=(votes_num)+1, votes_live=(votes_live)+1 WHERE id = '".$plus->quote($_POST[id])."' LIMIT 1"); } /*** Kailash code start here ****/ add_point_to_users($User->Id, 'Request Anime'); /*** Kailash code end here ****/ @header("location:$currentUrl"); } //Update Request Note if(isset($_POST['note'])) { $note = $plus->quote($_POST['note']); $fill_request = $Db->query("UPDATE user_request SET note = '{$note}' WHERE id = '".$plus->quote($_POST[id])."' LIMIT 1"); @header("location:$currentUrl"); } //Delete Request if(isset($_POST['delete_id'])) { $delete_id = $plus->quote($_POST['delete_id']); $fill_request = $Db->query("DELETE FROM `user_request` WHERE `user_request`.`id` = '{$delete_id}' LIMIT 1"); @header("location:$currentUrl"); } if(isset($_POST['irequest']) && isset($_POST[title]) && isset($_POST[group1])) { if(userNotLive()) { $live_num = 0; } else { $live_num = 1; } $if_onac = $Db->query("SELECT id FROM ac_animecrave.ac_anime WHERE title='".$plus->quote($_POST[title])."' AND type='".$plus->quote($_POST[group1])."' LIMIT 1"); if (mysql_num_rows($if_onac) > 0) { $note = "The media you requested is already available on Anime Crave."; $cancel = "1"; } $if_requested = $Db->query("SELECT id FROM ac_animecrave.user_request WHERE name='".$plus->quote($_POST[title])."' AND type='".$plus->quote($_POST[group1])."' LIMIT 1"); if (mysql_num_rows($if_requested) > 0) { $note = "The media you requested has already been requested. Your request was added to it's total amount of votes. To increase its chances of being added please promote it on forums & chat!"; $cancel = "2"; } if(!isset($cancel)) { $add_request = $Db->query("INSERT INTO user_request (name, date, type, user_id, votes, votes_num, votes_live) VALUES ('".$plus->quote($_POST[title])."', '" .time(). "', '".$plus->quote($_POST[group1])."', '".$plus->quote($User->Id)."', '|".$plus->quote($User->Id)."|', '1', '{$live_num}')"); $note = "The request has been added, to increase its chances of being added please promote it on forums & chat!"; } if($cancel == "2") { $fill_request = $Db->query("UPDATE user_request SET votes = concat(votes,'|{$u_id}|'), votes_num=(votes_num)+1, votes_live=(votes_live)+$live_num WHERE name = '".$plus->quote($_POST[title])."' AND votes NOT LIKE '%|$u_id|%' LIMIT 1"); } } } switch ($_GET['or']) { case 0: $orderby = "votes_num DESC"; break; case 1: $orderby = "votes_num ASC"; break; case 2: $orderby = "name DESC"; break; case 3: $orderby = "name ASC"; break; case 4: $orderby = "date DESC"; break; case 5: $orderby = "date ASC"; break; default: $orderby = "name ASC"; } if($_GET['or'] == 0) { $voteor = "?page=anime_request_fansubs&or=1"; } else { $voteor = "?page=anime_request_fansubs&or=0"; } if($_GET['or'] == 2) { $nameor = "?page=anime_request_fansubs&or=3"; } else { $nameor = "?page=anime_request_fansubs&or=2"; } if($_GET['or'] == 4) { $dateor = "?page=anime_request_fansubs&or=5"; } else { $dateor = "?page=anime_request_fansubs&or=4"; } ?>

| ANIME FANSUBS | Back to All Requests |
| Sort By TITLE |
TYPE | Sort by DATE |
Sort By # of REQUESTS |
AVAILABILITY |
| ".$data['name']." | "; switch ($data['type']) { case 1: $type = "Series"; break; case 2: $type = "OVA"; break; case 3: $type = "Movie"; break; case 4: $type = "Live Action"; break; case 5: $type = "Fansub"; break; case 7: $type = "mp3s"; break; } echo "{$type} | ".date('m.d.y', $data[date])." | "; $votes_array = explode("|", $data['votes']); $votes = count($votes_array); echo "{$data['votes_num']} "; if($User->Info['level'] > 1) { echo "(L: {$data['votes_live']})"; } echo " |
";
} else { echo " ";
}
echo "
|
| "; if($User->Info['level'] > 1) { echo " | "; } elseif(!empty($data['note'])) { echo " | NOTES: {$data['note']} | "; } if($User->Info['level'] > 1) { echo ""; } else { echo ""; } echo " |