$oper->email = $email; if (!empty($passA) && !empty($passB)) { if (strlen($passA) < 6) { throw new Exception('Password can not be shorter than six symbols', __LINE__); } if ($passA == $oper->username) { throw new Exception('Password can not be the same as the username', __LINE__); } if ($passA != $passB) { throw new Exception('Passwords entered are not the same', __LINE__); } $oper->password = sha1(stripslashes($passA)); } $oper->exp_date = $expd; // all good so far $oper->save_user($db); $success = true; } } catch (Exception $e) { $mesg = 'Attention: ' . $e->getMessage() . ' (' . $e->getCode() . ')<br>'; //unset($oper); } } $style = new OperPage('Edit Employee', $UUID, 'admin', 'editoper', $success ? "2; URL=editoper.php" : NULL); $style->Output(); if ($UUID) { if ($ACCESS < 400 && ($ACCESS < 50 || $ACCESS >= 200)) { echo '<h1>Access Denied</h1>'; } else { ?>