} ?> <?php if ($formIsValid) { ?> <?php $repo = new \pnaika\finals\SqliteRepository(); $employeeDetails = new \pnaika\finals\Employee(); $employeeDetails->setEmployeeName($employeeName); $hashPassword = password_hash($password, PASSWORD_DEFAULT); $employeeDetails->setPassword($hashPassword); $employeeDetails->setEmpAddress($address); $employeeDetails->setEmpEmail($email); $employeeDetails->setEmpPhoneNumber($phoneNumber); $employeeDetails->setEmpLastUpdate($time); $repo->saveEmployee($employeeDetails); ?> <header></header> <div class="alert alert-success" role="alert"> <h2>EMPLOYEE PROFILE GOT CREATED!</h2> <h5>EMPLOYEE NEED TO ACCESS THEIR PROFILE WITH NEWLY CREATED USERNAME AND PASSWORD </h5> </div> <?php } else { ?> <header>CREATE NEW EMPLOYEE</header> <form action="employeeSignUp.php" method="POST" id="loginForm"> <input type="hidden" name="adminId" value="<?php print $adminId; ?> ">
$passwordErr = '<span style="color: #f00;">PASSWORD IS MANDATORY!</span>'; } ?> <?php if ($formIsValid) { ?> <?php $employee = $repo->getEmployeeById($_POST['employeeId']); $employee->setEmployeeName($employeeName); $hashPassword = password_hash($password, PASSWORD_DEFAULT); $employee->setPassword($hashPassword); $employee->setEmpAddress($address); $employee->setEmpEmail($email); $employee->setEmpPhoneNumber($phoneNumber); $employee->setEmpLastUpdate($time); $repo->saveEmployee($employee); ?> <!doctype html> <html lang="en"> <head> <meta charset="UTF-8"> <title>UPDATE EMPLOYEE PROFILE</title> <link rel="stylesheet" href="../style/style.css"> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> <link href='http://fonts.googleapis.com/css?family=Lora:400,700' rel='stylesheet' type='text/css'/> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css"/> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap-theme.min.css"/> <link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css"/> </head> <body> <a href="#"><img class="logo" src="../images/logo/gpsLogo.jpg" alt="CCS" title="GLOBAL PARKING SYSTEM"></a>