Skip to content

Commit 9cf377a

Browse files
authored
Merge pull request #4 from l-x007/171491525林莉学
171491525林莉学
2 parents 9fdb6e9 + a0e1858 commit 9cf377a

24 files changed

+667
-0
lines changed

171491525林莉学/body.php

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
<div class="row hidden-xs">
2+
<div style="height:30px"></div>
3+
</div>
4+
5+
<div class="row">
6+
<div class="col-md-12 col-xs-12">
7+
<div style="text-align: center;">
8+
<img src="images/1.png" class="img-responsive center-block" width="50px" align="absmiddle" style="display: inline;">
9+
<h1 style="display: inline;vertical-align: middle;">垃圾分类查询</h1>
10+
<div style="font-size: 8px;color: red;display: inline;"></div>
11+
</div>
12+
</div>
13+
</div>
14+
<br>
15+
16+
17+
18+
<table width="778" border="0" cellspacing="0" cellpadding="2" align="center">
19+
<tr>
20+
<td>
21+
<?php
22+
include("left_seek.php");
23+
?>
24+
25+
</td>
26+
</tr>
27+
<tr>
28+
<td>
29+
<h1 align="left" style="color:#0066FF">新闻资讯</h1>
30+
<?php
31+
$sql = "Select * From bigclass where homepage";
32+
$rs=new com("adodb.recordset");
33+
$rs->open($sql,$db,1,1);//执行语句,返回记录集
34+
while(! $rs->eof)
35+
{
36+
$ccc=$rs->Fields("bigclassname")->value;
37+
$nnn=$rs->Fields("rmax")->value;
38+
$aaa=$rs->Fields("ad")->value;
39+
ad($ccc,$nnn,$aaa);
40+
$rs->MoveNext(); }
41+
$rs=NULL;
42+
?>
43+
44+
45+
</td>
46+
</tr>
47+
</table>

171491525林莉学/class_list.php

+68
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
<html>
2+
<head>
3+
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
4+
<title>新闻分类</title>
5+
<link href="css.css" rel="stylesheet" type="text/css">
6+
</head>
7+
8+
<body bgcolor="535353" topmargin="0" leftmargin="0">
9+
<?php
10+
11+
include("connlj.php");//$db
12+
include("top.php");
13+
$ccc=$_GET["cn"];
14+
?>
15+
16+
17+
<table width="778" border="0" cellspacing="0" cellpadding="2" align="center">
18+
<tr bgcolor="#00CC99">
19+
<th colspan="5"><?php echo $ccc?> </th>
20+
</tr>
21+
<tr bgcolor="#99FF00">
22+
<td width="44" align="center">nid</td>
23+
<td width="467" align="center">标题</td>
24+
<td width="85" align="center">作者</td>
25+
<td width="91" align="center">发布时间</td>
26+
<td width="71" align="center">点击率</td>
27+
</tr>
28+
29+
<?php
30+
$sql = "Select * From news where bigclassname='$ccc'";
31+
$rs=new com("adodb.recordset");
32+
$rs->open($sql,$db,1,1);//执行语句,返回记录集
33+
$rs->Pagesize=12;//设置每页记录行数
34+
$pg=isset($_GET["page"])?$_GET["page"]:"1";
35+
$rs->AbsolutePage=$pg;
36+
$rn =1 ;
37+
while((! $rs->eof)&&($rn<=$rs->Pagesize)){
38+
?>
39+
<tr bgcolor="#FFFFFF" height="35">
40+
<td><?php echo $rs->Fields("nid")->value; ?></td>
41+
<td><a href="news_disp.php?xwh=<?php echo $rs->Fields("nid")->value; ?>" target="_blank" title="<?php echo $rs->Fields("title")->value; ?>"><?php echo $rs->Fields("title")->value; ?></a></td>
42+
<td><?php echo $rs->Fields("user")->value; ?></td>
43+
<td><?php echo $rs->Fields("infotime")->value; ?></td>
44+
<td><?php echo $rs->Fields("hits")->value; ?></td>
45+
</tr>
46+
<?php
47+
$rs->MoveNext();
48+
$rn++;
49+
}
50+
51+
?>
52+
53+
54+
55+
<tr bgcolor="#FF9933"><td colspan="5" align="center">
56+
总计:<?php echo $rs->RecordCount?>条;每页<?php echo $rs->Pagesize?>条;共<?php echo $rs->PageCount?>页;当前页:<?php echo $pg ?>
57+
58+
</td></tr>
59+
<tr bgcolor="#FFFFFF"><td colspan="5" align="center" style="font-size:24px" >
60+
<?php for($n=1; $n<=$rs->PageCount; $n++) { ?>
61+
<a href="class_list.php?page=<?php echo $n ?>&&cn=<?php echo $ccc; ?>"> <?php echo $n ?> </a>&nbsp;
62+
<?php } ?>
63+
</td></tr>
64+
65+
</table>
66+
<?php $db->Close();$db =NULL;$rs=NULL ?>
67+
</body>
68+
</html>

171491525林莉学/connlj.php

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<?php
2+
$db=new com("adodb.connection");
3+
$dir="data/laji.mdb";
4+
$cnstr="Driver={Microsoft Access Driver (*.mdb)};Uid=;Pwd=;DBQ=".realpath($dir);
5+
$db->open($cnstr);
6+
?>
7+
8+
9+

171491525林莉学/css.css

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
A:link {FONT-SIZE: 14px; COLOR: #000000; TEXT-DECORATION: none}
2+
A:visited {FONT-SIZE: 14px; COLOR: #000000; TEXT-DECORATION: none}
3+
A:hover {FONT-SIZE: 14px; COLOR: #000000; TEXT-DECORATION: underline}
4+
td {font-family: "芥竟", "력芥_GB2312", "붚竟";font-size: 14px; color: #000000;text-decoration: none;line-height: 140%;}
5+
th {font-family: "芥竟", "력芥_GB2312", "붚竟";font-size: 32px;}

171491525林莉学/data/laji.mdb

1.2 MB
Binary file not shown.

171491525林莉学/func.php

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
<?php function ad($c,$n,$a) { ?>
2+
<table width=778 border="0" cellspacing="0" cellpadding="2">
3+
<tr bgcolor="#33FFFF">
4+
<td width="50%"><img src="images/sub.gif" align="absmiddle"><?php echo $c; ?></td>
5+
<td width="20%">&nbsp;</td>
6+
<td width="10%"><a href="class_list.php?cn=<?php echo $c; ?>" target="_blank">more...</a></td>
7+
</tr>
8+
9+
<?php
10+
include("connlj.php");
11+
$sqlf = "Select top $n * From news where bigclassname='$c' order by hits desc";
12+
$rsf=new com("adodb.recordset");
13+
$rsf->open($sqlf,$db,1,1);//Ö´ÐÐÓï¾ä,·µ»Ø¼Ç¼¼¯
14+
$js=0;
15+
while(! $rsf->eof && $js<5)
16+
{
17+
?>
18+
<tr>
19+
<td style="border-bottom:#FF0000 dotted 1px"><a href="news_disp.php?xwh=<?php echo $rsf->Fields("nid")->value; ?>" target="_blank"><?php echo $rsf->Fields("title")->value; ?></a></td>
20+
<td style="border-bottom:#FF0000 dotted 1px"><?php echo $rsf->Fields("infotime")->value; ?></td>
21+
<td style="border-bottom:#FF0000 dotted 1px"><?php echo $rsf->Fields("hits")->value; ?></td>
22+
</tr>
23+
<?php
24+
$rsf->MoveNext();
25+
$js++;
26+
}
27+
$rsf=NULL;
28+
?>
29+
</table>
30+
31+
32+
<embed src="images/<?php echo $a; ?>" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" width="778" height="80">
33+
<?php }?>
34+
</embed>

171491525林莉学/images/1.png

14.3 KB
Loading

171491525林莉学/images/2.jpg

61.8 KB
Loading

171491525林莉学/images/3.jpg

94.4 KB
Loading

171491525林莉学/images/4.jpg

85.3 KB
Loading

171491525林莉学/images/5.png

489 KB
Loading
20.3 KB
Binary file not shown.

171491525林莉学/images/Game.swf

29.8 KB
Binary file not shown.

171491525林莉学/images/buick.swf

20.1 KB
Binary file not shown.

171491525林莉学/images/dong.swf

640 KB
Binary file not shown.

171491525林莉学/images/sub.gif

332 Bytes
Loading

171491525林莉学/left_seek.php

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
2+
3+
<table width="100%" border="0" cellspacing="0" cellpadding="2">
4+
<tr>
5+
<td width="643"></td>
6+
<td align="center" bgcolor="#6699CC" style="color:#CCFFFF" width="643">关键字查询</td>
7+
<td width="643"></td>
8+
</tr>
9+
<tr>
10+
<td align="center" colspan="3">
11+
<form action="seek_list.php" method="post" name="formseek" target="_blank" onsubmit="return myFun222();">
12+
<input name="kkk" placeholder="请输入关键字" type="text" size="20" maxlength="20"><br>
13+
<input name="" type="submit" value="查询">
14+
</form>
15+
</td>
16+
</tr>
17+
</table>
18+
19+
20+
21+
<script language="javascript">
22+
function myFun222()
23+
{
24+
xingming=document.formseek.kkk.value;
25+
if(xingming.length==0){alert("请输入关键字");return false;}
26+
27+
}
28+
</script>

171491525林莉学/news_disp.php

+86
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
<html>
2+
<head>
3+
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
4+
<title>新闻浏览</title>
5+
<link href="css.css" rel="stylesheet" type="text/css">
6+
</head>
7+
8+
<body bgcolor="535353" topmargin="0" leftmargin="0">
9+
10+
<?php
11+
include("connlj.php");
12+
include("top.php");
13+
$xwid=$_GET["xwh"];
14+
$sqlupd="update news set hits=hits+1 where nid=$xwid";
15+
$db->Execute($sqlupd);
16+
17+
18+
19+
$sql = "Select * From news where nid=$xwid ";
20+
$rs=new com("adodb.recordset");
21+
$rs->open($sql,$db,1,1);//执行语句,返回记录集
22+
?>
23+
<table width="778" border="0" cellspacing="0" cellpadding="2" align="center">
24+
<tr bgcolor="#00CC99">
25+
<th><?php echo $rs->Fields("title")->value; ?></th>
26+
</tr>
27+
<tr bgcolor="#99FF00">
28+
<td>
29+
新闻类别:<?php echo $rs->Fields("bigclassname")->value; ?><br>
30+
作者:<?php echo $rs->Fields("user")->value; ?><br>
31+
发布时间:<?php echo $rs->Fields("infotime")->value; ?><br>
32+
点击率:<?php echo $rs->Fields("hits")->value; ?>
33+
</td>
34+
</tr>
35+
<tr bgcolor="#CCFF66">
36+
<td><?php echo $rs->Fields("content")->value; ?></td>
37+
</tr>
38+
</table>
39+
40+
<?php
41+
42+
$rs=NULL;//虽然PHP宣称会自动释放资源,但还是习惯地书写好!
43+
?>
44+
45+
46+
<table width="778" border="0" cellspacing="0" cellpadding="2" align="center" bgcolor="#FFFFFF">
47+
<tr>
48+
<td align="center" bgcolor="#00CC99">
49+
<img src="../images/my_review.gif" align="absmiddle">
50+
<a href="pinglun_add.php?xid=<?php echo $xwid ?>" target="_blank">发表评论</a>
51+
</td>
52+
</tr>
53+
</table>
54+
55+
56+
<table width="778" border="0" cellspacing="0" cellpadding="2" align="center" bgcolor="#FFFFFF">
57+
<?php
58+
59+
$sqlpl = "Select * From shop_pinglun where nid=$xwid and pinglunok=1";
60+
$rspl=new com("adodb.recordset");
61+
$rspl->open($sqlpl,$db,1,1);//执行语句,返回记录集
62+
63+
while(! $rspl->eof)
64+
{
65+
?>
66+
67+
<tr bgcolor="#FFFFFF">
68+
<td style="border-bottom:#FF0000 dotted 1px">
69+
评论人:<?php echo $rspl->Fields("pinglunname")->value; ?>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
70+
评论时间:<?php echo $rspl->Fields("pinglundate")->value; ?><br>
71+
<?php echo $rspl->Fields("pingluncontent")->value; ?>
72+
73+
</td>
74+
75+
</tr>
76+
<?php
77+
$rspl->MoveNext();
78+
}
79+
$db->Close();
80+
$db =NULL;
81+
$rspl=NULL;//虽然PHP宣称会自动释放资源,但还是习惯地书写好!
82+
?>
83+
</table>
84+
85+
</body>
86+
</html>

171491525林莉学/pinglun_add.php

+60
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
<html>
2+
<head>
3+
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
4+
<title>发表评论</title>
5+
</head>
6+
7+
<body>
8+
<?php
9+
include("connlj.php");
10+
$nid=$_GET["xid"];
11+
?>
12+
<form action="pinglun_add_save.php" method="post" name="formadd" target="_self" onSubmit="return CheckForm();">
13+
<h1 align="center">请添加评论信息</h1>
14+
15+
<table width="778" border="1" cellspacing="0" cellpadding="0" align="center">
16+
<tr> </tr>
17+
<tr>
18+
<td bgcolor="#00CCFF" width="100">所在新闻号</td>
19+
<td><input name="nid" type="text" size="60" maxlength="20" value="<?php echo $nid ?>"></td>
20+
</tr>
21+
<tr>
22+
<td bgcolor="#00CCFF">作者</td>
23+
<td><input name="zz" type="text" size="60" maxlength="20"></td>
24+
</tr>
25+
<tr>
26+
<td bgcolor="#00CCFF">发布时间</td>
27+
<td><input name="sj" type="text" value="<?php echo date('Y-m-d')?>" size="60" maxlength="60" readonly="true" id="select_date" onFocus="ShowCalendar(this.id)"></td>
28+
</tr>
29+
<tr>
30+
<td bgcolor="#00CCFF">内容</td>
31+
<td><textarea name="nr" cols="60" rows="7">&nbsp;</textarea></td>
32+
</tr>
33+
<tr>
34+
<td colspan="2" align="center"><input name="qx" type="submit" value="提交评论">
35+
&nbsp;&nbsp;
36+
<input name="qx" type="button" value="取消评论"></td>
37+
</tr>
38+
</table>
39+
</form>
40+
41+
<script language="javascript">
42+
function CheckForm()
43+
{
44+
if(document.formadd.zz.value.trim()=="")
45+
{
46+
alert("请输入作者!");
47+
document.formadd.zz.focus();
48+
return false;
49+
}
50+
if(document.formadd.nr.value.trim()=="")
51+
{
52+
alert("请输入内容!");
53+
document.formadd.nr.focus();
54+
return false;
55+
}
56+
return true;
57+
}
58+
</script>
59+
</body>
60+
</html>
+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?php
2+
include("connlj.php");
3+
$nid=$_POST["nid"];
4+
$zz=$_POST["zz"];
5+
$sj=$_POST["sj"];
6+
$nr=$_POST["nr"];
7+
$sql="insert into shop_pinglun (nid,pinglunname,pinglundate,pingluncontent,pinglunok) values('$nid','$zz','$sj','$nr',0)";
8+
$result=$db->Execute($sql);
9+
//$result是布尔型变量,根据其值,可提示增删改是否成功!
10+
if($result)
11+
echo "<script>{window.alert('评论成功,请等待管理员审核哦');location.href='news_disp.php?xwh=$nid'} </script>";
12+
else
13+
echo "<script>{window.alert('修改失败');history.bck();} </script>";
14+
15+
?>

0 commit comments

Comments
 (0)