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_music&or=1"; } else { $voteor = "?page=anime_request_music&or=0"; } if($_GET['or'] == 2) { $nameor = "?page=anime_request_music&or=3"; } else { $nameor = "?page=anime_request_music&or=2"; } if($_GET['or'] == 4) { $dateor = "?page=anime_request_music&or=5"; } else { $dateor = "?page=anime_request_music&or=4"; } ?>
ANIME MUSIC Back to All Requests
Sort By
TITLE
TYPE Sort by
DATE
Sort By
# of REQUESTS
AVAILABILITY
query("SELECT * FROM user_request WHERE status = '0' AND type = '7'"); $numrows = mysql_num_rows($numresults); $pages = intval($numrows/$limit); if ($numrows%$limit) {$pages++;} $current = ($cpage/$limit) + 1; if (($pages < 1) || ($pages == 0)) { $total = 1;} else { $total = $pages; } $first = $cpage + 1; if (!((($cpage + $limit) / $limit) >= $pages) && $pages != 1) { $last = $cpage + $limit; } else{ $last = $numrows; } $result_request = $Db->query("SELECT * FROM user_request WHERE status = '0' AND type = '7' ORDER BY {$orderby} LIMIT $cpage, $limit"); while ($data = mysql_fetch_array($result_request, MYSQL_ASSOC)) { echo "
"; 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 " "; $votes_array = explode("|", $data['votes']); $votes = count($votes_array); echo "
".$data['name']."{$type} ".date('m.d.y', $data[date])."{$data['votes_num']} "; if($User->Info['level'] > 1) { echo "(L: {$data['votes_live']})"; } echo "
"; if(!in_array("$User->Id", $votes_array) && !empty($User->Id)) { echo ""; echo ""; echo "
"; } else { echo "\"NOT"; } echo "
"; echo " "; if($User->Info['level'] > 1) { echo ""; } elseif(!empty($data['note'])) { echo ""; } if($User->Info['level'] > 1) { echo " "; } else { echo ""; } echo "
NOTES: {$data['note']}
"; } echo "

"; if ($cpage != 0) { $back_page = $cpage - $limit; echo("  PREVIOUS  \n");} for ($i=1; $i <= $pages; $i++) { $ppage = $limit*($i - 1); if ($ppage == $cpage AND $total > 1){ echo(" $i  \n"); } else{ echo("  $i  \n"); } } if (!((($cpage+$limit) / $limit) >= $pages) && $pages != 1) { // If last page don't give next link. $next_page = $cpage + $limit; echo("  NEXT  \n"); } echo "
"; ?>