Enable filtering in account.php
This commit is contained in:
27
account.php
27
account.php
@@ -20,20 +20,14 @@
|
|||||||
// application environment
|
// application environment
|
||||||
include("path.php");
|
include("path.php");
|
||||||
require(BASE."include/incl.php");
|
require(BASE."include/incl.php");
|
||||||
|
require(BASE."include/filter.php");
|
||||||
require(BASE."include/mail.php");
|
require(BASE."include/mail.php");
|
||||||
|
|
||||||
// set http header to not cache
|
// set http header to not cache
|
||||||
header("Pragma: no-cache");
|
header("Pragma: no-cache");
|
||||||
header("Cache-control: no-cache");
|
header("Cache-control: no-cache");
|
||||||
|
|
||||||
$aClean = array(); //array of filtered user input
|
// process command
|
||||||
|
|
||||||
// check command and process
|
|
||||||
if(!empty($_POST['sCmd']))
|
|
||||||
$aClean['sCmd'] = makeSafe( $_POST['sCmd'] );
|
|
||||||
else
|
|
||||||
$aClean['sCmd'] = makeSafe( $_GET['sCmd'] );
|
|
||||||
|
|
||||||
do_account($aClean['sCmd']);
|
do_account($aClean['sCmd']);
|
||||||
|
|
||||||
|
|
||||||
@@ -95,13 +89,7 @@ function retry($sCmd, $sMsg)
|
|||||||
*/
|
*/
|
||||||
function cmd_do_new()
|
function cmd_do_new()
|
||||||
{
|
{
|
||||||
$aClean = array(); //array of filtered user input
|
global $aClean;
|
||||||
|
|
||||||
$aClean['sUserEmail'] = makeSafe($_POST['sUserEmail']);
|
|
||||||
$aClean['sUserPassword'] = makeSafe($_POST['sUserPassword']);
|
|
||||||
$aClean['sUserPassword2'] = makeSafe($_POST['sUserPassword2']);
|
|
||||||
$aClean['sWineRelease'] = makeSafe($_POST['sWineRelease']);
|
|
||||||
$aClean['sUserRealname']= makeSafe($_POST['sUserRealname']);
|
|
||||||
|
|
||||||
if(!ereg("^.+@.+\\..+$", $aClean['sUserEmail']))
|
if(!ereg("^.+@.+\\..+$", $aClean['sUserEmail']))
|
||||||
{
|
{
|
||||||
@@ -159,9 +147,7 @@ function cmd_do_new()
|
|||||||
*/
|
*/
|
||||||
function cmd_send_passwd()
|
function cmd_send_passwd()
|
||||||
{
|
{
|
||||||
$aClean = array(); //array of filtered user input
|
global $aClean;
|
||||||
|
|
||||||
$aClean['sUserEmail'] = makeSafe($_POST['sUserEmail']);
|
|
||||||
|
|
||||||
/* if the user didn't enter any email address we should */
|
/* if the user didn't enter any email address we should */
|
||||||
/* ask them to */
|
/* ask them to */
|
||||||
@@ -217,10 +203,7 @@ function cmd_send_passwd()
|
|||||||
*/
|
*/
|
||||||
function cmd_do_login()
|
function cmd_do_login()
|
||||||
{
|
{
|
||||||
$aClean = array(); //array of filtered user input
|
global $aClean;
|
||||||
|
|
||||||
$aClean['sUserEmail'] = makeSafe($_POST['sUserEmail']);
|
|
||||||
$aClean['sUserPassword'] = makeSafe($_POST['sUserPassword']);
|
|
||||||
|
|
||||||
$oUser = new User();
|
$oUser = new User();
|
||||||
$iResult = $oUser->login($aClean['sUserEmail'], $aClean['sUserPassword']);
|
$iResult = $oUser->login($aClean['sUserEmail'], $aClean['sUserPassword']);
|
||||||
|
|||||||
Reference in New Issue
Block a user