Log in

View Full Version : Is This A Request Line?



DJ_CJ
26-12-2006, 01:19 PM
Hi, i found this and i dont know what it does or hjow to use it lol, can someone explain, i think its a request line but how does it work?


<?
require('config.php');
require('bar.php');
switch($_GET['act']){
default:
Echo"<center><b>Request Line</b></center>
Use the following form to submit a message (Shoutout/Song Request) to the
DJ which is currently on air. If your message is appropraite, they will read
it. If they have your song, they may play it. Obey the Habbo Way or you
will be banned.<br><br>

<form method='post' action='request.php?act=submit'>
<table>
<tr>
<td>Habbo Name:</td>
<td><input type='text' name='habbo' size='20'></td>
</tr>
<tr>
<td>Song Requested (One Song):</td>
<td><input type='text' name='song' size='20'></td>
</tr>
<tr>
<td>Shoutout/Dedication:</td>
<td><textarea name='shoutout' cols='20' rows='6'></textarea></td>
</tr>
<tr>
<td></td>
<td><input type='submit' name='Submit'></td>
</tr>
</table>
</form>";
break;
case"submit":
$habbo = $_POST['habbo']; $song = $_POST['song']; $shoutout = $_POST['shoutout'];

// Empty
if(empty($habbo)){
Echo"<b>Error:</b> Please fill out the request form, before submitting it.
We do not appreciate spam.<br>
- <a href='request.php'>Back</a>";
exit;
}

// Banned
$bannedQuery = mysql_query("SELECT * FROM banned WHERE IP ='$IP_Address'");
if(mysql_num_rows($bannedQuery) !="0"){
$bannedData = mysql_fetch_array($bannedQuery);

Echo"<b>Error:</b> You have been banned from our request line for the
following reason:<br>
$bannedData[reason]<br>
Use our <a href='contact.php'>Contact Forms</a> to dispute your ban.<br>
- <a href='request.php'>Back</a>";
exit;
}

// Fix Problems
$habbo = htmlspecialchars($habbo);
$song = htmlspecialchars($song);
$shoutout = htmlspecialchars($shoutout);

// Send
mysql_query("INSERT INTO request (habbo,song,shoutout,IP,priority) VALUES ('$habbo','$song','$shoutout','$IP_Address','N')");
mysql_query("INSERT INTO logs (habbo,song,shoutout,IP,deleted,deletedby) VALUES ('$habbo','$song','$shoutout','$IP_Address','N','' )");

Echo"<b>Request Submitted Successfully</b>";
break;
}
?>


<?
require('config.php');
require('bar.php');
if($userData[user] =="" || $userData[pass] ==""){
Echo"<b>Error:</b> You are not authorized to access this page.";
exit;
}
if($userData[djname] ==""){
Echo"<b>Attention:</b> Please fill our your DJ name in the following area.

<form method='post' action='requests.php?act=name'>
<table>
<tr>
<td><input type='text' name='djname' value='DJ-' size='20'></td>
<td><input type='submit' value='Submit'></td>
</tr>
</table>
</form>";
}
if($userData[document] =="N"){
mysql_query("UPDATE users SET document ='Y' WHERE user ='$userData[user]'");

Echo"<b>ATTENTION:</b> There is an announcement for you to read:<br>";

$annQuery = mysql_query("SELECT * FROM announcement WHERE active ='Y'");
$annData = mysql_fetch_array($annQuery);

Echo"$annData[announcement]<br>
- <a href='requests.php'>I've read the above.</a>";
exit;
}
switch($_GET['act']){
default:
Echo"<center><b>Request Line</b></center>
<a href='requests.php'>Refresh</a><br><br>

<form method='post' action='requests.php?act=del'>
<table width='100&#37;'>
<tr>
<td>Sender:</td>
<td>Song:</td>
<td>Message:</td>
<td>Del:</td>
</tr>";
$requestsQuery = mysql_query("SELECT * FROM request ORDER BY ID ASC");
if(mysql_num_rows($requestsQuery) =="0"){
Echo"</table> There are no requests.";
exit;
}else{
$button ="<input type='submit' value='Delete'>";
}

$adminReqQuery = mysql_query("SELECT * FROM request WHERE priority ='Admin' ORDER BY ID ASC");
while($adminReqData = mysql_fetch_array($adminReqQuery)){
Echo"
<tr>
<td><a href='requests.php?act=alias&ID=$adminReqData[ID]'>$adminReqData[habbo]</a></td>
<td><font color='red'><b>$adminReqData[song]</b></font></td>
<td><font color='red'><b>$adminReqData[shoutout]</b></font></td>
<td><input type='checkbox' name='del[]' value='$adminReqData[ID]'></td>
</tr>";
}

$headReqQuery = mysql_query("SELECT * FROM request WHERE priority ='HDJ' ORDER BY ID ASC");
while($headReqData = mysql_fetch_array($headReqQuery)){
Echo"
<tr>
<td><a href='requests.php?act=alias&ID=$headReqData[ID]'>$headReqData[habbo]</a></td>
<td><font color='green'><b>$headReqData[song]</b></font></td>
<td><font color='green'><b>$headReqData[shoutout]</b></font></td>
<td><input type='checkbox' name='del[]' value='$headReqData[ID]'></td>
</tr>";
}

$otherReqQuery = mysql_query("SELECT * FROM request WHERE priority ='N' ORDER BY ID ASC");
while($otherReqData = mysql_fetch_array($otherReqQuery)){
Echo"
<tr>
<td><a href='requests.php?act=alias&ID=$otherReqData[ID]'>$otherReqData[habbo]</a></td>
<td>$otherReqData[song]</td>
<td>$otherReqData[shoutout]</td>
<td><input type='checkbox' name='del[]' value='$otherReqData[ID]'></td>
</tr>";
}
Echo"
</table>
<div align='right'>$button</div>";
break;
case"del":
$del = $_POST['del'];
$delQuery = mysql_query("SELECT * FROM request");
$delCount = mysql_num_rows($delQuery);
for($i = 0; $i <= $delCount; $i++){
if($del[$i] !=""){
mysql_query("DELETE FROM request WHERE ID ='$del[$i]' LIMIT 1");
mysql_query("UPDATE logs SET deleted ='Y', deletedby ='$userData[user]' WHERE ID ='$del[$i]'");
}
}
Echo"<b>Deletions Completed Successfully</b><br>
- <a href='requests.php'>Back</a>";
break;
case"alias":
$ID = $_GET['ID'];
if($ID ==""){
Echo"<b>Error:</b> There was an error processing your request. Please click
the back button on your browser.";
exit;
}
// Get Request Information
$requestQuery = mysql_query("SELECT * FROM request WHERE ID ='$ID'");
if(mysql_num_rows($requestQuery) =="0"){
Echo"<b>Error:</b> Somebody has deleted this request. It is not inside
our database.";
exit;
}
$requestData = mysql_fetch_array($requestQuery);
if($userData[rank] =="Admin"){
Echo"<center><b>Alias Checker for ID [$ID] and IP [$requestData[IP]]</b></center>";
}else{
Echo"<center><b>Alias Checker for ID [$ID] and IP [Hidden]</b></center>";
}
Echo"
<a href='requests.php?act=ban&ID=$ID'>Ban this Person</a>
<hr width='100%' height='1' color='#000000' shade='no'>
The below users have sent a request using the same IP address as this request,
however this does not mean that they below persons ARE the submitter of this
message.
<hr width='100%' height='1' color='#000000' shade='no'>";
// Get Alias Data
$aliasQuery = mysql_query("SELECT DISTINCT(habbo) FROM logs WHERE IP ='$requestData[IP]' ORDER BY habbo ASC");
while($aliasData = mysql_fetch_array($aliasQuery)){
Echo"$aliasData[habbo]<br>";
}
break;
case"ban":
if($cmd ==""){
Echo"<center><b>Banning Submitter of Request ID $ID</b></center>
These actions are not revirsable by yourself, and adminsitrator will have
to unban the user. Please, do not abuse this function, and only use if
persons are repeating to break the rules, <i>AFTER</i> necessary reasoning.
<form method='post' action='requests.php?act=ban&cmd=ban&ID=$ID'>
<textarea name='reason' cols='40' rows='3'></textarea><br>
<input type='submit' value='Ban'>
</form>";
}elseif($cmd =="ban"){
$reason = $_POST['reason'];
if($ID ==""){
Echo"<b>Error:</b> There was an error processing your request. Please click
the back button on your browser.";
exit;
}
// Get Request Information
$requestQuery = mysql_query("SELECT * FROM request WHERE ID ='$ID'");
if(mysql_num_rows($requestQuery) =="0"){
Echo"<b>Error:</b> Somebody has deleted this request. It is not inside
our database.";
exit;
}
$requestData = mysql_fetch_array($requestQuery);
mysql_query("INSERT INTO banned (requestID,IP,banner,reason) VALUES ('$requestData[ID]','$requestData[IP]','$userData[user]','$reason')");

Echo"<b>Ban Completed Successfully</b><br>
- <a href='requests.php'>Back</a>";
}
break;
case"name":
$djname = $_POST['djname'];
mysql_query("UPDATE users SET djname ='$djname' WHERE user ='$userData[user]'");

Echo"<b>DJ Name Added Successfully</b> <br>
- <a href='requests.php'>Back</a>";
break;
}
?>


Moved by Reformed (Forum Moderator) from Website Designing, please post in the correct forum next time, Thanks :).

Lycan
26-12-2006, 01:34 PM
probebly says where you nicked it from



because honestly we no yournot writing the code so stop posting here and asking what it is!

DJ_CJ
26-12-2006, 01:36 PM
no i brought it with a dj panel and it doesnt work so :P

Lilian
26-12-2006, 01:37 PM
If you dont know how to work it dont use it :S

Wrong Section should be in Coding Help if you dont think it works

DJ_CJ
26-12-2006, 01:38 PM
ok, ill try and get an easier one.

Lycan
26-12-2006, 01:39 PM
chances are it does work you don't no how to use it...

just like you were moaning that cutenews didn't work

CJ-real
31-12-2006, 12:01 PM
I have a DJ panel if anyone wants

Aidey
31-12-2006, 12:03 PM
That code is from "GoogleIts" DJ Panel. That is his request line from it.
His site used to be www.googleit.pspsite.be, but it got hacked :o

I Dont know any where else you can download it from.. :l

CJ-real
31-12-2006, 12:06 PM
It's impossible to download DJ Panels because on the internet no-one knows what it means apart from the people on habbo lol :P

I have DJ Panels... PM me I edit them too

Rockstar
31-12-2006, 12:07 PM
If you dont know how to work it dont use it :S

Wrong Section should be in Coding Help if you dont think it works
Mmmm if i rember you coudent do your DJ Panel and needed help so please take and give a little bit

Want to hide these adverts? Register an account for free!