# H: x+ E, Y; `# b. |7 U, S
出现在评论处,小问题。放出来怕笑话呢。。( V; Y% w' v# H; J, S
01 }elseif($do == 'view'){9 J y0 a) B1 h! I G
02
* w* A. h3 ~1 _& j03 require_once(dirname(__FILE__)."/global.php");
1 c* [$ r5 v" q9 @, y% j" F04 require_once(MYMPS_INC."/member.class.php");
& v, b! ^6 H8 u2 y/ d# x2 Q- a05 require_once(MYMPS_INC."/ip.class.php");: q, C! f. Y* {3 m- Y6 O
06
- q8 D5 N$ g8 l J- j+ i3 \07 if(!empty($part)&&$action == 'write'){! s7 u0 U4 I. p; T& D
08 if(if_other_site_post()){
1 o% w/ {' D- S' ^3 R/ f, {5 |& r09 $msgs[]="请不要尝试从站外提交数据!";
: d6 D* a8 z7 c8 `. G# l10 show_msg($msgs);
* S' {7 x* n" g" T U) y; T5 R11 exit();
9 d+ z( B! B# {4 @' z" s12 }/ H! O9 O, L4 E+ |, a* I' g
13 " I8 g* P) }+ J
14
" }, m9 L% } l" {2 T% e u15 //mymps_chk_randcode();! _0 m' {2 ^' q+ F- H
16
' [% n/ g4 k! ?7 ]3 a( t17 $content = $_POST[content];
# `# O t8 ?$ f! F6 U18 if(empty($content)){write_msg("请填写评论内容!");exit();}
5 o4 L* x, w6 m# J; {. X19 if(strlen($content)>255){write_msg("请不要填写超过127个汉字!");exit();}. k2 }% n) _3 N2 C# K
20 $result = verify_badwords_filter($mymps_global[cfg_if_comment_verify],'',$_POST[content]);
! c4 `) F) `5 ~21 $content = textarea_post_change($result[content]);
3 x8 B V: `' v) y4 q22 $comment_level = $result[level];
6 @ w4 y+ ?4 n, H0 w5 u23 $userid = $_GET['userid'];
) D! u7 R( d" u9 b24
3 a! i: [9 O4 \6 v6 }$ ]0 r" y3 B25 : e( w2 j/ o: |/ d) H8 x i9 H% I
2 R- K/ V6 J0 ?4 w0 j) b6 |2 R
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]."')");' h. `* c' |1 `& I/ G4 z1 P3 y
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都没处理好。出现问题了。! `6 n- X9 @; h- v6 ~
28 if($comment_level == '1'){
) m4 |, ^! W! ~2 a# l; u29 write_msg("您的评论提交成功!","?part=".$part."&id=".$id);
+ d, L- {/ {* q; I- }30 }! f# d# a K" o* a% p; l- @
31 else{/ U5 ~6 z4 ]5 s, G1 n$ H: y( L( G
32 write_msg("您提交的留言可能含有违禁词语,审核通过后显示!","?part=".$part."&id=".$id);/ P4 {( O" o2 [ k! e2 S
33 }5 @7 d" O/ W0 Q: n6 t2 N. I
34 exit();
. e, U+ t" D; ?* D7 Z# I2 D6 i- r35 }0 S$ R& f2 g* ]0 N: R2 \
结果出现问题了,
6 s; F% D- X; d7 }, L O) J" D$ [6 } ?) i) l
接下来就是
9 q4 |, D% {; L# r( K
& _( \/ c+ T* M; l直接爆出管理员账号加MD5…9 z" x' K" [1 \/ E
|