-ADD_DESCR("admin", basename(__FILE__));
-
-OPEN_TABLE("100%", "admin_content admin_content_align", "");
-if (!empty($_GET['u_id']))
-{
- $result_user = SQL_QUERY_ESC("SELECT status, sex, surname, family, email FROM "._MYSQL_PREFIX."_user_data WHERE userid=%s LIMIT 1",
- array(bigintval($_GET['u_id'])), __FILE__, __LINE__);
- $ACT = false;
- if (SQL_NUMROWS($result_user) == 1)
- {
- // User found
- list($status, $sex, $sname, $fname, $email) = SQL_FETCHROW($result_user);
- SQL_FREERESULT($result_user);
- if (empty($_GET['u_id']))
- {
- // Output selection form with all confirmed user accounts listed
- ADD_MEMBER_SELECTION_BOX();
- } elseif (!empty($_POST['lock'])) {
+addYouAreHereLink('admin', __FILE__);
+
+// Is a userid set?
+if (isGetRequestParameterSet('userid')) {
+ // Action not performed by default
+ $isActive = false;
+
+ // Load user's data
+ if (fetchUserData(getRequestParameter('userid'))) {
+ // Is a lock reason set?
+ if ((isFormSent('lock')) && (getUserData('status') != 'LOCKED')) {