9 K& \* n6 i/ L( Q
出现在评论处,小问题。放出来怕笑话呢。。
7 m# _# c3 x4 m1 i" [$ f2 [01 }elseif($do == 'view'){( ?( P1 X1 \) m+ ^6 H1 f* K: Y
02 3 _3 Y, }& @3 b& J) A! N& q) b( m
03 require_once(dirname(__FILE__)."/global.php");
/ ] w/ d8 m# f- f( z$ B6 q04 require_once(MYMPS_INC."/member.class.php");5 h8 J+ a5 T3 \# p* U. h: u8 D6 [* U! f
05 require_once(MYMPS_INC."/ip.class.php");: |5 c; f/ D7 ~ S A. D
06 ! I- n8 o5 [$ q% L, M/ _
07 if(!empty($part)&&$action == 'write'){& @' o1 T# }8 w
08 if(if_other_site_post()){3 x/ {2 r) D) ~ C7 R+ e9 y
09 $msgs[]="请不要尝试从站外提交数据!";* O( A6 }$ |& r1 Z
10 show_msg($msgs);# j, u' w s0 l' O
11 exit();
2 Y; W' P# t7 N D2 o: y0 @/ h12 }$ u5 F; B% o4 [8 Q( t- D! N K
13
: @" |( \8 x# R2 D1 ^* ]14
5 |' v( A+ ]: l. j) `6 j15 //mymps_chk_randcode();2 w0 C% ]& u) Q( N' ~- `; M! z! `
16
4 @) s1 c2 s# ^& b( x( W. ~+ L6 X/ h17 $content = $_POST[content];
' B4 u: S' z& D9 O18 if(empty($content)){write_msg("请填写评论内容!");exit();}
/ X) x- R' r+ {2 ?' L+ w19 if(strlen($content)>255){write_msg("请不要填写超过127个汉字!");exit();}& e0 T8 }, i0 r
20 $result = verify_badwords_filter($mymps_global[cfg_if_comment_verify],'',$_POST[content]);! B& @, S. d( h; ?! {3 j( J' G
21 $content = textarea_post_change($result[content]);( d. F* w, ]. W& s% ?3 L3 V/ Q6 D
22 $comment_level = $result[level];' \& T4 ], O2 r$ q$ \
23 $userid = $_GET['userid'];, o/ q: d4 }8 U3 z+ e% z
24 7 b$ J0 R$ r! V. u- P
25 ! {# ~' w5 E- s A& U; J
2 d ~4 }, a4 O6 t- i
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]."')");
2 J* N' p, L4 `5 G/ I; X27 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都没处理好。出现问题了。# G, \: j, Q' s2 W0 f9 y5 E
28 if($comment_level == '1'){
s! D7 p5 _( z3 L1 S29 write_msg("您的评论提交成功!","?part=".$part."&id=".$id);4 l3 U8 Y1 Q- X
30 }
4 |8 F5 f3 @! ^6 X( H2 f, k31 else{
6 n0 U. g! ]; V( Z! W2 E32 write_msg("您提交的留言可能含有违禁词语,审核通过后显示!","?part=".$part."&id=".$id);
* C# n) ]1 j: z8 S+ B* R; T33 }
# u+ T4 A( [% }34 exit();+ T/ R) L+ H1 W C5 b' E
35 }
. z& X% U% H* ?0 f结果出现问题了,, q) \1 O( F" I& t
~* d6 s2 |) X& Z) y接下来就是
! i5 O) w$ ~9 t# ^2 @6 P4 r
- L. E. K* Y3 {6 b' M2 h4 N直接爆出管理员账号加MD5…
. l S9 y0 m( ?" r0 _% H3 f |