<?php
session_start();
include "Conn/conn.php";
$file_id1=$_GET[file_id];
$bool = false;
$str=array("大","更","创","天","科","客","博","技","立","新");
$word=strlen($str);
for($i=0;$i<4;$i++){
$num=rand(0,$word*2-1); //$word=$word*2-1
$img=$img."<img src=' images/checkcode/".$num.".gif' width='16' height='16'>"; //显示随机图片
$pic=$pic.$str[$num]; //将图片转换成数组中的文字
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="CSS/style.css" rel="stylesheet">
<title>浏览博客文章及评论</title>
<script src="JS/check.js" language="javascript">
</script>
<script language="javascript">
function r_check(){
if (document.myform.txt_content.value==""){
alert("评论内容不能为空!");myform.txt_content.focus();return false;
}
}
function d_chk(urlstr){
if(confirm("确定要删除选中的项目吗?一旦删除将不能恢复!")){
return true;
}
else
return false;
}
function fri_chk(){
if(confirm("确定要删除选中的项目吗?一旦删除将不能恢复!")){
return true;
}
else
return false;
}
</script>
</head>
<body style="MARGIN-TOP: 0px; VERTICAL-ALIGN: top; PADDING-TOP: 0px; TEXT-ALIGN: center">
<TABLE width="757" cellPadding=0 cellSpacing=0 style="WIDTH: 755px">
<TBODY>
<TR>
<TD style="VERTICAL-ALIGN: bottom; HEIGHT: 6px" colSpan=3>
<table width="100%" height="149" border="0" cellpadding="0" cellspacing="0" background="images/F_head.jpg">
<tr>
<td height="51" align="right">
<br>
<table width="262" border="0" cellspacing="0" cellpadding="0">
<tr align="left">
<td width="26" height="20"><a href="index.php"></a></td>
<td width="71" class="word_white"><a href="index.php"><span style="FONT-SIZE: 9pt; COLOR: #000000; TEXT-DECORATION: none">首 页</span></a></td>
<td width="87"><a href="file.php"><span style="FONT-SIZE: 9pt; COLOR: #000000; TEXT-DECORATION: none">我的博客</span></a></td>
<td width="55"><a href="<?php echo (!isset($_SESSION[username])?'Regpro.php':'safe.php'); ?>"><span style="FONT-SIZE: 9pt; COLOR: #000000; TEXT-DECORATION: none"><?php echo (!isset($_SESSION[username])?"博客注册":"安全退出"); ?></span></a></td>
<td width="23"> </td>
</tr>
</table>
<br></td>
</tr>
<tr>
<td height="66" align="right"><p> </p></td>
</tr>
<tr>
<form name="form" method="post" action="checkuser.php">
<td height="20" valign="baseline">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="20" align="left" valign="baseline" style=" text-indent:50px;">
<?php
if(!isset($_SESSION[username])){
?>
用户名:
<input name=txt_user size="10">
密码:
<input name=txt_pwd type=password style="FONT-SIZE: 9pt; WIDTH: 65px" size="6">
验证码:
<input name="txt_yan" style="FONT-SIZE: 9pt; WIDTH: 65px" size="8">
<input type="hidden" name="txt_hyan" id="txt_hyan" value="<?php echo $pic;?>">
<?php echo $img; ?>
<input style="FONT-SIZE: 9pt" type=submit value=登录 name=sub_dl onClick="return f_check(form)">
<?php
}else{
?>
<font color="red"><?php echo $_SESSION[username]; ?></font> 博客天空网站欢迎您的光临!!!当前时间:<font color="red"><?php echo date("Y-m-d l"); ?>
</font>
<?
}
?></td>
<td width="1%" align="center" valign="baseline"> </td>
</tr>
</table>
</td>
</form>
</tr>
</table>
</TD>
</TR>
<TR>
<TD colSpan=3 valign="baseline" style="BACKGROUND-IMAGE: url( images/bg.jpg); VERTICAL-ALIGN: middle; HEIGHT: 450px; TEXT-ALIGN: center"><br>
<br>
<table width="600" height="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="130" align="center" valign="middle"><table width="560" border="1" align="center" cellpadding="3" cellspacing="1" bordercolor="#9CC739" bgcolor="#FFFFFF">
<tr align="left" colspan="2" >
<td width="390" height="25" colspan="3" valign="top" bgcolor="#EFF7DE"> <span class="tableBorder_LTR"> 博客文章</span> </td>
</tr>
<td align="center" valign="top" ><table width="480" border="0" cellpadding="0" cellspacing="0">
<tr>
<td> <?php
$sql=mysql_query("select * from tb_article where id = ".$file_id1);
$result=mysql_fetch_array($sql);
?>
<table width="100%" border="1" cellpadding="1" cellspacing="1" bordercolor="#D6E7A5" bgcolor="#FFFFFF" class="i_table">
<tr bgcolor="#FFFFFF">
<td width="14%" align="center">博客ID号</td>
<td width="15%"><?php echo $result[id]; ?></td>
<td width="11%" align="center">作
者</td>
<td width="18%"><?php echo $result[author]; ?></td>
<td width="12%" align="center">发表时间</td>
<td width="30%"><?php echo $result[now]; ?></td>
</tr>
<tr bgcolor="#FFFFFF">
<td align="center">博客主题</td>
<td colspan="5"> <?php echo $result[title]; ?></td>
</tr>
<tr bgcolor="#FFFFFF">
<td align="center">文章内容</td>
<td colspan="4"><?php echo $result[content]; ?></td>
<td><?php
if($_SESSION[fig]==1 or ($_SESSION[username] == $result[author])){
$bool = true;
?>
<a href="del_file.php?file_id=<?php echo $result[id];?>"><img src="images/A_delete.gif" width="52" height="16" alt="删除博客文章" onClick="return fri_chk();"></a>
<?php
}
?>
</td>
</tr>
</table></td>
</tr>
</table></td>
</table></td>
</tr>
<tr>
<td height="106" align="center" valign="top"><?php if ($page=="") {$page=1;}; ?>
<table width="560" border="1" align="center" cellpadding="3" cellspacing="1" bordercolor="#9CC739" bgcolor="#FFFFFF">
<tr align="left" colspan="2" >
<td width="390" height="25" colspan="3" valign="top" bgcolor="#EFF7DE"> <span class="tableBorder_LTR"> 查看相关评论</span> </td>
</tr>
<?php
if ($page){
$page_size=4; //每页显示4条记录
$query="select count(*) as total from tb_filecomment where fileid=' ,m ,' order by id desc";
$result=mysql_query($query); //查询总的记录条数
$message_count=mysql_result($result,0,"total"); //为变量赋值
$page_count=ceil($message_count/$page_size); //根据记录总数除以每页显示的记录数求出所分的页数
$offset=($page-1)*$page_size; //计算下一页从第几条数据开始循环
for ($i=1; $i<2; $i++) { //计算每页显示几行记录信息
if ($i==1) {
$sql=mysql_query("select * from tb_filecomment where fileid='$file_id1' order by id desc limit $offset, $page_size");
$result=mysql_fetch_array($sql);
}
if($result==false){
echo "<font color=#ff0000>对不起,没有相关评论!<
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
个人博客网站 PHP 实例 源码 (125个子文件)
style.css 3KB
base.css 328B
Thumbs.db 56KB
Thumbs.db 55KB
Thumbs.db 32KB
Thumbs.db 29KB
Thumbs.db 19KB
Thumbs.db 11KB
tb_user.frm 9KB
tb_friend.frm 9KB
tb_filecomment.frm 8KB
tb_article.frm 8KB
tb_tpsc.frm 8KB
tb_public.frm 8KB
2.gif 4KB
3.gif 3KB
0.gif 3KB
4.gif 3KB
5.gif 3KB
7.gif 3KB
1.gif 2KB
9.gif 2KB
1.gif 2KB
8.gif 2KB
4.gif 2KB
10.gif 1KB
3.gif 1KB
item_out.gif 873B
item_over.gif 869B
6.gif 856B
2.gif 789B
5.gif 771B
5.gif 369B
2.gif 364B
7.gif 363B
3.gif 357B
4.gif 356B
8.gif 340B
0.gif 340B
9.gif 337B
6.gif 226B
A_delete.gif 211B
9.gif 204B
0.gif 200B
1.gif 200B
8.gif 199B
3.gif 197B
2.gif 195B
5.gif 195B
6.gif 154B
4.gif 133B
U.gif 130B
7.gif 129B
B.gif 127B
I.gif 124B
1.gif 121B
more.gif 104B
F_head.jpg 80KB
head.jpg 70KB
bg.jpg 56KB
right.jpg 36KB
left.jpg 33KB
flist.jpg 28KB
footer.jpg 27KB
initcity.js 20KB
menu.JS 6KB
check.js 4KB
UBBCode.JS 3KB
tb_tpsc.MYD 491KB
tb_article.MYD 2KB
tb_friend.MYD 1KB
tb_filecomment.MYD 952B
tb_public.MYD 812B
tb_user.MYD 704B
tb_friend.MYI 2KB
tb_article.MYI 2KB
tb_filecomment.MYI 2KB
tb_public.MYI 2KB
tb_tpsc.MYI 2KB
tb_user.MYI 2KB
db.opt 65B
article.php 12KB
comment.php 11KB
showmy.php 11KB
managepub.php 11KB
pic_more.php 10KB
friend.php 10KB
Register.php 10KB
queryuser.php 9KB
file_more.php 9KB
query_friend.php 9KB
browseuser.php 9KB
browse_fri.php 9KB
browse_pic.php 8KB
query.php 8KB
file.php 7KB
query_pic.php 7KB
index.php 7KB
myfiles.php 6KB
RegPro.php 6KB
共 125 条
- 1
- 2
onezeros
- 粉丝: 1087
- 资源: 211
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
- 1
- 2
- 3
- 4
- 5
- 6
前往页