Code:
/////////////////////////////////Avatars else if($action=="avatars") { addonline(getuid_sid($sid),"Viewing The Avatars List",""); echo "<head>"; echo "<title>Avatars List</title>"; echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">"; echo "</head>"; echo "<body>"; //////ALL LISTS SCRIPT << if($page=="" || $page<=0)$page=1; $noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM dave_avatars")); $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 id, avlink FROM dave_avatars ORDER BY id DESC LIMIT $limit_start, $items_per_page"; echo "<p>"; $items = mysql_query($sql); echo mysql_error(); if(mysql_num_rows($items)>0) { while ($item = mysql_fetch_array($items)) { if(isowner(getuid_sid($sid))) { $delsl = "<a href=\"ownrproc.php?action=delsm&sid=$sid&avid=$item[0]\">[x]</a>"; }else{ $delsl = ""; } if(ishost(getuid_sid($sid))) { $delav = "<a href=\"hostproc.php?action=delav&sid=$sid&avid=$item[0]\">[x]</a>"; }else{ $delav = ""; } echo "<img src=\"$item[0]\" alt=\"\"/> $delav<br/>"; } echo "</p>"; echo "<p>"; $items = mysql_query($sql); echo mysql_error(); if(mysql_num_rows($items)>0) { while ($item = mysql_fetch_array($items)) { echo "<img src=\"$item[1]\" alt=\"avatar\"/><br/>"; echo "<a href=\"genproc.php?action=upav&sid=$sid&avid=$item[0]\">SELECT</a><br/>"; echo "<img src=\"$item[0]\" alt=\"\"/> $delav<br/>"; } echo "<br/>"; } } echo "</p>"; echo "<p align=\"center\">"; if($page>1) { $ppage = $page-1; echo "<a href=\"lists.php?action=avatars&page=$ppage&sid=$sid&view=$view\">«PREV</a> "; } if($page<$num_pages) { $npage = $page+1; echo "<a href=\"lists.php?action=avatars&page=$npage&sid=$sid&view=$view\">Next»</a>"; } echo "<br/>$page/$num_pages<br/>"; if($num_pages>2) { $rets = "<form action=\"lists.php\" method=\"get\">"; $rets .= "<input name=\"page\" style=\"-wap-input-format: '*N'\" size=\"2\"/>"; $rets .= "<input type=\"hidden\" name=\"action\" value=\"$action\"/>"; $rets .= "<input type=\"hidden\" name=\"sid\" value=\"$sid\"/>"; $rets .= "<input type=\"submit\" value=\"Go To Page\"/>"; $rets .= "</form>"; echo $rets; } echo "</p>"; ////// UNTILL HERE >> echo "<p align=\"center\">"; echo "<a href=\"index.php?action=cpanel&sid=$sid\">Settings</a><br/>"; echo "<b>0 </b><a accesskey=\"0\" href=\"index.php?action=main&sid=$sid\"><img src=\"../phpThumb/phpThumb.php?src=../images/home.gif\" alt=\"\"/>Home</a>"; echo "</p>"; echo "</body>"; }
anyone help me so it deletes the one wer the X is next too
at present theres 5 X ,s at the top then under an image with the select avatar lick then another delete x .
its a bit of mess to be honest pmpl .
Comment