<?php
include("connect.php");
include("admin.cookie.php");
include("ckeditor/ckeditor.php") ;
$LeftLinkSection = 2;
$pagetitle="Static Page Management";
?>
<?php
$content = "";
$name = "";
$mode = "";
$id = 0;
$query = "";
$redirect = "";
if(isset($_REQUEST['id']))
{
$id = $_REQUEST['id'];
if($id > 0)
{
$id = $_REQUEST['id'];
$fetchquery = "select * from staticpage where id=".$id;
$result = mysql_query($fetchquery);
if(mysql_num_rows($result) > 0)
{
while($row = mysql_fetch_array($result))
{
$content = stripslashes($row['content']);
$name = stripslashes($row['name']);
}
}
}
}
if(isset($_REQUEST['Submit']))
{
$content = addslashes($_REQUEST['content']);
$query = "update staticpage set content='".$content."' where id=".$_REQUEST['id'];
$redirect = "<script language='javascript'>location.href='staticpage.php?id=".$_REQUEST['id']."&msg=1'</script>";
mysql_query($query) or die(mysql_error());
print $redirect;
}
?>
<HTML>
<HEAD><title><?=$SITE_TITLE; ?></title>
<SCRIPT language=javascript src="body.js"></SCRIPT>
<script language="javascript">
</script>
<META http-equiv=Content-Type content="text/html; charset=utf-8">
<META content="MSHTML 6.00.2600.0" name=GENERATOR>
<link rel="stylesheet" href="main.css" type="text/css">
</HEAD>
<BODY leftMargin=0 topMargin=0 marginheight="0" marginwidth="0">
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0 class="th-a">
<TR><TD height=60 colspan="2" bgColor=#FFCC33><? include("top.php") ?></td></TR>
<tr>
<td width="20%" valign="top"><? include("left.php"); ?></td>
<td width="80%" valign="top" height="480" bgcolor="#FFFFFF">
<TABLE cellSpacing=0 cellPadding=0 border=0 width="90%" align="center">
<TR><TD width="100%" class=h1> </TD></TR>
<TR><TD width="100%" class=H1><?=$pagetitle?></TD></TR>
<TR><TD background="images/vdots.gif"></TD></TR>
<tr><td class="a-l" height="30"><span style="color:#CC6600;">
<?php
$msg = $_REQUEST['msg'];
if($msg == 1)
echo "<span style='color:#CC6600;'>Page Updated Successfully.</span>";
?></span></td></tr>
<TR>
<TD>
<form action="staticpage.php" method="post" enctype="multipart/form-data" name="frm">
<input type="hidden" name="mode" id="mode" value="<?= $_REQUEST['mode']; ?>" >
<table width="100%" border="0" align="left" cellpadding="3" cellspacing="3" class="solidinput">
<tr>
<td class="H4" colspan="2" align="left"><?=$name?></td>
</tr>
<tr>
<td width="29%" align="right" class="f-c">
<?php
$ockeditor = new ckeditor('content') ;
$ockeditor->BasePath = 'ckeditor/';
$ockeditor->Value = $content;
$ockeditor->Height = 500;
$ockeditor->Create() ;
?>
</td>
</tr>
<tr>
<input type="hidden" value="<?=$_REQUEST["id"]; ?>" name="id">
<td align="center">
<input name="Submit" type="submit" class="bttn-s" value="Save" />
</td>
</tr>
</table>
<script language="javascript">
function gtg_check()
{
return true;
}
</script>
</form>
</TD>
</TR>
</TABLE>
</td>
</tr>
</TABLE>
</BODY></HTML>
Fri, 04/09/2010 - 18:41
#1
