delete avatar

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    delete avatar

    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&amp;sid=$sid&amp;avid=$item[0]\">[x]</a>";
            }else{
                $delsl = "";
            }
    
    
    
    if(ishost(getuid_sid($sid)))
            {
                $delav = "<a href=\"hostproc.php?action=delav&amp;sid=$sid&amp;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&amp;sid=$sid&amp;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&amp;page=$ppage&amp;sid=$sid&amp;view=$view\">&#171;PREV</a> ";
        }
        if($page<$num_pages)
        {
          $npage = $page+1;
          echo "<a href=\"lists.php?action=avatars&amp;page=$npage&amp;sid=$sid&amp;view=$view\">Next&#187;</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&amp;sid=$sid\">Settings</a><br/>";
      echo "<b>0 </b><a accesskey=\"0\" href=\"index.php?action=main&amp;sid=$sid\"><img src=\"../phpThumb/phpThumb.php?src=../images/home.gif\" alt=\"\"/>Home</a>";
      echo "</p>";
        echo "</body>";
    }
    this is wot i have got so far. in fact its been like that for months lol . never got round to fixing it.

    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 .
    Wapchat4u


    Topsites4u

    #2
    do the avatars run thru the database?
    Creator of
    Epix.Mobi

    Keep an Eye on us Big things coming soon!!!!
    Need something for your site hit me up here

    http://coding-talk.com/forum/main-fo...r-your-wapsite

    Comment


      #3
      if they do maybe the page removepic.php from my script waplance can help you take a look if it doesnt help i can have a look at ur code
      Creator of
      Epix.Mobi

      Keep an Eye on us Big things coming soon!!!!
      Need something for your site hit me up here

      http://coding-talk.com/forum/main-fo...r-your-wapsite

      Comment


        #4
        u got 2 whiles fucntions that dont need to be there and two delete links just use an or to join them so u only need one link an or in php is ||
        Want something coded email me at sales@webnwaphost.com for a prices.




        Comment


          #5
          yeh it runs thru database.

          i tried to copy the delete from the smilies list to that .
          Wapchat4u


          Topsites4u

          Comment

          Working...
          X