retrieve($_REQUEST['record']);
}
else
{
header("Location: index.php?module=Users&action=ListView");
}
if(isset($_REQUEST['isDuplicate']) && $_REQUEST['isDuplicate'] == 'true') {
$focus->id = "";
}
if(isset($_REQUEST['reset_preferences'])){
print_r($current_user->user_preferences);
$current_user->resetPreferences();
}
global $theme;
$theme_path="themes/".$theme."/";
$image_path=$theme_path."images/";
require_once($theme_path.'layout_utils.php');
$role = fetchUserRole($focus->id);
$rolename = getRoleName($role);
//the user might belong to multiple groups
if($focus->id != 1)
{
$group = fetchUserGroups($focus->id);
}
$log->info("User detail view");
$xtpl=new XTemplate ('modules/Users/DetailView.html');
$xtpl->assign("MOD", $mod_strings);
$xtpl->assign("APP", $app_strings);
$xtpl->assign("THEME", $theme);
$xtpl->assign("IMAGE_PATH", $image_path);$xtpl->assign("PRINT_URL", "phprint.php?jt=".session_id().$GLOBALS['request_string']);
$xtpl->assign("ID", $focus->id);
$xtpl->assign("USER_NAME", $focus->user_name);
$xtpl->assign("FIRST_NAME", $focus->first_name);
$xtpl->assign("LAST_NAME", $focus->last_name);
$xtpl->assign("STATUS", $focus->status);
$xtpl->assign("YAHOO_ID", $focus->yahoo_id);
$xtpl->assign("DATE_FORMAT", $focus->date_format);
if (isset($focus->yahoo_id) && $focus->yahoo_id !== "") $xtpl->assign("YAHOO_MESSENGER", "");
if ((is_admin($current_user) || $_REQUEST['record'] == $current_user->id)
&& isset($default_user_name)
&& $default_user_name == $focus->user_name
&& isset($lock_default_user_name)
&& $lock_default_user_name == true ) {
$buttons = "
| \n";
}
elseif (is_admin($current_user) || $_REQUEST['record'] == $current_user->id) {
$buttons = " | \n";
$buttons .= " | \n";
$buttons .= " | \n";
$buttons .= " | \n";
}
/* Forum Display/Hide Button
if($_REQUEST['forumDisplay'] == "true" || $displayForums == "true")
{
$buttons .= " | \n";
}
else
{
$buttons .= " | \n";
}
*/
if (is_admin($current_user))
{
$buttons .= " | \n";
//done so that only the admin user can see the customize tab button
if($_REQUEST['record'] == $current_user->id)
{
$buttons .= " | \n";
}
if($_REQUEST['record'] != $current_user->id)
{
$buttons .= " | \n";
}
//$buttons .= " | \n";
if($_SESSION['authenticated_user_roleid'] == 'administrator')
{
$buttons .= " | \n";
}
}
// $buttons .=" | ". $mod_strings['LBL_RESET_PREFERENCES']. " | ";
if (isset($buttons)) $xtpl->assign("BUTTONS", $buttons);
$xtpl->parse("main");
$xtpl->out("main");
if ((is_admin($current_user) || $_REQUEST['record'] == $current_user->id) && $focus->is_admin == 'on') {
$xtpl->assign("IS_ADMIN", "checked");
$xtpl->parse("user_settings");
$xtpl->out("user_settings");
}
$xtpl->assign("DESCRIPTION", nl2br($focus->description));
if(is_admin($current_user))
{
$xtpl->assign("ROLEASSIGNED","" .$rolename ."");
}
if(is_admin($current_user))
{
$xtpl->assign("GROUPASSIGNED","".$group."");
}
else
{
$xtpl->assign("GROUPASSIGNED",$group);
}
$xtpl->assign("TITLE", $focus->title);
$xtpl->assign("DEPARTMENT", $focus->department);
$xtpl->assign("REPORTS_TO_ID", $focus->reports_to_id);
$xtpl->assign("REPORTS_TO_NAME", $focus->reports_to_name);
$xtpl->assign("PHONE_HOME", $focus->phone_home);
$xtpl->assign("PHONE_MOBILE", $focus->phone_mobile);
$xtpl->assign("PHONE_WORK", $focus->phone_work);
$xtpl->assign("PHONE_OTHER", $focus->phone_other);
$xtpl->assign("PHONE_FAX", $focus->phone_fax);
$xtpl->assign("EMAIL1", $focus->email1);
$xtpl->assign("EMAIL2", $focus->email2);
$xtpl->assign("ADDRESS_STREET", $focus->address_street);
$xtpl->assign("ADDRESS_CITY", $focus->address_city);
$xtpl->assign("ADDRESS_STATE", $focus->address_state);
$xtpl->assign("ADDRESS_POSTALCODE", $focus->address_postalcode);
$xtpl->assign("ADDRESS_COUNTRY", $focus->address_country);
$xtpl->assign("SIGNATURE", $focus->signature);
$xtpl->parse("user_info");
$xtpl->out("user_info");
echo "\n";
?>