Location: PHPKode > projects > PHP Enter > www/confirm.php
<?php  session_start();
if(@$_SESSION['INC_USER_ID'] == true){ echo"Error. Signin User";die();}
include('settings.php');
require_once('./languages/lang_'.$config['lang'].'.php');
$tmp = mysql_query("SELECT * FROM categori ORDER BY name ASC") 
or die("A MySQL error has occurred.<br />Your Query: " . $tmp . "<br /> Error: (" . mysql_errno() . ") " . mysql_error());
while ($aclrow = mysql_fetch_assoc($tmp))
{
$ccval[] = $aclrow;
}
$smarty->assign('path',$path);
$smarty->assign('title',$title);
$smarty->assign('temp',$temp);
$smarty->assign('categori', $ccval);
$smarty->display('blank.php');

$ccid = $_GET['id'];
$exp = $_GET['exp'];
$ccid = addslashes($ccid);
$exp = addslashes($exp);
$name=array($ccid,$exp);
foreach ($name as $name) 
{
if (ereg("^\.",$name)) {
echo "<center>Invalid Characters.</center>";  
 Die();
}
if (ereg("\<", $name)) {
echo "<center>Invalid Characters: <font color = \"red\"><strong><</strong></font> </center>";  
 Die();
}
if (ereg("\>", $name)) {
echo "<center>Invalid Characters: <font color = \"red\"><strong>></strong></font> </center>";  
 Die();
}
if (ereg("\[", $name)) {
echo "<center>Invalid Characters: <font color = \"red\"><strong>[</strong></font> </center>";  
 Die();
}
if (ereg("\]", $name)) {
echo "<center>Invalid Characters: <font color = \"red\"><strong>]</strong></font> </center>";  
 Die();
}}
$id = $ccid . "&exp=" . $exp;
$result = mysql_query("UPDATE users SET active = '" . mysql_real_escape_string(1) ."' WHERE active = '" . mysql_real_escape_string(0) ."' and keysi = '" . mysql_real_escape_string($id) ."' ");	
if (mysql_affected_rows() == 0) {
	echo ' Error Page 404!';
}else{
echo"<div style=\"padding:5px;font-family:arial;color:#555;\"><center>Successfully! <a href=\"link.php\">Login Page</a></center></div>";
}
?>
</div>
<?php $smarty->display('footer.php'); ?>
Return current item: PHP Enter