) H+ d8 f. o# f3 z出现在评论处,小问题。放出来怕笑话呢。。8 g/ L; ^3 r* Z+ T
01 }elseif($do == 'view'){# @+ h2 U V* M# C$ B9 i0 e
02 1 k {' m' n8 j+ E
03 require_once(dirname(__FILE__)."/global.php");8 q8 Y7 ^! E4 l' A/ H
04 require_once(MYMPS_INC."/member.class.php");
w# j5 g' {4 w) F05 require_once(MYMPS_INC."/ip.class.php");, v( e5 e6 l) y
06 $ l6 Z# W; a7 Y) u- ]
07 if(!empty($part)&&$action == 'write'){, F, v1 ^. ]0 w& C7 c: E
08 if(if_other_site_post()){9 A( Z9 O$ L! a2 O$ ~6 `
09 $msgs[]="请不要尝试从站外提交数据!"; V. U* X' W. A
10 show_msg($msgs);
3 X3 p! l3 r \7 E. K3 ]: ^" B. I11 exit();% l& }$ ~9 m( G7 Y4 w5 r
12 }$ r# A5 W- ?; A L
13
- u" j" M! }+ M& s/ u/ s) D& K! _3 T2 C14 ' \$ N( ?2 \' Q" N) Y- `) X4 F8 K! I* y
15 //mymps_chk_randcode();* `) |7 G% G0 ^
16
) n, N# E# p/ i2 S0 g* J17 $content = $_POST[content];
$ y M1 W; D5 _& E1 V; o18 if(empty($content)){write_msg("请填写评论内容!");exit();}8 j9 S7 A2 `0 H$ B
19 if(strlen($content)>255){write_msg("请不要填写超过127个汉字!");exit();}
8 O- z' k4 J4 J' b; R# Z4 s, |20 $result = verify_badwords_filter($mymps_global[cfg_if_comment_verify],'',$_POST[content]);9 ]$ K$ o" B+ D0 S
21 $content = textarea_post_change($result[content]);' y0 M3 T3 N7 y: s
22 $comment_level = $result[level];8 N7 U0 R7 F; L3 s; c5 W& {
23 $userid = $_GET['userid'];: l& y; m3 w& z n4 v- n" b4 f# q
24
' z9 S6 [2 R1 M+ b( w+ L7 m25
0 D, N2 q9 t" q4 u1 [5 _0 ^- p- j6 |
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' ~, _' _5 y: P. i' p
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 [8 K- L8 H$ y4 P( v% @# a2 o
28 if($comment_level == '1'){
9 U$ J2 }! B {) i# \& u29 write_msg("您的评论提交成功!","?part=".$part."&id=".$id);0 f: b: X9 v- K8 {# @3 i( A
30 }
0 p3 @% \; A% j' S& D) U31 else{
, c G9 B. S9 D- `% p. l32 write_msg("您提交的留言可能含有违禁词语,审核通过后显示!","?part=".$part."&id=".$id);
! s0 Z0 S, \) r# j5 ?8 ~33 }
5 Z8 R. I/ y# K+ o- M34 exit();
- Q$ p3 S6 }! m7 X- z35 }
0 e: z+ L5 Z! o1 j6 I/ ~结果出现问题了,
! Y/ \+ K$ J# y) }5 I$ L3 N+ R; E2 n) s* q8 x
接下来就是
+ p$ A6 i0 n e G+ c
; c8 e7 m5 m6 b( @& z3 P直接爆出管理员账号加MD5…
2 g9 J, W2 `5 L/ D4 X* x |