the code is below, coded by hypetype, took only couple minutes. jus follow the instructions...
thank ya. lol
<div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'>\\\\\\
THE SQL
\\\\\\\
-- --------------------------------------------------------
--
-- Table structure for table `ibwf_chatadmin`
--
CREATE TABLE `ibwf_chatadmin` (
`id` int(100) NOT NULL auto_increment,
`uid` int(100) NOT NULL default '0',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=8;
--
-- Dumping data for table `ibwf_chatadmin`
--
INSERT INTO `ibwf_chatadmin` (`id`, `uid`) VALUES
(1, 1);
\\\\\\\\\\\\\\\\\\\\
ADD THIS TO core.php
\\\\\\\\\\\\\\\\\\\\
////////////////////////////////////////////is chat admin
function ischatadmin($uid)
{
//$chatadmin = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_chatadmin WHERE uid='".$uid."'"));
if($chatadmin[0]>0)
{
return true;
}
}
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
ADD THIS TO chat.php (in action say2)
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
$uid = getuid_sid($sid);
$chatadmin = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_chatadmin WHERE uid='".$uid."'"));
if($chatadmin[0]>0)
{
echo "<a href=\"index.php?action=cadmin&sid=$sid&wh o=$who\">+Trash $unick</a>
";
}
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
ADD THIS TO admincp.php (in acui)
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
$cadmn = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_chatadmin WHERE uid='".$tid."'"));
if($cadmn[0]>0)
{
echo "<a href=\"admproc.php?action=delchat&sid=$sid& ;who=$tid\">»Disable Chat Admin</a>
";
}else{
echo "<a href=\"admproc.php?action=addchat&sid=$sid& ;who=$tid\">»Enable Chat Admin</a>
";
}
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
ADD THIS TO admproc.php
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
else if($action=="addchat")
{
$who = $_GET["who"];
echo "<card id=\"main\" title=\"$sitename\">";
echo "<p align=\"center\">";
echo "
";
$res = mysql_query("INSERT INTO ibwf_chatadmin SET uid='".$who."'");
if($res)
{
echo "<img src=\"images/ok.gif\" alt=\"O\"/>Chat Admin added successfully";
}else{
echo "<img src=\"images/notok.gif\" alt=\"X\"/>Error adding Chat Admin ";
}
echo "
<a href=\"admincp.php?action=chuinfo&sid=$sid\">" ;
echo "Users Info</a>
";
echo "<a href=\"index.php?action=admincp&sid=$sid\"><im g src=\"images/admn.gif\" alt=\"*\"/>";
echo "Admin CP</a>
";
echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "</p></card>";
}
else if($action=="delchat")
{
$who = $_GET["who"];
echo "<card id=\"main\" title=\"$sitename\">";
echo "<p align=\"center\">";
echo "
";
$res = mysql_query("DELETE FROM ibwf_chatadmin WHERE uid='".$who."'");
if($res)
{
echo "<img src=\"images/ok.gif\" alt=\"O\"/>Chat Admin deleted successfully";
}else{
echo "<img src=\"images/notok.gif\" alt=\"X\"/>Error deleting Chat Admin";
}
echo "
<a href=\"admincp.php?action=chuinfo&sid=$sid\">" ;
echo "Users Info</a>
";
echo "<a href=\"index.php?action=admincp&sid=$sid\"><im g src=\"images/admn.gif\" alt=\"*\"/>";
echo "Admin CP</a>
";
echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "</p></card>";
}
\\\\\\\\\\\\\\\\\\\\\
ADD THIS TO index.php
\\\\\\\\\\\\\\\\\\\\\
//////////////////////////////////chat tools
else if($action=="cadmin")
{
$who = $_GET["who"];
addonline(getuid_sid($sid),"Chat Admin Tools","index.php?action=online");
echo "<card id=\"main\" title=\"Chat Admin Tools\">";
echo "<p align=\"left\">";
$unick = getnick_uid($who);
echo "Trash $unick from chatrooms
Trash - this user cant type message in chatrooms
";
$uid = getuid_sid($sid);
$chatadmin = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_chatadmin WHERE uid='".$uid."'"));
if($chatadmin[0]>0)
{
$pen[0]="Trash $unick";
echo "Penalty: <select name=\"pid\">";
for($i=0;$i<count($pen);$i++)
{
echo "<option value=\"$i\">$pen[$i]</option>";
}
echo "</select>
";
echo "Reason: <input name=\"pres\" maxlength=\"100\"/>
";
echo "Days: <input name=\"pds\" format=\"*N\" maxlength=\"4\"/>
";
echo "Hours: <input name=\"phr\" format=\"*N\" maxlength=\"4\"/>
";
echo "Minutes: <input name=\"pmn\" format=\"*N\" maxlength=\"2\"/>
";
echo "Seconds: <input name=\"psc\" format=\"*N\" maxlength=\"2\"/>
";
echo "<anchor>Trash Now!";
echo "<go href=\"genproc.php?action=trash&sid=$sid\" method=\"post\">";
echo "<postfield name=\"who\" value=\"$who\"/>";
echo "<postfield name=\"pid\" value=\"$(pid)\"/>";
echo "<postfield name=\"pres\" value=\"$(pres)\"/>";
echo "<postfield name=\"pds\" value=\"$(pds)\"/>";
echo "<postfield name=\"phr\" value=\"$(phr)\"/>";
echo "<postfield name=\"pmn\" value=\"$(pmn)\"/>";
echo "<postfield name=\"psc\" value=\"$(psc)\"/>";
echo "</go></anchor>
";
}else{
echo "You are not a chat admin
";
}
echo "</p><p align=\"center\">";
$chs = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_chonline"));
echo "<a href=\"index.php?action=chat&sid=$sid\">Chatro oms($chs[0])</a>
";
echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "</p>";
echo "</card>";
}
\\\\\\\\\\\\\\\\\\\\\\\
ADD THIS TO genproc.php
\\\\\\\\\\\\\\\\\\\\\\\
else if($action=="trash")
{
$pid = $_POST["pid"];
$who = $_POST["who"];
$pres = $_POST["pres"];
$pds = $_POST["pds"];
$phr = $_POST["phr"];
$pmn = $_POST["pmn"];
$psc = $_POST["psc"];
echo "<card id=\"main\" title=\"Chat Admin Tools\">";
echo "<p align=\"center\">";
$uid = getuid_sid($sid);
$chatadmin = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_chatadmin WHERE uid='".$uid."'"));
if($chatadmin[0]>0)
{
$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(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='".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";
}
}
}else{
echo "You are not a chat admin
";
}
$chs = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_chonline"));
echo "<a href=\"index.php?action=chat&sid=$sid\">Chatro oms($chs[0])</a>
";
echo "
<a href=\"index.php?action=main&sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "</p></card>";
}</div>
thank ya. lol
<div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'>\\\\\\
THE SQL
\\\\\\\
-- --------------------------------------------------------
--
-- Table structure for table `ibwf_chatadmin`
--
CREATE TABLE `ibwf_chatadmin` (
`id` int(100) NOT NULL auto_increment,
`uid` int(100) NOT NULL default '0',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=8;
--
-- Dumping data for table `ibwf_chatadmin`
--
INSERT INTO `ibwf_chatadmin` (`id`, `uid`) VALUES
(1, 1);
\\\\\\\\\\\\\\\\\\\\
ADD THIS TO core.php
\\\\\\\\\\\\\\\\\\\\
////////////////////////////////////////////is chat admin
function ischatadmin($uid)
{
//$chatadmin = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_chatadmin WHERE uid='".$uid."'"));
if($chatadmin[0]>0)
{
return true;
}
}
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
ADD THIS TO chat.php (in action say2)
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
$uid = getuid_sid($sid);
$chatadmin = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_chatadmin WHERE uid='".$uid."'"));
if($chatadmin[0]>0)
{
echo "<a href=\"index.php?action=cadmin&sid=$sid&wh o=$who\">+Trash $unick</a>
";
}
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
ADD THIS TO admincp.php (in acui)
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
$cadmn = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_chatadmin WHERE uid='".$tid."'"));
if($cadmn[0]>0)
{
echo "<a href=\"admproc.php?action=delchat&sid=$sid& ;who=$tid\">»Disable Chat Admin</a>
";
}else{
echo "<a href=\"admproc.php?action=addchat&sid=$sid& ;who=$tid\">»Enable Chat Admin</a>
";
}
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
ADD THIS TO admproc.php
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
else if($action=="addchat")
{
$who = $_GET["who"];
echo "<card id=\"main\" title=\"$sitename\">";
echo "<p align=\"center\">";
echo "
";
$res = mysql_query("INSERT INTO ibwf_chatadmin SET uid='".$who."'");
if($res)
{
echo "<img src=\"images/ok.gif\" alt=\"O\"/>Chat Admin added successfully";
}else{
echo "<img src=\"images/notok.gif\" alt=\"X\"/>Error adding Chat Admin ";
}
echo "
<a href=\"admincp.php?action=chuinfo&sid=$sid\">" ;
echo "Users Info</a>
";
echo "<a href=\"index.php?action=admincp&sid=$sid\"><im g src=\"images/admn.gif\" alt=\"*\"/>";
echo "Admin CP</a>
";
echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "</p></card>";
}
else if($action=="delchat")
{
$who = $_GET["who"];
echo "<card id=\"main\" title=\"$sitename\">";
echo "<p align=\"center\">";
echo "
";
$res = mysql_query("DELETE FROM ibwf_chatadmin WHERE uid='".$who."'");
if($res)
{
echo "<img src=\"images/ok.gif\" alt=\"O\"/>Chat Admin deleted successfully";
}else{
echo "<img src=\"images/notok.gif\" alt=\"X\"/>Error deleting Chat Admin";
}
echo "
<a href=\"admincp.php?action=chuinfo&sid=$sid\">" ;
echo "Users Info</a>
";
echo "<a href=\"index.php?action=admincp&sid=$sid\"><im g src=\"images/admn.gif\" alt=\"*\"/>";
echo "Admin CP</a>
";
echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "</p></card>";
}
\\\\\\\\\\\\\\\\\\\\\
ADD THIS TO index.php
\\\\\\\\\\\\\\\\\\\\\
//////////////////////////////////chat tools
else if($action=="cadmin")
{
$who = $_GET["who"];
addonline(getuid_sid($sid),"Chat Admin Tools","index.php?action=online");
echo "<card id=\"main\" title=\"Chat Admin Tools\">";
echo "<p align=\"left\">";
$unick = getnick_uid($who);
echo "Trash $unick from chatrooms
Trash - this user cant type message in chatrooms
";
$uid = getuid_sid($sid);
$chatadmin = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_chatadmin WHERE uid='".$uid."'"));
if($chatadmin[0]>0)
{
$pen[0]="Trash $unick";
echo "Penalty: <select name=\"pid\">";
for($i=0;$i<count($pen);$i++)
{
echo "<option value=\"$i\">$pen[$i]</option>";
}
echo "</select>
";
echo "Reason: <input name=\"pres\" maxlength=\"100\"/>
";
echo "Days: <input name=\"pds\" format=\"*N\" maxlength=\"4\"/>
";
echo "Hours: <input name=\"phr\" format=\"*N\" maxlength=\"4\"/>
";
echo "Minutes: <input name=\"pmn\" format=\"*N\" maxlength=\"2\"/>
";
echo "Seconds: <input name=\"psc\" format=\"*N\" maxlength=\"2\"/>
";
echo "<anchor>Trash Now!";
echo "<go href=\"genproc.php?action=trash&sid=$sid\" method=\"post\">";
echo "<postfield name=\"who\" value=\"$who\"/>";
echo "<postfield name=\"pid\" value=\"$(pid)\"/>";
echo "<postfield name=\"pres\" value=\"$(pres)\"/>";
echo "<postfield name=\"pds\" value=\"$(pds)\"/>";
echo "<postfield name=\"phr\" value=\"$(phr)\"/>";
echo "<postfield name=\"pmn\" value=\"$(pmn)\"/>";
echo "<postfield name=\"psc\" value=\"$(psc)\"/>";
echo "</go></anchor>
";
}else{
echo "You are not a chat admin
";
}
echo "</p><p align=\"center\">";
$chs = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_chonline"));
echo "<a href=\"index.php?action=chat&sid=$sid\">Chatro oms($chs[0])</a>
";
echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "</p>";
echo "</card>";
}
\\\\\\\\\\\\\\\\\\\\\\\
ADD THIS TO genproc.php
\\\\\\\\\\\\\\\\\\\\\\\
else if($action=="trash")
{
$pid = $_POST["pid"];
$who = $_POST["who"];
$pres = $_POST["pres"];
$pds = $_POST["pds"];
$phr = $_POST["phr"];
$pmn = $_POST["pmn"];
$psc = $_POST["psc"];
echo "<card id=\"main\" title=\"Chat Admin Tools\">";
echo "<p align=\"center\">";
$uid = getuid_sid($sid);
$chatadmin = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_chatadmin WHERE uid='".$uid."'"));
if($chatadmin[0]>0)
{
$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(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='".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";
}
}
}else{
echo "You are not a chat admin
";
}
$chs = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_chonline"));
echo "<a href=\"index.php?action=chat&sid=$sid\">Chatro oms($chs[0])</a>
";
echo "
<a href=\"index.php?action=main&sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "</p></card>";
}</div>
Comment