$fullName = $_POST["fullName"]; $username = $_POST["username"]; $Password = $_POST["password"]; //$conPassword = $_POST["conPassword"]; $emailId = $_POST["emailId"]; $active = $_POST["active"]; $seq = $_POST["seq"]; $locationSeq = $_POST["l_DropDown"]; $otherLocations = $_POST["otherLocationSeqs"]; $user->setLocationSeq($locationSeq); $user->setIsManager(false); $user->setUserName($username); $user->setFullName($fullName); $encodedPassword = SecurityUtil::Encode($Password); $user->setPassword($encodedPassword); $user->setConfirmPassword(SecurityUtil::Encode($conPassword)); if (!empty($otherLocations)) { $user->setOtherLocationSeqs(explode(",", $otherLocations)); } $user->setEmailId($emailId); $user->setIsActive($active); $user->setSeq($seq); //------------------------validations--------------------------------- $messageText = ""; $div = ""; $messageText = validator::validateform("User Name", $username, 56, false); if ($locationSeq == 0) { $messageText .= "- Please Select Location<br>"; } $messageText .= validator::validateform("Password", $Password, 56, false); // if($Password != $conPassword){
if ($newPassword != $confirmNewPassword) { $messageText = "-New password and confirm password does not match"; } if ($savedPasswordDecoded != $earlierPassword) { if ($messageText != null && $messageText != "") { $messageText = $messageText . "<br/>" . "-Earlier Password does not match with the one in the database"; } else { $messageText = "-Earlier Password does not match with the one in the database"; } } } if ($messageText != null && $messageText != "") { $div = " <div class='ui-widget'>\n <div class='ui-state-error ui-corner-all' style='padding: 0 .7em;'>\n <p><span class='ui-icon ui-icon-alert' style='float: left; margin-right: .3em;'></span>\n <strong>Error during change password :</strong> <br/>" . $messageText . "</p>\n </div></div>"; } else { $user = new User(); $user->setPassword(SecurityUtil::Encode($newPassword)); $user->setSeq($userSeq); $userDataStore->updatePassword($user); //$configuration->saveConfig($configuration->adminPassword,$newPassword); $messageText = "Password updated successfully"; $div = "<div class='ui-widget'>\n <div class='ui-state-default ui-corner-all' style='padding: 0 .7em;'>\n <p><span class='ui-icon ui-icon-alert' style='float: left; margin-right: .3em;'></span>\n <strong>Message:</strong> " . $messageText . "</p>\n </div></div>"; } } ?> <!DOCTYPE html> <html> <head> <?php include "_jsAdminInclude.php"; ?>
if ($messageText == "") { if ($newPassword != $confirmNewPassword) { $messageText = "-New password and confirm password does not match"; } if ($oldPassword != $earlierPassword) { if ($messageText != null && $messageText != "") { $messageText = $messageText . "<br/>" . "-Earlier Password does not match with the one in the database"; } else { $messageText = "-Earlier Password does not match with the one in the database"; } } } if ($messageText != null && $messageText != "") { $div = StringUtils::getMessage("Change Passowrd", $messageText, true); } else { $newPassword = SecurityUtil::Encode($newPassword); $user->setPassword($newPassword); $UDS->updatePassword($user); $messageText = "Password updated successfully"; $div = StringUtils::getMessage("", $messageText, false); } } ?> <!DOCTYPE html> <html> <head> </head>
<?php require_once 'IConstants.inc'; require $ConstantsArray['dbServerUrl'] . "DataStoreMgr/UserDataStore.php"; $div = ""; if ($_POST["submit"] != "") { $username = $_POST["username"]; $password = $_POST["password"]; $password = SecurityUtil::Encode($password); $UDS = UserDataStore::getInstance(); $manager = $UDS->FindManagerByUsernamePassword($username, $password); if ($manager != NULL) { session_start(); $arr = new ArrayObject(); $arr['username'] = $manager->getUserName(); $arr['seq'] = $manager->getSeq(); $arr['locSeq'] = $manager->getLocationSeq(); $_SESSION["managerSession"] = $arr; header("Location:managerTabs.php"); $msg = "Welcome"; } else { $msg = "-Invalid Password"; $div = "<div class='ui-widget'>\n <div class='ui-state-error ui-corner-all' style='padding: 0 .7em;'> \n <p><span class='ui-icon ui-icon-alert' style='float: left; margin-right: .3em;'></span> \n <strong>Error During Admin login :</strong> <br/>" . $msg . "</p>\n </div></div>"; } } ?> <!DOCTYPE html> <html> <head> <link type="text/css" href="css/cupertino/jquery-ui-1.8.14.custom.css" rel="stylesheet" />