Hello,does anybody have script where mod can delete other users poll in lavalair.Thank you
Delete poll lavalair
Collapse
X
-
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&sid=$sid"><img src="../images/home.gif" alt=""/>Home</a>";
echo "</p>";
echo "</body>";
}
PHP Code: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/>";
}
Last edited by thunderwap; 29.02.16, 06:38.sigpic
WANT GOOD CHEAP HOSTING WITH 99% UPTIME? THEN PM ME FOR DETAILS!!
Comment
Comment