. j( `1 v8 u2 m+ g L) W: h' d出现在评论处,小问题。放出来怕笑话呢。。
5 m- T9 U# m ?/ `6 s01 }elseif($do == 'view'){& Y a! b- C, Q# A0 D; c
02
& @% e) X- b) d2 u, z03 require_once(dirname(__FILE__)."/global.php");
" J% c/ S/ d, v! \04 require_once(MYMPS_INC."/member.class.php");" J, G& V9 y( G
05 require_once(MYMPS_INC."/ip.class.php");+ @0 V) C* R( X
06 0 h- K: w8 @) }. F& x
07 if(!empty($part)&&$action == 'write'){6 ^/ |: C6 {4 z8 k1 v6 c
08 if(if_other_site_post()){+ Q3 y# H3 F9 `
09 $msgs[]="请不要尝试从站外提交数据!";
- P/ \$ @! f- U- C/ X8 ^7 I10 show_msg($msgs);
$ k/ k! y$ M$ v) c& q1 f11 exit();
* n7 [( `# P; j7 Y9 y E# P12 }
0 q% F- D, s6 i/ Z3 ?13 0 O) D6 t, Z- S
14
- a; z* }% V) o7 N* ]; q15 //mymps_chk_randcode();
- M$ L3 E# F& I8 \1 I* @7 y16
4 d4 i6 Y! c7 H17 $content = $_POST[content];
! K$ i/ {% o% m& x18 if(empty($content)){write_msg("请填写评论内容!");exit();}2 J6 Q! i4 r; k% }
19 if(strlen($content)>255){write_msg("请不要填写超过127个汉字!");exit();}. {" f. M4 l6 I# |) ^8 P' d4 w9 z
20 $result = verify_badwords_filter($mymps_global[cfg_if_comment_verify],'',$_POST[content]);
7 R! B. h. x2 K% w8 w21 $content = textarea_post_change($result[content]);- x! e4 R, R& r7 z( f; t, D
22 $comment_level = $result[level];
$ {0 ^% W, l0 M& H: J23 $userid = $_GET['userid'];
' ~8 q( ?5 `% [$ j24
/ }: j# b6 h/ k+ B0 G: _6 s4 v& d25 ! B0 H5 b' n$ d
* m- k8 H8 i9 b s: K
26 $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]."')");$ l f0 K9 J+ y* F/ J" u
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都没处理好。出现问题了。" r; ~% v' |& g2 |0 a
28 if($comment_level == '1'){
0 R! ?' p/ }- Y D9 V! a29 write_msg("您的评论提交成功!","?part=".$part."&id=".$id);
d# M+ U" Z' r a- i' K0 Z% m30 }+ l& r5 ^* i7 G. _1 \
31 else{9 N9 g. z1 C! D% B
32 write_msg("您提交的留言可能含有违禁词语,审核通过后显示!","?part=".$part."&id=".$id);, c, p: E2 G6 Y
33 }2 W8 D2 K& H5 Y7 j9 z
34 exit();
7 \1 Y T6 A, ]/ i9 i35 }4 y/ s7 ^3 C& p- g) b. u
结果出现问题了,
7 T' V0 v& D9 V# [. X' \
# i( ^0 g7 N9 i( V- r接下来就是
+ ]8 l5 I1 a8 g) Z$ _/ _ c F* ~+ u$ \& m/ l
直接爆出管理员账号加MD5…- w4 y+ q$ f' Q% }5 S5 u1 U
|