Delete poll lavalair

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

    Delete poll lavalair

    Hello,does anybody have script where mod can delete other users poll in lavalair.Thank you

    #2
    Example:User creates a poll witch other users don't like and he/she doesn'n want to delete that poll so a mod must delete it,but I do not have that script.Can please somebody help me.Thanks

    Comment


      #3
      i dont have this feature in my site.though its good suggestion from you so i maked this now.

      add in modcp.php

      PHP Code:
      else if($action=="delpoll")
      {
        
      $uid getuid_sid($sid);
        
      addonline(getuid_sid($sid),"Mod Cp","");
            echo 
      "<head>";
            echo 
      "<title>$sitename</title>";
            echo 
      "<link rel="stylesheet" type="text/css" href="../themes/$theme[0]">";
            echo 
      "</head>";
            echo 
      "<body>";
          echo 
      "<p align="center">";
              
      $who =mysql_real_escape_string ($_GET["who"]);

          
      $pid mysql_fetch_array(mysql_query("SELECT pollid FROM ibwf_users WHERE id='".$who."'"));
              
      $res mysql_query("UPDATE ibwf_users SET pollid='0' WHERE id='".$who."'");
              if(
      $res)
              {
                
      $res mysql_query("DELETE FROM ibwf_presults WHERE pid='".$pid[0]."'");
                
      $res mysql_query("DELETE FROM ibwf_pp_pres WHERE pid='".$pid[0]."'");
                
      $res mysql_query("DELETE FROM ibwf_polls WHERE id='".$pid[0]."'");
                  echo 
      "<img src="../images/ok.gif" alt="o"/>User Poll Deleted";
              }else{
                  echo 
      "<img src="../images/notok.gif" alt="x"/>Database Error!";
              }
        echo 
      "<br/><br/><b>0 </b><a accesskey="0" href="index.php?action=main&amp;sid=$sid"><img src="../images/home.gif" alt=""/>Home</a>";
        echo 
      "</p>";
        echo 
      "</body>";

      add in index.php where u see users poll

      PHP Code:
      if(ismod(getuid_sid($sid)))
        {
      echo 
      "<br/><br/><a href="modcp.php?action=delpoll&amp;plid=$pollid[0]&amp;who=$who&amp;sid=$sid">Delete poll</a><br/>";


      Last edited by thunderwap; 29.02.16, 06:38.
      sigpic

      WANT GOOD CHEAP HOSTING WITH 99% UPTIME? THEN PM ME FOR DETAILS!!

      Comment


        #4
        hey thunder you using lava? what is your site url, i wanna check it out


        ....................................
        http://photomag.lk/
        ....................................

        Comment


          #5
          Thanks it worked

          Comment

          Working...
          X