( q1 r/ `) K) [+ R' ~, t% t& V$ w出现在评论处,小问题。放出来怕笑话呢。。
1 G% M$ Q- l! \1 d4 U2 ]01 }elseif($do == 'view'){7 m/ ~9 H- \( p1 }* K
02
! _+ z6 |$ e% g* A1 [) {. d3 W6 O03 require_once(dirname(__FILE__)."/global.php");3 z: {9 h" h9 {: K3 E
04 require_once(MYMPS_INC."/member.class.php");6 x5 q+ e7 `, f% P: k: k/ i
05 require_once(MYMPS_INC."/ip.class.php");6 `! k& _# w6 S6 i: V& s! P$ r
06 8 x( S# K% w. o. T3 u4 o
07 if(!empty($part)&&$action == 'write'){8 K5 D2 y, E; Q6 `2 R' {
08 if(if_other_site_post()){
7 f* o: U8 W1 \) B! B7 x09 $msgs[]="请不要尝试从站外提交数据!";
* d# U' E- j2 e n10 show_msg($msgs); t2 V+ _. m1 v6 U9 M+ r: @
11 exit();
3 S2 o8 x; ~5 n; ?9 W0 g) R8 c, F12 }
& A: ]7 ^: x$ g! X; y+ Y, U3 J$ M# S13
- A0 C8 @" m+ ^9 P% P% O, Z14 * H1 d0 L4 J, C
15 //mymps_chk_randcode();7 E) k4 Y9 _ Y4 W- W7 p9 x8 S7 o
16 & n4 N$ X: e S; \% u- P
17 $content = $_POST[content];
5 c9 p! M0 s7 d, v5 C O18 if(empty($content)){write_msg("请填写评论内容!");exit();}, z$ v4 n* | W- |( `
19 if(strlen($content)>255){write_msg("请不要填写超过127个汉字!");exit();}
8 ^: _ z5 D% W# k$ w/ }% \, @+ S20 $result = verify_badwords_filter($mymps_global[cfg_if_comment_verify],'',$_POST[content]);0 j( c, ]0 {$ z9 }; y
21 $content = textarea_post_change($result[content]);+ n! D$ j+ t' o* U0 M" L* ]0 |
22 $comment_level = $result[level];
( o" u y* M, P3 F: s23 $userid = $_GET['userid'];
* Q& a4 ]) F" M' l: o. u" }24
# ]$ w- l1 a' G3 `: d; e4 R25 ; M4 j/ k6 \0 ^: C) f+ j a
! _/ V4 l) l) P; F+ P26 $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 N6 S& x6 N9 J
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都没处理好。出现问题了。
' G: q8 U; y! ]6 \* g$ B28 if($comment_level == '1'){
% `( e: p( O1 f, f29 write_msg("您的评论提交成功!","?part=".$part."&id=".$id);
. }* g; O- q. f* n30 }
% `% R$ ]& d/ ^) J31 else{ |8 ^9 V- v( i8 ~2 W' _
32 write_msg("您提交的留言可能含有违禁词语,审核通过后显示!","?part=".$part."&id=".$id);
+ D3 u% x1 N: t7 P2 w% I33 }& [+ l# t* i5 E& q! y5 Q2 T0 F" a
34 exit();
. n- m# @ K9 W, A& \. P6 ]. ^( _. u35 }
& ]4 ^; D4 ]& N6 w" O% ^' v. b结果出现问题了,2 I" Z7 K' p1 g2 y2 M5 s+ I
/ O0 Z& k* n$ h" ~8 P4 | n# C. g& i接下来就是
5 [; d/ L3 f# m+ o+ X- ?
# X# z1 I. E! ~# ?6 _4 {直接爆出管理员账号加MD5…
V N# n+ h' r |