: l5 B7 `7 S. e5 a$ Y a
出现在评论处,小问题。放出来怕笑话呢。。
" C; b" w* E% m+ d+ s5 J01 }elseif($do == 'view'){0 U! U9 k- g$ p' J
02
" w: W0 W0 F4 h4 o' j4 O03 require_once(dirname(__FILE__)."/global.php");
) E2 r" i" g& ^5 ]/ n04 require_once(MYMPS_INC."/member.class.php");
3 B2 ?) Y; Z- M1 S4 W6 z- [/ I05 require_once(MYMPS_INC."/ip.class.php");) S% \& R. v- M# _
06
. F( _) d4 B7 C' }. A3 C& Z07 if(!empty($part)&&$action == 'write'){$ @! G0 K+ H- o. Z7 S
08 if(if_other_site_post()){$ i7 V3 r6 W4 }: ? \" J
09 $msgs[]="请不要尝试从站外提交数据!";; I8 {# j% ~4 f" a+ j7 O. |: ~- V
10 show_msg($msgs);
w( f9 A3 W" r8 o11 exit();
( J4 F2 l7 f& z& }+ p& i12 }
3 f# k; U1 Y3 P; W13
* j q; q8 V' h4 }2 q% v- W14
( y2 C$ D/ z" f; I- D$ H3 X15 //mymps_chk_randcode();% c' g8 p" j8 j; \$ d
16 - n, K! s4 u; Y6 q& R, {, N( G- |
17 $content = $_POST[content];
( T- g3 e- L+ c. d18 if(empty($content)){write_msg("请填写评论内容!");exit();}" T; h7 R4 G6 b) K% }5 X
19 if(strlen($content)>255){write_msg("请不要填写超过127个汉字!");exit();}
; M) w# x. l) d) Q% {. r; g20 $result = verify_badwords_filter($mymps_global[cfg_if_comment_verify],'',$_POST[content]);* e2 t4 {' M1 k, ^2 i
21 $content = textarea_post_change($result[content]);4 Q$ W# [+ I6 p& X V6 C9 O
22 $comment_level = $result[level];5 h5 I- |) U0 u0 K+ |; G% E6 R6 B
23 $userid = $_GET['userid'];
/ t6 I3 h0 t# M `/ Y% E0 c! M( N24 & M c! S* D3 G/ K V
25 1 h. j- ~2 }( k5 g$ _
4 B" i* B6 _% J
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]."')");
6 d* L) O' j/ k- h27 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都没处理好。出现问题了。
x. H5 _3 N1 ]$ G28 if($comment_level == '1'){
% G1 J' o4 S. Z: u6 q29 write_msg("您的评论提交成功!","?part=".$part."&id=".$id);. x: N; o$ t, x& T7 A/ h. K
30 }
6 _2 t. f R1 B& q31 else{
, `* x) r) I$ K+ S0 J3 k32 write_msg("您提交的留言可能含有违禁词语,审核通过后显示!","?part=".$part."&id=".$id);
) [! x+ v! Z* S. b* n6 U3 n v33 }! y S2 F" ]& R
34 exit();
9 r, S, |! B4 h* J) R3 {9 L35 }
5 K- E, j3 F6 v2 n结果出现问题了,5 J" P/ j; X0 n0 Z
% A# a5 e( z8 Z9 w; U8 f接下来就是. `5 c- r# r, G# n& @
& ?4 j2 E, q8 J% S O- i8 A/ W: P
直接爆出管理员账号加MD5…
2 c/ d/ Q" J6 N! v2 D, |1 E! H9 I2 m |