<?
include('class.upload.php');
include("config.php");
include("core.php");
if($mime== WEB)
{
echo "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>";
echo "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">";
}else{
echo "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>";
echo "<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\"". " \"http://www.wapforum.org/DTD/wml_1.1.xml\">";
}
$bcon = connectdb();
if (!$bcon)
{
if($mime== WEB)
{
echo dberror($mime);
}else{
echo dberror($mime);
}
}
$getuthm = mysql_fetch_array(mysql_query("SELECT theme FROM ibwf_users WHERE id='".$uid."'"));
$uth = $getuthm[0];
if(!$uth=="")
{
$uthm = "$uth";
}else{
$uthm = "default.css";
}
$ses = $_GET["ses"];
$uid = getuid_ses($ses);
set_time_limit(0);
$brws = explode(" ",$HTTP_USER_AGENT);
$ubr = $brws[0];
$uip = getip();
$img1 = $_POST["img1"];
if((islogged($ses)==false)||($uid==0))
{
if($mime== WEB)
{
echo notlogged($mime);
}else{
echo notlogged($mime);
}
}
if(isipbanned($uip,$ubr))
{
if(!isshield(getuid_ses($ses)))
{
if($mime== WEB)
{
echo useripbanned($mime,$uip,$ubr);
}else{
echo useripbanned($mime,$uip,$ubr);
}
}
}
//echo isbanned($uid);
if(isbanned($uid))
{
if($mime== WEB)
{
echo userbanned($mime,$uid);
}else{
echo userbanned($mime,$uid);
}
}
///////////////////////////////////////////////////////////Main
if($action=="main")
{
addonline(getuid_ses($ses),"User Gallery","");
if($mime== WEB)
{
echo webhead($uthm,$stitle);
echo "<p align=\"center\">";
echo "The Gallery of the Members from MostWantedZN
";
echo "
";
echo "</p>";
echo "
";
$noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_usergallery WHERE sex='2'"));
echo "<a href=\"usergallery.php?action=females&ses=$ses \"><img src=\"images/female.gif\" alt=\"*\"/>Females</a>($noi[0])
";
$noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_usergallery WHERE sex='1'"));
echo "<a href=\"usergallery.php?action=males&ses=$ses\" ><img src=\"images/male.gif\" alt=\"*\"/>Males</a>($noi[0])
";
echo "<a href=\"usergallery.php?action=upload&ses=$ses\ ">Add Your Photo</a>
";
echo "</p>";
echo "</p>";
////// UNTILL HERE >>
echo "<p align=\"center\">";
echo "<a href=\"index.php?action=main&ses=$ses\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "</p>";
echo webfoot();
}else{
echo waphead($stitle);
echo "<p align=\"center\">";
echo "The Gallery of the Members from MostWantedZN
";
echo "
";
echo "</p>";
echo "
";
$noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_usergallery WHERE sex='2'"));
echo "<a href=\"usergallery.php?action=females&ses=$ses \"><img src=\"images/female.gif\" alt=\"*\"/>Females</a>($noi[0])
";
$noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_usergallery WHERE sex='1'"));
echo "<a href=\"usergallery.php?action=males&ses=$ses\" ><img src=\"images/male.gif\" alt=\"*\"/>Males</a>($noi[0])
";
echo "<a href=\"usergallery.php?action=upload&ses=$ses\ ">Add Your Photo</a>
";
echo "</p>";
echo "<p align=\"center\">";
echo "<a href=\"index.php?action=main&ses=$ses\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "</p>";
echo wapfoot();
}
}
else if($action=="males")
{
addonline(getuid_ses($ses),"Male Gallery","");
if($mime== WEB)
{
echo webhead($uthm,$stitle);
echo "<p align=\"center\">";
echo "Male Users From MostWantedZN";
echo "
";
echo "</p>";
//////ALL LISTS SCRIPT <<
$uid1 = getuid_ses($ses);
if($page=="" || $page<=0)$page=1;
$noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_usergallery WHERE sex='1'"));
$num_items = $noi[0]; //changable
$items_per_page= 5;
$num_pages = ceil($num_items/$items_per_page);
if(($page>$num_pages)&&$page!=1)$page= $num_pages;
$limit_start = ($page-1)*$items_per_page;
//changable sql
$sql = "SELECT uid, id, imageurl FROM ibwf_usergallery WHERE sex='1' ORDER BY id DESC LIMIT $limit_start, $items_per_page";
echo "
";
$items = mysql_query($sql);
echo mysql_error();
if(mysql_num_rows($items)>0)
{
while ($item = mysql_fetch_array($items))
{
$sql = "SELECT rating FROM ibwf_usergallery_rating WHERE imageid='".$item[1]."'";
$imginfo = mysql_query($sql);
echo mysql_error();
if(mysql_num_rows($imginfo)>0)
{
while ($imginfos = mysql_fetch_array($imginfo)){
$ratingtotal = $ratingtotal + $imginfos[0];}
}
if($totalcomments<1){$totalcomments=0;}
$norm = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_usergallery_rating WHERE imageid='".$item[1]."'"));
if ($norm[0]>0){
$rating = ceil($ratingtotal/$norm[0]);
}else{$rating=0;}
$rated = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_usergallery_rating WHERE byuid='".$uid1."' and imageid ='".$item[1]."'"));
$totalcomments = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_usergallery_rating WHERE imageid ='".$item[1]."' and commentsyn ='Y'"));
$userinfo = mysql_fetch_array(mysql_query("SELECT name FROM ibwf_users WHERE id='".$item[0]."'"));
echo "<a href=\"index.php?action=viewuser&who=$item[0]&ses=$ses\">$userinfo[0]</a>";
if(canratephoto($uid1, $item[0]) and ($rated[0]==0))
{
echo "
<a href=\"usergallery.php?action=rate&ses=$ses&am p;whoimage=$item[1]\">Rate This Photo</a>";
}
if(($uid1=="1") or ($uid1==$item[0]))
{
echo " / <a href=\"usergallery.php?action=delsss1&ses=$ses &whoimage=$item[1]\">Del</a>";
}
if($uid1==$item[0])
{
echo "
<a href=\"genproc.php?action=upavg&ses=$ses&a vsrc=$item[2]\">Use As Avatar</a>";
}
echo "
<img src=\"$item[2]\" alt=\"$userinfo[0]\"/>
";
echo "Rating: $rating/10 (<a href=\"usergallery.php?action=votes&ses=$ses&a mp;whoimage=$item[1]\">$norm[0]</a> Votes)
<a href=\"usergallery.php?action=comments&ses=$se s&whoimage=$item[1]\">Comments</a>($totalcomments[0])";
echo "
";
$ratingtotal = 0;
}
}
echo "</p>";
echo "<p align=\"center\">";
if($page>1)
{
$ppage = $page-1;
echo "<a href=\"usergallery.php?action=males&ses=$ses&a mp;page=$ppage\">«Prev</a> ";
}
if($page<$num_pages)
{
$npage = $page+1;
echo "<a href=\"usergallery.php?action=males&ses=$ses&a mp;page=$npage\">Next»</a>";
}
echo "
$page/$num_pages
";
if($num_pages>2)
{
$rets = "Jump to page<input name=\"pg\" format=\"*N\" size=\"3\"/>";
$rets .= "<anchor>[GO]";
$rets .= "<go href=\"usergallery.php\" method=\"get\">";
$rets .= "<postfield name=\"action\" value=\"$action\"/>";
$rets .= "<postfield name=\"ses\" value=\"$ses\"/>";
$rets .= "<postfield name=\"page\" value=\"$(pg)\"/>";
$rets .= "</go></anchor>";
echo $rets;
}
echo "</p>";
////// UNTILL HERE >>
echo "<p align=\"center\">";
echo "
<a href=\"usergallery.php?action=main&ses=$ses\"> «Back to Gallery</a>
";
echo "<a href=\"index.php?action=main&ses=$ses\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "</p>";
echo webfoot();
}else{
echo waphead($stitle);
echo "<p align=\"center\">";
echo "Male Users From MostWantedZN";
echo "
";
echo "</p>";
//////ALL LISTS SCRIPT <<
$uid1 = getuid_ses($ses);
if($page=="" || $page<=0)$page=1;
$noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_usergallery WHERE sex='1'"));
$num_items = $noi[0]; //changable
$items_per_page= 5;
$num_pages = ceil($num_items/$items_per_page);
if(($page>$num_pages)&&$page!=1)$page= $num_pages;
$limit_start = ($page-1)*$items_per_page;
//changable sql
$sql = "SELECT uid, id, imageurl FROM ibwf_usergallery WHERE sex='1' ORDER BY id DESC LIMIT $limit_start, $items_per_page";
echo "
";
$items = mysql_query($sql);
echo mysql_error();
if(mysql_num_rows($items)>0)
{
while ($item = mysql_fetch_array($items))
{
$sql = "SELECT rating FROM ibwf_usergallery_rating WHERE imageid='".$item[1]."'";
$imginfo = mysql_query($sql);
echo mysql_error();
if(mysql_num_rows($imginfo)>0)
{
while ($imginfos = mysql_fetch_array($imginfo)){
$ratingtotal = $ratingtotal + $imginfos[0];}
}
if($totalcomments<1){$totalcomments=0;}
$norm = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_usergallery_rating WHERE imageid='".$item[1]."'"));
if ($norm[0]>0){
$rating = ceil($ratingtotal/$norm[0]);
}else{$rating=0;}
$rated = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_usergallery_rating WHERE byuid='".$uid1."' and imageid ='".$item[1]."'"));
$totalcomments = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_usergallery_rating WHERE imageid ='".$item[1]."' and commentsyn ='Y'"));
$userinfo = mysql_fetch_array(mysql_query("SELECT name FROM ibwf_users WHERE id='".$item[0]."'"));
echo "<a href=\"index.php?action=viewuser&who=$item[0]&ses=$ses\">$userinfo[0]</a>";
if(canratephoto($uid1, $item[0]) and ($rated[0]==0))
{
echo "
<a href=\"usergallery.php?action=rate&ses=$ses&am p;whoimage=$item[1]\">Rate This Photo</a>";
}
if(($uid1=="1") or ($uid1==$item[0]))
{
echo " / <a href=\"usergallery.php?action=delsss1&ses=$ses &whoimage=$item[1]\">Del</a>";
}
if($uid1==$item[0])
{
echo "
<a href=\"genproc.php?action=upavg&ses=$ses&a vsrc=$item[2]\">Use As Avatar</a>";
}
echo "
<img src=\"$item[2]\" alt=\"$userinfo[0]\"/>
";
echo "Rating: $rating/10 (<a href=\"usergallery.php?action=votes&ses=$ses&a mp;whoimage=$item[1]\">$norm[0]</a> Votes)
<a href=\"usergallery.php?action=comments&ses=$se s&whoimage=$item[1]\">Comments</a>($totalcomments[0])";
echo "
";
$ratingtotal = 0;
}
}
echo "</p>";
echo "<p align=\"center\">";
if($page>1)
{
$ppage = $page-1;
echo "<a href=\"usergallery.php?action=males&ses=$ses&a mp;page=$ppage\">«Prev</a> ";
}
if($page<$num_pages)
{
$npage = $page+1;
echo "<a href=\"usergallery.php?action=males&ses=$ses&a mp;page=$npage\">Next»</a>";
}
echo "
$page/$num_pages
";
if($num_pages>2)
{
$rets = "Jump to page<input name=\"pg\" format=\"*N\" size=\"3\"/>";
$rets .= "<anchor>[GO]";
$rets .= "<go href=\"usergallery.php\" method=\"get\">";
$rets .= "<postfield name=\"action\" value=\"$action\"/>";
$rets .= "<postfield name=\"ses\" value=\"$ses\"/>";
$rets .= "<postfield name=\"page\" value=\"$(pg)\"/>";
$rets .= "</go></anchor>";
echo $rets;
}
echo "</p>";
////// UNTILL HERE >>
echo "<p align=\"center\">";
echo "
<a href=\"usergallery.php?action=main&ses=$ses\"> «Back to Gallery</a>
";
echo "<a href=\"index.php?action=main&ses=$ses\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "</p>";
echo wapfoot();
}
}
else if($action=="females")
{
addonline(getuid_ses($ses),"Female Gallery","");
if($mime== WEB)
{
echo webhead($uthm,$stitle);
echo "<p align=\"center\">";
echo "Female Users From MostWantedZN";
echo "
";
echo "</p>";
//////ALL LISTS SCRIPT <<
$uid1 = getuid_ses($ses);
if($page=="" || $page<=0)$page=1;
$noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_usergallery WHERE sex='2'"));
$num_items = $noi[0]; //changable
$items_per_page= 5;
$num_pages = ceil($num_items/$items_per_page);
if(($page>$num_pages)&&$page!=1)$page= $num_pages;
$limit_start = ($page-1)*$items_per_page;
//changable sql
$sql = "SELECT uid, id, imageurl FROM ibwf_usergallery WHERE sex='2' ORDER BY id DESC LIMIT $limit_start, $items_per_page";
echo "
";
$items = mysql_query($sql);
echo mysql_error();
if(mysql_num_rows($items)>0)
{
while ($item = mysql_fetch_array($items))
{
$sql = "SELECT rating FROM ibwf_usergallery_rating WHERE imageid='".$item[1]."'";
$imginfo = mysql_query($sql);
echo mysql_error();
if(mysql_num_rows($imginfo)>0)
{
while ($imginfos = mysql_fetch_array($imginfo)){
$ratingtotal = $ratingtotal + $imginfos[0];}
}
if($totalcomments<1){$totalcomments=0;}
$norm = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_usergallery_rating WHERE imageid='".$item[1]."'"));
if ($norm[0]>0){
$rating = ceil($ratingtotal/$norm[0]);
}else{$rating=0;}
$rated = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_usergallery_rating WHERE byuid='".$uid1."' and imageid ='".$item[1]."'"));
$totalcomments = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_usergallery_rating WHERE imageid ='".$item[1]."' and commentsyn ='Y'"));
$userinfo = mysql_fetch_array(mysql_query("SELECT name FROM ibwf_users WHERE id='".$item[0]."'"));
echo "<a href=\"index.php?action=viewuser&who=$item[0]&ses=$ses\">$userinfo[0]</a>";
if(canratephoto($uid1, $item[0]) and ($rated[0]==0))
{
echo "
<a href=\"usergallery.php?action=rate&ses=$ses&am p;whoimage=$item[1]\">Rate This Photo</a>";
}
if(($uid1=="1") or ($uid1==$item[0]))
{
echo " / <a href=\"usergallery.php?action=delsss1&ses=$ses &whoimage=$item[1]\">Del</a>";
}
if($uid1==$item[0])
{
echo "
<a href=\"genproc.php?action=upavg&ses=$ses&a vsrc=$item[2]\">Use As Avatar</a>";
}
echo "
<img src=\"$item[2]\" alt=\"$userinfo[0]\"/>
";
echo "Rating: $rating/10 (<a href=\"usergallery.php?action=votes&ses=$ses&a mp;whoimage=$item[1]\">$norm[0]</a> Votes)
<a href=\"usergallery.php?action=comments&ses=$se s&whoimage=$item[1]\">Comments</a>($totalcomments[0])";
echo "
";
$ratingtotal = 0;
}
}
echo "</p>";
echo "<p align=\"center\">";
if($page>1)
{
$ppage = $page-1;
echo "<a href=\"usergallery.php?action=females&ses=$ses &page=$ppage\">«Prev</a> ";
}
if($page<$num_pages)
{
$npage = $page+1;
echo "<a href=\"usergallery.php?action=females&ses=$ses &page=$npage\">Next»</a>";
}
echo "
$page/$num_pages
";
if($num_pages>2)
{
$rets = "Jump to page<input name=\"pg\" format=\"*N\" size=\"3\"/>";
$rets .= "<anchor>[GO]";
$rets .= "<go href=\"usergallery.php\" method=\"get\">";
$rets .= "<postfield name=\"action\" value=\"$action\"/>";
$rets .= "<postfield name=\"ses\" value=\"$ses\"/>";
$rets .= "<postfield name=\"page\" value=\"$(pg)\"/>";
$rets .= "</go></anchor>";
echo $rets;
}
echo "</p>";
////// UNTILL HERE >>
echo "<p align=\"center\">";
echo "
<a href=\"usergallery.php?action=main&ses=$ses\"> «Back to Gallery</a>
";
echo "<a href=\"index.php?action=main&ses=$ses\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "</p>";
echo webfoot();
}else{
echo waphead($stitle);
echo "<p align=\"center\">";
echo "Female Users From MostWantedZN";
echo "
";
echo "</p>";
//////ALL LISTS SCRIPT <<
$uid1 = getuid_ses($ses);
if($page=="" || $page<=0)$page=1;
$noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_usergallery WHERE sex='2'"));
$num_items = $noi[0]; //changable
$items_per_page= 5;
$num_pages = ceil($num_items/$items_per_page);
if(($page>$num_pages)&&$page!=1)$page= $num_pages;
$limit_start = ($page-1)*$items_per_page;
//changable sql
$sql = "SELECT uid, id, imageurl FROM ibwf_usergallery WHERE sex='2' ORDER BY id DESC LIMIT $limit_start, $items_per_page";
echo "
";
$items = mysql_query($sql);
echo mysql_error();
if(mysql_num_rows($items)>0)
{
while ($item = mysql_fetch_array($items))
{
$sql = "SELECT rating FROM ibwf_usergallery_rating WHERE imageid='".$item[1]."'";
$imginfo = mysql_query($sql);
echo mysql_error();
if(mysql_num_rows($imginfo)>0)
{
while ($imginfos = mysql_fetch_array($imginfo)){
$ratingtotal = $ratingtotal + $imginfos[0];}
}
if($totalcomments<1){$totalcomments=0;}
$norm = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_usergallery_rating WHERE imageid='".$item[1]."'"));
if ($norm[0]>0){
$rating = ceil($ratingtotal/$norm[0]);
}else{$rating=0;}
$rated = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_usergallery_rating WHERE byuid='".$uid1."' and imageid ='".$item[1]."'"));
$totalcomments = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_usergallery_rating WHERE imageid ='".$item[1]."' and commentsyn ='Y'"));
$userinfo = mysql_fetch_array(mysql_query("SELECT name FROM ibwf_users WHERE id='".$item[0]."'"));
echo "<a href=\"index.php?action=viewuser&who=$item[0]&ses=$ses\">$userinfo[0]</a>";
if(canratephoto($uid1, $item[0]) and ($rated[0]==0))
{
echo "
<a href=\"usergallery.php?action=rate&ses=$ses&am p;whoimage=$item[1]\">Rate This Photo</a>";
}
if(($uid1=="1") or ($uid1==$item[0]))
{
echo " / <a href=\"usergallery.php?action=delsss1&ses=$ses &whoimage=$item[1]\">Del</a>";
}
if($uid1==$item[0])
{
echo "
<a href=\"genproc.php?action=upavg&ses=$ses&a vsrc=$item[2]\">Use As Avatar</a>";
}
echo "
<img src=\"$item[2]\" alt=\"$userinfo[0]\"/>
";
echo "Rating: $rating/10 (<a href=\"usergallery.php?action=votes&ses=$ses&a mp;whoimage=$item[1]\">$norm[0]</a> Votes)
<a href=\"usergallery.php?action=comments&ses=$se s&whoimage=$item[1]\">Comments</a>($totalcomments[0])";
echo "
";
$ratingtotal = 0;
}
}
echo "</p>";
echo "<p align=\"center\">";
if($page>1)
{
$ppage = $page-1;
echo "<a href=\"usergallery.php?action=females&ses=$ses &page=$ppage\">«Prev</a> ";
}
if($page<$num_pages)
{
$npage = $page+1;
echo "<a href=\"usergallery.php?action=females&ses=$ses &page=$npage\">Next»</a>";
}
echo "
$page/$num_pages
";
if($num_pages>2)
{
$rets = "Jump to page<input name=\"pg\" format=\"*N\" size=\"3\"/>";
$rets .= "<anchor>[GO]";
$rets .= "<go href=\"usergallery.php\" method=\"get\">";
$rets .= "<postfield name=\"action\" value=\"$action\"/>";
$rets .= "<postfield name=\"ses\" value=\"$ses\"/>";
$rets .= "<postfield name=\"page\" value=\"$(pg)\"/>";
$rets .= "</go></anchor>";
echo $rets;
}
echo "</p>";
////// UNTILL HERE >>
echo "<p align=\"center\">";
echo "
<a href=\"usergallery.php?action=main&ses=$ses\"> «Back to Gallery</a>
";
echo "<a href=\"index.php?action=main&ses=$ses\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "</p>";
echo wapfoot();
}
}
else if($action=="rate")
{
addonline(getuid_ses($ses),"User Gallery","");
if($mime== WEB)
{
echo webhead($uthm,$stitle);
echo "<p align=\"center\">";
echo "Rate this members Photo: 1=Low, 10=High
You can also leave a comment for this photo!
";
echo "
";
echo "</p>";
echo "
";
echo "<form action=\"usergallery.php?action=rateuser&ses=$ ses&whoimage=$whoimage\" method=\"post\">";
echo "Rate: <select name=\"rate\" value=\"$rate[0]\">";
echo "<option value=\"1\">1</option>";
echo "<option value=\"2\">2</option>";
echo "<option value=\"3\">3</option>";
echo "<option value=\"4\">4</option>";
echo "<option value=\"5\">5</option>";
echo "<option value=\"6\">6</option>";
echo "<option value=\"7\">7</option>";
echo "<option value=\"8\">8</option>";
echo "<option value=\"9\">9</option>";
echo "<option value=\"10\">10</option>";
echo "</select>
";
echo "Comments: <input name=\"comment\" format=\"*M\" maxlength=\"200\"/>
";
echo "<input type=\"submit\" value=\"Rate\"/>";
echo "</form>";
echo "</p>";
////// UNTILL HERE >>
echo "<p align=\"center\">";
echo "
<a href=\"usergallery.php?action=main&ses=$ses\"> «Back to Gallery</a>
";
echo "<a href=\"index.php?action=main&ses=$ses\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "</p>";
echo webfoot();
}else{
echo waphead($stitle);
echo "<p align=\"center\">";
echo "Rate this members Photo: 1=Low, 10=High
You can also leave a comment for this photo!
";
echo "
";
echo "</p>";
echo "
";
echo "Rate: <select name=\"rate\" value=\"$rate[0]\">";
echo "<option value=\"1\">1</option>";
echo "<option value=\"2\">2</option>";
echo "<option value=\"3\">3</option>";
echo "<option value=\"4\">4</option>";
echo "<option value=\"5\">5</option>";
echo "<option value=\"6\">6</option>";
echo "<option value=\"7\">7</option>";
echo "<option value=\"8\">8</option>";
echo "<option value=\"9\">9</option>";
echo "<option value=\"10\">10</option>";
echo "</select>
";
echo "Comments: <input name=\"comments\" format=\"*M\" maxlength=\"200\"/>
";
echo "<anchor>Rate<go href=\"usergallery.php?action=rateuser&ses=$se s&whoimage=$whoimage\" method=\"post\">";
echo "<postfield name=\"rate\" value=\"$(rate)\"/>";
echo "<postfield name=\"comments\" value=\"$(comments)\"/>";
echo "</go></anchor>";
echo "</p>";
echo "<p align=\"center\">";
echo "<a href=\"index.php?action=main&ses=$ses\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "</p>";
echo wapfoot();
}
}
else if($action=="comments")
{
addonline(getuid_ses($ses),"User Gallery","");
if($mime== WEB)
{
echo webhead($uthm,$stitle);
echo "<p align=\"center\">";
echo "
";
echo "</p>";
//////ALL LISTS SCRIPT <<
if($page=="" || $page<=0)$page=1;
$noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_usergallery_rating WHERE imageid='".$whoimage."' and commentsyn ='Y'"));
$num_items = $noi[0]; //changable
$items_per_page= 5;
$num_pages = ceil($num_items/$items_per_page);
if(($page>$num_pages)&&$page!=1)$page= $num_pages;
$limit_start = ($page-1)*$items_per_page;
$uidinfo = mysql_fetch_array(mysql_query("SELECT uid FROM ibwf_usergallery WHERE id='".$whoimage."'"));
$uid = getuid_ses($ses);
$sql = "SELECT rating, comments, byuid, time, commentsreply, id FROM ibwf_usergallery_rating WHERE imageid ='".$whoimage."' and commentsyn ='Y' ORDER BY time DESC LIMIT $limit_start, $items_per_page";
echo "
";
$items = mysql_query($sql);
echo mysql_error();
if(mysql_num_rows($items)>0)
{
while ($item = mysql_fetch_array($items))
{
if(isonline($item[2]))
{
$iml = "<img src=\"images/onl.gif\" alt=\"+\"/>";
}else{
$iml = "<img src=\"images/ofl.gif\" alt=\"-\"/>";
}
if(strlen($item[1])>1){
$snick = getnick_uid($item[2]);
$lnk = "<a href=\"index.php?action=viewuser&who=$item[2]&ses=$ses\">$iml$snick:</a> $item[0]/10";
echo "$lnk
";
$bs = date("d/m/y",$item[3]);
$text = parsepm($item[1], $ses);
if(($uid==$uidinfo[0]) and (strlen($item[4])<1))
{
$replylink = "<a href=\"usergallery.php?action=commentreply&ses =$ses&id=$item[5]\">Reply to Comment</a>
$bs";
}else{
$replylink = " $bs";
}
echo "$text";
if(strlen($item[4])>1)
{
$text1 = parsepm($item[4], $ses);
echo "
Reply: $text1";
}
echo "
$replylink
";
echo "";
}
}
}
echo "</p>";
echo "<p align=\"center\">";
if($page>1)
{
$ppage = $page-1;
echo "<a href=\"usergallery.php?action=$action&page=$pp age&ses=$ses&who=$who\">«Prev</a> ";
}
if($page<$num_pages)
{
$npage = $page+1;
echo "<a href=\"usergallery.php?action=$action&page=$np age&ses=$ses&who=$who\">Next»</a>";
}
echo "
$page/$num_pages
";
if($num_pages>2)
{
$rets = "Jump to page<input name=\"pg\" format=\"*N\" size=\"3\"/>";
$rets .= "<anchor>[GO]";
$rets .= "<go href=\"usergallery.php\" method=\"get\">";
$rets .= "<postfield name=\"action\" value=\"$action\"/>";
$rets .= "<postfield name=\"who\" value=\"$who\"/>";
$rets .= "<postfield name=\"ses\" value=\"$ses\"/>";
$rets .= "<postfield name=\"page\" value=\"$(pg)\"/>";
$rets .= "</go></anchor>";
echo $rets;
}
echo "</p>";
////// UNTILL HERE >>
echo "<p align=\"center\">";
echo "
<a href=\"usergallery.php?action=main&ses=$ses\"> «Back to Gallery</a>
";
echo "<a href=\"index.php?action=main&ses=$ses\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "</p>";
echo webfoot();
}else{
echo waphead($stitle);
echo "<p align=\"center\">";
echo "
";
echo "</p>";
//////ALL LISTS SCRIPT <<
if($page=="" || $page<=0)$page=1;
$noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_usergallery_rating WHERE imageid='".$whoimage."' and commentsyn ='Y'"));
$num_items = $noi[0]; //changable
$items_per_page= 5;
$num_pages = ceil($num_items/$items_per_page);
if(($page>$num_pages)&&$page!=1)$page= $num_pages;
$limit_start = ($page-1)*$items_per_page;
$uidinfo = mysql_fetch_array(mysql_query("SELECT uid FROM ibwf_usergallery WHERE id='".$whoimage."'"));
$uid = getuid_ses($ses);
$sql = "SELECT rating, comments, byuid, time, commentsreply, id FROM ibwf_usergallery_rating WHERE imageid ='".$whoimage."' and commentsyn ='Y' ORDER BY time DESC LIMIT $limit_start, $items_per_page";
echo "
";
$items = mysql_query($sql);
echo mysql_error();
if(mysql_num_rows($items)>0)
{
while ($item = mysql_fetch_array($items))
{
if(isonline($item[2]))
{
$iml = "<img src=\"images/onl.gif\" alt=\"+\"/>";
}else{
$iml = "<img src=\"images/ofl.gif\" alt=\"-\"/>";
}
if(strlen($item[1])>1){
$snick = getnick_uid($item[2]);
$lnk = "<a href=\"index.php?action=viewuser&who=$item[2]&ses=$ses\">$iml$snick:</a> $item[0]/10";
echo "$lnk
";
$bs = date("d/m/y",$item[3]);
$text = parsepm($item[1], $ses);
if(($uid==$uidinfo[0]) and (strlen($item[4])<1))
{
$replylink = "<a href=\"usergallery.php?action=commentreply&ses =$ses&id=$item[5]\">Reply to Comment</a>
$bs";
}else{
$replylink = " $bs";
}
echo "$text";
if(strlen($item[4])>1)
{
$text1 = parsepm($item[4], $ses);
echo "
Reply: $text1";
}
echo "
$replylink
";
echo "";
}
}
}
echo "</p>";
echo "<p align=\"center\">";
if($page>1)
{
$ppage = $page-1;
echo "<a href=\"usergallery.php?action=$action&page=$pp age&ses=$ses&who=$who\">«Prev</a> ";
}
if($page<$num_pages)
{
$npage = $page+1;
echo "<a href=\"usergallery.php?action=$action&page=$np age&ses=$ses&who=$who\">Next»</a>";
}
echo "
$page/$num_pages
";
if($num_pages>2)
{
$rets = "Jump to page<input name=\"pg\" format=\"*N\" size=\"3\"/>";
$rets .= "<anchor>[GO]";
$rets .= "<go href=\"usergallery.php\" method=\"get\">";
$rets .= "<postfield name=\"action\" value=\"$action\"/>";
$rets .= "<postfield name=\"who\" value=\"$who\"/>";
$rets .= "<postfield name=\"ses\" value=\"$ses\"/>";
$rets .= "<postfield name=\"page\" value=\"$(pg)\"/>";
$rets .= "</go></anchor>";
echo $rets;
}
echo "</p>";
////// UNTILL HERE >>
echo "<p align=\"center\">";
echo "
<a href=\"usergallery.php?action=main&ses=$ses\"> «Back to Gallery</a>
";
echo "<a href=\"index.php?action=main&ses=$ses\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "</p>";
echo wapfoot();
}
}
else if($action=="commentreply")
{
addonline(getuid_ses($ses),"User Gallery","");
if($mime== WEB)
{
echo webhead($uthm,$stitle);
$id = $_GET["id"];
echo "<p align=\"center\">";
echo "Reply to a Comment
";
echo "
";
echo "</p>";
echo "
";
echo "<form action=\"usergallery.php?action=commentreplyaction &ses=$ses&id=$id\" method=\"post\">";
echo "Reply: <input name=\"reply\" format=\"*M\" maxlength=\"200\"/>
";
echo "<input type=\"submit\" value=\"Reply\"/>";
echo "</form>";
echo "</p>";
////// UNTILL HERE >>
echo "<p align=\"center\">";
echo "
<a href=\"usergallery.php?action=main&ses=$ses\"> «Back to Gallery</a>
";
echo "<a href=\"index.php?action=main&ses=$ses\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "</p>";
echo webfoot();
}else{
echo waphead($stitle);
echo "<p align=\"center\">";
echo "Reply to a Comment
";
echo "
";
echo "</p>";
echo "
";
echo "Reply Message<input name=\"reply\" format=\"*M\" maxlength=\"200\"/>
";
echo "<anchor>Reply";
echo "<go href=\"usergallery.php?action=commentreplyaction&a mp;ses=$ses&id=$id\" method=\"post\">";
echo "<postfield name=\"reply\" value=\"$(reply)\"/>";
echo "</go></anchor>";
echo "</p>";
////// UNTILL HERE >>
echo "<p align=\"center\">";
echo "
<a href=\"usergallery.php?action=main&ses=$ses\"> «Back to Gallery</a>
";
echo "<a href=\"index.php?action=main&ses=$ses\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "</p>";
echo wapfoot();
}
}
else if($action=="votes")
{
addonline(getuid_ses($ses),"User Gallery","");
if($mime== WEB)
{
echo webhead($uthm,$stitle);
echo "<p align=\"center\">";
echo "
";
echo "</p>";
//////ALL LISTS SCRIPT <<
if($page=="" || $page<=0)$page=1;
$noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_usergallery_rating WHERE imageid='".$whoimage."'"));
$num_items = $noi[0]; //changable
$items_per_page= 20;
$num_pages = ceil($num_items/$items_per_page);
if(($page>$num_pages)&&$page!=1)$page= $num_pages;
$limit_start = ($page-1)*$items_per_page;
$imageratinginfo = "SELECT rating, byuid FROM ibwf_usergallery_rating WHERE imageid='".$item[1]."'";
$sql = "SELECT rating, byuid, time FROM ibwf_usergallery_rating WHERE imageid ='".$whoimage."' ORDER BY time DESC LIMIT $limit_start, $items_per_page";
echo "
";
$items = mysql_query($sql);
echo mysql_error();
if(mysql_num_rows($items)>0)
{
while ($item = mysql_fetch_array($items))
{
if(isonline($item[1]))
{
$iml = "<img src=\"images/onl.gif\" alt=\"+\"/>";
}else{
$iml = "<img src=\"images/ofl.gif\" alt=\"-\"/>";
}
$snick = getnick_uid($item[1]);
$lnk = "<a href=\"index.php?action=viewuser&who=$item[1]&ses=$ses\">$iml$snick:</a> $item[0]/10";
echo "$lnk
";
}
}
echo "</p>";
echo "<p align=\"center\">";
if($page>1)
{
$ppage = $page-1;
echo "<a href=\"usergallery.php?action=$action&page=$pp age&ses=$ses&who=$who\">«Prev</a> ";
}
if($page<$num_pages)
{
$npage = $page+1;
echo "<a href=\"usergallery.php?action=$action&page=$np age&ses=$ses&who=$who\">Next»</a>";
}
echo "
$page/$num_pages
";
if($num_pages>2)
{
$rets = "Jump to page<input name=\"pg\" format=\"*N\" size=\"3\"/>";
$rets .= "<anchor>[GO]";
$rets .= "<go href=\"usergallery.php\" method=\"get\">";
$rets .= "<postfield name=\"action\" value=\"$action\"/>";
$rets .= "<postfield name=\"who\" value=\"$who\"/>";
$rets .= "<postfield name=\"ses\" value=\"$ses\"/>";
$rets .= "<postfield name=\"page\" value=\"$(pg)\"/>";
$rets .= "</go></anchor>";
echo $rets;
}
echo "</p>";
////// UNTILL HERE >>
echo "<p align=\"center\">";
echo "
<a href=\"usergallery.php?action=main&ses=$ses\"> «Back to Gallery</a>
";
echo "<a href=\"index.php?action=main&ses=$ses\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "</p>";
echo webfoot();
}else{
echo waphead($stitle);
echo "<p align=\"center\">";
echo "
";
echo "</p>";
//////ALL LISTS SCRIPT <<
if($page=="" || $page<=0)$page=1;
$noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_usergallery_rating WHERE imageid='".$whoimage."'"));
$num_items = $noi[0]; //changable
$items_per_page= 20;
$num_pages = ceil($num_items/$items_per_page);
if(($page>$num_pages)&&$page!=1)$page= $num_pages;
$limit_start = ($page-1)*$items_per_page;
$imageratinginfo = "SELECT rating, byuid FROM ibwf_usergallery_rating WHERE imageid='".$item[1]."'";
$sql = "SELECT rating, byuid, time FROM ibwf_usergallery_rating WHERE imageid ='".$whoimage."' ORDER BY time DESC LIMIT $limit_start, $items_per_page";
echo "
";
$items = mysql_query($sql);
echo mysql_error();
if(mysql_num_rows($items)>0)
{
while ($item = mysql_fetch_array($items))
{
if(isonline($item[1]))
{
$iml = "<img src=\"images/onl.gif\" alt=\"+\"/>";
}else{
$iml = "<img src=\"images/ofl.gif\" alt=\"-\"/>";
}
$snick = getnick_uid($item[1]);
$lnk = "<a href=\"index.php?action=viewuser&who=$item[1]&ses=$ses\">$iml$snick:</a> $item[0]/10";
echo "$lnk
";
}
}
echo "</p>";
echo "<p align=\"center\">";
if($page>1)
{
$ppage = $page-1;
echo "<a href=\"usergallery.php?action=$action&page=$pp age&ses=$ses&who=$who\">«Prev</a> ";
}
if($page<$num_pages)
{
$npage = $page+1;
echo "<a href=\"usergallery.php?action=$action&page=$np age&ses=$ses&who=$who\">Next»</a>";
}
echo "
$page/$num_pages
";
if($num_pages>2)
{
$rets = "Jump to page<input name=\"pg\" format=\"*N\" size=\"3\"/>";
$rets .= "<anchor>[GO]";
$rets .= "<go href=\"usergallery.php\" method=\"get\">";
$rets .= "<postfield name=\"action\" value=\"$action\"/>";
$rets .= "<postfield name=\"who\" value=\"$who\"/>";
$rets .= "<postfield name=\"ses\" value=\"$ses\"/>";
$rets .= "<postfield name=\"page\" value=\"$(pg)\"/>";
$rets .= "</go></anchor>";
echo $rets;
}
echo "</p>";
////// UNTILL HERE >>
echo "<p align=\"center\">";
echo "
<a href=\"usergallery.php?action=main&ses=$ses\"> «Back to Gallery</a>
";
echo "<a href=\"index.php?action=main&ses=$ses\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "</p>";
echo wapfoot();
}
}
else if($action=="rateuser")
{
addonline(getuid_ses($ses),"Rate a User","");
$rate = $_POST["rate"];
$comment = $_POST["comment"];
if($mime== WEB)
{
echo webhead($uthm,$stitle);
echo "<p align=\"center\">";
$uid = getuid_ses($ses);
if((strlen($comment))>1){
$res= mysql_query("INSERT INTO ibwf_usergallery_rating SET imageid='".$whoimage."', rating='".$rate."', comments='".$comment."', byuid='".$uid."', time='".(time() - $timeadjust)."', commentsyn='Y'");
}else
if((strlen($comment))<2){
$res= mysql_query("INSERT INTO ibwf_usergallery_rating SET imageid='".$whoimage."', rating='".$rate."', comments='".$comment."', byuid='".$uid."', time='".(time() - $timeadjust)."', commentsyn='N'");
}
if(($res) and ((strlen($comment))>1)){
echo "<img src=\"images/ok.gif\" alt=\"o\"/>Rated Successfully
";
echo "<img src=\"images/ok.gif\" alt=\"o\"/>Comments added Successfully
";
}else
if(($res) and ((strlen($comment))<2)){
echo "<img src=\"images/ok.gif\" alt=\"o\"/>Rated Successfully
";
echo "<img src=\"images/notok.gif\" alt=\"x\"/>No Comments were added
";
}
else{
echo "<img src=\"images/notok.gif\" alt=\"x\"/>Rated unsuccessfully
";
echo "<img src=\"images/notok.gif\" alt=\"x\"/>No Comments were added
";
}
echo "</p>";
////// UNTILL HERE >>
echo "<p align=\"center\">";
echo "
<a href=\"usergallery.php?action=main&ses=$ses\"> «Back to Gallery</a>
";
echo "<a href=\"index.php?action=main&ses=$ses\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "</p>";
echo webfoot();
}else{
echo waphead($stitle);
echo "<p align=\"center\">";
$uid = getuid_ses($ses);
if((strlen($comment))>1){
$res= mysql_query("INSERT INTO ibwf_usergallery_rating SET imageid='".$whoimage."', rating='".$rate."', comments='".$comment."', byuid='".$uid."', time='".time()."', commentsyn='Y'");
}else
if((strlen($comment))<2){
$res= mysql_query("INSERT INTO ibwf_usergallery_rating SET imageid='".$whoimage."', rating='".$rate."', comments='".$comment."', byuid='".$uid."', time='".time()."', commentsyn='N'");
}
if(($res) and ((strlen($comment))>1)){
echo "<img src=\"images/ok.gif\" alt=\"o\"/>Rated Successfully
";
echo "<img src=\"images/ok.gif\" alt=\"o\"/>Comments added Successfully
";
}else
if(($res) and ((strlen($comment))<2)){
echo "<img src=\"images/ok.gif\" alt=\"o\"/>Rated Successfully
";
echo "<img src=\"images/notok.gif\" alt=\"x\"/>No Comments were added
";
}
else{
echo "<img src=\"images/notok.gif\" alt=\"x\"/>Rated unsuccessfully
";
echo "<img src=\"images/notok.gif\" alt=\"x\"/>No Comments were added
";
}
echo "</p>";
////// UNTILL HERE >>
echo "<p align=\"center\">";
echo "
<a href=\"usergallery.php?action=main&ses=$ses\"> «Back to Gallery</a>
";
echo "<a href=\"index.php?action=main&ses=$ses\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "</p>";
echo wapfoot();
}
}
else if($action=="commentreplyaction")
{
addonline(getuid_ses($ses),"Reply To Comment","");
$id = $_GET["id"];
$reply = $_POST["reply"];
if($mime== WEB)
{
echo webhead($uthm,$stitle);
echo "<p align=\"center\">";
$uid = getuid_ses($ses);
$res = mysql_query("UPDATE ibwf_usergallery_rating SET commentsreply='".$reply."' WHERE id='".$id."'");
if($res){
echo "<img src=\"images/ok.gif\" alt=\"o\"/>Replyed Successfully
";
}
else{
echo "<img src=\"images/notok.gif\" alt=\"x\"/>Replyed unsuccessfully
";
}
echo "</p>";
////// UNTILL HERE >>
echo "<p align=\"center\">";
echo "
<a href=\"usergallery.php?action=main&ses=$ses\"> «Back to Gallery</a>
";
echo "<a href=\"index.php?action=main&ses=$ses\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "</p>";
echo webfoot();
}else{
echo waphead($stitle);
echo "<p align=\"center\">";
$uid = getuid_ses($ses);
$res = mysql_query("UPDATE ibwf_usergallery_rating SET commentsreply='".$reply."' WHERE id='".$id."'");
if($res){
echo "<img src=\"images/ok.gif\" alt=\"o\"/>Replyed Successfully
";
}
else{
echo "<img src=\"images/notok.gif\" alt=\"x\"/>Replyed unsuccessfully
";
}
echo "</p>";
////// UNTILL HERE >>
echo "<p align=\"center\">";
echo "
<a href=\"usergallery.php?action=main&ses=$ses\"> «Back to Gallery</a>
";
echo "<a href=\"index.php?action=main&ses=$ses\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "</p>";
echo wapfoot();
}
}
else if($action=="upload")
{
addonline(getuid_ses($ses),"Uploading a Photo","");
$rate = $_POST["rate"];
$comment = $_POST["comment"];
if($mime== WEB)
{
echo webhead($uthm,$stitle);
set_time_limit(0);
echo "
";
echo "You can now upload your photo direct from your phone. If this doesn't work, MMS or E-Mail me the photo to scooby.doo@telkomsa.net
Note: You must rename your photo to your username if you MMS or E-Mail it.
";
echo "
Pick a Photo to upload, and press 'upload'
";
echo " <form name=\"form2\" enctype=\"multipart/form-data\" method=\"post\" action=\"upload.php?action=upload&ses=$ses\" />";
echo "<input type=\"file\" size=\"32\" name=\"my_field\" value=\"\" />";
echo "<input type=\"hidden\" name=\"action\" value=\"image\" />
";
echo "<input type=\"submit\" name=\"Submit\" value=\"upload\" />";
echo "</form>";
echo "</p>";
////// UNTILL HERE >>
echo "<p align=\"center\">";
echo "
<a href=\"usergallery.php?action=main&ses=$ses\"> «Back to Gallery</a>
";
echo "<a href=\"index.php?action=main&ses=$ses\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "</p>";
echo webfoot();
}else{
echo waphead($stitle);
echo "
";
echo "If you want to upload a photo, you must use the xHTML version of the site or u can just MMS or E-Mail your photo to scooby.doo@telkomsa.net
Note: You have to rename your pic to your username, or it won't be uploaded.
Allow 2 to 7 days for your photo to be uploaded, it must be validatd first.
";
echo "</p>";
echo "<p align=\"center\">";
echo "
<a href=\"index.php?action=main&ses=$ses\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "</p>";
echo wapfoot();
}
}
//////////// Delete users posts
else if($action=="delsss1")
{
if($mime== WEB)
{
echo webhead($uthm,$stitle);
echo "<p align=\"center\">";
echo "
";
$res = mysql_query("DELETE FROM ibwf_usergallery WHERE id='".$whoimage."'");
$res = mysql_query("DELETE FROM ibwf_usergallery_rating WHERE imageid='".$whoimage."'");
if($res)
{
echo "<img src=\"images/ok.gif\" alt=\"O\"/>Photo and all the Comments have been deleted";
}else{
echo "<img src=\"images/notok.gif\" alt=\"X\"/>Error deleting Photo";
}
echo "
<a href=\"usergallery.php?action=main&ses=$ses\"> «Back to Gallery</a>
";
echo "<a href=\"index.php?action=main&ses=$ses\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "</p>";
echo webfoot();
}else{
echo waphead($stitle);
echo "<p align=\"center\">";
echo "
";
$res = mysql_query("DELETE FROM ibwf_usergallery WHERE id='".$whoimage."'");
$res = mysql_query("DELETE FROM ibwf_usergallery_rating WHERE imageid='".$whoimage."'");
if($res)
{
echo "<img src=\"images/ok.gif\" alt=\"O\"/>Photo and all the Comments have been deleted";
}else{
echo "<img src=\"images/notok.gif\" alt=\"X\"/>Error deleting Photo";
}
echo "
<a href=\"admincp.php?action=chuinfo&ses=$ses\">" ;
echo "User info</a>
";
echo "<a href=\"index.php?action=admincp&ses=$ses\"><im g src=\"images/admn.gif\" alt=\"*\"/>";
echo "Admin CP</a>
";
echo "<a href=\"index.php?action=main&ses=$ses\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "</p>";
echo wapfoot();
}
}else
{
addonline(getuid_ses($ses),"Searching For Gold In Gallery","");
if($mime== WEB)
{
echo webhead($uthm,$stitle);
echo "<p align=\"center\">";
echo "I don't know how did you get into here, but there's nothing to show
";
echo "<a href=\"index.php?action=main&ses=$ses\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "</p>";
echo webfoot();
}else{
echo waphead($stitle);
echo "<p align=\"center\">";
echo "I don't know how did you get into here, but there's nothing to show
";
echo "<a href=\"index.php?action=main&ses=$ses\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "</p>";
echo wapfoot();
}
}
?>
sql 4 it
-- --------------------------------------------------------
--
-- Tabel struktuur vir tabel `ibwf_usergallery`
--
CREATE TABLE `ibwf_usergallery` (
`id` int(100) NOT NULL auto_increment,
`uid` int(100) NOT NULL default '0',
`imageurl` varchar(100) NOT NULL default '',
`sex` char(1) NOT NULL default '',
`time` int(100) NOT NULL default '0',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
--
-- Stort data vir tabel `ibwf_usergallery`
--
-- --------------------------------------------------------
include('class.upload.php');
include("config.php");
include("core.php");
if($mime== WEB)
{
echo "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>";
echo "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">";
}else{
echo "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>";
echo "<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\"". " \"http://www.wapforum.org/DTD/wml_1.1.xml\">";
}
$bcon = connectdb();
if (!$bcon)
{
if($mime== WEB)
{
echo dberror($mime);
}else{
echo dberror($mime);
}
}
$getuthm = mysql_fetch_array(mysql_query("SELECT theme FROM ibwf_users WHERE id='".$uid."'"));
$uth = $getuthm[0];
if(!$uth=="")
{
$uthm = "$uth";
}else{
$uthm = "default.css";
}
$ses = $_GET["ses"];
$uid = getuid_ses($ses);
set_time_limit(0);
$brws = explode(" ",$HTTP_USER_AGENT);
$ubr = $brws[0];
$uip = getip();
$img1 = $_POST["img1"];
if((islogged($ses)==false)||($uid==0))
{
if($mime== WEB)
{
echo notlogged($mime);
}else{
echo notlogged($mime);
}
}
if(isipbanned($uip,$ubr))
{
if(!isshield(getuid_ses($ses)))
{
if($mime== WEB)
{
echo useripbanned($mime,$uip,$ubr);
}else{
echo useripbanned($mime,$uip,$ubr);
}
}
}
//echo isbanned($uid);
if(isbanned($uid))
{
if($mime== WEB)
{
echo userbanned($mime,$uid);
}else{
echo userbanned($mime,$uid);
}
}
///////////////////////////////////////////////////////////Main
if($action=="main")
{
addonline(getuid_ses($ses),"User Gallery","");
if($mime== WEB)
{
echo webhead($uthm,$stitle);
echo "<p align=\"center\">";
echo "The Gallery of the Members from MostWantedZN
";
echo "
";
echo "</p>";
echo "
";
$noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_usergallery WHERE sex='2'"));
echo "<a href=\"usergallery.php?action=females&ses=$ses \"><img src=\"images/female.gif\" alt=\"*\"/>Females</a>($noi[0])
";
$noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_usergallery WHERE sex='1'"));
echo "<a href=\"usergallery.php?action=males&ses=$ses\" ><img src=\"images/male.gif\" alt=\"*\"/>Males</a>($noi[0])
";
echo "<a href=\"usergallery.php?action=upload&ses=$ses\ ">Add Your Photo</a>
";
echo "</p>";
echo "</p>";
////// UNTILL HERE >>
echo "<p align=\"center\">";
echo "<a href=\"index.php?action=main&ses=$ses\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "</p>";
echo webfoot();
}else{
echo waphead($stitle);
echo "<p align=\"center\">";
echo "The Gallery of the Members from MostWantedZN
";
echo "
";
echo "</p>";
echo "
";
$noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_usergallery WHERE sex='2'"));
echo "<a href=\"usergallery.php?action=females&ses=$ses \"><img src=\"images/female.gif\" alt=\"*\"/>Females</a>($noi[0])
";
$noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_usergallery WHERE sex='1'"));
echo "<a href=\"usergallery.php?action=males&ses=$ses\" ><img src=\"images/male.gif\" alt=\"*\"/>Males</a>($noi[0])
";
echo "<a href=\"usergallery.php?action=upload&ses=$ses\ ">Add Your Photo</a>
";
echo "</p>";
echo "<p align=\"center\">";
echo "<a href=\"index.php?action=main&ses=$ses\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "</p>";
echo wapfoot();
}
}
else if($action=="males")
{
addonline(getuid_ses($ses),"Male Gallery","");
if($mime== WEB)
{
echo webhead($uthm,$stitle);
echo "<p align=\"center\">";
echo "Male Users From MostWantedZN";
echo "
";
echo "</p>";
//////ALL LISTS SCRIPT <<
$uid1 = getuid_ses($ses);
if($page=="" || $page<=0)$page=1;
$noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_usergallery WHERE sex='1'"));
$num_items = $noi[0]; //changable
$items_per_page= 5;
$num_pages = ceil($num_items/$items_per_page);
if(($page>$num_pages)&&$page!=1)$page= $num_pages;
$limit_start = ($page-1)*$items_per_page;
//changable sql
$sql = "SELECT uid, id, imageurl FROM ibwf_usergallery WHERE sex='1' ORDER BY id DESC LIMIT $limit_start, $items_per_page";
echo "
";
$items = mysql_query($sql);
echo mysql_error();
if(mysql_num_rows($items)>0)
{
while ($item = mysql_fetch_array($items))
{
$sql = "SELECT rating FROM ibwf_usergallery_rating WHERE imageid='".$item[1]."'";
$imginfo = mysql_query($sql);
echo mysql_error();
if(mysql_num_rows($imginfo)>0)
{
while ($imginfos = mysql_fetch_array($imginfo)){
$ratingtotal = $ratingtotal + $imginfos[0];}
}
if($totalcomments<1){$totalcomments=0;}
$norm = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_usergallery_rating WHERE imageid='".$item[1]."'"));
if ($norm[0]>0){
$rating = ceil($ratingtotal/$norm[0]);
}else{$rating=0;}
$rated = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_usergallery_rating WHERE byuid='".$uid1."' and imageid ='".$item[1]."'"));
$totalcomments = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_usergallery_rating WHERE imageid ='".$item[1]."' and commentsyn ='Y'"));
$userinfo = mysql_fetch_array(mysql_query("SELECT name FROM ibwf_users WHERE id='".$item[0]."'"));
echo "<a href=\"index.php?action=viewuser&who=$item[0]&ses=$ses\">$userinfo[0]</a>";
if(canratephoto($uid1, $item[0]) and ($rated[0]==0))
{
echo "
<a href=\"usergallery.php?action=rate&ses=$ses&am p;whoimage=$item[1]\">Rate This Photo</a>";
}
if(($uid1=="1") or ($uid1==$item[0]))
{
echo " / <a href=\"usergallery.php?action=delsss1&ses=$ses &whoimage=$item[1]\">Del</a>";
}
if($uid1==$item[0])
{
echo "
<a href=\"genproc.php?action=upavg&ses=$ses&a vsrc=$item[2]\">Use As Avatar</a>";
}
echo "
<img src=\"$item[2]\" alt=\"$userinfo[0]\"/>
";
echo "Rating: $rating/10 (<a href=\"usergallery.php?action=votes&ses=$ses&a mp;whoimage=$item[1]\">$norm[0]</a> Votes)
<a href=\"usergallery.php?action=comments&ses=$se s&whoimage=$item[1]\">Comments</a>($totalcomments[0])";
echo "
";
$ratingtotal = 0;
}
}
echo "</p>";
echo "<p align=\"center\">";
if($page>1)
{
$ppage = $page-1;
echo "<a href=\"usergallery.php?action=males&ses=$ses&a mp;page=$ppage\">«Prev</a> ";
}
if($page<$num_pages)
{
$npage = $page+1;
echo "<a href=\"usergallery.php?action=males&ses=$ses&a mp;page=$npage\">Next»</a>";
}
echo "
$page/$num_pages
";
if($num_pages>2)
{
$rets = "Jump to page<input name=\"pg\" format=\"*N\" size=\"3\"/>";
$rets .= "<anchor>[GO]";
$rets .= "<go href=\"usergallery.php\" method=\"get\">";
$rets .= "<postfield name=\"action\" value=\"$action\"/>";
$rets .= "<postfield name=\"ses\" value=\"$ses\"/>";
$rets .= "<postfield name=\"page\" value=\"$(pg)\"/>";
$rets .= "</go></anchor>";
echo $rets;
}
echo "</p>";
////// UNTILL HERE >>
echo "<p align=\"center\">";
echo "
<a href=\"usergallery.php?action=main&ses=$ses\"> «Back to Gallery</a>
";
echo "<a href=\"index.php?action=main&ses=$ses\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "</p>";
echo webfoot();
}else{
echo waphead($stitle);
echo "<p align=\"center\">";
echo "Male Users From MostWantedZN";
echo "
";
echo "</p>";
//////ALL LISTS SCRIPT <<
$uid1 = getuid_ses($ses);
if($page=="" || $page<=0)$page=1;
$noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_usergallery WHERE sex='1'"));
$num_items = $noi[0]; //changable
$items_per_page= 5;
$num_pages = ceil($num_items/$items_per_page);
if(($page>$num_pages)&&$page!=1)$page= $num_pages;
$limit_start = ($page-1)*$items_per_page;
//changable sql
$sql = "SELECT uid, id, imageurl FROM ibwf_usergallery WHERE sex='1' ORDER BY id DESC LIMIT $limit_start, $items_per_page";
echo "
";
$items = mysql_query($sql);
echo mysql_error();
if(mysql_num_rows($items)>0)
{
while ($item = mysql_fetch_array($items))
{
$sql = "SELECT rating FROM ibwf_usergallery_rating WHERE imageid='".$item[1]."'";
$imginfo = mysql_query($sql);
echo mysql_error();
if(mysql_num_rows($imginfo)>0)
{
while ($imginfos = mysql_fetch_array($imginfo)){
$ratingtotal = $ratingtotal + $imginfos[0];}
}
if($totalcomments<1){$totalcomments=0;}
$norm = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_usergallery_rating WHERE imageid='".$item[1]."'"));
if ($norm[0]>0){
$rating = ceil($ratingtotal/$norm[0]);
}else{$rating=0;}
$rated = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_usergallery_rating WHERE byuid='".$uid1."' and imageid ='".$item[1]."'"));
$totalcomments = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_usergallery_rating WHERE imageid ='".$item[1]."' and commentsyn ='Y'"));
$userinfo = mysql_fetch_array(mysql_query("SELECT name FROM ibwf_users WHERE id='".$item[0]."'"));
echo "<a href=\"index.php?action=viewuser&who=$item[0]&ses=$ses\">$userinfo[0]</a>";
if(canratephoto($uid1, $item[0]) and ($rated[0]==0))
{
echo "
<a href=\"usergallery.php?action=rate&ses=$ses&am p;whoimage=$item[1]\">Rate This Photo</a>";
}
if(($uid1=="1") or ($uid1==$item[0]))
{
echo " / <a href=\"usergallery.php?action=delsss1&ses=$ses &whoimage=$item[1]\">Del</a>";
}
if($uid1==$item[0])
{
echo "
<a href=\"genproc.php?action=upavg&ses=$ses&a vsrc=$item[2]\">Use As Avatar</a>";
}
echo "
<img src=\"$item[2]\" alt=\"$userinfo[0]\"/>
";
echo "Rating: $rating/10 (<a href=\"usergallery.php?action=votes&ses=$ses&a mp;whoimage=$item[1]\">$norm[0]</a> Votes)
<a href=\"usergallery.php?action=comments&ses=$se s&whoimage=$item[1]\">Comments</a>($totalcomments[0])";
echo "
";
$ratingtotal = 0;
}
}
echo "</p>";
echo "<p align=\"center\">";
if($page>1)
{
$ppage = $page-1;
echo "<a href=\"usergallery.php?action=males&ses=$ses&a mp;page=$ppage\">«Prev</a> ";
}
if($page<$num_pages)
{
$npage = $page+1;
echo "<a href=\"usergallery.php?action=males&ses=$ses&a mp;page=$npage\">Next»</a>";
}
echo "
$page/$num_pages
";
if($num_pages>2)
{
$rets = "Jump to page<input name=\"pg\" format=\"*N\" size=\"3\"/>";
$rets .= "<anchor>[GO]";
$rets .= "<go href=\"usergallery.php\" method=\"get\">";
$rets .= "<postfield name=\"action\" value=\"$action\"/>";
$rets .= "<postfield name=\"ses\" value=\"$ses\"/>";
$rets .= "<postfield name=\"page\" value=\"$(pg)\"/>";
$rets .= "</go></anchor>";
echo $rets;
}
echo "</p>";
////// UNTILL HERE >>
echo "<p align=\"center\">";
echo "
<a href=\"usergallery.php?action=main&ses=$ses\"> «Back to Gallery</a>
";
echo "<a href=\"index.php?action=main&ses=$ses\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "</p>";
echo wapfoot();
}
}
else if($action=="females")
{
addonline(getuid_ses($ses),"Female Gallery","");
if($mime== WEB)
{
echo webhead($uthm,$stitle);
echo "<p align=\"center\">";
echo "Female Users From MostWantedZN";
echo "
";
echo "</p>";
//////ALL LISTS SCRIPT <<
$uid1 = getuid_ses($ses);
if($page=="" || $page<=0)$page=1;
$noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_usergallery WHERE sex='2'"));
$num_items = $noi[0]; //changable
$items_per_page= 5;
$num_pages = ceil($num_items/$items_per_page);
if(($page>$num_pages)&&$page!=1)$page= $num_pages;
$limit_start = ($page-1)*$items_per_page;
//changable sql
$sql = "SELECT uid, id, imageurl FROM ibwf_usergallery WHERE sex='2' ORDER BY id DESC LIMIT $limit_start, $items_per_page";
echo "
";
$items = mysql_query($sql);
echo mysql_error();
if(mysql_num_rows($items)>0)
{
while ($item = mysql_fetch_array($items))
{
$sql = "SELECT rating FROM ibwf_usergallery_rating WHERE imageid='".$item[1]."'";
$imginfo = mysql_query($sql);
echo mysql_error();
if(mysql_num_rows($imginfo)>0)
{
while ($imginfos = mysql_fetch_array($imginfo)){
$ratingtotal = $ratingtotal + $imginfos[0];}
}
if($totalcomments<1){$totalcomments=0;}
$norm = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_usergallery_rating WHERE imageid='".$item[1]."'"));
if ($norm[0]>0){
$rating = ceil($ratingtotal/$norm[0]);
}else{$rating=0;}
$rated = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_usergallery_rating WHERE byuid='".$uid1."' and imageid ='".$item[1]."'"));
$totalcomments = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_usergallery_rating WHERE imageid ='".$item[1]."' and commentsyn ='Y'"));
$userinfo = mysql_fetch_array(mysql_query("SELECT name FROM ibwf_users WHERE id='".$item[0]."'"));
echo "<a href=\"index.php?action=viewuser&who=$item[0]&ses=$ses\">$userinfo[0]</a>";
if(canratephoto($uid1, $item[0]) and ($rated[0]==0))
{
echo "
<a href=\"usergallery.php?action=rate&ses=$ses&am p;whoimage=$item[1]\">Rate This Photo</a>";
}
if(($uid1=="1") or ($uid1==$item[0]))
{
echo " / <a href=\"usergallery.php?action=delsss1&ses=$ses &whoimage=$item[1]\">Del</a>";
}
if($uid1==$item[0])
{
echo "
<a href=\"genproc.php?action=upavg&ses=$ses&a vsrc=$item[2]\">Use As Avatar</a>";
}
echo "
<img src=\"$item[2]\" alt=\"$userinfo[0]\"/>
";
echo "Rating: $rating/10 (<a href=\"usergallery.php?action=votes&ses=$ses&a mp;whoimage=$item[1]\">$norm[0]</a> Votes)
<a href=\"usergallery.php?action=comments&ses=$se s&whoimage=$item[1]\">Comments</a>($totalcomments[0])";
echo "
";
$ratingtotal = 0;
}
}
echo "</p>";
echo "<p align=\"center\">";
if($page>1)
{
$ppage = $page-1;
echo "<a href=\"usergallery.php?action=females&ses=$ses &page=$ppage\">«Prev</a> ";
}
if($page<$num_pages)
{
$npage = $page+1;
echo "<a href=\"usergallery.php?action=females&ses=$ses &page=$npage\">Next»</a>";
}
echo "
$page/$num_pages
";
if($num_pages>2)
{
$rets = "Jump to page<input name=\"pg\" format=\"*N\" size=\"3\"/>";
$rets .= "<anchor>[GO]";
$rets .= "<go href=\"usergallery.php\" method=\"get\">";
$rets .= "<postfield name=\"action\" value=\"$action\"/>";
$rets .= "<postfield name=\"ses\" value=\"$ses\"/>";
$rets .= "<postfield name=\"page\" value=\"$(pg)\"/>";
$rets .= "</go></anchor>";
echo $rets;
}
echo "</p>";
////// UNTILL HERE >>
echo "<p align=\"center\">";
echo "
<a href=\"usergallery.php?action=main&ses=$ses\"> «Back to Gallery</a>
";
echo "<a href=\"index.php?action=main&ses=$ses\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "</p>";
echo webfoot();
}else{
echo waphead($stitle);
echo "<p align=\"center\">";
echo "Female Users From MostWantedZN";
echo "
";
echo "</p>";
//////ALL LISTS SCRIPT <<
$uid1 = getuid_ses($ses);
if($page=="" || $page<=0)$page=1;
$noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_usergallery WHERE sex='2'"));
$num_items = $noi[0]; //changable
$items_per_page= 5;
$num_pages = ceil($num_items/$items_per_page);
if(($page>$num_pages)&&$page!=1)$page= $num_pages;
$limit_start = ($page-1)*$items_per_page;
//changable sql
$sql = "SELECT uid, id, imageurl FROM ibwf_usergallery WHERE sex='2' ORDER BY id DESC LIMIT $limit_start, $items_per_page";
echo "
";
$items = mysql_query($sql);
echo mysql_error();
if(mysql_num_rows($items)>0)
{
while ($item = mysql_fetch_array($items))
{
$sql = "SELECT rating FROM ibwf_usergallery_rating WHERE imageid='".$item[1]."'";
$imginfo = mysql_query($sql);
echo mysql_error();
if(mysql_num_rows($imginfo)>0)
{
while ($imginfos = mysql_fetch_array($imginfo)){
$ratingtotal = $ratingtotal + $imginfos[0];}
}
if($totalcomments<1){$totalcomments=0;}
$norm = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_usergallery_rating WHERE imageid='".$item[1]."'"));
if ($norm[0]>0){
$rating = ceil($ratingtotal/$norm[0]);
}else{$rating=0;}
$rated = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_usergallery_rating WHERE byuid='".$uid1."' and imageid ='".$item[1]."'"));
$totalcomments = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_usergallery_rating WHERE imageid ='".$item[1]."' and commentsyn ='Y'"));
$userinfo = mysql_fetch_array(mysql_query("SELECT name FROM ibwf_users WHERE id='".$item[0]."'"));
echo "<a href=\"index.php?action=viewuser&who=$item[0]&ses=$ses\">$userinfo[0]</a>";
if(canratephoto($uid1, $item[0]) and ($rated[0]==0))
{
echo "
<a href=\"usergallery.php?action=rate&ses=$ses&am p;whoimage=$item[1]\">Rate This Photo</a>";
}
if(($uid1=="1") or ($uid1==$item[0]))
{
echo " / <a href=\"usergallery.php?action=delsss1&ses=$ses &whoimage=$item[1]\">Del</a>";
}
if($uid1==$item[0])
{
echo "
<a href=\"genproc.php?action=upavg&ses=$ses&a vsrc=$item[2]\">Use As Avatar</a>";
}
echo "
<img src=\"$item[2]\" alt=\"$userinfo[0]\"/>
";
echo "Rating: $rating/10 (<a href=\"usergallery.php?action=votes&ses=$ses&a mp;whoimage=$item[1]\">$norm[0]</a> Votes)
<a href=\"usergallery.php?action=comments&ses=$se s&whoimage=$item[1]\">Comments</a>($totalcomments[0])";
echo "
";
$ratingtotal = 0;
}
}
echo "</p>";
echo "<p align=\"center\">";
if($page>1)
{
$ppage = $page-1;
echo "<a href=\"usergallery.php?action=females&ses=$ses &page=$ppage\">«Prev</a> ";
}
if($page<$num_pages)
{
$npage = $page+1;
echo "<a href=\"usergallery.php?action=females&ses=$ses &page=$npage\">Next»</a>";
}
echo "
$page/$num_pages
";
if($num_pages>2)
{
$rets = "Jump to page<input name=\"pg\" format=\"*N\" size=\"3\"/>";
$rets .= "<anchor>[GO]";
$rets .= "<go href=\"usergallery.php\" method=\"get\">";
$rets .= "<postfield name=\"action\" value=\"$action\"/>";
$rets .= "<postfield name=\"ses\" value=\"$ses\"/>";
$rets .= "<postfield name=\"page\" value=\"$(pg)\"/>";
$rets .= "</go></anchor>";
echo $rets;
}
echo "</p>";
////// UNTILL HERE >>
echo "<p align=\"center\">";
echo "
<a href=\"usergallery.php?action=main&ses=$ses\"> «Back to Gallery</a>
";
echo "<a href=\"index.php?action=main&ses=$ses\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "</p>";
echo wapfoot();
}
}
else if($action=="rate")
{
addonline(getuid_ses($ses),"User Gallery","");
if($mime== WEB)
{
echo webhead($uthm,$stitle);
echo "<p align=\"center\">";
echo "Rate this members Photo: 1=Low, 10=High
You can also leave a comment for this photo!
";
echo "
";
echo "</p>";
echo "
";
echo "<form action=\"usergallery.php?action=rateuser&ses=$ ses&whoimage=$whoimage\" method=\"post\">";
echo "Rate: <select name=\"rate\" value=\"$rate[0]\">";
echo "<option value=\"1\">1</option>";
echo "<option value=\"2\">2</option>";
echo "<option value=\"3\">3</option>";
echo "<option value=\"4\">4</option>";
echo "<option value=\"5\">5</option>";
echo "<option value=\"6\">6</option>";
echo "<option value=\"7\">7</option>";
echo "<option value=\"8\">8</option>";
echo "<option value=\"9\">9</option>";
echo "<option value=\"10\">10</option>";
echo "</select>
";
echo "Comments: <input name=\"comment\" format=\"*M\" maxlength=\"200\"/>
";
echo "<input type=\"submit\" value=\"Rate\"/>";
echo "</form>";
echo "</p>";
////// UNTILL HERE >>
echo "<p align=\"center\">";
echo "
<a href=\"usergallery.php?action=main&ses=$ses\"> «Back to Gallery</a>
";
echo "<a href=\"index.php?action=main&ses=$ses\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "</p>";
echo webfoot();
}else{
echo waphead($stitle);
echo "<p align=\"center\">";
echo "Rate this members Photo: 1=Low, 10=High
You can also leave a comment for this photo!
";
echo "
";
echo "</p>";
echo "
";
echo "Rate: <select name=\"rate\" value=\"$rate[0]\">";
echo "<option value=\"1\">1</option>";
echo "<option value=\"2\">2</option>";
echo "<option value=\"3\">3</option>";
echo "<option value=\"4\">4</option>";
echo "<option value=\"5\">5</option>";
echo "<option value=\"6\">6</option>";
echo "<option value=\"7\">7</option>";
echo "<option value=\"8\">8</option>";
echo "<option value=\"9\">9</option>";
echo "<option value=\"10\">10</option>";
echo "</select>
";
echo "Comments: <input name=\"comments\" format=\"*M\" maxlength=\"200\"/>
";
echo "<anchor>Rate<go href=\"usergallery.php?action=rateuser&ses=$se s&whoimage=$whoimage\" method=\"post\">";
echo "<postfield name=\"rate\" value=\"$(rate)\"/>";
echo "<postfield name=\"comments\" value=\"$(comments)\"/>";
echo "</go></anchor>";
echo "</p>";
echo "<p align=\"center\">";
echo "<a href=\"index.php?action=main&ses=$ses\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "</p>";
echo wapfoot();
}
}
else if($action=="comments")
{
addonline(getuid_ses($ses),"User Gallery","");
if($mime== WEB)
{
echo webhead($uthm,$stitle);
echo "<p align=\"center\">";
echo "
";
echo "</p>";
//////ALL LISTS SCRIPT <<
if($page=="" || $page<=0)$page=1;
$noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_usergallery_rating WHERE imageid='".$whoimage."' and commentsyn ='Y'"));
$num_items = $noi[0]; //changable
$items_per_page= 5;
$num_pages = ceil($num_items/$items_per_page);
if(($page>$num_pages)&&$page!=1)$page= $num_pages;
$limit_start = ($page-1)*$items_per_page;
$uidinfo = mysql_fetch_array(mysql_query("SELECT uid FROM ibwf_usergallery WHERE id='".$whoimage."'"));
$uid = getuid_ses($ses);
$sql = "SELECT rating, comments, byuid, time, commentsreply, id FROM ibwf_usergallery_rating WHERE imageid ='".$whoimage."' and commentsyn ='Y' ORDER BY time DESC LIMIT $limit_start, $items_per_page";
echo "
";
$items = mysql_query($sql);
echo mysql_error();
if(mysql_num_rows($items)>0)
{
while ($item = mysql_fetch_array($items))
{
if(isonline($item[2]))
{
$iml = "<img src=\"images/onl.gif\" alt=\"+\"/>";
}else{
$iml = "<img src=\"images/ofl.gif\" alt=\"-\"/>";
}
if(strlen($item[1])>1){
$snick = getnick_uid($item[2]);
$lnk = "<a href=\"index.php?action=viewuser&who=$item[2]&ses=$ses\">$iml$snick:</a> $item[0]/10";
echo "$lnk
";
$bs = date("d/m/y",$item[3]);
$text = parsepm($item[1], $ses);
if(($uid==$uidinfo[0]) and (strlen($item[4])<1))
{
$replylink = "<a href=\"usergallery.php?action=commentreply&ses =$ses&id=$item[5]\">Reply to Comment</a>
$bs";
}else{
$replylink = " $bs";
}
echo "$text";
if(strlen($item[4])>1)
{
$text1 = parsepm($item[4], $ses);
echo "
Reply: $text1";
}
echo "
$replylink
";
echo "";
}
}
}
echo "</p>";
echo "<p align=\"center\">";
if($page>1)
{
$ppage = $page-1;
echo "<a href=\"usergallery.php?action=$action&page=$pp age&ses=$ses&who=$who\">«Prev</a> ";
}
if($page<$num_pages)
{
$npage = $page+1;
echo "<a href=\"usergallery.php?action=$action&page=$np age&ses=$ses&who=$who\">Next»</a>";
}
echo "
$page/$num_pages
";
if($num_pages>2)
{
$rets = "Jump to page<input name=\"pg\" format=\"*N\" size=\"3\"/>";
$rets .= "<anchor>[GO]";
$rets .= "<go href=\"usergallery.php\" method=\"get\">";
$rets .= "<postfield name=\"action\" value=\"$action\"/>";
$rets .= "<postfield name=\"who\" value=\"$who\"/>";
$rets .= "<postfield name=\"ses\" value=\"$ses\"/>";
$rets .= "<postfield name=\"page\" value=\"$(pg)\"/>";
$rets .= "</go></anchor>";
echo $rets;
}
echo "</p>";
////// UNTILL HERE >>
echo "<p align=\"center\">";
echo "
<a href=\"usergallery.php?action=main&ses=$ses\"> «Back to Gallery</a>
";
echo "<a href=\"index.php?action=main&ses=$ses\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "</p>";
echo webfoot();
}else{
echo waphead($stitle);
echo "<p align=\"center\">";
echo "
";
echo "</p>";
//////ALL LISTS SCRIPT <<
if($page=="" || $page<=0)$page=1;
$noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_usergallery_rating WHERE imageid='".$whoimage."' and commentsyn ='Y'"));
$num_items = $noi[0]; //changable
$items_per_page= 5;
$num_pages = ceil($num_items/$items_per_page);
if(($page>$num_pages)&&$page!=1)$page= $num_pages;
$limit_start = ($page-1)*$items_per_page;
$uidinfo = mysql_fetch_array(mysql_query("SELECT uid FROM ibwf_usergallery WHERE id='".$whoimage."'"));
$uid = getuid_ses($ses);
$sql = "SELECT rating, comments, byuid, time, commentsreply, id FROM ibwf_usergallery_rating WHERE imageid ='".$whoimage."' and commentsyn ='Y' ORDER BY time DESC LIMIT $limit_start, $items_per_page";
echo "
";
$items = mysql_query($sql);
echo mysql_error();
if(mysql_num_rows($items)>0)
{
while ($item = mysql_fetch_array($items))
{
if(isonline($item[2]))
{
$iml = "<img src=\"images/onl.gif\" alt=\"+\"/>";
}else{
$iml = "<img src=\"images/ofl.gif\" alt=\"-\"/>";
}
if(strlen($item[1])>1){
$snick = getnick_uid($item[2]);
$lnk = "<a href=\"index.php?action=viewuser&who=$item[2]&ses=$ses\">$iml$snick:</a> $item[0]/10";
echo "$lnk
";
$bs = date("d/m/y",$item[3]);
$text = parsepm($item[1], $ses);
if(($uid==$uidinfo[0]) and (strlen($item[4])<1))
{
$replylink = "<a href=\"usergallery.php?action=commentreply&ses =$ses&id=$item[5]\">Reply to Comment</a>
$bs";
}else{
$replylink = " $bs";
}
echo "$text";
if(strlen($item[4])>1)
{
$text1 = parsepm($item[4], $ses);
echo "
Reply: $text1";
}
echo "
$replylink
";
echo "";
}
}
}
echo "</p>";
echo "<p align=\"center\">";
if($page>1)
{
$ppage = $page-1;
echo "<a href=\"usergallery.php?action=$action&page=$pp age&ses=$ses&who=$who\">«Prev</a> ";
}
if($page<$num_pages)
{
$npage = $page+1;
echo "<a href=\"usergallery.php?action=$action&page=$np age&ses=$ses&who=$who\">Next»</a>";
}
echo "
$page/$num_pages
";
if($num_pages>2)
{
$rets = "Jump to page<input name=\"pg\" format=\"*N\" size=\"3\"/>";
$rets .= "<anchor>[GO]";
$rets .= "<go href=\"usergallery.php\" method=\"get\">";
$rets .= "<postfield name=\"action\" value=\"$action\"/>";
$rets .= "<postfield name=\"who\" value=\"$who\"/>";
$rets .= "<postfield name=\"ses\" value=\"$ses\"/>";
$rets .= "<postfield name=\"page\" value=\"$(pg)\"/>";
$rets .= "</go></anchor>";
echo $rets;
}
echo "</p>";
////// UNTILL HERE >>
echo "<p align=\"center\">";
echo "
<a href=\"usergallery.php?action=main&ses=$ses\"> «Back to Gallery</a>
";
echo "<a href=\"index.php?action=main&ses=$ses\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "</p>";
echo wapfoot();
}
}
else if($action=="commentreply")
{
addonline(getuid_ses($ses),"User Gallery","");
if($mime== WEB)
{
echo webhead($uthm,$stitle);
$id = $_GET["id"];
echo "<p align=\"center\">";
echo "Reply to a Comment
";
echo "
";
echo "</p>";
echo "
";
echo "<form action=\"usergallery.php?action=commentreplyaction &ses=$ses&id=$id\" method=\"post\">";
echo "Reply: <input name=\"reply\" format=\"*M\" maxlength=\"200\"/>
";
echo "<input type=\"submit\" value=\"Reply\"/>";
echo "</form>";
echo "</p>";
////// UNTILL HERE >>
echo "<p align=\"center\">";
echo "
<a href=\"usergallery.php?action=main&ses=$ses\"> «Back to Gallery</a>
";
echo "<a href=\"index.php?action=main&ses=$ses\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "</p>";
echo webfoot();
}else{
echo waphead($stitle);
echo "<p align=\"center\">";
echo "Reply to a Comment
";
echo "
";
echo "</p>";
echo "
";
echo "Reply Message<input name=\"reply\" format=\"*M\" maxlength=\"200\"/>
";
echo "<anchor>Reply";
echo "<go href=\"usergallery.php?action=commentreplyaction&a mp;ses=$ses&id=$id\" method=\"post\">";
echo "<postfield name=\"reply\" value=\"$(reply)\"/>";
echo "</go></anchor>";
echo "</p>";
////// UNTILL HERE >>
echo "<p align=\"center\">";
echo "
<a href=\"usergallery.php?action=main&ses=$ses\"> «Back to Gallery</a>
";
echo "<a href=\"index.php?action=main&ses=$ses\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "</p>";
echo wapfoot();
}
}
else if($action=="votes")
{
addonline(getuid_ses($ses),"User Gallery","");
if($mime== WEB)
{
echo webhead($uthm,$stitle);
echo "<p align=\"center\">";
echo "
";
echo "</p>";
//////ALL LISTS SCRIPT <<
if($page=="" || $page<=0)$page=1;
$noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_usergallery_rating WHERE imageid='".$whoimage."'"));
$num_items = $noi[0]; //changable
$items_per_page= 20;
$num_pages = ceil($num_items/$items_per_page);
if(($page>$num_pages)&&$page!=1)$page= $num_pages;
$limit_start = ($page-1)*$items_per_page;
$imageratinginfo = "SELECT rating, byuid FROM ibwf_usergallery_rating WHERE imageid='".$item[1]."'";
$sql = "SELECT rating, byuid, time FROM ibwf_usergallery_rating WHERE imageid ='".$whoimage."' ORDER BY time DESC LIMIT $limit_start, $items_per_page";
echo "
";
$items = mysql_query($sql);
echo mysql_error();
if(mysql_num_rows($items)>0)
{
while ($item = mysql_fetch_array($items))
{
if(isonline($item[1]))
{
$iml = "<img src=\"images/onl.gif\" alt=\"+\"/>";
}else{
$iml = "<img src=\"images/ofl.gif\" alt=\"-\"/>";
}
$snick = getnick_uid($item[1]);
$lnk = "<a href=\"index.php?action=viewuser&who=$item[1]&ses=$ses\">$iml$snick:</a> $item[0]/10";
echo "$lnk
";
}
}
echo "</p>";
echo "<p align=\"center\">";
if($page>1)
{
$ppage = $page-1;
echo "<a href=\"usergallery.php?action=$action&page=$pp age&ses=$ses&who=$who\">«Prev</a> ";
}
if($page<$num_pages)
{
$npage = $page+1;
echo "<a href=\"usergallery.php?action=$action&page=$np age&ses=$ses&who=$who\">Next»</a>";
}
echo "
$page/$num_pages
";
if($num_pages>2)
{
$rets = "Jump to page<input name=\"pg\" format=\"*N\" size=\"3\"/>";
$rets .= "<anchor>[GO]";
$rets .= "<go href=\"usergallery.php\" method=\"get\">";
$rets .= "<postfield name=\"action\" value=\"$action\"/>";
$rets .= "<postfield name=\"who\" value=\"$who\"/>";
$rets .= "<postfield name=\"ses\" value=\"$ses\"/>";
$rets .= "<postfield name=\"page\" value=\"$(pg)\"/>";
$rets .= "</go></anchor>";
echo $rets;
}
echo "</p>";
////// UNTILL HERE >>
echo "<p align=\"center\">";
echo "
<a href=\"usergallery.php?action=main&ses=$ses\"> «Back to Gallery</a>
";
echo "<a href=\"index.php?action=main&ses=$ses\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "</p>";
echo webfoot();
}else{
echo waphead($stitle);
echo "<p align=\"center\">";
echo "
";
echo "</p>";
//////ALL LISTS SCRIPT <<
if($page=="" || $page<=0)$page=1;
$noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_usergallery_rating WHERE imageid='".$whoimage."'"));
$num_items = $noi[0]; //changable
$items_per_page= 20;
$num_pages = ceil($num_items/$items_per_page);
if(($page>$num_pages)&&$page!=1)$page= $num_pages;
$limit_start = ($page-1)*$items_per_page;
$imageratinginfo = "SELECT rating, byuid FROM ibwf_usergallery_rating WHERE imageid='".$item[1]."'";
$sql = "SELECT rating, byuid, time FROM ibwf_usergallery_rating WHERE imageid ='".$whoimage."' ORDER BY time DESC LIMIT $limit_start, $items_per_page";
echo "
";
$items = mysql_query($sql);
echo mysql_error();
if(mysql_num_rows($items)>0)
{
while ($item = mysql_fetch_array($items))
{
if(isonline($item[1]))
{
$iml = "<img src=\"images/onl.gif\" alt=\"+\"/>";
}else{
$iml = "<img src=\"images/ofl.gif\" alt=\"-\"/>";
}
$snick = getnick_uid($item[1]);
$lnk = "<a href=\"index.php?action=viewuser&who=$item[1]&ses=$ses\">$iml$snick:</a> $item[0]/10";
echo "$lnk
";
}
}
echo "</p>";
echo "<p align=\"center\">";
if($page>1)
{
$ppage = $page-1;
echo "<a href=\"usergallery.php?action=$action&page=$pp age&ses=$ses&who=$who\">«Prev</a> ";
}
if($page<$num_pages)
{
$npage = $page+1;
echo "<a href=\"usergallery.php?action=$action&page=$np age&ses=$ses&who=$who\">Next»</a>";
}
echo "
$page/$num_pages
";
if($num_pages>2)
{
$rets = "Jump to page<input name=\"pg\" format=\"*N\" size=\"3\"/>";
$rets .= "<anchor>[GO]";
$rets .= "<go href=\"usergallery.php\" method=\"get\">";
$rets .= "<postfield name=\"action\" value=\"$action\"/>";
$rets .= "<postfield name=\"who\" value=\"$who\"/>";
$rets .= "<postfield name=\"ses\" value=\"$ses\"/>";
$rets .= "<postfield name=\"page\" value=\"$(pg)\"/>";
$rets .= "</go></anchor>";
echo $rets;
}
echo "</p>";
////// UNTILL HERE >>
echo "<p align=\"center\">";
echo "
<a href=\"usergallery.php?action=main&ses=$ses\"> «Back to Gallery</a>
";
echo "<a href=\"index.php?action=main&ses=$ses\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "</p>";
echo wapfoot();
}
}
else if($action=="rateuser")
{
addonline(getuid_ses($ses),"Rate a User","");
$rate = $_POST["rate"];
$comment = $_POST["comment"];
if($mime== WEB)
{
echo webhead($uthm,$stitle);
echo "<p align=\"center\">";
$uid = getuid_ses($ses);
if((strlen($comment))>1){
$res= mysql_query("INSERT INTO ibwf_usergallery_rating SET imageid='".$whoimage."', rating='".$rate."', comments='".$comment."', byuid='".$uid."', time='".(time() - $timeadjust)."', commentsyn='Y'");
}else
if((strlen($comment))<2){
$res= mysql_query("INSERT INTO ibwf_usergallery_rating SET imageid='".$whoimage."', rating='".$rate."', comments='".$comment."', byuid='".$uid."', time='".(time() - $timeadjust)."', commentsyn='N'");
}
if(($res) and ((strlen($comment))>1)){
echo "<img src=\"images/ok.gif\" alt=\"o\"/>Rated Successfully
";
echo "<img src=\"images/ok.gif\" alt=\"o\"/>Comments added Successfully
";
}else
if(($res) and ((strlen($comment))<2)){
echo "<img src=\"images/ok.gif\" alt=\"o\"/>Rated Successfully
";
echo "<img src=\"images/notok.gif\" alt=\"x\"/>No Comments were added
";
}
else{
echo "<img src=\"images/notok.gif\" alt=\"x\"/>Rated unsuccessfully
";
echo "<img src=\"images/notok.gif\" alt=\"x\"/>No Comments were added
";
}
echo "</p>";
////// UNTILL HERE >>
echo "<p align=\"center\">";
echo "
<a href=\"usergallery.php?action=main&ses=$ses\"> «Back to Gallery</a>
";
echo "<a href=\"index.php?action=main&ses=$ses\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "</p>";
echo webfoot();
}else{
echo waphead($stitle);
echo "<p align=\"center\">";
$uid = getuid_ses($ses);
if((strlen($comment))>1){
$res= mysql_query("INSERT INTO ibwf_usergallery_rating SET imageid='".$whoimage."', rating='".$rate."', comments='".$comment."', byuid='".$uid."', time='".time()."', commentsyn='Y'");
}else
if((strlen($comment))<2){
$res= mysql_query("INSERT INTO ibwf_usergallery_rating SET imageid='".$whoimage."', rating='".$rate."', comments='".$comment."', byuid='".$uid."', time='".time()."', commentsyn='N'");
}
if(($res) and ((strlen($comment))>1)){
echo "<img src=\"images/ok.gif\" alt=\"o\"/>Rated Successfully
";
echo "<img src=\"images/ok.gif\" alt=\"o\"/>Comments added Successfully
";
}else
if(($res) and ((strlen($comment))<2)){
echo "<img src=\"images/ok.gif\" alt=\"o\"/>Rated Successfully
";
echo "<img src=\"images/notok.gif\" alt=\"x\"/>No Comments were added
";
}
else{
echo "<img src=\"images/notok.gif\" alt=\"x\"/>Rated unsuccessfully
";
echo "<img src=\"images/notok.gif\" alt=\"x\"/>No Comments were added
";
}
echo "</p>";
////// UNTILL HERE >>
echo "<p align=\"center\">";
echo "
<a href=\"usergallery.php?action=main&ses=$ses\"> «Back to Gallery</a>
";
echo "<a href=\"index.php?action=main&ses=$ses\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "</p>";
echo wapfoot();
}
}
else if($action=="commentreplyaction")
{
addonline(getuid_ses($ses),"Reply To Comment","");
$id = $_GET["id"];
$reply = $_POST["reply"];
if($mime== WEB)
{
echo webhead($uthm,$stitle);
echo "<p align=\"center\">";
$uid = getuid_ses($ses);
$res = mysql_query("UPDATE ibwf_usergallery_rating SET commentsreply='".$reply."' WHERE id='".$id."'");
if($res){
echo "<img src=\"images/ok.gif\" alt=\"o\"/>Replyed Successfully
";
}
else{
echo "<img src=\"images/notok.gif\" alt=\"x\"/>Replyed unsuccessfully
";
}
echo "</p>";
////// UNTILL HERE >>
echo "<p align=\"center\">";
echo "
<a href=\"usergallery.php?action=main&ses=$ses\"> «Back to Gallery</a>
";
echo "<a href=\"index.php?action=main&ses=$ses\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "</p>";
echo webfoot();
}else{
echo waphead($stitle);
echo "<p align=\"center\">";
$uid = getuid_ses($ses);
$res = mysql_query("UPDATE ibwf_usergallery_rating SET commentsreply='".$reply."' WHERE id='".$id."'");
if($res){
echo "<img src=\"images/ok.gif\" alt=\"o\"/>Replyed Successfully
";
}
else{
echo "<img src=\"images/notok.gif\" alt=\"x\"/>Replyed unsuccessfully
";
}
echo "</p>";
////// UNTILL HERE >>
echo "<p align=\"center\">";
echo "
<a href=\"usergallery.php?action=main&ses=$ses\"> «Back to Gallery</a>
";
echo "<a href=\"index.php?action=main&ses=$ses\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "</p>";
echo wapfoot();
}
}
else if($action=="upload")
{
addonline(getuid_ses($ses),"Uploading a Photo","");
$rate = $_POST["rate"];
$comment = $_POST["comment"];
if($mime== WEB)
{
echo webhead($uthm,$stitle);
set_time_limit(0);
echo "
";
echo "You can now upload your photo direct from your phone. If this doesn't work, MMS or E-Mail me the photo to scooby.doo@telkomsa.net
Note: You must rename your photo to your username if you MMS or E-Mail it.
";
echo "
Pick a Photo to upload, and press 'upload'
";
echo " <form name=\"form2\" enctype=\"multipart/form-data\" method=\"post\" action=\"upload.php?action=upload&ses=$ses\" />";
echo "<input type=\"file\" size=\"32\" name=\"my_field\" value=\"\" />";
echo "<input type=\"hidden\" name=\"action\" value=\"image\" />
";
echo "<input type=\"submit\" name=\"Submit\" value=\"upload\" />";
echo "</form>";
echo "</p>";
////// UNTILL HERE >>
echo "<p align=\"center\">";
echo "
<a href=\"usergallery.php?action=main&ses=$ses\"> «Back to Gallery</a>
";
echo "<a href=\"index.php?action=main&ses=$ses\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "</p>";
echo webfoot();
}else{
echo waphead($stitle);
echo "
";
echo "If you want to upload a photo, you must use the xHTML version of the site or u can just MMS or E-Mail your photo to scooby.doo@telkomsa.net
Note: You have to rename your pic to your username, or it won't be uploaded.
Allow 2 to 7 days for your photo to be uploaded, it must be validatd first.
";
echo "</p>";
echo "<p align=\"center\">";
echo "
<a href=\"index.php?action=main&ses=$ses\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "</p>";
echo wapfoot();
}
}
//////////// Delete users posts
else if($action=="delsss1")
{
if($mime== WEB)
{
echo webhead($uthm,$stitle);
echo "<p align=\"center\">";
echo "
";
$res = mysql_query("DELETE FROM ibwf_usergallery WHERE id='".$whoimage."'");
$res = mysql_query("DELETE FROM ibwf_usergallery_rating WHERE imageid='".$whoimage."'");
if($res)
{
echo "<img src=\"images/ok.gif\" alt=\"O\"/>Photo and all the Comments have been deleted";
}else{
echo "<img src=\"images/notok.gif\" alt=\"X\"/>Error deleting Photo";
}
echo "
<a href=\"usergallery.php?action=main&ses=$ses\"> «Back to Gallery</a>
";
echo "<a href=\"index.php?action=main&ses=$ses\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "</p>";
echo webfoot();
}else{
echo waphead($stitle);
echo "<p align=\"center\">";
echo "
";
$res = mysql_query("DELETE FROM ibwf_usergallery WHERE id='".$whoimage."'");
$res = mysql_query("DELETE FROM ibwf_usergallery_rating WHERE imageid='".$whoimage."'");
if($res)
{
echo "<img src=\"images/ok.gif\" alt=\"O\"/>Photo and all the Comments have been deleted";
}else{
echo "<img src=\"images/notok.gif\" alt=\"X\"/>Error deleting Photo";
}
echo "
<a href=\"admincp.php?action=chuinfo&ses=$ses\">" ;
echo "User info</a>
";
echo "<a href=\"index.php?action=admincp&ses=$ses\"><im g src=\"images/admn.gif\" alt=\"*\"/>";
echo "Admin CP</a>
";
echo "<a href=\"index.php?action=main&ses=$ses\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "</p>";
echo wapfoot();
}
}else
{
addonline(getuid_ses($ses),"Searching For Gold In Gallery","");
if($mime== WEB)
{
echo webhead($uthm,$stitle);
echo "<p align=\"center\">";
echo "I don't know how did you get into here, but there's nothing to show
";
echo "<a href=\"index.php?action=main&ses=$ses\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "</p>";
echo webfoot();
}else{
echo waphead($stitle);
echo "<p align=\"center\">";
echo "I don't know how did you get into here, but there's nothing to show
";
echo "<a href=\"index.php?action=main&ses=$ses\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "</p>";
echo wapfoot();
}
}
?>
sql 4 it
-- --------------------------------------------------------
--
-- Tabel struktuur vir tabel `ibwf_usergallery`
--
CREATE TABLE `ibwf_usergallery` (
`id` int(100) NOT NULL auto_increment,
`uid` int(100) NOT NULL default '0',
`imageurl` varchar(100) NOT NULL default '',
`sex` char(1) NOT NULL default '',
`time` int(100) NOT NULL default '0',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
--
-- Stort data vir tabel `ibwf_usergallery`
--
-- --------------------------------------------------------
Comment