Psyduck - 可達鴨 之 鴨力山大 v0.1
Current File : /home/irplbiz/public_html/universalleather/admin/pages.php |
<?php
session_start();
include('includes/config.php');
if($_SESSION['loggedin']==1)
{
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link href="css/style.css" rel="stylesheet" type="text/css" />
<title>Welcome to Our Website::Admin Panel</title>
<script src="js/ajax.js"></script>
</head>
<?php
$msg = "";
if($_POST['Submit']=='Submit')
{
$sql = "UPDATE `".$ptr."pages` SET
`name` = '".$_POST['name']."',
`content` = '".addslashes($_POST['content'])."'
WHERE `id` = '".$_REQUEST['pageid']."'";
$ins = mysql_query($sql);
$msg = "Page details Edited Successfully";
echo "<script>window.location.href='pages.php';</script>";
}
?>
<body>
<div class="main">
<div class="inner-panel">
<table width="978" border="0" cellspacing="0" cellpadding="0" align="center" >
<?php include('includes/header.php'); ?>
<tr>
<td width="200"> </td>
<td align="right" width="10"> </td>
<td align="right" width="768"> </td>
</tr>
<tr>
<td width="200" valign="top"><?php include('includes/sidebar.php'); ?></td>
<td width="10" style="background-color:none;"> </td>
<td width="768" bgcolor="#FFFFFF" valign="top" align="right">
<table width="97%" border="0" align="left" cellpadding="0" cellspacing="0" bgcolor="#fff" style="padding:0px; margin:2px 10px;">
<tr>
<td align="center" style="color: green; font-weight: bold;">
<?php echo $msg; ?> </td>
</tr>
<tr>
<td colspan="4" style="background: url('../images/left_heading_bg.jpg') repeat-x scroll 0 0 rgba(0, 0, 0, 0); font-size:18px; color:#FFFFFF; padding:10px 0 10px 10px; margin-bottom:7px;"><span class="style3"> Content Management System</span></td></tr>
<tr><td><form action="" method="post" name="form" enctype="multipart/form-data">
<table width="100%">
<tr>
<td><table width="100%">
<tr>
<td style="border:1px dotted #ccc;"><span class="style3">CMS Page Name</span></td>
<td style="border:1px dotted #ccc;"><select name="name" id="name" onchange="javascript:get_page(this.value);">
<option value="">-select page name-</option>
<?php
$sql_new12 = "SELECT * FROM `".$ptr."pages` WHERE parent=0";
$rs_new12 = mysql_query($sql_new12);
while($row_new12 = mysql_fetch_array($rs_new12)) {
?>
<option value="<?php echo $row_new12['name'];?>"><?php echo $row_new12['name'];?></option>
<?php } ?>
</select></td>
</tr>
<tr id="page_content"></tr>
</table></td>
</tr>
</table>
</form>
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
</div>
</body>
</html>
<?php
}
else
{
header("location:index.php");
}
?>