Location: PHPKode > projects > MyFWB - Faisal Shah's dition > MyFWB/index.php
<?php
session_start();
/*
MyFWB 1.0 Faisal Shah's édition 
23 August 2008 20:54 French standard time.
This is a free software made to be good for some one, and it comes as it is with no warrenty, and it's a copy righted Software which means you can use and distribute it to un-limited number of people but can't edit / re-produce or re-make any thing from it's core code, This software is free for ever and for everyone, but REMOVING COPYRIGHT FROM THE BOTTOM OF ANY PART OF IT MAKES IT ILLEGAL TO USE. IF YOU DO THIS, AND WE GOT THE REPORT, IT CAN CAUSE THE TERMINATION OF YOUR SITE AND SOME TIMES WE DO REPORT THESE KIND OF CASES TO YOUR ISP (INTERNET PROVIDER TO SHUT DOWN YOUR INTERNET CONNETION).. SO PLEASE KEEP IT LEGAL. Thanks for using our product!
(c)2008 Faisal Tasleem Shah All Rights Reserved.
*/

require_once("includes/configuration.php");
require_once("includes/core_functions.php");
if(file_exists("install/"))
{
echo "<div align=\"center\">

<table  width=\"50%\">
	<tr>
		<td><img src=\"images/logo.png\"><p><b>
		<font face=\"Euphemia\" color=\"#FF0000\">MyFWB found an error and can't 
		continue!</font></b></p>
		<p><b><font face=\"Euphemia\" color=\"#FF0000\">The details of error :</font></b></p>
		<p><i><font color=\"red\"><b>A very known error is found, your install 
		directory is still there and MyFWB can't continue it's process :(</b></font><br>
		<b>Possible reasons are, you haven't installed your copy of MyFWB yet? 
		If you just uploaded it and it's your first visit it's totally normal, 
		Please visit <a href=\"install/\">install script</a> to Install Now!</b><br>
		If you already installed and your sure you did successfully? Then using 
		your FTP of file manager you have to delete or rename your install/ 
		folder, this is done for sucurity reasons.. Please delete the install 
		folder and try accessing MyFWB again.. Thanks!</i><p align=\"right\">Powered by
		<a target=\"_blank\" href=\"http://myfwb.co.cc/\">
		<span style=\"text-decoration: none\">MyFWB 1.0</span></a>
		<font face=\"Times New Roman\">©2008
		<a target=\"_blank\" href=\"http://www.fsoft.co.cc\">
		<span style=\"text-decoration: none\">Faisal Shah!</span></a></i></td>
	</tr>
</table>

</div>
";
exit();
}
$connect = mysql_connect("$db_host","$db_user","$db_pass") or die("Can't connect to database server");
mysql_select_db("$db_name") or die("Can't select Database");
if($_SESSION["hit"] == "hitted")
{
//do nothing....
}else
{
$query_read_hit = mysql_query("select * from hits");
$old_hits = mysql_fetch_array($query_read_hit);
$old_hit_number = $old_hits['hits'];
$new_hit_write = $old_hit_number + 1;
$writing_back_new_hit = mysql_query("UPDATE `hits` SET `hits` = \"$new_hit_write\" WHERE `hitsid` =1");
$_SESSION["hit"] = "hitted";
}
$page_titles = mysql_query("select * from site");

$page_to_show = $_GET["page"];

if($page_to_show)
{

if(is_numeric("$page_to_show"))	
{
	
$page_get = $_GET["page"];
$get_page_back = mysql_query("select * from site where pageid=$page_get");
$core_check_query = mysql_query("select * from site where pageid=$page_get");
$core_check = mysql_fetch_array($core_check_query);
}else
{
echo "<font color=\"RED\">SECURITY WARNING: Invalid page id....</font>";
exit();
}
if($core_check == "")
{
echo "<b><font color=\"RED\">MyFWB found an error and have to STOP processing now!, <br> The error is that the page you are requesting is not available...<br>Please go <a href=\"?page=1\">here</a> and select a valid page...<br>Thanks and sorry for this problem...!";

exit();
}
else
{
//do nothing..
}
$query_path = mysql_query("select pagetitle from site where pageid=$page_get");
$page_extras = mysql_query("select name, pagetitle from site where pageid=$page_get");
$page_subject = mysql_fetch_array($page_extras);
$counter_getting = mysql_query("select hits from hits where hitsid=1");
$hit_counter_result = mysql_fetch_array($counter_getting);

}else
{
$get_page_back = mysql_query("select * from site where pageid=1");
$query_path = mysql_query("select pagetitle from site where pageid=1");
$page_extras = mysql_query("select name, pagetitle from site where pageid=1");
$page_subject = mysql_fetch_array($page_extras);
$counter_getting = mysql_query("select hits from hits where hitsid=1");
$hit_counter_result = mysql_fetch_array($counter_getting);
}
$logo =  "<img src=\"images/logo.png\">";
$_SESSION["access_template"] = "ok";
require_once("styles/default.php");
?>
Return current item: MyFWB - Faisal Shah's dition