Log Deleted User
Started on the old forum in January 2009 · view the original in the archive · old links redirect here
in ownercp add this to the code where delete user option is this wont get reproted to modcp but is more on the sly way of reporting to the site owner whos id is at number1
$who = $_GET["who"];
$whonick = getnick_uid($sid);
$byuid = getuid_sid($sid);
$unick=getnick_sid($sid);
$whonick = getnick_uid($who);
$user = getnick_sid($sid);
mysql_query("INSERT INTO ibwf_private SET text='[b]".$user."I deleted user $who)[/b][br/]".$pmtext."', byuid='".$byuid."', touid='1', timesent='".$tm."'");
If This Was Usefull Let Me Know...
External image (may be gone) External image (may be gone)
*****
**Dont Ask Me Dumb Questions.Or you'l get a Dumb Answer.. Want A Profesional Logo or Theme For Your wap site Pm Me.If I Have The Time Ill Make It For Free ***
ok this works finally lol after playing around with the code i found something that will work this will not only record the log into modlog but alert owner at id 1 with an inbox in owner tools replace this with below
else if($action=="delu")
{
$who = $_GET["who"];
$user = getnick_uid($who);
echo "<card id=\"main\" title=\"Owner Tools\">";
echo "<p align=\"center\">";
$uid = getuid_sid($sid);
$perm = mysql_fetch_array(mysql_query("SELECT perm FROM ibwf_users WHERE id='".$uid."'"));
$trgtperm = mysql_fetch_array(mysql_query("SELECT perm FROM ibwf_users WHERE name='".$user."'"));
$who = $_GET["who"];
$byuid = getuid_sid($sid);
$unick=getnick_sid($sid);
$whonick = getnick_uid($who);
$user = getnick_sid($sid);
$unick = getnick_uid($who);
$who = $_POST["who"];
$brws = explode(" ",$HTTP_USER_AGENT);
$ubr = $brws[0];
$uip = getip();
$time = time() + (17 * 60 * 60);
$newtime = date("H:i",$time);
$date = strtotime('+17 hours');
$newdate = date('D jS M y',$date);
$user = getnick_sid($sid);
$nick = getnick_sid($sid);
mysql_query("INSERT INTO ibwf_private SET text='".$nick." deleted [b].$whonick.[/b]".$pmtext."', byuid='".
mysql_query("INSERT INTO ibwf_mlog SET action='Ownercp Hack', details='
[u][b]".$user."[/b][/u]
[b]Attempted to get in Owner tools:[/b] $pwd
[b]Browser:[/b] $ubr
[b]IP:[/b] $uip
', actdt='".time()."'");
$byuid."', touid='1', timesent='".$tm."'");
if($trgtperm>$perm){
echo "[b]<img src=\"../images/notok.gif\" alt=\"x\"/>
Error!!!
Permission Denied...[/b]
";
echo "
U Cannot Delete $user
";
echo "<a href=\"home.php?action=main&sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
echo "</p>";
}else{
echo "
";
$res = mysql_query("DELETE FROM ibwf_buddies WHERE tid='".$who."' OR uid='".$who."'");
$res = mysql_query("DELETE FROM ibwf_gbook WHERE gbowner='".$who."' OR gbsigner='".$who."'");
$res = mysql_query("DELETE FROM ibwf_ignore WHERE name='".$who."' OR target='".$who."'");
$res = mysql_query("DELETE FROM ibwf_mangr WHERE uid='".$who."'");
$res = mysql_query("DELETE FROM ibwf_modr WHERE name='".$who."'");
$res = mysql_query("DELETE FROM ibwf_penalties WHERE uid='".$who."' OR exid='".$who."'");
$res = mysql_query("DELETE FROM ibwf_posts WHERE uid='".$who."'");
$res = mysql_query("DELETE FROM ibwf_private WHERE byuid='".$who."' OR touid='".$who."'");
$res = mysql_query("DELETE FROM ibwf_popups WHERE byuid='".$who."' OR touid='".$who."'");
$res = mysql_query("DELETE FROM ibwf_shouts WHERE shouter='".$who."'");
$res = mysql_query("DELETE FROM ibwf_topics WHERE authorid='".$who."'");
$res = mysql_query("DELETE FROM ibwf_brate WHERE uid='".$who."'");
$res = mysql_query("DELETE FROM ibwf_games WHERE uid='".$who."'");
$res = mysql_query("DELETE FROM ibwf_presults WHERE uid='".$who."'");
$res = mysql_query("DELETE FROM ibwf_vault WHERE uid='".$who."'");
$res = mysql_query("DELETE FROM ibwf_blogs WHERE bowner='".$who."'");
$res = mysql_query("DELETE FROM ibwf_chat WHERE chatter='".$who."'");
$res = mysql_query("DELETE FROM ibwf_chat WHERE who='".$who."'");
$res = mysql_query("DELETE FROM ibwf_chonline WHERE uid='".$who."'");
$res = mysql_query("DELETE FROM ibwf_online WHERE userid='".$who."'");
$res = mysql_query("DELETE FROM ibwf_ses WHERE uid='".$who."'");
$res = mysql_query("DELETE FROM ibwf_xinfo WHERE uid='".$who."'");
deleteMClubs($who);
$res = mysql_query("DELETE FROM ibwf_users WHERE id='".$who."'");
if($res)
{
echo "<img src=\"../images/ok.gif\" alt=\"O\"/>User deleted successfully";
}else{
echo "<img src=\"../images/notok.gif\" alt=\"X\"/>Error deleting UGroup";
}
echo "
<a href=\"ownercp.php?action=chuinfo&sid=$sid\">User info</a>
";
echo "
<a href=\"ownercp.php?action=ownercp&sid=$sid\"><img src=\"../images/admn.gif\" alt=\"\"/>Owner Tools</a>
";
echo "<a href=\"home.php?action=main&sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
}
echo "</p></card>";
}
External image (may be gone) External image (may be gone)
*****
**Dont Ask Me Dumb Questions.Or you'l get a Dumb Answer.. Want A Profesional Logo or Theme For Your wap site Pm Me.If I Have The Time Ill Make It For Free ***
didnt you notic the </card> tag at the end lol thats why you got the error its a wml page not xhtml
External image (may be gone) External image (may be gone)
*****
**Dont Ask Me Dumb Questions.Or you'l get a Dumb Answer.. Want A Profesional Logo or Theme For Your wap site Pm Me.If I Have The Time Ill Make It For Free ***
QUOTE (ozziemale31 @ Feb 1 2009, 09:58 PM) <{POST_SNAPBACK}>
didnt you notic the </card> tag at the end lol thats why you got the error its a wml page not xhtml
PMSL some ppl dont know how to copy and past
foreach ($_SERVER as $server => $value)
{
echo "$server is $value<br />";
}