Example #1
0
<?php

require_once '../lib/connections/db.php';
include '../lib/functions/functions.php';
checkLogin('1');
$id = 0;
if (isset($_GET['id'])) {
    if (is_numeric($_GET['id'])) {
        $id = strip_tags($_GET['id']);
        $id = secureInput($_GET['id']);
    }
}
$getuser = getUserRecords($id);
?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
	<title>Change User Password</title>
	<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8" />
	<meta name="description" content="" />
	<meta name="keywords" content="" />
	<meta name="robots" content="index, follow" />
	<link rel="shortcut icon" href="../favicon.ico" type="image/x-icon" />
	<link rel="stylesheet" type="text/css" href="../css/style.css" media="screen" />

	<script type="text/javascript" src="../js/jquery-1.6.2.js"></script>
	<script type="text/javascript" src="../js/script.js"></script>
		<script type="text/javascript">
			$(document).ready(function(){
		
				$('#updatepassForm').submit(function(e) {
Example #2
0
<?php

require_once 'lib/connections/db.php';
include 'lib/functions/functions.php';
checkLogin('2');
$getuser = getUserRecords($_SESSION['user_id']);
?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
	<title>Edit <?php 
echo $getuser[0]['username'];
?>
's Profile.</title>
	<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8" />
	<meta name="description" content="" />
	<meta name="keywords" content="" />
	<meta name="robots" content="index, follow" />
	<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
	<link rel="stylesheet" type="text/css" href="css/style.css" media="screen" />
	
	<script type="text/javascript" src="js/jquery-1.6.2.js"></script>
	<script type="text/javascript" src="js/script.js"></script>
	<script type="text/javascript">
		$(document).ready(function(){
	
			$('#editprofileForm').submit(function(e) {
				editprofile();
				e.preventDefault();	
			});
			
<?php

include_once 'functions.php';
require $this->template_path . 'config.php';
if (isset($_POST["btnSave"])) {
    $res = updateUser($_SESSION['user_id'], $_POST['emails'], $_POST["username"], $_POST["firstname"], $_POST["lastname"], $_POST["year"], $_POST["month"], $_POST["day"], $_POST["gender"], $_POST["add1"], $_POST["add2"], $_POST["city"], $_POST["state"], $_POST["zip"], $_POST["mobile"]);
    if ($res == 99) {
        $error = "Your personal information was updated. We hope you have an enjoyable auction experience with us.";
    } elseif ($res == 98) {
        //Errors during Update
        $error = "<div style='color:red;'>Email for updated personal information failed to be sent</div>";
    }
}
$email = $_SESSION['email'];
$user_data = getUserRecords($email);
$id = $user_data["id"];
$username = $user_data["username"];
$token = $user_data["token"];
$fname = $user_data["fname"];
$lname = $user_data["lname"];
$dob = $user_data["dob"];
list($year, $months, $day) = explode('-', substr($dob, 0, 10));
if ($months == 00) {
    $month = '';
}
if ($months == 01) {
    $month = 'January';
}
if ($months == 02) {
    $month = 'February';
}