4 p8 N* k* `, ^: |! }
出现在评论处,小问题。放出来怕笑话呢。。
A* K: g4 I' B$ i7 W$ y( _01 }elseif($do == 'view'){) D5 p, [8 n4 S' X5 M; T( i
02
& ?# L9 N/ n# J$ c; q* C1 Y03 require_once(dirname(__FILE__)."/global.php");/ k# L. J2 |; J- M
04 require_once(MYMPS_INC."/member.class.php");, l9 c. W0 C1 \, M
05 require_once(MYMPS_INC."/ip.class.php");
) R' c& T; H2 G$ F" R7 Y7 W8 a06 " W' b+ L) ^. ~3 Q. s$ s C
07 if(!empty($part)&&$action == 'write'){. o4 _# k: R4 M2 H
08 if(if_other_site_post()){2 c* C2 V6 m0 d
09 $msgs[]="请不要尝试从站外提交数据!";
0 G4 P6 ~1 l' } S- t$ P10 show_msg($msgs);
2 B# t) g4 z* j9 ^3 o: Z2 u9 n11 exit();* e# `8 z- O+ A6 q" E# {9 |
12 }! z- s4 y. d" Q
13
& H) h9 b! Y" k6 r14
: L, i8 [3 G' h) A15 //mymps_chk_randcode();' {% L# o& g1 V o
16
) m. G& ~+ [5 [( L17 $content = $_POST[content];
6 `8 r2 @' A3 \( x _, f18 if(empty($content)){write_msg("请填写评论内容!");exit();}7 \! O; r; T5 r5 V& {6 L1 _
19 if(strlen($content)>255){write_msg("请不要填写超过127个汉字!");exit();}) ?6 {9 C5 _3 i) i+ d. I; D6 d
20 $result = verify_badwords_filter($mymps_global[cfg_if_comment_verify],'',$_POST[content]);
% Q. c5 T( G- u3 c21 $content = textarea_post_change($result[content]);
' C& S" f+ b8 J6 f( K22 $comment_level = $result[level];5 h* ~1 q) |2 G. B7 e
23 $userid = $_GET['userid'];4 S$ A) @: Y+ }8 N, O: m \- s
24 4 }$ |6 V" a" X' x9 M
25 . j+ Q% |1 T% a
; ?# L& p, V$ J8 ?8 L ]
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]."')");
2 e- C9 K% B% {( j3 S7 ?# D27 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都没处理好。出现问题了。
4 Q" }) C, j3 o8 @, I; b28 if($comment_level == '1'){5 f; B! @6 S& ?9 x
29 write_msg("您的评论提交成功!","?part=".$part."&id=".$id);
7 }' y% J" P& G! n30 }, c1 `& E# Y: H' K& ~0 m/ F" R
31 else{
" u- y I9 P/ F6 P: x# }32 write_msg("您提交的留言可能含有违禁词语,审核通过后显示!","?part=".$part."&id=".$id);
) t$ I! x7 J4 q7 u33 } F2 i8 i1 V8 w( u7 \3 d
34 exit();
. h7 N$ I+ m5 U6 _7 y35 }
' Z( L# O5 E+ S6 A5 d, {- ?& d结果出现问题了,
- _, [; m6 o9 p3 {! i* @
2 Z; @8 U$ Q5 o3 y% o接下来就是
3 v0 r1 F9 e7 C, a' M) c& i4 X" F' E9 K. \8 X
直接爆出管理员账号加MD5…5 P' @5 W7 A) I+ _/ ?
|