2 ?- b3 Q2 y8 u% y3 a. ~. y! }出现在评论处,小问题。放出来怕笑话呢。。
. R! u$ _9 d2 S0 ^0 p01 }elseif($do == 'view'){; ?+ l* d E3 S+ u
02 1 K# [4 S. s) d I; \3 N2 k
03 require_once(dirname(__FILE__)."/global.php");" M0 S6 M5 N& |5 ~0 e! ]
04 require_once(MYMPS_INC."/member.class.php");
- ]7 s9 m& d+ p' I) u1 L05 require_once(MYMPS_INC."/ip.class.php");8 a& F+ {- n4 O% Q/ }5 g
06
! t' W9 A4 O# m3 z. k8 o4 T07 if(!empty($part)&&$action == 'write'){& i! r7 |+ W. z* {8 E, d2 K4 p
08 if(if_other_site_post()){
+ B6 N+ k, f4 J! v7 R A09 $msgs[]="请不要尝试从站外提交数据!";% t4 H8 l8 H. Z4 g
10 show_msg($msgs);
+ d5 ]& W8 b) [; G; k1 x: a: }; a11 exit();3 N' w9 C8 ^+ @
12 }( w, G z0 D2 I4 Z4 n2 p7 r8 {! \- U
13
) f2 B; X$ ~ S" Q1 K6 q14
. |2 G" w" _8 k; g T5 p7 s* m( \15 //mymps_chk_randcode();
$ s1 e1 {4 m2 J$ Z16 * G/ j1 F% j1 X3 r2 }
17 $content = $_POST[content];% S" R! R7 P% P4 g$ k+ U! u
18 if(empty($content)){write_msg("请填写评论内容!");exit();}
$ D% f) n" K8 K, r2 o: F4 i, K7 _19 if(strlen($content)>255){write_msg("请不要填写超过127个汉字!");exit();}
0 V3 l* d' {4 h; v3 d20 $result = verify_badwords_filter($mymps_global[cfg_if_comment_verify],'',$_POST[content]);
6 Z) w+ A* u" H- t B6 b1 I# I21 $content = textarea_post_change($result[content]);
% N6 V3 e+ a! K6 v22 $comment_level = $result[level];/ a0 @, g/ \1 g2 f. R) C
23 $userid = $_GET['userid'];% f7 F% ]' G1 w
24
* Z2 ~( D2 l$ G5 T) v6 ?. v25 3 a" S3 R( \* C
( g( t. O: j' Z26 $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]."')");
& G4 j: l/ y. R2 q1 f# F9 y2 b! U27 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都没处理好。出现问题了。
. z& T- {9 j2 w4 D28 if($comment_level == '1'){
+ Q( \; E8 \! `2 J2 ?, |* e29 write_msg("您的评论提交成功!","?part=".$part."&id=".$id);8 `% L8 h) `$ j' E6 H/ M1 e
30 }
" R8 x. G& ]# q- G6 U; p) h31 else{6 k/ \! ], {9 E4 @- f# a& P
32 write_msg("您提交的留言可能含有违禁词语,审核通过后显示!","?part=".$part."&id=".$id);* @$ R% {8 W9 i; e6 G9 C6 C
33 }
: K! l: B: \, ?9 t34 exit();% z+ L3 a3 n$ B, P2 r2 l. \
35 }
! G/ _* U7 S/ ~0 K: B结果出现问题了,5 r3 V* U7 a. {: H
1 z3 E H; v3 M# T) a
接下来就是
E+ }# |$ S# F; P' L6 H
" }& C2 w' x7 K, u4 M* O, I/ j直接爆出管理员账号加MD5…, p! S" q) c5 ^4 d' N
|