Location: PHPKode > projects > PHP Simple FAQ > phpsimplefaq1.1beta/phpsimplefaq/manage_faq.php
<? 

// PHP Simple FAQ Manage page v1.0
include "config.inc.php"; 

$user_password_check = md5($password);
$sql_pass = "SELECT * 
			 FROM $database_name.$user_table 
			 WHERE user_email='$email'";
$result_pass = mysql_query($sql_pass,$connection);
$num = mysql_numrows($result_pass);
$pass_row = mysql_fetch_array($result_pass);
$user_password = $pass_row["user_password"];
if ($num == 0)

	{ 
		header ("Location: admin.php?error=notlisted");
	} elseif ($user_password != $user_password_check) {
		header ("Location: admin.php?error=badpass");
	}

if (!$php_simplefaq_email) 
			
	{ 
		$sql_pass1 = "SELECT * 
					  FROM $database_name.$user_table 
					  WHERE user_email='$email'";
		$result_pass1 = mysql_query($sql_pass1,$connection);
		$num1 = mysql_numrows($result_pass1);
		$pass_row1 = mysql_fetch_array($result_pass1);
		$user_md5 = $pass_row1["user_password"];
		$user_email = $pass_row1["user_email"];
		$user_name = $pass_row1["user_name"];
		$user_id = $pass_row1["user_id"];
		if ($num1 != 0) 
		
			{ 
				$user_md5 = md5($password);
				setcookie("php_simplefaq_email","$user_email",time()+6604800,"/","$absolute_url",0);
				setcookie("php_simplefaq_pass","$user_md5",time()+6604800,"/","$absolute_url",0);
				setcookie("php_simplefaq_name","$user_name",time()+6604800,"/","$absolute_url",0);
			}
	}

?>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<head>
	<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
	<title>Manage <? echo "$main_title"; ?></title>
	<link rel="stylesheet" type="text/css" href="main/style.css" />
</head>
<body>

<!-- Start Main Content -->													 

<!-- Manage the FAQs -->             
				
<?  

if ($action == "faq") 

	{
		include "includes/admin_faq.inc.php";				
	} 

?>

<!-- End Manage the FAQ -->	

<!-- Manage the categories -->

<?  

if ($action =="categories") 

	{
		include "includes/admin_category.inc.php";				
	} 

?>

<!-- End Manage the categories -->

<!-- Manage the questions -->

<?  

if ($action =="questions") 

	{
		include "includes/admin_question.inc.php";				
	} 

?>

<!-- End Manage the questions -->

<!-- Manage the answers -->

<?  

if ($action == "answers") 

	{
		include "includes/admin_answer.inc.php";
 	} 
 
?>

<!-- End Manage the answers -->

<!-- Manage the users -->

<?  

if ($action == "users") 

	{
		include "includes/admin_user.inc.php";
 	} 
 
?>

<!-- End Manage the users -->
								
<!-- End main content -->
<br>
<? include "includes/footer.inc.php"; ?>

</body>
</html>
Return current item: PHP Simple FAQ