/** * * @param \Member $member * @return String */ static function buildMemberFullNameString(\Member $member) { $name = ''; $title = $member->getTitle(); if ($title !== '') { $name = $title . ' '; } return $name . $member->getFirstName() . ' ' . $member->getLastName(); }
header("Location: ../user/index.php"); exit; } #**************************************************************************** #* Validate data #**************************************************************************** $mbrid = $_POST["mbrid"]; $mbr = new Member(); $mbr->setMbrid($_POST["mbrid"]); $mbr->setBarcodeNmbr($_POST["barcodeNmbr"]); $_POST["barcodeNmbr"] = $mbr->getBarcodeNmbr(); $mbr->setLastChangeUserid($_SESSION["userid"]); $mbr->setLastName($_POST["lastName"]); $_POST["lastName"] = $mbr->getLastName(); $mbr->setFirstName($_POST["firstName"]); $_POST["firstName"] = $mbr->getFirstName(); $mbr->setAddress($_POST["address"]); $_POST["address"] = $mbr->getAddress(); $mbr->setHomePhone($_POST["homePhone"]); $_POST["homePhone"] = $mbr->getHomePhone(); $mbr->setWorkPhone($_POST["workPhone"]); $_POST["workPhone"] = $mbr->getWorkPhone(); $mbr->setCel($_POST["cel"]); $_POST["cel"] = $mbr->getCel(); $mbr->setEmail($_POST["email"]); $_POST["email"] = $mbr->getEmail(); $mbr->setFoto($_POST["foto"]); $_POST["foto"] = $mbr->getFoto(); $mbr->setPassUser($_POST["passUser"]); $_POST["passUser"] = $mbr->getPassUser(); $mbr->setBornDt($_POST["bornDt"]);
} if (empty($pwd)) { $pwd_missing = "Enter Your Password"; header("Location: ../login.php?fp=0&uid={$uid}&pwd_missing={$pwd_missing}"); exit; } if (!empty($uid) && !empty($pwd)) { require_once BASE_PATH . "/classes/Member.php"; if (!Member::getUser($uid)) { $uid_err = "User Id Not Found"; header("Location: ../login.php?fp=0&uid={$uid}&uid_err={$uid_err}"); exit; } elseif (Member::checkPassword($uid) != ROT13($pwd)) { $pwd_err = "Wrong Password!"; header("Location: ../login.php?fp=0&uid={$uid}&pwd_err={$pwd_err}"); exit; } elseif (!$uid_err && !$pwd_err) { $Member = new Member($uid); $_SESSION["user_name"] = $Member->getFirstName(); $_SESSION["user_id"] = $Member->getUserID(); $_SESSION["user_image"] = $Member->getImage(); if (isset($_POST['keepme']) && $_POST['keepme']) { setcookie('user_name', $_SESSION["user_name"], time() + 60 * 60 * 24 * 365, '/'); setcookie('user_id', $_SESSION["user_id"], time() + 60 * 60 * 24 * 365, '/'); setcookie('user_image', $_SESSION["user_image"], time() + 60 * 60 * 24 * 365, '/'); } header('Location: ' . BASE_URL); exit; } } }
public static function calcHash(\Member $member) { return sha1($member->getFirstName() . $member->getLastName() . $member->getEmail() . uniqid() . microtime()); }
static function buildMemberFullNameString(\Member $member) { return $member->getTitle() . ' ' . $member->getFirstName() . ' ' . $member->getLastName(); }
<form class="form" enctype="multipart/form-data" name="UpdateInfo" method="post" action="<?php echo pure_it($_SERVER['PHP_SELF']); ?> "> <label for="NamePrefix">Name Prefix</label> <input type="text" id="NamePrefix" name="NamePrefix" placeholder="example: Md., Mr., Mohammed etc" value="<?php echo $NamePrefix ? $NamePrefix : $Member->getNamePrefix(); ?> "/> <label for="FirstName">*First Name</label> <input type="text" id="FirstName" name="FirstName" placeholder="First Name" value="<?php echo $FirstName ? $FirstName : $Member->getFirstName(); ?> " required /> <label for="LastName">*Last Name</label> <input type="text" id="LastName"name="LastName" placeholder="Last Name" value="<?php echo $LastName ? $LastName : $Member->getLastName(); ?> " required /> <label for="NickName">Nick Name</label> <input type="text" id="NickName" name="NickName" placeholder="Nick Name" value="<?php echo $NickName ? $NickName : $Member->getNickName(); ?>