Location: PHPKode > projects > Pointter PHP CMS > pointtercms_package/pointtercms_package/pointtercms/logincheck.php
<?php 

/***************************************************************************
 * Product Name			: Pointter PHP Content Management System
 * Version 			: V 1.2
 * Release Date			: 01/02/11
 * Copyright			: (C) 2011 PangramSoft / Murat Cevik
 * Program URL			: http://www.pointter.com
 * Company URL			: http://www.pangramsoft.com
 * Email Address                : hide@address.com
 
 ***************************************************************************/
 

/****************************************************************************

Pointter PHP Content Management System is licensed under Creative Commons Attribution Non-commercial No Derivatives 3.0 Unported (by-nc-nd) License.
To view a copy of this license, (a) visit http://creativecommons.org/licenses/by-nc-nd/3.0/ or (b) send a letter to Creative Commons, 171 2nd Street, 
Suite 300, San Francisco, California, 94105, USA.” 

You must not remove/modify/alter the copyright informations both visible and invisible forms in the source code and you must not remove/modify/alter 
the copyright informations in the footer part of the script including the Pointter image (png format file), hard link and title tag.

Please contact the copyright holder PangramSoft / Murat Cevik for a commercial license to remove the copyright information in the footer part of the script.


*****************************************************************************/

if (isset($_COOKIE[tuser]) OR isset($_COOKIE[tpass]))
header("location:index.php");

$tuser=htmlentities($_POST[tuser]);
$tpass=htmlentities($_POST[tpass]);

$tuser=trim($tuser);
$tpass=trim($tpass);

$tuser=strtolower($tuser);
$tpass=strtolower($tpass);

$encryptpass=md5($tpass);

include 'configset/conn.php';

//Mysql Injection  Control

$tuser=mysql_real_escape_string($tuser);
$encryptpass=mysql_real_escape_string($encryptpass);

$query=mysql_query("SELECT * FROM Members WHERE EmailAddress='$tuser' AND Password='$encryptpass' AND Active=1");
$count=mysql_num_rows($query);

if($count==1)
{
//Cookies Is Set For 1 Day
setcookie ("tuser",$tuser,time()+86400);
setcookie ("tpass",$encryptpass,time()+86400);
header("location:index.php");
}
else {
setcookie ("tuser","",time()-86400);
setcookie ("tpass","",time()-86400);
unset ($_COOKIE[tuser]);
unset ($_COOKIE[tpass]);
header("location:index.php");
}

?>

Return current item: Pointter PHP CMS