% B/ h/ ?# U. q/ P2 I: z1 f7 x
出现在评论处,小问题。放出来怕笑话呢。。8 {1 ?' w- o# L l6 [4 E
01 }elseif($do == 'view'){
( @; Q( L/ x c1 R2 x2 Z$ P& K$ n02
& ?, j7 G* {! U, u- R03 require_once(dirname(__FILE__)."/global.php");
# m' F/ o2 w6 Z# t" ~04 require_once(MYMPS_INC."/member.class.php");
7 Z! `2 c! H8 ~ i/ G7 V05 require_once(MYMPS_INC."/ip.class.php");$ y, B4 \/ _/ k4 J8 K+ Y. z
06
" A8 v1 x7 k9 {0 }# u07 if(!empty($part)&&$action == 'write'){
) `* X4 p! c' c. L1 ]08 if(if_other_site_post()){ x# y4 |; u* a9 Z/ N1 ~" b2 {) A
09 $msgs[]="请不要尝试从站外提交数据!";
+ M5 J1 V) _8 N2 C5 H4 d5 C10 show_msg($msgs);
. V8 S7 G2 \0 n- B! J: I11 exit();
4 e- l9 l4 B2 r) \2 h% F12 }# s& X0 ^; N: I: e
13 0 J) ^/ S" p( @: ~3 K
14
1 @6 F. m0 D/ ^8 ^15 //mymps_chk_randcode();0 e0 s& J- M0 s6 Y" W( Y- v
16 ' Y6 y+ {2 l# T% B8 z, U h
17 $content = $_POST[content];
, y# Z' G, E1 |3 |5 G) y% o- K18 if(empty($content)){write_msg("请填写评论内容!");exit();}1 V4 a# _7 ~1 _" k, b' H2 K0 X; |
19 if(strlen($content)>255){write_msg("请不要填写超过127个汉字!");exit();}+ Z: F) n. Y* T0 G& i0 {/ ]- N
20 $result = verify_badwords_filter($mymps_global[cfg_if_comment_verify],'',$_POST[content]);7 q C. j1 s5 }# l( K1 b
21 $content = textarea_post_change($result[content]);
9 G* k- W! O3 E. D# _. r7 d8 H, x22 $comment_level = $result[level];3 V+ N" z9 e$ W
23 $userid = $_GET['userid'];2 h, j3 \# z" v" K/ \! A" c' e$ [
24 # U; d" F! w% _/ @7 R- G
25
# X; s2 Z5 s) {8 N+ S# ]6 @8 D1 Z% r# U+ [
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]."')");) r) e4 B# L7 p1 i, S
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都没处理好。出现问题了。
0 U- d2 {0 o/ e& d# T28 if($comment_level == '1'){; ~0 U5 b+ v" M
29 write_msg("您的评论提交成功!","?part=".$part."&id=".$id);: m5 N1 V( h0 T$ ]* U4 W
30 }
* @& j# `$ D8 f31 else{) F3 m; I' D# `% a) a0 N
32 write_msg("您提交的留言可能含有违禁词语,审核通过后显示!","?part=".$part."&id=".$id);. ?% s( `: O: w5 D2 D
33 }
9 |6 {" a& @( l' I/ r* [34 exit(); B8 o' N0 h, n) I2 E* Q% B( n
35 }7 [8 S: F3 ^) ^/ ?" I5 X" W+ _
结果出现问题了,+ i! c) A5 [) B' C( M8 J, F
. D. L6 q4 g8 O6 I* j
接下来就是
- d R3 D* _! P& f7 E E* L/ H7 k" l& p+ H& q/ L5 ?
直接爆出管理员账号加MD5…9 f7 j p2 v! c( z) K" P; H5 U; H
|