电脑知识|欧美黑人一区二区三区|软件|欧美黑人一级爽快片淫片高清|系统|欧美黑人狂野猛交老妇|数据库|服务器|编程开发|网络运营|知识问答|技术教程文章 - 好吧啦网

您的位置:首頁技術文章
文章詳情頁

基于mysql的論壇(4)

瀏覽:41日期:2023-10-26 14:42:03
## index.php <html> <head> <title>論壇</title> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> </head> <frameset cols="125,*" rows="*" border="0" frameborder="0">;;;;<frame src="left.php" name="left" scrolling="AUTO" frameborder="YES" bordercolor="#000000"> ;;<frame src="right.htm" name="main" scrolling="AUTO"> </frameset> <noframes><body bgcolor="#FFFFFF"> </body></noframes> </html> ## left.php <?php $fp=fopen("file/counter.txt","r"); $counter=fgets($fp,8); fclose($fp); $counter=$counter+1; $fp=fopen("file/counter.txt","w"); fputs($fp,$counter); fclose($fp); require("config.inc.php"); $sql="select * from boardinfo"$sql_result=mysql_query($sql); $sql_row=mysql_fetch_array($sql_result); ?> <html> <head> <title>版面列表</title> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <link href="css/new.css" rel=stylesheet> </head> <body background="image/bg.gif" bgcolor="#FFFFFF"> <table width="100%" border="0" cellspacing="2" cellpadding="0"> ;;<tr> ;;;;<td align="center">&nbsp;</td> ;;</tr> ;;<tr> ;;;;<td align="center"><a href="apply.php" target="main">注冊用戶</a></td> ;;</tr> ;;<tr> ;;;;<td align="center"><font color="#666666">---------</font></td> ;;</tr> <?php do { echo"<tr>"echo"<td align="center"><a href="list.php?board=$sql_row[name]" target="main">$sql_row[chinesename]</a></td>"echo"</tr>"}while($sql_row=mysql_fetch_array($sql_result)); ?> <tr> ;;;;<td align="center"><font color="#006666">---------</font></td> ;;</tr> ;;<tr> ;;;;<td height="11"> ;;;;;;<script src=file/X86tree.js></script> ;;;;;;<script language=javascript> img_t1="image/t1.gif"img_t2="image/t2.gif"tree=new TreeView(0,0,640,300); tree.AddImage(0,"image/dot.gif"); tree.AddImage(1,"image/close.gif"); tree.AddImage(2,"image/open.gif"); m1=new Nodes("m1",tree.ImageList,"論壇轉向",0,2,""); m1.Add(new Node("站點首頁",1,0,"<a target='_top'>"));;;;;;;m1.Add(new Node("論壇首頁",1,0,"<a href='http://www.hdgsjgj.cn/bcjs/right.htm' target='main'>")); ;;;;tree.Add2(m1); doc2=new Nodes("doc2",tree.ImageList,"論壇功能",0,2,"-"); ;;;;doc2.Add(new Node("帖子查詢",1,0,"<a href='http://www.hdgsjgj.cn/bcjs/query.php' target='main'>")); ;;;;doc2.Add(new Node("精華區域",1,0,"<a href='http://www.hdgsjgj.cn/bcjs/good.php' target='main'>")); doc2.Add(new Node("察看留言",1,0,"<a href='http://www.hdgsjgj.cn/bcjs/vmlogin.php' target='main'>")); doc2.Add(new Node("修改資料",1,0,"<a href='http://www.hdgsjgj.cn/bcjs/modify_l.php' target='main'>")); doc2.Add(new Node("察看資料",1,0,"<a href='http://www.hdgsjgj.cn/bcjs/userinfo.php' target='main'>")); doc2.Add(new Node("察看積分",1,0,"<a href='http://www.hdgsjgj.cn/bcjs/viewscore.php' target='main'>")); doc2.Add(new Node("論壇管理",1,0,"<a href='http://www.hdgsjgj.cn/bcjs/manage.htm' target='main'>")); tree.Add2(doc2); tree.Show(); doc2.Close(); m1.Close(); </script> ;;;;</td> ;;</tr> ;;<tr> ;;;;<td align="center"> <b><font color="#006666">--------</font><br> ;;;;;;<?php echo "$counter"?></b></td> ;;</tr> </table> </body> </html> ## list.php <?php require("func.php"); if(empty($board)){ ;;;;$board="computer"} $sql="select * from boardinfo where name='$board'"$sql_result=mysql_query($sql); $sql_row=mysql_fetch_array($sql_result); $chinesename=$sql_row[chinesename]; setcookie ("jl_forum[chinesename]",$chinesename); $sql="select name from user where slaveboard='$board'"$sql_result=mysql_query($sql); ?> <html> <head> <title>List</title> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <link rel="stylesheet" type="text/css" href="css/index.css"> <script language="javascript"> function openwin(board,id){window.open("read.php?board="+board+"&id="+id,"","height=460,width=600,resizable=yes,scrollbars=yes,status=no,toolbar=no,menubar=no,location=no"); } function post(board){window.open("post.php?board="+board,"","height=500,width=600,resizable=yes,scrollbars=yes,status=no,toolbar=no,menubar=no,location=no"); } </script> </head> <body bgcolor="#FFFFFF" background="image/bg.gif"> <?php include "header.php";?> <br> <table width="100%" border="1" cellspacing="0" cellpadding="0" bordercolorlight="#000000" bordercolordark="#FFFFFF"> ;;<tr>;;;;;;<td height="22" width="23%" bgcolor="#eeeeee">版面:<?php echo $chinesename; ?></td> ;;;;<td height="22" width="41%" bgcolor="#eeeeee">版主:<?php while ($sql_row=mysql_fetch_array($sql_result)) { echo "$sql_row[name]"."&nbsp;"} # 選擇出留言紀錄; $sql="select * from $board where slaveid=0"$temp=mysql_query($sql); $sum=mysql_num_rows($temp); $totalpage=ceil($sum/$pagesize); if ($sum==0) { ;;;;$totalpage=1; } # 分頁 if($page<1 or empty($page)){ ;;;;$page=1; } elseif ($page>$totalpage){ ;$page=$totalpage; } $offset=($page-1)*$pagesize; $sql="select * from $board where slaveid=0 order by id desc limit $offset,$pagesize"$sql_result=mysql_query($sql); ?> </td> ;;;;<td height="22" width="13%" bgcolor="#eeeeee">貼子總數:<?php echo $sum; ?></td> ;;;;<td height="22" width="12%"><a href='javascript:post("<?php echo $board;?>")'><img src="image/newtopic.jpg" width="93" height="21" border="0" alt="發新貼子"></a></td> ;;;;<td height="22" width="11%">;;;;;;;;<div align="center"><a href="<?php echo "$php_self?board=$board&page=$page";?>">刷新瀏覽</a></div> ;;;;</td> ;;</tr> </table> <br> <table width="100%" border="1" cellspacing="0" cellpadding="1" bordercolorlight="#CCCCCC" bordercolordark="#FFFFFF"> ;;<tr bgcolor="#995100" align="center"> ;;;;<td width="6%"><font color="#FFFFFF">回應</font></td> ;;;;<td width="67%" bgcolor="#995100"><font color="#FFFFFF">主 題</font></td> ;;;;<td width="20%"><font color="#FFFFFF">時 間</font></td> ;;;;<td width="7%"><font color="#FFFFFF">人氣</font></td> ;;</tr> ;;<tr bgcolor="#FFCC99"> ;;;;<td colspan="5" height="2">&nbsp;</td> ;;</tr> ;;<?php while ($sql_row=mysql_fetch_array($sql_result)) { echo"<tr>" echo"<td width="6%" bgcolor="#FFF5DD" align="center">" if ($sql_row[renum]!=0) ;;;;;;{ ;;;;;;;echo "<font color="#FF0000">[+$sql_row[renum]]</font>";;;;;} else { echo "[0]"} ;;echo"</td>";echo"<td bgcolor="#E8FDEE" width="56%"><font face="宋體"><a href='javascript:openwin("$board",$sql_row[id])' title="作者:$sql_row[writer] 大小:$sql_row[size]字節">$sql_row[title]</a></font></td>";echo"<td width="18%" bgcolor="#FFF5DD" align="center">$sql_row[writetime]</td>";echo"<td width="6%" bgcolor="#E8FDEE" align="center">$sql_row[hits]</td>";echo"</tr>"} ?> ;;<tr bgcolor="#FFCC99"> ;;;;<td colspan="5" align="center" height="2">&nbsp;</td> ;;</tr> </table> <div align="right"> <form method="post" action="<?php echo $php_self;?>"> ;;;;共<b><?php echo $totalpage;?></b>頁 第<b><?php echo $page;?></b>頁·<?php if ($page!=1){ ;;;;;$back=$page-1; echo"<a href="$php_self?board=$board&page=1">首頁</a> <a href="$php_self?board=$board&page=$back">上一頁</a>"} if ($page==1){ ;;;;;;;echo"首頁 上一頁"} if($page!=$totalpage){ ;;;;$next=$page+1; echo" <a href="$php_self?board=$board&page=$next">下一頁</a> <a href="$php_self?board=$board&page=$totalpage">尾頁</a>"} if($page==$totalpage){ echo" 下一頁 尾頁"} ?>·;;;;;;<input type="submit" name="goto" value="轉到"> ;;;;<input type="text" name="page" size="2"> ;;;;頁;;;;</form> </div> <?php include "footer.php";?> </body> </html> ## login.php <?php require "func.php"if ($name==$admin_name and $password==$admin_password) { ;;;;setcookie ("jl_admin[name]",$name); ;;;;setcookie ("jl_admin[password]",$name); ;;;;redirect2("admin.php"); } else { ;;;;show_error(1); } ?> ## manage.php <?php require "func.php"if (check_admin_password()) { ;;;;switch ($job){ case "setgood": ;;;;set_good($jl_forum[board],$id); ;;;;break; case "setnogood": ;;;;set_no_good($jl_forum[board],$id); ;;;;break; case "delete": ;;;;del_doc($jl_forum[board],$id); ;;;;break; ;;;;} echo "<h2>操作成功!</h2><br>"?> <html><head><title>o,k</title></head><body> <form method="POST"> ;;;;;;<input type="button" value=" 關 閉 " name="B1" onclick="window.close()"> </form> </body> </html> <?php } else { ;;;;show_error(1); } ?> ## manage_list.php <?php require("func.php"); if (check_admin_password()) { $board=$jl_forum[board]; $sql="select * from boardinfo where name='$board'"$sql_result=mysql_query($sql); $sql_row=mysql_fetch_array($sql_result); $chinesename=$sql_row[chinesename]; setcookie ("jl_forum[chinesename]",$chinesename); $sql="select name from user where slaveboard='$board'"$sql_result=mysql_query($sql); ?> <html> <head> <title>List</title> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <link rel="stylesheet" type="text/css" href="css/index.css"> <script language="javascript"> function openwin(board,id){window.open("manage_read.php?board="+board+"&id="+id,"","height=460,width=600,resizable=yes,scrollbars=yes,status=no,toolbar=no,menubar=no,location=no"); } function post(board){window.open("post.php?board="+board,"","height=500,width=600,resizable=yes,scrollbars=yes,status=no,toolbar=no,menubar=no,location=no"); } </script> </head> <body bgcolor="#FFFFFF" background="image/bg.gif"> <?php include "header.php";?> <br> <table width="100%" border="1" cellspacing="0" cellpadding="0" bordercolorlight="#D8D8E8" bordercolordark="#D8D8E8"> ;;<tr>;;;;;;<td height="20" width="27%" bgcolor="#d8dde9">版面:<?php echo $chinesename; ?>(管理)</td> ;;;;<td height="20" width="31%" bgcolor="#d8dde9">版主:<?php while ($sql_row=mysql_fetch_array($sql_result)) { echo "$sql_row[name]"."&nbsp;"} # 選擇出留言紀錄; $sql="select * from $board where slaveid=0"$temp=mysql_query($sql); $sum=mysql_num_rows($temp); $totalpage=ceil($sum/$pagesize); if ($sum==0) { ;;;;$totalpage=1; } # 分頁 if($page<1 or empty($page)){ ;;;;$page=1; } elseif ($page>$totalpage){ ;$page=$totalpage; } $offset=($page-1)*$pagesize; $sql="select * from $board where slaveid=0 order by id desc limit $offset,$pagesize"$sql_result=mysql_query($sql); ?> </td> ;;;;<td height="20" width="15%" bgcolor="#d8dde9">貼子總數:<?php echo $sum; ?></td> ;;;;<td height="20" width="12%"><a href='javascript:post("<?php echo $board;?>")'><img src="image/newtopic.jpg" width="92" height="21" border="0" alt="發新貼子"></a></td> ;;;;<td height="20" align="center" width="15%"><a href="<?php echo "$php_self?board=$board&page=$page";?>">刷新瀏覽</a></td> ;;</tr> </table> <br> <table width="100%" border="1" cellspacing="0" cellpadding="1" bordercolorlight="#CCCCCC" bordercolordark="#CCCCCC"> ;;<tr bgcolor="#995100" align="center"> ;;;;<td width="6%"><font color="#FFFFFF">回應</font></td> ;;;;<td width="67%" bgcolor="#995100"><font color="#FFFFFF">主 題</font></td> ;;;;<td width="20%"><font color="#FFFFFF">時 間</font></td> ;;;;<td width="7%"><font color="#FFFFFF">人氣</font></td> ;;</tr> ;;<tr bgcolor="#FFCC99"> ;;;;<td colspan="5" height="2">&nbsp;</td> ;;</tr> ;;<?php while ($sql_row=mysql_fetch_array($sql_result)) { echo"<tr>" echo"<td width="6%" bgcolor="#FFF5DD" align="center">" if ($sql_row[renum]!=0) ;;;;;;{ ;;;;;;;echo "<font color="#FF0000">[+$sql_row[renum]]</font>";;;;;} else { echo "[0]"} ;;echo"</td>";echo"<td bgcolor="#E8FDEE" width="56%"><font face="宋體"><a href='javascript:openwin("$board",$sql_row[id])' title="作者:$sql_row[writer] 大小:$sql_row[size]字節">$sql_row[title]</a></font></td>";echo"<td width="18%" bgcolor="#FFF5DD" align="center">$sql_row[writetime]</td>";echo"<td width="6%" bgcolor="#E8FDEE" align="center">$sql_row[hits]</td>";echo"</tr>"} ?> ;;<tr bgcolor="#FFCC99"> ;;;;<td colspan="5" align="center" height="2">&nbsp;</td> ;;</tr> </table> <div align="right"> <form method="post" action="<?php echo $php_self;?>"> ;;;;共<b><?php echo $totalpage;?></b>頁 第<b><?php echo $page;?></b>頁· <?php if ($page!=1){ ;;;;;$back=$page-1; echo"<a href="$php_self?board=$board&page=1">首頁</a> <a href="$php_self?board=$board&page=$back">上一頁</a>"} if ($page==1){ ;;;;;;;echo"首頁 上一頁"} if($page!=$totalpage){ ;;;;$next=$page+1; echo" <a href="$php_self?board=$board&page=$next">下一頁</a> <a href="$php_self?board=$board&page=$totalpage">尾頁</a>"} if($page==$totalpage){ echo" 下一頁 尾頁"} ?>·轉到第;;;;;;<input type="text" name="page" size="2"> ;;;;頁;;;;</form> </div> <?php include "footer.php"?> </body> </html> <?php } else { ;;;;show_error(4); } ?>;
標簽: MySQL 數據庫
主站蜘蛛池模板: 光纤测温-荧光光纤测温系统-福州华光天锐光电科技有限公司 | 自恢复保险丝_贴片保险丝_力特保险丝_Littelfuse_可恢复保险丝供应商-秦晋电子 | 深圳激光打标机_激光打标机_激光焊接机_激光切割机_同体激光打标机-深圳市创想激光科技有限公司 深圳快餐店设计-餐饮设计公司-餐饮空间品牌全案设计-深圳市勤蜂装饰工程 | 路面机械厂家| 药品冷藏箱厂家_低温冰箱_洁净工作台-济南欧莱博电子商务有限公司官网 | 【MBA备考网】-2024年工商管理硕士MBA院校/报考条件/培训/考试科目/提前面试/考试/学费-MBA备考网 | 派克防爆伺服电机品牌|国产防爆伺服电机|高低温伺服电机|杭州摩森机电科技有限公司 | 爆炸冲击传感器-无线遥测传感器-航天星百科 | 物流公司电话|附近物流公司电话上门取货 | 宝鸡市人民医院| 山东PE给水管厂家,山东双壁波纹管,山东钢带增强波纹管,山东PE穿线管,山东PE农田灌溉管,山东MPP电力保护套管-山东德诺塑业有限公司 | 西安文都考研官网_西安考研辅导班_考研培训机构_西安在职考研培训 | 北京网站建设|北京网站开发|北京网站设计|高端做网站公司 | 美的商用净水器_美的直饮机_一级代理经销商_Midea租赁价格-厂家反渗透滤芯-直饮水批发品牌售后 | 深圳办公室装修,办公楼/写字楼装修设计,一级资质 - ADD写艺 | 吉林污水处理公司,长春工业污水处理设备,净水设备-长春易洁环保科技有限公司 | 布袋式除尘器|木工除尘器|螺旋输送机|斗式提升机|刮板输送机|除尘器配件-泊头市德佳环保设备 | 安徽合肥格力空调专卖店_格力中央空调_格力空调总经销公司代理-皖格制冷设备 | 干粉砂浆设备_干混砂浆生产线_腻子粉加工设备_石膏抹灰砂浆生产成套设备厂家_干粉混合设备_砂子烘干机--郑州铭将机械设备有限公司 | 干粉砂浆设备-干粉砂浆生产线-干混-石膏-保温砂浆设备生产线-腻子粉设备厂家-国恒机械 | 气力输送设备_料封泵_仓泵_散装机_气化板_压力释放阀-河南锐驰机械设备有限公司 | 【365公司转让网】公司求购|转让|资质买卖_股权转让交易平台 | 膜结构车棚|上海膜结构车棚|上海车棚厂家|上海膜结构公司 | 沧州友城管业有限公司-内外涂塑钢管-大口径螺旋钢管-涂塑螺旋管-保温钢管生产厂家 | 周易算网-八字测算网 - 周易算网-宝宝起名取名测名字周易八字测算网 | 智能门锁电机_智能门锁离合器_智能门锁电机厂家-温州劲力智能科技有限公司 | 台式低速离心机-脱泡离心机-菌种摇床-常州市万丰仪器制造有限公司 | 自动气象站_气象站监测设备_全自动气象站设备_雨量监测站-山东风途物联网 | 软膜天花_软膜灯箱_首选乐创品牌_一站式天花软膜材料供应商! | 代办建筑资质升级-建筑资质延期就找上海国信启航 | 塑料托盘厂家直销-吹塑托盘生产厂家-力库塑业【官网】 | 上海佳武自动化科技有限公司| 科箭WMS仓库管理软件-TMS物流管理系统-科箭SaaS云服务 | 山东齐鲁漆业有限公司【官网】-工业漆专业生产厂家 | 电子海图系统-电梯检验系统-智慧供热系统开发-商品房预售资金监管系统 | 胶泥瓷砖胶,轻质粉刷石膏,嵌缝石膏厂家,腻子粉批发,永康家德兴,永康市家德兴建材厂 | uv机-uv灯-uvled光固化机-生产厂家-蓝盾机电 | 海日牌清洗剂-打造带电清洗剂、工业清洗剂等清洗剂国内一线品牌 海外整合营销-独立站营销-社交媒体运营_广州甲壳虫跨境网络服务 | 玖容气动液压设备有限公司-气液增压缸_压力机_增压机_铆接机_增压器 | 自动螺旋上料机厂家价格-斗式提升机定制-螺杆绞龙输送机-杰凯上料机 | 中式装修设计_全屋定制家具_实木仿古门窗花格厂家-喜迎门 |