<?php include $_SERVER['DOCUMENT_ROOT'] . "/classes/access_user/ext_user_profile.php"; $my_local_access = new Users_profile(); if (isset($_POST['Submit'])) { $my_local_access->save_login = isset($_POST['remember']) ? $_POST['remember'] : "no"; // use a cookie to remember the login $my_local_access->count_visit = true; // if this is true then the last visitdate is saved in the database $my_local_access->login_local($_POST['login'], $_POST['password']); // call the login method } $error = $my_local_access->the_msg; ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <title>Login page example</title> <style type="text/css"> <!-- label { display: block; float: left; width: 120px; } --> </style> </head> <body>
<?php include $_SERVER['DOCUMENT_ROOT'] . "/classes/access_user/ext_user_profile.php"; error_reporting(E_ALL); // I use this only for testing $update_profile = new Users_profile(false); // need to be false otherwise the redirect to this page will not work $update_profile->access_page($_SERVER['PHP_SELF'], $_SERVER['QUERY_STRING']); // protect this page too. if (isset($_POST['Submit'])) { if ($_POST['user_email'] == "" || $_POST['address'] == "" || $_POST['postcode'] == "" || $_POST['city'] == "") { $update_profile->the_msg = "Please fill the required fields."; } else { $update_profile->update_user($_POST['password'], $_POST['confirm'], $_POST['user_full_name'], $_POST['user_info'], $_POST['user_email']); // the update method $eu_date_field = !empty($_POST['field_two']) ? $_POST['field_two'] . "##eu_date" : $_POST['field_two']; // add the eu date field information ONLY if the field is not empty $update_profile->save_profile_date($_POST['id'], $_POST['language'], $_POST['address'], $_POST['postcode'], $_POST['city'], $_POST['country'], "", "", $_POST['homepage'], $_POST['notes'], $_POST['field_one'], $eu_date_field, $_POST['field_three']); } } ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <title>Update page example</title> <style type="text/css"> <!-- body { font:0.85em Arial, Helvetica, sans-serif; text-align:center;
<?php include $_SERVER['DOCUMENT_ROOT'] . "/classes/access_user/ext_user_profile.php"; error_reporting(E_ALL); // I use this only for testing $update_profile = new Users_profile(false); // need to be false otherwise the redirect to this page will not work $update_profile->access_page($_SERVER['PHP_SELF'], $_SERVER['QUERY_STRING']); // protect this page too. if (isset($_POST['Submit'])) { // if ($_POST['user_email'] == "" || $_POST['address'] == "" || $_POST['postcode'] == "" || $_POST['city'] == "") { // $update_profile->the_msg = "Please fill the required fields."; // } else { $update_profile->update_user($_POST['password'], $_POST['confirm'], $_POST['user_full_name'], "", $_POST['user_email']); // the update method // $eu_date_field = (!empty($_POST['field_two'])) ? $_POST['field_two']."##eu_date" : $_POST['field_two']; // add the eu date field information ONLY if the field is not empty // $update_profile->save_profile_date($_POST['id'], $_POST['language'], $_POST['address'], // $_POST['postcode'], $_POST['city'], $_POST['country'], "", "", // $_POST['homepage'], $_POST['notes'], $_POST['field_one'], $eu_date_field, $_POST['field_three']); $update_profile->save_profile_date($_POST['id'], "", $_POST['address'], $_POST['postcode'], $_POST['city'], $_POST['country'], "", "", $_POST['homepage'], "", "", "", ""); // } } ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <title>User profile</title> <link rel="stylesheet" type="text/css" href="/css/main.css"/>