* t6 ^7 L' Z z J4 g出现在评论处,小问题。放出来怕笑话呢。。1 n( v9 `* ]4 ]9 R
01 }elseif($do == 'view'){
; ]- I4 J0 c+ B/ o, e8 X( _! y" B02 % ]& c9 V6 `$ a' }
03 require_once(dirname(__FILE__)."/global.php");
$ A/ x0 ^& z6 d& x" h04 require_once(MYMPS_INC."/member.class.php");! `' |) a! x! P9 }$ B. N8 ?6 i
05 require_once(MYMPS_INC."/ip.class.php");
! s0 [4 H" V4 u$ k" n6 f: Y6 d06 ) N2 ~! ?5 F8 I5 V4 Y9 T) d
07 if(!empty($part)&&$action == 'write'){
3 S7 n$ s- U6 J# j% j7 e08 if(if_other_site_post()){
" y" q+ S$ v( Y0 {& f+ ~5 l09 $msgs[]="请不要尝试从站外提交数据!";# K/ a9 l6 W6 H4 I$ ~, t" x
10 show_msg($msgs);2 W- M* X/ n/ B8 {! L( I2 o5 B
11 exit();
! q1 n* v4 G( I) Y12 }' W% m1 p& K( w1 |
13
0 L* l, z* u1 z14 ; @/ B& @* D6 u& o( s
15 //mymps_chk_randcode();5 U$ X# D4 l2 m6 u
16
: c7 Q, U/ _. z; e/ O# t17 $content = $_POST[content];
0 e" j5 i Q2 [- \& g$ z18 if(empty($content)){write_msg("请填写评论内容!");exit();}
) K% ^* f. z) H& I8 m19 if(strlen($content)>255){write_msg("请不要填写超过127个汉字!");exit();}
7 ], E p+ e& c7 |. L+ m20 $result = verify_badwords_filter($mymps_global[cfg_if_comment_verify],'',$_POST[content]);' d H' g) g9 j: v1 e5 a, q4 r% f& k
21 $content = textarea_post_change($result[content]);7 o$ K. @1 v" Y. \* {& |
22 $comment_level = $result[level];# ]( I! |; }2 M% a5 o9 ^+ m
23 $userid = $_GET['userid'];
) v' E, D% z/ [3 Y$ R24 - r3 V; W k. w
25
0 Z; K9 S+ l% z1 c5 z! b p( s( 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]."')");* I T! I! i$ z! z0 s
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都没处理好。出现问题了。
7 E5 Y1 n! ?* Y$ b6 ]! m' [28 if($comment_level == '1'){
7 e0 O$ }7 I0 ?0 B1 b, @" I' L29 write_msg("您的评论提交成功!","?part=".$part."&id=".$id);
# D; Z! q! }- B/ T2 P30 }
7 W8 m0 y0 W3 |7 Z( a31 else{
4 y4 P: h6 Q1 n* ]32 write_msg("您提交的留言可能含有违禁词语,审核通过后显示!","?part=".$part."&id=".$id);
+ O! m0 Q' n7 R33 }
# |5 o1 p8 Y: L+ y% {! j3 U6 B34 exit();+ P+ M; g/ v6 Z# D' Y
35 }
3 S. I+ e/ W, P( ?- Z ~3 k结果出现问题了,3 f, p" _6 R1 f Q8 R8 d
$ V! C9 L& F8 R- O
接下来就是
. P0 q- i( w/ l1 K9 d) F
8 @5 g( K& ^* U; D直接爆出管理员账号加MD5…8 b8 O5 \* d7 R) v6 f% t
|