澳门新浦京8455com基于mysql的论坛(5)

//upload.php
这是上传文件的界面,用任何一个编辑器都可以作出来很好看的。需要注意的是表格中的
ENCTYPE=multipart/form-data部分。这个一定不能错,否则服务器将不知道你在上传文件。
其他的就没有什么好说的啦,嘻嘻,大家可以作个更好的。 html head
title文件上传/title meta content=text/html; charset=gb2312 /head body
bgcolor=#FFFFFF br br br br br br br FORM ENCTYPE=multipart/form-data
NAME=myform ACTION=do.php METHOD=POSTtable width=600 border=1
cellspacing=0 cellpadding=0 align=center height=160 bgcolor=#E2E3FE
bordercolorlight=#006699 bordercolordark=#FFFFFF trtd colspan=4
height=40div align=center文件上传/div /td /tr trtd width=80 height=40div
align=center选择上传文件/div /td td width=170 height=40div
align=leftinput type=file name=myfile /div /td td width=80 height=40div
align=center选择文件类型/div /td td width=170 height=40div
align=leftselect name=type size=1 option value=通知 selected通知/option
option value=下发文件下发文件/option option
value=上报文件上报文件/option /select /div /td /tr trtd width=80
height=40div align=center上传者/div /td td width=170 height=40div
align=leftinput type=text name=uploader maxlength=20 /div /td td
height=40div align=center上传日期/div div align=left /div /td td
height=40input type=text name=date value=? print(date(Y-n-j)); ? /td /tr
trtd height=40div align=center/div div align=left/div div
align=center/div div align=center文件说明 /div /td td colspan=3
height=40 input type=text name=fileshow size=60 /td /tr trtd colspan=4
height=40div align=centerinput type=submit name=Submit value=上传 /div
/td /tr /table /form /body /html

## manage_read.php ?php require (func.php); if
(check_admin_password()) { $board=$jl_forum[board]; switch ($job){
case setgood: set_good($jl_forum[board],$uid); $work=1; break; case
setnogood: set_no_good($jl_forum[board],$uid); $work=1; break; case
delete: del_doc($jl_forum[board],$uid); $work=1; break; } if
(!$word) { add_one_hit($board,$id); } $sql=select * from $board where
id=$id; $sql_result=mysql_query($sql);
$sum=mysql_num_rows($sql_result);
$sql_row=mysql_fetch_array($sql_result); $title=$sql_row[title];
$writer=$sql_row[writer]; $cont=$sql_row[cont];
$writetime=$sql_row[writetime]; $hits=$sql_row[hits];
$good=$sql_row[good]; $rootid=$sql_row[id];
$fromip=$sql_row[fromip]; $sql=select * from $board where
slaveid=$id; $sql_result=mysql_query($sql); if ($sum0) { ? html head
title?php echo $title;?/title meta content=text/html; charset=gb2312
link rel=stylesheet type=text/css href=css/index.css script
language=javascript function
sendmsg(name){window.open(sendmsg.php?name=+name,,height=200,width=500,resizable=yes,scrollbars=yes,status=no,toolbar=no,menubar=no,location=no);
} /script /head body bgcolor=#666699 ?php include ad.php;?br hr noshade
width=98% size=1 table width=98% border=1 cellspacing=0 cellpadding=2
align=center bordercolorlight=#CCCCCC bordercolordark=#FFFFFF tr
bgcolor=#666666 tdfont color=#澳门新浦京8455com ,FFcc00b标题:?php echo $title;? font
color=#FFFFCC◎操作:/font/b/fontb?php echo a
href=$php_self?job=setgood&uid=$id&id=$rootid;?font
color=#FFFFFF转进精华区/font/a/bfont color=#FFcc00b /b/fontb?php echo
a href=$php_self?job=delete&uid=$id&id=$rootid;?font
color=#FFFFFF删除/font/a/bfont color=#FFcc00b?php if ($good==y){ ?
/b/fontb?php echo a
href=$php_self?job=setnogood&uid=$id&id=$rootid;?font
color=#FFFFFF转出精华区/font/a/bfont color=#FFcc00b?php } ? /b/font/td
/tr tr td bgcolor=#eeeeee作者:?php echo $writer;?(?php echo
$writetime;?,点击:?php echo $hits;?) a href=javascript:sendmsg(‘?php
echo $writer;?’)img src=image/icon1.gif width=18 height=17
alt=给作者留言 border=0/a a href=userinfo.php?name=?php echo
$writer;?img src=image/profile.gif width=16 height=16 alt=察看用户资料
border=0/a/td /tr tr td bgcolor=#ffffef?php echo $cont;?/td /tr tr
bgcolor=#e8eee0 td※ 来源:?php echo $jl_forum[chinesename];?
[◆FROM:?php echo $fromip;?]/td /tr /table br ?php if (!$add){
while($sql_row=mysql_fetch_array($sql_result)) {
$good=$sql_row[good]; ? table width=98% border=1 cellspacing=0
cellpadding=2 align=center bordercolorlight=#CCCCCC
bordercolordark=#FFFFFF tr bgcolor=#015C71 tdfont
color=#ffffff标题:?php echo $sql_row[title]; $id=$sql_row[id]; ?
font color=#FFFFCC◎操作:/font/b/fontb?php echo a
href=$php_self?job=setgood&uid=$id&id=$rootid;?font
color=#FFFFFF转进精华区/font/a/bfont color=#FFcc00b /b/fontb?php echo
a href=$php_self?job=delete&uid=$id&id=$rootid;?font
color=#FFFFFF删除/font/a/bfont color=#FFcc00b?php if ($good==y){ ?
/b/fontb?php echo a
href=$php_self?job=setnogood&uid=$id&id=$rootid;?font
color=#FFFFFF转出精华区/font/a/bfont color=#FFcc00b?php } ? /b/font/td
/tr tr bgcolor=#eeeeee td作者:?php echo $sql_row[writer];?(?php
echo $sql_row[writetime];?) a href=javascript:sendmsg(‘?php echo
$sql_row[writer];?’)img src=image/icon1.gif width=18 height=17
alt=给作者留言 border=0/a a href=userinfo.php?name=?php echo
$sql_row[writer];?img src=image/profile.gif width=17 height=16
alt=察看用户资料 border=0/a/td /tr tr td bgcolor=#ffffef?php echo
$sql_row[cont];?/td /tr tr bgcolor=#e8eee0 td※ 来源:?php echo
$jl_forum[chinesename];? [◆FROM:?php echo
$sql_row[fromip];?]/td /tr /table ?php } } ? br ?php
includefooter.php;?br /body /html ?php } else { echo 此条纪录已经被删除;
} } else { show_error(1); } ? ## modify.php ?php require func.php; if
(check_user_password($jl_forum[name],$jl_forum[password])) {
$name=$jl_forum[name]; $password=$jl_forum[password]; $sql=select
* from user where name=’$name’; $sql_result=mysql_query($sql);
$sql_row=mysql_fetch_array($sql_result); ? html head
title修改资料/title meta content=text/html; charset=gb2312 link
rel=stylesheet type=text/css href=css/index.css /head body
bgcolor=#FFFFFF background=image/bg.gif ?php include header.php;?br hr
noshade width=97% size=1 div align=center修改用户个人资料br table
width=90% border=1 cellspacing=0 cellpadding=0 bordercolorlight=#336699
bordercolordark=#FFFFFF tr valign=toptd colspan=2 /td /tr trtd
colspan=2form method=post action=change.php table width=80% border=0
cellspacing=0 cellpadding=3 align=center trtd align=right用户名/td
td?php echo $name;?/td /tr trtd align=right密码/td tdinput type=password
name=pwd1 maxlength=8 style=font-size: 9pt; background-color: #FFFFFF;
color: #FF0000; border: 1 solid #000000 size=9 value=?php echo
$password;? * /td /tr trtd align=right重复密码/td tdinput type=password
name=pwd2 maxlength=8 style=font-size: 9pt; background-color: #FFFFFF;
color: #FF0000; border: 1 solid #000000 size=9 value=?php echo
$password;? * /td /tr trtd align=rightEmail/td tdinput type=text
name=email style=font-size: 9pt; background-color: #FFFFFF; color:
#FF0000; border: 1 solid #000000 value=?php echo $sql_row[email];?
* /td /tr trtd align=right性别/td tdselect name=sex option value=秘密
selected秘密/option option value=男男/option option value=女女/option
/select /td /tr trtd align=right真实性名/td tdinput type=text
name=realname size=17 maxlength=16 style=font-size: 9pt;
background-color: #FFFFFF; color: #FF0000; border: 1 solid #000000
value=?php echo $sql_row[realname];? /td /tr trtd align=right地址/td
tdinput type=text name=address maxlength=40 size=30 style=font-size:
9pt; background-color: #FFFFFF; color: #FF0000; border: 1 solid
#000000 value=?php echo $sql_row[address];? /td /tr trtd
align=right电话/td tdinput type=text name=phone size=22 maxlength=20
style=font-size: 9pt; background-color: #FFFFFF; color: #FF0000;
border: 1 solid #000000 value=?php echo $sql_row[phone];? /td /tr
trtd align=right主页/td tdinput type=text name=homepage style=font-size:
9pt; background-color: #FFFFFF; color: #FF0000; border: 1 solid
#000000 size=50 value=?php echo $sql_row[homepage];? /td /tr trtd
align=rightOICQ/td tdinput type=text name=oicq maxlength=11
style=font-size: 9pt; background-color: #FFFFFF; color: #FF0000;
border: 1 solid #000000 size=12 value=?php echo $sql_row[oicq];? /td
/tr trtd align=right签名/td td?php echo $sql_row[qm]br;?textarea
name=qm wrap=VIRTUAL cols=50/textarea /td /tr trtd align=right /td td
align=centerinput type=submit name=b2 value=修改 input type=reset
name=Submit2 value=清除 /td /tr /table /form /td /tr /table div
align=centerbr /div /div ?php include footer.php;? /body /html ?php }
else { show_error(4); } ? ## modify_l.php ?php require func.php; if
($b1) { if (is_user_exits($name) and
check_user_password($name,$password)) { setcookie
(jl_forum[name],$name); setcookie (jl_forum[password],$password);
redirect2(modify.php); } else { show_error(4); } } else { ? html head
titlemain/title meta content=text/html; charset=gb2312 link
rel=stylesheet type=text/css href=css/page.css /head body
bgcolor=#FFFFFF background=image/bg.gif table width=90% border=1
cellspacing=0 cellpadding=0 align=center bordercolorlight=#FFCC99
bordercolordark=#FFCC99 tr bgcolor=#CCFF99td div
align=centerb修改资料登陆/b/div /td /tr tr align=centertd form
method=post action=modify_l.php table width=70% border=0 cellspacing=0
cellpadding=0 tr td width=38% align=right用户名:/td td width=62%
align=left input type=text name=name size=17 maxlength=16 /td /tr tr td
width=38% align=right密码:/td td width=62% align=left input
type=password name=password size=17 maxlength=16 /td /tr /table input
type=submit name=b1 value=进入 /form /td /tr tr bgcolor=#CCFF99td div
align=centerb论坛信息/b/div /td /tr tr valign=toptd ?php include
info.php;? /td /tr /table /body /html ?php } ? ## oper.php ?php
require func.php; if (adminok()) { if (isset($add_board)) { if
(isset($name) and isset($chinesename) and !is_board_exits($name)) {
create_board_table($name,$chinesename); } else { echo
出现错误!(可能版面已经存在); $founderr=1; } } elseif
(isset($del_board)) { if (isset($board)) { drop_board_table($board);
} else { echo 出现错误!(请选择要删除的版面); $founderr=1; } } elseif
(isset($modify)) { if (isset($name) and isset($chinesename)) {
update_board($name,$chinesename); } else { echo 出现错误!(请填写完整);
$founderr=1; } } elseif (isset($add_admin)) { if
(is_user_exits($name) and isset($board)) { add_admin($board,$name); }
else { echo 出现错误!(极有可能是用户不存在); $founderr=1; } } elseif
(isset($delete_admin)) { if (is_user_exits($name)) {
del_admin($name); } else { echo 出现错误!(极有可能是用户不存在);
$founderr=1; } } else { echo 你要干什么?; $founderr=1; } if
(!$founderr) { redirect2(admin.php); } } else { show_error(1); } ?

You can leave a response, or trackback from your own site.

Leave a Reply

网站地图xml地图