9 a# m& J: R8 Q" b$ W% z1 l) u
出现在评论处,小问题。放出来怕笑话呢。。
$ F% f3 z! m/ k" D01 }elseif($do == 'view'){. k! ~- f1 f: e) b# q) F
02 # v' w1 D( p0 ~! N2 U
03 require_once(dirname(__FILE__)."/global.php");3 O8 p* H2 @& Z& {
04 require_once(MYMPS_INC."/member.class.php");( S, v- @; ?8 W8 [
05 require_once(MYMPS_INC."/ip.class.php");
: w5 E; k6 h2 ^! m6 K. ^06 `! R9 R' Q7 W$ I
07 if(!empty($part)&&$action == 'write'){
9 ?, N, o m2 B* x6 d, ^08 if(if_other_site_post()){! l% f7 Y4 q# `
09 $msgs[]="请不要尝试从站外提交数据!"; c4 \. K6 f/ Y1 h# _
10 show_msg($msgs);4 _/ a6 o. K& b/ G. ^0 u# ^
11 exit();6 W$ d$ }2 g# c! X& X# V
12 }
. a& x" N5 l: j1 m9 v0 C13
& f7 N+ Y% Q9 R# L( j8 v# N4 [14 6 M% E7 W, ?7 R7 u9 V+ x8 b
15 //mymps_chk_randcode(); H# o* Q8 D: I/ q% M+ \ m( [
16
7 W/ b9 j( _) q l17 $content = $_POST[content];
7 ]+ m- R8 i5 n. ~; t18 if(empty($content)){write_msg("请填写评论内容!");exit();}
9 L' J/ E m G+ K3 M19 if(strlen($content)>255){write_msg("请不要填写超过127个汉字!");exit();}" }: a$ }" ?/ Z
20 $result = verify_badwords_filter($mymps_global[cfg_if_comment_verify],'',$_POST[content]);
$ Q/ C3 a) w! r7 O3 V0 O21 $content = textarea_post_change($result[content]);
4 v5 m* l0 e; @22 $comment_level = $result[level];7 |* C2 H, u3 q: S5 o2 p
23 $userid = $_GET['userid'];! P3 H) w* |: ^- }, V9 l- U" G
24
! t+ K0 q2 R8 y2 o' P, E0 g25
9 L( E9 U' g {3 r9 Y( M: E
; K$ V5 K1 Z' {8 J26 $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]."')");
, S/ p# ]- O, p& ?' S* n27 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 S! H) W1 u% l* H& _
28 if($comment_level == '1'){
" [! t. _9 O, F29 write_msg("您的评论提交成功!","?part=".$part."&id=".$id);- ~" K5 c: a* o+ b1 K+ x
30 }& G" M% j9 H7 x
31 else{- C- Z6 y3 K: H) J d
32 write_msg("您提交的留言可能含有违禁词语,审核通过后显示!","?part=".$part."&id=".$id);8 J/ c! Q6 E: B+ r7 i
33 }+ S- }6 M5 Z' t1 u
34 exit();
9 H8 K( x# ^' U P" A8 L35 }* O) k" M, G2 {& U4 x/ ?2 i6 N
结果出现问题了,
4 `6 d& Y% E6 q, X/ y/ b( }! k. E! K" ~' a( V. M/ ^& i
接下来就是
: X' s4 Z: z! t' _/ I; \
7 G7 C- ~ {; v' y0 _直接爆出管理员账号加MD5…
) S; K0 q, d: C+ l |