<?php
include ('fckeditor/fckeditor.php');
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<META HTTP-EQUIV="imagetoolbar" CONTENT="no">
<title>ADMIN Mytime Inc</title>
<script type="text/javascript">
function DisplayContent( textid )
{
window.location.href = window.location.pathname + "?id=" + textid ;
}
function value ( valueid)
{
return valueid;
}
</script>
</head>
<body bgcolor="#FFFFFF">
<?php
include_once ('includes/mysql.php');
if (!isset($_GET['id'])){
$selectedPageId = 1;
}else{
$selectedPageId = "$_GET[id]";
}
$obj=new db();
$obj->connect();
$query = "SELECT * FROM info_table where page_id = $selectedPageId";
$result=$obj->query($query) or die(mysql_error());
while($newarray = $obj->fetch($result))
{
$page_id=$newarray['page_id'];
$title=$newarray['title'];
$breadcrumbs=$newarray['breadcrumbs'];
$text=$newarray['text'];
}
?>
Select Page<select name="content" onChange="DisplayContent(this.value);" >
<option value="0" selected>SelectPage</option>
<option value="1">Home</option>
<option value="2">Services</option>
<option value="3">About</option>
<option value="4">Contact</option>
<option value="5">Register</option>
<option value="6">Mission</option>
<option value="7">Board</option>
<option value="8">Donate</option>
<option value="9">Directions</option>
<option value="10">Future</option>
</select>
<form action="update_content.php" method="POST" >
<?php
$oFCKeditor = new FCKeditor('FCKeditor01') ;
$oFCKeditor->BasePath = 'http://localhost/MYTIME/fckeditor/' ;
$oFCKeditor->Value = $text;
$oFCKeditor->Create() ;
?>
<br>
<input type="submit" value="Submit">
</form>
</body>
</html>
Tue, 06/24/2008 - 00:55
#1
