& j8 d) p: e. `+ S: W
出现在评论处,小问题。放出来怕笑话呢。。
) f& \9 k+ ~& {0 }1 l% b! ~01 }elseif($do == 'view'){
7 R5 L2 A9 C4 Z& a$ x02
2 S2 r/ X# i/ @2 K v3 \ x03 require_once(dirname(__FILE__)."/global.php");* N- m1 H9 E9 G; H7 e! E
04 require_once(MYMPS_INC."/member.class.php");
. h4 S3 d/ [* ^7 a05 require_once(MYMPS_INC."/ip.class.php");
/ B, a, C. }/ D/ k6 L06 8 Y, e9 R( G+ @- ]6 d& {
07 if(!empty($part)&&$action == 'write'){7 R7 v: G# _; Z6 o3 m8 ~' ?! D
08 if(if_other_site_post()){) |9 S5 j+ _) {+ ~4 O% a
09 $msgs[]="请不要尝试从站外提交数据!";
$ ]$ ]& G3 J# }3 e( f I10 show_msg($msgs);) ?" R; O# l& I$ o
11 exit();- k; b, l- v. \9 q# f. \
12 }
5 }, K4 I# U. Z! b9 E6 O( e5 n& _13
2 h5 P: Z1 ]3 d8 i& {14
2 A3 z7 L: ?" }15 //mymps_chk_randcode();& r; J- w5 @: m# T- K
16
3 V* ^3 y& s/ [5 Z/ W7 o- j9 H17 $content = $_POST[content];
+ M8 [8 o5 F0 z% b18 if(empty($content)){write_msg("请填写评论内容!");exit();}7 x7 @6 L* r+ \% Q: P) S! w
19 if(strlen($content)>255){write_msg("请不要填写超过127个汉字!");exit();}( _3 B* e# S6 Q7 s2 ^2 k
20 $result = verify_badwords_filter($mymps_global[cfg_if_comment_verify],'',$_POST[content]);
. c& e9 x, c' ~' P0 x) R8 A21 $content = textarea_post_change($result[content]);
2 D4 t' c% d' C* j" I) g22 $comment_level = $result[level];
% l- k/ o' S Y7 N. s23 $userid = $_GET['userid'];( o2 ] ^$ z5 o- f
24 ; a, T$ x8 f! U, z1 e
25 $ H+ Q2 u+ Z# V+ T9 N9 u! M
# n, p( I0 H4 i4 J4 @. N& H5 C' F26 $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]."')");
7 ^+ j( s( U3 v! e; @# x7 {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都没处理好。出现问题了。
2 M0 M; v7 d8 r# Z28 if($comment_level == '1'){* B) ]' X0 U& \8 S! e( u9 f
29 write_msg("您的评论提交成功!","?part=".$part."&id=".$id);
" C8 `. ] s4 L# h3 O# r4 b, x30 }
9 `8 Y: ~5 O. M# |31 else{
( R4 y4 g: K. c: A+ V0 L4 D32 write_msg("您提交的留言可能含有违禁词语,审核通过后显示!","?part=".$part."&id=".$id);& R0 ]" ]5 e8 |3 p! E
33 }; P2 |2 V" L4 V" i) j; G) A
34 exit();1 N/ i: [% b/ Y; r% L
35 }
* p q( L e5 i4 N6 F2 @; P6 v& b结果出现问题了,5 [3 k: S& t$ B7 f( b, W9 g/ Y
* p( h& V3 x+ X F5 N7 f接下来就是
* [- k. b- U# J0 g |! d1 h
& k, W/ ?0 f e$ s: @, Y2 i1 [直接爆出管理员账号加MD5…
/ u' _7 C, |+ Z* M8 ] |