o' I2 R" ^" x/ n" K出现在评论处,小问题。放出来怕笑话呢。。! h2 A2 e8 |, C- k
01 }elseif($do == 'view'){0 y+ R6 g, x7 H5 G0 R
02
" _8 S. A( Z0 O8 e0 r' p03 require_once(dirname(__FILE__)."/global.php");
, ~! n" P/ d; k) L) d- F# @, Z04 require_once(MYMPS_INC."/member.class.php");0 R) Y- U4 a. c% W8 u& M
05 require_once(MYMPS_INC."/ip.class.php");% e/ Q: _$ q! u, e/ Y9 N
06
) r$ d5 b! _) ~07 if(!empty($part)&&$action == 'write'){
% C# c& [1 `: ~; o$ [/ }% ^# `08 if(if_other_site_post()){
2 t) ? \* T G/ n! J h& E6 ]6 O' i09 $msgs[]="请不要尝试从站外提交数据!";' [+ j$ h+ E" I. u4 C' D
10 show_msg($msgs);5 ?0 q& @4 H5 T8 N5 M
11 exit();
4 _4 u! l0 u5 [, X* p12 }7 ?9 G* a0 ?: s+ J0 S: }
13 & K) L8 L1 q+ s5 U
14 + l% D3 B7 V& E
15 //mymps_chk_randcode();
5 _% h( f! X( t: D; ]; }16 6 G I# g' C9 d J
17 $content = $_POST[content];
/ C$ m- O# B( l o18 if(empty($content)){write_msg("请填写评论内容!");exit();}6 @% D7 B- I0 i& r8 P
19 if(strlen($content)>255){write_msg("请不要填写超过127个汉字!");exit();}" g v* }7 s1 A. {
20 $result = verify_badwords_filter($mymps_global[cfg_if_comment_verify],'',$_POST[content]);* u7 ^1 q) }4 F3 f2 S3 ~$ g- P
21 $content = textarea_post_change($result[content]);! f) Y' [$ Y9 `* K. k) T
22 $comment_level = $result[level];; F( y/ W" A5 V6 b; A7 c
23 $userid = $_GET['userid'];
0 n4 a/ w4 {; a2 Q24 % i7 @0 G; l; U4 ?) O9 i6 K
25 4 [& i" i0 o* M7 f
% D% D% ?8 K1 x" g# D, J9 M
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]."')");
5 z! J1 n: @( K: U5 c0 a27 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都没处理好。出现问题了。( f2 I& I( I, W6 ^ d( u1 t, t
28 if($comment_level == '1'){* z0 |8 E, Y0 a$ N6 L
29 write_msg("您的评论提交成功!","?part=".$part."&id=".$id);( j+ z" n0 d$ U0 I
30 }
) q6 l% e9 B" W" b" C- O31 else{
" g. P6 @4 M; O32 write_msg("您提交的留言可能含有违禁词语,审核通过后显示!","?part=".$part."&id=".$id);
3 \, a1 p# r: n8 o33 }0 b! ^9 e ?- I. P3 ~
34 exit();3 w" G. Y1 j! P
35 }2 l5 ^2 |# f& [! E, ]$ ^& D8 P
结果出现问题了,
; }( A7 s4 V+ w+ a8 e
& a0 N2 d" J0 j4 K3 z$ z8 ^/ D接下来就是# V7 T5 R# |; ~. G) H
( K& I3 W9 ~% ?! i5 `
直接爆出管理员账号加MD5…% v$ ^' Z5 G* b' I9 p
|