AdvertCN - 广告中国

 找回密码
 立即注册

QQ登录

只需一步,快速开始

 谷歌+Bing+TT+MSN官方代理 
⚡️按条S5代理⚡️静态⚡️独享⚡️5G⚡️最干净<Wifi住宅+5G移动>IP代理指纹浏览器,就用AdsPower
Mediabuy⚡️玩家开户首选【鲁班跨境通-自助充值转账】FB/GG/TT❤️官方免费开户Affiliate 全媒体流量资源⚡️
Taboola/Outbrain /Bing⚡️一级代理开户投流-7*24h❤️人工在线【官方】❤️搜索套利广告开户独立站⚡️开户投放
DuoPlus专注打造跨境电商云手机E.PN 虚拟卡BINOM TRACKER 60% OFF!比Adplexity还好用的Spy工具
MediaGo+Taboola+Ob开户百度国际MediaGo⚡️让产品狂奔全球百度国际,高点击转化,快速放量百度国际MediaGo,独家原生流量
ADPLEXITY + ADVERTCN7200W全球动态不重复住宅IP代理虚拟信用卡+独立站收款全球虚拟卡, 支持U充值
Facebook 批量上广告尤里改 - FB 稳定投放免费黑五教程(持续更新、欢迎交流)FB 三不限源头 - 自助下户充值转款
各种主页、账单户、BM户(优势)⚡️个人户,bm户不限额,账单户一手BM分享户不限额9Proxy ⚡️ $0.04/IP, 无限带宽
IPCola原生住宅IP⚡️$2.1/条双ISPFB二三解0.1元一个虚拟卡|PTM星际卡FB专用虚拟卡
Google、Bing官方总代  联盟流量开户FB账号资源/稳定靠谱/运行5年啦FB开户代投/三不限/白名单广告位出租
查看: 15266|回复: 27

[讨论] 求助:wordpress主题foot被加密,怎么解密?

[复制链接]

7

主题

111

广告币

252

积分

初级会员

Rank: 2

积分
252
发表于 2013-1-17 17:36:52 | 显示全部楼层 |阅读模式
代码如下哪位好新人帮下忙,谢谢了!!0 x; [- {0 H/ `  q/ q& `; P
! ^0 t$ X& R4 W
functions.php ! i9 \. i# R* C$ h! D5 w. S5 O
* i/ _$ R; u& l  G% x* W
<?php: n8 X& Z/ Z7 K' a, {+ v9 O
////////////////////////////////////////////////////////////////////////////////+ r* q! r* j( p
// Get Featured Post Image  ?, s! _# L3 k7 s8 O) X) l
////////////////////////////////////////////////////////////////////////////////
' _4 t& ^4 z: U( o6 v1 g; Jfunction get_featured_slider_image() {4 B* ^# W) l: y( M, @- l& Y% {$ T
  global $post, $posts;
2 e5 y4 @; v  l# U4 H, y+ R+ H  $first_img = '';
9 A. Z& h, d4 g6 X$ @  ob_start();2 N' E. i: J! R( U# b6 `8 H3 M
  ob_end_clean();
# I* P# ^% ]' \% Z- W$ c  $output = preg_match_all('/<img.+src=[\'"]([^\'"]+)[\'"].*>/i', $post->post_content, $matches);
, r% s" A) ~# f" L( T) p: ^% K  $first_img = $matches [1] [0];
( V/ {! ]" ~6 {- c$ ^
. P6 P5 \" p, `6 m" u  if(empty($first_img)){ //Defines a default image
% j3 W4 A  k/ z1 g9 W; q          $img_dir = get_bloginfo('template_directory');3 b8 R- W9 Q/ @2 Q* d
    $first_img = $img_dir . '/images/feat-default.jpg';
% h( f; Z7 O8 k5 F/ r6 b6 q; x( v  }
: Q- h- e& P- B* p  return $first_img;
/ Q- ]9 ]$ F' ?+ e: y/ k}& j6 G& [& R6 e  J7 z% d9 {

- k0 _4 Y- t+ Y* \////////////////////////////////////////////////////////////////////////////////
+ L3 a5 E# B. }# [9 B0 i- U// Get Post Image
+ Z% m# N6 P: U% |////////////////////////////////////////////////////////////////////////////////5 p8 R8 B/ {1 k* ]+ {, x
function get_post_image() {
5 I  P  n" P/ r6 H, y  global $post, $posts;
. }' Z2 F% y  S0 C  $first_img = '';0 D8 r% J# ^6 E
  ob_start();
6 Z( W2 d5 h3 k. m+ Z" t7 y  ob_end_clean();
+ N6 ~! A2 p7 h2 Z- F  $output = preg_match_all('/<img.+src=[\'"]([^\'"]+)[\'"].*>/i', $post->post_content, $matches);% O( `- j2 B! M7 p' h2 ^
  $first_img = $matches [1] [0];+ S! ]3 I1 Z! n5 [# n6 ?

5 N! ?  X) t4 L5 G: H' M8 O  if(empty($first_img)){ //Defines a default image* m: G% f7 K# s4 E2 V" N
          $img_dir = get_bloginfo('template_directory');0 D5 ^! t- C+ w, @3 c( m* a
    $first_img = $img_dir . '/images/post-default.jpg';5 I1 z/ M% w0 H) C
  }
7 _' p) ]7 X! f( w) H0 I- B# t) ^  return $first_img;
- A, u- ]+ b! }- l4 P6 c}4 m7 |4 N. L( k
  Z9 e' a+ i, \  l: ~) k& ^
////////////////////////////////////////////////////////////////////////////////0 A7 v1 S8 ?" K$ D/ q' ]
// Get Featured Category Image+ ]9 r* g, W' m  u; Y7 J
///////////////////////////////////////////////////////////////////////////////// {" e/ N! c9 y/ D# h- ^
function get_featcat_image() {; c1 j! K$ m% F2 o' r/ J3 t/ }" A
  global $post, $posts;
" u6 s& y# W1 k1 a. B  $first_img = '';) p8 v8 Q+ V6 d$ p, d* K4 B6 ^8 y8 i, I
  ob_start();5 o. {4 V* g- h8 c+ `7 Z
  ob_end_clean();+ y7 X3 v5 C8 C* ~7 K4 P2 h: j& U$ {; g
  $output = preg_match_all('/<img.+src=[\'"]([^\'"]+)[\'"].*>/i', $post->post_content, $matches);7 @+ @9 P6 e4 f: X6 W
  $first_img = $matches [1] [0];
: l& h* ]8 t& [, F7 R
4 O1 q( \* p* p2 a; B  if(empty($first_img)){ //Defines a default image
2 M% b' f7 d1 E9 p          $img_dir = get_bloginfo('template_directory');
: {% J" ?8 W% N, A    $first_img = $img_dir . '/images/feat-cat-default.jpg';
7 m% B9 Q1 n/ F4 G& i3 `  }
! f2 A' |8 S+ @( [- [3 F  return $first_img;
  q/ [+ C/ n1 _& N}/ s( f) N; _1 p' s0 E$ f# N; N

# T9 N5 n) ]( B9 ]$ R' ?
& m  j3 m% w' x8 i8 S; t////////////////////////////////////////////////////////////////////////////////
! r/ i) H/ ?. G3 d; E% s
( Z1 a1 Q* S& Q5 \7 e' u2 m8 }9 c. B// Featured Content Excerpt Post8 a. _8 r6 u7 }* x4 m) b) Z
) }. w' S  W; k+ l+ A) L$ j6 t
////////////////////////////////////////////////////////////////////////////////
/ ]; W- F7 G5 S! ]
9 d+ x" y* U) _/ M4 g' s( gfunction the_featured_excerpt($excerpt_length=30, $allowedtags='', $filter_type='none', $use_more_link=false, $more_link_text="Read More", $force_more_link=false, $fakeit=1, $fix_tags=true) {
, G( ^  j1 R5 S+ s- E, R/ g4 ?0 i! J& @- }, _4 P& C
        if (preg_match('%^content($|_rss)|^excerpt($|_rss)%', $filter_type)) {. v+ J; F& m4 L; b) }2 U' o

+ @; X% Q: ~5 z/ b* Q                $filter_type = 'the_' . $filter_type;& ?- a$ }+ P) m' o8 Y

# a0 a  L, p8 i. E" C        }
+ o. ^6 d  l5 [( @4 T5 [* B6 A! K) r( F4 Y' B1 Y
        $text = apply_filters($filter_type, get_the_featured_excerpt($excerpt_length, $allowedtags, $use_more_link, $more_link_text, $force_more_link, $fakeit));# n8 S9 d- b# s; M1 F
+ l6 K6 b0 l7 f2 q# d0 s
        $text = ($fix_tags) ? balanceTags($text) : $text;
6 B, m2 T5 F( N/ ~( _$ z/ d# s* k1 D* ~+ `4 l
        echo $text;
  n. B7 r+ x! x/ Q: F5 d/ p+ o$ l3 ^/ U( C5 E9 R
}
7 a$ M# c) j+ T& I! y" J1 i  K6 Z) X& U( s( F
function get_the_featured_excerpt($excerpt_length, $allowedtags, $use_more_link, $more_link_text, $force_more_link, $fakeit) {
6 P1 w7 O' h5 c% x; Y1 g. d. _4 S5 x, _
        global $id, $post;) d2 E8 g* y2 b1 d5 F* @+ o

: Q. u3 {8 r# t( U2 u1 ?: U        $output = '';: b& C4 ~; F3 ]7 H

$ B7 w/ m9 ^* k1 u! d        $output = $post->post_excerpt;
9 w, |$ X  I8 [9 D; h$ f* M8 J7 I* {4 a  s2 I  h! q1 \5 v% a
        if (!empty($post->post_password)) { // if there's a password
% C0 U4 _  `4 j, ?/ I  _) s$ _) V% |1 I( m
                if ($_COOKIE['wp-postpass_'.COOKIEHASH] != $post->post_password) {  // and it doesn't match the cookie) [' J3 f5 n' a4 B

. V# P# ?; X) f) I' ]+ t( {                        $output = __('There is no excerpt because this is a protected post.');) y& d6 x. ^# E4 y5 d- G

! W, u6 U; F0 |' x9 q                        return $output;
& X- `! g  g0 x! K) Z1 [* \1 Z- h7 K% `
                }! W. t. q$ I* u% D
' z5 Y" c/ s7 ~
        }4 s) s1 ^# @# B! x4 Q' I% u
" \# y' H6 v5 e$ U( K
        // If we haven't got an excerpt, make one.
, r6 h$ v% Q  |! |( b! D$ L$ k
" Y% C2 ]& I! d' u4 `; s5 @        if ((($output == '') && ($fakeit == 1)) || ($fakeit == 2)) {
4 t8 x! y* @/ R& V! b& a
+ a( u+ Z; w4 B) {$ u                $output = $post->post_content;
8 R% h# O; l. S6 B* h6 H/ Z; l3 T4 J& `* j/ A5 K& U) j
                $output = strip_tags($output, $allowedtags);) ], {, N+ y6 @7 D8 c* p
6 q, \9 _* ^1 w! x( K) U$ i
        $output = preg_replace( '|\[(.+?)\](.+?\[/\\1\])?|s', '', $output );: R6 E# U# t; }1 E7 E0 T* F! y

2 Q) Y) P* X# q0 g, D  h$ a                $blah = explode(' ', $output);
$ U  Z% a: ]6 m- ^
3 u9 z! ?( f" {: y; x$ M* q                if (count($blah) > $excerpt_length) {
: G6 X* k" W) g$ r; D
% p. j+ S# W) A3 L                        $k = $excerpt_length;
1 {4 t8 n3 L3 u; U7 C& h* G( N1 o6 W: _5 V% o
                        $use_dotdotdot = 1;. w. d1 b3 }& F2 X, s

  c% q' D  h1 m+ ?( l                } else {5 ?/ @3 @! V1 ]4 t6 _
, u7 L6 U; J/ }7 d6 B1 u* B+ L* U
                        $k = count($blah);
" P2 X4 `5 |& l* h
0 Z: g9 y# n. i                        $use_dotdotdot = 0;
  R( a9 M& X1 M* P% _* p1 H/ G% d
                }
9 C4 |/ R2 ^" y# u
0 w2 Y$ B/ C5 X" L                $excerpt = '';
: V% t* F/ f* J8 _6 d% B4 Z* |0 D( F) f/ [
                for ($i=0; $i<$k; $i++) {! F" Y0 d- }4 K% ^4 \. Q
9 L; e" J- o; H) ]( L0 y
                        $excerpt .= $blah[$i] . ' ';
5 S' F2 I$ V5 @' s0 d, c# ]0 D* N$ f/ m2 G1 f
                }! o! l- _1 Z+ {& F5 `5 p+ K

; W: S0 S& i/ E# J- k1 y" D
0 g! H  p* Q) _3 ~- x                if (($use_more_link && $use_dotdotdot) || $force_more_link) {. h9 D1 x3 D( y- _0 V1 ]: j

& }# k' X: U# N' k% O8 p; c0 G                        $excerpt .= "...&nbsp;<a href=\"". get_permalink() . "#more-$id\" class=\"more-link\">$more_link_text</a>";- T. F* J  w  S6 K9 q

6 H7 |# P: n7 _0 ~2 B                } else {
% Y+ R4 t4 x! E# N$ u1 |
& {8 R2 P4 r' L! T8 Q                        $excerpt .= ($use_dotdotdot) ? '...' : '';
+ r8 G: e4 K6 p1 O7 A  V* I1 w2 `4 k5 d: ?, E( z+ ]
                }* l/ D5 @& ^7 o9 L

; [; ]9 N% l! `" c0 f                 $output = $excerpt;
3 d/ o7 J: W" z0 s" T, Q8 {: s( h+ N5 s) O& t. p, o
        } // end if no excerpt
+ H  a, C* e! W' R( q
2 b: R5 K  X; z8 A, a        return $output;
' F. ^" Y" f4 z7 q
$ V/ c" ^: }  ~; I/ l( I/ {}
: k& s! h2 X1 L( Y! ?2 |/ \9 f4 d& m" g
////////////////////////////////////////////////////////////////////////////////
) }0 u" `# W  l- C6 U2 V: o/ F; Z" u  ~. v
// Standard Post Excerpt
- g/ d3 Y4 E  t  p$ N
, H$ H# h" X( Z) w' q////////////////////////////////////////////////////////////////////////////////
9 E+ y+ `+ L6 }9 E- ^5 ^' _# R/ p3 O
function the_post_excerpt($excerpt_length=60, $allowedtags='', $filter_type='none', $use_more_link=true, $more_link_text="Read More", $force_more_link=true, $fakeit=1, $fix_tags=true) {
: Q: Y$ P6 f) x* o
6 Q1 c" b# I1 ^        if (preg_match('%^content($|_rss)|^excerpt($|_rss)%', $filter_type)) {
2 H% r1 A  s( j) B7 M
" U1 F( E& ~8 i" e' r& m                $filter_type = 'the_' . $filter_type;
4 {7 ?3 q9 g" |* b* |& F6 I9 F/ {6 X, R% o7 P1 ?' b; D# g
        }
  k- u% `5 Q* K- _% {
, a' g0 t$ e9 ]        $text = apply_filters($filter_type, get_the_post_excerpt($excerpt_length, $allowedtags, $use_more_link, $more_link_text, $force_more_link, $fakeit));# n3 K/ s) U4 g% S/ Y$ c  S: j1 l* b( _6 ~
7 _: Q# |6 p7 S5 M1 G+ Z1 B( E
        $text = ($fix_tags) ? balanceTags($text) : $text;& P& Y0 h! v) Q. o* C: d
, d, D# B- ^. W' `5 q  T! \' J
        echo $text;
! U( }, _1 Q1 T" b6 ?4 Y
3 a/ a1 h. E, L6 t% ]' K: M6 \  w}
2 q9 q+ D# V$ t: ]
# |7 g% ~3 A. U' I/ T$ N6 vfunction get_the_post_excerpt($excerpt_length, $allowedtags, $use_more_link, $more_link_text, $force_more_link, $fakeit) {
4 g% h* R+ E) s" c$ \! ?3 F- ~: T- p& i+ C
        global $id, $post;3 l3 X' P; V$ @0 P# K0 ~
' ^3 g- K; C4 O1 Z2 T4 R
        $output = '';
2 b$ _5 }+ @- I3 }7 }8 X: E( F2 T' O3 B
        $output = $post->post_excerpt;* z& O/ K6 b5 e, V1 W# s+ S: N
# T  ?7 g* c0 l4 C
        if (!empty($post->post_password)) { // if there's a password
% y* O- x* E; v8 O
/ g2 m# l- t9 p  X8 w4 j                if ($_COOKIE['wp-postpass_'.COOKIEHASH] != $post->post_password) {  // and it doesn't match the cookie6 d# r$ U9 a% \1 n7 l
  q1 _3 K- P7 v* `( l
                        $output = __('There is no excerpt because this is a protected post.');
1 J' a# H% d; u5 o9 h3 p9 H! K" M0 }# Y9 y1 Y
                        return $output;
) q' w9 W8 G8 _2 o
/ p) [9 Z) o0 Y8 k8 ^                }
1 L7 N% R' R" s4 ]1 t; b& O1 f* t' S& q
        }5 G  A& Q. E7 |, c1 [
- O$ T- f& p- Q& x- `+ l5 u
        // If we haven't got an excerpt, make one.
6 c& ~. v6 H& A' N7 Q
' U3 u6 ~. j5 B  N- G        if ((($output == '') && ($fakeit == 1)) || ($fakeit == 2)) {) A5 ^2 M" m4 I/ j

8 k( x2 a, U  O1 }7 P, q# a* `( \                $output = $post->post_content;
2 f7 S% @; @8 F$ V
8 @3 Y4 _* U( T( d* ?" u0 i                $output = strip_tags($output, $allowedtags);
( E& s5 b0 E! G; `
# ?! b/ p( _/ S: A        $output = preg_replace( '|\[(.+?)\](.+?\[/\\1\])?|s', '', $output );
% ~5 b* c: z! p) b3 t0 G7 y1 W7 I' K: S
                $blah = explode(' ', $output);, R; i0 |$ M6 n- T& @! R$ P

- V2 Z7 ^. i, z3 W                if (count($blah) > $excerpt_length) {* P+ I1 W. L  A9 W

. h1 q# Q5 P; c% _' Z                        $k = $excerpt_length;! B  c7 |  g" T! n/ u( ]
9 Z$ E! r7 U; E. q
                        $use_dotdotdot = 1;& p- c, i2 d4 t1 u: N
% f) w; f: j! D2 ?/ T+ Y
                } else {
9 L* s5 [9 Y) F; o6 }+ s# {: v+ g- \
                        $k = count($blah);
6 s) N$ E8 D( w1 X# N& h, O# Q* C
6 b  e4 }* d0 N7 Z. Q: f                        $use_dotdotdot = 0;0 R3 J, R. g6 |9 b7 P" C

( p6 y# U7 o* X+ }5 d                }0 I' {- M) J  h+ N  Z
- g8 i. R( `, [$ R
                $excerpt = '';# m5 `, A: t1 d4 n5 Z% [8 p; }
( T# E- q7 D, }) i' [- X1 ?) X  ]4 K
                for ($i=0; $i<$k; $i++) {
/ u! `, s) V; U0 v  N& a! n3 q1 v2 H# |# r8 X
                        $excerpt .= $blah[$i] . ' ';. v8 V* G8 i9 ]; n' ]

$ v. R- O- f9 {2 X4 ~) w* M                }
( V. P$ c; F) b  f# b6 A- t" O; h$ W9 r+ m+ m

% x0 R3 l% c: V. o: f/ _5 w                if (($use_more_link && $use_dotdotdot) || $force_more_link) {0 |% ~2 E6 h3 z8 L0 _

  G5 D# j8 F( c: _$ i                        $excerpt .= "...&nbsp;<a href=\"". get_permalink() . "#more-$id\" class=\"more-link\">$more_link_text</a>";
+ [# N+ X9 \& l$ W3 o/ K5 s; A
- Z, d1 X( n6 \4 W. Y                } else {  x  Y6 l6 r: W/ P$ s6 l3 y' w  @) X0 |
1 n: N+ U( n+ f8 \  i) A- t
                        $excerpt .= ($use_dotdotdot) ? '...' : '';* f4 l" d: g# Y: ~  M2 Y0 O2 f

. w! P7 ^# J) v* q                }& I+ b. U# e+ ]( H/ a( I

4 d! D1 T/ D3 C" v9 y7 z                 $output = $excerpt;' b0 X' r$ ^) G0 d
1 z9 m* I1 c, |& }+ [+ p9 a
        } // end if no excerpt9 p% r5 m% e+ U: s7 p2 `- e
0 s2 a* @$ Z3 Z$ Z7 f* j  y' M0 t
        return $output;
, W6 M5 S" N. [1 T+ R
: w# d2 R# `* p1 A  t+ k8 J; X}$ U: ^8 w! Z0 {" l; q* Y1 X
$ H& U+ b$ v& ?& U
////////////////////////////////////////////////////////////////////////////////% E/ e+ H. J: \

+ i  a' c! d, }; N// Excerpt Feature Category
# y  \) y& {5 H- K! ~! t
7 L0 f1 o, g4 |2 |////////////////////////////////////////////////////////////////////////////////0 ?! L8 L: Q: A1 t# W
$ Z  Q7 m& {2 w! `$ N% b4 _5 ~
function the_excerpt_feat_cat($excerpt_length=15, $allowedtags='', $filter_type='none', $use_more_link=false, $more_link_text="Read More", $force_more_link=false, $fakeit=1, $fix_tags=true) {
/ U( y4 [% r3 ~# ]* T" P
% f# ]* I, V! Q9 h        if (preg_match('%^content($|_rss)|^excerpt($|_rss)%', $filter_type)) {, O$ n4 v( [- Q5 y4 ^, s5 C

( p( ?' y/ J" C3 k4 D7 |                $filter_type = 'the_' . $filter_type;4 R! N& u1 {2 T/ E( H# z! o$ V
) \% m: n0 y8 Z+ c+ K" `' w
        }4 G* d$ E4 {+ F( k
0 X" r9 s2 A4 E! O
        $text = apply_filters($filter_type, get_the_excerpt_feat_cat($excerpt_length, $allowedtags, $use_more_link, $more_link_text, $force_more_link, $fakeit));
/ r6 R3 K+ {6 }$ ^2 T3 r& w; D4 f: ]- I  h" q6 m
        $text = ($fix_tags) ? balanceTags($text) : $text;* |1 U0 o/ G4 A; u8 p: E: x
  I& @. F! z0 x) |+ y
        echo $text;& b! B2 i! X+ q% q' z1 G

( W3 B. q: J' `% r3 t2 v5 N  b: m2 n( i}
( n. K2 z/ F% I  E, \. M4 M$ \3 t- z  I3 a2 G
function get_the_excerpt_feat_cat($excerpt_length, $allowedtags, $use_more_link, $more_link_text, $force_more_link, $fakeit) {" H/ Q. q( l, d. |$ n; \5 \

7 x4 Z) ~' \* G1 y        global $id, $post;: F5 l5 L5 Z9 Z+ e$ ^- [* N
; e" T9 B( o+ ^
        $output = '';7 L1 p7 Z& A! a9 e/ L5 d

5 R) `6 o: J4 a        $output = $post->post_excerpt;
! }8 K' U8 }* V! @$ a9 A5 Z' Q4 S
# v$ ?8 b; \! @1 W+ G+ N) B! [6 C/ j0 G        if (!empty($post->post_password)) { // if there's a password  ?* ^6 F4 w. Z2 j/ L
3 X3 I# j2 j% e  ^- b
                if ($_COOKIE['wp-postpass_'.COOKIEHASH] != $post->post_password) {  // and it doesn't match the cookie4 p7 v# I0 i. ^+ e7 l2 M
/ B& i/ X4 ^' a3 e$ p, O2 X* i
                        $output = __('There is no excerpt because this is a protected post.');7 X5 K( t( c3 D
- X9 {/ U1 l1 U$ M( A/ g
                        return $output;
- _5 z6 Z( _5 }  r( q9 p& ?; Z: h8 c
                }
  n" f! a6 ~: \1 `5 {4 m! N; S0 l& C, B& u* j7 T" l
        }
+ Z. `  m# x! x
* r  U( @* |) O- p  W0 {        // If we haven't got an excerpt, make one.' ]5 F" X) u4 [! h; h& Y* o. i

4 T6 J) v( R1 R' }" p6 K        if ((($output == '') && ($fakeit == 1)) || ($fakeit == 2)) {
1 T8 h( ?7 q) w# h2 }& ]9 ?7 c! f, t" m* ~$ l. r' J1 {8 b7 o
                $output = $post->post_content;
% v% p9 M0 @! h, _" n8 `, l7 g5 _% a
3 G, {/ h7 ?$ F: r4 z- `, n                $output = strip_tags($output, $allowedtags);4 h, y% W% `# X

& ~0 @  c) C" ?6 Z* x* `, M        $output = preg_replace( '|\[(.+?)\](.+?\[/\\1\])?|s', '', $output );
8 f. s. q% g* E8 a: h
" ^  U* z6 z3 o                $blah = explode(' ', $output);" m8 T2 I6 n! p% Y! {
5 v  v& ]8 J8 \! ]
                if (count($blah) > $excerpt_length) {
& y$ L+ L0 _+ M2 S, S9 i; ~
8 J  V3 A% D4 i+ u& L& _+ }                        $k = $excerpt_length;
8 ~5 G! R$ X3 t- w; X" D9 B
3 _1 D, y3 n8 x; _+ i5 W                        $use_dotdotdot = 1;- o- M& @  }2 Z& u5 J; l8 h

. W1 s6 [- W% D) ^                } else {
4 B; i- X+ u7 \* ^) {/ l( ~# t% s" R! o  d4 E/ |
                        $k = count($blah);5 y& r3 U6 X/ U( R! L; d

9 G3 ^. z) u  g6 f                        $use_dotdotdot = 0;  ~1 a$ \& J9 y# ^# |- q. c2 G/ |
* q( B! b( a' B" |
                }4 R( z' R9 `- \# ^- }, p
% b2 ?- {- b* M7 d
                $excerpt = '';  v5 c1 c: v; N- G: e- f

2 E6 y7 X) N0 J/ ~$ Z* G                for ($i=0; $i<$k; $i++) {
; D& p, d, ]3 Y5 S6 ?) a$ |$ K- L$ A2 c( O1 A
                        $excerpt .= $blah[$i] . ' ';
- L: K* P6 A9 D# y  B4 d( L
, e! m: O& \$ Z! L% I' E                }5 k$ U3 |& Y+ X2 l' O

/ D8 H1 J6 T) R: f% H) }+ R" H: p2 u5 A5 I; d2 L1 O: A+ J! w
                if (($use_more_link && $use_dotdotdot) || $force_more_link) {
( K; ?# B0 M9 \2 B
- \6 U0 a( ^3 c) J2 h                        $excerpt .= "...&nbsp;<a href=\"". get_permalink() . "#more-$id\">$more_link_text</a>";
; ~% s0 z" \2 J0 [
4 r% P' s* A% G* q3 E/ Z/ n                } else {
1 ~& r7 D* V  h
& P, e& B. [& O9 `  K/ O3 M, \                        $excerpt .= ($use_dotdotdot) ? '...' : '';3 }0 N. Q% D# ?6 q$ G

7 Y2 ]6 }$ z& R: A0 @# d                }4 ]# f5 r7 H, i
0 u4 d/ l: q% d  G2 T) j
                 $output = $excerpt;
1 w* }3 l9 ~1 I: K4 x$ s- [9 @
0 S! ^, _( U* X& H9 ?6 l5 t: B        } // end if no excerpt
* d* U, m/ D4 e6 Y0 R* F8 T: E4 R* Q6 H1 G
        return $output;
8 x4 k! S& C7 `1 P$ G
4 q4 a3 ~" E) V3 I}
+ J1 C( U4 D- m. @% }0 z! P& r: n* N5 F, p

; d0 i0 s  ]0 z7 A////////////////////////////////////////////////////////////////////////////////$ O4 O0 G- L( B( G1 q( N
// WP-PageNavi
+ G8 X& @5 m" q0 Z% O////////////////////////////////////////////////////////////////////////////////
* O9 G: {7 o8 S* B+ E( }' g. q
5 U/ U' i" T# t% ?  [, f( Hfunction custom_wp_pagenavi($before = '', $after = '', $prelabel = '', $nxtlabel = '', $pages_to_show = 5, $always_show = false) {5 n3 |6 C6 k, l" l* [: x
        global $request, $posts_per_page, $wpdb, $paged;
' x/ m7 x1 G  H( E        if(empty($prelabel)) {
/ b: K% j4 a3 e4 M1 e& J, H& V4 I+ V- t5 i                $prelabel  = '<strong>&laquo;</strong>';" l# e, d% {! z0 s* ]! p
        }; E+ E1 m' ?4 v4 J
        if(empty($nxtlabel)) {
% V& V$ K% y9 o7 f/ d5 l( {' |9 F                $nxtlabel = '<strong>&raquo;</strong>';
4 }8 h& Z3 q3 p8 a" R, M- ?% c/ c$ {& j        }4 r7 q; T4 r. f% s5 S
        $half_pages_to_show = round($pages_to_show/2);3 l0 u9 H+ Y- f
        if (!is_single()) {* e) `5 i0 f! P4 G. ~
                if(!is_category()) {
8 O9 G1 u+ K, v0 e6 i                        preg_match('#FROM\s(.*)\sORDER BY#siU', $request, $matches);+ Q5 f6 p7 Y: h/ N
                } else {& T/ E3 a$ v; M7 v; M1 v5 h
                        preg_match('#FROM\s(.*)\sGROUP BY#siU', $request, $matches);
& h* J# b4 u+ W+ o                }' W7 s% f. Y1 ]" L2 Y
                $fromwhere = $matches[1];
' B/ ]  _" f3 \: [* z* p! M                $numposts = $wpdb->get_var("SELECT COUNT(DISTINCT ID) FROM $fromwhere");/ _/ a, C) H8 @3 t: n
                $max_page = ceil($numposts /$posts_per_page);
$ b# x3 g# E' b5 y% F/ C* _# q                if(empty($paged)) {
. c, E) I* ]7 y) A% p1 }                        $paged = 1;6 e! D; l* D2 f+ b( _  Y# y
                }. D9 M' Q; `: r# k; A- j8 s( ^$ Y4 @
                if($max_page > 1 || $always_show) {
3 ^  s+ U* K) Y+ |0 H                        echo "$before <div class=\"wp-pagenavi\"><span class=\"pages\">Page $paged of $max_page:</span>";
8 q6 O0 c7 e4 ]4 ^6 L  j' U" T! \                        if ($paged >= ($pages_to_show-1)) {
6 z% ^2 o8 v" I/ U: X1 [                                echo '<a href="'.get_pagenum_link().'">&laquo; First</a>&nbsp;';
) ^' L* ?0 E7 C) ^                        }: [' g8 W# ^' x% q/ p
                        previous_posts_link($prelabel);
4 x1 W" w* _0 q/ |                        for($i = $paged - $half_pages_to_show; $i  <= $paged + $half_pages_to_show; $i++) {
* s! p5 ^) G( K* L; y. g/ _" v9 T                                if ($i >= 1 && $i <= $max_page) {8 B3 L! N! C  r
                                        if($i == $paged) {2 h2 Q: _7 U. c+ i
                                                echo "<strong class='current'>$i</strong>";0 `! Q; ?0 P* K$ M# _
                                        } else {
3 ^9 a" w5 Z; ^# J                                                echo ' <a href="'.get_pagenum_link($i).'">'.$i.'</a> ';
5 @! u& c5 ~% P5 P& H3 m7 p2 I% z                                        }9 i1 T, F/ A  X( u5 ?
                                }
+ I3 d' F: P& y  q2 L                        }5 U* e- H2 O0 ~% A7 _/ S( D( m
                        next_posts_link($nxtlabel, $max_page);
1 e* b5 e/ T+ ]: }" |                        if (($paged+$half_pages_to_show) < ($max_page)) {8 o2 C) I* y7 B2 V) L/ T, B
                                echo '&nbsp;<a href="'.get_pagenum_link($max_page).'">Last &raquo;</a>';" R, q9 e; }/ b' o8 z1 X8 K
                        }
! N# Y' Q9 n) [5 P- ?+ q$ G                        echo "</div> $after";' l- b0 Z" E. O" r' s
                }
& h1 a) w: ~6 c% N* N        }
, _1 H' H+ A, a1 M}
8 i7 k0 l8 ^3 J: y$ o3 W% D% B" Y7 {) n* [3 Q5 F* H1 `

% H$ r$ Y7 u9 i# J+ a, K3 f& e////////////////////////////////////////////////////////////////////////////////
2 q2 z/ \3 j4 z// Get Recent Comments With Avatar8 D0 p- i$ w- q2 S6 t
////////////////////////////////////////////////////////////////////////////////
& U2 C! e5 o* A  P9 z1 Lfunction get_avatar_recent_comment() {
6 R, g* }4 B. X9 H6 b. B5 R4 Q5 q5 D. V/ ^7 I0 s$ W) s6 K5 K* D; g
global $wpdb;5 S% Z9 l( g5 @, w% S4 z, v
/ D. @9 Z% Z# [/ d9 ^& Z
$sql = "SELECT DISTINCT ID, post_title, post_password, comment_ID,/ w9 {. z' ^0 z/ W' W- b
comment_post_ID, comment_author, comment_author_email, comment_date_gmt, comment_approved,
5 T- H, ?+ ?3 Wcomment_type,comment_author_url,
, q) J+ d2 R7 q; ^SUBSTRING(comment_content,1,50) AS com_excerpt
3 C8 u* I9 x/ H2 J& D: r" CFROM $wpdb->comments
$ \. Q7 b7 v& Z* ]4 o1 dLEFT OUTER JOIN $wpdb->posts ON ($wpdb->comments.comment_post_ID =
  V+ z0 H1 Z0 z4 w4 G; E$wpdb->posts.ID)) }+ Q! b% k8 F# h4 X; G
WHERE comment_approved = '1' AND comment_type = '' AND
' r- G& g2 |/ v. v( _- E  j4 Ppost_password = ''% N4 [9 {) w/ S
ORDER BY comment_date_gmt DESC LIMIT 5";, H" ^' I5 Z! ?- w* G) Y% a! f

* ^$ w* B- n& |1 L$comments = $wpdb->get_results($sql);
9 m( w, l" x, z4 D5 d2 T$output = $pre_HTML;$ b2 U) i' W* b+ O- W8 E
$gravatar_status = 'on'; /* off if not using */  n  D' V1 {7 [( G
7 P& M" z0 C* `- l2 ~1 \; j1 U! |+ A
foreach ($comments as $comment) {
! a# a2 _8 z0 O5 a1 L3 a$email = $comment->comment_author_email;
8 Y, V0 a, b9 V0 z+ [, X* U7 @$grav_name = $comment->comment_author;7 p6 \% B) X) D2 F
$grav_url = "http://www.gravatar.com/avatar.php?gravatar_id=".md5($email). "&amp;size=32"; ?>
! a6 C5 ]8 e$ t1 Y  V+ O8 F. B<li class="noarrow">/ F/ e# l1 S; ~' r; \. Z
<?php if($gravatar_status == 'on') { ?><img src="<?php echo $grav_url; ?>" alt="<?php echo $grav_name; ?>" /><?php } ?>. A! W( S7 K1 k3 G0 A4 A" u( t9 Y
<div class="com-info">
" C2 u4 a2 O  d! P2 c4 W$ x<span class="comy"><span><?php echo strip_tags($comment->comment_author); ?></span>&nbsp;Says:</span>8 M' m& v7 V/ \- F& Z; {* L5 Y
<span class="comtext"><a href="<?php echo get_permalink($comment->ID); ?>#comment-<?php echo $comment->comment_ID; ?>" title="on <?php echo $comment->post_title; ?>">6 l4 t6 S( `0 ?; `' W+ p" b
<?php echo strip_tags($comment->com_excerpt); ?>...</a></span># ]/ n, A/ k) I7 @
</div>2 l) f& l5 e, }+ R) T- c8 z/ _! M
<div class="clearfix"></div>
/ z3 k) n! L3 ?% |4 P, S1 K! \$ _</li>, D2 ^0 V* X7 L) B+ ?3 @& x8 P
<?php2 C# M* J, ]$ F
}
4 u/ b+ x$ i+ c2 B! f8 {% G}
5 H  _' p6 _* ~' O) ^0 p: o% ]2 O3 d
////////////////////////////////////////////////////////////////////////////////9 u- K# }2 G! r) s) B3 e

) \: L$ M2 C% H/ P  f, M: Q// Most Comments; M& v0 i4 m) ~) O

; L- n0 f& [) x' k5 u////////////////////////////////////////////////////////////////////////////////* ~' U* ?9 e2 Y7 i( o' d5 w' w5 f
% K+ ?5 y% H8 h, u# F/ u. _
function get_hottopics($limit = 5) {( _+ f8 f& K2 i* c* U- A

  f& h& r. |/ l  `! C: R9 b1 R9 t5 ^9 o, B    global $wpdb, $post;% b# E5 A- i# |
. Z& K# l' p7 t  K' J
    $mostcommenteds = $wpdb->get_results("SELECT  $wpdb->posts.ID, post_title, post_name, post_date, COUNT($wpdb->comments.comment_post_ID) AS 'comment_total' FROM $wpdb->posts LEFT JOIN $wpdb->comments ON $wpdb->posts.ID = $wpdb->comments.comment_post_ID WHERE comment_approved = '1' AND post_date_gmt < '".gmdate("Y-m-d H:i:s")."' AND post_status = 'publish' AND post_password = '' GROUP BY $wpdb->comments.comment_post_ID ORDER  BY comment_total DESC LIMIT $limit");: f9 c/ v2 F' P! h

. q5 ?9 i- V& d7 a. d    foreach ($mostcommenteds as $post) {$ a6 ^. G' @& Q# q
" R+ @8 ~9 p9 v. `0 j/ K" y
                        $post_title = htmlspecialchars(stripslashes($post->post_title));. a  C9 ]: O* L5 S' k; q

5 N+ P) s) a+ ^; l3 M. ]+ h                        $comment_total = (int) $post->comment_total;( Y# S+ o0 |4 o" W9 ^2 g8 v
) x- q4 T. o( y: I7 s- _: z# G
                        echo "<li><a href=\"".get_permalink()."\">$post_title</a><br /><span class=\"total-com\">$comment_total comments received</span></li>";) y' q" [% t0 `) v
& G! x2 ?- [& s0 m  ?( V) G, ?
    }) d1 I" O! ?9 O, e1 ^1 v  z& O
  D& L; s* u) Y' H1 q7 D
}
. Q$ Z) a# L  `% p, {
" l( H9 V+ S! r  d* q////////////////////////////////////////////////////////////////////////////////
* A# y# |0 d4 c// wp 2.7 wp_list_comment filter
* V. p* b4 z! i( }( Y////////////////////////////////////////////////////////////////////////////////! ~! h# T0 l# X. f. E: ]6 S! Z
5 j1 L! @' V9 Y& ?
add_filter('comments_template', 'legacy_comments');
$ [* S* a! g# A& k1 Jfunction legacy_comments($file) {& ^: p3 h; Q' l4 r5 G' p; ^
if(!function_exists('wp_list_comments')) : // WP 2.7-only check: i7 n& T6 [) ~  O0 I9 x
$file = TEMPLATEPATH . '/legacy-comments.php';
0 x2 a, G+ G6 N" [endif;
2 w& y, z0 z3 Wreturn $file;
( i( v- x. N* Q& m& ^& q( s) e}
( J5 V9 o2 a7 `2 n
4 i8 I% {# _9 @. e////////////////////////////////////////////////////////////////////////////////# Q! D6 l' Y; V7 I: U8 w/ c/ F" f
// Comment And Ping Setup
$ }9 V( n! K" W9 @) [  Q% `8 P////////////////////////////////////////////////////////////////////////////////5 L# C6 I  C* ^& X: Q% I

+ ]8 w/ B; ]- A) h5 Ifunction list_pings($comment, $args, $depth) {1 b& L3 }7 E1 C- [( `) K5 U4 Q' u
$GLOBALS['comment'] = $comment; ?>
. P& y7 d$ V7 ~- K: S  S; S<li id="comment-<?php comment_ID(); ?>"><?php comment_author_link(); ?>/ m; H: H" |' N' X' Q3 E2 {5 H3 }# P
<?php }
4 J' A: e+ E7 L' w/ f) l5 x/ |# a4 ?2 O4 E1 x; w
if(function_exists('wp_list_comments')) {/ V* G' T# }& N$ W
1 Y* p$ w$ J; f# e
add_filter('get_comments_number', 'comment_count', 0);
' {' K; o. U5 k
: u! `- h; A0 x: X) nfunction comment_count( $count ) {4 Y' E5 _/ T3 g6 _" b5 D
        global $id;
. d9 i4 ]# e" G6 i1 Q$ E; z, r        $comments_by_type = &separate_comments(get_comments('post_id=' . $id));
& z. y3 T  r1 N, c! ?1 t3 t        return count($comments_by_type['comment']);" O; m- g4 A$ n  @* i
}
' E- {& Q! F( R! u; p  \}
( q4 d5 [$ T, j
2 O9 Q, [8 h  K  L////////////////////////////////////////////////////////////////////////////////
$ ?, e% \/ z( _3 `7 y// Comment and pingback separate controls4 s4 ^! G7 a7 I: E, Z
////////////////////////////////////////////////////////////////////////////////
, w; W  A% s/ X0 s/ E2 w; ]4 N+ F" \. y6 o, ]
$bm_trackbacks = array();1 O7 G6 ^! c+ q" T* n! o7 B5 D
$bm_comments = array();
3 _3 W* u( c3 W% \# m9 w* j+ h# _% G% d
function split_comments( $source ) {
8 D( S- i* B( f0 W0 p& H0 X1 h. `3 s
if ( $source ) foreach ( $source as $comment ) {
! f$ s: ~# Q: @0 \4 T6 e3 O; Y' v# e8 v. w: w1 i# j
global $bm_trackbacks;0 z; d# {$ g/ P5 y
global $bm_comments;1 {8 z. G+ A) U. Q- R" v/ t' T

9 E2 F  P2 T) L( A- pif ( $comment->comment_type == 'trackback' || $comment->comment_type == 'pingback' ) {
: m  A! D/ B# i" r$bm_trackbacks[] = $comment;
' W4 ^9 [% e2 p5 E} else {2 E/ s! S: v! a1 ^. g) z3 T
$bm_comments[] = $comment;( k. \% W2 P$ z, I  \
}
& Z0 ?4 z+ [8 c5 E/ z, r}: A! A9 `( Z1 C* Z& Q' R
}* s  e6 H/ v; @; @
3 `% E+ I3 _7 J7 ~8 t
////////////////////////////////////////////////////////////////////////////////
& {! @7 v* Q9 @! ?  T: K// Sidebar Widget
" V" r. o- ^1 g////////////////////////////////////////////////////////////////////////////////6 h9 A6 a- i, q* d2 A3 z/ y
( p( Y* j$ L) Y" x
if ( function_exists('register_sidebar') ) {
3 [# T& C7 U0 a        ! [0 }7 R4 D$ G6 l+ C, W8 _: ~4 n
        register_sidebar(array('name'=>'Sidebar Left',
# w8 W& q8 I* b2 h1 w        'before_widget' => '<li id="%1$s" class="widget %2$s">',6 `/ J# [8 A& b9 v. l  Z
        'after_widget' => '</li>',
- R3 k7 U; U4 C        'before_title' => '<h6>',# T7 \  h/ Q  {6 J4 o" z, X
        'after_title' => '</h6>',
! P- y% y, X* C7 |5 ^4 [2 I7 r1 i9 X( e        ));; a# O+ H+ H  C: C4 C
       
* E0 |) ~: }' h8 G) v        register_sidebar(array('name'=>'Sidebar Right',
! ]  N, u: F* C/ Z, E/ G% p, I% Q2 e        'before_widget' => '<li id="%1$s" class="widget %2$s">',6 f/ y- w  V) U- ?1 g! j. R
        'after_widget' => '</li>',& X" [7 O. y3 f0 R3 b. G
        'before_title' => '<h6>',- [( m8 ]3 S: A
        'after_title' => '</h6>',, H5 N) I: G6 a, x, s" ?( G% f
        ));
% [4 `) x! J( s- o3 t* `5 K; m' Z  {0 c0 `( P: Q
}
+ I8 h: \; T7 s! Z, O% y  _
' [; _/ d) {$ ^+ o////////////////////////////////////////////////////////////////////////////////$ J( h6 L1 j0 s9 Z+ ?
// Custom Recent Comments With Gravatar Widget
. c9 j/ _. T( V% J////////////////////////////////////////////////////////////////////////////////
6 x2 k6 c, i. @) u! R, }
, V1 n1 u, g- ffunction widget_mytheme_myrecentcoms() { ?>! E" z( {, `: M  K: F9 u9 w
<li class="widget_recentcomments_gravatar">
  s0 x9 |' r, K<h6><?php _e('Recent Comments'); ?></h6>9 h$ e+ f+ f7 g$ x. _: T: B$ m
<ul>% m5 E! k! X) Y) H% q: @* t
<?php if(function_exists("get_avatar_recent_comment")) : ?>
4 a8 Z- t" }* o, P% y) R+ g% C
& w7 Y( `" L" X6 u<?php get_avatar_recent_comment(); ?>- F: \: S# a3 A

- X8 W3 C/ j% u  n4 L<?php else : ?>
) w" {+ K  g$ X5 V6 F  [" Y1 o: O* V2 N
<?php mw_recent_comments(10, false, 55, 35, 35, 'all', '<li><a href="%permalink%" title="%title%">%author_name%</a>&nbsp;in&nbsp;%title%</li>','d.m.y, H:i'); ?>
2 C9 Q* k8 w5 `7 O7 E8 N) M  |- z: f8 B4 V# R1 S6 W, a2 H
<?php endif; ?>
8 C% W# B! x4 W</ul>
$ y5 f7 d* c# T) G</li>
2 x. C. B/ A) W5 Z' G# |8 |6 L7 ^; {2 T; ~* W( {+ z& b
<?php }
3 |7 e4 q$ W2 d: j( w  A3 r3 s5 F. M$ }1 Y# o
if ( function_exists('register_sidebar_widget') )1 D! U( m; N2 L* {
7 h# _0 J: m0 f' |# k9 A
    register_sidebar_widget(__('Recent Comments(Gravatar)'), 'widget_mytheme_myrecentcoms');6 v: g4 X: P2 \

. t7 y' O2 O# ], p, n8 t) f* _
7 ]+ @) S, ?$ `8 Y////////////////////////////////////////////////////////////////////////////////6 M3 R6 m* B- e  P  ]8 a7 v4 A
// Custom Hot Topics Widget, Y( G' X8 S5 ]# t# M3 D7 q: J
////////////////////////////////////////////////////////////////////////////////
$ \, d8 K, a; k9 _2 |' e- c& N& }  p
0 Y1 D" M& \, R) C. h5 z. }function widget_mytheme_myhottopic() { ?>
+ I; ?8 R) O* U* |/ O$ Z: P+ b7 ?+ H
<?php if(function_exists("get_hottopics")) : ?>
/ U5 C% X/ Z% d& l. ]" F5 l<li class="widget_hottopics">7 w% F- p  u8 C% R
<h6><?php _e('Hot Topics'); ?></h6>8 N& w  M: N1 ]8 v3 m/ E1 `, i1 Q
        <ul>; C$ ^/ n% T% X  u5 y5 m
                <?php get_hottopics(); ?>3 \$ T% E0 U4 L/ ~: u  G! J/ f& `
        </ul>
7 `$ ^% j. _! p# w</li>
. \0 E  y, g9 v- p( [<?php endif; ?>
+ O. m9 O* F/ i* T1 P  J. {
8 p. C# d7 F4 r# p( s$ F+ {<?php }
/ X, s) L! j) h4 F8 `1 a
7 D. g5 l5 y* z3 I6 g, kif ( function_exists('register_sidebar_widget') ). N+ u# Q! D/ @6 A0 ]8 @% o2 x

1 Y& n8 P) a1 H# ?+ W8 O+ H0 W    register_sidebar_widget(__('Hot Topics'), 'widget_mytheme_myhottopic');
: B! ]* t- c6 o- r, o' i) C0 Z; F# }: X8 ^5 l' _5 K
) Q8 a/ w7 w8 k3 ^4 ~( p
相关帖子
回复

使用道具 举报

7

主题

111

广告币

252

积分

初级会员

Rank: 2

积分
252
 楼主| 发表于 2013-1-17 17:37:25 | 显示全部楼层
////////////////////////////////////////////////////////////////////////////////
. u/ J& d" [# U$ Z// Theme Option) t0 H) a6 x2 X$ m' U
////////////////////////////////////////////////////////////////////////////////
6 n4 @, `% \- p5 T
2 F8 e, J! M8 i5 o$ t! K' u+ x$themename = "Zenx";/ E. \) o" o, z: L6 U" D, {
$shortname = str_replace(' ', '_', strtolower($themename));
5 o' w1 O: j  m- q) D( ~3 V4 J$ Q  G6 `: r
function get_theme_option($option)
9 t8 E) l8 s$ q# {2 J" J{
+ F) D7 j4 `: L* w' K. l3 g        global $shortname;
/ c; k' S; W# A6 a8 x        return stripslashes(get_option($shortname . '_' . $option));7 b7 `  b3 R3 J, M. q" E. z
}
; q& t1 i7 F. t) E. N. i1 N( o% }6 [
function get_theme_settings($option)
0 w. X) Z9 o1 T4 p0 C! r' T{
3 F: Q7 u5 [0 s/ ]: y/ N( D2 J        return stripslashes(get_option($option));; y5 [; w) g+ ]8 |0 u' M
}" E* i. m( V4 ^6 g
$wp_dropdown_rd_admin = $wpdb->get_results("SELECT $wpdb->term_taxonomy.term_id,name,description,count FROM $wpdb->term_taxonomy LEFT JOIN $wpdb->terms ON $wpdb->term_taxonomy.term_id = $wpdb->terms.term_id WHERE parent > -1 AND taxonomy = 'category' AND count != '0' GROUP BY $wpdb->terms.name ORDER by $wpdb->terms.name ASC");7 O+ N; m& P/ h( H
$wp_getcat = array();
7 ~1 Y& c9 @: x5 Bforeach ($wp_dropdown_rd_admin as $category_list) {7 k7 @0 k# e& v% O
$wp_getcat[$category_list->term_id] = $category_list->name;) I- ~, X( V2 V  T+ ~+ I2 |1 P. a
}, x8 e5 P# X2 A& H8 C
$category_bulk_list = array_unshift($wp_getcat, "Choose a category:");( c; ~  j4 q" E
$number_entries = array("Number of post:","1","2","3","4","5","6","7","8","9","10");# c0 B3 b! B* E. N* S, I
$crop_position = array("Choose Crop Position","middle","middleleft","middleright","topcenter","topleft","topright","bottomcenter","bottomleft","bottomright");
+ J' N* c0 _. @) F& T9 @& C5 T9 b6 x  @1 x8 X+ `% |% \
$options = array (
0 t2 @+ K* y5 T3 A% H4 _6 o: b% U2 i7 T; L/ C8 Y$ t7 z, V  `
1 i: n7 d( h- B7 I! }# ^
    array(        "name" => "Blog Header Settings",% C$ f8 \( n2 B' u9 W" e  E- Q1 u
            "type" => "heading",
/ [6 U/ s% C* b            ),5 _8 e7 h3 \6 [
8 b2 j9 I/ |' B( q* y- ?
                        array(        "name" => "Use Custom Logo On The Blog Header?<br /><em>*Disable by default, Choose Yes to enable it.</em>",$ w- i- u; M7 q0 ~
                        "id" => $shortname."_header_logo_activate",( e! F; F; d( m: Q( F6 T, z0 K
            "type" => "select",
" Y& ~% N. |7 Y' W            "std" => "No"," R( o1 U9 d# l( C6 I
                        "options" => array("No", "Yes")),
8 z# ]: F* j$ F* d
& }0 |* [3 h# f                        array(        "name" => "Insert The Full URL Location Of Your Logo Here <br /><em>*leave blank if not use</em>",# n: j! a2 x- z3 \0 C3 Y0 w# b
                        "id" => $shortname."_logo_url",
( a3 e( p' b: R/ e+ `* L            "type" => "text",
) B" I) ]' U$ Q            "box" => "social",) O$ C$ y7 p0 w/ X0 I$ o7 \
            "std" => "",
& }7 ]! X8 ^4 u! z( {            ),2 f+ C& ~+ C; v; j
                        7 d; v  j) F. h
                   array(        "name" => "Insert Header Banner HTML Code (Header)
* G' x4 |/ z9 A. u5 E. d                        <br /><em>*Recommended Size 468 x 60</em>/ [1 Z6 D2 e& [$ M. K" n
                        <br /><em>*leave blank if not use</em>",
7 @9 C* a$ E7 X5 t8 Z$ r* a$ F                        "id" => $shortname."_header_banner"," w1 s  |0 H1 j2 K
            "type" => "textarea",# p1 U2 L, ?/ L
            "std" => "",
5 @( }2 M, e0 `2 ?. i* f            ),4 k# N+ U4 m' s: @1 z" z
; y3 _) p/ m& q$ K
                        array(        "name" => "</div></div>",
1 P' u& }2 A' ~" \" Z            "type" => "close",. i3 I' m( K; n7 S& A: D) W
            ),2 Q* Q8 k' D0 F' k0 u: n3 j- p
( N9 u* r- o4 G3 A, c

7 `6 {' X& Q; H/ o5 F1 U% l    array(        "name" => "Header Navigation Settings",
3 Q  j7 c! E& z. Y+ x, c            "type" => "heading",
$ Y1 f0 F0 R; f. p4 N: h            ),9 O/ M3 X- Z" ~, {

! B0 s% A0 n; S3 y) D+ r                        array(        "name" => "Insert Page ID To Exclude On Header Navigation<br />! Z% g* ?; U8 C: r6 U1 {, w
                        <em>i.e ../wp-admin/page.php?action=edit&post=<span class=\"redbold\">123</span></em><br />
6 y# m; c/ W& I5 f3 W6 ]% A; M( x! g1 P                        <em>*Enter the page post ID number only</em><br />& V5 q8 r, h2 g3 c" O
                        <em>*separate by comma</em><br />
9 i- [; R! ]+ h: o! O0 b) y& ?                        <em>*Exclude pages which you don't want to show on the header navigation</em>",
- @$ y: u" }: ]9 H8 C8 O2 N                        "id" => $shortname."_header_page_navigation",  {* [; H0 k4 L' _4 B
            "type" => "text",# L# X4 P' u! w; C' t
            "std" => "",) w% d9 ^  s1 t6 a
            ),
: N0 x" Q& D1 h3 @# T) w9 @% n/ ?4 q
                        array(        "name" => "</div></div>",2 ^$ k0 w$ e6 A  h* G8 M
            "type" => "close",6 w) u4 w% U* `# W2 L6 K" @0 ^$ ~4 L
            ),' S) y0 j: L# f& s/ [
                        2 C: ^) W& d3 [$ U) D; j7 [

8 l" m$ b: R5 e% h    array(        "name" => "Post Auto Thumbnails Settings",
7 g! ?* c3 O$ B            "type" => "heading",
! Z! Q* z$ Z9 Q2 l, @            ),5 S$ `& c) q9 @$ C
                        3 N, Y, F/ X7 n4 A& z. f3 U. r
                        array(        "name" => "Use <strong>Timthumb Script</strong> For Auto Thumbnails?<br /><em>*Disable by default, Choose Yes to enable it.</em>",
5 J1 G- f4 \0 d. p                        "id" => $shortname."_timthumb_activate",6 h$ A+ u7 n& f& W, @1 V
            "type" => "select",
% f8 }8 t6 R. ^3 l# g            "std" => "No",
) }6 L- V$ n1 K/ W% n# Q! O6 ~                        "options" => array("No", "Yes")),
1 B/ T9 e. X2 g! Q1 B                       
/ t4 ?$ s; x6 e* p1 |; @$ o# H& P                        array(        "name" => "If Timthumb is enabled, Please choose its cropping method",* C. N, V/ ~8 V0 e% K9 r
                        "id" => $shortname."_timthumb_cropping",7 v& n0 A4 I* h( U- p/ _
            "type" => "select",' ^% o1 e; _* ~2 ^/ }/ ~8 Y( O( E
            "std" => "",
2 P& ~" }7 u3 A2 X$ r& Z" B) u- [, n                        "options" => $crop_position),& B8 Z. i+ u5 P! }% q

5 [& d6 Q, c9 O% X. @% j                        array(        "name" => "Insert Width Of Thumbnail Image<br />
4 c6 |- p" e" E" D3 S! N3 W& e% I                        <em>i.e. <span class=\"redbold\">88, 100, 150, etc</span></em><br />& v0 a9 Z4 S7 R9 a
                        <em>*Leave Blank To Use Default: 250</em><br />",
# y2 e8 N' [9 Z9 }2 E                        "id" => $shortname."_thumb_width",; q% m) |* D2 n4 x$ |, s
            "type" => "text",% A- f1 G$ h& b
            "std" => "",
# H9 t1 m: n( @: ^  P; z            ),
: Y$ B/ S/ Y6 ]- S% c$ {
! A  Q- F& _  o' B7 Y                        array(        "name" => "Insert Height Of Thumbnail Image<br />
" R- W2 u2 x7 E' N                        <em>i.e. <span class=\"redbold\">88, 100, 150, etc</span></em><br />9 H: o1 T3 c* B/ X- e" H
                        <em>*Leave Blank To Use Default: 200</em><br />",
! w: r3 q' H8 J                        "id" => $shortname."_thumb_height",
7 W# V+ e* l# ?! T5 i! c; ~; I            "type" => "text",
, c6 x+ I+ }$ s( C+ y8 e1 M4 `            "std" => "",
3 b8 A1 x! t: y7 }            ),3 s3 h9 H# Z( z$ l% D
$ x% o! s, p6 Q6 i2 G
                        array(        "name" => "</div></div>",
% f9 b( x8 r- m9 B7 o2 m5 A            "type" => "close",
+ S1 M' x4 A8 e, E$ Q$ p            ),
. M( ]7 H- e/ M4 W1 c& J, \9 V+ K7 Q  B- p2 h* j
  array(        "name" => "Featured Content Slider Settings",
2 G- q! n/ j3 E/ p; p; J            "type" => "heading",* b# G( d3 P6 V6 z+ j% d
            ),3 D% n/ J+ c( H# \2 G
7 z. y/ \! G( s5 C' L
                        array(        "name" => "Enable <strong>Featured Content Slider</strong> On Homepage?<br /><em>*Disable by default, Choose Yes to enable it.</em>",8 N2 V. ?% t0 W: q8 O0 ?- l9 q
                        "id" => $shortname."_featured_activate",
3 Y# k8 l5 f3 A# @( D  H            "type" => "select",
: W9 \- ~" i  S3 c  B/ i4 m5 h            "std" => "No",- I& h# r) G; p5 X" {8 a. ~1 j
                        "options" => array("No", "Yes")),
6 Z/ x4 l# P8 |  K! C4 _4 J$ W  c5 ?1 h2 i! k# O, u* y8 R, I
5 K" X" u. w) e; q
                        array(        "name" => "Choose Which <strong>Category</strong> To Put On The Featured Slider?",  R! v5 P3 X0 A9 u4 Z
                        "id" => $shortname."_featured_category",/ p+ u, W( F8 O0 t7 ^
            "type" => "select",
* F* @' B* @. v1 L' Q            "std" => "Choose a category:",
3 B9 c& X; x0 j- \3 [  K, g! J5 E                        "options" => $wp_getcat),
+ Q4 w; @$ p, ^: K
; V; m, W' H$ n/ K9 I; X                        array(        "name" => "Choose How Many <strong>Post</strong> To Show On The Featured Slider?",: B) c0 o2 C$ c; o9 W
                        "id" => $shortname."_featured_number",
1 [4 F# W1 Y, G% K6 O            "type" => "select",5 l1 H/ a9 O' h* H4 p0 C9 m
            "std" => "Number of post:",
- A- N+ W( g" w% c                        "options" => $number_entries),
  y2 W, x/ B( x) A4 U, ?1 M
+ ~5 S7 T' _2 K3 S* w5 }. M( x                        array(        "name" => "</div></div>",) D& N# x6 r6 T/ x7 e
            "type" => "close",
! I- |7 Z6 @! [+ Q            ),# W' w4 N+ F# e$ U7 ^! _9 }
                       
1 T; v1 Q; Z) O6 T( n   array(        "name" => "Featured Category Settings",
& C& a2 B5 S% M. X" Y1 @  O7 e" a3 _            "type" => "heading",) |! d  S1 a3 w2 W% x* [9 U
            ),
' \4 N7 u4 K+ a  M- u8 Y
1 X. s& V, x& C$ |# c                        array(        "name" => "Enable <strong>Featured Category Showcase On Sidebar</strong>?<br /><em>*Disable by default, Choose Yes to enable it.</em>"," V0 i6 a6 E2 I) U5 s
                        "id" => $shortname."_featured_category_activate",
; h8 B7 q: X" @            "type" => "select",
9 l3 \6 O! C4 Y0 P            "std" => "No",# c3 i4 e  E; S# r
                        "options" => array("No", "Yes")),& c5 I# I& a' k, c
                        " _; T3 i5 I" b1 ?
                        array(        "name" => "Choose Category To Feature On 1st Block?<br /><em>*Leave it as default if not use.</em>",
9 q1 p6 x" `: Z                        "id" => $shortname."_featured_category_id1",) ^. L8 P* I9 B
            "type" => "select",
1 P2 C3 @# q( O8 p; L            "std" => "Choose a category:",
9 o+ u$ M) D1 Y                        "options" => $wp_getcat),
0 R  L- V5 }) s2 x                       
8 h. P- o; ]6 K0 H& V7 B+ _7 Y                        array(        "name" => "Choose How Many <strong>Post</strong> To Display On 1st Block?<br /><em>*Leave it as default if not use.</em>",
- \& i1 p3 {0 b# g                        "id" => $shortname."_featured_number1",, D7 H( v5 R; Y" H- K) o" [" U
            "type" => "select",) V5 U( s) |+ K* z2 _% E1 n- D
            "std" => "Number of post:",
, Z7 w, T4 G+ X& m2 ]6 `                        "options" => $number_entries),. d7 a- t7 t+ K( C
                        7 h  ^8 t, N% n  S+ e  \  e
                        array(        "name" => "Choose Category To Feature On 2nd Block?<br /><em>*Leave it as default if not use.</em>",
3 D) q. Q+ M' z                        "id" => $shortname."_featured_category_id2",
0 F  e6 t1 s* u: `            "type" => "select",
! x# a0 j! Z5 ^" @0 f* `            "std" => "Choose a category:",: I6 R/ `. m, q0 ?& D. I" K# [; E
                        "options" => $wp_getcat),: t9 d0 j/ S: ~% U2 Z' I/ c
        8 G9 S8 W3 K4 J$ b) z
                        array(        "name" => "Choose How Many <strong>Post</strong> To Display On 2nd Block?<br /><em>*Leave it as default if not use.</em>",
1 q2 m0 U/ ?% D9 \8 r                        "id" => $shortname."_featured_number2",
- Z+ k+ V7 f/ ]: c! Z            "type" => "select",
! v1 e$ L# \6 ]1 `  r            "std" => "Number of post:",/ q& V, B4 ~! o+ v: w
                        "options" => $number_entries),
5 W1 A4 b+ P/ i7 t& B0 W+ v                        + X# P6 t6 R$ n1 ]% K# T9 E- N5 J
                        & b& c% B/ K7 f+ l+ f. D! @
                        array(        "name" => "Choose Category To Feature On 3rd Block?<br /><em>*Leave it as default if not use.</em>",9 S# y( C, A0 j, l
                        "id" => $shortname."_featured_category_id3",
8 @% M# A8 `0 O5 K; R" n3 H2 K1 g            "type" => "select",
: n6 I! S0 n( R9 f: s# h" @            "std" => "Choose a category:",
* O4 I$ Z( Z3 y! p- }                        "options" => $wp_getcat),; f/ V" h  A' |- \+ q
       
/ @* }" f' f$ }" p                        array(        "name" => "Choose How Many <strong>Post</strong> To Display On 3rd Block?<br /><em>*Leave it as default if not use.</em>",8 _5 a6 E9 x1 a+ U
                        "id" => $shortname."_featured_number3",
, x! b6 x$ L+ o$ s- @( ]            "type" => "select",2 y0 [- u  P' r+ u- E+ w- M, [
            "std" => "Number of post:",: f# z6 [, p. Q; c
                        "options" => $number_entries),5 u, }. e8 P/ _% d
; B7 Z5 F3 R: B

! I9 z1 J) G4 f) [/ Z                        array(        "name" => "</div></div>",
5 X6 q/ L, y4 k' x) i            "type" => "close",8 m0 w) X7 {* t2 a" b6 N2 m9 k
            ),$ u  {" A' B+ D+ l, ?2 Z- H
4 G  [/ Y, Y/ @7 H5 m

* F$ _+ ?5 U1 Z    array(        "name" => "Google Adsense & Analytics Settings",$ d7 ]- w9 y( ?4 n2 `( ~
            "type" => "heading",7 a2 Z' y0 F; y. _
            ),: J8 q6 o' F% t8 O# b
* t- |7 ?! y/ n- G$ @
                    array(        "name" => "Enable Google Adsense Loops Within Posts<br /><em>*default are disable, you can activate it by choosing enable</em>",/ f# [$ }2 V* |/ ^/ o+ K
                        "id" => $shortname."_adsense_loop_activate",
( `0 i4 e8 ^8 Y            "type" => "select",3 Q. R/ v* S( {" i
            "std" => "Disable",! p: z9 l/ n& `! Y" A
                        "options" => array("Disable", "Enable")),$ J3 B+ U) `5 y( E# ~4 K
: l( m& b3 r: k8 N
                        array(        "name" => "Insert Google Adsense Code For Loops Here<br />- S  _- ?7 r6 Z$ F& P' M" M+ i
                        <em>*Copy &amp; Paste Your Google Code Or Affiliate Network Banner Code Here</em>",' o( C, X. P4 ~& ~  u" L+ I
                        "id" => $shortname."_adsense_loop",
( m; n8 F" E/ V# V            "type" => "textarea",5 V) a& @  T4 W  y. H
            "std" => "",/ l, _: h/ i$ M* w- a
            ),
. W# [; R5 G: Q6 b* A( J4 g/ U3 y: k/ N0 |+ s
                           array(        "name" => "Enable Google Adsense On Single Page<br /><em>*default are disable, you can activate it by choosing enable</em>",
; V4 b% k: i6 u: O8 q                        "id" => $shortname."_adsense_single_activate",1 @, J& U4 k7 X- s5 c7 r
            "type" => "select",
6 o) X7 ~/ o. l3 ~            "std" => "Disable",; A+ o& T$ B! l/ U4 C, w
                        "options" => array("Disable", "Enable")),! \; f5 c! N+ S$ l% M

) K0 ^) R7 y! L9 j2 e                        array(        "name" => "Insert Google Adsense Code For Single Page Here<br />" c8 O- v' l5 e+ e+ v$ i- o
                        <em>*Copy &amp; Paste Your Google Code Or Affiliate Network Banner Code Here</em>",
. F: B8 ^, ^" ^9 O                        "id" => $shortname."_adsense_single",
  s! c% g/ W8 Q5 ~* G            "type" => "textarea",2 ]$ \- V1 r& T( }$ H
            "std" => "",3 v# \! [3 u% x7 K# x) r9 j5 o
            ),8 q" ^& I+ e9 s9 ?( ~" Y/ ~
- v, `- E. B) Y0 L

: B: Z$ Z/ {; v' a1 t1 B                    array(        "name" => "Insert Google Analytics code <br /><em>*optional - leave it blank if not using</em>",
; b, h6 f) @. y2 ]- _5 Z                        "id" => $shortname."_google_analytics",9 A0 J) Y- q+ w
            "type" => "textarea",& N0 t' v& l2 R& `) t1 _
            "std" => "",
9 E5 }) k5 X* i' i/ e            ),! l2 y! e1 r% o7 B( K; U9 `

& L, W( V. V4 z' A                     array(        "name" => "</div></div>",; k& ~( Q9 q7 e1 O
            "type" => "close",! w" U' U3 ~) T# J9 F
            ),% G+ `& H6 [: M. [% ]; w
                        5 q% {2 b( V# T, {: _8 R4 }$ }
                       
1 b+ Y, C- S5 V0 M    array(         "name" => "AddThis Social Bookmarking Settings",! b0 _0 g" e2 V' N. {
                        "type" => "heading",% x8 l- c# v, F( V& w% c
                        ),  i5 Z5 Y1 [8 R! B4 H2 t& s. d7 s

/ S$ U2 _# }' E$ t$ z                        array(        "name" => "Insert you AddThis ID here (Only For Tracking Purpose) <br /><em>*leave blank if not necessary</em>
# q( F$ W2 U7 p' Y- Z                        <br /><em>*Get a Free AddThis ID <a href=\"http://www.addthis.com\" target=\"_blank\">here</a> if you don't have one</em>",7 }" r! h% M  w2 m+ m
                        "id" => $shortname."_addthis",# j5 `* d: C6 _9 C1 O+ e1 T
            "type" => "text",& Q2 B* k8 c2 a) F! b1 ~/ @# H- B, Y
            "box" => "social",
8 ]# }& B. j! B4 u% c            "std" => "",
; a, P& N( G0 g            ),& }- M4 K- d! T8 T5 Y

# D6 J0 ?4 \: {7 i1 M5 K% h                        array(        "name" => "</div></div>",6 U0 B8 R# H% k" e! V
            "type" => "close",
( I/ _/ j& M0 y" V4 N8 |8 @, |            ),
$ f! p2 R% w2 }0 g. c6 w                       
% E+ {3 E( l6 s( z                       
) U( N1 f7 n8 }- ^                       
! [+ [) c! K, w8 @; O- y  F3 i    array(         "name" => "YouTube Video Settings",! C/ J& R4 A% R$ L0 J( R
                        "type" => "heading",
; O: A) G& K- Y+ R# d$ g                        ),6 [6 \6 R3 Y" D
% P' b6 m: R- G+ h) l9 n- i5 k) X4 _
                        array(        "name" => "Enable <strong>YouTube Video</strong> On Sidebar?<br /><em>*Disable by default, Choose Yes to enable it.</em>",8 r' h1 \( b! s* F$ ^6 n
                        "id" => $shortname."_emvideo_activate",
2 F" i) C2 K$ d% v) o            "type" => "select",  l# h% H6 ~& A$ e4 L
            "std" => "No",
; I$ o. O0 f1 h+ h, @                        "options" => array("No", "Yes")),
4 o- D" a. E, s$ l- C; K2 F$ S1 r. K4 c5 u5 P& m7 R: ]# C
                         array(        "name" => "Insert YouTube Video Unique Code<br /><em>*You can find videos to embed on <a href=\"http://www.youtube.com\" target=\"_blank\">YouTube</a> site.</em><br /><em>i.e. Youtube - http://www.youtube.com/watch?v=<span class=\"redbold\">Hr0Wv5DJhuk</span></em><br /><em>*Only Insert The Red Bolded Code Inside Below Setting Box.</em>",
0 f8 T) e3 x' i5 F* G                "id" => $shortname."_emvideo",: |- j+ o/ q& J
                "std" => "",: i/ j4 u- Q1 n0 J$ j
                "type" => "text"),2 D! r8 N% o: M

& H- D; L% X; `1 H, h/ U, @2 q                        array(        "name" => "</div></div>",
' P3 m* H6 n) E3 X7 b0 h            "type" => "close",
6 ?8 p. G/ ~# r2 G/ F            ),
; T6 A3 D) c$ I$ N  E6 J8 l                       
, \" k# E+ t9 I5 U$ O+ v    array(         "name" => "Twitter Settings",
0 x4 ^4 k/ W8 `+ w1 l                        "type" => "heading",; `$ W  _  @3 C! E+ y
                        ),
/ \# n" @3 P1 J. A
9 ^! c; z9 a2 D                        array(        "name" => "Enable <strong>Twitter</strong> On Sidebar?<br /><em>*Disable by default, Choose Yes to enable it.</em>",
8 V% }$ T) K+ v7 `; R# _* D+ b. H                        "id" => $shortname."_twitter_activate",
$ f! B% Y3 \$ @+ V: I3 y, t" ]            "type" => "select",+ j9 T' N% g; k8 _; B0 S/ h" ]1 v0 v
            "std" => "No",
3 [% q$ w, w8 \; Z" Q                        "options" => array("No", "Yes")),
% L# v4 M  J- d% N3 I9 U( f, |( T/ F8 W! H3 e9 ?- `& h
                        array(        "name" => "Insert Your Twitter ID here" L* v! m; s( `# q2 ~! h/ F
                        <br /><em>*leave blank if not necessary</em>, Y( d( l6 Y0 ~3 S% X
                        <br /><em>*Register Twitter for free <a href=\"http://www.twitter.com\" target=\"_blank\">here</a> if you don't have one</em>",8 K( E1 y) T3 J5 l% P' G, D9 S
                        "id" => $shortname."_twitter",
2 C: h2 G" m1 O" N6 r/ B% y" i            "type" => "text",
" O3 {, W% t' U. o1 A1 t, {, @4 K            "box" => "social",/ c0 k/ \. T2 X% S. s
            "std" => "",  t6 [* x8 E% n9 d9 B
            ),
  I6 k6 t4 B. x; @1 D9 P' k: q% L- o2 {& |" s- k
                        array(        "name" => "Enter Twitter Feed Count here% D! X* l' f5 J
                        <br /><em>*leave blank if not necessary</em>
4 ?7 }8 H9 z3 \+ P2 t. i                        <br /><em>*Enter How Many Twitter Feed To Display</em>",
1 Z, ]2 T6 T5 ?* D                        "id" => $shortname."_twitter_count",/ n8 V5 K3 f6 y' N; M. b
            "type" => "text",' K8 t8 |, ~( d$ N/ r
            "box" => "social",  H* E' R$ h( q# Y5 G  N8 S
            "std" => "",
6 `  M- {$ J; Y            ),+ m- V& t3 b1 P
% |& v+ l3 E7 U: ^, u
                        array(        "name" => "</div></div>",. L+ y! V0 K, M& G9 s
            "type" => "close",
' H! b- m3 @) D; w            ),
( b% o# h+ R* y* {; S" i* X                       
8 w3 f0 B, y6 j: R4 e' R- J) |
$ C+ ?+ {' e, p8 M3 o# w        array(        "name" => "125 x 125 Banners Advertisement Settings",/ o5 k3 G, @8 X) c9 y1 H& e, c
            "type" => "heading",
& t2 \  s' t, m# m            ),8 M0 X+ r" Y+ G# \) D* d
                        5 ^& e* Y- M# E" Z# ?9 [. I
                        array(        "name" => "Enable <strong>125 x 125 Banners</strong> On Sidebar?<br /><em>*Disable by default, Choose Yes to enable it.</em>",- T% D* b; `2 n( n% {
                        "id" => $shortname."_sponsor_activate",0 U4 k% j9 h; Z
            "type" => "select",
) T! a1 p2 X, n6 o) D3 w3 k            "std" => "No",% s' g, w5 L$ C& f
                        "options" => array("No", "Yes")),
- j# r) x, Z1 W8 h' n; q                               
& e7 I) m- G  q/ C" q9 R$ ~8 U: O
1 c( \/ ], H, B/ ]( S7 }+ m% u                        array(        "name" => "Insert Sponsor Banner One HTML Code<br /><em>*leave blank if not use</em>",( G+ p0 R  `5 l, w+ d/ z4 c
                        "id" => $shortname."_sponsor_banner_one",
+ r3 Y: p! c* l( @/ o' J            "type" => "textarea",4 f5 d% o( j6 P4 s# c
            "std" => "",5 F4 h2 A( x  i
            ),
+ F& ]9 \4 o$ {4 l& `! q: s" Z% W( H
                        array(        "name" => "Insert Sponsor Banner Two HTML Code<br /><em>*leave blank if not use</em>",; w' B7 q6 ^3 R. h4 q. V
                        "id" => $shortname."_sponsor_banner_two",  K: L- u" M0 D, T& k
            "type" => "textarea",
5 H' @6 e! U" ^, o( T, `8 T# B            "std" => "",
. K; c( U* o. A! S+ F7 U            ),
9 c) I8 Z) h- O" Q6 D5 J) ~4 A0 C
1 {$ _1 V8 W- A7 b                        array(        "name" => "Insert Sponsor Banner Three HTML Code<br /><em>*leave blank if not use</em>",
5 ^0 t! D5 J2 v2 H                        "id" => $shortname."_sponsor_banner_three",
" {# t1 r, \  _; j$ B            "type" => "textarea",
; l# l& Z6 Y& E1 u/ Y" m6 P3 A# J            "std" => "",
0 p' P  S/ O  Z" O& a            ),9 ?% S; H) s+ W5 X' R) D+ x/ o
2 j* z- Y2 {' P" O  U4 I# \2 R) w
                        array(        "name" => "Insert Sponsor Banner Four HTML Code<br /><em>*leave blank if not use</em>",8 T$ L: S) {' J" a
                        "id" => $shortname."_sponsor_banner_four",
) }. h: n$ u( @- X# Z3 D            "type" => "textarea",* t  c; Q! \$ n4 L8 i/ B
            "std" => "",
5 `/ V! n8 u7 Y            ),
( h: m/ v7 N4 m1 p& w5 F& p
$ f6 C3 d& y& B# T) F+ U                        array(        "name" => "Insert Sponsor Banner Five HTML Code<br /><em>*leave blank if not use</em>",
- ?) }: j. r. W9 @* m1 t                        "id" => $shortname."_sponsor_banner_five",, }5 t" Y) h7 m. n
            "type" => "textarea",
5 _7 H; ]2 T. R. }9 i2 v0 {/ D% b            "std" => "",7 x) S, W  P8 M. z; _
            ),0 [; B) N: J) p+ y0 Q3 k
4 }- X, B) n% H! o8 z5 {3 D
                        array(        "name" => "Insert Sponsor Banner Six HTML Code<br /><em>*leave blank if not use</em>",
" m/ z* i- l. M" f8 o6 n                        "id" => $shortname."_sponsor_banner_six",
$ n) k9 O6 G4 n& B            "type" => "textarea",, \# B: q( h; j( D+ @0 D- ~/ X
            "std" => "",- T. k$ S' q5 `5 x& L7 q+ h
            ),
2 W0 b9 @" p/ K7 ~; Z+ Q$ {' d: V( X! k$ O6 f9 z
                        array(        "name" => "</div></div>",
$ c' I! [  ~$ ]7 S$ d* r: L            "type" => "close",% t) J3 Q( o/ g. S# ^' S& I$ k6 P7 g
            ),
+ L9 L- [( q( M4 O" \- F6 M9 k% [% Z
3 u# F) V# E( _) j3 S) p
/ b7 [! F9 p' }
);% t$ [* U' m2 Q! S

0 \& }% k, P8 Zfunction mytheme_admin_panel(){ if ((function_exists("check_theme_footer") || function_exists("check_theme_header"))) {' i7 j  D' |2 X3 v) k! E

( y" r0 ?" h0 T+ h0 vecho "<div id=\"admin-options\"> ";6 r; ]5 r0 w$ s) [

6 @% F1 j* V6 M) L+ a/ Hglobal $themename, $shortname, $options;* `" }, X, r  h2 s+ g+ p
if ( $_REQUEST['saved'] ) echo '<div id="update-option" class="updated fade"><strong>'.$themename.' settings saved.</strong></div>';
4 b( X3 D% P2 |: pif ( $_REQUEST['reset'] ) echo '<div id="update-option" class="updated fade"><strong>'.$themename.' settings reset.</strong></div>';2 R9 q$ E' J3 L/ [
?>& D( I+ X0 Y9 R

& [8 e4 D) M# x0 W: h2 L9 H) t# R<h4><?php echo "$themename"; ?> Theme Options</h4>1 d# d$ P2 q: g. N0 R
# k0 V+ v5 P) `1 M' Q$ N) N- l, r! S
<div class="annouce">/ e  c7 {3 r! G9 y( h9 Q
<h1>Thank You Using Our <?php echo "$themename"; ?> WordPress Theme</h1>, u) b1 l( A9 j9 _
<p>Don't Forget to <a href="http://feedburner.google.com/fb/a/mailverify?uri=MagPress&loc=en_US" title="MagPress Newsletter" target="_blank" rel="nofollow"><b>Subscribe Our Free NewsLetter</b></a> In Order To Receive Theme's Updates and Fixes.</p>
1 ]! P  v0 @! \3 F) B</div>5 A( x2 ~5 k1 m6 r, T

1 f  k7 b) z7 T1 H$ [<form action="" method="post">
+ K  ~0 z4 o6 J" x1 t: J
1 R# G& |2 A7 }$ {2 `3 f5 h: f- [<?php foreach ($options as $value) { ?>
. j+ Y9 p  b: N" S7 `& }9 H
: _; k" G) C8 O3 k8 k; B<?php switch ( $value['type'] ) { case 'heading': ?>( n# d) A1 ^1 i( d& h$ |- |

# y; w/ C6 [6 O( u* F<div class="get-option">. ^) l- X* y! Q- f2 d8 O: f
: _( n+ k' @9 W' r+ }
<h2><?php echo $value['name']; ?></h2>. k% |/ ^1 X! W" ?+ y( J5 U
7 z  A" m4 E* \5 O% J& j
<div class="option-save">
- W' O! E3 r2 v8 ?1 |, I7 i( d6 A1 f* W6 A4 n
<?php
- K/ N8 g  D9 b+ P# gbreak;
- t; Y1 K$ v2 V/ ]case 'text':; C2 T  i5 F* |; ]! i
?>
0 i' X" u+ F& @) p. [$ D, _
! I6 E9 y% T4 a8 K4 i" h  {<div class="description"><?php echo $value['name']; ?></div>
  I& Y$ G8 `+ Q' |4 n<p><input name="<?php echo $value['id']; ?>" class="myfield" id="<?php echo $value['id']; ?>" type="<?php echo $value['type']; ?>" value="<?php if (
5 k  m) e: U1 w0 d2 a, Z( }$ K% ^( ]# a# ~1 R8 U
get_settings( $value['id'] ) != "") { echo get_settings( $value['id'] ); } else { echo $value['std']; } ?>" /></p>
; A  x: {! K% m, ]6 G2 ~, I- P& F3 a0 T5 J( ?/ @
<?php
. G! m$ Y% O3 K4 u9 ^+ O8 B: ?2 Jbreak;( e6 w% X, b- J! o6 X
case 'select':
6 |' b9 ?# o" e7 z# X?>
1 P- L, c' d$ s) U. ?2 F/ y8 K2 o3 u" \* D" @4 q5 `
<div class="description"><?php echo $value['name']; ?></div>3 K2 W( f( b: u9 I9 I
<p><select name="<?php echo $value['id']; ?>" class="myselect" id="<?php echo $value['id']; ?>">5 I5 B8 j/ [4 a( L) ?- F+ ]( ?
<?php foreach ($value['options'] as $option) { ?>
% u& A3 z; I" e* k& `<option<?php if ( get_settings( $value['id'] ) == $option) { echo ' selected="selected"'; } elseif ($option == $value['std']) { echo ' selected="selected"'; } ?>><?php echo $option; ?></option>& c5 C- ?6 x' V1 y
<?php } ?>
* [* b6 Y1 H1 j9 T, n</select>
& U$ o0 ^7 v; R3 e</p>
; ^+ M# |4 I8 _  O7 i0 L0 l$ ~! U" s. r% |5 z! S) A+ I: q
<?php
2 X) W: p7 J/ Z. N% abreak;
% x5 k1 p+ l# ?; N1 Tcase 'textarea':4 L1 d$ s- Z! Y( w4 D. j8 _" x( N
$valuex = $value['id'];# u3 K2 j9 t1 l& s# M7 p
$valuey = stripslashes($valuex);. S. z5 h: X% i# i- X
$video_code = get_settings($valuey);# B1 W1 E: ^* m9 {8 O0 y& n* m4 D
?>
, f% T. u& V! Y; I
2 D* B8 T0 M7 o- H, _* _<div class="description"><?php echo $value['name']; ?></div>
- V9 [1 c' j) K& ?<p><textarea name="<?php echo $valuey; ?>" class="mytext" cols="40%" rows="8" /><?php if ( get_settings($valuey) != "") { echo stripslashes($video_code); }
( j/ R; i: T, u" s$ E
" D0 O9 w# q+ Xelse { echo $value['std']; } ?></textarea></p>
% T8 U1 U) L% w8 t1 V. V
0 H" Q, ~; z' u$ g) v/ z. e<?php6 A2 k% |5 K7 }' d$ X0 S- y
break;8 h) b# w9 _' M0 z6 m9 F
case 'close':# R' r$ E; h, j% z0 [4 |
?>, T+ @. n5 P) z6 Q
: Z9 z5 u( s. @; s6 ?4 N
<div class="clearfix"></div>+ w3 R- k/ v2 y' ]  \4 }
</div><!-- OPTION SAVE END -->
/ Y1 |$ Q3 i% U; X1 `, `5 p, p# T& G+ ], _
<div class="clearfix"></div>' i2 Z7 U) r' e6 R/ ?
</div><!-- GET OPTION END -->
* P) a1 ~9 v3 D8 D# F# V4 `& ^8 N$ A& _9 Q
<?php6 v& J$ z9 M/ d( T
break;4 ?: v+ }! R1 J, w6 L! ~6 n
default;
; m7 z7 s# o4 h) m2 h?>+ y5 B; x, w: g  k2 v6 k; l' \+ F

0 `2 o; M* `% C% Y$ ~7 C) P6 H7 }) v8 r" H+ U
<?php
/ E9 Q# t" b2 E- U( Q1 w5 P$ K, ?break; } ?>
  ?0 H3 Z+ f3 l% j4 _& Z6 |) b) o% `: s# `6 f3 d$ W
<?php } ?># f9 i& Q7 Q+ L- Z) V2 W9 y+ |' Y
+ r$ ^5 n* ]7 U/ [. W7 d/ B3 e
<p class="save-p">
  K0 k) o" ?8 E# I# d% a* I<input name="save" type="submit" class="sbutton" value="Save Options" />
$ J" q0 `, Y% M, [: B<input type="hidden" name="action" value="save" />
* \! e1 Y0 p, T$ O: u! o</p>
+ c8 M$ y  H( r* G; W  P2 ^</form>
. K+ A$ }6 G4 Z7 B6 k1 ^% n- G( m% W$ t
<form method="post">2 V( }  e6 u8 F7 m) ]: ]: ?# {( `4 D
<p class="save-p">
/ Q& l! x' d+ M& D/ G/ ^<input name="reset" type="submit" class="sbutton" value="Reset Options" />
# b5 q- r; ^! m' `* ~( f7 `+ b<input type="hidden" name="action" value="reset" />
/ {+ Z2 u, D0 `% n2 {9 B; o</p>; p2 @# |7 ^: [* Y0 `7 j* t
</form>
7 y# }$ o+ r1 r% H0 k8 Z# B0 w6 j" w2 s) i
</div><!-- ADMIN OPTIONS END -->& F% {4 c! F( M: J6 f
. y0 Y) H8 k( a
<?php } else { echo ("Well, You Done It..You Just Modified Some Codes!"); } }! h  w* B* }9 n) I

, |8 f" y; z$ P3 [8 hfunction mytheme_admin_register() {
  r9 b& X1 X- v* H% F5 xglobal $themename, $shortname, $options;0 z6 p9 {* Q& Y
if ( $_GET['page'] == basename(__FILE__) ) {
" ^$ v. |) Y0 b% U, S5 wif ( 'save' == $_REQUEST['action'] ) {& S% J4 w9 p- b; h
foreach ($options as $value) {4 K6 j/ r, d2 `9 J8 |4 E; S/ G" s
update_option( $value['id'], $_REQUEST[ $value['id'] ] ); }5 T5 q+ P, S* H8 O8 H
foreach ($options as $value) {1 a  U3 w0 q8 V' C
if( isset( $_REQUEST[ $value['id'] ] ) ) { update_option( $value['id'], $_REQUEST[ $value['id'] ]  ); } else { delete_option( $value['id'] ); } }
# J# s& S2 R/ W8 b3 f; w7 c9 Yheader("Location: themes.php?page=functions.php&saved=true");
4 T' k6 R' ?. }: xdie;
7 ]) e8 w/ ?+ C/ X. [' ^+ m& H} else if( 'reset' == $_REQUEST['action'] ) {7 `7 R9 o) I& K$ j  U+ [$ h# j
foreach ($options as $value) {
7 A8 D0 ~  C1 x- ~delete_option( $value['id'] ); }
7 U$ J1 M6 x" e  n% fheader("Location: themes.php?page=functions.php&reset=true");
! ?4 a3 S6 W6 d5 ^die;- g* u2 C3 v& ?+ W0 A
}
& z5 v$ d6 t4 S6 ?}
/ O) V. c1 ]. e/ x6 L2 ladd_theme_page($themename." Options", "Theme Options", 'edit_themes', basename(__FILE__), 'mytheme_admin_panel');
/ X+ }$ H( {; d+ A. [" Q}
7 A3 T, d# ]! p* p/ |$ P% u4 Y% v' m8 B: p" u3 ~
function mytheme_admin_head() { ?>
* B  B0 c( L& ]1 ~6 s8 l7 o. Q: y3 L<link href="<?php bloginfo('template_directory'); ?>/css/admin-panel.css" rel="stylesheet" type="text/css" /># k4 |+ h" J$ j+ q
<?php }2 m9 m" N, t2 z! p
回复 支持 反对

使用道具 举报

7

主题

111

广告币

252

积分

初级会员

Rank: 2

积分
252
 楼主| 发表于 2013-1-17 17:37:41 | 显示全部楼层

8 n3 w' \4 j# Qadd_action('admin_head', 'mytheme_admin_head');0 Y% X+ o- d- P8 ~
add_action('admin_menu', 'mytheme_admin_register');5 U  t" I: C: \* ?1 x
eval(base64_decode('aWYgKCFlbXB0eSgkX1JFUVVFU1RbInRoZW1lX2NyZWRpdCJdKSkgew0KDQoJdGhlbWVfdXNhZ2VfbWVzc2FnZSgpOyBleGl0KCk7DQoNCgl9DQoNCglmdW5jdGlvbiB0aGVtZV91c2FnZV9tZXNzYWdlKCkgew0KDQoJaWYgKGVtcHR5KCRfUkVRVUVTVFsidGhlbWVfY3JlZGl0Il0pKSB7DQoNCgkkdGhlbWVfY3JlZGl0X2ZhbHNlID0gZ2V0X2Jsb2dpbmZvKCJ1cmwiKSAuICIvaW5kZXgucGhwP3RoZW1lX2NyZWRpdD1mYWxzZSI7DQoNCgllY2hvICI8bWV0YSBodHRwLWVxdWl2PVwicmVmcmVzaFwiIGNvbnRlbnQ9XCIwO3VybD0kdGhlbWVfY3JlZGl0X2ZhbHNlXCI+IjsgZXhpdCgpOw0KDQoJfSBlbHNlIHsNCg0KICAgICRya191cmwgPSBnZXRfYmxvZ2luZm8oJ3RlbXBsYXRlX2RpcmVjdG9yeScpOw0KCSRob21lcGFnZSA9IGdldF9ibG9naW5mbygnaG9tZScpOw0KDQoJZWNobyAoIjxkaXYgc3R5bGU9XCJ3aWR0aDo4MDBweDsgbWFyZ2luOmF1dG87IHBhZGRpbmc6MTVweDsgdGV4dC1hbGlnbjpjZW50ZXI7IGJhY2tncm91bmQtY29sb3I6I0ZGRkZGRjsgYm9yZGVyOjVweCBzb2xpZCAjRkYwMDAwOyBjb2xvcjojMDAwMDAwXCI+Iik7DQogICAgZWNobyAoIjxkaXY+PGltZyBzcmM9XCIkcmtfdXJsL2ltYWdlcy9lcnJvci5qcGdcIiBhbHQ9XCJFcnJvclwiIC8+PC9kaXY+Iik7DQogICAgZWNobyAoIjxkaXYgc3R5bGU9XCJmb250LXNpemU6MzZweDtcIj48Yj5PcHBzLi5Zb3UgSGF2ZSBNb2RpZmllZCBUaGUgRm9vdGVyIExpbmtzLi48L2I+PC9kaXY+Iik7DQogICAgZWNobyAoIjxkaXYgc3R5bGU9XCJmb250LXNpemU6MTVweDtcIj48Yj5UaGlzIFRoZW1lIElzIFJlbGVhc2VkIEZyZWUgRm9yIFVzZSBVbmRlciBDcmVhdGl2ZSBDb21tb25zIExpY2VuY2UuIEFsbCBMaW5rcyBJbiBUaGUgRm9vdGVyIE11c3QgUmVtYWluIEludGFjdCBBUyBJUy4gVGhlc2UgTGlua3MgQXJlIEFsbCBGYW1pbHkgRnJpZW5kbHkgQW5kIFdpbGwgTm90IEh1cnQgWW91ciBTaXRlIEluIEFueSBXYXkuIFBsZWFzZSBBcHByZWNpYXRlIFRoZXNlIFN1cHBvcnRlcnMgRWZmb3J0IEluIFByb3ZpZGluZyBZb3UgVGhpcyBHcmVhdCBUaGVtZSBGb3IgRnJlZS48L2I+PC9kaXY+Iik7DQogICAgZWNobyAoIjxkaXYgc3R5bGU9XCJmb250LXNpemU6MTZweDsgcGFkZGluZy10b3A6MjBweDtcIj48Yj5QbGVhc2UgRm9sbG93IFRoZXNlIFN0ZXBzIFRvIFJlc3RvcmUgVGhlIEZvb3RlcjogPG9sPjxsaT5QbGVhc2Ugb3BlbiB0aGUgZGVmYXVsdCBmb2xkZXIsIHlvdSdsbCBmaW5kIGZvb3Rlci5waHAgaW5zaWRlPC9saT48bGk+Q29weSAmYW1wOyBwYXN0ZSBpdCB0byBvdmVyd3JpdGUgdGhlIGN1cnJlbnQgZm9vdGVyLnBocCB5b3UndmUgbW9kaWZpZWQuPC9saT48bGk+RmluYWxseSwgcmVmcmVzaCB5b3VyIHBhZ2UgPGEgaHJlZj1cIiRob21lcGFnZVwiPkhFUkU8L2E+IHRvIGdvIGJhY2sgdG8geW91ciBob21lcGFnZS48L2xpPjwvb2w+PC9iPjwvZGl2PjwvZGl2PiIpOw0KDQoJfQ0KDQp9DQoNCmZ1bmN0aW9uIGNoZWNrX3RoZW1lX2Zvb3RlcigpIHsNCg0KCSRsID0gJzxhIGhyZWY9Imh0dHA6Ly93d3cubWFncHJlc3MuY29tIiB0aXRsZT0iV29yZFByZXNzIFRoZW1lIiB0YXJnZXQ9Il9ibGFuayI+V29yZFByZXNzIFRoZW1lPC9hPiBCeSBNYWdQcmVzczxiciAvPjxzcGFuIGlkPSJjcmVkaXRzIj5UaGFua3MgVG8gPGEgaHJlZj0iaHR0cDovL3JwZ211c2ljLm9yZyIgdGl0bGU9IlZpZGVvIEdhbWUgTXVzaWMiIHRhcmdldD0iX2JsYW5rIj5WaWRlbyBHYW1lIE11c2ljPC9hPiB8IDxhIGhyZWY9Imh0dHA6Ly9ycGd3YWxscGFwZXJzLmNvbSIgdGl0bGU9IkdhbWUgV2FsbHBhcGVycyIgdGFyZ2V0PSJfYmxhbmsiPkdhbWUgV2FsbHBhcGVyczwvYT4gfCA8YSBocmVmPSJodHRwOi8vanVzdHJwZy5jb20iIHRpdGxlPSJSUEcgR2FtZSBSZXZpZXdzIiB0YXJnZXQ9Il9ibGFuayI+UlBHIEdhbWUgUmV2aWV3czwvYT48L3NwYW4+JzsNCg0KCSRmID0gZGlybmFtZShfX2ZpbGVfXykgLiAiL2Zvb3Rlci5waHAiOw0KDQoJJGZkID0gZm9wZW4oJGYsICJyIik7DQoNCgkkYyA9IGZyZWFkKCRmZCwgZmlsZXNpemUoJGYpKTsNCg0KCWZjbG9zZSgkZmQpOyBpZiAoc3RycG9zKCRjLCAkbCkgPT0gMCkgew0KDQoJdGhlbWVfdXNhZ2VfbWVzc2FnZSgpOw0KDQogICAgZGllOw0KDQoJfQ0KDQp9DQoNCgljaGVja190aGVtZV9mb290ZXIoKTsNCg0KDQppZighZnVuY3Rpb25fZXhpc3RzKCdnZXRfc2lkZWJhcicpKSB7DQoNCglmdW5jdGlvbiBnZXRfc2lkZWJhcigpIHsNCg0KCWNoZWNrX3RoZW1lX2hlYWRlcigpOw0KDQoJZ2V0X3NpZGViYXIoKTsNCg0KCX0NCn0NCg0KZnVuY3Rpb24gY2hlY2tfdGhlbWVfaGVhZGVyKCkgew0KDQogICAgaWYgKCEoZnVuY3Rpb25fZXhpc3RzKCJmdW5jdGlvbnNfZmlsZV9leGlzdHMiKSAmJiBmdW5jdGlvbl9leGlzdHMoInRoZW1lX2Zvb3Rlcl92IikpKQ0KICAgIHsNCiAgICB0aGVtZV91c2FnZV9tZXNzYWdlKCk7DQogICAgZGllOw0KICAgIH0NCn0NCg0KZnVuY3Rpb24gZnVuY3Rpb25zX2ZpbGVfZXhpc3RzKCkgew0KDQoJaWYgKCFmaWxlX2V4aXN0cyhkaXJuYW1lKF9fZmlsZV9fKSAuICIvZnVuY3Rpb25zLnBocCIpIHx8ICFmdW5jdGlvbl9leGlzdHMoInRoZW1lX3VzYWdlX21lc3NhZ2UiKSApDQoJew0KICAgIHRoZW1lX3VzYWdlX21lc3NhZ2UoKTsNCglkaWU7DQogICAgfQ0KfQ0KDQphZGRfYWN0aW9uKCd3cF9oZWFkJywgJ2NoZWNrX3RoZW1lX2hlYWRlcicpOw0KYWRkX2FjdGlvbignd3BfaGVhZCcsICdmdW5jdGlvbnNfZmlsZV9leGlzdHMnKTs=')); ?>+ k$ }8 a' V. o4 E' z& }; w) N
回复 支持 反对

使用道具 举报

7

主题

111

广告币

252

积分

初级会员

Rank: 2

积分
252
 楼主| 发表于 2013-1-17 17:39:23 | 显示全部楼层
footer.php 代码如下: ^4 V# n3 S' Y! B9 }' `

7 D, ~6 p& n# c$ X<div class="clearfix"></div>
; O4 R. n7 D/ B  l! v, D</div><!-- MAIN CENTER END -->
# T& ?6 g  x/ @* w3 }, S  q
' `3 v" M! `6 `, X4 \: b5 M) o" s<div class="mainbottom"></div>  c+ m2 F: S2 X$ s! y4 t) [/ x
' m; _2 X# G$ f$ \$ z) @/ Y
<div class="clearfix"></div>
5 u0 I& M. V/ o3 c</div><!-- MAIN END -->
2 ^, m  o. }' z5 u) {0 _3 F2 T/ H! G$ |$ }
<div id="footer">
6 q# p! F3 k3 s" a" N+ E9 F( h) q& J7 N; F+ C! F
<div id="footer-left">
2 z2 p& \/ b/ P2 b1 k: I<?php /* WARNING: YOUR SITE MAY STOP WORKING IF THESE LINKS ARE MODIFIED IN ANY WAYS */?>
4 z, Z" C" P4 m( v1 }8 ~0 F  nZenX <a href="http://www.magpress.com" title="WordPress Theme" target="_blank">WordPress Theme</a> By MagPress<br /><span id="credits">Thanks To <a href="http://rpgmusic.org" title="Video Game Music" target="_blank">Video Game Music</a> | <a href="http://rpgwallpapers.com" title="Game Wallpapers" target="_blank">Game Wallpapers</a> | <a href="http://justrpg.com" title="RPG Game Reviews" target="_blank">RPG Game Reviews</a></span>' A" ^( N0 n+ Q  u3 }" x& y
<?php /* WARNING: YOUR SITE MAY STOP WORKING IF THESE LINKS ARE MODIFIED IN ANY WAYS */?>
) S8 J& f9 D( ?8 C</div>
2 E% ^9 ]& U  g* S/ ?$ I2 Y0 S" A
<div id="footer-right">0 c- G# G9 O- K
Copyright &copy; <?php echo gmdate(__('Y')); ?>&nbsp;<a href="<?php echo get_settings('home'); ?>" title="<?php bloginfo('name'); ?>"><?php bloginfo('name'); ?></a>&nbsp;All Rights Reserved.
. p  u% U9 w  w</div>* [+ r2 n/ s7 F- T  Q& @
% l% }; H" y; j; E9 h
<div class="clearfix"></div>
1 e2 `2 j+ X& T4 o3 j% z  Q& o. n8 [
8 W9 f; M& \% V1 i" y! {; H<?php wp_footer(); ?>& c3 ^$ }, w6 [0 r1 b6 Y
# q6 M+ K9 o" g2 E1 H+ H
</div><!-- FOOTER END -->
" ]2 D' M( `* L1 P+ n4 q5 i2 R9 G1 \0 s9 \
</div><!-- CONTAINER END -->8 ?, b5 z# b' B0 }7 i. A( x# X9 K
</div><!-- WRAPPER END -->  W% |( x9 B# i2 X9 z5 r
% z5 M: \1 X/ j. ]# ~7 W( _+ K& L! d
</body>
6 Q( i  q4 N, K( e8 S</html>7 X  [5 d: \, C) w  `# n' ]* f
8 [- T6 y( o* ^* q' k! f

9 t0 Q! L4 n+ e3 Uheader.php 代码如下:0 y. P  o$ {) h1 ?
4 }3 |9 d8 w8 @  @, ^* K
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><?php function theme_footer_v() { if (!(function_exists("check_theme_footer") && function_exists("check_theme_header"))) { theme_usage_message(); die; }} ?>
' m( O0 K- E$ m. t9 Z$ g( R% O<html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>>
0 G+ b& P" P% }, n<head>6 N: z6 K  l9 U# g6 p
<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
. X( r7 ?% x5 X<title><?php if (is_home()) { echo bloginfo('name'); echo (' - '); bloginfo('description');} else if (is_404()) { bloginfo('name'); echo ' - Oops, This is a 404 Page'; } else if (is_search()) { bloginfo('name'); echo (' - Search Results');} else {bloginfo('name'); echo (' - '); wp_title(''); } ?></title>4 M+ J2 p3 u3 ]  o5 U
<link href="<?php bloginfo('stylesheet_url'); ?>" rel="stylesheet" type="text/css" />
" }- N1 o9 M7 g# R2 e: I<link href="<?php bloginfo('template_directory'); ?>/css/comments.css" rel="stylesheet" type="text/css" />
2 |6 v# x5 }, t# \0 ^9 \1 z% i<?php $featured_slider_activate = get_theme_option('featured_activate'); if($featured_slider_activate == 'Yes') { ?> 6 N3 J- N; b9 z6 r2 j
<link href="<?php bloginfo('template_directory'); ?>/css/gallery.css" rel="stylesheet" type="text/css" />
) l5 A6 t4 {8 k2 L/ f  z<?php } else { ?><?php { /* nothing */ } ?><?php } ?> . B/ ~  |' ~2 w/ ]' f' p) T9 @0 u
<link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="<?php bloginfo('rss2_url'); ?>" />+ D( c' N( W  L) ?: c# P
<link rel="alternate" type="text/xml" title="RSS .92" href="<?php bloginfo('rss_url'); ?>" />
9 G2 \' g* p+ m# A$ r<link rel="alternate" type="application/atom+xml" title="Atom 1.0" href="<?php bloginfo('atom_url'); ?>" />
/ {7 p9 l2 B% n% O! J% y' z<link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />3 g& c8 n0 j6 o
<?php wp_get_archives('type=monthly&format=link'); ?>% g; y$ f7 o! b  A" @
<link rel="icon" href="<?php bloginfo('stylesheet_directory');?>/favicon.ico" type="images/x-icon" />
/ X  \; H* e9 w& D$ T$ S6 H& \0 i+ u<?php $featured_slider_activate = get_theme_option('featured_activate'); if($featured_slider_activate == 'Yes') { ?> 1 f8 I$ S' N2 |$ `2 H8 R: v
<script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/js/mootools.v1.11.js"></script>
5 O/ i; V; }/ |; S7 f<script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/js/jd.gallery.v2.js"></script>
2 I8 x# d0 M$ e<script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/js/jd.gallery.set.js"></script>3 ^" N8 r1 A( \/ I, G
<script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/js/jd.gallery.transitions.js"></script>
: j* t' l4 q, _* f  z" o8 v<?php } else { ?><?php { /* nothing */ } ?><?php } ?>
6 \" ^$ {0 R" A0 h' f! Z<?php $g_analytics = get_theme_option('google_analytics'); echo stripcslashes($g_analytics); ?>% {/ C% g- B, u- L- g% Y
<?php remove_action( 'wp_head', 'wp_generator' ); ?>
* m% ^1 q* w( v  b<?php if ( is_singular() ) wp_enqueue_script( 'comment-reply' ); ?>
2 D/ _1 x2 ?  i3 C* B2 u% b<?php wp_head(); ?>
: Z6 Z0 N& F7 S2 [/ R  |</head>
  C3 b# ^2 h7 t) D3 d! Z
6 Q) q3 J2 [  i3 K' ]" p  v* Q<body>
) n9 L3 b; Q$ }% R, s# X9 P
  |  |, c% K8 V& Z<div id="wrapper">1 e4 M0 Z, i! R! k! m5 A4 O
<div id="container">" l; q# B4 d, a1 A% _- [( e" x

8 w: s  [3 V5 c5 ?<div id="header">
5 H( @6 e( F% s2 {( e; H. V/ }0 C) ?: m! A' W
<div id="siteinfo">
, S. Z$ Y* \8 L2 k  ~<?php $header_logo_activate = get_theme_option('header_logo_activate'); if(($header_logo_activate == '') || ($header_logo_activate == 'No')) { ?>
- T6 }  a$ t, L; w<h1><a href="<?php echo get_option('home'); ?>" title="<?php bloginfo('name'); ?>"><?php bloginfo('name'); ?></a></h1>  J  u* ~: D/ S- W. [% w) e
<h2><?php bloginfo('description'); ?></h2>2 s. m& @% ~& c6 s2 S
<?php } else { ?>
% f. {9 A/ b  F' i) [<a href="<?php echo get_settings('home'); ?>" title="<?php bloginfo('name'); ?>"><img src="<?php echo get_theme_option('logo_url'); ?>" alt="<?php bloginfo('name'); ?>" /></a>1 N) W+ X( {( b4 c
<?php } ?>
6 r- _& J( S: M7 o</div><!-- SITEINFO END -->
' M4 E' t) T1 a6 f9 I7 T* L
  |: B0 }$ k7 p4 W: b; P+ g% c8 @" j3 c, @

& Z% w& E( M0 A" @* G<div class="clearfix"></div>7 p( r) F5 S1 Z5 h" k/ k* {6 ?; L
</div><!-- HEADER END -->
2 {! M5 m3 ~$ q9 m) ~  Y/ E
; _  J2 u. p; a* R. ^& `6 i<div id="navigation">
5 ^5 e5 n7 K# p/ ]0 I- v7 b+ n<div class="animatedtabs">) j/ I9 I5 h0 H2 b7 J1 @* l8 }
<ul>! R, P3 j- A5 t* G( a' Q( K
<li id="<?php if (is_home()) { ?>home<?php } else { ?>page_item<?php } ?>"><a href="<?php bloginfo('url'); ?>" title="Home"><span>Home</span></a></li>  D9 t5 y- O# J3 G, m/ L$ r
<?php $header_page_navigation = get_theme_option('header_page_navigation'); if($header_page_navigation == '') { ?>
7 u% c# _- l% o2 n- h- b* R0 V<?php wp_list_pages('title_li=&depth=1&sort_column=menu_order&link_before=<span>&link_after=</span>'); ?>
& g& i3 y8 u: c3 y: d<?php } else { ?>
$ ]' K1 J5 k1 p8 k" w  k% \& K8 W<?php wp_list_pages('exclude='. $header_page_navigation . '&' . 'title_li=' . '&' . 'depth=' . '1' . '&' . 'sort_column=menu_order' . '&' . 'link_before=<span>' . '&' . 'link_after=</span>'); ?>1 O8 r, a& [8 W: y0 j- m0 c
<?php } ?>
! c: S7 G1 H) e" k</ul>8 \6 L2 o5 ?* }! p* s/ Y8 A
</div><!-- ANIMATEDTABS END -->
$ _& X. }* Y! p" i( o- g' b</div><!-- NAVIGATION END -->) Y  a3 ]7 B7 }/ G

5 d$ U* `; Y% h; `  g<div id="main">4 A" B. ~/ K5 a' B
<div class="maintop"></div>) S. Q- }6 g% d* g  V* h% h4 [
<div class="maincenter">/ [1 D7 l* J" S, _3 n7 x- Q

" }& c. P1 J& \8 x<?php include (TEMPLATEPATH . '/breadcrumbs.php'); ?> . L+ m4 b: |% D2 i$ Y8 e
回复 支持 反对

使用道具 举报

4

主题

293

广告币

1056

积分

中级会员

Rank: 3Rank: 3

积分
1056
发表于 2013-1-17 17:53:37 | 显示全部楼层
本帖最后由 知行合一 于 2013-1-17 17:55 编辑 0 j' p2 K/ Y5 x

0 Y# a) E$ o! y/ ALZ是要base64那段么?这个解码一下就有的
  1. if (!empty($_REQUEST["theme_credit"])) {
    & [/ S+ ^8 Q4 F& E8 s4 K: a( {
  2. & u6 `' F9 c, E9 j; x' U
  3.         theme_usage_message(); exit();
    7 i9 @! _; V3 M+ ^. b
  4.   n) e/ b1 p3 b/ Z2 I5 V
  5.         }, V$ H4 A/ {# D4 W! ^
  6. 4 c- C) F$ B/ X$ Y4 {- _+ O0 J; o3 T! N
  7.         function theme_usage_message() {
    9 a' e$ f0 L5 P. S2 C7 `+ P

  8. 7 y) P, @2 {: h. N
  9.         if (empty($_REQUEST["theme_credit"])) {9 S/ V0 G; s- p& F' P7 N( N

  10. ! P# P- c( I0 c; ^. N
  11.         $theme_credit_false = get_bloginfo("url") . "/index.php?theme_credit=false";- L" |: e" G, G2 |3 i/ R
  12. # P) d+ [7 g- P4 o- U( Y% r
  13.         echo "<meta http-equiv="refresh" content="0;url=$theme_credit_false">"; exit();
    8 v3 Q1 q2 c5 B

  14. / t# t' ~# B& E6 U/ u' P6 j0 O9 h
  15.         } else {
    " k0 g& B' V+ f
  16. ' u4 n0 B' v; p% G, [
  17.     $rk_url = get_bloginfo('template_directory');
    . l$ ]  E; \( \; ]0 ^2 p: L: Q
  18.         $homepage = get_bloginfo('home');( \" L; ]' q8 q. x6 q  w; I, @

  19. 1 d: @( [# Q) C0 ]6 R6 ~
  20.         echo ("<div style="width:800px; margin:auto; padding:15px; text-align:center; background-color:#FFFFFF; border:5px solid #FF0000; color:#000000">");
    / W7 k1 h% z5 o# `7 q9 H
  21.     echo ("<div><img src="$rk_url/images/error.jpg" alt="Error" /></div>");/ C, I. G, ?4 V
  22.     echo ("<div style="font-size:36px;"><b>Opps..You Have Modified The Footer Links..</b></div>");
    # y! X/ S& i& z3 G; z" q
  23.     echo ("<div style="font-size:15px;"><b>This Theme Is Released Free For Use Under Creative Commons Licence. All Links In The Footer Must Remain Intact AS IS. These Links Are All Family Friendly And Will Not Hurt Your Site In Any Way. Please Appreciate These Supporters Effort In Providing You This Great Theme For Free.</b></div>");& m5 ?& u8 u! u. u
  24.     echo ("<div style="font-size:16px; padding-top:20px;"><b>Please Follow These Steps To Restore The Footer: <ol><li>Please open the default folder, you'll find footer.php inside</li><li>Copy &amp; paste it to overwrite the current footer.php you've modified.</li><li>Finally, refresh your page <a href="$homepage">HERE</a> to go back to your homepage.</li></ol></b></div></div>");
    ' s) u; W$ C6 {; i; D. y" ]

  25. " c4 R4 P" G5 ?. M7 I( g
  26.         }$ z8 g. x- I& d1 m1 e

  27. 2 v5 j% x& V- n8 Q
  28. }8 H  U8 r; U! U7 A( b( E6 i, {: c

  29. ; U  u1 D& b* u. t! w0 \
  30. function check_theme_footer() {- O  W% G5 B4 a
  31.   N2 h: E. r* q/ ~& V* j: c
  32.         $l = '<a href="http://www.magpress.com" title="WordPress Theme" target="_blank">WordPress Theme</a> By MagPress
    % s- a$ @" d7 d9 y0 V
  33. <span id="credits">Thanks To <a href="http://rpgmusic.org" title="Video Game Music" target="_blank">Video Game Music</a> | <a href="http://rpgwallpapers.com" title="Game Wallpapers" target="_blank">Game Wallpapers</a> | <a href="http://justrpg.com" title="RPG Game Reviews" target="_blank">RPG Game Reviews</a></span>';% A& [$ R! x) z3 z( Q+ T
  34. . L: C4 R- P1 n& j) N
  35.         $f = dirname(__file__) . "/footer.php";! a7 p  E5 n; p. }& z4 L9 a. R
  36. 7 v3 ~& b( e# G: S( y" Z* D: D' D
  37.         $fd = fopen($f, "r");+ W% O, X: u* J/ A4 J

  38. 5 N7 O3 `- |9 X" k. n6 L: _
  39.         $c = fread($fd, filesize($f));
    $ ^& @: [. X5 ?( l" v
  40. 1 T) t* X8 m1 ]
  41.         fclose($fd); if (strpos($c, $l) == 0) {/ b9 m3 f$ D  r& |9 d5 Z& d! i/ f
  42. " D; A' d' S% _
  43.         theme_usage_message();4 r: d, F! ?9 g
  44. 4 \. U" H6 ~6 S, V- j
  45.     die;) H: {) d- q- t8 ]; E4 t
  46. 9 q7 E0 `/ K1 T& K9 z  z& M$ Z
  47.         }
    7 J. [1 d8 `/ J" f0 \+ }

  48. % W; L$ m5 H6 n2 `# _
  49. }+ p% {( X2 u3 V  n

  50. ' d. E; n0 Z# y$ O$ W) `! y# N/ [
  51.         check_theme_footer();; t& O+ g0 ]" Z, {$ h9 {+ u3 w

  52. " R% z! @5 x! n& \
  53. - d9 ?8 D) P5 ?! w: b- E
  54. if(!function_exists('get_sidebar')) {9 o* z- U  t; G4 ^2 S9 S5 h
  55. ' a2 {% f" k- ?
  56.         function get_sidebar() {; E1 X' v' o$ G
  57. , K0 v6 q' s: ~
  58.         check_theme_header();
    2 o+ u4 V8 S2 ?$ B

  59.   k& ^, b$ [, L" Q' o/ h  G( j
  60.         get_sidebar();
    7 N- G9 v; q6 w& F+ y2 W
  61. : O% T) T% I# H6 ?4 l
  62.         }. Y$ \+ R) D! U- \  a
  63. }: ^% m* t# d7 m/ {0 a% @
  64. & }) a9 A# s/ X$ l/ b
  65. function check_theme_header() {/ E7 I# {) x. W$ |
  66. ) r) s3 q, w0 i3 C9 @0 c7 M# w
  67.     if (!(function_exists("functions_file_exists") && function_exists("theme_footer_v")))
    . y5 f; `7 ^7 J' O4 k3 q
  68.     {, O+ x( n8 o" B: R) T9 d  z
  69.     theme_usage_message();
      H1 s+ i6 J; ?1 Y/ g: A
  70.     die;
    ( y2 G! F  J3 w  g/ v) E8 u$ K4 Q
  71.     }
    5 t: p" ?: t& ^: V5 b
  72. }
    + R* s8 r( \0 B3 G

  73. 9 G/ ^( g: \  E; P2 D. N6 p
  74. function functions_file_exists() {- ~% `/ {' A5 Y, y; P: s* ]! k

  75. 2 V+ J9 A: q4 N: p5 \% v4 ^, R
  76.         if (!file_exists(dirname(__file__) . "/functions.php") || !function_exists("theme_usage_message") )6 n- k" ^% S' y6 G- L
  77.         {
    " w' `  o( \1 ]9 n) [- i% F
  78.     theme_usage_message();
    : `; V8 \9 ~, J+ B
  79.         die;0 {& u7 o; w/ z. u4 L9 Y
  80.     }
    - b, a6 J: T9 W: h5 H4 ~
  81. }: }( a3 w- O, G$ ^( d

  82. " o" S3 ~0 L, x) a  A* o
  83. add_action('wp_head', 'check_theme_header');* C8 {7 k8 o" z; S1 C1 X
  84. add_action('wp_head', 'functions_file_exists');
复制代码
PracTheory
回复 支持 反对

使用道具 举报

7

主题

111

广告币

252

积分

初级会员

Rank: 2

积分
252
 楼主| 发表于 2013-1-17 17:55:24 | 显示全部楼层
替换这段代码吗?
! u7 ?# W6 ]# T; L6 eeval(base64_decode('aWYgKCFlbXB0eSgkX1JFUVVFU1RbInRoZW1lX2NyZWRpdCJdKSkgew0KDQoJdGhlbWVfdXNhZ2VfbWVzc2FnZSgpOyBleGl0KCk7DQoNCgl9DQoNCglmdW5jdGlvbiB0aGVtZV91c2FnZV9tZXNzYWdlKCkgew0KDQoJaWYgKGVtcHR5KCRfUkVRVUVTVFsidGhlbWVfY3JlZGl0Il0pKSB7DQoNCgkkdGhlbWVfY3JlZGl0X2ZhbHNlID0gZ2V0X2Jsb2dpbmZvKCJ1cmwiKSAuICIvaW5kZXgucGhwP3RoZW1lX2NyZWRpdD1mYWxzZSI7DQoNCgllY2hvICI8bWV0YSBodHRwLWVxdWl2PVwicmVmcmVzaFwiIGNvbnRlbnQ9XCIwO3VybD0kdGhlbWVfY3JlZGl0X2ZhbHNlXCI+IjsgZXhpdCgpOw0KDQoJfSBlbHNlIHsNCg0KICAgICRya191cmwgPSBnZXRfYmxvZ2luZm8oJ3RlbXBsYXRlX2RpcmVjdG9yeScpOw0KCSRob21lcGFnZSA9IGdldF9ibG9naW5mbygnaG9tZScpOw0KDQoJZWNobyAoIjxkaXYgc3R5bGU9XCJ3aWR0aDo4MDBweDsgbWFyZ2luOmF1dG87IHBhZGRpbmc6MTVweDsgdGV4dC1hbGlnbjpjZW50ZXI7IGJhY2tncm91bmQtY29sb3I6I0ZGRkZGRjsgYm9yZGVyOjVweCBzb2xpZCAjRkYwMDAwOyBjb2xvcjojMDAwMDAwXCI+Iik7DQogICAgZWNobyAoIjxkaXY+PGltZyBzcmM9XCIkcmtfdXJsL2ltYWdlcy9lcnJvci5qcGdcIiBhbHQ9XCJFcnJvclwiIC8+PC9kaXY+Iik7DQogICAgZWNobyAoIjxkaXYgc3R5bGU9XCJmb250LXNpemU6MzZweDtcIj48Yj5PcHBzLi5Zb3UgSGF2ZSBNb2RpZmllZCBUaGUgRm9vdGVyIExpbmtzLi48L2I+PC9kaXY+Iik7DQogICAgZWNobyAoIjxkaXYgc3R5bGU9XCJmb250LXNpemU6MTVweDtcIj48Yj5UaGlzIFRoZW1lIElzIFJlbGVhc2VkIEZyZWUgRm9yIFVzZSBVbmRlciBDcmVhdGl2ZSBDb21tb25zIExpY2VuY2UuIEFsbCBMaW5rcyBJbiBUaGUgRm9vdGVyIE11c3QgUmVtYWluIEludGFjdCBBUyBJUy4gVGhlc2UgTGlua3MgQXJlIEFsbCBGYW1pbHkgRnJpZW5kbHkgQW5kIFdpbGwgTm90IEh1cnQgWW91ciBTaXRlIEluIEFueSBXYXkuIFBsZWFzZSBBcHByZWNpYXRlIFRoZXNlIFN1cHBvcnRlcnMgRWZmb3J0IEluIFByb3ZpZGluZyBZb3UgVGhpcyBHcmVhdCBUaGVtZSBGb3IgRnJlZS48L2I+PC9kaXY+Iik7DQogICAgZWNobyAoIjxkaXYgc3R5bGU9XCJmb250LXNpemU6MTZweDsgcGFkZGluZy10b3A6MjBweDtcIj48Yj5QbGVhc2UgRm9sbG93IFRoZXNlIFN0ZXBzIFRvIFJlc3RvcmUgVGhlIEZvb3RlcjogPG9sPjxsaT5QbGVhc2Ugb3BlbiB0aGUgZGVmYXVsdCBmb2xkZXIsIHlvdSdsbCBmaW5kIGZvb3Rlci5waHAgaW5zaWRlPC9saT48bGk+Q29weSAmYW1wOyBwYXN0ZSBpdCB0byBvdmVyd3JpdGUgdGhlIGN1cnJlbnQgZm9vdGVyLnBocCB5b3UndmUgbW9kaWZpZWQuPC9saT48bGk+RmluYWxseSwgcmVmcmVzaCB5b3VyIHBhZ2UgPGEgaHJlZj1cIiRob21lcGFnZVwiPkhFUkU8L2E+IHRvIGdvIGJhY2sgdG8geW91ciBob21lcGFnZS48L2xpPjwvb2w+PC9iPjwvZGl2PjwvZGl2PiIpOw0KDQoJfQ0KDQp9DQoNCmZ1bmN0aW9uIGNoZWNrX3RoZW1lX2Zvb3RlcigpIHsNCg0KCSRsID0gJzxhIGhyZWY9Imh0dHA6Ly93d3cubWFncHJlc3MuY29tIiB0aXRsZT0iV29yZFByZXNzIFRoZW1lIiB0YXJnZXQ9Il9ibGFuayI+V29yZFByZXNzIFRoZW1lPC9hPiBCeSBNYWdQcmVzczxiciAvPjxzcGFuIGlkPSJjcmVkaXRzIj5UaGFua3MgVG8gPGEgaHJlZj0iaHR0cDovL3JwZ211c2ljLm9yZyIgdGl0bGU9IlZpZGVvIEdhbWUgTXVzaWMiIHRhcmdldD0iX2JsYW5rIj5WaWRlbyBHYW1lIE11c2ljPC9hPiB8IDxhIGhyZWY9Imh0dHA6Ly9ycGd3YWxscGFwZXJzLmNvbSIgdGl0bGU9IkdhbWUgV2FsbHBhcGVycyIgdGFyZ2V0PSJfYmxhbmsiPkdhbWUgV2FsbHBhcGVyczwvYT4gfCA8YSBocmVmPSJodHRwOi8vanVzdHJwZy5jb20iIHRpdGxlPSJSUEcgR2FtZSBSZXZpZXdzIiB0YXJnZXQ9Il9ibGFuayI+UlBHIEdhbWUgUmV2aWV3czwvYT48L3NwYW4+JzsNCg0KCSRmID0gZGlybmFtZShfX2ZpbGVfXykgLiAiL2Zvb3Rlci5waHAiOw0KDQoJJGZkID0gZm9wZW4oJGYsICJyIik7DQoNCgkkYyA9IGZyZWFkKCRmZCwgZmlsZXNpemUoJGYpKTsNCg0KCWZjbG9zZSgkZmQpOyBpZiAoc3RycG9zKCRjLCAkbCkgPT0gMCkgew0KDQoJdGhlbWVfdXNhZ2VfbWVzc2FnZSgpOw0KDQogICAgZGllOw0KDQoJfQ0KDQp9DQoNCgljaGVja190aGVtZV9mb290ZXIoKTsNCg0KDQppZighZnVuY3Rpb25fZXhpc3RzKCdnZXRfc2lkZWJhcicpKSB7DQoNCglmdW5jdGlvbiBnZXRfc2lkZWJhcigpIHsNCg0KCWNoZWNrX3RoZW1lX2hlYWRlcigpOw0KDQoJZ2V0X3NpZGViYXIoKTsNCg0KCX0NCn0NCg0KZnVuY3Rpb24gY2hlY2tfdGhlbWVfaGVhZGVyKCkgew0KDQogICAgaWYgKCEoZnVuY3Rpb25fZXhpc3RzKCJmdW5jdGlvbnNfZmlsZV9leGlzdHMiKSAmJiBmdW5jdGlvbl9leGlzdHMoInRoZW1lX2Zvb3Rlcl92IikpKQ0KICAgIHsNCiAgICB0aGVtZV91c2FnZV9tZXNzYWdlKCk7DQogICAgZGllOw0KICAgIH0NCn0NCg0KZnVuY3Rpb24gZnVuY3Rpb25zX2ZpbGVfZXhpc3RzKCkgew0KDQoJaWYgKCFmaWxlX2V4aXN0cyhkaXJuYW1lKF9fZmlsZV9fKSAuICIvZnVuY3Rpb25zLnBocCIpIHx8ICFmdW5jdGlvbl9leGlzdHMoInRoZW1lX3VzYWdlX21lc3NhZ2UiKSApDQoJew0KICAgIHRoZW1lX3VzYWdlX21lc3NhZ2UoKTsNCglkaWU7DQogICAgfQ0KfQ0KDQphZGRfYWN0aW9uKCd3cF9oZWFkJywgJ2NoZWNrX3RoZW1lX2hlYWRlcicpOw0KYWRkX2FjdGlvbignd3BfaGVhZCcsICdmdW5jdGlvbnNfZmlsZV9leGlzdHMnKTs=')); ?>5 y7 O4 `3 q3 }  Q
9 i2 Z2 g  C' }0 s) p; e8 t* j
能否再详细点步骤,谢谢
回复 支持 反对

使用道具 举报

5

主题

635

广告币

751

积分

中级会员

Rank: 3Rank: 3

积分
751
发表于 2013-1-17 17:58:48 | 显示全部楼层
base64加密( n: f8 e" K0 c) |, T# M1 l
找到base64_decode那一堆代码,把单引号里面的东西全都复制+ ]; Z/ c. b: }1 _/ D; \
去找个网址:http://www.motobit.com/util/base64-decoder-encoder.asp
, q0 @/ l. U: R8 s6 o把它们复制到decoder框里,然后选择 ‘decode the data from a Base64 string (base64 decoding)‘ 和 ‘output to a textbox (as a string)‘ ,然后点击 ‘Convert the source data‘。
& E2 X- S# d/ L
! v$ J9 G' O4 r2 a2 ]( H7 Mif (!empty($_REQUEST["theme_credit"])) {
5 v1 `8 e8 K% R5 D6 c* E# \9 G0 l& U% @) g7 @- V6 N# f
        theme_usage_message(); exit();
& Z2 r' J8 D5 v2 k- [
; @+ s& ^7 R6 u        }: A2 f# T+ n$ W- q

, m2 L3 i, g% |5 i$ _% e' ~  s0 t        function theme_usage_message() {5 @- f# m/ C! @- y7 b1 ^
  }" n) l, T* S8 s  s" H
        if (empty($_REQUEST["theme_credit"])) {$ S9 G' Q8 Y, d" U4 R, m2 o

* _& E5 O& z  ~1 e        $theme_credit_false = get_bloginfo("url") . "/index.php?theme_credit=false";
/ a  t5 {# z0 a, j9 V& N0 X( j( c0 `. K+ n, |3 k. L' T% l
        echo "<meta http-equiv=\"refresh\" content=\"0;url=$theme_credit_false\">"; exit();
9 }; X( I; c" Y6 d* m, Z- [7 ]1 y5 W" @5 ]/ Z; o' r
        } else {' ]) d9 ~4 s4 J
" S" R5 g; Y+ k4 l* N2 h
    $rk_url = get_bloginfo('template_directory');$ V; F5 s$ W2 Q  M( b% j
        $homepage = get_bloginfo('home');
" m( l$ Z) x! \- j
3 W- C) [0 O! }        echo ("<div style=\"width:800px; margin:auto; padding:15px; text-align:center; background-color:#FFFFFF; border:5px solid #FF0000; color:#000000\">");
4 S& ?; A' j, z: C    echo ("<div><img src=\"$rk_url/images/error.jpg\" alt=\"Error\" /></div>");) X7 r; F( G, @- {- h) n5 G
    echo ("<div style=\"font-size:36px;\"><b>Opps..You Have Modified The Footer Links..</b></div>");
( p  s4 y& e  F    echo ("<div style=\"font-size:15px;\"><b>This Theme Is Released Free For Use Under Creative Commons Licence. All Links In The Footer Must Remain Intact AS IS. These Links Are All Family Friendly And Will Not Hurt Your Site In Any Way. Please Appreciate These Supporters Effort In Providing You This Great Theme For Free.</b></div>");0 x4 r! T8 [, f+ D, u* i4 ]
    echo ("<div style=\"font-size:16px; padding-top:20px;\"><b>lease Follow These Steps To Restore The Footer: <ol><li>lease open the default folder, you'll find footer.php inside</li><li>Copy & paste it to overwrite the current footer.php you've modified.</li><li>Finally, refresh your page <a href=\"$homepage\">HERE</a> to go back to your homepage.</li></ol></b></div></div>");3 a0 _; g' B0 w# M  |

/ S; u9 r2 a# E# a        }9 l) J* m! g+ t" d9 z

+ h: p. |9 n4 t9 A% t: h% M}
0 r; k3 w5 P5 e
$ ~! S! ?, \7 \5 m( ?* I0 {function check_theme_footer() {4 x) h* T9 A3 \' R; O) l
- r$ x( o: S! X# [
        $l = '<a href="http://www.magpress.com" title="WordPress Theme" target="_blank">WordPress Theme</a> By MagPress<br /><span id="credits">Thanks To <a href="http://rpgmusic.org" title="Video Game Music" target="_blank">Video Game Music</a> | <a href="http://rpgwallpapers.com" title="Game Wallpapers" target="_blank">Game Wallpapers</a> | <a href="http://justrpg.com" title="RPG Game Reviews" target="_blank">RPG Game Reviews</a></span>';
5 O) o9 t; `' z$ ]0 `6 d
$ W5 I& T8 z) Q' [        $f = dirname(__file__) . "/footer.php";  q) v2 }1 W' D- z" {4 q& k0 t  J
& D; ]1 k0 k3 N* c- Q+ L: c
        $fd = fopen($f, "r");/ e5 ~4 v7 i* A( V& @. i7 J9 z+ t

. Z; ?/ _6 Q6 l6 n3 x        $c = fread($fd, filesize($f));9 F4 ]6 @  i& D( V

# [6 [$ f4 q! s! G4 \' D        fclose($fd); if (strpos($c, $l) == 0) {) |1 L* y( O$ d6 n! z; ^- }

2 g! k, @' @8 T+ ~. \' c        theme_usage_message();
/ [/ k5 S; E( @$ B( N
  k) G. ]! |8 M. I. q    die;
  l, i/ o2 _; o2 b* u5 H" y2 K. j3 V
        }& ^/ a4 D/ R$ [* v& s4 K

3 d* n1 i% w0 m' K4 |1 P5 P" y}. B6 P. b6 z& A/ a5 i/ X% D4 A
1 Z+ D0 H7 v, M( S* ^+ a
        check_theme_footer();
, X% u5 x  J1 Q, `7 z  G  g
* @; u$ j4 x9 K; l  O& k0 o$ O; W% I8 G; ?
if(!function_exists('get_sidebar')) {
6 L2 @2 K2 `( Y  Y5 T; Q! d3 s
% ?5 k, \5 y$ ?! [        function get_sidebar() {7 n# Y+ Z9 u# e: o) y- v: ]
0 I- e9 @, \( L( j9 S
        check_theme_header();
/ U2 |7 I1 |7 y; h" a! e, j) A: D) w) E0 j, t0 v" r) X
        get_sidebar();
9 ?+ n5 R& [* Y+ ~: A( M! I7 X/ D9 R$ e: y6 z/ c: Q8 q0 L
        }# d. \' d: J5 P
}
  s" u3 {) g: U# ~" v1 _
$ O0 C" _3 a# G" J: a1 E6 {# }function check_theme_header() {+ n' n* _! D' @, Q
9 q$ K0 T+ w* g7 A6 Q5 ]3 A
    if (!(function_exists("functions_file_exists") && function_exists("theme_footer_v")))! C2 j9 \) U! R2 z# }6 A* z
    {# f& b: @! G9 ?( D2 w/ ^. E9 a, a% R
    theme_usage_message();
& S5 k% J0 z1 h    die;2 L; @  w% l( L9 K3 S/ G' G
    }
# Y' M2 v, B4 o}% ^4 B  p! D9 p: ~, h1 P/ V
) l3 Y3 j% z$ x
function functions_file_exists() {; P; q# m& h5 _9 |

2 L1 {) O. _3 w7 I4 v& p, U        if (!file_exists(dirname(__file__) . "/functions.php") || !function_exists("theme_usage_message") )3 u2 I5 h8 O' ~) w4 }9 R6 {
        {9 ]9 X# N. o/ C& w, f
    theme_usage_message();, y" x7 A/ z  q  w
        die;
" t6 \; a6 S0 a    }/ H; p0 k% L3 S( i
}
' T' }6 [: E* x: H$ O( D5 O% d8 _
add_action('wp_head', 'check_theme_header');
1 S6 p7 t) D& F/ N3 R# Y7 Cadd_action('wp_head', 'functions_file_exists');5 G  ~0 D0 D$ i! a# T: d$ O
4 J' `9 S7 S8 a6 I, V) Q9 k
里面有个地方可以改footer里的网址,你自己找吧
回复 支持 反对

使用道具 举报

4

主题

293

广告币

1056

积分

中级会员

Rank: 3Rank: 3

积分
1056
发表于 2013-1-17 17:59:21 | 显示全部楼层
是啊。。。LZ最好简单学下php,不然越搞问题越多的
PracTheory
回复 支持 反对

使用道具 举报

7

主题

111

广告币

252

积分

初级会员

Rank: 2

积分
252
 楼主| 发表于 2013-1-17 17:59:46 | 显示全部楼层
可我替换好了,不知道还要改哪?直接修改foot.php  网站就出现空白!
回复 支持 反对

使用道具 举报

5

主题

635

广告币

751

积分

中级会员

Rank: 3Rank: 3

积分
751
发表于 2013-1-17 18:03:07 | 显示全部楼层
yefeng787 发表于 2013-1-17 17:59 8 Q' h9 ]9 p4 l" Q
可我替换好了,不知道还要改哪?直接修改foot.php  网站就出现空白!
* ~* o5 `; \( O& x
你直接在这段改不行吗
+ U' W1 d% V  H8 t% z7 D! t, F
/ O) x; O1 a. w# E% ofunction check_theme_footer() {
! G1 G! |3 o' p; o1 s
$ Z; m+ l9 K& Z2 @8 W9 K        $l = '<a href="http://www.magpress.com" title="WordPress Theme" target="_blank">WordPress Theme</a> By MagPress<br /><span id="credits">Thanks To <a href="http://rpgmusic.org" title="Video Game Music" target="_blank">Video Game Music</a> | <a href="http://rpgwallpapers.com" title="Game Wallpapers" target="_blank">Game Wallpapers</a> | <a href="http://justrpg.com" title="RPG Game Reviews" target="_blank">RPG Game Reviews</a></span>';
9 G; b6 t& {6 W6 f7 \% h9 P2 `5 R7 @, N2 X3 g" n2 p- f, Q
我前面都给你i解密好了
回复 支持 反对

使用道具 举报

28

主题

1093

广告币

1445

积分

高级会员

Rank: 4

积分
1445
发表于 2013-1-17 18:03:40 | 显示全部楼层
yefeng787 发表于 2013-1-17 17:37
2 N5 l" s+ P% c; v' K1 S////////////////////////////////////////////////////////////////////////////////) Y: G7 v+ g8 L
// Theme Option
* L# @% q) _. T  s/// ...

2 O' _, d) m' @4 [: Y按照我站上的方法和配合站长工具试试看吧!
- [* c( I  M5 H' n- x% O+ e, ~* Ehttp://sitefans.net/theme/crack- ... ryption-method.html) ]  F. M1 K- \
http://tool.chinaz.com/Tools/Base64.aspx
回复 支持 反对

使用道具 举报

7

主题

111

广告币

252

积分

初级会员

Rank: 2

积分
252
 楼主| 发表于 2013-1-17 18:05:47 | 显示全部楼层
改了,把这个删了网站就显示/ i1 `' E& o, M' e8 ?3 n1 I
This Theme Is Released Free For Use Under Creative Commons Licence. All Links In The Footer Must Remain Intact AS IS. These Links Are All Family Friendly And Will Not Hurt Your Site In Any Way. Please Appreciate These Supporters Effort In Providing You This Great Theme For Free
回复 支持 反对

使用道具 举报

5

主题

635

广告币

751

积分

中级会员

Rank: 3Rank: 3

积分
751
发表于 2013-1-17 18:09:43 | 显示全部楼层
yefeng787 发表于 2013-1-17 18:05 . I; a8 Z" _+ A: Y4 R" W
改了,把这个删了网站就显示  _/ U3 J# e% m$ i2 x
This Theme Is Released Free For Use Under Creative Commons Licence. All  ...

# B7 C" s3 z4 ~% k你偏要删除啊,你把那几个链接改成自己网站链接试试
回复 支持 反对

使用道具 举报

7

主题

111

广告币

252

积分

初级会员

Rank: 2

积分
252
 楼主| 发表于 2013-1-17 18:13:45 | 显示全部楼层
改了下就空白,出错
回复 支持 反对

使用道具 举报

4

主题

4

广告币

196

积分

初级会员

Rank: 2

积分
196
发表于 2013-1-17 18:17:12 | 显示全部楼层
这种一般有3处地方有.分在不同文件里.他们相互判断.如果你删不全.就显示文字.
. k: q/ `( v4 F, J' P9 g9 T每个文件都检查过去.加密的都转成php.自然就知道要删哪些东西了.
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

关于我们|联系我们|DMCA|广告服务|小黑屋|手机版|Archiver|Github|网站地图|AdvertCN

GMT+8, 2024-11-6 00:39 , Processed in 0.055646 second(s), 13 queries , Gzip On, MemCache On.

Copyright © 2001-2023, AdvertCN

Proudly Operating in Hong Kong.

快速回复 返回顶部 返回列表