9 v8 Q$ y s$ d, h' L3 A# k( t: o
出现在评论处,小问题。放出来怕笑话呢。。5 \9 W& M' H' b; _/ a
01 }elseif($do == 'view'){
8 g# o) z0 u5 i# E" [1 i02
0 e' k) v7 P0 k03 require_once(dirname(__FILE__)."/global.php");
& z \9 s+ q- {5 T! s1 o1 S04 require_once(MYMPS_INC."/member.class.php");
6 Y0 y' z: P) B4 h5 v9 s' r05 require_once(MYMPS_INC."/ip.class.php");
/ Q) l/ x v4 W4 w06
1 q) ?. \# z1 F9 j& x07 if(!empty($part)&&$action == 'write'){
0 M6 R8 l4 O! Q! i0 d$ b08 if(if_other_site_post()){
, H2 I: k% ]3 r! n09 $msgs[]="请不要尝试从站外提交数据!";
, `8 C& d5 G6 c+ F; S' P10 show_msg($msgs);
K7 U! s5 l9 G& m$ |1 z6 O% @* ?% A11 exit();
! a, D+ t7 L- q0 R( k: X12 }
& F( ~ w* @0 B2 x# c- {13
+ ?1 [$ b3 U6 I) ?0 P% w) f- s% O14 , g% O" `+ `8 f8 K
15 //mymps_chk_randcode();% T' R' D: w% x7 ?: V
16
/ e6 e n& D) |3 ^17 $content = $_POST[content];5 Y2 ?; u5 H4 u/ ]; u- c9 j7 [
18 if(empty($content)){write_msg("请填写评论内容!");exit();}; n M: |6 Z/ H Y C
19 if(strlen($content)>255){write_msg("请不要填写超过127个汉字!");exit();}& ^' J: ^0 U3 `( w
20 $result = verify_badwords_filter($mymps_global[cfg_if_comment_verify],'',$_POST[content]);
) R/ p/ _/ [; A1 U21 $content = textarea_post_change($result[content]);
8 K8 M/ h& F9 W+ u22 $comment_level = $result[level];) g# h' ?/ S2 `% J
23 $userid = $_GET['userid'];& n& L$ `$ `' q3 I9 f8 `
24 1 A4 r! \& W2 T( r2 C6 M2 R
25
1 f m1 k( v2 Z; T8 f* T s
. \$ [3 k' e9 H% l0 y _- J26 $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]."')");
# q# E T( ]" _2 |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都没处理好。出现问题了。
& K) z8 a/ f6 R+ y4 y9 ]! ~4 e( ?/ ^28 if($comment_level == '1'){
3 L5 X& U$ D! R& y" N29 write_msg("您的评论提交成功!","?part=".$part."&id=".$id);# l& R7 R% p7 `
30 }0 F. E/ a+ ~- m4 ^2 i" X
31 else{2 ?/ V6 f4 M) y# E" H1 A
32 write_msg("您提交的留言可能含有违禁词语,审核通过后显示!","?part=".$part."&id=".$id);( Y- d; j5 \: V) ?6 U0 ?
33 }* P' B1 v) S9 p8 V
34 exit(); D" n2 U" ]$ a% a! ]5 i( x
35 }
! z ]$ {' G. C结果出现问题了, \/ |" i% c9 H' |, I
" u! B) h9 T" E" w5 M9 ?2 q接下来就是4 G* w1 G0 r" y: H- ?' C- }
% g; u# i4 C0 z$ a. z
直接爆出管理员账号加MD5…
* ^. }( y0 Y& Q+ F1 O+ c- k |