AdvertCN - 广告中国

 找回密码
 立即注册

QQ登录

只需一步,快速开始

Binom
 谷歌+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, 无限带宽
FB二三解0.1元一个虚拟卡|PTM星际卡FB专用虚拟卡Google、Bing官方总代  联盟流量开户
FB账号资源/稳定靠谱/运行5年啦FB开户代投/三不限/白名单fb耐用号0.01一个fb账号官方合作商
广告位出租   
查看: 15332|回复: 27

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

[复制链接]

7

主题

111

广告币

252

积分

初级会员

Rank: 2

积分
252
发表于 2013-1-17 17:36:52 | 显示全部楼层 |阅读模式
代码如下哪位好新人帮下忙,谢谢了!!% X; ~3 o7 c2 X- K6 @0 {
5 \7 B8 T+ }( X6 W
functions.php ! b2 A& u" y( G% }# W, O4 b

1 ^* s, d$ \% B3 P8 @) H$ Q<?php# g  K" l7 ]& B0 m8 h" U% T5 y
////////////////////////////////////////////////////////////////////////////////
8 a2 u; P6 R  U8 l// Get Featured Post Image. O' n( y( C+ Y! Z! ~
////////////////////////////////////////////////////////////////////////////////
! Q' H- A/ k) X2 M, o2 _. cfunction get_featured_slider_image() {
. a8 E) b0 i/ S7 N) F; g7 z  global $post, $posts;
3 [0 [" B2 u' I" a$ @3 x7 Q  $first_img = '';7 G" d; w4 {* @" \: s
  ob_start();
5 H0 J, L5 o9 p. K- \  ob_end_clean();
, l6 t2 H& q5 @  $output = preg_match_all('/<img.+src=[\'"]([^\'"]+)[\'"].*>/i', $post->post_content, $matches);
7 G7 m+ o  A. B  n$ L; h$ G( l  $first_img = $matches [1] [0];
% |8 k, c. e  i) r/ E+ l  {: d* b
- _1 V2 ?  ?$ L4 R$ t% c$ p& w  if(empty($first_img)){ //Defines a default image
8 S( O# k2 @7 E% b3 j4 ~5 q          $img_dir = get_bloginfo('template_directory');. ^3 L( {4 \6 r  J+ o7 t; W
    $first_img = $img_dir . '/images/feat-default.jpg';
8 P( i8 Z+ K' @& I/ y) A  }
) G8 ^0 L( V4 K! L  return $first_img;
9 }( \  X- F& T2 k9 [$ t5 J}9 z4 H2 j4 S" r' d& g' _. T

5 z; {4 Y) Y) L! Z6 @4 f////////////////////////////////////////////////////////////////////////////////
) L5 r4 T' t  y+ T8 ?7 [// Get Post Image
1 G' N! J: Y) D. D! m# h: {////////////////////////////////////////////////////////////////////////////////
( L0 [1 [4 z" Y0 K9 Gfunction get_post_image() {/ a0 ]6 {& h9 ~( E# [" n) T/ A
  global $post, $posts;( B5 M/ N- y- X2 {' m% x
  $first_img = '';
+ X8 o( Q4 f* s# l$ W2 a9 k) V  ob_start();
1 T& ]) X- e2 ?  E  ob_end_clean();2 {# V  Z- f' c) N. h. G. u- Y# u
  $output = preg_match_all('/<img.+src=[\'"]([^\'"]+)[\'"].*>/i', $post->post_content, $matches);" E' V. F- [. a0 ^
  $first_img = $matches [1] [0];2 ~8 I$ c9 D9 _; L4 H7 s/ b3 b
. y; O, V+ u9 L- h0 }& z- [% Z# G
  if(empty($first_img)){ //Defines a default image
# s% T+ G( K; X" Z8 |          $img_dir = get_bloginfo('template_directory');8 f* v& u. h2 [
    $first_img = $img_dir . '/images/post-default.jpg';3 Z# l) b. J9 k  c7 p0 B
  }' b6 ^( @) }" U
  return $first_img;* {$ e$ v* N4 j- C
}; J& H0 Z; p. D& ?$ e& g
; ^% c/ i' z7 X) W- Q/ ~/ ~
////////////////////////////////////////////////////////////////////////////////
. G5 V: L' H+ \# F// Get Featured Category Image* _; q: a6 i6 K$ j7 A
////////////////////////////////////////////////////////////////////////////////( _7 h. C7 ]: m; G: H
function get_featcat_image() {9 [3 V! F, n4 ^4 f; x
  global $post, $posts;
; i  f# M: P( X' X! F% u3 Q  $first_img = '';& L5 H. l* [0 e( A
  ob_start();
; W* O# t: R6 ~) x  c9 v/ p& G, {  ob_end_clean();
( I, v9 Q( I/ f1 Z! m0 q& X3 R  $output = preg_match_all('/<img.+src=[\'"]([^\'"]+)[\'"].*>/i', $post->post_content, $matches);
. b: B. }) i' ~$ V" b( X  $first_img = $matches [1] [0];
% u" R2 q' |% v4 F
6 }0 `. r/ l# x' E' U! C  if(empty($first_img)){ //Defines a default image
  g' |/ E) s: S6 _- L4 A          $img_dir = get_bloginfo('template_directory');
% \. {" b9 ~+ v% }6 }* T3 n" V# r; b    $first_img = $img_dir . '/images/feat-cat-default.jpg';( J. w5 s, p, z- z* D0 w
  }
. ^- C) q- ^) z9 F* o1 X  return $first_img;: V  h% v6 @' K9 ~1 y) R
}3 \) ]* ?' u" k4 y8 Q) D4 x
. D9 S. [- c6 Z9 X
5 B0 ~1 z, V% a  i" S
////////////////////////////////////////////////////////////////////////////////) e5 R$ e* o/ J) m/ T
* s0 v: q* c& T/ }0 I# G
// Featured Content Excerpt Post
  x+ q3 c1 w" m6 |) u* E" |
( W% N' o( Z' t6 C$ K1 ]* r////////////////////////////////////////////////////////////////////////////////
0 h! R, O3 ?8 [! ]7 |; {- t0 D, ^6 F) X3 }& t/ v3 F  y* P
function 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) {8 N: z  k- s: y$ a
3 @% Q: J" K' e4 G
        if (preg_match('%^content($|_rss)|^excerpt($|_rss)%', $filter_type)) {
& c* y& r! U  N) N4 m5 \: y6 K! n) j' V' c$ B8 |
                $filter_type = 'the_' . $filter_type;$ x5 o6 d) \) [* u

. k+ k* Z2 z  \' D; R4 d        }* `  g. C; N$ |

/ H/ r1 M6 \6 t. v& I        $text = apply_filters($filter_type, get_the_featured_excerpt($excerpt_length, $allowedtags, $use_more_link, $more_link_text, $force_more_link, $fakeit));
& H+ C1 P$ }( C( g, {  b( @
& A1 e3 ?! v: h) Y/ f( m        $text = ($fix_tags) ? balanceTags($text) : $text;, J  I2 f; ?' ^7 r

& _' _9 F7 o1 G* R8 {) k        echo $text;. D; k+ s) a  u! g
5 T2 j/ p3 G6 i+ W% ?, t
}% o) P6 i; ^" B: f8 H

0 h5 G( G% T1 @) h, l$ Xfunction get_the_featured_excerpt($excerpt_length, $allowedtags, $use_more_link, $more_link_text, $force_more_link, $fakeit) {  I- {. H& I+ e6 M5 N! s/ r, j

5 U- Z" m! o1 b- u' E( c. a        global $id, $post;3 E; |# ~9 O# D% v0 S& Z* @
# M# E2 x) ]! r$ z
        $output = '';
+ W' o/ }0 D9 U2 T( E; f" F6 \( r0 {3 H" p3 a- v
        $output = $post->post_excerpt;" U, P1 l* Q! a! c

  k' Q# ~6 y0 ?& N4 N$ }        if (!empty($post->post_password)) { // if there's a password# {# C2 E9 Z% y7 P
, d5 |2 T$ o0 [2 P% K  S
                if ($_COOKIE['wp-postpass_'.COOKIEHASH] != $post->post_password) {  // and it doesn't match the cookie: k- u0 P0 @# I7 U; m, r) W

" j$ g& s- g0 d0 a2 r. Q6 d' F                        $output = __('There is no excerpt because this is a protected post.');$ u0 f! B4 l4 ]7 C
0 M0 A- H# F5 I  r& J7 x
                        return $output;
6 F7 D. \) _$ |7 ]8 d0 H' d# {, E2 ?/ a- S  H2 }/ _. `: D' D
                }: @7 X  P5 `8 f1 ~# h; E& F

: Y# f" \. f' W2 C% ~4 Y        }- w% d; H" i5 b7 ?  Z7 ]
3 n4 @* B/ S. i) V: P) Z
        // If we haven't got an excerpt, make one.5 Q6 W/ Q# L* l( b( d5 k

8 l, n8 c$ V- P/ f        if ((($output == '') && ($fakeit == 1)) || ($fakeit == 2)) {& u. W8 \6 G" s* D! h5 l

; d( n/ C$ X' }, v7 r$ A  Z1 U                $output = $post->post_content;
: f, K( Z) X$ r! P* s! Y$ k* o2 ^8 j  X+ Z! F3 O% C/ f2 S
                $output = strip_tags($output, $allowedtags);
, k1 r- O9 ^0 w$ z! M# z2 T* P! n' W- N; M* g2 k
        $output = preg_replace( '|\[(.+?)\](.+?\[/\\1\])?|s', '', $output );1 `( e# N6 }: i$ C) u

5 I8 \% M: u, N% Q                $blah = explode(' ', $output);
/ Z' E4 ?  J' ^8 L0 x6 r0 ^
7 j# ^6 f. T9 j' h, Z                if (count($blah) > $excerpt_length) {% L5 d' O# X: i  e7 e

4 L% ^) t4 C' O1 C' u" z                        $k = $excerpt_length;0 F  F4 s1 `' C: ~

. t6 x+ E8 H  O6 h                        $use_dotdotdot = 1;
. p0 b( T6 }4 _$ `1 {& r. }
- z% m. ~8 |+ v% G0 }, d6 E                } else {
. A6 B" j1 H+ C! a, V2 j5 u$ |
! b2 Q# \# a/ n                        $k = count($blah);
9 B: ?8 I+ G  G7 j' z' ~
2 M$ G7 [+ s+ T; {                        $use_dotdotdot = 0;
% t1 n8 k' T# \
- r% t/ O9 J: ~0 `! @6 z                }6 |; F3 k* R3 e) x& I* t$ R, [
4 Q: d; k: ^* r' G- y
                $excerpt = '';0 O9 H0 K9 e' z, m/ z% `
) t8 x$ c! _; {- x" E" f
                for ($i=0; $i<$k; $i++) {
) u" g+ W8 l  K+ B2 f: j, G) y) `) H# o4 l+ K: Q. i, W% l) a2 h
                        $excerpt .= $blah[$i] . ' ';! C* K4 P2 O8 a) q8 G& P6 \) n
" w7 [, U! I4 J
                }' l- y. v- A9 E" t7 v$ j

; s% v- y. K3 K7 [
3 b) X" t# w8 s0 D" |$ `7 H                if (($use_more_link && $use_dotdotdot) || $force_more_link) {( }7 l- v6 Y9 H8 }
+ @* A" Q7 w2 @1 s# r
                        $excerpt .= "...&nbsp;<a href=\"". get_permalink() . "#more-$id\" class=\"more-link\">$more_link_text</a>";% u- s$ v  y: h: l

  ?/ h( c2 X0 K6 }" I                } else {
/ t$ i9 x* H5 S% E, ^
. P0 @" l" v' i- t: z% S8 k* _3 ?                        $excerpt .= ($use_dotdotdot) ? '...' : '';- l) r) I' P+ M, `8 G

8 a& t* z7 {( b' N8 S                }
; Q% {( x9 ~7 S( E& o0 T$ v, ?
2 Q2 e$ P5 L/ B+ m  D+ n                 $output = $excerpt;  O& M0 ]) k( i. j6 j1 h

5 L3 d6 B; d; P( E" \7 V7 F) M: d        } // end if no excerpt# D5 I$ {! j$ V  P" O. G$ n

% l  q7 y& W- g3 k2 x        return $output;
! u: i  b! I% E( u8 [) y7 H1 K% Z( {0 h0 d9 |/ M, B- c
}
+ U7 n5 y# d+ ]9 t, P" g% T& L, o  [  t5 m7 \- p8 ^" ^
////////////////////////////////////////////////////////////////////////////////
. r+ x1 ?6 ~4 W2 S; ?# [5 e# Z9 Y% z' I! x' _+ N' p
// Standard Post Excerpt
) \0 c* D6 ~7 i$ ^! @6 m& m1 D- Q. P1 V! B6 N
////////////////////////////////////////////////////////////////////////////////6 ^/ G0 x! V, r7 l! }

* `' D: k0 w2 C' efunction 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) {% ^; ^( L$ @! t; B8 k

- c# l1 u  s0 p5 S0 ?( e        if (preg_match('%^content($|_rss)|^excerpt($|_rss)%', $filter_type)) {  `, |9 {2 [: A& K
  y) C; S1 u. |% y$ m
                $filter_type = 'the_' . $filter_type;. R, M2 _/ @; Z4 `

% i: W# k0 R+ i& n" u# K        }
6 A$ Y& m- `  ~9 W# x
( @  U* Y6 F3 Z6 U3 P- `9 R        $text = apply_filters($filter_type, get_the_post_excerpt($excerpt_length, $allowedtags, $use_more_link, $more_link_text, $force_more_link, $fakeit));
5 w$ D0 C' B: m8 L
0 v( b0 w6 J: x8 H8 L7 U5 \! X2 i8 h% x* v        $text = ($fix_tags) ? balanceTags($text) : $text;* O/ H! _4 ]4 R! [% o1 f0 z! p
5 O  v" k; z5 C# x2 V2 L" k% M& ^
        echo $text;0 Z; Z* p2 D6 P/ K
* {& a9 @$ H) J# d4 c3 }* h( @
}+ N5 w* D6 v) r3 K- q
  ^7 _! }) D; q! J  K! n) B; j' I4 d3 I
function get_the_post_excerpt($excerpt_length, $allowedtags, $use_more_link, $more_link_text, $force_more_link, $fakeit) {
) g$ V! A" E( x" ]9 Y. f* {" n6 ]' f& m+ a. c9 J
        global $id, $post;
4 S5 m& b+ Z* L2 `5 W0 B* I% z+ {4 u( l: d$ c
        $output = '';. h1 _& S/ x: Q, X9 w
" M) \( x* u" M1 A& t' X
        $output = $post->post_excerpt;
( M  |3 V! T; e& y- t& W$ Z; |" l1 z
- X' c+ s( n2 t8 q        if (!empty($post->post_password)) { // if there's a password
! k. V! i. ]7 p4 o% [- z
6 j! n8 @' o0 O; e* A" [/ `                if ($_COOKIE['wp-postpass_'.COOKIEHASH] != $post->post_password) {  // and it doesn't match the cookie! f* l0 @/ m- P- H. i. m* j

8 g! _2 N; ~( j* r! S  g                        $output = __('There is no excerpt because this is a protected post.');3 Q  ?. t: [2 U5 I5 [- C& ~

  p- c$ e5 d. M                        return $output;7 G7 W9 m8 ^# p& J/ |+ j' z
( t& E9 F5 V- Z& ^* [, u: M
                }8 x" Q9 C9 r, t& b4 w- B! r
, c' e9 l0 a4 L" X' z& I9 |
        }
6 F. W2 c5 ?4 h7 J) Q9 O
6 S3 n, L5 V' A: O" B* B        // If we haven't got an excerpt, make one.( A" P- S, q7 d" i, D

& j6 Q. ?& V: X* U2 V        if ((($output == '') && ($fakeit == 1)) || ($fakeit == 2)) {
4 z5 L1 M; y3 l) T% z2 r7 K1 ^4 }& X( o( e# K* B
                $output = $post->post_content;  ?. i$ I0 H5 u, c& I7 T0 x

0 I6 l1 I2 {. M* l                $output = strip_tags($output, $allowedtags);  u+ B9 p4 X# a- D, J  \2 i! W+ ~
- s: q+ d0 m$ |6 [6 Y+ c5 K: O
        $output = preg_replace( '|\[(.+?)\](.+?\[/\\1\])?|s', '', $output );
# ~9 g/ s8 E9 d1 ]) A( O7 e) U9 i% M3 a  `
                $blah = explode(' ', $output);" x0 d9 A! I0 o; J' f- q# U& V
: K8 B2 e* E% g. @1 U
                if (count($blah) > $excerpt_length) {
6 c! j$ q% W; p& G; V9 g! s( u6 r/ }0 ^. v  c$ ^5 @
                        $k = $excerpt_length;
1 s( ?0 B1 `! _0 A5 y, @  b: ^! u$ q/ _/ y, y
                        $use_dotdotdot = 1;
* }2 j6 b" r1 A3 a5 \( e
. U1 Y% R/ b# [; y4 Q4 |, K( G" j" c                } else {* Q5 i* }, Q2 ?# y8 J! a- S

+ x5 K- |- K7 W4 U* `2 e" N: R6 w/ r                        $k = count($blah);
) @* z7 q/ ^( u8 Y/ s, _* H6 u6 R( |/ `! j9 x2 O  @
                        $use_dotdotdot = 0;
5 l) C0 h8 [) n1 A& o8 M- [9 a9 B3 u. E3 ?: j4 {$ V/ Q# D( n
                }
! b1 I+ g0 k# h2 T3 B
' M7 Q" l; |1 ], z, B1 i6 M                $excerpt = '';; S+ r# t. G' Z# j& D
& Z1 H0 M' o1 y0 m' f/ q
                for ($i=0; $i<$k; $i++) {
% x5 `5 E/ Y+ c, ^; I( j' p+ W* Q2 s. A, R$ r$ b
                        $excerpt .= $blah[$i] . ' ';, P- q1 u6 g- [% D' r

  K* F- I" e; q* c6 m' T4 ~1 j                }
: F  K6 g7 @+ Q8 J" U( _* e2 h! Q3 \# N' u" J
! _9 l; z3 Q9 y) M+ s
                if (($use_more_link && $use_dotdotdot) || $force_more_link) {7 S+ v! N& Q; _4 T

) K  V2 `! X9 i" U                        $excerpt .= "...&nbsp;<a href=\"". get_permalink() . "#more-$id\" class=\"more-link\">$more_link_text</a>";' V! A0 v8 b3 V. p" |4 Y0 M

& g9 P6 L% T" j: y, N: K6 c                } else {: E3 Q  s: K7 d  C
+ \3 N: W4 G  ~6 Q2 o
                        $excerpt .= ($use_dotdotdot) ? '...' : '';
4 S9 I" H+ L* i' g! ?$ u! k  d; X5 q% k) e7 _4 i  G, G
                }
: b6 W  B+ ^! X5 }& q4 d- k9 y$ v" d8 @! P- @( I+ I6 t
                 $output = $excerpt;
) u/ P2 R" s5 _+ c% K
% \% N" X# {( V- @6 R& V- u3 C        } // end if no excerpt
) X; N" U* E/ E1 |9 ~$ e1 a( r! f& u8 z* E: X. L! _
        return $output;
! |* O: q9 J6 ~, S4 l
: o4 k7 u7 ]% p; s. K! h}
, d0 a: I# F, C6 f8 l" B0 A$ a
////////////////////////////////////////////////////////////////////////////////4 \8 A. G; j4 a

: e6 m2 X- k4 |( _4 ]' o5 X' A( D// Excerpt Feature Category* r0 d$ S( C6 F% d& Y- I. j3 a

, [5 o" x3 y9 M- p////////////////////////////////////////////////////////////////////////////////: ~0 G) x, ^9 O1 U- {

4 u0 ~+ o7 b2 A% Yfunction 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) {
* ]  `! e7 T; D; Y: I: X4 ?% D9 V! }7 o( t' \, k) @8 W8 g
        if (preg_match('%^content($|_rss)|^excerpt($|_rss)%', $filter_type)) {7 v1 X9 i" C( e0 d9 p
6 n8 L7 d+ K  D
                $filter_type = 'the_' . $filter_type;
! w  V: W" C  \5 z- S5 Y' ^! A2 }, P. D* W3 X" S, }9 Q
        }
" |- g) l1 A8 X! f6 ?6 Q2 ?( o  ]- G: f
        $text = apply_filters($filter_type, get_the_excerpt_feat_cat($excerpt_length, $allowedtags, $use_more_link, $more_link_text, $force_more_link, $fakeit));! z/ C* j( v. `' g; L1 I
9 w. I3 e2 h- b  [
        $text = ($fix_tags) ? balanceTags($text) : $text;, n( ]% `5 ~. f
/ W- }* g6 ^) }! y; K
        echo $text;6 E; L2 p* d' M0 c3 A9 W. V
) R+ \1 d+ y9 f8 t! h, f0 m# `
}
1 W( ?: z7 h! e. ^! q+ v7 y" c. T8 m0 [6 N. ^
function get_the_excerpt_feat_cat($excerpt_length, $allowedtags, $use_more_link, $more_link_text, $force_more_link, $fakeit) {0 A/ S) |( X$ S- p
( z  \8 x" H4 e  Y
        global $id, $post;) E! b) r) P+ Q: Q7 f& _# R

) T% H" s5 {1 M0 u( s        $output = '';" x* e9 }# t8 P* F6 _& v$ |8 Q0 }7 D& @
8 T/ j3 }6 y0 |7 _) {8 U; Y
        $output = $post->post_excerpt;
# }8 t% R- k( z4 U7 C
8 H0 W0 ?* t- [, A( W        if (!empty($post->post_password)) { // if there's a password
( V. P, s  G9 ^7 m1 d1 W
% a% x0 |1 z+ m* ^4 y9 f  h$ W                if ($_COOKIE['wp-postpass_'.COOKIEHASH] != $post->post_password) {  // and it doesn't match the cookie7 M! G( x# b+ l& u" |
. O1 r0 q. t: a% @
                        $output = __('There is no excerpt because this is a protected post.');
0 ~  A0 ?) t3 L1 y7 ]' y$ b
9 a8 ^$ C! _+ W9 g! [2 ?, m                        return $output;$ ~4 p0 o. D3 x- t0 ?! T6 {

4 Y9 p% }. [8 q3 W( B( ~$ K                }! {4 C/ J- q9 k& K* v$ p& l/ \' z

) F0 B: y6 ?- z        }, y9 |3 [' A% x6 Y: c& z7 S

. j# M6 ^8 S4 @1 f        // If we haven't got an excerpt, make one.
6 x8 C. b; y7 ^$ q1 p: l7 y
; @9 p; y  {5 X- m7 d        if ((($output == '') && ($fakeit == 1)) || ($fakeit == 2)) {1 Q7 Q7 G0 ?2 \% t/ o

+ H4 [: [; F2 C) F) }. Z/ [7 x4 E4 I                $output = $post->post_content;( k+ Z3 D6 {# U1 h
0 {, S! s6 a$ C7 e- c/ w
                $output = strip_tags($output, $allowedtags);
# _1 K# E) k" o  t% g6 J% f* X9 k1 k% T7 ~! h8 {
        $output = preg_replace( '|\[(.+?)\](.+?\[/\\1\])?|s', '', $output );
! _8 v! a$ v1 Y
; P+ l6 O0 n5 g" V4 j0 v8 J                $blah = explode(' ', $output);  ~4 D, u3 O( e

8 D- ?- R) U2 {/ z                if (count($blah) > $excerpt_length) {
/ e1 _! F2 [( W. T
; L2 U! b8 N; l) }8 L                        $k = $excerpt_length;
! y5 a' }  R8 V- |' J9 \/ Y- `
9 ^6 H4 Y8 x* v4 r' ~; M3 _9 m: q1 N                        $use_dotdotdot = 1;! P1 [; Y7 e0 e' {; L8 G
+ v- R" d$ I4 h. G6 X
                } else {8 B* g/ D: E' n* {8 P
. h/ [0 _. A3 O& I6 n/ K8 n; j% r3 Q: \" I
                        $k = count($blah);8 ~- s9 N1 c8 E( i: ]0 E0 [
- r3 c1 I3 V& u
                        $use_dotdotdot = 0;4 [/ z8 K* B2 y2 o0 D

6 c) q5 e9 C  a$ ~3 @- P                }
+ i* A6 X  t7 ~7 {! m2 f; p$ b+ n' a2 S+ G6 z' h, z( O* E
                $excerpt = '';4 D4 c, ?+ U4 E1 u

6 @+ |9 w/ P+ l7 I" L                for ($i=0; $i<$k; $i++) {
. x  G; ^9 v) q" u4 n
0 A5 L3 Z* f* h3 U; d                        $excerpt .= $blah[$i] . ' ';! Q) B3 Z' E$ \  b3 @3 {

* L! \: p4 S* Z0 R                }) [1 n( o8 Y: ?* ~) C7 D
9 v( _* m' x4 U+ r' s% Q

2 C9 `! H( }. b( Y  s                if (($use_more_link && $use_dotdotdot) || $force_more_link) {
5 d, B) T+ [0 `5 G
7 v& }* S% }/ O* v! m                        $excerpt .= "...&nbsp;<a href=\"". get_permalink() . "#more-$id\">$more_link_text</a>";) N; C* L: N% C2 [

( K( X) |9 @  V, ~# ?; B5 [. o. R" O8 H                } else {
/ S& W. u" Y0 `( ^  Z; {! y- o5 q( S, T  J3 [4 ^6 r5 s, b
                        $excerpt .= ($use_dotdotdot) ? '...' : '';& h: I- A( X( m4 l

6 @5 X0 M5 r$ ?( I, @5 Q, i                }
7 q3 d" W3 v7 A$ U$ p4 \6 x- `' n: b$ ~; f
                 $output = $excerpt;# g- t! v+ y' E5 y
3 P, U: w+ t0 W; d9 P2 @
        } // end if no excerpt
6 E4 g- T3 H: a; d7 Z1 _
! M$ }( c. \) b+ r+ i$ x        return $output;
0 k  p+ r" [$ E  M" p; [. C6 Y2 q  o/ B8 B& {+ k
}
+ E" V) ?5 V! Y. o* d: S8 L
3 Z: Y  l* I" f. c( K* Y
1 s; w6 d8 J1 y% M$ u" ~////////////////////////////////////////////////////////////////////////////////
0 L- t+ ]  W7 p// WP-PageNavi1 Y* S7 @1 ]" k, |$ J; ]  W
///////////////////////////////////////////////////////////////////////////////// \% w8 f; N  |4 h) J3 K

- W2 O7 w" l  X" d5 j" Zfunction custom_wp_pagenavi($before = '', $after = '', $prelabel = '', $nxtlabel = '', $pages_to_show = 5, $always_show = false) {$ S8 M9 k0 ^3 s
        global $request, $posts_per_page, $wpdb, $paged;
! C4 y1 e$ v& m  ~        if(empty($prelabel)) {0 \+ _% s) F& ?2 p( o9 E
                $prelabel  = '<strong>&laquo;</strong>';2 E/ |% F+ ^: e4 h; ~
        }
0 Q& ~, l- T( M- q" p        if(empty($nxtlabel)) {2 z+ [- I% P# T: `
                $nxtlabel = '<strong>&raquo;</strong>';
/ V, i  G- D- ]1 d) x        }9 S: J3 A9 i( ^2 ?
        $half_pages_to_show = round($pages_to_show/2);% L1 e/ n6 N7 G' B& a, n
        if (!is_single()) {9 l# \" C; d$ c1 ]
                if(!is_category()) {3 R6 F3 @5 q: U) V) R: o
                        preg_match('#FROM\s(.*)\sORDER BY#siU', $request, $matches);
  t5 b1 ?' E+ R$ f                } else {
) T+ V$ F! t) p9 F8 Z. u                        preg_match('#FROM\s(.*)\sGROUP BY#siU', $request, $matches);
! X  g! J$ ]) L& V: E$ _5 n                }, x( b0 }/ r0 I
                $fromwhere = $matches[1];
+ n1 \$ A6 |8 c+ O                $numposts = $wpdb->get_var("SELECT COUNT(DISTINCT ID) FROM $fromwhere");+ H4 y7 ?: ]: ?1 _5 r) \
                $max_page = ceil($numposts /$posts_per_page);
0 Z; m) a" J4 W( _1 i' n* D$ Y                if(empty($paged)) {3 |' d& W8 n4 v0 s8 s" v
                        $paged = 1;! R6 ?' ?8 x8 H* v+ G# _6 s3 L9 N
                }" o5 S1 k' H  r6 ~6 c6 \
                if($max_page > 1 || $always_show) {
8 h3 V4 R5 Z0 N# h& S: \7 q                        echo "$before <div class=\"wp-pagenavi\"><span class=\"pages\">Page $paged of $max_page:</span>";, _( P5 K6 R$ }- p8 E( S6 o
                        if ($paged >= ($pages_to_show-1)) {
7 Z5 A& b$ k, L3 F                                echo '<a href="'.get_pagenum_link().'">&laquo; First</a>&nbsp;';% T8 q) X, e/ a: [
                        }- h3 C, t, L" |% w
                        previous_posts_link($prelabel);
" K" o3 B- L+ N+ o0 S  A3 S                        for($i = $paged - $half_pages_to_show; $i  <= $paged + $half_pages_to_show; $i++) {
% E- N, d4 p4 ?! f( }                                if ($i >= 1 && $i <= $max_page) {
) h. w% e( S, i: R- I5 k                                        if($i == $paged) {
+ k1 G5 F* q  s3 S. ~9 X4 i, G                                                echo "<strong class='current'>$i</strong>";
% C" p( p! L7 U. ^  U7 ~                                        } else {
4 A% |$ H  i8 Q" j% C( b) |% A                                                echo ' <a href="'.get_pagenum_link($i).'">'.$i.'</a> ';
; G1 g0 z. w$ ]9 N) z4 y9 {) X- m                                        }& R6 f( W/ W6 g6 I
                                }' c. u) J. R9 K. B
                        }
4 h! f6 a8 D; O/ [! d# P& a                        next_posts_link($nxtlabel, $max_page);
8 |( q  r# v, O- y) N; c5 f                        if (($paged+$half_pages_to_show) < ($max_page)) {" q+ Q' d$ |6 ?2 M. l, n) g- E
                                echo '&nbsp;<a href="'.get_pagenum_link($max_page).'">Last &raquo;</a>';
& ]5 a6 L" \# s& M                        }, D$ R; F3 G2 C8 u+ b
                        echo "</div> $after";
" P& d7 _2 j( u                }
- z5 R$ I- Z1 |  J0 K" ~& b        }. P% b; t. j/ a2 P$ g( f- m1 K/ o
}
+ s5 b+ h! B- }& \# G& n9 d5 @5 l' z( T$ J
; K+ Z7 \7 L" o. A; C3 F2 M# S
////////////////////////////////////////////////////////////////////////////////
3 V, x# Q# L. c: w// Get Recent Comments With Avatar" ?$ G" C. z, R' [- z
////////////////////////////////////////////////////////////////////////////////
% R( I4 C" G6 ?. A. Y* }function get_avatar_recent_comment() {  \9 j8 t: S* d. k' C4 s  B( ?( J

0 w! A: j4 C  ^/ }global $wpdb;
* n5 n+ R+ F8 @6 R1 R+ E4 O
/ ^. d0 K# _& e+ p: p$sql = "SELECT DISTINCT ID, post_title, post_password, comment_ID,
6 J. B+ X! n; h* V2 S% A0 ]comment_post_ID, comment_author, comment_author_email, comment_date_gmt, comment_approved,- k7 e6 p6 {& u4 j
comment_type,comment_author_url,
! y/ m2 {6 B4 tSUBSTRING(comment_content,1,50) AS com_excerpt! _/ M0 \7 N/ }& N% m; S
FROM $wpdb->comments
5 J. k" S9 |* _2 W/ K/ F% [LEFT OUTER JOIN $wpdb->posts ON ($wpdb->comments.comment_post_ID =
# s, L; Q* A$ y9 c3 Y- v$wpdb->posts.ID)* H/ `) ^4 c+ n0 y5 [$ \. G
WHERE comment_approved = '1' AND comment_type = '' AND7 H( D, G6 r4 U/ j+ ]* {) o( H) F, O
post_password = ''
# P/ w: E) R0 K8 I( s* k  ]ORDER BY comment_date_gmt DESC LIMIT 5";
6 h- W1 Q% \" V) Z% L5 W6 ~- @* H* _4 K6 Q" m
$comments = $wpdb->get_results($sql);
- b1 u. G& m- g: b% w$ e: k8 o2 a; W$output = $pre_HTML;
8 \1 w! A8 j( Q3 G0 W9 Q2 e$ G$ R$gravatar_status = 'on'; /* off if not using */
2 M4 ~/ Z, r. ~% b; c7 \* x- K, w9 q- m8 U% }& R. l  o. M
foreach ($comments as $comment) {
2 o* Z, b) K$ w. y! U9 d: r$email = $comment->comment_author_email;
, q; V4 T, n* N$grav_name = $comment->comment_author;/ ?+ Z9 Z" u9 `- a  v( _
$grav_url = "http://www.gravatar.com/avatar.php?gravatar_id=".md5($email). "&amp;size=32"; ?>, g2 J0 n  w' W2 L7 t; x! _
<li class="noarrow">
* Z! [' w5 |6 S- r* c) F<?php if($gravatar_status == 'on') { ?><img src="<?php echo $grav_url; ?>" alt="<?php echo $grav_name; ?>" /><?php } ?>' [* r$ R2 Z, v7 y( m
<div class="com-info">
9 E7 Q1 y6 Y' L- [<span class="comy"><span><?php echo strip_tags($comment->comment_author); ?></span>&nbsp;Says:</span>
8 N* i2 _6 ?  Q; V& F3 ~<span class="comtext"><a href="<?php echo get_permalink($comment->ID); ?>#comment-<?php echo $comment->comment_ID; ?>" title="on <?php echo $comment->post_title; ?>">0 [) t. o$ S* y( c: t9 U; ~6 `
<?php echo strip_tags($comment->com_excerpt); ?>...</a></span># [" Q% Q/ {. I  T9 C/ N4 V" h
</div>6 N" [1 ^7 ~/ s4 D) {9 K
<div class="clearfix"></div>
( N$ M1 _! n/ E& J: f</li>" u) ~! [; ~! q8 J- Q& X
<?php
- A4 \8 e5 e% d}  v% `8 v, [; O+ P1 R
}
$ u3 z' ]8 U8 ]: A  `( E* T- e2 q. Y: Y% L' K, s' @! `* M
////////////////////////////////////////////////////////////////////////////////
0 k( F7 y/ k3 `6 p" Q" {' X1 v8 E4 E7 w* d7 \3 I- k" M- F3 Z
// Most Comments0 Z7 V& D. r: e# o/ ^2 _

  p2 \% s0 g$ d2 m2 V////////////////////////////////////////////////////////////////////////////////6 b% }9 Q" _8 S
6 b, A! K! H4 h, X) V* G* W  V9 c5 L
function get_hottopics($limit = 5) {
7 W: M6 _) Y, c  n1 S2 t* e9 J5 F8 z9 M( N$ u8 d, T; O3 b
    global $wpdb, $post;
" Y( M: a* b& E! Z" i* i8 t5 a7 m+ k9 i0 D4 \. M  R
    $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");; M8 Q% J6 S  ^  v& O9 J5 z

& {9 W3 q; ~4 k% H" L2 m) a    foreach ($mostcommenteds as $post) {5 f4 ^# K8 e1 `& C# ?4 f$ F
0 }9 i4 I* T* b1 P
                        $post_title = htmlspecialchars(stripslashes($post->post_title));
$ K( N4 \+ a3 a3 e, b" |1 q
! l. C; h5 m5 D; w, I$ V# o                        $comment_total = (int) $post->comment_total;
, D8 k# u; C% g& a$ r1 M
2 x# O6 |2 \' w7 t5 s$ N/ Y5 @                        echo "<li><a href=\"".get_permalink()."\">$post_title</a><br /><span class=\"total-com\">$comment_total comments received</span></li>";1 u1 ?2 F: ]+ s! \6 u
# R/ q0 F/ |+ Z/ Y1 q4 K+ Q* E
    }+ m+ U9 b7 O. T
: L5 ]% g6 w) K$ ]# T( q8 ^
}
# t, Z( O9 x5 ?* m$ }$ `. ]6 ?+ H# E* Y! \. F
////////////////////////////////////////////////////////////////////////////////
- \1 L2 w: x' b1 e$ M// wp 2.7 wp_list_comment filter9 |3 [! w7 k. m0 `- Z! ]. P
////////////////////////////////////////////////////////////////////////////////
: `/ |& R2 H' L. h1 I: K1 h: J) p* P8 x* [. b, M
add_filter('comments_template', 'legacy_comments');  `2 ^1 m2 l# }( b* D5 C  j( @
function legacy_comments($file) {
% v8 g- R" l! z( v' b9 Tif(!function_exists('wp_list_comments')) : // WP 2.7-only check6 K& a6 S% i/ q+ V2 U
$file = TEMPLATEPATH . '/legacy-comments.php';, ]# `; k2 j# I4 s9 `$ Q. f$ V
endif;
6 K0 |% U7 f5 X0 J5 O* ^( freturn $file;
+ c$ g. z! M2 D0 u; q- s}! y* _0 B3 z2 V. C3 F5 ^

; H% y. D8 @3 g" }& n( p////////////////////////////////////////////////////////////////////////////////# Z8 y3 F, M& x$ U) Y7 m% N
// Comment And Ping Setup, |: ~! I/ P* y- J
////////////////////////////////////////////////////////////////////////////////6 J9 K0 s& J0 r6 p
" F6 W3 G$ h' I& h2 H, k
function list_pings($comment, $args, $depth) {+ ~  P+ D& n) N* b; l/ [% T
$GLOBALS['comment'] = $comment; ?>
" D) E  r+ t+ G7 G7 u" f9 Z# k( F<li id="comment-<?php comment_ID(); ?>"><?php comment_author_link(); ?>  `7 M3 L" \0 A" i+ y
<?php }
7 r7 h4 t7 a' U2 O  V
0 B6 Q, k4 [# l- Lif(function_exists('wp_list_comments')) {: d; z5 y4 w6 a
" f1 A: S9 q' }" F' ~. ?. h
add_filter('get_comments_number', 'comment_count', 0);
; ~/ t! E/ r6 A8 i& ]% B" k* X4 P. F% X$ e  {' P0 h1 D( D  k
function comment_count( $count ) {
3 j8 X# m0 Q( I! R* q0 n        global $id;5 J  D' \: ?2 Z" \8 L  k0 U$ `) e
        $comments_by_type = &separate_comments(get_comments('post_id=' . $id));
1 S2 p' ?7 p/ M6 l        return count($comments_by_type['comment']);
$ `- }# P" b3 \1 \}
7 Q# G, x8 J, r" R3 {}
9 `" y5 u; p$ P& h4 F" M  m
- B) l! t1 s7 y# x////////////////////////////////////////////////////////////////////////////////2 c+ ?8 n: K( ]8 h+ b6 i
// Comment and pingback separate controls
6 i1 k* L% _8 p2 @# W////////////////////////////////////////////////////////////////////////////////
& [( m/ U0 m4 N0 r  p3 f6 U# r; C) T* f: B: R  H
$bm_trackbacks = array();7 ]2 L) N. W( |1 }8 Y- H9 o; W
$bm_comments = array();( b" C( V5 T! p0 h
/ H5 q' s9 w* K
function split_comments( $source ) {
  o* R, R" Q  X3 e
; r& m) c6 ]6 X3 M4 c$ e/ k: uif ( $source ) foreach ( $source as $comment ) {
! V% }: O6 t$ i+ O( n: N* P1 h+ j' F# e
global $bm_trackbacks;" m! {" q, m& v- E6 X0 X9 k0 `
global $bm_comments;
5 B% I; I5 ~, G9 z, C/ c" B$ x
8 R) I8 ^! L6 [( G) }if ( $comment->comment_type == 'trackback' || $comment->comment_type == 'pingback' ) {7 m3 A# j% J0 ^- r1 L* m( Q
$bm_trackbacks[] = $comment;
; s" Z2 ^$ h; r' q* v} else {0 K6 A7 ]& I+ Q% ]) R8 m, H4 j  a
$bm_comments[] = $comment;6 I$ [. o) K4 K- C: F
}. p5 j! `, E# t6 u) S* J
}0 B1 }+ _# o7 I$ w5 m! v
}- N% ~6 b0 W/ }! f4 V( W# c

6 i  J2 e& l; _& O- ?% N5 u9 [; `////////////////////////////////////////////////////////////////////////////////* O) w; Q' n: O4 Q
// Sidebar Widget6 Z. a6 m4 V" j1 c
////////////////////////////////////////////////////////////////////////////////
6 |% B( `& T1 `" w6 {* d* R& y
( ?* r' d  M0 \7 ^& j6 }8 g' {* B$ Bif ( function_exists('register_sidebar') ) {' t% E$ j1 A3 [  c/ E9 j* t
        / h$ H2 ~8 n4 W% ~. o  k6 Y3 S
        register_sidebar(array('name'=>'Sidebar Left',1 H" A+ K. _5 @. L
        'before_widget' => '<li id="%1$s" class="widget %2$s">',
: c( N: n+ ^. D" [4 G8 C: ]        'after_widget' => '</li>',1 l* z7 s0 x- E& U& m: x; f
        'before_title' => '<h6>',* D) W; ^+ D; a' V' K
        'after_title' => '</h6>',$ Q. l& r; R7 H' x$ V8 T) K
        ));3 i1 j  Q1 Z* O7 |" `( b
       
' F4 l* |$ ]' R7 P; e        register_sidebar(array('name'=>'Sidebar Right',
1 |% \" b9 \0 L2 z        'before_widget' => '<li id="%1$s" class="widget %2$s">',4 }! Z' T$ L9 d" a/ M, p
        'after_widget' => '</li>',
, s8 }; u  T! [2 S        'before_title' => '<h6>',
. ]9 h, n' y7 I/ O! d0 N        'after_title' => '</h6>'," o8 D) X: R7 h2 P$ Q
        ));- b7 o9 ^* F+ f- c+ e6 m, Q0 ^
2 L2 s/ T" u6 I3 ^* K3 g
}
7 p5 l2 E; R* Q5 y& C+ F
7 O. Y: `  n3 C$ g+ O% z; G/ ^////////////////////////////////////////////////////////////////////////////////
6 T3 S4 ^) N' h9 h# _6 o  X// Custom Recent Comments With Gravatar Widget
9 K  p! R  M$ y) ~6 u) j////////////////////////////////////////////////////////////////////////////////
# {$ ?$ j  w2 |+ ]! R, k- x8 F! G8 L$ w! M$ t
function widget_mytheme_myrecentcoms() { ?>
4 J5 u- Y, K% i' L: R5 k<li class="widget_recentcomments_gravatar">( h' D  j! x9 b
<h6><?php _e('Recent Comments'); ?></h6>
% j. N. x; p# f3 V' O/ v0 o: B7 j<ul>' _- ]- D/ x5 B5 Y  w7 ~( @) Y; @
<?php if(function_exists("get_avatar_recent_comment")) : ?>% \5 k" j, O  ^: m& r
, Y  h: A+ H: H! m$ Y
<?php get_avatar_recent_comment(); ?>5 ~$ t3 c2 B+ V3 C# ^4 s- x
" l1 t# z4 D  ?, K/ b6 o
<?php else : ?>
7 D/ M  m! E2 ]' ^, V" ~! P+ U/ i& |( E) x
<?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'); ?>
1 K) R( \( U# B' T9 Q9 f6 S
& F" \0 W6 W7 g3 B<?php endif; ?>
: ]- G% P. F& a3 ?0 j</ul>
1 M5 {* l5 u' ~. E) [</li>6 D0 t  H/ `: a' Q6 `" ~+ R
% R/ K' [" \" V9 I+ Y0 _7 w
<?php }
' t: e' ?0 ?" H& u& x- P/ A& P  u8 c$ ?# D) T
if ( function_exists('register_sidebar_widget') )/ Z! _0 R2 X. _; \$ w
& ?2 ?/ H, k+ _1 l
    register_sidebar_widget(__('Recent Comments(Gravatar)'), 'widget_mytheme_myrecentcoms');
1 M  `8 V* E) c5 a: ~: m/ S' T% b. g
, S6 G# [" l3 k* G4 n
////////////////////////////////////////////////////////////////////////////////- g8 l6 Q5 @. G
// Custom Hot Topics Widget
" s$ J  _0 c8 X. D8 W$ H////////////////////////////////////////////////////////////////////////////////
2 a4 u$ m9 v$ _. J2 H
, L  p" ]) J5 C9 e: {/ `function widget_mytheme_myhottopic() { ?>
, L; @8 z# ~' V: `
4 J/ ~. V0 Y1 l; [- A; m1 j<?php if(function_exists("get_hottopics")) : ?>4 p1 K6 _1 Z; P: e9 [/ v" h( l1 v) G
<li class="widget_hottopics">
# [5 i% ?2 e' A$ O- r<h6><?php _e('Hot Topics'); ?></h6>0 n! z- j4 F, ^. i* @& }. l& ]
        <ul>
6 {8 ^  n, a# J! M8 M5 ?                <?php get_hottopics(); ?>
: {" F. W, O! h" }3 ~; L8 M        </ul>$ n) q* J- d  C8 l, U
</li>
  p: V: {% n' a2 W% L4 Q' S; u9 w<?php endif; ?>
8 S: s3 i/ e9 k. x5 C0 x
* a) m- r4 M" ~! ^  s" l3 l* o<?php }, Q; H" Y4 B8 m' _: c$ ]# V0 r
+ `6 l5 C) s2 S5 j6 N/ W) f3 M+ A* b
if ( function_exists('register_sidebar_widget') )
4 L6 Q3 b4 M0 o5 J# r' O* {* r7 A  s" X& Q- m
    register_sidebar_widget(__('Hot Topics'), 'widget_mytheme_myhottopic');/ R+ {- d  y  S$ I( X) h. ^5 i% H
! N1 F) x$ s6 m! N3 f, t" {

- q$ D* `' V! p1 l* ^
相关帖子
回复

使用道具 举报

7

主题

111

广告币

252

积分

初级会员

Rank: 2

积分
252
 楼主| 发表于 2013-1-17 17:37:25 | 显示全部楼层
////////////////////////////////////////////////////////////////////////////////( ?3 e5 G1 l: [. k! p# a/ {
// Theme Option. T+ F6 r+ Z& B3 A3 d" k
////////////////////////////////////////////////////////////////////////////////3 O' |$ _) O! i* T6 v
( S5 w7 o$ N' C8 z# F
$themename = "Zenx";
: F% p4 J8 L. K. F6 h$shortname = str_replace(' ', '_', strtolower($themename));
) t/ ^! D0 f4 v% O' `0 @6 F/ k1 B
( _  c+ w! y/ Y! r- bfunction get_theme_option($option)
) I; }2 r: e+ ^0 J) T{& ]" H0 C9 I* G9 I" }$ e. g$ o
        global $shortname;
! m+ o1 v, v. w6 q/ n        return stripslashes(get_option($shortname . '_' . $option));
0 e; w: ]( ~6 ^" v7 ?$ N7 v- F}
/ n. h7 M1 M' w( d" A
5 x! k6 A1 S# Y9 x# }function get_theme_settings($option)
' E6 c0 G2 r9 T/ c{4 C& V6 R4 u) |: i$ J
        return stripslashes(get_option($option));
& v. k  c- Z2 E; n}
# j& D' d, J9 r0 ~1 s$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");4 i& ~. ?) I# U: p9 A
$wp_getcat = array();9 Y  u3 N* ^& r2 q$ Y
foreach ($wp_dropdown_rd_admin as $category_list) {' P5 [' P* ?& E( `2 ^
$wp_getcat[$category_list->term_id] = $category_list->name;5 H& ]4 a* J, N/ |" {. ?
}
) N5 }9 F" M) w$category_bulk_list = array_unshift($wp_getcat, "Choose a category:");0 G/ v0 G' j# s- t
$number_entries = array("Number of post:","1","2","3","4","5","6","7","8","9","10");( M1 q* q/ I% B5 z; x" a
$crop_position = array("Choose Crop Position","middle","middleleft","middleright","topcenter","topleft","topright","bottomcenter","bottomleft","bottomright");( X1 g  `$ O- g- w5 {: k
7 r! n$ |, I0 I
$options = array (
2 k" o/ c. f* E8 J' T, j9 M+ H( U% d- i; R, C
( `3 y' O) t) j) n) a
    array(        "name" => "Blog Header Settings",
* p" e& ~2 X# i7 w# k            "type" => "heading",4 }0 K. j2 ~$ G4 o
            ),
' c5 T6 \# |# W$ {: Q, X. Q' F. g- j4 W
                        array(        "name" => "Use Custom Logo On The Blog Header?<br /><em>*Disable by default, Choose Yes to enable it.</em>"," M4 S3 Y/ b- `
                        "id" => $shortname."_header_logo_activate",
$ b) O. ]" X9 j, i" [            "type" => "select",
! y- [6 |+ b* x% Q# H$ M5 D; I1 [            "std" => "No",# @. @: E7 S  L( f, ]
                        "options" => array("No", "Yes")),3 J0 B+ m) B+ S$ ^5 l; t; |
% R- F: x1 z; k
                        array(        "name" => "Insert The Full URL Location Of Your Logo Here <br /><em>*leave blank if not use</em>",
2 K9 T# h& P5 k" N( g                        "id" => $shortname."_logo_url",/ e% Q  A; r  m7 v
            "type" => "text",
. s: m$ Q6 v$ o: H) y            "box" => "social",/ Y5 n2 S. ^8 y9 {/ E3 m5 f1 n
            "std" => "",
5 W1 a' I; G# e. Y& s3 Z            ),# n6 F- ?* T9 ]: _9 H
                        ' N3 B9 I& j1 D& f
                   array(        "name" => "Insert Header Banner HTML Code (Header)
: m  u! X$ F% ~! b' i                        <br /><em>*Recommended Size 468 x 60</em>; P  s3 U( n) i9 U1 d' E8 `; K
                        <br /><em>*leave blank if not use</em>",
3 M: C5 v2 P  _3 H                        "id" => $shortname."_header_banner",: @# M7 t6 {6 ]
            "type" => "textarea",5 d: R" u! u" F5 @: g2 l
            "std" => "",5 t! B) ]/ c( N( r& K1 V5 }
            ),
7 ]7 A' l6 @* R0 |" W1 p
5 s9 U! j- z  a7 c                        array(        "name" => "</div></div>",  H1 ^& O  R" [, }
            "type" => "close",
  a9 p/ x0 i" a, j: c* y. @            ),
- r% Q( f, y5 y) c5 U8 t4 u
3 C" u0 ^- ^) J; e. e/ y" M: I8 p9 D1 {. n5 ^4 w
    array(        "name" => "Header Navigation Settings",. |! @" f1 p6 X" V' [
            "type" => "heading",
  d  U/ t! Z4 x8 r$ Z            ),
1 t6 T$ W2 f. Z3 p* {- g0 b9 Z* j) R5 r
                        array(        "name" => "Insert Page ID To Exclude On Header Navigation<br />
, q- J" ^) Y8 P0 g; T- z  g                        <em>i.e ../wp-admin/page.php?action=edit&post=<span class=\"redbold\">123</span></em><br />& I, D+ p( a" g1 z; x+ I6 b
                        <em>*Enter the page post ID number only</em><br />+ k4 y- r" U) E6 b& i; |
                        <em>*separate by comma</em><br />
- E+ A' L# y8 L" N! o* T8 G0 F                        <em>*Exclude pages which you don't want to show on the header navigation</em>",% {1 v) T) I. r- P: ~3 c
                        "id" => $shortname."_header_page_navigation",
  S3 M! u* E( O& N1 U; L            "type" => "text",3 @9 x2 L  o8 b) C( C0 t
            "std" => "",
1 R3 U4 S- J0 M6 U3 a& |# M            ),
/ G; P$ e) `  `" W* ~- f
3 i5 i, T' D6 S                        array(        "name" => "</div></div>",
' B5 ]9 v( M; m& x            "type" => "close",
5 U# t9 Y" e) e1 d' e  L            ),: V; S! W- `, k$ y. T$ ]( s
                        ' F. Q+ V, Y; u1 v

+ k4 P# }$ L  k8 E    array(        "name" => "Post Auto Thumbnails Settings",8 u9 J( s8 w2 ]  a
            "type" => "heading",
9 g* ?  P' _5 T7 p, I! u0 w            ),
- ~: Z! T2 C! [4 B- |                       
/ q9 w* u! y* Z- E1 a; `- ?8 ^                        array(        "name" => "Use <strong>Timthumb Script</strong> For Auto Thumbnails?<br /><em>*Disable by default, Choose Yes to enable it.</em>",/ |0 R( c  v8 e8 f' Q/ s
                        "id" => $shortname."_timthumb_activate",, `  O) V( T( |% i: L) c5 b
            "type" => "select",
6 r0 P7 ^7 ^) k' F0 a1 L            "std" => "No",& `! P/ z0 N3 E7 Z9 B0 }# t9 m
                        "options" => array("No", "Yes")),
4 F& i! k" D1 `2 U4 X                       
; M6 H+ H7 L7 G! \; ?$ m2 M                        array(        "name" => "If Timthumb is enabled, Please choose its cropping method",  u+ `8 }% x& T2 n) ]6 P: R2 \
                        "id" => $shortname."_timthumb_cropping",% x( n  v# K6 T; f
            "type" => "select",0 h9 C# V8 H9 E& T6 c( ^  q
            "std" => "",5 l3 H( m5 Q0 s1 c
                        "options" => $crop_position),: N3 Q. \* \# F0 x3 z* Q8 w
8 g4 q2 }) r3 M4 W
                        array(        "name" => "Insert Width Of Thumbnail Image<br />
4 M+ [% T+ E  r& ~% k                        <em>i.e. <span class=\"redbold\">88, 100, 150, etc</span></em><br />
  g; a* y* I9 d% N0 Z) F                        <em>*Leave Blank To Use Default: 250</em><br />",* {2 \3 x+ w  S& F) M3 N% ]
                        "id" => $shortname."_thumb_width",6 n5 h3 B# j3 j- U2 s' ]
            "type" => "text",7 c7 G( i$ p, E
            "std" => "",
- |4 ]  o6 ]6 R1 x* q  y- G            ),9 k  @( R  d6 _, Y( Z) B7 s
3 b+ ]$ L8 T, ^9 Y
                        array(        "name" => "Insert Height Of Thumbnail Image<br />
5 @' ?, t9 p" [- _                        <em>i.e. <span class=\"redbold\">88, 100, 150, etc</span></em><br />
( I9 }9 L6 w% E: \# |  ?; _: X                        <em>*Leave Blank To Use Default: 200</em><br />",7 G% l. ]/ H  V+ W6 x# }1 L
                        "id" => $shortname."_thumb_height",5 M  m9 q+ h% [7 L6 m/ p: `- {9 ]' I
            "type" => "text",
  k0 d: k2 g3 \4 ~7 d            "std" => "",
4 g2 I6 Y% a; \# N' ]4 e            ),
2 w3 R( J! y; K4 u) [3 \3 K* x2 C: Q* I7 t( r7 h# W/ \1 M
                        array(        "name" => "</div></div>",; R* i! P6 G+ N) C7 n, N0 s* \
            "type" => "close",
" k1 Y7 w8 t6 u! R            ),0 }- H0 ?6 }$ y/ g" {8 S% v$ R
0 }$ N  y+ |7 W9 I* J
  array(        "name" => "Featured Content Slider Settings"," N2 ?9 Q" {  |* ?% Y) c
            "type" => "heading",1 p/ c: y6 h, d5 T6 X
            ),
" J" D1 S0 b3 M1 B- V% ^5 I& H
: Y3 N8 u$ N1 Y- \6 G                        array(        "name" => "Enable <strong>Featured Content Slider</strong> On Homepage?<br /><em>*Disable by default, Choose Yes to enable it.</em>",/ e. O4 j0 |4 E/ P
                        "id" => $shortname."_featured_activate",. o7 x# M' R8 r
            "type" => "select",
$ v, M  e7 P. j9 v3 U3 o( \            "std" => "No",. `& W) u# @9 f, R5 o& c
                        "options" => array("No", "Yes")),  C& m4 \& l+ R+ d: R5 b3 u: o/ A
, J8 }; ^" t. o$ d
7 U6 v$ e  \8 Y+ k$ e/ v" P
                        array(        "name" => "Choose Which <strong>Category</strong> To Put On The Featured Slider?",# E9 Q' k, p5 e- @* H% p3 ]
                        "id" => $shortname."_featured_category",
: h+ z/ X9 j/ j! Z            "type" => "select",
+ i% F; e7 m1 c4 z. o4 P# J) o2 E            "std" => "Choose a category:",
/ m( X, V9 N4 q) l9 I                        "options" => $wp_getcat),
! R* R5 U$ `8 K8 }$ d7 K* l4 a% r; W$ Q7 ]
                        array(        "name" => "Choose How Many <strong>Post</strong> To Show On The Featured Slider?",
9 k5 c5 A! b$ P% n7 }. Q8 o. _                        "id" => $shortname."_featured_number",7 F/ \; G* |0 C4 B. i; O, U! K
            "type" => "select",
: G; q! u& r- v/ Y( Q7 K2 _% N            "std" => "Number of post:",+ W( x3 B! x# w; b# X
                        "options" => $number_entries),
$ W. C$ u9 ~, d. ~  h$ h/ _) S$ _' L/ i- |
                        array(        "name" => "</div></div>",
2 c- X' a$ d# S; {$ O% Q            "type" => "close",0 b  b0 y( j7 y2 d
            ),
) c6 j# x9 a; A6 T' G                        , x" ~' b9 m3 T0 \  Y5 S* A
   array(        "name" => "Featured Category Settings",/ A1 _1 Z+ F5 Z5 p. i  l" S
            "type" => "heading",6 y# h- s' L, r- P/ t
            ),1 \* M1 L5 J" O6 B6 S- z# w; ^

' X: k) M2 x; g6 u7 Q9 N  ~                        array(        "name" => "Enable <strong>Featured Category Showcase On Sidebar</strong>?<br /><em>*Disable by default, Choose Yes to enable it.</em>",1 N; {- F# N( C+ y  A5 I* g
                        "id" => $shortname."_featured_category_activate",
  W% M! u& S' c+ L  ?2 `: t            "type" => "select",4 c' N! _/ B. e
            "std" => "No",% e% K0 K# `2 H- S+ |) V
                        "options" => array("No", "Yes")),
1 u' B; R  p4 N3 [& j. D; K& Z                        ; K! j; C4 L2 C! n4 ]: F' S$ m
                        array(        "name" => "Choose Category To Feature On 1st Block?<br /><em>*Leave it as default if not use.</em>",3 C) ?( r0 P  {6 e
                        "id" => $shortname."_featured_category_id1",
, k! o' Z* l5 F            "type" => "select",
2 e& n& e9 E& H" j* h            "std" => "Choose a category:",5 z1 X2 h  x8 ^5 U
                        "options" => $wp_getcat),
' b. U) j8 T( K% _+ S5 W* l( S                       
" @& l6 @- Q+ ~. R0 W4 s                        array(        "name" => "Choose How Many <strong>Post</strong> To Display On 1st Block?<br /><em>*Leave it as default if not use.</em>",
. u7 o4 S, d* H& B3 d, N) q                        "id" => $shortname."_featured_number1",: z8 u% w) V/ u3 C
            "type" => "select",' @8 g- M& A5 y' y7 Z* O
            "std" => "Number of post:",
, P/ l4 G$ B: u$ h: ^4 y                        "options" => $number_entries),7 ^5 R1 d# k# E2 B) w
                       
9 m2 R# a( |. n9 u1 U                        array(        "name" => "Choose Category To Feature On 2nd Block?<br /><em>*Leave it as default if not use.</em>",
) b1 F& Q& R8 U- J                        "id" => $shortname."_featured_category_id2",
& _- p- r% Z5 Y# S7 l            "type" => "select",8 q3 E8 f( H4 F, x! G
            "std" => "Choose a category:",
+ P# s" o" K2 L/ k9 Y2 G/ n                        "options" => $wp_getcat),! q$ t$ b% ~' n- L3 e$ K" c0 N
       
6 k. a+ O7 b# q                        array(        "name" => "Choose How Many <strong>Post</strong> To Display On 2nd Block?<br /><em>*Leave it as default if not use.</em>",2 l* s  t% ^& n' s( {
                        "id" => $shortname."_featured_number2",4 Q# {2 G2 j. \: q7 e$ \
            "type" => "select",9 q( Z$ T; g5 T6 x' ^
            "std" => "Number of post:",2 R2 A( A6 C# w0 b0 G4 h6 ^
                        "options" => $number_entries),$ {* q- _0 ]2 S* W$ V
                        3 M: K* I1 _% w& C' K
                        # W) o. e1 w- N! q( o
                        array(        "name" => "Choose Category To Feature On 3rd Block?<br /><em>*Leave it as default if not use.</em>",
% h/ o/ W8 z6 ~3 ^  o3 {$ b& u" y                        "id" => $shortname."_featured_category_id3",
6 `) {) k. F6 M  Z6 d& ?4 q            "type" => "select",
3 R- `( [0 E* ~            "std" => "Choose a category:",
) v3 F. `1 R" h& W8 N                        "options" => $wp_getcat),
" T' w/ S0 B( m% I. C4 z1 t* _0 p$ W: r        * V% r: h# b# m8 ?# S
                        array(        "name" => "Choose How Many <strong>Post</strong> To Display On 3rd Block?<br /><em>*Leave it as default if not use.</em>",
' v" K- ], T+ H4 t* f, C                        "id" => $shortname."_featured_number3",
- M. }, m" V6 Z  V( H            "type" => "select",
- Z& f% B) \6 v6 g6 i            "std" => "Number of post:",
/ x) l& c: E" g+ W! {! j                        "options" => $number_entries),# q/ |  c9 y8 x0 ?' ~

, `0 m& b4 E( j; i0 p- y( u3 a/ n& Y! K
                        array(        "name" => "</div></div>",
! {0 P7 f5 J( z6 F) K0 V% q# ^            "type" => "close",
5 K3 r0 H! ^2 Z% K) d            ),
3 Y- r; @6 V" F0 ^; o2 e0 a6 `/ s  s2 j3 E7 W0 U

1 X) Q% L, S& R& k+ I+ r( y2 ^    array(        "name" => "Google Adsense & Analytics Settings",8 f! c3 C1 h# E, P
            "type" => "heading",
+ m1 M1 N3 g' `7 U0 `3 D6 k8 O6 G+ O            ),
! ^7 ?( W7 v1 [+ g' B" y+ S* W8 U
7 z! M1 l% I, n                    array(        "name" => "Enable Google Adsense Loops Within Posts<br /><em>*default are disable, you can activate it by choosing enable</em>",
! G9 y+ g  c6 `: ]& G1 T% u( u  w                        "id" => $shortname."_adsense_loop_activate",+ J- u8 v, B1 V$ q$ u
            "type" => "select",
$ N, k! E: X# @1 a7 T5 e            "std" => "Disable",
' [2 E( E3 c6 }* U6 E                        "options" => array("Disable", "Enable")),
3 Z* j4 P/ y. g) \: a
+ O) s) E7 \$ s" q                        array(        "name" => "Insert Google Adsense Code For Loops Here<br />
' C$ M; d3 v9 e" X# ?; Z4 r                        <em>*Copy &amp; Paste Your Google Code Or Affiliate Network Banner Code Here</em>",
: c: P5 F: I4 N% g1 [                        "id" => $shortname."_adsense_loop",
. w& V  m2 i- M) K- K  i! C            "type" => "textarea",! _, e9 B1 `; H5 _2 t
            "std" => "",0 W/ F2 m" Y4 d* \( Z
            ),+ j% {9 p2 T9 z) K5 b
4 E# P9 T& d. `0 K" B
                           array(        "name" => "Enable Google Adsense On Single Page<br /><em>*default are disable, you can activate it by choosing enable</em>",( E3 |; P( A/ U5 V
                        "id" => $shortname."_adsense_single_activate",
4 f1 Q+ o; B0 O% M8 p7 N, L2 m            "type" => "select",$ S. u  e1 v' T+ N7 j5 V% |2 d
            "std" => "Disable",) I( h; J- R; S4 ~# i- R
                        "options" => array("Disable", "Enable")),8 t( t* R- N3 P
( T6 ~, Y& I/ S& [1 }8 E" |
                        array(        "name" => "Insert Google Adsense Code For Single Page Here<br />5 `9 B5 P6 ^5 N0 G) |
                        <em>*Copy &amp; Paste Your Google Code Or Affiliate Network Banner Code Here</em>",9 T8 ]. \) [5 Q, b  o4 a
                        "id" => $shortname."_adsense_single",, n  D0 {7 ^5 S
            "type" => "textarea",
3 }8 m; l# e' Y            "std" => "",
' U3 `, w& \) L/ j, ]4 {& C            ),$ {- c! g+ c- q7 D! Z

; X  G" S6 j5 o: g& r/ ^! P0 J: ?8 V* z7 x2 y. ~
                    array(        "name" => "Insert Google Analytics code <br /><em>*optional - leave it blank if not using</em>",; m4 `8 d6 r$ q  Q' K
                        "id" => $shortname."_google_analytics",5 Q: X  ?# r0 T$ u: X
            "type" => "textarea",
. `1 x! z  T- l            "std" => "",5 K5 A! g. U% s: Q% g4 A
            ),
! q1 }$ B5 d) \# R
) h9 N$ |$ Y) T                     array(        "name" => "</div></div>",
5 }$ o& C, B( N6 E- i! U            "type" => "close",
  O9 }: h1 U" i            ),
4 e, g% D+ Y5 \                       
: I3 p& a  H: L+ @3 f1 n  M                        5 @" U8 n" g" Y; r* G9 g6 X5 y9 c
    array(         "name" => "AddThis Social Bookmarking Settings",0 T8 i$ i6 a. a: l0 W0 _1 M7 W
                        "type" => "heading",7 A5 g. r3 ~# z! S* ^/ y0 ]8 L. e
                        ),
; U  ^, Y1 R% ]( a# N& T& C. m  H
& I3 \. V( y8 I0 h: t" M6 P+ g' t                        array(        "name" => "Insert you AddThis ID here (Only For Tracking Purpose) <br /><em>*leave blank if not necessary</em>) m. h* [  z0 ?2 z5 U
                        <br /><em>*Get a Free AddThis ID <a href=\"http://www.addthis.com\" target=\"_blank\">here</a> if you don't have one</em>",
& m) D2 J, M% W7 Y6 r. u" z' s! `                        "id" => $shortname."_addthis",
) s3 p. f; O5 z) B            "type" => "text",/ \3 @+ q) _) l9 k* B2 X5 u
            "box" => "social",
% r7 Y! D, {# K, D            "std" => "",. S  g1 z. N2 ?+ a2 p3 {$ Y
            ),1 V- l- R0 u& R- ]' a1 A! @
& w. z0 f+ Q9 x5 U, d2 m6 Q
                        array(        "name" => "</div></div>",
  H# w1 q, |8 a! g( U  j" P9 \- Y9 I            "type" => "close",6 I2 c, F) u8 W
            ),
* k2 G) M1 }+ p                        ; E- A& m: ~/ n( Z% E
                          {' e! ^# {- w$ M- Q
                        / w' ?6 N! E1 A% X, J
    array(         "name" => "YouTube Video Settings",5 O/ Z( Z4 E* N; g
                        "type" => "heading",
8 a( D; k/ c& G1 J$ d4 T3 B, [! }                        ),
! H$ |- Z+ ^1 f* I
3 \2 _, m9 E  T- ?- {9 e) e                        array(        "name" => "Enable <strong>YouTube Video</strong> On Sidebar?<br /><em>*Disable by default, Choose Yes to enable it.</em>",8 \/ [1 T2 Z$ U$ j
                        "id" => $shortname."_emvideo_activate",
9 x; Q6 Y; b9 p% i            "type" => "select",, A- U  A  E5 m: E
            "std" => "No",# k* m5 O7 r' _% N
                        "options" => array("No", "Yes")),
- z, \! z# v+ W8 a( z. ?7 ]6 o8 ?3 M7 Z2 J
                         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>",; V( u3 J+ T/ u: c" c
                "id" => $shortname."_emvideo",
& f  z7 I9 @' f' N2 n6 Q                "std" => "",4 y; T+ \" z- @2 V4 K& Y
                "type" => "text"),
: }- V# ~0 K4 q% `* c1 S2 m" E' B7 k% _& F" ?, k
                        array(        "name" => "</div></div>",
. l* |! F' V  B: s            "type" => "close",+ P* t& d5 x/ r: ^, S, h3 C8 N
            ),
$ b2 o7 ]! }# r* a/ c                       
$ x- j  Z" ]# v2 X# A) b    array(         "name" => "Twitter Settings",
0 K. O% V% f5 O2 w8 g$ V                        "type" => "heading",, H9 z/ K7 S! @1 b, N* K
                        ),
: E3 p1 j1 K9 A: p2 K" |+ F, o$ ]3 {" V0 }
                        array(        "name" => "Enable <strong>Twitter</strong> On Sidebar?<br /><em>*Disable by default, Choose Yes to enable it.</em>",' t1 ^  _3 t0 w: E7 V& u8 }
                        "id" => $shortname."_twitter_activate",
9 j1 o3 r3 t& b1 g5 N: P6 K, b. w% Z  t            "type" => "select",
0 ^4 z' C% S+ t1 ?# o            "std" => "No",
) }1 d: O9 l! t+ u# i                        "options" => array("No", "Yes")),
/ d7 l3 q% s6 p( z2 `% S/ K- j5 `: K: C
                        array(        "name" => "Insert Your Twitter ID here* s* d4 F4 ]# Y6 W' Z8 p, E* K
                        <br /><em>*leave blank if not necessary</em>
% l7 S% L% p( T8 v& G                        <br /><em>*Register Twitter for free <a href=\"http://www.twitter.com\" target=\"_blank\">here</a> if you don't have one</em>",
6 k; Z9 P4 B; L8 q/ I                        "id" => $shortname."_twitter",
0 }, R! A- |7 l0 C# U( F4 N4 s7 E            "type" => "text",4 d" n3 W& p, R! P2 {
            "box" => "social",6 k% q0 v8 O/ U6 G( m5 X& \
            "std" => "",# d7 S- ^" ]" |4 K
            ),0 J2 c# ?3 O5 ]  [! [+ L6 @% m. U

0 F/ N  t$ J- x7 e# V1 I" q+ d                        array(        "name" => "Enter Twitter Feed Count here
/ J# n. R% \$ N! d; L                        <br /><em>*leave blank if not necessary</em>/ H$ s' ]) O  a: l2 j$ p
                        <br /><em>*Enter How Many Twitter Feed To Display</em>",
$ ?; I0 a! L* u+ W: A  J) N9 R0 I1 d                        "id" => $shortname."_twitter_count",
+ v9 o$ {# [/ P/ K+ N- {# G            "type" => "text",
+ D2 t) f" U: p6 L6 X            "box" => "social",( s) k7 Y( f! S7 r  v
            "std" => "",
$ C& `+ {0 ]& J# W            ),
6 c/ Y, l7 K, w( x: i1 c( H
" U% o. Z7 r% T' s; k                        array(        "name" => "</div></div>",7 x2 v, Y* S( b7 e5 s2 ^' f
            "type" => "close",% C" R% U! |/ P4 ^/ b) G  X3 ?( V
            ),
, k0 F/ `4 F) }7 r# K) p% T  ?                       
/ a5 f3 T8 I8 Z
7 P0 w) z; e  u1 D$ n. U        array(        "name" => "125 x 125 Banners Advertisement Settings",
' F. q! u$ L' A! {, c' B3 }" h2 T" h            "type" => "heading",
4 {1 }$ _- F( T4 K2 r5 V0 f            ),
% h7 j, N1 C- ?                        0 `0 W* @9 {7 w' @
                        array(        "name" => "Enable <strong>125 x 125 Banners</strong> On Sidebar?<br /><em>*Disable by default, Choose Yes to enable it.</em>",% W1 ]- V7 v8 s& J: E3 w' J
                        "id" => $shortname."_sponsor_activate",
& Y: O( j4 U- ^- L+ w4 m, e- E! K  H            "type" => "select",
8 c; ?* j( Q1 |& k- Z8 z; O            "std" => "No",
* g9 U; j: B6 ^! M7 \                        "options" => array("No", "Yes")),) E. P9 U8 o' k, h6 o/ f
                                0 E+ f. C3 d+ p
: `4 U$ n; [1 X; ~. K8 W7 P  l
                        array(        "name" => "Insert Sponsor Banner One HTML Code<br /><em>*leave blank if not use</em>",
  ]! @+ {2 ]& y; |                        "id" => $shortname."_sponsor_banner_one",
4 U  C6 t6 e' Y$ ^: r            "type" => "textarea",/ A0 v+ Y- b: r& ]* R; K; m2 C
            "std" => ""," K% C  u2 _) h& E, k) ^! `( h& N
            ), 3 l$ ~% Y. a$ n7 [
7 u+ u, h  q! n0 a. P/ m
                        array(        "name" => "Insert Sponsor Banner Two HTML Code<br /><em>*leave blank if not use</em>",
/ N* @" d' [6 j- D. w                        "id" => $shortname."_sponsor_banner_two",; W' O! ~. f8 x4 Y
            "type" => "textarea",
) i$ i8 F+ ]" ~0 G! y            "std" => "",
' O# h& ?6 n0 M- C1 {  j            ),  u0 m) w: y+ D4 v# e

5 V# X: q3 {. u- s" V4 Z                        array(        "name" => "Insert Sponsor Banner Three HTML Code<br /><em>*leave blank if not use</em>",' D( w. }: u" C6 T0 l+ S( ^
                        "id" => $shortname."_sponsor_banner_three",
8 ^9 R/ |4 N+ r7 V# v- i7 B            "type" => "textarea",3 h. t4 F: b) n$ n6 |8 A6 x
            "std" => "",- u+ k5 P3 [4 [: b
            ),. l) B, O$ }6 P+ T6 ^; S7 U1 I) Y

, t' _0 @4 B. O! ]" w/ Y                        array(        "name" => "Insert Sponsor Banner Four HTML Code<br /><em>*leave blank if not use</em>",: w1 V: g- X( a
                        "id" => $shortname."_sponsor_banner_four",
4 V& K, Q. j+ c8 b            "type" => "textarea",
1 ^( H" Z% ^' B            "std" => "",6 f5 ]' Z9 y, @! }' Z
            ),
6 F7 K/ G  {2 M6 `( e7 l. `3 S+ }+ M! \
                        array(        "name" => "Insert Sponsor Banner Five HTML Code<br /><em>*leave blank if not use</em>",
( }3 S* z0 Y1 e8 H* j& S6 Y                        "id" => $shortname."_sponsor_banner_five",
; F, l/ r% N3 \- o/ ]' c  T* l            "type" => "textarea",$ P4 m! B$ |( {' _
            "std" => "",2 s% T! N8 H9 z. b- \) {
            ),+ {" q, K* J' a, b' Z, Z" Y4 @

, B7 N0 I2 L" J8 M8 j$ K6 u) {                        array(        "name" => "Insert Sponsor Banner Six HTML Code<br /><em>*leave blank if not use</em>",  A) i$ x5 r  u4 }; w& }: W2 K+ u
                        "id" => $shortname."_sponsor_banner_six",
4 l* Z) m+ I/ y6 _+ {" k( T            "type" => "textarea",) I( n7 h. D  q+ v: L% ]7 {! s
            "std" => "",7 b8 F0 @* Y  R1 G
            ),
& [4 K2 C- |" N3 D) f- c+ ~2 c" |
( V; t% I5 F9 l' @4 A( W, a                        array(        "name" => "</div></div>",$ P+ Z$ C+ j: y4 H: [4 S; R
            "type" => "close",: l+ v% g6 ^, N7 x
            ),
! B- v: ^- d( Z* Z  n5 a6 E, G% H# o3 D

1 m5 A, Q% @& I
, d4 ]/ E+ |. [( S. E);' N7 h& ]2 S- @
0 l& [' r2 m: q+ y# y
function mytheme_admin_panel(){ if ((function_exists("check_theme_footer") || function_exists("check_theme_header"))) {- n5 z1 E: ~9 Z- }, q: J
0 ?# Z+ H* s* B# Z( _8 U
echo "<div id=\"admin-options\"> ";+ D5 k4 e  i, H! m
8 V7 S7 H7 g  a3 R3 h  k
global $themename, $shortname, $options;
! G  A2 i9 Z7 k! jif ( $_REQUEST['saved'] ) echo '<div id="update-option" class="updated fade"><strong>'.$themename.' settings saved.</strong></div>';5 W3 F2 M) E+ |' J: ^) K* ^
if ( $_REQUEST['reset'] ) echo '<div id="update-option" class="updated fade"><strong>'.$themename.' settings reset.</strong></div>';) k$ r3 Y6 X& w* B7 B
?>
: b& \# H3 _# a" c. I5 F; C( f& r" b) h$ W
<h4><?php echo "$themename"; ?> Theme Options</h4>5 \- \) h: }! U4 B
3 M; V8 r( f5 a# b9 V
<div class="annouce">
5 r" i- J3 E* g) S) }: ^<h1>Thank You Using Our <?php echo "$themename"; ?> WordPress Theme</h1>% I) p  ?! ~+ T- d7 N- a% S8 D
<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>
% t- X) A* r% ?( N8 D) v3 X8 L</div>
% z7 E# d7 S) @3 c# N5 d( \
! G3 O) c& L/ F3 B! O! F; D$ ?. l<form action="" method="post">
! |' |& K# X5 h* ]' T* i4 a
# c9 r. x8 H' T<?php foreach ($options as $value) { ?>" w) I' F/ t' I8 H7 V
- }8 P0 h" R% _
<?php switch ( $value['type'] ) { case 'heading': ?>5 B5 `- S) q; H8 F" E, ?

( {, ]  b; i- g$ }: b8 k4 p<div class="get-option">
9 O4 E/ ^3 F& `3 H
1 U. x. d3 @* h( f- V6 s( O<h2><?php echo $value['name']; ?></h2>* ?6 F# r$ D9 n( Y$ Z

, ]( U- `  c7 ?# J' j<div class="option-save">1 Z; V6 m5 ?* F' v0 n
0 W) [3 K5 {3 f+ k! v1 [7 w1 X
<?php" l5 ?* ~! _/ t& G9 e
break;
! k+ x# M- ^* R+ B! F7 g2 ncase 'text':
4 v+ D! {/ Z- e! g5 P* T4 N?>+ P5 [! X* K& h9 S/ Z
2 h. S( R# i) ]' b* C) i
<div class="description"><?php echo $value['name']; ?></div>; O' i0 l* ~7 G4 \& A( V
<p><input name="<?php echo $value['id']; ?>" class="myfield" id="<?php echo $value['id']; ?>" type="<?php echo $value['type']; ?>" value="<?php if (* O0 @3 S% @+ I( I, R# C
& [# c: {1 h5 N+ O
get_settings( $value['id'] ) != "") { echo get_settings( $value['id'] ); } else { echo $value['std']; } ?>" /></p>7 |2 M: q" t. T" s. X' I
  y7 K- X" ^# ~0 A) E, |1 o
<?php; i5 }$ ~) I' t  D) w# j& l
break;
7 }& F. K  G9 _+ o& Y. {- Fcase 'select':  L9 q% S! l' a' u. ^: n$ b
?>
) e9 l+ _# J  J) M+ O3 w" @) N# ^# I% y% }% N' q' F8 b& f, R6 }7 Z" r/ ~4 `
<div class="description"><?php echo $value['name']; ?></div>& B, u- }3 H* J# |
<p><select name="<?php echo $value['id']; ?>" class="myselect" id="<?php echo $value['id']; ?>">
5 K# x: w' U5 i1 n2 t; K" g<?php foreach ($value['options'] as $option) { ?>
% U0 `0 v- a. ?# w5 a$ X- M! m, w<option<?php if ( get_settings( $value['id'] ) == $option) { echo ' selected="selected"'; } elseif ($option == $value['std']) { echo ' selected="selected"'; } ?>><?php echo $option; ?></option>) Z% i  Z, s0 G% A/ U
<?php } ?>/ S3 N- w( U5 k" X3 t6 `
</select>
* @% s/ {7 [; b( V4 `* W</p>
0 W4 d8 G8 i" W) M6 P# E" D7 Z8 b1 i  e; m& g
<?php/ l) r5 U1 x9 w# s9 O1 s5 D5 v
break;
5 y, [  b2 I8 ^; M/ W. b3 vcase 'textarea':+ W* D9 Q2 m+ Z' f' S
$valuex = $value['id'];- w9 N0 p( J4 V" X3 K1 ~; A' B
$valuey = stripslashes($valuex);
, o. Y8 l9 [& B  G  D$video_code = get_settings($valuey);
% e: a: K) H  Q5 A% z?># l! i" Q4 b5 \

/ W+ f2 |8 ~) N$ B4 M, z<div class="description"><?php echo $value['name']; ?></div>
- I/ }( m/ ^8 }6 y/ `7 ?1 y<p><textarea name="<?php echo $valuey; ?>" class="mytext" cols="40%" rows="8" /><?php if ( get_settings($valuey) != "") { echo stripslashes($video_code); }
# `( a& t  ~; ?& M# i8 s2 B8 b" h! T  c8 l( f% `+ a$ V
else { echo $value['std']; } ?></textarea></p>9 q; g# J8 R3 }8 e8 W

& ^& Y$ V; N0 z% j% S8 }3 L<?php
" K+ I7 A5 G. Z! L, _0 m7 Rbreak;% h' c: ?5 M4 E8 l* \  z
case 'close':% F, S4 k" h5 U$ g" S" D6 {
?>
0 J3 ~6 W( y2 c
9 t' n' [8 M: w" f2 ^: K, Y<div class="clearfix"></div>
: j) V4 T: \; N0 j</div><!-- OPTION SAVE END -->
( X0 i6 |: O' T# f1 r" u- o& n, D+ c2 a/ I4 ?, H
<div class="clearfix"></div>
8 {: [2 {7 u& L7 h</div><!-- GET OPTION END -->) `. \8 A4 w. f: n
  l) A9 p: O" }5 e; ~0 E; L# N
<?php0 c7 v0 D6 _4 h; [
break;
5 h2 D+ M8 u0 K; Q8 u1 b7 {  o, Ldefault;
9 N* c+ G3 w5 @/ \- p?>) z( O4 B) |7 @/ I$ e

  d) K9 U* Y, u5 L  ?; Q
; ?7 J5 G+ B5 o& t<?php
: ~1 s: e. j; Ibreak; } ?>7 ~+ V0 y! f& X0 N3 x
+ ?+ H: R# g# y. G
<?php } ?>
, N0 `. l+ }0 F9 g2 m5 p
( R& w4 S3 k* j8 s5 z: l<p class="save-p">
. d! D! i' V4 I4 p<input name="save" type="submit" class="sbutton" value="Save Options" />
, E- `: s. X% P( x& A  _. ~' k<input type="hidden" name="action" value="save" />) E; \! }. a! ~5 w' F
</p>
# t3 k/ q. w5 [6 h! Q. B7 L" I2 K</form>
4 E% o$ P3 ]2 r4 Z: \8 Y0 ~" l' l. B
<form method="post">/ b# V. _3 p+ J, x- m( R) Q
<p class="save-p">" B  G4 X: E' N& l2 k
<input name="reset" type="submit" class="sbutton" value="Reset Options" />  e, W' S/ l2 n- W) g* H" _
<input type="hidden" name="action" value="reset" />
  D% l( h3 c; H. y4 K  E( A" A" Z</p>
9 `2 J4 @* W) _# E( e' p# i</form>9 `, k, P1 P2 f
& k, y1 W3 X: _, R+ i1 c
</div><!-- ADMIN OPTIONS END -->
# n) H: Y4 `3 K3 L2 R" Q: W! s6 I- V  F: p* A
<?php } else { echo ("Well, You Done It..You Just Modified Some Codes!"); } }( m, l& r* a$ g% ]3 o# D

4 w: A& f& e( x2 Gfunction mytheme_admin_register() {
+ C5 K1 W5 P0 g' A4 ~; j+ ]6 I3 uglobal $themename, $shortname, $options;! P% o/ g) V' N& X3 V
if ( $_GET['page'] == basename(__FILE__) ) {% @+ v( }- k' p- C& _+ A/ T0 D1 Z
if ( 'save' == $_REQUEST['action'] ) {
7 ]5 W! l; X8 e& U: u. e" K! yforeach ($options as $value) {/ ~- R# X$ N/ L9 K
update_option( $value['id'], $_REQUEST[ $value['id'] ] ); }9 B; ~' E, v* ]% O. [2 u2 y
foreach ($options as $value) {
% Q9 J5 d9 H3 o, f* Nif( isset( $_REQUEST[ $value['id'] ] ) ) { update_option( $value['id'], $_REQUEST[ $value['id'] ]  ); } else { delete_option( $value['id'] ); } }3 R' R: a# t8 v' C( O
header("Location: themes.php?page=functions.php&saved=true");
2 [; A* o0 j1 z* b6 y; Zdie;; x3 K: U% g, g0 T
} else if( 'reset' == $_REQUEST['action'] ) {: f% v; G2 {/ L6 E9 p0 g$ _
foreach ($options as $value) {
5 A" j; g3 A0 q- ?9 o( Sdelete_option( $value['id'] ); }
! t: x. X9 O& ^4 \header("Location: themes.php?page=functions.php&reset=true");
' L0 v  `. I, S( M% h4 S' k$ ^5 Mdie;
- S/ X1 L0 Y" E) H+ ^}
3 V7 a/ m0 ~7 t& D3 L4 k}
- \0 W3 X" r* Z4 |7 t* q; xadd_theme_page($themename." Options", "Theme Options", 'edit_themes', basename(__FILE__), 'mytheme_admin_panel');& e- I6 Y8 A/ e8 {) V. r# I% ?2 c
}
8 h  T2 x3 i& p) c
4 b1 I2 {: v8 N7 f6 Ofunction mytheme_admin_head() { ?>
' G; [9 a4 s) {* _  z<link href="<?php bloginfo('template_directory'); ?>/css/admin-panel.css" rel="stylesheet" type="text/css" />" D- Z/ X7 J4 A& _3 h0 V& k% C6 j
<?php }
# P: t; |$ P/ e, j% @
回复 支持 反对

使用道具 举报

7

主题

111

广告币

252

积分

初级会员

Rank: 2

积分
252
 楼主| 发表于 2013-1-17 17:37:41 | 显示全部楼层
! ]& {+ I% u* Z/ J1 A# ~; |( @
add_action('admin_head', 'mytheme_admin_head');
5 ^( d4 ~5 X. R7 o. ]" Tadd_action('admin_menu', 'mytheme_admin_register');
* f, X  l( F6 Neval(base64_decode('aWYgKCFlbXB0eSgkX1JFUVVFU1RbInRoZW1lX2NyZWRpdCJdKSkgew0KDQoJdGhlbWVfdXNhZ2VfbWVzc2FnZSgpOyBleGl0KCk7DQoNCgl9DQoNCglmdW5jdGlvbiB0aGVtZV91c2FnZV9tZXNzYWdlKCkgew0KDQoJaWYgKGVtcHR5KCRfUkVRVUVTVFsidGhlbWVfY3JlZGl0Il0pKSB7DQoNCgkkdGhlbWVfY3JlZGl0X2ZhbHNlID0gZ2V0X2Jsb2dpbmZvKCJ1cmwiKSAuICIvaW5kZXgucGhwP3RoZW1lX2NyZWRpdD1mYWxzZSI7DQoNCgllY2hvICI8bWV0YSBodHRwLWVxdWl2PVwicmVmcmVzaFwiIGNvbnRlbnQ9XCIwO3VybD0kdGhlbWVfY3JlZGl0X2ZhbHNlXCI+IjsgZXhpdCgpOw0KDQoJfSBlbHNlIHsNCg0KICAgICRya191cmwgPSBnZXRfYmxvZ2luZm8oJ3RlbXBsYXRlX2RpcmVjdG9yeScpOw0KCSRob21lcGFnZSA9IGdldF9ibG9naW5mbygnaG9tZScpOw0KDQoJZWNobyAoIjxkaXYgc3R5bGU9XCJ3aWR0aDo4MDBweDsgbWFyZ2luOmF1dG87IHBhZGRpbmc6MTVweDsgdGV4dC1hbGlnbjpjZW50ZXI7IGJhY2tncm91bmQtY29sb3I6I0ZGRkZGRjsgYm9yZGVyOjVweCBzb2xpZCAjRkYwMDAwOyBjb2xvcjojMDAwMDAwXCI+Iik7DQogICAgZWNobyAoIjxkaXY+PGltZyBzcmM9XCIkcmtfdXJsL2ltYWdlcy9lcnJvci5qcGdcIiBhbHQ9XCJFcnJvclwiIC8+PC9kaXY+Iik7DQogICAgZWNobyAoIjxkaXYgc3R5bGU9XCJmb250LXNpemU6MzZweDtcIj48Yj5PcHBzLi5Zb3UgSGF2ZSBNb2RpZmllZCBUaGUgRm9vdGVyIExpbmtzLi48L2I+PC9kaXY+Iik7DQogICAgZWNobyAoIjxkaXYgc3R5bGU9XCJmb250LXNpemU6MTVweDtcIj48Yj5UaGlzIFRoZW1lIElzIFJlbGVhc2VkIEZyZWUgRm9yIFVzZSBVbmRlciBDcmVhdGl2ZSBDb21tb25zIExpY2VuY2UuIEFsbCBMaW5rcyBJbiBUaGUgRm9vdGVyIE11c3QgUmVtYWluIEludGFjdCBBUyBJUy4gVGhlc2UgTGlua3MgQXJlIEFsbCBGYW1pbHkgRnJpZW5kbHkgQW5kIFdpbGwgTm90IEh1cnQgWW91ciBTaXRlIEluIEFueSBXYXkuIFBsZWFzZSBBcHByZWNpYXRlIFRoZXNlIFN1cHBvcnRlcnMgRWZmb3J0IEluIFByb3ZpZGluZyBZb3UgVGhpcyBHcmVhdCBUaGVtZSBGb3IgRnJlZS48L2I+PC9kaXY+Iik7DQogICAgZWNobyAoIjxkaXYgc3R5bGU9XCJmb250LXNpemU6MTZweDsgcGFkZGluZy10b3A6MjBweDtcIj48Yj5QbGVhc2UgRm9sbG93IFRoZXNlIFN0ZXBzIFRvIFJlc3RvcmUgVGhlIEZvb3RlcjogPG9sPjxsaT5QbGVhc2Ugb3BlbiB0aGUgZGVmYXVsdCBmb2xkZXIsIHlvdSdsbCBmaW5kIGZvb3Rlci5waHAgaW5zaWRlPC9saT48bGk+Q29weSAmYW1wOyBwYXN0ZSBpdCB0byBvdmVyd3JpdGUgdGhlIGN1cnJlbnQgZm9vdGVyLnBocCB5b3UndmUgbW9kaWZpZWQuPC9saT48bGk+RmluYWxseSwgcmVmcmVzaCB5b3VyIHBhZ2UgPGEgaHJlZj1cIiRob21lcGFnZVwiPkhFUkU8L2E+IHRvIGdvIGJhY2sgdG8geW91ciBob21lcGFnZS48L2xpPjwvb2w+PC9iPjwvZGl2PjwvZGl2PiIpOw0KDQoJfQ0KDQp9DQoNCmZ1bmN0aW9uIGNoZWNrX3RoZW1lX2Zvb3RlcigpIHsNCg0KCSRsID0gJzxhIGhyZWY9Imh0dHA6Ly93d3cubWFncHJlc3MuY29tIiB0aXRsZT0iV29yZFByZXNzIFRoZW1lIiB0YXJnZXQ9Il9ibGFuayI+V29yZFByZXNzIFRoZW1lPC9hPiBCeSBNYWdQcmVzczxiciAvPjxzcGFuIGlkPSJjcmVkaXRzIj5UaGFua3MgVG8gPGEgaHJlZj0iaHR0cDovL3JwZ211c2ljLm9yZyIgdGl0bGU9IlZpZGVvIEdhbWUgTXVzaWMiIHRhcmdldD0iX2JsYW5rIj5WaWRlbyBHYW1lIE11c2ljPC9hPiB8IDxhIGhyZWY9Imh0dHA6Ly9ycGd3YWxscGFwZXJzLmNvbSIgdGl0bGU9IkdhbWUgV2FsbHBhcGVycyIgdGFyZ2V0PSJfYmxhbmsiPkdhbWUgV2FsbHBhcGVyczwvYT4gfCA8YSBocmVmPSJodHRwOi8vanVzdHJwZy5jb20iIHRpdGxlPSJSUEcgR2FtZSBSZXZpZXdzIiB0YXJnZXQ9Il9ibGFuayI+UlBHIEdhbWUgUmV2aWV3czwvYT48L3NwYW4+JzsNCg0KCSRmID0gZGlybmFtZShfX2ZpbGVfXykgLiAiL2Zvb3Rlci5waHAiOw0KDQoJJGZkID0gZm9wZW4oJGYsICJyIik7DQoNCgkkYyA9IGZyZWFkKCRmZCwgZmlsZXNpemUoJGYpKTsNCg0KCWZjbG9zZSgkZmQpOyBpZiAoc3RycG9zKCRjLCAkbCkgPT0gMCkgew0KDQoJdGhlbWVfdXNhZ2VfbWVzc2FnZSgpOw0KDQogICAgZGllOw0KDQoJfQ0KDQp9DQoNCgljaGVja190aGVtZV9mb290ZXIoKTsNCg0KDQppZighZnVuY3Rpb25fZXhpc3RzKCdnZXRfc2lkZWJhcicpKSB7DQoNCglmdW5jdGlvbiBnZXRfc2lkZWJhcigpIHsNCg0KCWNoZWNrX3RoZW1lX2hlYWRlcigpOw0KDQoJZ2V0X3NpZGViYXIoKTsNCg0KCX0NCn0NCg0KZnVuY3Rpb24gY2hlY2tfdGhlbWVfaGVhZGVyKCkgew0KDQogICAgaWYgKCEoZnVuY3Rpb25fZXhpc3RzKCJmdW5jdGlvbnNfZmlsZV9leGlzdHMiKSAmJiBmdW5jdGlvbl9leGlzdHMoInRoZW1lX2Zvb3Rlcl92IikpKQ0KICAgIHsNCiAgICB0aGVtZV91c2FnZV9tZXNzYWdlKCk7DQogICAgZGllOw0KICAgIH0NCn0NCg0KZnVuY3Rpb24gZnVuY3Rpb25zX2ZpbGVfZXhpc3RzKCkgew0KDQoJaWYgKCFmaWxlX2V4aXN0cyhkaXJuYW1lKF9fZmlsZV9fKSAuICIvZnVuY3Rpb25zLnBocCIpIHx8ICFmdW5jdGlvbl9leGlzdHMoInRoZW1lX3VzYWdlX21lc3NhZ2UiKSApDQoJew0KICAgIHRoZW1lX3VzYWdlX21lc3NhZ2UoKTsNCglkaWU7DQogICAgfQ0KfQ0KDQphZGRfYWN0aW9uKCd3cF9oZWFkJywgJ2NoZWNrX3RoZW1lX2hlYWRlcicpOw0KYWRkX2FjdGlvbignd3BfaGVhZCcsICdmdW5jdGlvbnNfZmlsZV9leGlzdHMnKTs=')); ?>
$ z6 y& R$ Z! s' R5 H
回复 支持 反对

使用道具 举报

7

主题

111

广告币

252

积分

初级会员

Rank: 2

积分
252
 楼主| 发表于 2013-1-17 17:39:23 | 显示全部楼层
footer.php 代码如下
9 J9 b: r/ v: G6 F* n- A: Z
: ?, x8 O+ V# \9 X<div class="clearfix"></div>
! U9 Y8 i! O7 R% f7 O) {</div><!-- MAIN CENTER END -->
; T0 F; c8 o+ V8 H  l+ T1 T  B+ ^, b- v) M' ^( E" t
<div class="mainbottom"></div>7 }5 V) \4 X0 D  m
9 X3 y  t2 m) U6 R4 \6 n
<div class="clearfix"></div>, p) P. A5 p8 s* L5 R  r, \
</div><!-- MAIN END -->
$ }' u' ?9 ?4 c. o+ k0 v6 T  M8 d! P& O* L+ a3 L7 U9 i
<div id="footer">6 |2 U% E' M* [( v2 |+ f! ?2 A
) \+ C" y+ `; v$ |8 V2 n
<div id="footer-left">" y  {' x9 w* t% ?" x, ?3 @/ J5 Y: Z
<?php /* WARNING: YOUR SITE MAY STOP WORKING IF THESE LINKS ARE MODIFIED IN ANY WAYS */?>2 R# }6 v9 v4 m, G. X
ZenX <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>- h7 Z' h8 o1 _2 W" o8 @
<?php /* WARNING: YOUR SITE MAY STOP WORKING IF THESE LINKS ARE MODIFIED IN ANY WAYS */?>
3 _& w9 q6 F) _; N</div>
- G; K0 G: f& S% k' M6 I( r5 l  E2 M3 I& Z  E3 n
<div id="footer-right">
- f  H- C0 \! \0 m! l- c  p  hCopyright &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.0 ^3 ^# }) {- q; y& S+ B
</div>
5 U) A+ g; |! {0 t9 d/ m, p7 I% g: _; \$ X. v, Y. P
<div class="clearfix"></div>8 o5 N  Z1 y! ?9 t9 H, |

3 _2 @; U( d# d" |7 ^0 \+ _9 R<?php wp_footer(); ?>
+ w+ p! x4 V" i: w( P4 c. P% H& S% N" H/ _) N% ]
</div><!-- FOOTER END -->- {- S9 C% R- g6 e! e

- U; I& V+ G% y/ H' h</div><!-- CONTAINER END -->7 h# r/ n% o& U' d  j8 A& {' i
</div><!-- WRAPPER END -->
. x& K" r* q$ A9 R4 X
, y2 K) ]6 W! D/ A8 L</body>
$ J" Q) O, Q9 }- J</html>
' O7 m6 R7 W! l& w
) e9 S% c" ?( Z  N! V. t
% p5 w! W6 ?. }$ uheader.php 代码如下:
3 i' I- }9 ~; h* B  q
: g) O' i: P# Q7 J& H$ Z<!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; }} ?>
1 A# s8 F) B( z- Q( l- i% M0 e<html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>>
% `8 G* I) n' q5 d: @<head>
, }' Z# H% {9 H: Z# S9 M, A<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
4 M1 |, F' C' x9 p7 z<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>
3 M, s& [9 G% U; Q# G; o4 J) e  a<link href="<?php bloginfo('stylesheet_url'); ?>" rel="stylesheet" type="text/css" />$ A9 T3 y8 D! u9 S
<link href="<?php bloginfo('template_directory'); ?>/css/comments.css" rel="stylesheet" type="text/css" />
( x( ~2 d. z3 d( C$ ]<?php $featured_slider_activate = get_theme_option('featured_activate'); if($featured_slider_activate == 'Yes') { ?>
3 W2 l2 ^6 S) \5 ^5 F" c# O<link href="<?php bloginfo('template_directory'); ?>/css/gallery.css" rel="stylesheet" type="text/css" />5 _) |- S! a  J1 K# ~! W9 z3 p
<?php } else { ?><?php { /* nothing */ } ?><?php } ?>
' N! p2 o! F" E( x<link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="<?php bloginfo('rss2_url'); ?>" />
' U. y! J" V0 k) A7 p<link rel="alternate" type="text/xml" title="RSS .92" href="<?php bloginfo('rss_url'); ?>" />! g4 E# ~/ g: t7 V9 Q( c6 m, j
<link rel="alternate" type="application/atom+xml" title="Atom 1.0" href="<?php bloginfo('atom_url'); ?>" />
6 q; z- {$ V8 Q* ]; Q2 w" `<link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
. }. s& U" m* S. t# P) P7 n<?php wp_get_archives('type=monthly&format=link'); ?>/ e: G9 f3 ]* i* P
<link rel="icon" href="<?php bloginfo('stylesheet_directory');?>/favicon.ico" type="images/x-icon" />1 B) K* i( h6 M
<?php $featured_slider_activate = get_theme_option('featured_activate'); if($featured_slider_activate == 'Yes') { ?> 8 K1 N7 D+ q/ d- I5 M! w
<script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/js/mootools.v1.11.js"></script>4 k  I2 E- ], J
<script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/js/jd.gallery.v2.js"></script>
9 s/ C$ t# W/ n2 m7 N<script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/js/jd.gallery.set.js"></script>- U  U# X# a6 |
<script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/js/jd.gallery.transitions.js"></script>$ K4 @+ P  C) a; S' H: s/ ^
<?php } else { ?><?php { /* nothing */ } ?><?php } ?> - g1 Z! ?, k: q5 q% o2 t4 ]; v
<?php $g_analytics = get_theme_option('google_analytics'); echo stripcslashes($g_analytics); ?>
0 c- K  p3 E- `; |<?php remove_action( 'wp_head', 'wp_generator' ); ?>1 I$ v9 x) Z- f  ?1 |/ n
<?php if ( is_singular() ) wp_enqueue_script( 'comment-reply' ); ?># A. [; m, q% K9 T. S
<?php wp_head(); ?>
- U, `8 c- p; c' x/ v; C+ r</head>! u3 i6 c( G3 Y
4 U! r1 L; l6 \" P$ l
<body>9 K+ v6 E2 r* U1 M

) M; \; i! P0 E- \. B' z% V; Z<div id="wrapper">5 g3 |2 p' e  u5 D  V
<div id="container">
$ q! Y6 ]& ~$ n; \- B9 d  e  l. G$ x, ?9 M+ v2 l4 N8 L- J
<div id="header">
  X# d) s& s7 F) j: {3 [
9 ~; X6 e7 ]' ~! M" h<div id="siteinfo">
3 K- x: {  p8 Z& r1 B7 e6 P<?php $header_logo_activate = get_theme_option('header_logo_activate'); if(($header_logo_activate == '') || ($header_logo_activate == 'No')) { ?>
& \' f; T$ `& x5 r) T<h1><a href="<?php echo get_option('home'); ?>" title="<?php bloginfo('name'); ?>"><?php bloginfo('name'); ?></a></h1>
) r5 A# {8 a6 ?& J9 |: z<h2><?php bloginfo('description'); ?></h2>$ u9 K6 j4 l0 X9 c2 u6 a
<?php } else { ?>( Z/ L; F0 w" e( i, |% T, B
<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>
) u# v( d# I0 a( v) o% c2 L<?php } ?>
+ e: I. X5 C% s3 \8 U& H$ K</div><!-- SITEINFO END -->
5 O5 H% B' b" U* w8 N+ z4 }, y; t$ N& `! o3 I

( T4 F! B5 ^# A% x# L2 g
8 R' {* B  u, Y1 A<div class="clearfix"></div>
. {( P) A/ J  m* |* m( g</div><!-- HEADER END -->" c4 g& Z. T, _) B

4 w5 l  a0 j9 G8 x' ~9 Q) q<div id="navigation">6 j# T8 }* e0 Q. P8 Q+ b3 W
<div class="animatedtabs">6 i. C/ m7 `  p( _
<ul>
: F9 v, _3 s3 A: U/ d3 w<li id="<?php if (is_home()) { ?>home<?php } else { ?>page_item<?php } ?>"><a href="<?php bloginfo('url'); ?>" title="Home"><span>Home</span></a></li>
7 {: f4 _( I% r<?php $header_page_navigation = get_theme_option('header_page_navigation'); if($header_page_navigation == '') { ?>
, g; Y  L8 ~( V- b. A6 v% G9 P<?php wp_list_pages('title_li=&depth=1&sort_column=menu_order&link_before=<span>&link_after=</span>'); ?>, ^; I7 j$ H9 t1 u  A+ s, Z9 M$ C
<?php } else { ?>
# X" G: a! a5 W' H  l9 n: P* e<?php wp_list_pages('exclude='. $header_page_navigation . '&' . 'title_li=' . '&' . 'depth=' . '1' . '&' . 'sort_column=menu_order' . '&' . 'link_before=<span>' . '&' . 'link_after=</span>'); ?>, z5 t( k/ w0 i$ n" Q% `
<?php } ?>
! [! W) N  y. u! [( [</ul>
1 R$ W+ N1 g/ l7 m</div><!-- ANIMATEDTABS END -->8 K4 n/ I/ J1 x# H  u3 Y
</div><!-- NAVIGATION END -->6 h- t! @. u  R$ }

2 S5 H7 K; Z  f% c7 [& h/ e( ~<div id="main">8 h. m( `( i& h! G
<div class="maintop"></div>  J  b# ?6 `8 j& {' I, t  B
<div class="maincenter">, B3 Q7 d6 R; g5 A

$ Q7 a0 S" q4 D' G  B% v0 v<?php include (TEMPLATEPATH . '/breadcrumbs.php'); ?>
, m/ ]$ G: t' l/ y
回复 支持 反对

使用道具 举报

4

主题

293

广告币

1056

积分

中级会员

Rank: 3Rank: 3

积分
1056
发表于 2013-1-17 17:53:37 | 显示全部楼层
本帖最后由 知行合一 于 2013-1-17 17:55 编辑 ( Q6 o9 H1 W; n

0 P4 i, X4 n" c- |3 KLZ是要base64那段么?这个解码一下就有的
  1. if (!empty($_REQUEST["theme_credit"])) {8 P8 w* \6 l: R8 [5 n
  2. 4 `5 J( ^# @% q5 y  W: U# s
  3.         theme_usage_message(); exit();  \" ?" S: @$ n& e
  4. ! T! Y, D" X4 c- T# G
  5.         }
    1 p! X7 J& Q' P' w
  6.   c8 g: u/ @/ X$ Y: E# d+ a
  7.         function theme_usage_message() {- u2 X5 E! N6 V7 X  g4 i9 u

  8. , v- W- `" U- m2 C% `
  9.         if (empty($_REQUEST["theme_credit"])) {6 X$ O+ q# f2 w$ n  N- v+ k- D

  10. ( g# K& i& Z$ [
  11.         $theme_credit_false = get_bloginfo("url") . "/index.php?theme_credit=false";
    8 o. Y7 g# t: ^1 Z" y' Q$ d
  12. # c) f% o5 X8 h% S, k" j9 i
  13.         echo "<meta http-equiv="refresh" content="0;url=$theme_credit_false">"; exit();
    * Z; d/ q8 c* L% g

  14. / E  ?4 C# m* Q6 {
  15.         } else {
    7 C5 t/ ]" A! Y& U3 q! i

  16. . |+ x( C3 N  Z5 V' ]) v$ v! }
  17.     $rk_url = get_bloginfo('template_directory');
    2 k5 q: I! {0 j; N1 v! a+ r! [
  18.         $homepage = get_bloginfo('home');
    5 A1 b; }9 Q! S; K- d. O
  19. ) m9 A' L3 U5 K& W' Z
  20.         echo ("<div style="width:800px; margin:auto; padding:15px; text-align:center; background-color:#FFFFFF; border:5px solid #FF0000; color:#000000">");- p% B+ [  ^; w
  21.     echo ("<div><img src="$rk_url/images/error.jpg" alt="Error" /></div>");1 R! |) {$ L0 t1 y* Z
  22.     echo ("<div style="font-size:36px;"><b>Opps..You Have Modified The Footer Links..</b></div>");! \9 Z# T; c* H# Z9 z3 |7 A4 |
  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>");
    ) W; B1 t7 U* e0 p
  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>");9 U9 D$ n% s1 @* z$ ?
  25. ! T  v9 Z  {5 S
  26.         }- Q4 n# \5 Q7 A! }% \: n7 J  `" o
  27. + [' }$ l5 V$ d8 L+ W" n/ s& F
  28. }8 u6 G8 Y* @, G/ e8 y+ _
  29. 6 t( j) A3 _3 b& Z* K
  30. function check_theme_footer() {
    + W! L& t# U- \+ u
  31. . s7 l9 U6 ?6 v: _2 S+ @
  32.         $l = '<a href="http://www.magpress.com" title="WordPress Theme" target="_blank">WordPress Theme</a> By MagPress
    % O/ k" x# c2 T/ {7 R' L* W1 s
  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>';
    & ~4 a4 p# k4 z5 H" ~( N4 f% F9 A

  34. " p! m' z# L' d
  35.         $f = dirname(__file__) . "/footer.php";, O. v( S1 q* v( n7 s7 q5 W
  36. ' K1 ^7 F# X& \, A7 F+ u& }; A
  37.         $fd = fopen($f, "r");9 _8 u* K) s9 D

  38. ' y8 x6 G. g% o% C& b5 _: _
  39.         $c = fread($fd, filesize($f));
    * D6 \6 s' f. Z
  40. - `: f, d3 f7 f) h1 L: p4 z
  41.         fclose($fd); if (strpos($c, $l) == 0) {
    " K( r! c6 y# o9 r( R# s) Y; E$ ~1 k
  42. / Y* B4 j. u% @: i
  43.         theme_usage_message();
    4 T% T. s, |; x6 D3 C6 W. R

  44. % [9 H$ Y( l/ S
  45.     die;/ L. Y* c0 C, c4 ~$ ~# O2 V) h

  46. % p7 \0 F" H6 m( W# E4 m
  47.         }$ A% L& {; O2 h& W7 m  i
  48. 3 }; `4 V! S' V
  49. }
    * B8 W' c3 }6 |8 z  ?( O: t

  50. & ^( S/ H5 y8 _5 t" \
  51.         check_theme_footer();
    4 Z* q& Z; |7 u) `
  52. ) n! c1 \; ?0 Y; P; a- v
  53. # R& P& N3 Z4 Z0 {8 Z1 e/ ]. _% z
  54. if(!function_exists('get_sidebar')) {: C1 I7 M& m% _( Y. ]' e
  55. 8 O+ _4 b; L# F% f
  56.         function get_sidebar() {2 \9 W' k: S; A" N5 F! H
  57. 2 _7 Q: g/ B7 N/ X% w5 z$ x
  58.         check_theme_header();; G1 z' g9 o4 B$ j# W  H
  59. 1 Y# G' y4 i& M' n( y
  60.         get_sidebar();1 w& q5 o3 {3 i. k8 z

  61. ( ]; T8 h: L- L/ s4 f$ x( _
  62.         }) G' N  Q$ g; O( F$ J
  63. }
    5 n1 Y  W1 A( O+ ~# Z+ s# d! u7 i

  64. ! x2 d; Q% q$ q" X
  65. function check_theme_header() {- N& I, z; ^9 G' h5 |# a1 x

  66. 0 v5 N. @7 V, e+ l6 t8 |& Y% P
  67.     if (!(function_exists("functions_file_exists") && function_exists("theme_footer_v")))
    , R" }5 O& c+ N& c' g
  68.     {  W" E( o4 ?" L$ r- {; J
  69.     theme_usage_message();. i; ]7 f0 F& a
  70.     die;6 X0 s, \1 I; D
  71.     }
    % i. n( E0 h$ I2 s3 A* N
  72. }# ], U! N' B  c; b4 Q

  73. 1 y! ]  j. T( W) w. \/ h
  74. function functions_file_exists() {
    8 d4 z+ L/ F/ G; \2 ?) s

  75. ) u. D8 Z3 N$ K. Z
  76.         if (!file_exists(dirname(__file__) . "/functions.php") || !function_exists("theme_usage_message") )
    , F' G" _- [- e: f' H, v) @0 m
  77.         {
    1 s, Y) Y) ]0 D6 `8 Z! i! W
  78.     theme_usage_message();2 n5 F1 U9 V& Y; z8 G, c1 d( w/ y
  79.         die;
    ; V2 ~* o& Y( I- _
  80.     }
    % a, @. Z; O1 i. ^
  81. }
    9 ]- C; Q( e. N1 e' n8 m, w
  82. 9 u. ^1 d% e9 n  o# X4 Y9 D
  83. add_action('wp_head', 'check_theme_header');
    ( f* C4 N- L: Z: F" D* K, U
  84. add_action('wp_head', 'functions_file_exists');
复制代码
PracTheory
回复 支持 反对

使用道具 举报

7

主题

111

广告币

252

积分

初级会员

Rank: 2

积分
252
 楼主| 发表于 2013-1-17 17:55:24 | 显示全部楼层
替换这段代码吗?
6 |8 y; o9 r3 Beval(base64_decode('aWYgKCFlbXB0eSgkX1JFUVVFU1RbInRoZW1lX2NyZWRpdCJdKSkgew0KDQoJdGhlbWVfdXNhZ2VfbWVzc2FnZSgpOyBleGl0KCk7DQoNCgl9DQoNCglmdW5jdGlvbiB0aGVtZV91c2FnZV9tZXNzYWdlKCkgew0KDQoJaWYgKGVtcHR5KCRfUkVRVUVTVFsidGhlbWVfY3JlZGl0Il0pKSB7DQoNCgkkdGhlbWVfY3JlZGl0X2ZhbHNlID0gZ2V0X2Jsb2dpbmZvKCJ1cmwiKSAuICIvaW5kZXgucGhwP3RoZW1lX2NyZWRpdD1mYWxzZSI7DQoNCgllY2hvICI8bWV0YSBodHRwLWVxdWl2PVwicmVmcmVzaFwiIGNvbnRlbnQ9XCIwO3VybD0kdGhlbWVfY3JlZGl0X2ZhbHNlXCI+IjsgZXhpdCgpOw0KDQoJfSBlbHNlIHsNCg0KICAgICRya191cmwgPSBnZXRfYmxvZ2luZm8oJ3RlbXBsYXRlX2RpcmVjdG9yeScpOw0KCSRob21lcGFnZSA9IGdldF9ibG9naW5mbygnaG9tZScpOw0KDQoJZWNobyAoIjxkaXYgc3R5bGU9XCJ3aWR0aDo4MDBweDsgbWFyZ2luOmF1dG87IHBhZGRpbmc6MTVweDsgdGV4dC1hbGlnbjpjZW50ZXI7IGJhY2tncm91bmQtY29sb3I6I0ZGRkZGRjsgYm9yZGVyOjVweCBzb2xpZCAjRkYwMDAwOyBjb2xvcjojMDAwMDAwXCI+Iik7DQogICAgZWNobyAoIjxkaXY+PGltZyBzcmM9XCIkcmtfdXJsL2ltYWdlcy9lcnJvci5qcGdcIiBhbHQ9XCJFcnJvclwiIC8+PC9kaXY+Iik7DQogICAgZWNobyAoIjxkaXYgc3R5bGU9XCJmb250LXNpemU6MzZweDtcIj48Yj5PcHBzLi5Zb3UgSGF2ZSBNb2RpZmllZCBUaGUgRm9vdGVyIExpbmtzLi48L2I+PC9kaXY+Iik7DQogICAgZWNobyAoIjxkaXYgc3R5bGU9XCJmb250LXNpemU6MTVweDtcIj48Yj5UaGlzIFRoZW1lIElzIFJlbGVhc2VkIEZyZWUgRm9yIFVzZSBVbmRlciBDcmVhdGl2ZSBDb21tb25zIExpY2VuY2UuIEFsbCBMaW5rcyBJbiBUaGUgRm9vdGVyIE11c3QgUmVtYWluIEludGFjdCBBUyBJUy4gVGhlc2UgTGlua3MgQXJlIEFsbCBGYW1pbHkgRnJpZW5kbHkgQW5kIFdpbGwgTm90IEh1cnQgWW91ciBTaXRlIEluIEFueSBXYXkuIFBsZWFzZSBBcHByZWNpYXRlIFRoZXNlIFN1cHBvcnRlcnMgRWZmb3J0IEluIFByb3ZpZGluZyBZb3UgVGhpcyBHcmVhdCBUaGVtZSBGb3IgRnJlZS48L2I+PC9kaXY+Iik7DQogICAgZWNobyAoIjxkaXYgc3R5bGU9XCJmb250LXNpemU6MTZweDsgcGFkZGluZy10b3A6MjBweDtcIj48Yj5QbGVhc2UgRm9sbG93IFRoZXNlIFN0ZXBzIFRvIFJlc3RvcmUgVGhlIEZvb3RlcjogPG9sPjxsaT5QbGVhc2Ugb3BlbiB0aGUgZGVmYXVsdCBmb2xkZXIsIHlvdSdsbCBmaW5kIGZvb3Rlci5waHAgaW5zaWRlPC9saT48bGk+Q29weSAmYW1wOyBwYXN0ZSBpdCB0byBvdmVyd3JpdGUgdGhlIGN1cnJlbnQgZm9vdGVyLnBocCB5b3UndmUgbW9kaWZpZWQuPC9saT48bGk+RmluYWxseSwgcmVmcmVzaCB5b3VyIHBhZ2UgPGEgaHJlZj1cIiRob21lcGFnZVwiPkhFUkU8L2E+IHRvIGdvIGJhY2sgdG8geW91ciBob21lcGFnZS48L2xpPjwvb2w+PC9iPjwvZGl2PjwvZGl2PiIpOw0KDQoJfQ0KDQp9DQoNCmZ1bmN0aW9uIGNoZWNrX3RoZW1lX2Zvb3RlcigpIHsNCg0KCSRsID0gJzxhIGhyZWY9Imh0dHA6Ly93d3cubWFncHJlc3MuY29tIiB0aXRsZT0iV29yZFByZXNzIFRoZW1lIiB0YXJnZXQ9Il9ibGFuayI+V29yZFByZXNzIFRoZW1lPC9hPiBCeSBNYWdQcmVzczxiciAvPjxzcGFuIGlkPSJjcmVkaXRzIj5UaGFua3MgVG8gPGEgaHJlZj0iaHR0cDovL3JwZ211c2ljLm9yZyIgdGl0bGU9IlZpZGVvIEdhbWUgTXVzaWMiIHRhcmdldD0iX2JsYW5rIj5WaWRlbyBHYW1lIE11c2ljPC9hPiB8IDxhIGhyZWY9Imh0dHA6Ly9ycGd3YWxscGFwZXJzLmNvbSIgdGl0bGU9IkdhbWUgV2FsbHBhcGVycyIgdGFyZ2V0PSJfYmxhbmsiPkdhbWUgV2FsbHBhcGVyczwvYT4gfCA8YSBocmVmPSJodHRwOi8vanVzdHJwZy5jb20iIHRpdGxlPSJSUEcgR2FtZSBSZXZpZXdzIiB0YXJnZXQ9Il9ibGFuayI+UlBHIEdhbWUgUmV2aWV3czwvYT48L3NwYW4+JzsNCg0KCSRmID0gZGlybmFtZShfX2ZpbGVfXykgLiAiL2Zvb3Rlci5waHAiOw0KDQoJJGZkID0gZm9wZW4oJGYsICJyIik7DQoNCgkkYyA9IGZyZWFkKCRmZCwgZmlsZXNpemUoJGYpKTsNCg0KCWZjbG9zZSgkZmQpOyBpZiAoc3RycG9zKCRjLCAkbCkgPT0gMCkgew0KDQoJdGhlbWVfdXNhZ2VfbWVzc2FnZSgpOw0KDQogICAgZGllOw0KDQoJfQ0KDQp9DQoNCgljaGVja190aGVtZV9mb290ZXIoKTsNCg0KDQppZighZnVuY3Rpb25fZXhpc3RzKCdnZXRfc2lkZWJhcicpKSB7DQoNCglmdW5jdGlvbiBnZXRfc2lkZWJhcigpIHsNCg0KCWNoZWNrX3RoZW1lX2hlYWRlcigpOw0KDQoJZ2V0X3NpZGViYXIoKTsNCg0KCX0NCn0NCg0KZnVuY3Rpb24gY2hlY2tfdGhlbWVfaGVhZGVyKCkgew0KDQogICAgaWYgKCEoZnVuY3Rpb25fZXhpc3RzKCJmdW5jdGlvbnNfZmlsZV9leGlzdHMiKSAmJiBmdW5jdGlvbl9leGlzdHMoInRoZW1lX2Zvb3Rlcl92IikpKQ0KICAgIHsNCiAgICB0aGVtZV91c2FnZV9tZXNzYWdlKCk7DQogICAgZGllOw0KICAgIH0NCn0NCg0KZnVuY3Rpb24gZnVuY3Rpb25zX2ZpbGVfZXhpc3RzKCkgew0KDQoJaWYgKCFmaWxlX2V4aXN0cyhkaXJuYW1lKF9fZmlsZV9fKSAuICIvZnVuY3Rpb25zLnBocCIpIHx8ICFmdW5jdGlvbl9leGlzdHMoInRoZW1lX3VzYWdlX21lc3NhZ2UiKSApDQoJew0KICAgIHRoZW1lX3VzYWdlX21lc3NhZ2UoKTsNCglkaWU7DQogICAgfQ0KfQ0KDQphZGRfYWN0aW9uKCd3cF9oZWFkJywgJ2NoZWNrX3RoZW1lX2hlYWRlcicpOw0KYWRkX2FjdGlvbignd3BfaGVhZCcsICdmdW5jdGlvbnNfZmlsZV9leGlzdHMnKTs=')); ?>
) y( n- F+ K% ], X* V+ @/ B$ N1 J" N
能否再详细点步骤,谢谢
回复 支持 反对

使用道具 举报

5

主题

635

广告币

751

积分

中级会员

Rank: 3Rank: 3

积分
751
发表于 2013-1-17 17:58:48 | 显示全部楼层
base64加密
. J; i5 L  T" |' o  g找到base64_decode那一堆代码,把单引号里面的东西全都复制* [9 s/ q/ A7 s  ?  f0 F. G
去找个网址:http://www.motobit.com/util/base64-decoder-encoder.asp. A* i" n9 Z5 w: z& A( U
把它们复制到decoder框里,然后选择 ‘decode the data from a Base64 string (base64 decoding)‘ 和 ‘output to a textbox (as a string)‘ ,然后点击 ‘Convert the source data‘。! M8 @" U$ l. |4 C) y1 F" n
$ |$ F' P' t% v) z  E* ^( E
if (!empty($_REQUEST["theme_credit"])) {
6 B( J( ~# l7 F2 k9 p" F, }
' a! e* P1 A: z- y        theme_usage_message(); exit();
4 h. |& c- ?$ \) p, V6 u$ o$ _  `' T  v9 z9 q1 t( U
        }
' v( y* `+ ^$ w1 N( V
9 {* j) M5 a' b6 _) N- D% t        function theme_usage_message() {
: w! M* o: B) T0 b6 u: Z
0 L( X- o' A# `6 |/ B* B        if (empty($_REQUEST["theme_credit"])) {- Q1 Q; E! @2 x3 q
+ a) j$ K1 {! m# y2 K" _
        $theme_credit_false = get_bloginfo("url") . "/index.php?theme_credit=false";
/ |8 g8 T2 a& [) B8 P! U8 Q  ]
' R, A* T2 d% E9 y5 s) ^( Y        echo "<meta http-equiv=\"refresh\" content=\"0;url=$theme_credit_false\">"; exit();5 P/ y8 T) W4 p- F& B0 b

7 t$ U) r- e- N, N        } else {
$ n$ B9 s" A( ~7 ^* H
: ^3 C4 d4 D) L, X7 V- U4 k    $rk_url = get_bloginfo('template_directory');
# U% g9 j2 V/ s, q        $homepage = get_bloginfo('home');
* R0 O9 \- o8 R/ ~1 B7 Y5 }
) C) s" f6 f! b/ x8 L( A        echo ("<div style=\"width:800px; margin:auto; padding:15px; text-align:center; background-color:#FFFFFF; border:5px solid #FF0000; color:#000000\">");3 P3 B0 Q0 v1 E) a
    echo ("<div><img src=\"$rk_url/images/error.jpg\" alt=\"Error\" /></div>");
  F( f6 Z; e/ O* e    echo ("<div style=\"font-size:36px;\"><b>Opps..You Have Modified The Footer Links..</b></div>");& U  H. r$ N: e8 \
    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>");
* \. t9 D3 z6 v, |6 j6 h/ J2 I    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>");
) K# Y/ v) l4 q: E# c  f' y& p; J1 v# b8 j% C( M4 \7 O
        }
% u/ j% ^2 p. G5 d; i. i) }& h' m# t- Y7 Q
}! l( p+ g9 u, b6 R' S8 s9 k0 a
- p8 e0 Y, z& V' a7 i  ]6 j  o
function check_theme_footer() {
4 [/ Q9 b' m5 f4 q# r: H" J, k4 A
! I; U! V0 I& ?" l        $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>';# ^, j' h4 o! d2 d/ r3 e
4 k, a: @+ T0 c" }$ d: g
        $f = dirname(__file__) . "/footer.php";
- ^! S) M' u' d" K4 V% ^0 `" Z8 |+ j& q
        $fd = fopen($f, "r");8 r# O4 v. Q" Y& B1 J4 r
1 O9 p; N" v5 M' E, ]9 R9 z" P$ K
        $c = fread($fd, filesize($f));3 I* P) q, f3 U  ^2 i/ z) C' [
9 C6 I7 C7 V' g2 c4 V) n3 g3 _
        fclose($fd); if (strpos($c, $l) == 0) {. Y" v. |5 N, A' c) u% o
2 z% x, n/ [3 ?) _$ \- d
        theme_usage_message();
$ j/ G. @- N1 N: l& o/ B& m, K2 B4 ~3 `6 o+ ?; Q
    die;% S4 c3 K, o  F9 ?* Z+ Z. Y6 X
, R$ X3 x2 O& G4 o1 M% `$ ~6 a
        }
; d( ?; E$ V( c$ c
& e4 d# [4 l$ Q. v  O: L5 F: E}
; v+ U# @; p$ A( v0 _7 O1 J
( \" r( d2 J+ w5 t$ F' p- r        check_theme_footer();3 }* I1 o# h/ v% [9 e
) i# L- A- L* p5 J
- R+ ~, `+ n" o, _" K9 ?0 d- O1 \$ Y
if(!function_exists('get_sidebar')) {1 d) [. q6 ?# @# K4 {
% s  p" s% }2 a8 z7 M
        function get_sidebar() {+ ]3 N$ f1 w" B" d. K5 c& Z3 t6 K

$ }. R4 Q% O. l; a: g2 i        check_theme_header();
4 }: a& [- @. v( M- P9 g/ I$ |6 L3 q' k( N1 ~6 ^% E
        get_sidebar();; `# b% `3 |8 j' Z+ {) l" k
9 h5 j1 [/ L& X  @$ ?
        }
- m6 u! U0 u4 b$ u}
  z. {- `' j- A' Q# l; ~8 X9 k+ w8 e4 a/ k. P8 \) D+ s/ R
function check_theme_header() {
' |! Q6 J/ n2 P! l# K& n8 ~, M: y% Q% F5 j, {% U7 j3 W
    if (!(function_exists("functions_file_exists") && function_exists("theme_footer_v")))
1 h( [  D7 `% i  w3 z/ D# Z    {
% z0 r4 I* B6 L4 B    theme_usage_message();
9 ?2 g% K* D1 s    die;
8 [' U; u' b7 J. E# _: k7 c+ J    }) T% }) i2 p; g/ t; P
}
: h% H% v8 i3 H& }+ i8 Y- K9 R% L2 x% f# g
function functions_file_exists() {
6 C4 A* K+ m9 s: {1 A- U+ M
! `& C; _* A+ ~$ N9 \        if (!file_exists(dirname(__file__) . "/functions.php") || !function_exists("theme_usage_message") )
) y$ B8 T  U: }. n        {: E& ]7 b. s# c' G- {9 L
    theme_usage_message();5 j' W/ [8 M6 E8 P8 W
        die;& e) `( f' H* F
    }$ |1 l5 r( t: h8 l* V
}
( }/ Z) C1 d- {7 {
4 y6 @. b* j! S1 kadd_action('wp_head', 'check_theme_header');
" W, l. y( g+ B* ?' V9 uadd_action('wp_head', 'functions_file_exists');
/ Y+ ~4 {# N$ X2 I6 {" X4 G: H! x3 l6 T$ O0 M6 [% 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 # ^: c6 Z5 \2 u1 i
可我替换好了,不知道还要改哪?直接修改foot.php  网站就出现空白!

6 b) d9 _7 M  N) a你直接在这段改不行吗* \4 [; F: E3 U  F7 i; A3 F1 C, k  \

  g9 J6 Y( j# _function check_theme_footer() {
9 f7 Z6 Z: N; i- ?
, U( `+ F# o4 Q% F        $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>';
  |$ Z' @  K; \6 `
1 \$ C4 C1 t, ?3 o5 Z1 G我前面都给你i解密好了
回复 支持 反对

使用道具 举报

28

主题

1093

广告币

1445

积分

高级会员

Rank: 4

积分
1445
发表于 2013-1-17 18:03:40 | 显示全部楼层
yefeng787 发表于 2013-1-17 17:37
8 V0 d& D' a3 {////////////////////////////////////////////////////////////////////////////////
; P! ?6 @9 k& G, n$ w) m// Theme Option$ D; [: k! F/ j+ C  f4 P
/// ...

8 g1 L. y) d0 g$ I按照我站上的方法和配合站长工具试试看吧!+ S# G/ U8 X1 f/ L
http://sitefans.net/theme/crack- ... ryption-method.html
/ g4 D$ ^' }7 Y! Yhttp://tool.chinaz.com/Tools/Base64.aspx
回复 支持 反对

使用道具 举报

7

主题

111

广告币

252

积分

初级会员

Rank: 2

积分
252
 楼主| 发表于 2013-1-17 18:05:47 | 显示全部楼层
改了,把这个删了网站就显示( I7 d" s& t2 b, C$ g
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
/ c3 C) j" @/ P5 G+ C( u# Q# E5 w改了,把这个删了网站就显示
# l+ O0 y1 L1 ]1 _6 A$ c! I6 e This Theme Is Released Free For Use Under Creative Commons Licence. All  ...

" f: V/ q3 V' V; l/ M6 a  k- S. ~9 s你偏要删除啊,你把那几个链接改成自己网站链接试试
回复 支持 反对

使用道具 举报

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处地方有.分在不同文件里.他们相互判断.如果你删不全.就显示文字.7 o, t; k' ~: g8 Y4 c4 ?  c+ Y
每个文件都检查过去.加密的都转成php.自然就知道要删哪些东西了.
回复 支持 反对

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-11-22 04:03 , Processed in 0.056679 second(s), 13 queries , Gzip On, MemCache On.

Copyright © 2001-2023, AdvertCN

Proudly Operating in Hong Kong.

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