Modcp Edit

Started on the old forum in October 2008 · view the original in the archive · old links redirect here

7 replies · 726 views · started 18 years ago · 1 min read

3 participants
friend Developer · 112 posts #1

Pls all wap masters and code master

I already have modcp and modproc.php including hack proof script. But i want scipt by that any moderator cant ban,trash or ip ban admin. They can ban or other penalties to user except admin. To grow up site i need good mods as i had already appointed. They are good but i need this arrangement so they cant ban admins .i do script in modproc.php but it not worked

Check plsCODEelse if($action=="pun") { $pid = $_POST["pid"]; $who = $_POST["who"]; $pres = $_POST["pres"]; $pds = $_POST["pds"]; $phr = $_POST["phr"]; $pmn = $_POST["pmn"]; $psc = $_POST["psc"]; echo " ";

$uip = ""; $ubr = ""; $pmsg[0]="Trashed"; $pmsg[1]="Banned"; $pmsg[2]="IP-Banned"; if($pid=='2') { //ip ban $uip = getip_uid($who); $ubr = getbr_uid($who); } if(!isadmin(getuid_sid($sid))) { $sql = mysql_fetch_array(mysql_query("SELECT uid FROM ibwf_users WHERE id='".$who."'")); $uip = getip_uid($who); $ubr = getbr_uid($who); echo "<img src="../images/notok.gif" alt="X"/>u cant ban admin"; }else{

if(trim($pres)=="") { echo "<img src="../images/notok.gif" alt="X"/>You must Specify a reson for punishing the user"; }else{ $timeto = $pds246060; $timeto += $phr6060; $timeto += $pmn60; $timeto += $psc; $ptime = $timeto + time(); $unick = getnick_uid($who); $res = mysql_query("INSERT INTO ibwf_penalties SET uid='".$who."', penalty='".$pid."', exid='".getuid_sid($sid)."', timeto='".$ptime."', pnreas='".mysql_escape_string($pres)."', ipadd='".$uip."', browserm='".$ubr."'"); if($res) { mysql_query("UPDATE ibwf_users SET lastpnreas='".$pmsg[$pid].": ".mysql_escape_string($pres)."' WHERE id='".$who."'"); mysql_query("INSERT INTO ibwf_mlog SET action='penalties', details='".getnick_uid(getuid_sid($sid))." $pmsg[$pid] The user ".$unick." For ".$timeto." Seconds', actdt='".time()."'");

        echo "<img src=\"../images/ok.gif\" alt=\"O\"/>$unick is $pmsg[$pid] for $timeto Seconds";
      }else{
        echo "<img src=\"../images/notok.gif\" alt=\"X\"/>Database Error";
      }

} echo "

<a href="index.php?action=main&sid=$sid"><img src="../images/home.gif" alt="*"/>"; echo "Home</a>"; echo "

</body>"; }
djdeny Junior · 12 posts #2

use this 😉

else if($action=="pun")
{
$pid = $_POST["pid"];
$who = $_POST["who"];
$pres = $_POST["pres"];
$pds = $_POST["pds"];
$phr = $_POST["phr"];
$pmn = $_POST["pmn"];
$psc = $_POST["psc"];
echo "<p align=\"center\">";

$uip = "";
$ubr = "";
$pmsg[0]="Trashed";
$pmsg[1]="Banned";
$pmsg[2]="IP-Banned";
if($pid=='2')
{
//ip ban
$uip = getip_uid($who);
$ubr = getbr_uid($who);
}
if(!isadmin($who))
{
$uidd = getuid_sid($sid);

$ip = getip_uid($uidd);
$br = getbr_uid($uidd);

echo "<img src=\"../images/notok.gif\" alt=\"X\"/>u cant ban admin";

$nick = getnick_sid($sid);
$vrijeme = date("H:i:s d/m/Y");
$file = "ban.txt";
$fp = fopen($file, "a");
$sve = "Nick:$nick \r\n Bro: $br \r\n IP: $ip \r\n Time: $vrijeme \r\n \r\n************\r\n";
fwrite($fp,$sve);
fclose($fp);

}else{

if(trim($pres)=="")
{
echo "<img src=\"../images/notok.gif\" alt=\"X\"/>You must Specify a reson for punishing the user";
}else{
$timeto = $pds*24*60*60;
$timeto += $phr*60*60;
$timeto += $pmn*60;
$timeto += $psc;
$ptime = $timeto + time();
$unick = getnick_uid($who);
$res = mysql_query("INSERT INTO ibwf_penalties SET uid='".$who."', penalty='".$pid."', exid='".getuid_sid($sid)."', timeto='".$ptime."', pnreas='".mysql_escape_string($pres)."', ipadd='".$uip."', browserm='".$ubr."'");
if($res)
{
mysql_query("UPDATE ibwf_users SET lastpnreas='".$pmsg[$pid].": ".mysql_escape_string($pres)."' WHERE id='".$who."'");
mysql_query("INSERT INTO ibwf_mlog SET action='penalties', details='[b]".getnick_uid(getuid_sid($sid))."[/b] $pmsg[$pid] The user [b]".$unick."[/b] For ".$timeto." Seconds', actdt='".time()."'");

echo "<img src=\"../images/ok.gif\" alt=\"O\"/>$unick is $pmsg[$pid] for $timeto Seconds";
}else{
echo "<img src=\"../images/notok.gif\" alt=\"X\"/>Database Error";
}
}
echo "

<a href=\"index.php?action=main&sid=$sid\"><img src=\"../images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "</p></body>";
}
djdeny Junior · 12 posts #4

QUOTE (rukiya @ Oct 17 2008, 02:25 PM) <{POST_SNAPBACK}>

It will conform to ban admins

so it will be

if(isadmin($who))

yes! 🙂 sorry, my mistake 😀 it will not happend again .. haha...

friend Developer · 112 posts #5

thanks djdeny and Rukiya for very important code. Thanks again 🙂

friend Developer · 112 posts #7

hellow super code master RUKIYA ...pls setup me code for quiz master...he/she have just power of share plusses or delete...Thanks Sir....Also pls djdeny

friend Developer · 112 posts #8

sorry double post becoz of slow site...i dont see here option to delete this reply.

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