require "db2con.php";
require "common.php3";
$lefthead[0]="Search LyricFind";
$leftbody[0]=$commonsearch;
$lefthead[1]="Listings";
$leftbody[1]=$commonlist;
print gettop("Request Board",$lefthead,$leftbody);
?>
Welcome to LyricFind.com's Request Board
To request lyrics to a song, simply add a request to the messageboard.
Please only put one request
in each post; otherwise it is hard for us to track what has been filled!
Add A Request
if ($filter=="1") {
$queryadd=" and requests.status=1";
$sel1="selected";
}
elseif ($filter=="2") {
$queryadd=" and requests.status=2";
$sel2="selected";
}
elseif ($filter=="3") {
$queryadd=" and requests.status=3";
$sel3="selected";
}
print "
";
if ($page=="")
$page=1;
$start=$page*20-20;
if ($requestid=="") {
$end=$start+20;
$query="select requests.*, statustypes.* from requests, statustypes where hidden=0 and site=0 and requests.status=statustypes.typeid$queryadd order by time desc limit $start,20";
$result=mysql_query($query);
if (mysql_num_rows($result)==0)
{print "No more results were found"; $lastpage=1;}
else
print "
Here are the latest requests: ";
}
else
{
$query="select * from requests, statustypes where hidden=0 and id=$requestid and site=0 and requests.status=statustypes.typeid ";
$result=mysql_query($query);
$lastpage=1;
}
if (!$result) print "Sorry, that request is not found";
else
while ($obj=mysql_fetch_object($result))
{
$time1=strftime('%D',$obj->time);
$time2=strftime('%T',$obj->time);
$obj->request=nl2br($obj->request);
if ($obj->type=="Added")
$msg="extra\">View This Song";
else
$msg="id\">Submit This Song";
$status=$obj->type;
$query2="select * from messageboard where requestid=$obj->id and boardid=0
order by time";
$result2=mysql_query($query2);
if ($obj->userid>0) {
$queryu="select login, vis from users where id='$obj->userid'";
$resultu=mysql_query($queryu);
if ($obju=mysql_fetch_object($resultu)) {
$obj->name=$obju->login;
$obj->email=$obju->vis;
}
}
$count=mysql_num_rows($result2);
if ($count==1) $word="reply";
else $word= "replies";
print "
$time1 @ $time2 |
$obj->name email\">$obj->email |
$status |
$msg |
| Artist: $obj->artist Song:
$obj->song Album: $obj->album |
";
while ($obj2=mysql_fetch_object($result2))
{
if ($obj2->admin) $xtra=" (STAFF)";
else $xtra="";
$obj2->comment=nl2br($obj2->comment);
if ($obj2->userid>0) {
$queryu="select login, vis from users where id='$obj2->userid'";
$resultu=mysql_query($queryu);
if ($obju=mysql_fetch_object($resultu)) {
$obj2->name=$obju->login;
$obj2->email=$obju->vis;
}
}
print "
";
}
print "
";
}
$page=$page+1;
if (!($lastpage)) print "
Next Page
";
print "
";
print getbottom();
?>