B7 ^; f2 `' Z9 H" v. m G出现在评论处,小问题。放出来怕笑话呢。。0 D6 s8 z2 ]; y2 @' N0 [
01 }elseif($do == 'view'){
7 _9 L$ \9 O6 I b b02
9 s9 A J- F& ~) p( }2 y, ?03 require_once(dirname(__FILE__)."/global.php");8 l) d# z* Y& y# ?2 B6 [
04 require_once(MYMPS_INC."/member.class.php");8 C: X1 w+ O1 I- V7 |' B. b7 x
05 require_once(MYMPS_INC."/ip.class.php");
# Z0 n9 T2 x( k: e0 ]% e4 {06 + q3 e8 j: l. G1 s! P" w( [+ Y
07 if(!empty($part)&&$action == 'write'){! S- h4 f a4 x6 y( a+ k
08 if(if_other_site_post()){2 S0 q# A) c: m% B* L7 M# w
09 $msgs[]="请不要尝试从站外提交数据!";
' f9 v% |' R( |2 }- v10 show_msg($msgs);
" B& w2 J! W! F: {11 exit();4 w3 g5 K+ i+ h* X
12 }
, A* {+ g% L! g9 J13 # K( t( d( k# a) b- n' Q& o
14 - k* i* ?, ^* G+ _! `
15 //mymps_chk_randcode();5 o" r+ @$ k) I% q& @
16
* A+ f) t S2 V2 r17 $content = $_POST[content];
$ ~3 p. e1 P7 v. H$ P6 e& [18 if(empty($content)){write_msg("请填写评论内容!");exit();}" t5 ^+ v. H0 y6 r& R4 k' O
19 if(strlen($content)>255){write_msg("请不要填写超过127个汉字!");exit();}
) V5 J+ _; C8 g! G8 S# R1 P5 R20 $result = verify_badwords_filter($mymps_global[cfg_if_comment_verify],'',$_POST[content]);7 y! W& C, }. t; x% ?; O- G" M& s
21 $content = textarea_post_change($result[content]);, `! r" ?1 M1 L4 V
22 $comment_level = $result[level];
4 D" k @ ^# ~$ V5 t; w3 s23 $userid = $_GET['userid'];
' O I, F1 n7 A# `& R) @. x24
7 s+ z4 J" d4 m4 A% y. u25
S# C9 V8 U5 L* m: a" p
5 X7 |: o H5 ?6 W- g) ?6 o; \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]."')");8 C' b* ^1 H1 `- \( c
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 T7 \- j8 C) w! I) }" }+ K28 if($comment_level == '1'){
$ q R+ q: t/ E. t/ i8 R, J29 write_msg("您的评论提交成功!","?part=".$part."&id=".$id);7 v- f0 \6 x3 O& n
30 }$ y- l: a& P6 n6 t
31 else{3 t3 M/ x* P- N8 m& Z+ C! r2 T b
32 write_msg("您提交的留言可能含有违禁词语,审核通过后显示!","?part=".$part."&id=".$id);* A8 C( h' }: H! F! E* {4 j
33 }
' H3 b. \: J# i" y- X34 exit();
0 I, `# Z3 I8 Z- ]35 }% Q1 V. L$ J* J1 G4 j+ T+ L
结果出现问题了,
2 f7 l: @- {" |6 t" [( a4 ~( u$ o& x. B) q8 _8 Z
接下来就是! X0 ^! l3 y, u
* N! }* o5 r& p- o2 _5 I; L, C) D9 B直接爆出管理员账号加MD5…( z! ?' w& U7 u* ]) J
|