Location: PHPKode > projects > php Blogger > confirm.php
<?php session_start();
/* * ********************************************************************
*  Copyright notice PHP Blogger 1.1.
*
*  (c) 2011 Predrag Rukavina - admin[at]phpblogger[dot]org
*  All rights reserved
*
*  This script is part of the PHP Blogger project. 
*  The PHP Blogger project is free software; you can redistribute it and/or
*  modify it under the terms of the GNU General Public License
*  as published by the Free Software Foundation; either version 2
*  of the License, or (at your option) any later version.
*
*  This program is distributed in the hope that it will be useful,
*  but WITHOUT ANY WARRANTY; without even the implied warranty of
*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
*  GNU General Public License for more details.
*
*  You should have received a copy of the GNU General Public License
*  along with this program; if not, write to the Free Software
*  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
*  MA  02110-1301, USA.
*
*  This copyright notice MUST appear in all copies of the script!
* ********************************************************************** */
##############################
# confirm.php    version 1.1.#
##############################
include ('settings.php');
require_once ('languages/lang_'.$language.'.php');
$smarty->display('blank.php');
if(@$_SESSION['INC_USER_ID'] == true) {
	echo "<div>Error.</div>";
        $smarty->display('footer.php');
	die();
}
$ccid = (int)$_GET['id'];
if($ccid == false) {
	echo "<center><div>No ID.</div></center></div>";
	$smarty->display('footer.php');
	die();
}
if(preg_match("/%/",$ccid)) {
	echo "<center><div>Error '%'</center></div>";
	$smarty->display('footer.php');
	die();
}
if(preg_match("/;/",$ccid)) {
	echo "<center><div>Error ';'</center></div>";
	$smarty->display('footer.php');
	die();
}
if(preg_match("/</",$ccid)) {
	echo "<center><div>Error '<'</center></div>";
	$smarty->display('footer.php');
	die();
}
if(preg_match("/\\[/",$ccid)) {
	echo "<center><div>Error '['</center></div>";
	$smarty->display('footer.php');
	die();
}
$arecordSet = $conn->Execute("SELECT * FROM users WHERE keysi = '".mysql_real_escape_string($ccid)."' && active = '".mysql_real_escape_string(0).
	"' LIMIT 1");
if($arecordSet) {
	if($arecordSet->fields == 0) {
		echo "Error.</div>";
                $smarty->display('footer.php');
		$recordSet->Close();
		$arecordSet->Close();
		$conn->Close();
		die();
	}
}
if($signupapp == 2) {
	$brecordSet = $conn->Execute("UPDATE users SET active = '".
		mysql_real_escape_string(1)."' WHERE active = '".mysql_real_escape_string(0).
		"' and keysi = '".mysql_real_escape_string($ccid)."' ");
	echo "<center><div id='info'>$lang[ACTREG] $sitetitle <a href=\"$sitepath/userpanel.php\">$lang[LOGLOGIN]</a></div></center>";
	}
if($signupapp == 1) {
	$brecordSet = $conn->Execute("UPDATE users SET active = '".
		mysql_real_escape_string(3)."' WHERE active = '".mysql_real_escape_string(0).
		"' and keysi = '".mysql_real_escape_string($ccid)."' ");
	echo "<center><div id='info'>$lang[PANREG] $sitetitle . $lang[PANWAT]</div></center>";
	}
?>
</div>
<?php
$smarty->display('footer.php');
$recordSet->Close();
$arecordSet->Close();
$brecordSet->Close();
$conn->Close();
?>
Return current item: php Blogger