Delete poll lavalair

Started on the old forum in February 2016 · view the original in the archive · old links redirect here

4 replies · 206 views · started 10 years ago · 1 min read

3 participants
stefan998 Junior · 25 posts #1

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

stefan998 Junior · 25 posts #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

thunderwap Developer · 169 posts #3

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

add in modcp.php

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&sid=$sid"><img src="../images/home.gif" alt=""/>Home</a>";
  echo "</p>";
  echo "</body>";
}

add in index.php where u see users poll

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

}

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

centi Developer · 159 posts #4

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

😳 .................................... http://photomag.lk/ .................................... 🤨

Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close