文章目录

  • 目录
  • 一、系统设计
  • 二、系统实现
  • 源文件

目录

一、系统设计

不知不觉互联网已经走入了寻常百姓的生活中,几年前还是以高新科技的面目出场的电脑,早已成为了日常家用电器了,高贵的“拨号上网小姐”也被和蔼的“ADSL先生”给征服了。生活在互联网时代的人们,也改变了数以千年的获取信息的途径,书本在生活中的地位每况愈下,据统计现代人大约70%的信息量是从网络上得来的,传统的书本只占了20%的信息量。特别是我们这伴着互联网长大的这一带,上网已经成为我们生活中必须品了。

随着我们学校与xxx学院的合并,xx学院的诞生,信电系的专业和学生的数量的猛增,在网络上开通一个师生的交流平台就显得日益重要了。在这种情况下,为了更好的服务广大师生,同时也能使我们自己在学校里三年所学的专业知识能学以致用,我们将我们的毕业课题设定为了信电系网站的开发。

二、系统实现

互联网作为信息双向交流和通讯的工具,已经成为商家青睐的传播媒介,被称之为继广播、报纸、杂志、电视后的第五种媒体–数字媒体。

学校网站是学校的"商标",每一所学校都有自己的特色,每一所学校都有自己的个性。在这个高度信息化的社会里,建立自己学校网站是最直接的宣传手段。网站的超时空特性,不仅能让地区内的人们了解学校,更可让世界了解你的学校。凭藉学校网站,学校就可成为教育百花园中一朵鲜艳的花朵。   学校网站是实现教育资源分配的桥梁网络有巨大的教育资源库,它集全社会的力量,使教育资源无限增长。这对于发达地区和欠发达地区,高投入学校和条件差的学校在获取教育资源的权力上达成平等,使每一位教师和学生都能均等的得到培训和受教育的机会,不再会受到学校水平、教材、教师能力的限制。不仅能极大的提高教学效率,而且能实现教育公平的社会理想。   学校网站能提供教学互动的全新方式学校网站使得教师与教师、教师与学生、学生与学生之间的交流有了全新的方式,它不再受到传统课堂的制约。它可以使广州与北京、城市与乡村的学校同处一室,共同讨论,共同共享。地理上的界限在这里模糊和消失了,学校网站是真正没有围墙的学校。   学校网站能够提供个性化学习的平台,不同的学生理解世界的方式各不相同,认知世界有诸多方式。网络提供的丰富资源可以使学生寻觅不同的教育方式,各取所需。学校网站允许不同的学生沿着自己的途径,按自己的速度接受教育与学习,学生将有机会享受最佳的教育机会,充分发掘自己的内在潜力,培植独特

的个性和人格。   学校网站是最佳的教学研究室,学校网站与教育类专门网站的有效链接,给学校教学研究带来了一片新天地,各种优秀教案、专家论坛、网络观摩课、各科素材、多媒体课件制作等内容为教师教研提供了极佳的平台。有效地降低教研成本、提高效率。

因此,建立信息电子工程系的网站是非常有必要的,本设计希望能给浏览者提供方便。并通过现代化网络手段,促进我系的管理和建设,加强系与师生之间的交流,增进我系和世界的相互了解,推进我系教学质量和管理水平的提高。


<?
require 'config.php';foreach($_POST as $k=>$v){
$$k=$v;
}
foreach($_GET as $k=>$v){
$$k=$v;
}if($submit){
if($user_name == $cfg[name] && md5($user_pass) == $cfg[pass]){
setcookie('name',$user_name,time()+1800);
setcookie('pass',$cfg[pass],time()+1800);
header("location:pub_news.php?type=$type");
exit();
}
else {
print'<script language=JavaScript>window.alert("密码或帐号错误!您无法进入管理或浏览有关数据。");</script>';}
}?>
<html>
<head><style>
<!--
td { font-size: 9pt; }
b  { color: #333333;}
h4 { color: #666666;}
input {font-size: 9.5pt;}
-->
</style>
</head>
<body background=images/bg.gif><div style="height:85%">
<center>
<p> </p>
<p><h3>管理员登录</h3>
<table border=0 cellspacing=0 width=680 cellpadding=0>
<tr>
<td width=15 bgcolor=#989898 valign=top>
<img border=0 src=floor_y_top.gif width=15 height=15></td>
<td bgcolor=#F2F2F2 width=665>
<form method="POST" action=login.php>
<table border=0 cellspacing=1 width=100%>
<tr>
<td align=center><br><h3><font color=red><?= $title ?></font></h3></td></tr>
<tr><td align=center>
<b>如果您有授权帐号和密码,请您登录;否则,请离开此页面。</b> </td></tr>
<tr>
<td align=center height=40>
<img src=ico_password.gif width=36 height="36" align=absmiddle>
管理员帐号:
<input name=user_name type=text style="width:150; height:20"> </td></tr>
<tr><td align=center>
<img width=36 height=0>管理员密码:<input name=user_pass type=password style="width:150; height:20"> </td></tr>
<tr><td align=center height=40>
<input name=type type=hidden value="<?=$type ?>">
<input name=submit type=submit value=" 登 录 "> </td></tr>
</table>
</form>
</td>
</tr>
<tr>
<td height=15 width=15>
<img border=0 src=images/floor_corner.gif width=15 height=15></td>
<td height=15 bgcolor=#E1E1E1 width=665 style="background-image; url('images/floor_x_top.gif');background-repeat:no-repeat;
background-position-x: right">
</td>
</tr>
</table></div><br><hr width=400 size="1">
</body>
</html>
这里的账号密码不是用数据库来链接的,而是用md5加密的,密码账号可以直接在配置文件页面的源代码中修改,其代码如下:
<?$cfg[name]='123';
$cfg[pass]='123';
$cfg[pass]= md5($cfg[pass]); // 密码用 md5 加密;
?>
⑵当输入的账号密码一致后,将跳转到新闻发布界面,由上述代码中的一段
header("location:pub_news.php?type=$type");页面将跳转到pub_news.php,然后可以直接发布新闻了,pub_news.php页面的代码如下
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>新闻发布</title><style type="text/css">
<!--
..opacity {FILTER: alpha(opacity=100)}
.a2:active {font-family: "宋体", "Arial";font-size: 9pt;color: #000000;text-decoration: none;
}
.a2:hover {color: #000000;
}
-->
</style>
<link href="11.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.tt {border-top-width: thin;border-right-width: thin;border-bottom-width: thin;border-left-width: thin;border-top-style: solid;border-right-style: none;border-bottom-style: none;border-left-style: none;border-top-color: cccccc;border-right-color: cccccc;border-bottom-color: cccccc;border-left-color: cccccc;
}
.s {font-family: "宋体";font-size: 9pt;color: #000000;text-decoration: none;line-height: 22px;
}
-->
</style>
<style type="text/css">
<!--
body {font-size: 9pt;color: #000000;
}
-->
</style>
<script language="JavaScript" type="text/JavaScript">
<!--function MM_reloadPage(init) {  //reloads the window if Nav4 resizedif(init==true)with(navigator){if ((appName=="Netscape")&&(parseInt(appVersion)==4)){document.MM_pgW=innerWidth;
document.MM_pgH=innerHeight; οnresize=MM_reloadPage; }}elseif(innerWidth!=document.MM_pgW||innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);function MM_preloadImages() { //v3.0var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}//-->
</script>
<script language="JavaScript">
function check()
{
if (window.document.form1.title.value=="")
{alert("请输入新闻的标题!");
document.form1.title.focus();
return false;
}
if (window.document.form1.detail.value=="")
{alert("请输入新闻的内容!");
document.form1.detail.focus();
return false;
}
return true;
}
</script></head><body background="image/bg.gif" topmargin="0">
<table width="70%" border="2" align="center" cellpadding="0ffffffffffffffff0f00" cellspacing="0" bordercolor="#329900">
<tr>
<td height="311"><table width="100%" height="186" border="0" align="center" cellpadding="0ffffffffffffffff0f00" cellspacing="0" bordercolor="#33AE1E">
<tr bgcolor="#FFFFFF">
<td height="118"> <table width="100%" height="106" border="1" align="center" cellpadding="0ffffffffffffffff0f00" cellspacing="0">
<tr>
<td background="image/top1.jpg">
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="747" height="120">
<param name="movie" value="15.swf" >
<param name="quality" value="high">
<embed src="15.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="747" height="120" wmode="transparent"></embed></object>
</td>
</tr>
</table></td>
</tr>
<tr bgcolor="#CCCCCC">
<td height="27"><table width="98%" height="21" border="0" cellpadding="0ffffffffffffffff0f00" cellspacing="0">
<tr>
<td align="center"> <font color="#0000FF">
<script language=JavaScript>
today=new Date();
function initArray(){
this.length=initArray.arguments.length
for(var i=0;i<this.length;i++)
this[i+1]=initArray.arguments[i]  }
var d=new initArray(
"  星期日",
"  星期一",
"  星期二",
"  星期三",
"  星期四",
"  星期五",
"  星期六");
document.write(
"<font color=#FF99CCstyle='font-size:9pt;font-family: 宋体'> ",
today.getYear(),"年",
today.getMonth()+1,"月",
today.getDate(),"日      ",
d[today.getDay()+1],
"</font>" );
</script>
<script language="JavaScript" fptype="dynamicanimation">
<!--
function dynAnimation() {}
function clickSwapImg() {}
//-->
</script>
</font><font color="#6666FF">
<script language="JavaScript1.2" fptype="dynamicanimation" src="animate.js">
</script>
&nbsp;&nbsp;</font><font size="3"> <a  class=a2 href="index1.php">首页</a>|
<a class=a2 href="xiqingjianjie.php">系情简介</a>| <a class=a2 href="zhuanyejianshe.php">专业建设</a>|
<a class=a2 href="shiziduiwu.php">师资队伍</a>| <a class=a2 href="rencaipeiyang.php">人才培养</a>|
<a class=a2 href="zhaoshengjiuye.php">招生就业</a>| <a class=a2 href="keyanjiaogai.php">科研教改</a>|
<a class=a2 href="xueshengsizheng.php">学生思政</a>| <a class=a2 href="xiazaizhongxin.php">下载中心</a>|
<a class=a2 href="shiyanshe.php">实验室</a> </font></td>
</tr>
</table></td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="23"><font face="楷体_GB2312" color="#000000"><b> &nbsp; &nbsp;</b></font></td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="18" align="center">
<p>&nbsp;</p>
<table width="100%" height="582" border="0">
<form name="form1" method="post" action="pubnews_ok.php" onSubmit=" return check();">
<tr>
<td  height="18"  bgcolor="#CCCCCC">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font size="+2">发布新闻</font></td>
</tr>
<tr>
<td height="18">&nbsp;</td>
</tr>
<tr>
<td height="169"><table width="90%" border="0" cellspacing="1" cellpadding="1" align="center">
<tr>
<td> 标题:</td>
</tr>
<tr>
<td> <input type="text" name="title" size="70"> </td>
</tr>
<tr>
<td> 详细内容:</td>
</tr>
<tr>
<td height="246">
<textarea name="detail" cols="70" rows="25"></textarea>
</td>
</tr>
<tr>
<td height="83"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<input type="submit" name="pub" value="发布">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<input type="reset" name="Submit" value="重写"> </td>
</tr>
</table></td>
</tr></form>
</table>
<p><a href="mailto:Copyright@2005"><font color="#000000">C</font><span style="text-decoration:none">
<font color="#000000">copyright&copy;2005</font></span></a>
衢州学院(筹)信息与电子工程系</p>
<p>&nbsp;</p>
</td>
</tr>
</table></td>
</tr>
</table>
</body>
</html>
这个页面主要使用表单来完成制作了,注意源代码action="pubnews_ok.php",发布后点提交后将跳转到pubnews_ok.php页面。
⑶pub_ok.php页面的代码如下:<?php  include "common_news.php"; ?><html><head><title>新闻发布</title></head><body bgcolor=#cccccc><?phpif ($pub){$title=htmlspecialchars($title);$detail=htmlspecialchars($detail);$detail= str_replace ( "\n","<br>", $detail);$pub_time=date("m")."-".date("d");$query="insert into news (title,detail,pub_time) values('$title','$detail','$pub_time')";
$result=mysql_query($query);
echo "<div align='center'>";
if ($result){
echo "<p>发布成功!</p>";
header ("Location: news.php");
}
else{
echo mysql_error();
echo "<p>发布失败!</p>";
}
echo "</div>";
}?></body></html>
当新闻顺利发布时,页面就会显示“发布成功”,否则显示“发布失败”,发布成功以后网页自动会跳转到到news.php页面。
⑷在news页面中,设置了新闻超过8条则自动换页的功能,源代码如下:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>信电之窗</title><style type="text/css">
<!--
..opacity {FILTER: alpha(opacity=100)}
.a2:active {font-family: "宋体", "Arial";font-size: 9pt;color: #000000;text-decoration: none;
}
.a2:hover {color: #000000;
}
-->
</style>
<link href="11.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.tt {border-top-width: thin;border-right-width: thin;border-bottom-width: thin;border-left-width: thin;border-top-style: solid;border-right-style: none;border-bottom-style: none;border-left-style: none;border-top-color: cccccc;border-right-color: cccccc;border-bottom-color: cccccc;border-left-color: cccccc;
}
.s {font-family: "宋体";font-size: 9pt;color: #000000;text-decoration: none;line-height: 22px;
}
-->
</style>
<style type="text/css">
<!--
body {font-size: 9pt;color: #000000;
}
-->
</style></head>
<body >
<table width="320" height="172" border="0" cellpadding="0" cellspacing="0"><?php
if($offset=="  ")
{$offset=0;
}
$connid=mysql_connect  ("localhost","","");
$sql="select title,pub_time from news order by id desc limit $offset,8";
$result=mysql_db_query("db_news",  $sql);
$num=mysql_num_rows($result);
if ($num != 0)
{
while($r=mysql_fetch_array($result))
{ $id=$r["id"];
$ftitle=$r["title"];
$ftime=$r["pub_time"];
echo "<tr>
<td width=20  bgcolor=#C2E0A5 align=center></td>";echo "<td  width=350 bgcolor=#C2E0A5>";echo "<a  href=news_detail.php?id=$id>";echo $ftitle;echo "</a></td><td width=150 bgcolor=#C2E0A5 align=center>";echo $ftime;echo "</td></tr>";}}?><tr> <td width=11 align=center></td><td width=291 ></td><td width=18 align=center> <?phpif ($offset !=0){$preoffset=$offset-8;echo "<a  href=\"news.php?offset=$preoffset\">前一页</a>&nbsp;&nbsp;&nbsp;&nbsp; \n";}if (($offset+8)< $num){$newoffset=$offset+8;echo "<a href=\"news.php?offset=$newoffset\">后一页</a> \n";}?></td></tr>
</table>
</body>
</html>这样,一个新闻发布系统的原理分析基本上结束了。

源文件

【毕业设计】PHP信电系网站建设设计(源代码+论文)相关推荐

  1. PHP信电系网站建设设计(源代码+论文)

    第一章 概述 1.1课题背景 互联网作为信息双向交流和通讯的工具,已经成为商家青睐的传播媒介,被称之为继广播.报纸.杂志.电视后的第五种媒体--数字媒体. 学校网站是学校的"商标" ...

  2. asp毕业设计——基于asp+sqlserver的个人网站建设设计与实现(毕业论文+程序源码)——个人网站建设

    基于asp+sqlserver的个人网站建设设计与实现(毕业论文+程序源码) 大家好,今天给大家介绍基于asp+sqlserver的个人网站建设设计与实现,文章末尾附有本毕业设计的论文和源码下载地址哦 ...

  3. 计算机毕业设计ssm庆阳红色旅游网站建设s237y系统+程序+源码+lw+远程部署

    计算机毕业设计ssm庆阳红色旅游网站建设s237y系统+程序+源码+lw+远程部署 计算机毕业设计ssm庆阳红色旅游网站建设s237y系统+程序+源码+lw+远程部署 本源码技术栈: 项目架构:B/S ...

  4. Java 电商订单管理设计,基于Java的电商网站的设计与实现

    基于Java的电商网站的设计与实现  (获取作品请联系在线客服) 温馨提示:已经在本站下定的(原创)毕业设计(毕业论文)将不会再次出售!请你放心购买! 拟定毕业论文(设计)题目基于Java的电商网站的 ...

  5. 电子商务商城系统开发方案:中大型交易类电商网站架构设计

    电子商务平台企业打造一个交易型电商网站,首先必须考虑几个基本要素:用户.电商平台商品.订单信息等,那么要能够支持一个电子商务网站平台打造完整交易过程就需要包括用户信息.商品数据的匹配过程.安全支付过程 ...

  6. java毕业设计基于的电商平台的设计与实现Mybatis+系统+数据库+调试部署

    java毕业设计基于的电商平台的设计与实现Mybatis+系统+数据库+调试部署 java毕业设计基于的电商平台的设计与实现Mybatis+系统+数据库+调试部署 本源码技术栈: 项目架构:B/S架构 ...

  7. java计算机毕业设计跨境电商网站源代码+数据库+系统+lw文档

    java计算机毕业设计跨境电商网站源代码+数据库+系统+lw文档 java计算机毕业设计跨境电商网站源代码+数据库+系统+lw文档 本源码技术栈: 项目架构:B/S架构 开发语言:Java语言 开发软 ...

  8. 保研经验(上交电子系、浙大信电系和中科院自动化所)

    保研经验(上交电子系.浙大信电系和中科院自动化所) 保研确认过去一个多月了,一直希望有机会静下心来总结一下.同时也希望对看我分享的同学有所帮助. 基本信息:东北某二流985(也有同学说末流,其实无所谓 ...

  9. java计算机毕业设计校园二手商品交易系网站源码+系统+数据库+lw文档+mybatis+运行部署

    java计算机毕业设计校园二手商品交易系网站源码+系统+数据库+lw文档+mybatis+运行部署 java计算机毕业设计校园二手商品交易系网站源码+系统+数据库+lw文档+mybatis+运行部署 ...

最新文章

  1. 好书 《古代的中医》 《麦肯锡卓越工作方法》
  2. C#字符串与unicode互相转换
  3. 计算机多媒体思政课,浅论多媒体教学手段在思政课教学中的运用
  4. 软件原型设计工具Axure RP安装教程
  5. python的unicode_python的unicode及其编码解码
  6. 推荐一款Java开发的精美个人博客
  7. python发送文件_Python实现基于HTTP文件传输实例
  8. FPGrowth算法总结复习
  9. 我猜,每个程序员对着电梯都想过调度算法吧
  10. Java第一章java语言的概述
  11. C语言 typedef 和 define 区别 - C语言零基础入门教程
  12. Golang实践录:生成版本号和编译时间
  13. 多线程编程下单例模式与多例模式的使用总结
  14. AIR是什么?.air文件如何打开?flex如何运行air文件
  15. winrar 4.20 注册码
  16. 高校成绩管理数据库系统的设计与实现
  17. acme + acme-dns + google domains 签发泛域名证书
  18. matlab 无穷符号,如何用matlab进行级数或数列的符号求和?matlab符号求和指令分享...
  19. php不显示notice,解决PHP显示Warning和Notice等问题
  20. 房天下全国658个城市新房,二手房爬取

热门文章

  1. java reduce的用法_使用reduce
  2. 推荐COOLSHELL
  3. bat脚本对文件目录的复制和移动
  4. Cocos2d-x 3.x 图形学渲染系列二
  5. 趣图:你永远不知道前端在对你的接口做什么
  6. python图像相乘运算_MATLAB:图像乘除法运算(immultiply、imdivide函数),同时比较双精度类型图像运算结果...
  7. VRRP+track
  8. WebService(3)——使用免费的天气预报WebService
  9. 【基础一】二极管为何能稳压?
  10. dovecot MySQL配置_dovecot+mysql配置及搭建邮件云服务器方法