1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-30 01:30:32 +02:00
This commit is contained in:
CaMer0n
2012-07-12 23:26:03 +00:00
parent f8b522a1aa
commit cf6d572dde
3 changed files with 63 additions and 11 deletions

View File

@@ -684,20 +684,20 @@ class users_admin_ui extends e_admin_ui
'user_login' => array('title' => LAN_USER_03, 'type' => 'text', 'width' => 'auto'), // Real name (no real vetting)
'user_customtitle' => array('title' => LAN_USER_04, 'type' => 'text', 'width' => 'auto'), // No real vetting
// 'user_password' => array('title' => LAN_USER_05, 'type' => 'text', 'width' => 'auto'), //TODO add md5 option to form handler?
'user_sess' => array('title' => 'session', 'type' => 'text', 'width' => 'auto'), // Photo
'user_sess' => array('title' => 'Session', 'type' => 'text', 'width' => 'auto'), // Photo
'user_image' => array('title' => LAN_USER_07, 'type' => 'text', 'width' => 'auto'), // Avatar
'user_email' => array('title' => LAN_USER_08, 'type' => 'text', 'width' => 'auto'),
'user_hideemail' => array('title' => LAN_USER_10, 'type' => 'boolean', 'width' => 'auto', 'thclass'=>'center', 'class'=>'center', 'filter'=>true, 'batch'=>true, 'readParms'=>'trueonly=1'),
'user_xup' => array('title' => 'Xup', 'type' => 'text', 'width' => 'auto'),
'user_class' => array('title' => LAN_USER_12, 'type' => 'userclass' , 'filter'=>true, 'batch'=>true),
'user_join' => array('title' => LAN_USER_14, 'type' => 'datestamp', 'width' => 'auto'),
'user_xup' => array('title' => 'Xup', 'type' => 'text', 'width' => 'auto'),
'user_class' => array('title' => LAN_USER_12, 'type' => 'method' , 'data' =>'text', 'filter'=>true, 'batch'=>true),
'user_join' => array('title' => LAN_USER_14, 'type' => 'datestamp', 'width' => 'auto', 'writeParms'=>'readonly=1'),
'user_lastvisit' => array('title' => LAN_USER_15, 'type' => 'datestamp', 'width' => 'auto'),
'user_currentvisit' => array('title' => LAN_USER_16, 'type' => 'datestamp', 'width' => 'auto'),
'user_comments' => array('title' => LAN_USER_17, 'type' => 'integer', 'width' => 'auto','thclass'=>'right','class'=>'right'),
'user_comments' => array('title' => LAN_USER_17, 'type' => 'int', 'width' => 'auto','thclass'=>'right','class'=>'right'),
'user_lastpost' => array('title' => 'Last Post', 'type' => 'datestamp', 'width' => 'auto'),
'user_ip' => array('title' => LAN_USER_18, 'type' => 'ip', 'width' => 'auto'),
// 'user_prefs' => array('title' => LAN_USER_20, 'type' => 'text', 'width' => 'auto'),
'user_visits' => array('title' => LAN_USER_21, 'type' => 'integer', 'width' => 'auto','thclass'=>'right','class'=>'right'),
'user_visits' => array('title' => LAN_USER_21, 'type' => 'int', 'width' => 'auto','thclass'=>'right','class'=>'right'),
'user_admin' => array('title' => LAN_USER_22, 'type' => 'boolean', 'width' => 'auto', 'thclass'=>'center', 'class'=>'center', 'filter'=>true, 'batch'=>true, 'readParms'=>'trueonly=1'),
'user_perms' => array('title' => LAN_USER_23, 'type' => 'method', 'width' => 'auto'),
'user_pwchange' => array('title' => LAN_USER_24, 'type'=>'datestamp' , 'width' => 'auto'),
@@ -724,7 +724,7 @@ class users_admin_ui extends e_admin_ui
$field = "user_".$row['user_extended_struct_name'];
$title = ucfirst(str_replace("user_","",$field));
$label = $tp->toHtml($row['user_extended_struct_text'],false,'defs');
$this->fields[$field] = array('title' => $label,'width' => 'auto','type'=>'text');
$this->fields[$field] = array('title' => $label,'width' => 'auto','type'=>'text', 'noedit'=>true);
}
}
@@ -1060,7 +1060,36 @@ class users_admin_form_ui extends e_admin_form_ui
}
return vartrue($bo[$curval],' '); // ($curval == 1) ? ADMIN_TRUE_ICON : '';
}
}
function user_class($curval,$mode)
{
if($mode == 'write')
{
$frm = e107::getForm();
return $frm->uc_select('user_class[]', $curval, 'admin,classes', 'description=1&multiple=1');
}
$e_userclass = new user_class;
$list = $e_userclass->uc_required_class_list("classes");
if($mode == 'filter')
{
return $list;
}
//FIXME userclasses are NOT be saved since they are an array.
//FIXME TODO - option to append userclass to existing value.
if($mode == 'batch')
{
$list['#delete'] = "(clear userclass)"; // special
return $list;
}
return $list[$curval];
}
function user_status($curval,$mode)