F! H* F# ?9 d; M/ i
出现在评论处,小问题。放出来怕笑话呢。。
3 r' s% Z _+ j, o- ~$ ~01 }elseif($do == 'view'){
, H+ b3 g# E/ Q4 p+ K" c02
$ K @+ t& |3 u' ` v03 require_once(dirname(__FILE__)."/global.php");* S. x, E0 \" g/ p% C4 ~
04 require_once(MYMPS_INC."/member.class.php");
! I1 |- b- q$ o1 R; V05 require_once(MYMPS_INC."/ip.class.php");
% b& Y4 } n4 x" h, C# A06
6 S- s" k0 g0 U07 if(!empty($part)&&$action == 'write'){1 I& j! ~8 J0 A4 {, U
08 if(if_other_site_post()){
: @" w7 N6 L9 s: B09 $msgs[]="请不要尝试从站外提交数据!";
0 L' [. q* z e, N10 show_msg($msgs);
& N- i) {, o0 V" R" J( M11 exit();3 t6 `5 {+ s- L, o4 c, f! J
12 }
1 @4 V. q- h! ]+ g+ l2 O13 - L( |6 _( G6 l5 S8 g
14
: [2 `5 F' A; B+ }- ^( v3 q15 //mymps_chk_randcode();
9 Y p: B' N% o: X9 b! J, [- h" {16
& j' B) P, f6 m& P17 $content = $_POST[content];) S5 P) M6 J# M2 `, C7 R9 [
18 if(empty($content)){write_msg("请填写评论内容!");exit();}* N, G) P. Q! M7 G
19 if(strlen($content)>255){write_msg("请不要填写超过127个汉字!");exit();}
! n! C8 k1 V, h4 |2 E9 j20 $result = verify_badwords_filter($mymps_global[cfg_if_comment_verify],'',$_POST[content]);
- ^3 X( d. R- b& I21 $content = textarea_post_change($result[content]);
) v& c8 j5 _- a" }1 L22 $comment_level = $result[level];
3 H" i; {, {) D( D0 I23 $userid = $_GET['userid'];
+ m0 `7 _- b4 J& ~8 I24 7 f% t2 z) o' A' j
25
7 M( Y. u5 C4 j, p: Q6 l9 C; V) }( H" u+ U! a8 s
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 K8 _( L7 R& S! C, C0 E27 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都没处理好。出现问题了。- ^- W0 u2 g: ^' F
28 if($comment_level == '1'){7 d+ z' [7 v0 h8 j* l
29 write_msg("您的评论提交成功!","?part=".$part."&id=".$id);
$ S7 @& g: Z/ J1 @30 }
3 I/ V. x/ h( O, d31 else{
! e+ i% e7 s; r! z3 h3 W/ d' l32 write_msg("您提交的留言可能含有违禁词语,审核通过后显示!","?part=".$part."&id=".$id);
6 h( G+ Z5 o+ m33 }
! M" p( t# m& p' P: }( I34 exit();
# d& z+ u8 G: w. O8 _- s35 }3 [# J4 {9 _& [, y5 ^! w7 O" d, o
结果出现问题了,8 W3 T( F% u5 I. ?9 v
! w/ V( ]/ c, r0 ]' L2 B4 x6 E2 i
接下来就是; I& X4 O" ^9 h! t) h" W
* {5 R% p0 _8 \: \- H直接爆出管理员账号加MD5…9 R+ _4 J6 b$ u% I6 ?8 j$ D
|