You could also use this code in a element.
if (checkrights("M")) {
if (defined("iAUTH") && isset($_GET['aid']) && $_GET['aid'] == iAUTH) {
if (!isset($_GET['step'])) { $_GET['step'] = ""; }
if ($_GET['step'] == "activate") {
$result = dbquery("UPDATE ".DB_USERS." SET user_status = '0' WHERE user_status='2' AND user_id='".$_GET['user_id']."'");
redirect("index.php");
} else {
if ($_GET['step'] == "delete") {
$result = dbquery("DELETE FROM ".DB_USERS." WHERE user_id='".$_GET['user_id']."'");
redirect("index.php");
}
}
}
$result = dbquery("SELECT * FROM ".DB_USERS." WHERE user_status='2'");
if (dbrows($result)) {
openside($locale['global_015']);
$tab="<table width='100%' cellpadding='0' cellspacing='0'>";
while ($data = dbarray($result)) {
$tab .= "<tr><td align='left'>";
$tab .= "<div title='E-mail: ".$data['user_email']."'>".$data['user_name']."</div>";
$tab .= "</td><td align='right'>";
$tab .= "<a href='http://www.db.ripe.net/whois?form_type=simple&full_query_string=&searchtext=".$data['user_ip']."' target='_space'>";
$tab .= "<img src='".IMAGES."/icons/star.png' border='0' alt='Check Users IP Adress ".$data['user_ip']."' title='Check Users IP Adress ".$data['user_ip']."' /></a>";
$tab .= " <a href='".BASEDIR.$settings['opening_page'].$aidlink."&step=activate&user_id=".$data['user_id']."'>";
$tab .= "<img src='".IMAGES."/icons/greentick.png' border='0' alt='Activate User' title='Activate User' /></a>";
$tab .= " <a href='".BASEDIR.$settings['opening_page'].$aidlink."&step=delete&user_id=".$data['user_id']."'>";
$tab .= "<img src='".IMAGES."/icons/trashcan.png' border='0' alt='Delete User' title='Delete User' /></a>";
$tab .= "</td></tr>";
}
$tab .= "</table>";
echo $tab;
closeside();
}
}
The panel are only visibel when new user has to be activated and only for admins
Get the icons for this element HERE
original code
http://phpfusion....d_id=16410
|