<?php
session_start();
include("../dbconn.php");
if(!$_SESSION['cur_user'])
header("Location: ../login.php");
else
{
$result=mysql_query("select newsid,newstitle,newstime from news order by newstime desc");
?>
<!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=gb2312" />
<title>无标题文档</title>
<link rel="stylesheet" type="text/css" href="../css/style.css"/>
<script>
function openadd()
{
window.open("add.php","","width=600,height=400,toolbar=no,menubar=no");
}
function opendel(nid)
{
if(confirm("确定要删除此新闻吗?此操作不可恢复!"))
window.open("del.php?id="+nid,"","width=400,height=300,toolbar=no,menubar=no");
}
function openedit(nid)
{
window.open("edit.php?id="+nid,"","width=800,height=300,toolbar=no,menubar=no");
}
</script>
</head>
<body>
<table width="800" border="1" align="center">
<tr>
<td colspan="3" align="center">新闻发布系统 后台管理页面</td>
</tr>
<tr>
<td width="172"><div class="gray" id="aa"> <script type="text/javascript">setInterval("aa.innerHTML=new Date().toLocaleString();",1000);</script></div></td>
<td width="193" class="gray">当前登录用户:<?php echo $_SESSION['cur_user'];?>
<input type="button" name="button2" id="button2" value="退出" onclick="window.location.href='logout.php'"/></td>
<td width="113"><input type="submit" name="button" id="button" value="添加新闻" onclick="openadd()" /></td>
</tr>
<tr>
<td colspan="3">
<p> </p>
<table width="600" border="1" align="center">
<tr>
<td width="40">编号</td>
<td width="288">标题</td>
<td width="126">时间</td>
<td width="54">删除</td>
<td width="58">修改</td>
</tr>
<?php
while($row=mysql_fetch_row($result))
{
?>
<tr>
<td class="gray"><?php echo $row[0]?></td>
<td><?php echo $row[1]?></td>
<td class="gray"><?php echo $row[2]?></td>
<td><input type="button" name="button3" id="button3" value="删除" onclick="opendel(<?php echo $row[0] ?>)" /></td>
<td><input type="button" name="button4" id="button4" value="修改" onclick="openedit(<?php echo $row[0] ?>)"/></td>
</tr>
<?php
}
?>
</table>
<p> </p></td>
</tr>
</table>
<?php
}
?>
</body>
</html>
php+mysql 简单新闻发布管理系统
5星 · 超过95%的资源 需积分: 50 45 浏览量
2012-10-15
16:05:44
上传
评论 8
收藏 7KB RAR 举报
laoyaotask
- 粉丝: 130
- 资源: 12
最新资源
- 老飞飞搭建基础通用数据库V19数据库.rar
- jquery.js
- 机械设计多工位ACF贴胶带&预压设备sw18可编辑非常好的设计图纸100%好用.zip
- 基于Pytorch复现Point-Transformer,用于ShapeNet数据集点云分割
- 【医学影像分析】2D超声图像的分割检测(Ultrasound Nerve Segmentation - Kaggle数据集)
- 嘎嘎香的五款神仙谷歌插件
- .arch书源导入教程.mp4
- 贪心算法介绍及代码示例讲解
- CR13SP35MSI64 Crystal 水晶报表运行组件最后版本64位
- 图像分类数据集:玉米叶是否感染分类数据集(2分类,包含训练集、验证集)
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
- 1
- 2
- 3
- 4
- 5
前往页