Code:
[COLOR=#000000][COLOR=#007700]if([/COLOR][COLOR=#0000BB]$action[/COLOR][COLOR=#007700]==[/COLOR][COLOR=#DD0000]"males"[/COLOR][COLOR=#007700]) { [/COLOR][COLOR=#0000BB]addonline[/COLOR][COLOR=#007700]([/COLOR][COLOR=#0000BB]getuid_sid[/COLOR][COLOR=#007700]([/COLOR][COLOR=#0000BB]$sid[/COLOR][COLOR=#007700]),[/COLOR][COLOR=#DD0000]"Male Gallery"[/COLOR][COLOR=#007700],[/COLOR][COLOR=#DD0000]""[/COLOR][COLOR=#007700]); [/COLOR][COLOR=#007700] echo [/COLOR][COLOR=#DD0000]"<body>"[/COLOR][COLOR=#007700]; echo [/COLOR][COLOR=#DD0000]"<p align=\"center\"><small>"[/COLOR][COLOR=#007700]; echo [/COLOR][COLOR=#DD0000]"<i><b><u>Male Users From $sitename</u></b></i>"[/COLOR][COLOR=#007700]; echo [/COLOR][COLOR=#DD0000]"<br/><br/>"[/COLOR][COLOR=#007700]; echo [/COLOR][COLOR=#DD0000]"</small></p>"[/COLOR][COLOR=#007700]; [/COLOR][COLOR=#FF8000]//////ALL LISTS SCRIPT << [/COLOR][COLOR=#0000BB]$uid1 [/COLOR][COLOR=#007700]= [/COLOR][COLOR=#0000BB]getuid_sid[/COLOR][COLOR=#007700]([/COLOR][COLOR=#0000BB]$sid[/COLOR][COLOR=#007700]); [/COLOR][COLOR=#0000BB]$mid [/COLOR][COLOR=#007700]= [/COLOR][COLOR=#0000BB]$_GET[/COLOR][COLOR=#007700][[/COLOR][COLOR=#DD0000]"mid"[/COLOR][COLOR=#007700]]; if([/COLOR][COLOR=#0000BB]$page[/COLOR][COLOR=#007700]==[/COLOR][COLOR=#DD0000]"" [/COLOR][COLOR=#007700]|| [/COLOR][COLOR=#0000BB]$page[/COLOR][COLOR=#007700]<=[/COLOR][COLOR=#0000BB]0[/COLOR][COLOR=#007700])[/COLOR][COLOR=#0000BB]$page[/COLOR][COLOR=#007700]=[/COLOR][COLOR=#0000BB]1[/COLOR][COLOR=#007700]; [/COLOR][COLOR=#0000BB]$noi [/COLOR][COLOR=#007700]= [/COLOR][COLOR=#0000BB]mysql_fetch_array[/COLOR][COLOR=#007700]([/COLOR][COLOR=#0000BB]mysql_query[/COLOR][COLOR=#007700]([/COLOR][COLOR=#DD0000]"SELECT COUNT(*) FROM usergallery WHERE sex='M'"[/COLOR][COLOR=#007700])); [/COLOR][COLOR=#0000BB]$num_items [/COLOR][COLOR=#007700]= [/COLOR][COLOR=#0000BB]$noi[/COLOR][COLOR=#007700][[/COLOR][COLOR=#0000BB]0[/COLOR][COLOR=#007700]]; [/COLOR][COLOR=#FF8000]//changable [/COLOR][COLOR=#0000BB]$items_per_page[/COLOR][COLOR=#007700]= [/COLOR][COLOR=#0000BB]5[/COLOR][COLOR=#007700]; [/COLOR][COLOR=#0000BB]$num_pages [/COLOR][COLOR=#007700]= [/COLOR][COLOR=#0000BB]ceil[/COLOR][COLOR=#007700]([/COLOR][COLOR=#0000BB]$num_items[/COLOR][COLOR=#007700]/[/COLOR][COLOR=#0000BB]$items_per_page[/COLOR][COLOR=#007700]); if(([/COLOR][COLOR=#0000BB]$page[/COLOR][COLOR=#007700]>[/COLOR][COLOR=#0000BB]$num_pages[/COLOR][COLOR=#007700])&&[/COLOR][COLOR=#0000BB]$page[/COLOR][COLOR=#007700]!=[/COLOR][COLOR=#0000BB]1[/COLOR][COLOR=#007700])[/COLOR][COLOR=#0000BB]$page[/COLOR][COLOR=#007700]= [/COLOR][COLOR=#0000BB]$num_pages[/COLOR][COLOR=#007700]; [/COLOR][COLOR=#0000BB]$limit_start [/COLOR][COLOR=#007700]= ([/COLOR][COLOR=#0000BB]$page[/COLOR][COLOR=#007700]-[/COLOR][COLOR=#0000BB]1[/COLOR][COLOR=#007700])*[/COLOR][COLOR=#0000BB]$items_per_page[/COLOR][COLOR=#007700]; [/COLOR][COLOR=#0000BB]$sql [/COLOR][COLOR=#007700]= [/COLOR][COLOR=#DD0000]"SELECT uid, id, imageurl FROM usergallery WHERE sex='M' ORDER BY id DESC LIMIT $limit_start, $items_per_page"[/COLOR][COLOR=#007700]; [/COLOR][COLOR=#FF8000]///////////////////// part of the added code also. [/COLOR][COLOR=#0000BB]$result [/COLOR][COLOR=#007700]= [/COLOR][COLOR=#0000BB]mysql_query[/COLOR][COLOR=#007700]([/COLOR][COLOR=#0000BB]$sql[/COLOR][COLOR=#007700]) or die([/COLOR][COLOR=#DD0000]"Error: " [/COLOR][COLOR=#007700]. [/COLOR][COLOR=#0000BB]mysql_error[/COLOR][COLOR=#007700]()); [/COLOR][COLOR=#FF8000]//// [/COLOR][COLOR=#007700]echo [/COLOR][COLOR=#DD0000]"<p>"[/COLOR][COLOR=#007700]; [/COLOR][COLOR=#0000BB]$items [/COLOR][COLOR=#007700]= [/COLOR][COLOR=#0000BB]mysql_query[/COLOR][COLOR=#007700]([/COLOR][COLOR=#0000BB]$sql[/COLOR][COLOR=#007700]); echo [/COLOR][COLOR=#0000BB]mysql_error[/COLOR][COLOR=#007700](); if([/COLOR][COLOR=#0000BB]mysql_num_rows[/COLOR][COLOR=#007700]([/COLOR][COLOR=#0000BB]$items[/COLOR][COLOR=#007700])>[/COLOR][COLOR=#0000BB]0[/COLOR][COLOR=#007700]) { while ([/COLOR][COLOR=#0000BB]$item [/COLOR][COLOR=#007700]= [/COLOR][COLOR=#0000BB]mysql_fetch_array[/COLOR][COLOR=#007700]([/COLOR][COLOR=#0000BB]$items[/COLOR][COLOR=#007700])) { [/COLOR][COLOR=#0000BB]$sql [/COLOR][COLOR=#007700]= [/COLOR][COLOR=#DD0000]"SELECT rating FROM usergallery_rating WHERE imageid='"[/COLOR][COLOR=#007700].[/COLOR][COLOR=#0000BB]$item[/COLOR][COLOR=#007700][[/COLOR][COLOR=#0000BB]1[/COLOR][COLOR=#007700]].[/COLOR][COLOR=#DD0000]"'"[/COLOR][COLOR=#007700]; [/COLOR][COLOR=#0000BB]$imginfo [/COLOR][COLOR=#007700]= [/COLOR][COLOR=#0000BB]mysql_query[/COLOR][COLOR=#007700]([/COLOR][COLOR=#0000BB]$sql[/COLOR][COLOR=#007700]); echo [/COLOR][COLOR=#0000BB]mysql_error[/COLOR][COLOR=#007700](); if([/COLOR][COLOR=#0000BB]mysql_num_rows[/COLOR][COLOR=#007700]([/COLOR][COLOR=#0000BB]$imginfo[/COLOR][COLOR=#007700])>[/COLOR][COLOR=#0000BB]0[/COLOR][COLOR=#007700]) { while ([/COLOR][COLOR=#0000BB]$imginfos [/COLOR][COLOR=#007700]= [/COLOR][COLOR=#0000BB]mysql_fetch_array[/COLOR][COLOR=#007700]([/COLOR][COLOR=#0000BB]$imginfo[/COLOR][COLOR=#007700])){ [/COLOR][COLOR=#0000BB]$ratingtotal [/COLOR][COLOR=#007700]= [/COLOR][COLOR=#0000BB]$ratingtotal [/COLOR][COLOR=#007700]+ [/COLOR][COLOR=#0000BB]$imginfos[/COLOR][COLOR=#007700][[/COLOR][COLOR=#0000BB]0[/COLOR][COLOR=#007700]];} } if([/COLOR][COLOR=#0000BB]$totalcomments[/COLOR][COLOR=#007700]<[/COLOR][COLOR=#0000BB]1[/COLOR][COLOR=#007700]){[/COLOR][COLOR=#0000BB]$totalcomments[/COLOR][COLOR=#007700]=[/COLOR][COLOR=#0000BB]0[/COLOR][COLOR=#007700];} [/COLOR][COLOR=#0000BB]$norm [/COLOR][COLOR=#007700]= [/COLOR][COLOR=#0000BB]mysql_fetch_array[/COLOR][COLOR=#007700]([/COLOR][COLOR=#0000BB]mysql_query[/COLOR][COLOR=#007700]([/COLOR][COLOR=#DD0000]"SELECT COUNT(*) FROM usergallery_rating WHERE imageid='"[/COLOR][COLOR=#007700].[/COLOR][COLOR=#0000BB]$item[/COLOR][COLOR=#007700][[/COLOR][COLOR=#0000BB]1[/COLOR][COLOR=#007700]].[/COLOR][COLOR=#DD0000]"'"[/COLOR][COLOR=#007700])); if ([/COLOR][COLOR=#0000BB]$norm[/COLOR][COLOR=#007700][[/COLOR][COLOR=#0000BB]0[/COLOR][COLOR=#007700]]>[/COLOR][COLOR=#0000BB]0[/COLOR][COLOR=#007700]){ [/COLOR][COLOR=#0000BB]$rating [/COLOR][COLOR=#007700]= [/COLOR][COLOR=#0000BB]ceil[/COLOR][COLOR=#007700]([/COLOR][COLOR=#0000BB]$ratingtotal[/COLOR][COLOR=#007700]/[/COLOR][COLOR=#0000BB]$norm[/COLOR][COLOR=#007700][[/COLOR][COLOR=#0000BB]0[/COLOR][COLOR=#007700]]); }else{[/COLOR][COLOR=#0000BB]$rating[/COLOR][COLOR=#007700]=[/COLOR][COLOR=#0000BB]0[/COLOR][COLOR=#007700];} [/COLOR][COLOR=#0000BB]$rated [/COLOR][COLOR=#007700]= [/COLOR][COLOR=#0000BB]mysql_fetch_array[/COLOR][COLOR=#007700]([/COLOR][COLOR=#0000BB]mysql_query[/COLOR][COLOR=#007700]([/COLOR][COLOR=#DD0000]"SELECT COUNT(*) FROM usergallery_rating WHERE byuid='"[/COLOR][COLOR=#007700].[/COLOR][COLOR=#0000BB]$uid1[/COLOR][COLOR=#007700].[/COLOR][COLOR=#DD0000]"' and imageid ='"[/COLOR][COLOR=#007700].[/COLOR][COLOR=#0000BB]$item[/COLOR][COLOR=#007700][[/COLOR][COLOR=#0000BB]1[/COLOR][COLOR=#007700]].[/COLOR][COLOR=#DD0000]"'"[/COLOR][COLOR=#007700])); [/COLOR][COLOR=#0000BB]$totalcomments [/COLOR][COLOR=#007700]= [/COLOR][COLOR=#0000BB]mysql_fetch_array[/COLOR][COLOR=#007700]([/COLOR][COLOR=#0000BB]mysql_query[/COLOR][COLOR=#007700]([/COLOR][COLOR=#DD0000]"SELECT COUNT(*) FROM usergallery_rating WHERE imageid ='"[/COLOR][COLOR=#007700].[/COLOR][COLOR=#0000BB]$item[/COLOR][COLOR=#007700][[/COLOR][COLOR=#0000BB]1[/COLOR][COLOR=#007700]].[/COLOR][COLOR=#DD0000]"' and commentsyn ='Y'"[/COLOR][COLOR=#007700])); [/COLOR][COLOR=#0000BB]$userinfo [/COLOR][COLOR=#007700]= [/COLOR][COLOR=#0000BB]mysql_fetch_array[/COLOR][COLOR=#007700]([/COLOR][COLOR=#0000BB]mysql_query[/COLOR][COLOR=#007700]([/COLOR][COLOR=#DD0000]"SELECT name FROM users WHERE id='"[/COLOR][COLOR=#007700].[/COLOR][COLOR=#0000BB]$item[/COLOR][COLOR=#007700][[/COLOR][COLOR=#0000BB]0[/COLOR][COLOR=#007700]].[/COLOR][COLOR=#DD0000]"'"[/COLOR][COLOR=#007700])); echo [/COLOR][COLOR=#DD0000]"<a href=\"index.php?action=viewuser&who=$item[0]&sid=$sid\"><b><i><u>$userinfo[0]</u></i></b></a><small>"[/COLOR][COLOR=#007700]; if([/COLOR][COLOR=#0000BB]canratephoto[/COLOR][COLOR=#007700]([/COLOR][COLOR=#0000BB]$uid1[/COLOR][COLOR=#007700], [/COLOR][COLOR=#0000BB]$item[/COLOR][COLOR=#007700][[/COLOR][COLOR=#0000BB]0[/COLOR][COLOR=#007700]]) and ([/COLOR][COLOR=#0000BB]$rated[/COLOR][COLOR=#007700][[/COLOR][COLOR=#0000BB]0[/COLOR][COLOR=#007700]]==[/COLOR][COLOR=#0000BB]0[/COLOR][COLOR=#007700])) { echo [/COLOR][COLOR=#DD0000]"<br/><a href=\"usergallery.php?action=rate&sid=$sid&whoimage=$item[1]\">Rate This Photo</a>"[/COLOR][COLOR=#007700]; } if([/COLOR][COLOR=#0000BB]ishost[/COLOR][COLOR=#007700]([/COLOR][COLOR=#0000BB]getuid_sid[/COLOR][COLOR=#007700]([/COLOR][COLOR=#0000BB]$sid[/COLOR][COLOR=#007700]))||(([/COLOR][COLOR=#0000BB]isowner[/COLOR][COLOR=#007700]([/COLOR][COLOR=#0000BB]getuid_sid[/COLOR][COLOR=#007700]([/COLOR][COLOR=#0000BB]$sid[/COLOR][COLOR=#007700]))||(([/COLOR][COLOR=#0000BB]isheadadmin[/COLOR][COLOR=#007700]([/COLOR][COLOR=#0000BB]getuid_sid[/COLOR][COLOR=#007700]([/COLOR][COLOR=#0000BB]$sid[/COLOR][COLOR=#007700]))))))) { echo [/COLOR][COLOR=#DD0000]" / <a href=\"usergallery.php?action=del&sid=$sid&whoimage=$item[1]\">Del</a>"[/COLOR][COLOR=#007700]; } if([/COLOR][COLOR=#0000BB]$uid1[/COLOR][COLOR=#007700]==[/COLOR][COLOR=#0000BB]$item[/COLOR][COLOR=#007700][[/COLOR][COLOR=#0000BB]0[/COLOR][COLOR=#007700]]) { echo [/COLOR][COLOR=#DD0000]" / <a href=\"usergallery.php?action=del&sid=$sid&whoimage=$item[1]\">Del</a>"[/COLOR][COLOR=#007700]; } if([/COLOR][COLOR=#0000BB]$uid1[/COLOR][COLOR=#007700]==[/COLOR][COLOR=#0000BB]$item[/COLOR][COLOR=#007700][[/COLOR][COLOR=#0000BB]0[/COLOR][COLOR=#007700]]) { echo [/COLOR][COLOR=#DD0000]"<br/><a href=\"genproc.php?action=upavg&sid=$sid&avsrc=$item[2]\">Use As profile pic</a>"[/COLOR][COLOR=#007700]; } echo [/COLOR][COLOR=#DD0000]"</small><br/><img src=\"$item[2]\" alt=\"$userinfo[0]\"/><br/>"[/COLOR][COLOR=#007700]; echo [/COLOR][COLOR=#DD0000]"<small>Rating: $rating/10 (<a href=\"usergallery.php?action=votes&sid=$sid&whoimage=$item[1]\">$norm[0]</a> Votes)<br/><a href=\"usergallery.php?action=comments&sid=$sid&whoimage=$item[1]\">Comments</a>($totalcomments[0])"[/COLOR][COLOR=#007700]; echo [/COLOR][COLOR=#DD0000]"</small><br/><a href=\"$item[2]\" alt=\"$userinfo[0]\"/>Download<br/>"[/COLOR][COLOR=#007700]; [/COLOR][COLOR=#FF8000]////////////////////////my problem part [/COLOR][COLOR=#007700]while([/COLOR][COLOR=#0000BB]$row [/COLOR][COLOR=#007700]= [/COLOR][COLOR=#0000BB]mysql_fetch_array[/COLOR][COLOR=#007700]([/COLOR][COLOR=#0000BB]$result[/COLOR][COLOR=#007700])){ echo [/COLOR][COLOR=#DD0000]"<br/><a href=\"getpics.php?file=$row[id]&sid=$sid\">Download test</a>"[/COLOR][COLOR=#007700]; <[/COLOR][COLOR=#0000BB]br[/COLOR][COLOR=#007700]/>[/COLOR][COLOR=#DD0000]"; } //////////////////////// echo "[/COLOR][COLOR=#007700]</[/COLOR][COLOR=#0000BB]small[/COLOR][COLOR=#007700]><[/COLOR][COLOR=#0000BB]br[/COLOR][COLOR=#007700]/><[/COLOR][COLOR=#0000BB]br[/COLOR][COLOR=#007700]/>[/COLOR][COLOR=#DD0000]"; $ratingtotal = 0; } } echo "[/COLOR][COLOR=#007700]</[/COLOR][COLOR=#0000BB]p[/COLOR][COLOR=#007700]>[/COLOR][COLOR=#DD0000]"; echo "[/COLOR][COLOR=#007700]<[/COLOR][COLOR=#0000BB]p align[/COLOR][COLOR=#007700]=[/COLOR][COLOR=#DD0000]"center\">"[/COLOR][COLOR=#007700]; if([/COLOR][COLOR=#0000BB]$page[/COLOR][COLOR=#007700]>[/COLOR][COLOR=#0000BB]1[/COLOR][COLOR=#007700]) { [/COLOR][COLOR=#0000BB]$ppage [/COLOR][COLOR=#007700]= [/COLOR][COLOR=#0000BB]$page[/COLOR][COLOR=#007700]-[/COLOR][COLOR=#0000BB]1[/COLOR][COLOR=#007700]; echo [/COLOR][COLOR=#DD0000]"<a href=\"usergallery.php?action=males&sid=$sid&page=$ppage\">«Prev</a> "[/COLOR][COLOR=#007700]; } if([/COLOR][COLOR=#0000BB]$page[/COLOR][COLOR=#007700]<[/COLOR][COLOR=#0000BB]$num_pages[/COLOR][COLOR=#007700]) { [/COLOR][COLOR=#0000BB]$npage [/COLOR][COLOR=#007700]= [/COLOR][COLOR=#0000BB]$page[/COLOR][COLOR=#007700]+[/COLOR][COLOR=#0000BB]1[/COLOR][COLOR=#007700]; echo [/COLOR][COLOR=#DD0000]"<a href=\"usergallery.php?action=males&sid=$sid&page=$npage\">Next»</a>"[/COLOR][COLOR=#007700]; } echo [/COLOR][COLOR=#DD0000]"<br/>$page/$num_pages<br/>"[/COLOR][COLOR=#007700]; if([/COLOR][COLOR=#0000BB]$num_pages[/COLOR][COLOR=#007700]>[/COLOR][COLOR=#0000BB]2[/COLOR][COLOR=#007700]) { [/COLOR][COLOR=#0000BB]$rets [/COLOR][COLOR=#007700]= [/COLOR][COLOR=#DD0000]"<form action=\"usergallery.php\" method=\"get\"><p align=\"center\">"[/COLOR][COLOR=#007700]; [/COLOR][COLOR=#0000BB]$rets [/COLOR][COLOR=#007700].= [/COLOR][COLOR=#DD0000]"<input name=\"page\" style=\"-wap-input-format: '*N'\" size=\"3\"/>"[/COLOR][COLOR=#007700]; [/COLOR][COLOR=#0000BB]$rets [/COLOR][COLOR=#007700].= [/COLOR][COLOR=#DD0000]"<input type=\"hidden\" name=\"sid\" value=\"$sid\"/>"[/COLOR][COLOR=#007700]; [/COLOR][COLOR=#0000BB]$rets [/COLOR][COLOR=#007700].= [/COLOR][COLOR=#DD0000]"<input type=\"hidden\" name=\"action\" value=\"$action\"/>"[/COLOR][COLOR=#007700]; [/COLOR][COLOR=#0000BB]$rets [/COLOR][COLOR=#007700].= [/COLOR][COLOR=#DD0000]"<input type=\"hidden\" name=\"view\" value=\"$view\"/>"[/COLOR][COLOR=#007700]; [/COLOR][COLOR=#0000BB]$rets [/COLOR][COLOR=#007700].= [/COLOR][COLOR=#DD0000]"<input type=\"Submit\" value=\"Go To Page\" Name=\"Submit\"/></form>"[/COLOR][COLOR=#007700]; echo [/COLOR][COLOR=#0000BB]$rets[/COLOR][COLOR=#007700]; } echo [/COLOR][COLOR=#DD0000]"</p>"[/COLOR][COLOR=#007700]; [/COLOR][COLOR=#FF8000]////// UNTILL HERE >> [/COLOR][COLOR=#007700]echo [/COLOR][COLOR=#DD0000]"<p align=\"center\">"[/COLOR][COLOR=#007700]; echo [/COLOR][COLOR=#DD0000]"<br/><br/><a href=\"usergallery.php?action=main&sid=$sid\">«Back to Gallery</a><br/>"[/COLOR][COLOR=#007700]; echo [/COLOR][COLOR=#DD0000]"<a href=\"index.php?action=main&sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>"[/COLOR][COLOR=#007700]; echo [/COLOR][COLOR=#DD0000]"Home</a>"[/COLOR][COLOR=#007700]; echo [/COLOR][COLOR=#DD0000]"</p>"[/COLOR][COLOR=#007700]; echo[/COLOR][COLOR=#DD0000]"</body>"[/COLOR][COLOR=#007700]; exit(); [/COLOR][/COLOR]
tried moving } around and it just puts the links in another place of the page .
cheers
Comment