0 e4 e x( [# V2 b. J2 i- E( z出现在评论处,小问题。放出来怕笑话呢。。9 h( |# {: I# {7 C# v5 F
01 }elseif($do == 'view'){
1 E& K+ z0 l- j- G- {% [ b# u02
7 L6 _5 o W$ P. n/ _03 require_once(dirname(__FILE__)."/global.php");$ Z6 f" F d5 S
04 require_once(MYMPS_INC."/member.class.php");7 N2 A A5 V: s# ^
05 require_once(MYMPS_INC."/ip.class.php");
+ U4 V! y7 X4 s0 B0 o" i06 + i# d2 j0 J+ ~) n
07 if(!empty($part)&&$action == 'write'){! ~% ~8 q/ h) x1 ]3 X6 [2 J4 o/ g
08 if(if_other_site_post()){! k$ j# _8 w& r$ I0 x8 O3 l$ \+ f, J6 M! B
09 $msgs[]="请不要尝试从站外提交数据!";
: c. V. _( A/ r. f- E10 show_msg($msgs);
, f) e2 D7 V) B0 V$ y" j11 exit();
1 P$ f: P. m' }' F! A) d4 u12 }7 s% w1 w8 b6 b7 C
13
# b ~/ r, K1 Q6 {. V2 V14 8 ?- I; ]) L" V6 q$ [5 K
15 //mymps_chk_randcode();
/ R! U6 } g* h. i8 K5 g16 ) E, V8 P7 N3 n8 g7 R, R$ X; F
17 $content = $_POST[content];3 M7 N" w5 u; m+ k9 J9 V! w- C9 m' h
18 if(empty($content)){write_msg("请填写评论内容!");exit();}/ L9 H, l" e$ C: R/ q2 W
19 if(strlen($content)>255){write_msg("请不要填写超过127个汉字!");exit();}, S2 a V) g7 {" r
20 $result = verify_badwords_filter($mymps_global[cfg_if_comment_verify],'',$_POST[content]);
1 D4 c: |8 h9 ?0 j: g3 u21 $content = textarea_post_change($result[content]);7 E- v9 A( E6 _& Z& b) m
22 $comment_level = $result[level];! O2 ^( _5 @# ~* J
23 $userid = $_GET['userid'];: A- s0 p! T' T7 y$ C% \
24
, p( |( u* j3 f25 . g- ?& L5 `( V* @" ?& x
6 P" l! A) ]$ f- z) y. 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]."')");
4 t# a3 J7 K) r27 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都没处理好。出现问题了。
3 L3 ]2 R) p8 C4 |& J# h# m+ R28 if($comment_level == '1'){- Y$ { t* `& {& N9 E$ j
29 write_msg("您的评论提交成功!","?part=".$part."&id=".$id);
# S% ~% c6 W k9 O1 E1 w( ~( c( o30 }. l" o- i6 |5 z' P6 _
31 else{
7 J: r4 \/ ^6 L2 ^32 write_msg("您提交的留言可能含有违禁词语,审核通过后显示!","?part=".$part."&id=".$id);+ r: ]8 Q& z) u
33 }4 L! a$ C! l6 X- p& P
34 exit();. g# X* O+ H0 m- U0 C; f% ^
35 }
& Q. [( H1 E ?2 {结果出现问题了,
" E* a3 c/ i4 h* \" C; d7 S1 t" `! P( F$ R* r
接下来就是
% N E/ ^( f+ b# G) _4 s. {6 S3 o) W
直接爆出管理员账号加MD5…
) [- H' ]/ K" f. }0 v |