) i7 R/ e/ l$ }3 ]9 `% b: s
出现在评论处,小问题。放出来怕笑话呢。。- K, d7 a! ?4 V. m! S0 @0 X( K9 _
01 }elseif($do == 'view'){* D* c- y$ B8 ~
02 0 [7 v( }0 i; z
03 require_once(dirname(__FILE__)."/global.php");6 Z( j. X1 w/ S+ D W1 j
04 require_once(MYMPS_INC."/member.class.php");
4 p& g7 f6 K1 G& ?05 require_once(MYMPS_INC."/ip.class.php");; R% o4 x7 b3 o0 T3 r6 H ?1 \
06 5 J! ], T1 x2 ~5 F" q: h* G
07 if(!empty($part)&&$action == 'write'){
4 H0 Q$ i. @5 {$ v$ R; o5 b08 if(if_other_site_post()){
+ @% |/ d0 u/ h" `* S9 d09 $msgs[]="请不要尝试从站外提交数据!";
3 d) M& Z2 V1 P* A* Y" E10 show_msg($msgs);7 C7 ~, N$ c* N5 J8 T
11 exit();
; ^0 d4 z6 O+ d; J) y12 }% e4 U1 d! w* ]4 T' ~0 Z7 C- s
13 ' F6 }' O9 U( G( k' W3 a& @4 o
14
# K. @+ I& J/ l15 //mymps_chk_randcode();$ f4 e1 o+ S+ w$ l: ~9 c7 Z
16
0 c2 F* ^: o& M I A, ?17 $content = $_POST[content];
4 f5 W( x' }# F; S8 o% f, p4 a18 if(empty($content)){write_msg("请填写评论内容!");exit();}
5 w2 d3 E$ l( y3 Q- T19 if(strlen($content)>255){write_msg("请不要填写超过127个汉字!");exit();}0 G! d8 ]$ a7 J
20 $result = verify_badwords_filter($mymps_global[cfg_if_comment_verify],'',$_POST[content]);
( B$ z2 { R& V( x7 J, R0 W Y21 $content = textarea_post_change($result[content]);2 g# |3 u1 Y: U+ v% C6 h; h
22 $comment_level = $result[level];
; E' p7 N, }# C23 $userid = $_GET['userid'];) {5 ?+ j! J7 L/ |
24
! ~3 O9 \" U3 ]9 @25 . d9 f& \) Y4 Y5 |) \: \0 G! e
" \) @( e' \( W% r. q0 g7 o26 $db->query("INSERT INTO `{$db_mymps}".$part."_comment` (".$part."id,content,pubtime,ip,comment_level,userid)VALUES('$id','$content','".time()."','".GetIP()."','$comment_level','".$_POST[userid]."')");9 G+ Z' h f% h
27 echo "INSERT INTO `{$db_mymps}".$part."_comment` (".$part."id,content,pubtime,ip,comment_level,userid)VALUES('$id','$content','".time()."','".GetIP()."','$comment_level','".$_POST[userid]."')";//userid和getip都没处理好。出现问题了。$ @8 N$ C5 O! w' o8 ^2 y2 h
28 if($comment_level == '1'){
( s* Q& v0 x- z1 c9 q$ m7 Z29 write_msg("您的评论提交成功!","?part=".$part."&id=".$id);
9 Q9 ?( W: D, G! l30 }
, \! O4 U' n3 Z5 t31 else{2 t' \; J, ^/ B4 M- q9 G8 y: X
32 write_msg("您提交的留言可能含有违禁词语,审核通过后显示!","?part=".$part."&id=".$id);+ o& Z/ w+ j# I
33 }, f8 ~: W# x3 f4 \! ^' M# p# e/ s
34 exit();" F% S% x/ T$ p0 p% {6 g% N# B
35 }4 K7 d$ n3 U2 S
结果出现问题了,
" z0 e& C, E% U& R
: s" m& w; U6 Q' p! E& @接下来就是
" b1 q+ H' t. l" ~. f$ r
3 V& y5 S! K* Y! e+ J& ?直接爆出管理员账号加MD5…: M ]. O! _7 e' O% y
|