<?php /** * sagarpatel * Date: 31-Mar-15 * Time: 12:28 PM */ include_once "classes/_user.php"; $login_request = new _user(); $login_request->_map_POST(); $db_user = new _user(); $answer = $db_user->_get_fdb_ref_username($login_request->getUsername()); if ($answer) { if (_user::cipher($login_request->getPassword()) == $db_user->getPassword()) { session_start(); session_set_cookie_params(30 * 60, "/", null, true); $_SESSION['uid'] = $db_user->getUid(); $_SESSION['username'] = $db_user->getUsername(); $_SESSION['qoffset'] = 0; header("Location: ../index.php"); die; } else { setcookie("status", "wrongpassword", time() + 3, "/"); header("Location: ../LoginRegistrationForm/login.php"); die; } } setcookie("status", "register", time() + 3, "/"); header("Location: ../LoginRegistrationForm/login.php#toregister"); die;
<input type="search" id="search-form" size="40" placeholder=" looking for something ?" /> </form> </li> <a href="index.php">home</a> <a href="scripts/logout.php" style="margin:20px 0 0 20%;padding-top:20px;">logout</a> </ul> </nav> <div id="initial-offseter"> <br /><br /><br /> </div> <div class="profile-block"> <div class="profile"> <span class="profile-description" ><span class="space" id="owner">@ <?php echo $user->getUsername(); ?> 's</span></span> </div> <br> <div class="prof-description"> <span id="owner_name">Name: <?php echo $user->getFirstname() . ' ' . $user->getLastname(); ?> </span> </div> <div class="prof-description"> <span id="owner_email">E-mail: <?php echo $user->getEmail(); ?>
?> "> <button class="btn btn-success btn-xs my-abuttonsapt"><span class="badge"><?php echo $ans->getApt(); ?> </span></button> <button class="btn btn-danger btn-xs my-abuttonsnotapt"><span class="badge"><?php echo $ans->getNotApt(); ?> </span></button> <?php $ansuser = new _user(); $ansuser->_get_fdb_ref_uid($ans->getAUid()); ?> <span class="answer-user">Answer by: <a href="profile.php?username=<?php echo $ansuser->getUsername(); ?> "><?php echo $ansuser->getUsername(); ?> </a> on <?php echo $ans->getATime(); ?> </span> </div> <?php } ?> </div> <div class="answer-question">