<?php session_start();
/* * ********************************************************************
* Copyright notice PHP Blogger 1.2.
*
* (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!
* ********************************************************************** */
include ('settings.php');
require_once ('languages/lang_'.$language.'.php');
$smarty->display('blank.php');
if(@$_SESSION['INC_USER_ID'] == true) {
echo "<div>Error.</div></div>";
$smarty->display('footer.php');
die();
}
$ccid = (int)@$_GET['id'];
if($ccid == false) {
echo "<div>No ID.</div></div>";
$smarty->display('footer.php');
die();
}
if(preg_match("/%/",$ccid)) {
echo "<div>Error '%'</div></div>";
$smarty->display('footer.php');
die();
}
if(preg_match("/;/",$ccid)) {
echo "<div>Error ';'</div></div>";
$smarty->display('footer.php');
die();
}
if(preg_match("/</",$ccid)) {
echo "<div>Error '<'</div></div>";
$smarty->display('footer.php');
die();
}
if(preg_match("/\\[/",$ccid)) {
echo "<div>Error '['</div></div>";
$smarty->display('footer.php');
die();
}
$arecordSet = $conn->Execute('SELECT * FROM users WHERE keysi = ? && active = ? LIMIT 1', array($ccid,0));
if($arecordSet) {
if($arecordSet->fields == 0) {
echo "<div>Error.</div></div>";
$smarty->display('footer.php');
$conn->Close();
die();
}
}
if($signupapp == 2) {
$zero = '1';
$zero2 = '0';
$sql = $conn->Prepare('UPDATE users SET active = ? WHERE active = ? and keysi = ? LIMIT 1');
if($conn->Execute($sql,array($zero,$zero2,$ccid)) === false) {
print '<br /><div id="error">error inserting[1]: '.$conn->ErrorMsg().'</div><br />';
}
if($conn->affected_rows() == 0) {
echo "<div id='error'>Error [3]</div></div>";
$smarty->display('footer.php');
$conn->Close();
die();
} else {
echo "<div id='info'>$lang[ACTREG] $sitetitle <a href='$sitepath/userpanel.php'>$lang[LOGLOGIN]</a></div></div>";
$smarty->display('footer.php');
$conn->Close();
die();
}
}
if($signupapp == 1) {
$zero = '3';
$zero2 = '0';
$sql = $conn->Prepare('UPDATE users SET active = ? WHERE active = ? and keysi = ? LIMIT 1');
if($conn->Execute($sql,array($zero,$zero2,$ccid)) === false) {
print '<br /><div id="error">error inserting[1]: '.$conn->ErrorMsg().'</div><br />';
}
if($conn->affected_rows() == 0) {
echo "<div id='error'>Error [4]</div></div>";
$smarty->display('footer.php');
$conn->Close();
die();
} else {
echo "<div id='info'>$lang[PANREG] $sitetitle. $lang[PANWAT]</div></div>";
$smarty->display('footer.php');
$conn->Close();
die();
}
}
?>
</div>
<?php
$smarty->display('footer.php');
$conn->Close();
##############################
# confirm.php version 1.1.6.#
##############################
?>