7 v2 i: d5 z: W0 f8 P& a2 S出现在评论处,小问题。放出来怕笑话呢。。
% n7 y4 @, u% K# C1 l01 }elseif($do == 'view'){
* x1 j! \5 L; ` V02
; P8 h3 v8 s1 `; H03 require_once(dirname(__FILE__)."/global.php");, k& `( }% D! X9 i
04 require_once(MYMPS_INC."/member.class.php");
8 x& x5 Z7 n y- W$ T/ H) |05 require_once(MYMPS_INC."/ip.class.php");5 v1 R9 t! F: ]. E7 c8 b% d; N h
06 % v; T% J5 ?# Y; |& {9 N2 `/ n
07 if(!empty($part)&&$action == 'write'){
4 X% a" J: P- b08 if(if_other_site_post()){
8 \1 X5 D E7 W5 d; R( Z09 $msgs[]="请不要尝试从站外提交数据!";4 I0 l( W3 \: j+ D- E4 i1 L
10 show_msg($msgs);. ?' f2 I& Q5 ?6 u+ Y1 \$ U) T
11 exit();
4 J6 z O& F1 K8 r0 Y- @12 }
/ _6 M7 S' h. K) L13 + _& y( |" `- B. {
14 $ A! r' @. ~2 v0 R) j
15 //mymps_chk_randcode();
, O( s; h5 r, c4 T* A. v& k16
$ J% z: L! i# \0 t% S1 T& n17 $content = $_POST[content];- X% b& h D- F9 E+ r0 d
18 if(empty($content)){write_msg("请填写评论内容!");exit();}
" |* E2 B3 x8 | U0 x8 I# P19 if(strlen($content)>255){write_msg("请不要填写超过127个汉字!");exit();}2 Y6 ]3 f# Y$ I
20 $result = verify_badwords_filter($mymps_global[cfg_if_comment_verify],'',$_POST[content]);3 g- I, C7 d+ e |5 A$ p1 y8 X
21 $content = textarea_post_change($result[content]);- P5 Y& o! r* E* Z/ P
22 $comment_level = $result[level];
5 t7 S! f/ A' w, I: i: H: w23 $userid = $_GET['userid'];, H1 N7 B. Z: g( a/ }
24
2 i9 y1 x( i, n3 F; J4 E; r25
$ c* @# H+ M% k1 ?4 G n
; ~* T2 i; R; u26 $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]."')");7 Z! V3 B, q: K' x% q
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都没处理好。出现问题了。( z5 P, Z' a7 u3 j+ L5 x
28 if($comment_level == '1'){
/ ^* O J5 Z% ~- U7 D3 S* b29 write_msg("您的评论提交成功!","?part=".$part."&id=".$id);$ y% b, ^9 L$ X# |3 c2 |
30 }; t2 J D% X9 |- X! v
31 else{
7 G g& s% |1 X9 s32 write_msg("您提交的留言可能含有违禁词语,审核通过后显示!","?part=".$part."&id=".$id);* B* b" G. X3 O' n1 U
33 }
* {7 ]/ S/ z4 ]. A8 H34 exit();7 K% N. `! \% |
35 }$ {8 j9 y$ J3 m
结果出现问题了,0 o# d* N! V: H$ T8 X& k
( p" \' m* V6 X) ?$ R* w
接下来就是$ z6 _0 A# j0 w6 b. k4 s7 b1 A
7 i: j. Z7 o9 X/ X直接爆出管理员账号加MD5…
! g! W7 |7 w8 V0 d& N5 s |