html_draw_bottom(); exit; } else { html_draw_error(gettext("Failed to clear user history"), 'admin_user.php', 'get', array('back' => gettext("Back")), array('uid' => $uid), '_self', 'center'); } } } else { if (isset($_POST['reset_passwd_submit'])) { if (!session::check_perm(USER_PERM_ADMIN_TOOLS, 0, 0)) { html_draw_error(gettext("You do not have permission to use this section."), 'admin_user.php', 'get', array('back' => gettext("Back")), array('uid' => $uid), '_self', 'center'); } if (isset($_POST['t_new_password']) && strlen(trim($_POST['t_new_password'])) > 0) { $t_new_password = trim($_POST['t_new_password']); if ($user_logon = user_get_logon($uid) && ($fuid = session::get_value('UID'))) { if (admin_reset_user_password($uid, $t_new_password)) { email_send_new_pw_notification($uid, $fuid, $t_new_password); html_draw_top("title={$page_title}", 'class=window_title'); html_display_msg(gettext("Change Password"), gettext("Successfully Changed Password"), 'admin_user.php', 'get', array('back' => gettext("Back")), false, '_self', 'center'); html_draw_bottom(); exit; } } html_draw_error(gettext("Failed To Change Password"), 'admin_user.php', 'get', array('back' => gettext("Back")), array('uid' => $uid), '_self', 'center'); } } else { if (isset($_POST['delete_user_confirm'])) { if (!session::check_perm(USER_PERM_ADMIN_TOOLS, 0, 0)) { html_draw_error(gettext("You do not have permission to use this section."), 'admin_user.php', 'get', array('back' => gettext("Back")), array('uid' => $uid), '_self', 'center'); } $delete_content = isset($_POST['delete_content']) && $_POST['delete_content'] == 'Y'; if (admin_delete_user($uid, $delete_content)) {
html_draw_bottom(); exit; } else { html_draw_error(gettext("Failed to clear user history"), 'admin_user.php', 'get', array('back' => gettext("Back")), array('uid' => $uid), '_self', 'center'); } } } else { if (isset($_POST['reset_passwd_submit'])) { if (!session::check_perm(USER_PERM_ADMIN_TOOLS, 0, 0)) { html_draw_error(gettext("You do not have permission to use this section."), 'admin_user.php', 'get', array('back' => gettext("Back")), array('uid' => $uid), '_self', 'center'); } if (isset($_POST['t_new_password']) && strlen(trim($_POST['t_new_password'])) > 0) { $t_new_password = trim($_POST['t_new_password']); if (($user_logon = user_get_logon($uid)) !== false) { if (admin_reset_user_password($uid, $t_new_password)) { email_send_new_pw_notification($uid, $_SESSION['UID'], $t_new_password); html_draw_top(array('title' => $page_title, 'class' => 'window_title', 'main_css' => 'admin.css')); html_display_msg(gettext("Change Password"), gettext("Successfully Changed Password"), 'admin_user.php', 'get', array('back' => gettext("Back")), array(), '_self', 'center'); html_draw_bottom(); exit; } } html_draw_error(gettext("Failed To Change Password"), 'admin_user.php', 'get', array('back' => gettext("Back")), array('uid' => $uid), '_self', 'center'); } } else { if (isset($_POST['delete_user_confirm'])) { if (!session::check_perm(USER_PERM_ADMIN_TOOLS, 0, 0)) { html_draw_error(gettext("You do not have permission to use this section."), 'admin_user.php', 'get', array('back' => gettext("Back")), array('uid' => $uid), '_self', 'center'); } $delete_content = isset($_POST['delete_content']) && $_POST['delete_content'] == 'Y'; if (admin_delete_user($uid, $delete_content)) {