第一步:在根目录文件admin/views/add_page.php中这段代码的上方加如下代码- <div style="margin-top:3px;"> 文章访问密码:<input type="text" value="" name="password" id="password" style="width:80px;" /></div>
复制代码 第二步:在根目录文件admin/views/edit_page.php中的这段代码的上方加如下代码- <div style="margin-top:3px;"> 文章访问密码:<input type="text" value="<?php echo $password; ?>" name="password" id="password" style="width:80px;" /></div>
复制代码 第三步:在根目录文件admin/page.php中- $allow_remark = isset($_POST['allow_remark']) ? addslashes(trim($_POST['allow_remark'])) : 'n';
复制代码 这段代码的下方加如下代码- $password = isset($_POST['password']) ? addslashes(trim($_POST['password'])) : '';
复制代码 同样是根目录文件admin/page.php中这段代码的下方加如下代码! U4 [! p) k! K1 E
加密页个性修改,请直接修改根目录include/model/log_model.php中的- <html>
2 p* ~$ b4 V& D! ] f" L - <head>3 C- R2 r4 t) z& ~# z# S
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
& L% Q8 W2 Z% H! u2 ]4 N0 J - <title>emlog message</title>
4 W+ C: v- j3 v, x0 O: E- L, \ - <style type="text/CSS">0 Y N+ }" F, X
- <!--
k; K4 ?0 F% U4 K- }+ ? - body{background-color:#F7F7F7;font-family: Arial;font-size: 12px;line-height:150%;}
2 A, p) G7 {4 [: m - .main{background-color:#FFFFFF;margin-top:20px;font-size: 12px;color: #666666;width:580px;margin:10px 200px;padding:10px;list-style:none;border:#DFDFDF 1px solid;}) J4 K6 A5 ~" c1 V# Y6 v8 M
- -->7 N7 p7 ~, w% v1 O# V7 G
- </style>
" f: m4 o8 n- e1 H9 @, H - </head>
T! @4 H4 j+ S1 z/ @ - <body>9 ]! A: W9 s1 Z( f0 Q9 A
- <div class="main">: Z8 i5 U2 o6 @5 D, M
- <form action="" method="post">9 N- w' @' ?+ d& W3 d" x7 a! V
- 请输入该文章的访问密码<br>
; ]1 {/ o ^ _" k - <input type="password" name="logpwd" /><input type="submit" value="进入.." />+ f$ g3 O2 I( m7 n; S
- <br /><br /><a href="$url">«返回首页</a>
+ R5 V. C- r4 y) p& X - </form>
! Q" K: L2 n4 }% v" g2 m& v r - </div>! U# W+ j" E2 u" c' x' |) ?
- </body>
% j" l# v7 r) D0 C Y D& U - </html>
复制代码
/ F! U8 V8 X5 o2 K$ p' k后台点“保存”也能保存数据的方法,找到根目录admin/views/js/common.js中找到- if (act == 3 || act == 4){
! r/ m# k2 k5 L9 z - editorMap['content'].sync();
# r. G! V( f9 B5 m - var url = "page.php?action=autosave";
6 `' G3 H( u8 B3 _+ Y - var title = $.trim($("#title").val());
. m8 [; E: Q0 L, I. \ - var alias = $.trim($("#alias").val());
& X- Y/ f! H' z& z' s - var template = $.trim($("#template").val());0 n4 g5 h, E* ^& a
- var logid = $("#as_logid").val();
. U8 N1 @2 j$ ~- B - var content = $('#content').val();
/ j/ r5 P3 V. @! ? - var pageurl = $.trim($("#url").val());
U& w) C4 o \. P& y- _ - var allow_remark = $("#page_options #allow_remark").attr("checked") == 'checked' ? 'y' : 'n';
3 ~0 F2 X0 s7 y8 z! u - var is_blank = $("#page_options #is_blank").attr("checked") == 'checked' ? 'y' : 'n';2 }+ K3 @3 q( w# }6 d4 ?3 t( u" q2 M
- var token = $.trim($("#token").val());9 M/ `3 R o1 L2 p5 o' b7 {# A; q
- var ishide = $.trim($("#ishide").val());
9 a/ P/ R3 u" B j6 O$ e - var ishide = ishide == "" ? "y" : ishide;
$ t& N. a* B# O' } - var querystr = "content="+encodeURIComponent(content)7 c, p( _( ?3 z
- +"&title="+encodeURIComponent(title)
& n) z/ K2 H% `- S - +"&alias="+encodeURIComponent(alias)
$ H+ _1 g8 t, @# ` - +"&template="+encodeURIComponent(template)
) q8 Q6 V+ @2 F7 b3 W - +"&allow_remark="+allow_remark
, _7 i6 G6 o- L- p4 H - +"&is_blank="+is_blank9 l0 j" \- n% j4 a
- +"&url="+pageurl
4 x H( i- I5 D- ^: [5 q - +"&token="+token
) ?: s( z3 u6 ~$ |4 F - +"&ishide="+ishide
& A* M- V( X2 d7 [. g$ K - +"&as_logid="+logid;
复制代码 用下面代码替换- if (act == 3 || act == 4){. T9 a0 f# l1 W* o6 D9 N% ]5 l/ F5 T/ z
- editorMap['content'].sync();! d4 I# {1 \& p* T
- var url = "page.php?action=autosave";3 E+ m$ l; ?8 @" Z) J
- var title = $.trim($("#title").val());
6 `* y# ]0 X$ [/ _ - var alias = $.trim($("#alias").val());$ O( E8 v& s" W- Y
- var template = $.trim($("#template").val());
- p* e+ q' [" ~& U) k, _7 r: p - var logid = $("#as_logid").val();
& \1 c1 e; [9 K+ p1 q' I - var content = $('#content').val();
. m: l+ C7 G! S/ y- Z: ?* y& P* I/ }# W - var pageurl = $.trim($("#url").val());
3 V. ^% @/ x4 i' K4 k, O - var allow_remark = $("#page_options #allow_remark").attr("checked") == 'checked' ? 'y' : 'n';1 D8 \9 v* e+ N0 N& m- [/ W
- var password = $.trim($("#password").val()); //新加代码" f2 a4 ?' R. F% e$ P
- var is_blank = $("#page_options #is_blank").attr("checked") == 'checked' ? 'y' : 'n';
3 G# Q* {+ W- \: z/ V) Y - var token = $.trim($("#token").val());3 Q& f& B( _1 b4 O3 m
- var ishide = $.trim($("#ishide").val());
: S8 i4 x2 m8 O# w- Z0 k& G" o - var ishide = ishide == "" ? "y" : ishide;1 J+ d6 e! l/ h* u# v
- var querystr = "content="+encodeURIComponent(content)
. [5 L' V% K; e4 h. X, t - +"&title="+encodeURIComponent(title)
3 t# g- i& {: A+ ^5 s8 m; ^7 y - +"&alias="+encodeURIComponent(alias)
$ q; C/ P$ H! ]! `8 U9 \6 { - +"&template="+encodeURIComponent(template)1 {: n/ g) E: V! o3 v( t, Y: T! ~
- +"&allow_remark="+allow_remark: N3 ~9 @( a4 g: }
- +"&is_blank="+is_blank
1 y: }5 O* v2 J7 C - +"&url="+pageurl
4 Q" O5 P8 S: d+ m; r( ? - +"&password="+password //新加代码
& }! G8 |) L2 Q6 N - +"&token="+token
1 |0 _' X4 s4 B8 {+ ]- o) y - +"&ishide="+ishide7 i' T2 M# W8 P( ?
- +"&as_logid="+logid;
复制代码
4 ]9 C4 o1 Z+ x/ S# p |