Location: PHPKode > projects > MyFWB - Faisal Shah's dition > MyFWB/includes/editor_new.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.
*/

$sid = session_id();
?>

<?php
if($_GET["action"] == "adding_new_page" && $_GET["securekey"] == $sid)
{
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
	<head>
		<title>Adding a new page in MyFWB based website.</title>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
		<meta name="robots" content="noindex, nofollow">
	</head>
	<body>
		<h1>Adding a new page in MyFWB based website...</h1>
		Welcome to new page adding wizard in MyFWB. Please select a valid name | Try to keep it as small as possible| and enter the content of page using the advanced WYSIWYG editor. And submit... Thanks for using MyFWB.
	
		<?php require_once("core_editor_new.php"); ?>
		
	</body>
</html>
<?php
}elseif($_GET["action"] == "added" && $_GET["sid"] == $sid)
{
if($_POST["pagetitle"] == "")
{
echo "<b> <font color=\"RED\">Nothing in page title field, Please insert a correct title / name... and try again....</font><b>";
require_once("core_editor_new.php");
}else
{
$sec1 = 1;
}
if($_POST["page_content"] == "")
{
echo "<br> <font color=\"RED\">Nothing in page content field.. Please insert correct value into your page Content using advanced WYSIWYG editor...</font></b>";
}else
{
$sec2 = 1;
}

$sec_final = $sec1 + $sec2;

if($sec_final == 2)
{

$connect = mysql_connect("$db_host","$db_user","$db_pass") or die("can't connect to DB");
mysql_select_db("$db_name") or die("can't select the DB");
$pagetitle = secure("$_POST[pagetitle]");
$page_content = page_content("$_POST[page_content]");

$query_write_page = mysql_query("insert into site (pagetitle, page_content) values ('$pagetitle','$page_content')");
echo "Page added successfully,<br> Now you can do several tasks, Return to Page management, or see <a target=\"_BLANK\" href=\"../\">your web-site</a>..<br> Thanks for using MyFWB...";
}
}
?>
Return current item: MyFWB - Faisal Shah's dition