<?php include_once "common/database.php"; $pageTitle = "Your Account"; if (isset($_SESSION['LoggedIn']) && $_SESSION['LoggedIn'] == 1) { include_once "common/header.php"; include_once "common/sidebar.php"; include_once '../inc/class.users.inc.php'; $users = new MarktPlatzUsers($db); $user_data = new MarktPlatzUsers($db); if (isset($_GET['email']) && $_GET['email'] == "changed") { echo "<div id='main'><div class='message good'>Your email address " . "has been changed.</div>"; } else { if (isset($_GET['email']) && $_GET['email'] == "failed") { echo "<div id='main'><div class='message bad'>There was an error " . "changing your email address.</div>"; } else { if (isset($_GET['password']) && $_GET['password'] == "changed") { echo "<div id='main'><div class='message good'>Your password " . "has been changed.</div>"; } elseif (isset($_GET['password']) && $_GET['password'] == "nomatch") { echo "<div id='main'><div class='message bad'>The two passwords " . "did not match. Try again!</div>"; } else { if (isset($_GET['data']) && $_GET['data'] == "changed") { echo "<div id='main'><div class='message good'>Your data " . "has been changed.</div>"; } elseif (isset($_GET['data']) && $_GET['data'] == "failed") { echo "<div id='main'><div class='message bad'>There was an error " . "changing your data.</div>"; } else { if (isset($_GET['delete']) && $_GET['delete'] == "failed") { echo "<div id='main'><div class='message bad'>There was an error " . "deleting your account.</div>"; } else { echo "<div id='main'>"; }
<?php include_once "common/database.php"; $pageTitle = "Register"; include_once "common/header.php"; if (!empty($_POST['username'])) { include_once "inc/class.users.inc.php"; $users = new MarktPlatzUsers($db); echo $users->createAccount(); } else { ?> <div id="main"> <div class="content"> <h2>Registrieren</h2> <form id="form" method="post" action="register.php"> <p><label for="username">Username</label><input id="username" name="username" /></p> <p><label for="prename">Vorname</label><input id="prename" name="prename" /></p> <p><label for="surname">Nachname</label><input id="surname" name="surname" /></p> <p><label for="firm">Firma</label><input id="firm" name="firm" /></p> <p><label for="street">Straße</label><input id="street" name="street" /></p> <p><label for="housenumber">Hausnummer</label><input id="housenumber" name="housenumber" /></p> <p><label for="plz">PLZ</label><input id="plz" name="plz" /></p> <p><label for="city">Stadt</label><input id="city" name="city" /></p>
<?php include_once "common/database.php"; $pageTitle = "Verify Your Account"; include_once "common/header.php"; if (isset($_GET['v']) && isset($_GET['e'])) { include_once "inc/class.users.inc.php"; $users = new MarktPlatzUsers($db); $ret = $users->verifyAccount(); } elseif (isset($_POST['v'])) { include_once "inc/class.users.inc.php"; $users = new MarktPlatzUsers($db); $ret = $users->updatePassword(); } else { header("Location: register.php"); exit; } if (isset($ret[0])) { echo isset($ret[1]) ? $ret[1] : NULL; if ($ret[0] < 3) { ?> <h2>Choose a Password</h2> <form method="post" action="accountverify.php"> <div> <label for="p">Choose a Password:</label> <input type="password" name="p" id="p" /><br /> <label for="r">Re-Type Password:</label> <input type="password" name="r" id="r" /><br />
<?php session_start(); include_once "../../inc/constants.inc.php"; include_once "../../inc/class.users.inc.php"; $userObj = new MarktPlatzUsers(); if (!empty($_POST['action']) && isset($_SESSION['LoggedIn']) && $_SESSION['LoggedIn'] == 1) { switch ($_POST['action']) { case 'changeemail': $status = $userObj->updateEmail() ? "changed" : "failed"; header("Location: ../accounts.php?email={$status}"); break; case 'changepassword': $status = $userObj->updatePassword() ? "changed" : "nomatch"; header("Location: ../accounts.php?password={$status}"); break; case 'change-user-data-submit': $status = $userObj->updateUserData() ? "changed" : "failed"; header("Location: ../accounts.php?data={$status}"); break; case 'deleteaccount': $userObj->deleteAccount(); break; default: header("Location: ../"); break; } } elseif ($_POST['action'] == "resetpassword") { if ($resp = $userObj->resetPassword() === TRUE) { header("Location: ../resetpending.php"); } else {
<?php include_once "common/database.php"; if (isset($_GET['v']) && isset($_GET['e'])) { include_once "inc/class.users.inc.php"; $users = new MarktPlatzUsers($db); $ret = $users->verifyAccount(); } elseif (isset($_POST['v'])) { include_once "inc/class.users.inc.php"; $users = new MarktPlatzUsers($db); $status = $users->updatePassword() ? "changed" : "failed"; header("Location: /accounts.php?password={$status}"); exit; } else { header("Location: /login.php"); exit; } $pageTitle = "Reset Your Password"; include_once "common/header.php"; include_once "common/sidebar.php"; if (isset($ret[0])) { echo isset($ret[1]) ? $ret[1] : NULL; if ($ret[0] < 3) { ?> <article id="main"> <div id="loginbox"> <form action="accountverify.php" method="post"> <fieldset> <legend>Login</legend>
include_once "common/database.php"; $pageTitle = "Login"; include_once "common/header.php"; if (!empty($_SESSION['LoggedIn']) && !empty($_SESSION['Username'])) { ?> <article id="main"> <div class="content"> <p>You are currently <strong>logged in.</strong></p> <p><a href="logout.php">Log out</a></p> <?php } elseif (!empty($_POST['username']) && !empty($_POST['password'])) { include_once 'inc/class.users.inc.php'; $users = new MarktPlatzUsers($db); if ($users->accountLogin() === TRUE) { echo "<meta http-equiv='refresh' content='0;./'>"; exit; } else { ?> <article id="main"> <div id="loginbox"> <form action="login.php" method="post"> <fieldset> <legend>Login</legend> <p> <label for="username">Username</label><br /> <input type="text" attribut="login" name="username" id="username" /> </p>