Thread: TBVERSION_Sonic
View Single Post
  #25  
Old 17th December 2012, 18:51
wMan wMan is offline
Banned
 
Join Date: Feb 2008
P2P
Posts: 1,433
Default
and why ? its set up and working

@ userdetails
PHP Code:
  <td class=\"row1\" colspan=\"2\" align=\"left\"><input name=\"enabled\" value='yes' type=\"radio\"" . ($enabled ? " checked=\"checked\"" : "") . "/>Enabled <input name=\"enabled\" value='no' type=\"radio\"" . (!$enabled ? " checked=\"checked\"" : "") . "/>Disabled</td></tr>\n"); 
@modtask

PHP Code:
// Enable / Disable
if ((isset($_POST['enabled'])) && (($enabled = $_POST['enabled']) != $user['enabled']))
{
if (
$enabled == 'yes'){
$modcomment = gmdate("Y-m-d H:i") . " - Enabled by " . $CURUSER['username'] . ".\n" . $modcomment;

write_log("User: <b>" .$user['username']. "</b> | ID: <b>$userid</b> | Enabled. by " . $CURUSER['username'] . ".");

}else{
$reasond = $_POST["reasond"];
if(empty(
$reasond))
puke("You must enter a reason for disabling this user! - PS: This reason will show when he tries to login.");
$modcomment = gmdate("Y-m-d H:i") . " - Disabled by " . $CURUSER['username'] . ".\n" . $modcomment;

write_log("User: <b>" .$user['username']. "</b> | ID: <b>$userid</b> | Disabled. by " . $CURUSER['username'] . ". Reason: <b>$reasond</b>.");

}
$updateset[] = "enabled = " . sqlesc($enabled);
$updateset[] = "disable_reason = " . sqlesc($reasond);
} 
so why it is set up ready to use
Reply With Quote