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账号官方合作商
搜索套利开户❤️Bigo/Kwai/MediagoFB资源,账单户,分享户,国内一手FB企业户BM户账单户源头广告位出租
查看: 15369|回复: 27

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

[复制链接]

7

主题

111

广告币

252

积分

初级会员

Rank: 2

积分
252
发表于 2013-1-17 17:36:52 | 显示全部楼层 |阅读模式
代码如下哪位好新人帮下忙,谢谢了!!$ T/ J7 }$ \5 C7 V% u0 Z) X2 D$ C
+ K, t' F1 A  M* u1 ]
functions.php
# D8 I) P7 J  X, {! ^) S! D
8 U  U: U7 V: `<?php
/ i  f7 i* Q) I////////////////////////////////////////////////////////////////////////////////
) c9 D. s9 [# M, _+ g  v4 a// Get Featured Post Image
; m$ x4 u! v* o! L. ?6 A- V////////////////////////////////////////////////////////////////////////////////
  E2 G: y1 {) t/ ~( t1 X! ufunction get_featured_slider_image() {
. V' p& X  U- l  F  global $post, $posts;
1 A1 `  ^- ]' R5 s) n4 k  $first_img = '';7 M5 {; }; R5 T( F: o, q6 i
  ob_start();
1 b; b( v( T0 G  ob_end_clean();
9 S% d3 N9 E9 B, X, r  $output = preg_match_all('/<img.+src=[\'"]([^\'"]+)[\'"].*>/i', $post->post_content, $matches);
- {  k4 T- M0 e# r: D+ @  $first_img = $matches [1] [0];
' ]8 t# A  i1 q7 m4 d' M: T2 o9 U5 M( u4 @7 _: U
  if(empty($first_img)){ //Defines a default image
  g$ x+ P4 @5 h' P          $img_dir = get_bloginfo('template_directory');
2 w, L$ ]3 Y' P    $first_img = $img_dir . '/images/feat-default.jpg';8 V9 \% s7 D5 B) p% K
  }2 d% Z+ H& w7 k* O& s: L; h  |. {% {, a
  return $first_img;# H) ?& o: m: Q8 E" K& n: S
}
1 `4 i( ~( _$ G& ]5 q: Y' `* H( z8 j( T1 D2 k) T0 ~/ D
////////////////////////////////////////////////////////////////////////////////; F  A' a' M6 f/ N2 t4 Q
// Get Post Image/ {2 N( G( q/ ^/ l  b+ q
////////////////////////////////////////////////////////////////////////////////
* v5 \1 W: x0 b6 w( q2 {& Ufunction get_post_image() {+ L. f7 l: e( z9 I
  global $post, $posts;. O! i) Z# f1 l2 x7 u
  $first_img = '';
% O8 v7 g- @1 |+ F  ob_start();
. c. q9 x$ t6 K* ~  H  ob_end_clean();
! B- }7 S6 E9 z0 L% j  n  $output = preg_match_all('/<img.+src=[\'"]([^\'"]+)[\'"].*>/i', $post->post_content, $matches);
% F) W* B* x- X* \0 ~/ M! \# _  $first_img = $matches [1] [0];
# j4 o( ~. |9 Z% l+ B$ ?) \7 u" D( I
  if(empty($first_img)){ //Defines a default image
2 l. I, l3 p4 O. J5 ]  v          $img_dir = get_bloginfo('template_directory');8 ^8 d# ^' H" c, q0 b' _1 a% P
    $first_img = $img_dir . '/images/post-default.jpg';6 E$ e, Y7 z' X9 A
  }8 y& O2 @3 \! Z4 P; |
  return $first_img;
. @' k" I% x1 N$ K}
+ j' b- [: i8 H+ S  L
1 s6 c7 P' A7 E) C* Z' Y. Y2 B$ S////////////////////////////////////////////////////////////////////////////////* ]8 M/ `0 C- H- j
// Get Featured Category Image+ z  E) u  P' J4 g* T3 f# V! x! R
////////////////////////////////////////////////////////////////////////////////
; u( a+ q9 `- e1 Y' Ifunction get_featcat_image() {
: ~9 x) ~! i4 C# j) C" J! Q  l0 G  global $post, $posts;$ O* u/ a% l* m- V
  $first_img = '';; m2 ?$ [0 s8 Z' b8 H* g' P$ }
  ob_start();: `9 G6 p( C2 ^8 L9 t) V  E, k
  ob_end_clean();
  W) s7 A: z2 m- D# k  $output = preg_match_all('/<img.+src=[\'"]([^\'"]+)[\'"].*>/i', $post->post_content, $matches);, c+ t4 K6 a( T  K& S: J' s5 P
  $first_img = $matches [1] [0];
: I0 E' [# @, `( n& Y& y6 M9 J* t- S% c/ V2 H- r- o# r
  if(empty($first_img)){ //Defines a default image; r" h( a! p' a" x
          $img_dir = get_bloginfo('template_directory');) Z* c! [  P/ Y: Z
    $first_img = $img_dir . '/images/feat-cat-default.jpg';
) W) [3 \. X- h, a9 K# h  }( ?! j& W; A; B2 B; c+ J- J$ l
  return $first_img;
5 m5 g; j7 Q3 G3 e% ^+ O6 a}
0 f+ ~  {! b3 p# k0 n8 i- _! b; |. F# ^  h( T
9 w% f* \2 y* L3 V6 \
////////////////////////////////////////////////////////////////////////////////' P& u/ ?+ F9 A- |2 E0 O# U
$ {. X4 S; a  z0 ^/ ~3 T( g  c( H7 _
// Featured Content Excerpt Post1 n+ |6 u4 {; w( [* ]1 J' n# u7 n

. A: x5 M: t4 g8 N: r. O////////////////////////////////////////////////////////////////////////////////
! n4 v" s0 Y! ^9 B0 ]
9 g( b8 C' e. ~7 c" a, Q& B+ h3 g8 u& tfunction 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) {: \# i. N0 q- e5 k

( q% J4 h, Y9 x        if (preg_match('%^content($|_rss)|^excerpt($|_rss)%', $filter_type)) {
- D4 t$ u0 s8 R# @
2 V  p; M# a0 W' ]# A0 U8 p8 y                $filter_type = 'the_' . $filter_type;
0 w: J* X( Y4 ^) j# V3 s# R
* k, d& J, W5 _5 L; V& P) x        }- ]7 i% o- u6 u1 p

1 d; l. u4 ~+ d' ~7 D        $text = apply_filters($filter_type, get_the_featured_excerpt($excerpt_length, $allowedtags, $use_more_link, $more_link_text, $force_more_link, $fakeit));% j) j; [5 }0 o. K6 Q  R  ^/ @( i

1 a1 Q' B9 u7 R- P, a$ v        $text = ($fix_tags) ? balanceTags($text) : $text;
! Q. e, f9 p" K# o5 ^6 }
# m3 P( {2 L# P% O! u8 y: p        echo $text;- ?% R( a( I$ S' G+ n

2 c$ N* c8 F6 G}
  e9 L' T8 e9 D: @) O  K! L
6 \# C, J% {; P0 r& Efunction get_the_featured_excerpt($excerpt_length, $allowedtags, $use_more_link, $more_link_text, $force_more_link, $fakeit) {' a. d* i9 ^& k

$ {" n, \9 {. V        global $id, $post;
+ V* [8 g! d$ B5 c3 E# ^$ o# J! x, P$ P
        $output = '';
% {" `  H* e# Q! G# J
* ~# }5 I" `, l! O; l( {8 x        $output = $post->post_excerpt;
3 ~, g7 ~0 T4 g. X! m* v) I
, `( Q% i1 q5 o7 M% |: [0 O4 w5 g) B" h        if (!empty($post->post_password)) { // if there's a password
& }* E) `$ c% H. E  N
  Q2 @8 G& u: T5 Y) L                if ($_COOKIE['wp-postpass_'.COOKIEHASH] != $post->post_password) {  // and it doesn't match the cookie
" ~( K! R+ t: z$ m4 `. x. W2 s
, J# `6 ^- p9 Z                        $output = __('There is no excerpt because this is a protected post.');5 ^2 v) ?* X/ T$ H( \* v5 C

7 a& l+ E$ O9 p2 x                        return $output;
: ]1 y* m0 ?8 U  h, C
" R1 z' j; c# k* s                }# k4 [9 ^- \8 |% _

! v3 g0 A  m! \7 x: C7 H& K1 ]        }& E- W$ b! H4 t, b& Z# i. Z

. ^8 z, p/ O7 q, p' p8 ~. Z        // If we haven't got an excerpt, make one.
* T/ n0 h9 {% {$ q
$ K- J, E1 ]- I4 K9 s/ u        if ((($output == '') && ($fakeit == 1)) || ($fakeit == 2)) {2 M0 R6 g' D% }/ N' k3 ^
+ X9 z6 T, W- s3 I3 _! y) T
                $output = $post->post_content;
6 h7 e4 f: }1 P" Q8 I
7 ^% X$ @$ O( k& c! ]6 x' \& e, @                $output = strip_tags($output, $allowedtags);& k8 J( F3 ~1 f! V  A8 h! _; f; ]
) `- \! u9 y, d& G! g
        $output = preg_replace( '|\[(.+?)\](.+?\[/\\1\])?|s', '', $output );2 o3 C# T9 }/ }7 R4 m
* `' Q8 j' k" u5 n, D  F: C
                $blah = explode(' ', $output);, ]2 O& n# k% _* S

( a3 s, Z1 K3 d# I: f3 @8 S3 l                if (count($blah) > $excerpt_length) {
- T5 C' E9 Y$ [7 V. i
- V; s) p9 u& y* W                        $k = $excerpt_length;
: j9 K% ~8 [" B. h( r2 y6 ^
1 w8 D+ x$ v6 d4 A7 u% T                        $use_dotdotdot = 1;
" R7 U# T& l. U- p. F( V
( t5 y2 }- Y9 ~                } else {
; |7 |2 }. k8 f3 {7 j
& Z) E  r1 m2 o8 z8 {1 M8 ?                        $k = count($blah);( M, e- a' o; Z" ?  h* L- h9 U
. o- a3 Q" ^, K1 N6 Z7 t
                        $use_dotdotdot = 0;
- ^) X3 Y, l2 H7 z. h. t( O  [! |+ ]: F8 r4 o
                }5 S2 l# q" D. X* {

1 \0 u/ _( C! ?0 ^# a                $excerpt = '';  g( H. T$ D: o& S* {1 j

7 N8 `7 k. O% C- W                for ($i=0; $i<$k; $i++) {
7 h/ \% o# I! A5 s! y/ G
! {& B% x7 L8 |* Z" L                        $excerpt .= $blah[$i] . ' ';: c* [% `0 G# H) I- Z0 H

  x5 o" o8 W  N) j, x& B# n) H                }6 X5 j* J1 O$ c9 t' {  y+ \4 P) U# G
: n; ^9 v" C$ e6 Y" [3 E% S

. I2 s8 b' ~% s5 \: b4 v: u& |                if (($use_more_link && $use_dotdotdot) || $force_more_link) {. n, @2 F" z$ q0 d2 G$ t* g: A( c6 n
9 x! f5 k7 f" t" O8 G/ h
                        $excerpt .= "...&nbsp;<a href=\"". get_permalink() . "#more-$id\" class=\"more-link\">$more_link_text</a>";
5 A! c. ]  ^3 m/ p
$ y% b( {  F, D+ s% k( v                } else {$ Y1 z% C4 s# u, {5 [/ p/ j9 N& v! C9 O
* u) b$ w- Y' ]* w( m
                        $excerpt .= ($use_dotdotdot) ? '...' : '';
' W7 Y- C' d" n( v' M0 f
9 z( }. \* V6 M7 p9 y, D6 q                }8 g: ^' K3 ]7 q* R+ [
, z9 _% [  g2 a( ^  k: ]
                 $output = $excerpt;; Y. f; H# l4 D; h1 \
1 i/ f$ q- N$ Q2 Z% J
        } // end if no excerpt+ L9 ?* K( H3 T- \" p" |% d$ l  c
' M( [4 U* E1 q# c
        return $output;
' Z1 A5 Z, _( \; Z9 G9 I) ~  \. r" f3 l, a" }
}0 f* I4 r( O( J

6 b) }" d# A5 d% v: E, U////////////////////////////////////////////////////////////////////////////////* R5 `; A7 n; k  V6 e2 E

) l; N1 _( }- ~$ }// Standard Post Excerpt. b  `3 K* Y$ U; W( Z3 ~; r
* Z! C3 O+ i& M
////////////////////////////////////////////////////////////////////////////////
0 O) [- w8 ^# U, r' p
6 @/ W6 ^, T2 x1 j2 _4 r5 ]& b4 wfunction 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) {
0 v: d8 K  d) @& A. j# |/ V% q5 ^
8 c# V$ U$ [! H1 `: C3 ?) J2 ]        if (preg_match('%^content($|_rss)|^excerpt($|_rss)%', $filter_type)) {
) u. ~: {; l- {+ x! |1 {' I
' o- m8 t: s9 i& K6 \! ^, R- b                $filter_type = 'the_' . $filter_type;% r/ p4 y" |, P! F7 x8 F' B
, o3 Q/ G! a7 o9 }2 z% C5 {/ w# @- L
        }* l, M* u/ Y2 s

. T6 m* i# z' I        $text = apply_filters($filter_type, get_the_post_excerpt($excerpt_length, $allowedtags, $use_more_link, $more_link_text, $force_more_link, $fakeit));( M, b* t; U9 e4 }' a4 ]
6 C) h3 U; g7 y- v4 d% _
        $text = ($fix_tags) ? balanceTags($text) : $text;, y& {% t2 P" z8 G/ a, \
7 ]$ M$ d8 k+ f8 u  g
        echo $text;6 d% ~! _2 Q8 J5 R
8 v( G. Z8 t* V) b2 l; U) i
}3 q' N& O  T: i, ?/ o8 R

- o/ R1 V$ A0 @- [2 r2 ofunction get_the_post_excerpt($excerpt_length, $allowedtags, $use_more_link, $more_link_text, $force_more_link, $fakeit) {
4 g+ N! z" z2 }3 V% y+ L7 U3 g; R" ]( k  n+ e1 S% s
        global $id, $post;; S: ?$ D1 [' l& y2 z) R8 ?2 p
# A3 L! b* z7 z) X# C0 E/ q
        $output = '';
0 s" W9 w! w: ]" u) S* N: Y: \6 s/ v8 e) d
        $output = $post->post_excerpt;1 E2 K, k# N- K+ V
  M7 |8 `* [7 c( F
        if (!empty($post->post_password)) { // if there's a password
% m, M5 t  x$ p
7 x. P2 e. _/ _                if ($_COOKIE['wp-postpass_'.COOKIEHASH] != $post->post_password) {  // and it doesn't match the cookie
! i" B; X& n6 ?( z6 e, b# G/ L* d, l" x! g9 K0 f+ E! E' I
                        $output = __('There is no excerpt because this is a protected post.');% z9 Q6 [! d+ O

8 U' O0 X: b2 n! p4 |0 i" n1 m                        return $output;  l: s0 j& @8 V: H& ]& a

, k9 `4 j6 r% n2 h, p' A+ I, b                }" G4 m0 C% B3 X" o6 I+ l( M
" y3 `- `- E. L  M: j
        }  I# U" w+ ]- \$ Y; F$ m. f. C

/ F4 Y; \6 V* a4 @        // If we haven't got an excerpt, make one.+ `" ?. R3 w+ b% P; `

. H1 n/ [0 }8 S) ]5 N# X        if ((($output == '') && ($fakeit == 1)) || ($fakeit == 2)) {1 Q; P4 v- k# ~, Y5 S

# m) C) e( z. N7 f                $output = $post->post_content;6 d, i% A% u, H$ q

) Z- _5 S# I* |6 ^( g                $output = strip_tags($output, $allowedtags);, O! O, y) W3 B- g- w/ w' ?8 s4 D: t" O

% {: a; x1 P  B- r$ q, M        $output = preg_replace( '|\[(.+?)\](.+?\[/\\1\])?|s', '', $output );
$ C  N3 v, O. p7 D3 I' q
+ X' z+ U$ q: b+ k                $blah = explode(' ', $output);6 i1 S# Y) C9 w
1 E( ]; B9 n) i7 G4 i7 N
                if (count($blah) > $excerpt_length) {& t8 D. a9 |9 b, i

9 i* r1 k3 j3 d" V                        $k = $excerpt_length;
$ k! J3 U9 m4 Y- n' V$ a
. f- }( b' @6 |% g" A# [0 j% X' C                        $use_dotdotdot = 1;
6 n# K( F) z' b- H/ T5 k; K. a( a5 H( E" K% j* P
                } else {
& D: F' N6 M: z4 W6 u) E7 ~, |% v" A2 l4 h& L
                        $k = count($blah);6 B' e  z+ a# o4 F; U' X% `

9 ~; j9 _( ]/ |- {' f# u                        $use_dotdotdot = 0;, w  e4 Y' }) u1 h, z* q

7 R* j0 |; q: a/ u/ t" U                }
! f8 l( l& L; `4 c1 |0 ~+ h, T; T8 F% ~- H6 Y! i
                $excerpt = '';
% J1 c% h4 Y; F0 k3 {) d
! A$ L% P8 H2 H) l& n8 W3 w6 i0 I                for ($i=0; $i<$k; $i++) {0 N5 r& e& W% m. S

0 u' Q- P# t" Q1 `! Q                        $excerpt .= $blah[$i] . ' ';2 X& K7 P3 b7 P/ x; j

# i2 I) X9 U2 t( }0 M/ v                }# }+ j+ u) S9 [8 b1 b

' ?, t" x  G3 \
# l7 H" ]5 n: D- X2 }8 @                if (($use_more_link && $use_dotdotdot) || $force_more_link) {2 I+ \% I4 P, X0 y

) ]: R2 p! m1 H6 g# e. v                        $excerpt .= "...&nbsp;<a href=\"". get_permalink() . "#more-$id\" class=\"more-link\">$more_link_text</a>";( S- @, R" N4 Z

/ @9 G1 p+ G6 Q5 k: n' e8 {8 A7 x                } else {
& Q6 `+ }8 n6 Z; [( K, l
+ i7 X! B! S6 I& m7 b                        $excerpt .= ($use_dotdotdot) ? '...' : '';* x% e. D4 h$ a' `, E6 }  V
' T8 t0 A7 @# r2 l" F
                }
, ~& Q/ m1 a1 e; j  b# q" a8 g, l, U+ \+ U
                 $output = $excerpt;- F, G% V# r6 A. `( Z

% F  A0 K8 L& P6 w8 V1 z        } // end if no excerpt; w7 f6 n' x0 l% c! d* t. ~

! k: u5 _# h) \2 ?' d        return $output;* `4 a3 s2 F0 k% @  O# ]

( r+ A' s: c5 q* h6 C; p}
, m% u  G3 w0 C8 U: y
" h$ Q$ k. p3 v! u* Z2 L////////////////////////////////////////////////////////////////////////////////0 Y! q3 B7 M+ L! J0 \& A" I
, y6 p9 d& U$ M1 b
// Excerpt Feature Category
/ k) c  U4 Y% R% l& J+ z# J; U4 p7 Q- ?4 A. }* u' T
////////////////////////////////////////////////////////////////////////////////: F9 k+ n+ V& ?: W$ n
" i- l6 ^3 U  b  i, l
function the_excerpt_feat_cat($excerpt_length=15, $allowedtags='', $filter_type='none', $use_more_link=false, $more_link_text="Read More", $force_more_link=false, $fakeit=1, $fix_tags=true) {: n. B1 \/ ]( ^3 Z9 J/ H; d$ s7 P

3 ~, q0 E* D4 x8 r0 E" i* T% ]' n        if (preg_match('%^content($|_rss)|^excerpt($|_rss)%', $filter_type)) {
9 u: _6 v, K4 d
, W8 }; F0 l+ T                $filter_type = 'the_' . $filter_type;, F) R( Y8 }& q5 _. S

6 {4 ^, I0 y1 O% t5 s! ~7 s. l2 n        }6 ^( I& D$ E  i7 v/ }

9 D" l- }& v" `; E        $text = apply_filters($filter_type, get_the_excerpt_feat_cat($excerpt_length, $allowedtags, $use_more_link, $more_link_text, $force_more_link, $fakeit));
0 f4 J/ X& A/ C& n
" z  z( I& X4 R/ k/ ~  g        $text = ($fix_tags) ? balanceTags($text) : $text;
* s% i& X. a$ k( X% n  E. ?5 ?6 }  S
        echo $text;& e0 B7 y/ r6 j2 o" W1 C/ X% Q
5 h+ P! E1 D1 b( w2 f: y, W2 C# L
}
2 |( O2 ?) s5 o2 _7 G3 G" E* a# V  a6 T2 B; @3 s
function get_the_excerpt_feat_cat($excerpt_length, $allowedtags, $use_more_link, $more_link_text, $force_more_link, $fakeit) {% Q; \$ U; _7 y5 |5 U; |, \0 I: U

# n- B* ?0 \- M: R; U& N3 [        global $id, $post;: K& |2 O, d- g4 V1 H4 y

9 f! W+ c  W& Z6 c        $output = '';% k. E0 }5 p( E  @

* K  i) M2 S" ^        $output = $post->post_excerpt;
4 X$ N- H" i& P# N6 O2 }5 |, c( a" M8 \
" T' e. |6 x; R9 B, }! R        if (!empty($post->post_password)) { // if there's a password$ g0 j1 Z7 H5 w0 s4 P3 g# D& X

) ^  F1 p1 t" ?' v2 V6 l5 w                if ($_COOKIE['wp-postpass_'.COOKIEHASH] != $post->post_password) {  // and it doesn't match the cookie( t; m) C4 i' T: T# U) V$ g4 n+ Q

& P* ^! I( g  l% Q3 _7 Y                        $output = __('There is no excerpt because this is a protected post.');
# ~! R7 o7 N- L# d
: N0 H2 Z1 K2 ]( t, p                        return $output;) s+ |9 B1 p2 K% a. A6 [; N; t
* N$ T3 U8 V" q3 n6 a* C
                }
. R, C& O7 c5 e- I. i4 ]' [1 M, R. y' ~+ u- T, {8 h; E
        }
7 k7 u* n' L" l9 j% G- q  |/ x: t5 Q
        // If we haven't got an excerpt, make one.) q) g! @" ~; g- i  L

5 c- r3 ?8 d  S. ?1 i        if ((($output == '') && ($fakeit == 1)) || ($fakeit == 2)) {
& O1 j6 H$ N, ~: u) b, {
( N8 u; t0 ]- z( o- I                $output = $post->post_content;3 n7 J6 B2 V( Q2 W& u/ c$ _
3 _5 M* D( `' h0 x  z) a. t) R4 D. M: U
                $output = strip_tags($output, $allowedtags);9 B& M! l, _1 \7 Y: z, A

5 E  O7 ~2 M, S) D# m        $output = preg_replace( '|\[(.+?)\](.+?\[/\\1\])?|s', '', $output );
; s  G; D, r0 V# ]* B# T4 N. ?7 E! b5 c# Z, C
                $blah = explode(' ', $output);
$ F' O4 H2 i3 R; Z
8 M/ E2 f4 \. S* t                if (count($blah) > $excerpt_length) {
/ A. D. I' p- R' {! Z0 G3 W2 l9 p0 \8 L, Q7 F1 M( k0 Y$ ?8 O2 `! r
                        $k = $excerpt_length;
! Y& Z2 M! n7 c) N. n$ W3 R- R9 D; X- J! f: j. b
                        $use_dotdotdot = 1;
6 e* \4 J& N  }, j! C- P$ u" N0 g' b3 o( x5 m# l, d
                } else {' O5 s+ h/ N6 j# L  j

' D; R4 @; w  j' Q9 a3 S                        $k = count($blah);0 }- I' E6 w! q: h

  s$ `8 H, h7 r) y9 ?2 [' P                        $use_dotdotdot = 0;( S7 {6 w! e0 W1 v" ?

) i  L- _' G, Q3 b1 `" i                }' i4 T5 c3 v0 {$ |
% \9 o# O" }4 X! i& B; G; M
                $excerpt = '';4 X( O) |9 J& m4 F. R3 C8 F8 j
* _4 d; `7 a# E7 m, @
                for ($i=0; $i<$k; $i++) {5 V8 P8 p; w3 {0 s$ P
9 p; x4 S6 E, }6 @# }
                        $excerpt .= $blah[$i] . ' ';
" y' ^0 T* T. A  N1 Q& s1 q+ Z. t( B, [0 k4 b
                }
/ n' l& D# H/ t; ~7 w) ]" k* c$ M: E# ~) h+ d: I% O3 b4 n
) k8 O0 o4 S" O
                if (($use_more_link && $use_dotdotdot) || $force_more_link) {  F/ y: c/ f( Z. z  x( R9 U* \

3 V' ~( Z& \6 l( b% J. B% _                        $excerpt .= "...&nbsp;<a href=\"". get_permalink() . "#more-$id\">$more_link_text</a>";
3 {; c3 \) }7 {; Q
. e5 b$ {+ F) `! p. h# s                } else {* ~1 y, M9 n5 w
7 k4 E4 m+ w4 m* M* _
                        $excerpt .= ($use_dotdotdot) ? '...' : '';
$ g; H" S# C+ R$ C9 J( [, @" y) {6 s
9 ?2 c- H  n1 [. D* d                }
" Z: z0 K$ \1 A( l
- s- }5 t3 q7 U+ r) U                 $output = $excerpt;+ b2 e& F3 l7 _
& F- W- j8 w2 ~
        } // end if no excerpt
3 o* f4 W! p% H' K
) k# _7 c9 A# z& g2 ]. M( h) y        return $output;
7 P) m; N, C9 L* S% Z! p
, T1 t, H2 {- N% h/ O}4 P$ L2 T; b7 D# C' K

. k) e( k. Z) _, E
" N+ k# g) A* E* m$ h& O////////////////////////////////////////////////////////////////////////////////8 U1 G6 E* g8 Z3 J. V: N
// WP-PageNavi% {- o/ z: E" J2 \% d/ k0 h- L
////////////////////////////////////////////////////////////////////////////////0 L) N- ?1 r2 f3 t' ]0 y
1 z% [7 Y+ V' }4 D
function custom_wp_pagenavi($before = '', $after = '', $prelabel = '', $nxtlabel = '', $pages_to_show = 5, $always_show = false) {9 A" O  @0 i' d& R8 P! F
        global $request, $posts_per_page, $wpdb, $paged;
1 \8 }4 L( o* P% h        if(empty($prelabel)) {
5 Q6 p* v. G. Q, z' u5 U: D7 Y                $prelabel  = '<strong>&laquo;</strong>';% v+ t( z; ^6 z9 ~5 ~/ v0 F! ?
        }: c4 I1 v3 n  F4 |% \3 w5 h' S
        if(empty($nxtlabel)) {% N0 m' I; x. N& u, X. u
                $nxtlabel = '<strong>&raquo;</strong>';9 H9 k! j) C; _
        }
' @& j9 w: a8 V4 a4 B        $half_pages_to_show = round($pages_to_show/2);
* Z% p5 Z9 k$ H. J* T        if (!is_single()) {0 D' ^1 L# R& d! l" z, j
                if(!is_category()) {
: P# X+ v' m' q& ?. o9 f                        preg_match('#FROM\s(.*)\sORDER BY#siU', $request, $matches);9 ~& u, H0 R6 x1 j8 U9 }" P
                } else {
5 n* F# ?/ b4 I9 X                        preg_match('#FROM\s(.*)\sGROUP BY#siU', $request, $matches);
9 m" z* d& l  [# \                }/ ^! [: Z; c; F9 K& w
                $fromwhere = $matches[1];5 Z$ z7 F9 \% Y0 ?* `6 u- d! _$ {8 o
                $numposts = $wpdb->get_var("SELECT COUNT(DISTINCT ID) FROM $fromwhere");1 W4 U- M  \  ?/ {% \
                $max_page = ceil($numposts /$posts_per_page);
( @& V4 R" M9 t; h; K                if(empty($paged)) {
* v+ d$ y1 d3 U2 h6 i+ u9 o0 {                        $paged = 1;
# o4 s! Z, d# Q6 h3 c+ w                }( a/ @' B  h; Z8 @0 \
                if($max_page > 1 || $always_show) {
+ I5 c8 T+ a" E4 |; O5 E                        echo "$before <div class=\"wp-pagenavi\"><span class=\"pages\">Page $paged of $max_page:</span>";$ K6 R9 W" x( A2 {/ \: m" D7 n6 P3 X
                        if ($paged >= ($pages_to_show-1)) {& H* P) ^$ j. q5 G
                                echo '<a href="'.get_pagenum_link().'">&laquo; First</a>&nbsp;';
; k( X6 r, u% K                        }
& U" F/ ^$ `$ \8 a5 D                        previous_posts_link($prelabel);
& w$ G" o4 k9 a. I. H" H# G                        for($i = $paged - $half_pages_to_show; $i  <= $paged + $half_pages_to_show; $i++) {) d; |+ U( R) V+ o+ r) H" I
                                if ($i >= 1 && $i <= $max_page) {
8 K( I* i' v" a9 o! i7 ^& F                                        if($i == $paged) {
3 E. Z" G* a1 d% Q1 b                                                echo "<strong class='current'>$i</strong>";. c* T% X1 X5 ~. @1 e# |) ^
                                        } else {' r. u4 x6 J2 t1 e# I7 Q
                                                echo ' <a href="'.get_pagenum_link($i).'">'.$i.'</a> ';  E- R" x  e( g) j* [
                                        }
8 p. {* t5 x- k* G  p$ F" n                                }. v. S' ?8 O; e! d3 L
                        }
; }: K* H5 ], J/ `: u7 o) B                        next_posts_link($nxtlabel, $max_page);7 g! J* f* v5 @$ j3 P, Z
                        if (($paged+$half_pages_to_show) < ($max_page)) {
+ s2 f3 C1 Z, J! J. O; e" U                                echo '&nbsp;<a href="'.get_pagenum_link($max_page).'">Last &raquo;</a>';
% O5 Q( z% o$ q8 z7 n2 T$ K3 {                        }1 r4 ^7 m! V% C
                        echo "</div> $after";
' \, Q7 k$ F+ T4 C2 h                }, j3 t+ q  u  U0 k% \
        }+ [1 r1 |0 ]6 o7 X" e3 q  @( Q
}# d8 k/ }, Z+ K# }% U
3 e- u. [: ?4 R/ v: J- m  H. |

1 o+ H; A# {/ Q& v( A8 e////////////////////////////////////////////////////////////////////////////////
5 i# v" B) a$ X4 v% w8 [// Get Recent Comments With Avatar5 ?; Z+ l- V$ T5 U
////////////////////////////////////////////////////////////////////////////////
5 _" l9 s) q9 I" D, X6 Jfunction get_avatar_recent_comment() {
$ M+ x* O2 \1 T" K# J
8 A, G' X' ~9 Vglobal $wpdb;$ H# k5 g( i/ s  c! `/ e
& }8 \. e/ A2 \4 Y" V
$sql = "SELECT DISTINCT ID, post_title, post_password, comment_ID,3 V6 n) e  u9 _% K5 }0 M* p, \
comment_post_ID, comment_author, comment_author_email, comment_date_gmt, comment_approved,
6 B8 Y" k( w, v4 C& z6 y9 Tcomment_type,comment_author_url,0 I5 o# i: i: \
SUBSTRING(comment_content,1,50) AS com_excerpt
0 r% H. h  x: i7 N5 x- XFROM $wpdb->comments. K- d9 P: q( P2 W1 k. A5 ?& v
LEFT OUTER JOIN $wpdb->posts ON ($wpdb->comments.comment_post_ID =
( r9 A( f. f0 D$wpdb->posts.ID)
$ y' R, n0 J8 _/ T! \0 G. FWHERE comment_approved = '1' AND comment_type = '' AND
% o8 g2 y2 I; a6 hpost_password = ''7 `1 j" w! l/ u: ~4 N0 ]4 C8 y
ORDER BY comment_date_gmt DESC LIMIT 5";# O( r) D7 S) r$ B% ?- R
4 Z8 D9 ?% A! _# r0 W  |
$comments = $wpdb->get_results($sql);
5 n4 \3 I  b* x1 u8 ~$output = $pre_HTML;
5 s) w* R0 Z& {$gravatar_status = 'on'; /* off if not using */
* r7 |/ p% w5 b2 d: a, a; b( U
foreach ($comments as $comment) {4 e+ y% l9 d# ?
$email = $comment->comment_author_email;
, l  A8 X% ]( y$ s, t) g( L$grav_name = $comment->comment_author;
0 w6 d& ~2 p, w* k$ h" u1 y# c& C0 s$grav_url = "http://www.gravatar.com/avatar.php?gravatar_id=".md5($email). "&amp;size=32"; ?>
# ~4 Y5 }! J8 \3 Z* x2 X' ^* X<li class="noarrow">9 W  E4 c4 @% V, [' F8 O
<?php if($gravatar_status == 'on') { ?><img src="<?php echo $grav_url; ?>" alt="<?php echo $grav_name; ?>" /><?php } ?>2 G! h) M4 N$ D( ]) P- ]- Y/ Z2 x
<div class="com-info">; s0 I( h/ Y& R  g+ C: X
<span class="comy"><span><?php echo strip_tags($comment->comment_author); ?></span>&nbsp;Says:</span>( q+ h$ v7 v" I( D# \. ]! S
<span class="comtext"><a href="<?php echo get_permalink($comment->ID); ?>#comment-<?php echo $comment->comment_ID; ?>" title="on <?php echo $comment->post_title; ?>">
: u. z' s2 l; P<?php echo strip_tags($comment->com_excerpt); ?>...</a></span>3 v( u" q2 v0 b0 @4 w% l
</div>8 r; m- b$ G9 {0 W; A$ x9 h4 O
<div class="clearfix"></div>, [! t, d+ p9 G; I4 `- L! P
</li>$ M7 A* e2 ^5 ?- W, w8 v  H( F
<?php
9 k* X3 j4 ~2 x' g' A) t}# _( D% i- Q2 u  l+ |6 H( }
}5 c) g$ ~+ g4 q
* O, N: }9 @# y. p# X2 q- d/ q
////////////////////////////////////////////////////////////////////////////////
8 v  N* \' }* f: X) d( U
# h  @# C! b- v. X6 w7 q// Most Comments
9 u' D" [8 {- Z! Z6 L2 r8 O+ {  b" c3 V5 ^; q: C8 y, V
////////////////////////////////////////////////////////////////////////////////- T1 U3 J  G; S) ~. r  J. W
3 U0 V# X6 U% i5 V8 o( {+ U$ N' e
function get_hottopics($limit = 5) {2 k9 T3 D1 N2 t5 ]5 w& k
% F! R7 Z8 z) f# a  q
    global $wpdb, $post;
4 n8 \6 X$ k0 q* `. k7 U
; f& ^# T- m* n7 N    $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");: x/ `! X1 m: E7 t- ]/ [: {
/ D2 J. u8 j/ U- S5 [2 {# D
    foreach ($mostcommenteds as $post) {/ _) S- E! S. ?) ]5 K
% I' E  n/ Q9 ?6 \
                        $post_title = htmlspecialchars(stripslashes($post->post_title));' C: [" V. o+ Z0 `2 c8 k- \9 E3 E
6 i2 T: E% ^; K& d( i6 F  |3 v
                        $comment_total = (int) $post->comment_total;) Z! {3 D5 V, {% O; m) w! S
; F1 q; g/ H, _  ^' b, C
                        echo "<li><a href=\"".get_permalink()."\">$post_title</a><br /><span class=\"total-com\">$comment_total comments received</span></li>";$ V; J6 o0 z; R. u
! a$ \: \! j6 d$ a
    }
) }  M! B% X) p: K9 V8 z) G
3 J+ u" E5 o; y" T}
# j. v. C8 k& |! U( k6 G2 }+ K7 t2 f  H( i- x
////////////////////////////////////////////////////////////////////////////////; @4 y7 o0 c: X: l+ D3 l7 m$ z
// wp 2.7 wp_list_comment filter& G7 F& k+ @( i" A+ [" e
////////////////////////////////////////////////////////////////////////////////# y' B6 c: f: f$ g+ z# _
, @8 G' m1 Z+ s7 N: d
add_filter('comments_template', 'legacy_comments');3 f3 ]6 D: z$ C7 T/ |) s+ D) N
function legacy_comments($file) {
) A  H) {9 X" @) `if(!function_exists('wp_list_comments')) : // WP 2.7-only check
  Y8 p/ \2 {) Z$file = TEMPLATEPATH . '/legacy-comments.php';
( _% E  t6 U1 Mendif;
2 v4 B) V( N  b/ }' T* X! jreturn $file;& Q4 B/ n8 c3 N9 j" R5 P+ y
}1 l" B! k6 u6 T% U
7 b" |& g7 E& }) D2 {) n1 o* _
////////////////////////////////////////////////////////////////////////////////
! B( Z/ G$ s/ y2 q6 d; f* J// Comment And Ping Setup' _/ g* m9 f2 |9 O% E0 C, c4 j
////////////////////////////////////////////////////////////////////////////////
; X* n$ F" b9 i+ t0 T" x; G- U) L, O7 B7 |- [9 L+ ?7 K. q" D/ F
function list_pings($comment, $args, $depth) {
9 i+ Y" T- t6 f) x' {$ f$GLOBALS['comment'] = $comment; ?>- D+ \( w0 e' a
<li id="comment-<?php comment_ID(); ?>"><?php comment_author_link(); ?>0 D  c# u7 C5 z9 X8 \! i
<?php }; d! N4 s9 Q" g6 q$ {! l. |# B
( e. L6 m$ b, B6 F$ ^2 s' Y6 ^! s
if(function_exists('wp_list_comments')) {. }! r+ {) g; T4 h/ Q, E
! d- g% d# H' r1 C
add_filter('get_comments_number', 'comment_count', 0);
9 k/ F, ]: I0 ]' J$ b. _7 ^' f2 i8 k/ `
! X! W# l9 D% w5 s: g- \7 @2 Jfunction comment_count( $count ) {) w. B& j3 x' g# b  S
        global $id;
5 V4 l2 w) z: w  l. M/ b        $comments_by_type = &separate_comments(get_comments('post_id=' . $id));
  ]$ L0 X0 J9 @( w3 a* _9 Q* a        return count($comments_by_type['comment']);
2 t! _" F) o, t- _+ P! l}7 [; }; c8 x2 Y( Q" ?
}0 d* A; t! F1 s+ y3 ]# M8 N

2 E+ Z1 _+ k& P////////////////////////////////////////////////////////////////////////////////
  o5 b5 j# F/ A: N% A& H// Comment and pingback separate controls
8 @" c! X/ R# m! ?  C5 y/ U////////////////////////////////////////////////////////////////////////////////
- W+ G3 a' r* @/ j/ r1 E* [* {5 }( m' O. m- ~
$bm_trackbacks = array();& N- [  e% {' x5 p9 s9 |  `: b
$bm_comments = array();
9 `8 T8 N, {! A0 n3 B1 h
% v) ~1 I! R+ A4 afunction split_comments( $source ) {
2 g' a1 Y5 E  v2 X9 I  w% \
5 Q! u' u) ^% `% Dif ( $source ) foreach ( $source as $comment ) {& ~  t+ @; [$ X* T
6 ^6 R2 J, Q  C( F
global $bm_trackbacks;
/ F' R1 E' d6 Zglobal $bm_comments;
0 g/ o4 i7 `. G
8 u, i' ~. _6 Y" h( W# gif ( $comment->comment_type == 'trackback' || $comment->comment_type == 'pingback' ) {* @  ~' `/ x# H, L
$bm_trackbacks[] = $comment;) f& a+ Y/ g$ `9 O8 S: L
} else {' X/ v0 T) X/ F+ `+ Y& p
$bm_comments[] = $comment;. e, j3 W+ y1 R, t3 Z
}
9 \6 b' `% v" n& d  O0 l" g}- h- E3 _- I; H8 e; u3 A% y- `5 V
}% Y( p$ [. n: D4 q& k
8 j3 p: [& Z' c/ y  Y  \& r* Z$ g/ G
////////////////////////////////////////////////////////////////////////////////, }6 {1 ~  ]6 i+ S' W4 ~' y
// Sidebar Widget
. s) R- [" k8 M3 S# p/ k' g% ~, B////////////////////////////////////////////////////////////////////////////////* o  S# s! ]. s1 ^4 k* N. s

+ B- p% O) v% N: \if ( function_exists('register_sidebar') ) {
, w7 S4 }6 G# d6 u: i        # M+ d" I: ]' w/ L7 s
        register_sidebar(array('name'=>'Sidebar Left',8 g2 i1 v2 i6 X7 z
        'before_widget' => '<li id="%1$s" class="widget %2$s">',/ B) E- J2 @# U
        'after_widget' => '</li>',2 ?6 Y+ x7 b5 m9 V/ i0 x
        'before_title' => '<h6>',4 v$ F' t+ t5 a1 D9 W( [) `! {- X
        'after_title' => '</h6>',( N) ?' P0 A6 r
        ));  \) ~/ }: V; u6 i# L& Y4 w
       
/ r5 Q6 y, D7 T        register_sidebar(array('name'=>'Sidebar Right',9 A$ A& D. p" r* e$ B/ [
        'before_widget' => '<li id="%1$s" class="widget %2$s">',
# y$ A" R; q1 \1 ~        'after_widget' => '</li>',: D1 ~: H. l9 c2 N2 G2 i
        'before_title' => '<h6>',# S) U2 B+ Z+ E) r8 c/ |
        'after_title' => '</h6>',8 C" S  i0 n# Y& ]- U0 [
        ));
2 T1 r& q- |" s* v1 P
! `3 b- v" H8 `3 h}
1 B' }5 C. N* y' x+ N+ [% x& {. @9 j% {  a% [" A3 W% o
////////////////////////////////////////////////////////////////////////////////
1 \3 [( N( w% |" [% t' N// Custom Recent Comments With Gravatar Widget
2 D- D4 L: A, F' b/ l. T////////////////////////////////////////////////////////////////////////////////8 e) `' X2 g, Z( }
; G2 B# U7 M. O7 m/ F, _
function widget_mytheme_myrecentcoms() { ?>
8 X# i# e2 W, u# P1 s" ]0 Q$ u<li class="widget_recentcomments_gravatar">, Y& ^6 ?0 ]/ y% w% G
<h6><?php _e('Recent Comments'); ?></h6>+ L6 @/ l$ B$ l0 v+ ^2 j
<ul>
, @. W7 s1 I" w<?php if(function_exists("get_avatar_recent_comment")) : ?>
* ]( L# q4 p5 X3 p' ~0 C' l# K! {" T0 N& V) _
<?php get_avatar_recent_comment(); ?>
8 H) ~* m9 b; j# `! U8 \7 p1 x! u9 c
<?php else : ?>% S9 d% y$ ?: Y+ b: P/ M

: D1 x8 i' |- N3 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 E9 [/ ^( _2 e8 j9 P

1 q1 a+ t+ ^3 J2 `3 b. ~<?php endif; ?>, Y" `8 N0 H0 {8 S. X# ^
</ul>( b6 K! R8 V6 A0 A8 F- }1 k9 Z
</li>) [3 U, u4 Y! t4 Z+ N2 O, |

1 B5 E$ M5 o7 c8 D9 L6 `& N<?php }
9 f4 |0 B- Z8 r6 L
; T! k8 @0 P0 v+ fif ( function_exists('register_sidebar_widget') )8 E+ O" |% U5 Q. d7 `0 R9 P9 D8 E; ~9 y

- E- ?! @, L$ c0 z, Q6 l1 w! z    register_sidebar_widget(__('Recent Comments(Gravatar)'), 'widget_mytheme_myrecentcoms');2 A% \7 N7 E  l5 d$ X# w& G

5 ~, ]8 Q) ]$ v  B4 E9 r/ T" a, y" ^4 o5 Y' q& Q1 u+ C5 f* N$ X
////////////////////////////////////////////////////////////////////////////////
( W; t8 c. J8 v0 E0 q// Custom Hot Topics Widget" C& U% Y* F% A, Y, e
////////////////////////////////////////////////////////////////////////////////- o* ~6 {, C; m1 y% Z
& M0 W/ N7 S. z5 Y  }
function widget_mytheme_myhottopic() { ?>7 O0 u# G4 m# E5 E$ Z2 ]

& u" M5 @( Y4 W7 \<?php if(function_exists("get_hottopics")) : ?>
7 _9 \8 [0 F4 c! I, w<li class="widget_hottopics">. l& D" a: Q) ]) c: d
<h6><?php _e('Hot Topics'); ?></h6>( m7 q- V0 A1 D+ r9 _+ }5 y* L5 I
        <ul>* a5 Q; }2 X2 W" e: _) ]5 M6 l
                <?php get_hottopics(); ?>
$ x# w  j9 i+ P        </ul>
7 O5 y, ]4 w/ ]7 \$ l: _- t</li>4 I5 ~  [) U  }' ]. T+ H- V2 q+ x
<?php endif; ?>3 v3 t; c& ]% B" j2 _- e

, }5 D, h* o/ Y<?php }& R5 K3 ]0 N7 @. W0 `% Y

4 j- F2 m: i6 v5 xif ( function_exists('register_sidebar_widget') )
' l, q! P. k" B- M( B' l+ I9 v  v* N4 J+ m; q$ z( W5 O  X- E; Z  m) }
    register_sidebar_widget(__('Hot Topics'), 'widget_mytheme_myhottopic');/ q7 M; e$ u7 p

4 e$ t* M$ P7 s2 P
7 S( l3 o! p# k4 [: P& n4 n
相关帖子
回复

使用道具 举报

7

主题

111

广告币

252

积分

初级会员

Rank: 2

积分
252
 楼主| 发表于 2013-1-17 17:37:25 | 显示全部楼层
////////////////////////////////////////////////////////////////////////////////  D) P8 _5 k, w; f7 }$ ]5 B4 e
// Theme Option
4 t/ ], D, ], N( q7 a( |+ u////////////////////////////////////////////////////////////////////////////////0 {7 g- E! o  J, U
! u2 ~) i- H1 K9 O" ?7 p  D
$themename = "Zenx";# O. n: P  p" r4 d# p* j
$shortname = str_replace(' ', '_', strtolower($themename));' H1 S% V8 C9 U; J/ P7 C
  @. L- B, f6 u
function get_theme_option($option)
* c; h4 c1 |5 U2 W$ \) f, t{9 K% @9 G  U, C4 |$ y0 }) @
        global $shortname;' j: s! K7 r2 u  `/ ~& i
        return stripslashes(get_option($shortname . '_' . $option));
, S* p, F2 \5 w5 ]}2 r% e; q0 U' a% h3 I
. B7 V# M, E' q  `3 o6 p1 F) Y# q
function get_theme_settings($option)3 R. |% c! S" ]( a( Z; t. O
{
( H. M; c5 U& ]4 I- U' g        return stripslashes(get_option($option));
* o& e2 M6 Z% j: d. l}
  t: y6 w$ q, w* K: a% I$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");
  d9 v& o! ?4 |3 D* I3 {4 p$wp_getcat = array();+ I5 L% u# y/ v5 r  ]" b
foreach ($wp_dropdown_rd_admin as $category_list) {
8 {( d. `$ G& V6 Q% u; i! M4 d$wp_getcat[$category_list->term_id] = $category_list->name;
. A! ^4 X; P, L, N+ U$ A, k7 U- G# F}
2 V* n2 U) N% c' ~% j" w0 c* I7 i$category_bulk_list = array_unshift($wp_getcat, "Choose a category:");4 v0 o# v  ]* X- m* k& E
$number_entries = array("Number of post:","1","2","3","4","5","6","7","8","9","10");
0 T7 J1 u) V: E$crop_position = array("Choose Crop Position","middle","middleleft","middleright","topcenter","topleft","topright","bottomcenter","bottomleft","bottomright");, d# l& l! @9 ]$ ~/ q: |  |
9 |6 g4 v6 a: ?1 R) w0 _
$options = array (! n; m# d! x% E+ w$ [

8 ?7 t, \0 \; |6 ]- `2 m* N
* m* Y0 G% J: l+ |  o( r, X    array(        "name" => "Blog Header Settings",
) W' }6 J6 A! L+ o) {7 g4 U            "type" => "heading",
/ _' k* v2 r6 v; h6 R- M            ),( I8 o: C- g, X4 n
5 D$ Z' @/ ~  _/ h
                        array(        "name" => "Use Custom Logo On The Blog Header?<br /><em>*Disable by default, Choose Yes to enable it.</em>",
8 n& u  @2 q- y+ d/ L. L9 t                        "id" => $shortname."_header_logo_activate",
  W4 z4 S/ z9 p8 ]4 `            "type" => "select",
* [+ T8 P! i8 q            "std" => "No",7 F+ f3 m! q+ V# z; W
                        "options" => array("No", "Yes")),
' Z1 \& s4 V1 S4 E( U4 A! J- D3 s+ t1 G, i1 [
                        array(        "name" => "Insert The Full URL Location Of Your Logo Here <br /><em>*leave blank if not use</em>",1 g% U) }: P; d7 N
                        "id" => $shortname."_logo_url",
" X% R+ D. m$ h: t0 x; D# [            "type" => "text",, J$ H2 p, g1 w$ ^" x# h
            "box" => "social",
% R3 {3 ~% i! G            "std" => "",& X& i2 p' Z$ r! W1 |
            ),2 R, N% |6 X" Z4 }
                        ' j9 u  A, \2 P( h) ]
                   array(        "name" => "Insert Header Banner HTML Code (Header)
+ X" v  ?4 A! D                        <br /><em>*Recommended Size 468 x 60</em>
7 g9 ?8 c! P3 v* A2 {1 y4 k- H                        <br /><em>*leave blank if not use</em>",
& s  G! Q+ e6 x4 U                        "id" => $shortname."_header_banner",: u$ ?! ]9 R5 K3 `+ u% F8 x
            "type" => "textarea",' P( D  L+ O+ H5 M9 n/ [
            "std" => "",
( Y$ p9 B& Z( j* X            ),4 m5 D, c. u# m1 O7 t! j
. T" s  D& ?4 p3 R
                        array(        "name" => "</div></div>",
& _6 ^( y( d7 A1 h3 q1 }" y            "type" => "close",2 N9 D# D* f- K$ {$ r) M& X) X
            ),  z1 Q4 k6 H5 w& G" j
7 }. f$ \6 s8 {$ m
. P6 q" w4 _: p: C* Z
    array(        "name" => "Header Navigation Settings",( d7 X9 d- M) H: _. R! Y
            "type" => "heading",
$ O8 F& Y# F' F% Q            ),& r- |0 }7 a. K, y6 U
7 B* v" h2 L, K' O' E
                        array(        "name" => "Insert Page ID To Exclude On Header Navigation<br />
2 a5 U+ D/ S  h/ S: L                        <em>i.e ../wp-admin/page.php?action=edit&post=<span class=\"redbold\">123</span></em><br />7 q5 L- o3 O$ e+ T
                        <em>*Enter the page post ID number only</em><br /># i6 l  P+ h! i- d/ y9 J- a
                        <em>*separate by comma</em><br />& F7 @0 E) A4 N& Q- ]+ z* T
                        <em>*Exclude pages which you don't want to show on the header navigation</em>",
+ |. w! o# Z. U5 |; u                        "id" => $shortname."_header_page_navigation",
, F0 i# j# k' H            "type" => "text",
- f  a, t0 Q0 P            "std" => "",6 e  f4 c7 o. w$ O( I# W
            ),
: n: u1 L- w" ^! j& D0 P9 t' F- ~7 o( j; l9 x
                        array(        "name" => "</div></div>",4 h- `& V+ ~, L. G3 I; [* Q
            "type" => "close",/ J* Y( t4 T: D0 d
            ),
: O+ |: j* D( B9 R; }9 ?, f5 j                       
8 J) N4 y- m& d/ v: C0 b1 }9 z2 W1 E/ I* h, R) E- \  G$ S1 b. F
    array(        "name" => "Post Auto Thumbnails Settings",
6 s  w: o" @- F/ d            "type" => "heading",
+ A; N1 u4 `$ O& V            ),
/ T# t- N: t) y5 N) F: L0 ]- `                        0 p7 n8 T/ l. R- I; W3 T+ i  s
                        array(        "name" => "Use <strong>Timthumb Script</strong> For Auto Thumbnails?<br /><em>*Disable by default, Choose Yes to enable it.</em>",
/ v9 A9 l) [+ T                        "id" => $shortname."_timthumb_activate",$ k: Q- n% o$ G8 S. ^7 W
            "type" => "select",  @/ i' g7 h' A" {
            "std" => "No",
- m( m8 I  M& ]( v# a5 p                        "options" => array("No", "Yes")),$ O# J' b; b+ n' D& M: i; T& m, r6 Y
                       
( R9 c  A1 H4 H/ C" w                        array(        "name" => "If Timthumb is enabled, Please choose its cropping method",
$ h% x( b  J$ ]1 m                        "id" => $shortname."_timthumb_cropping",
" U: P( Y+ O9 a! Z+ ~  ^+ Y            "type" => "select",+ k& i3 ~4 E0 l0 t
            "std" => "",) r7 e5 h& A8 V( w
                        "options" => $crop_position),
, d9 ]3 `7 o9 e7 P6 Z7 ~
2 p4 v0 E2 V- }0 L                        array(        "name" => "Insert Width Of Thumbnail Image<br />
$ X8 i4 L3 Q+ A, A                        <em>i.e. <span class=\"redbold\">88, 100, 150, etc</span></em><br />
, V( A- Y, V6 I  G; @  {0 g5 t                        <em>*Leave Blank To Use Default: 250</em><br />",
9 s, M! `( r1 v5 x$ [, G# ]                        "id" => $shortname."_thumb_width",: N, a7 Y1 c5 T+ C  c" }
            "type" => "text",
/ O9 Y! b( T2 T3 l0 e0 N            "std" => "",  X0 X; ^0 J; u/ P
            ),
; m; S$ }- @, F4 U! C0 a5 }9 L! K3 \% c+ l6 v( p+ R+ K# d3 X
                        array(        "name" => "Insert Height Of Thumbnail Image<br />
: H% z5 u, U7 h$ ^9 L* V                        <em>i.e. <span class=\"redbold\">88, 100, 150, etc</span></em><br />
& t0 N: A$ _8 ~5 J  i                        <em>*Leave Blank To Use Default: 200</em><br />",
; F. c0 c. ]* ^& a1 }                        "id" => $shortname."_thumb_height",
) s# A5 M% F3 S. y/ q            "type" => "text",' v6 R. R) F3 q! ]
            "std" => "",+ q6 h- V7 e$ h4 T* B$ A0 h
            ),, k' s8 b. [4 g) j2 Q9 Q2 b6 R3 p

- Z' k6 Q' C  F/ e- w                        array(        "name" => "</div></div>",- Q1 g& W0 g% l
            "type" => "close",
+ b8 B# M+ P7 Q7 f            ),
0 U. y5 V0 t! ^
: Z2 c; K. y0 @; y8 h/ d  array(        "name" => "Featured Content Slider Settings",
2 K6 Z% v1 k; v5 l$ ?1 E0 F            "type" => "heading",+ q9 s" F5 p8 ~( f' v) v2 U
            ),/ `7 q( [' h4 p) v
/ j8 c/ L8 I5 K2 c
                        array(        "name" => "Enable <strong>Featured Content Slider</strong> On Homepage?<br /><em>*Disable by default, Choose Yes to enable it.</em>",% ?2 R$ \0 }! ^3 [2 K' p+ ?7 K
                        "id" => $shortname."_featured_activate",& D: _6 _1 t& e0 ~- r' C( S
            "type" => "select",$ j7 P3 K) t* D3 U7 ^
            "std" => "No",
' i  D# i* c2 P8 u! w  q3 y  M. M                        "options" => array("No", "Yes")),
6 Z/ X+ I& s* l  X2 U
. w; J4 p. f$ T1 [4 U5 U, y  c3 i1 I. {6 q% R. @
                        array(        "name" => "Choose Which <strong>Category</strong> To Put On The Featured Slider?",
1 ~8 f. U6 v: q% L, h                        "id" => $shortname."_featured_category",+ [' `' n( Q- _5 R; x
            "type" => "select",' ~0 B: y4 B, i) M
            "std" => "Choose a category:",
2 ^) n4 ?/ ?3 c+ y& s7 [                        "options" => $wp_getcat),) Y2 {  J; }( u' \) U. t, q

, M6 s0 \3 e9 L                        array(        "name" => "Choose How Many <strong>Post</strong> To Show On The Featured Slider?",
% F# z2 u! p. n0 z, N% F                        "id" => $shortname."_featured_number",! }7 s/ x' S5 \& G
            "type" => "select",
' ?* k- ~# R: J0 B5 V            "std" => "Number of post:",2 d; x* r. [: q3 G) H9 \
                        "options" => $number_entries),6 N; k5 d* t1 i. e# G

7 Z% ~0 a4 \7 x                        array(        "name" => "</div></div>",
) u# x4 r# Z! P" @' d$ \5 T2 y, @% X5 K            "type" => "close",
0 c0 @# U' Y2 F6 a            ),
: f7 g. e3 x+ T- T; `                        " f8 e; H3 u2 N$ X/ Y% J
   array(        "name" => "Featured Category Settings",1 O8 L7 e$ z5 i0 X
            "type" => "heading",# _$ M2 s& l( Z8 l5 E. l0 \
            ),
( W& p: V* w" ~# o. ]
# X2 I4 O- H$ ?9 l' V" A* p8 V3 @                        array(        "name" => "Enable <strong>Featured Category Showcase On Sidebar</strong>?<br /><em>*Disable by default, Choose Yes to enable it.</em>",0 p* g* W1 Z- A, ?9 M) `
                        "id" => $shortname."_featured_category_activate",
0 l1 _6 s# G2 \            "type" => "select",& E9 ]& q1 \) V3 ^+ x: g  b
            "std" => "No",) k* s) f: M, D) i  c6 Y
                        "options" => array("No", "Yes")),) P! e& Q. _2 G+ D/ o' `
                       
" T& B( t/ I& t/ T* ^                        array(        "name" => "Choose Category To Feature On 1st Block?<br /><em>*Leave it as default if not use.</em>"," [6 R: _2 h6 k8 U
                        "id" => $shortname."_featured_category_id1",
1 s9 C9 z2 Q3 C; b5 M  z( x* \            "type" => "select",2 i9 ?" P, m/ C* q
            "std" => "Choose a category:",  h6 h; y8 ]4 M
                        "options" => $wp_getcat),
( |0 ?* K% U2 p" q                        & K6 M8 k8 @2 V, \% S4 n8 r5 T
                        array(        "name" => "Choose How Many <strong>Post</strong> To Display On 1st Block?<br /><em>*Leave it as default if not use.</em>",
0 H4 G& k, t, W/ j& `                        "id" => $shortname."_featured_number1",0 m6 G/ N+ g0 @8 j9 t7 Q# Z4 s4 [% i
            "type" => "select",  r3 D7 C  i8 p9 }
            "std" => "Number of post:",$ L% X7 O2 |& \9 v; F5 J
                        "options" => $number_entries),6 p8 E5 F, S5 ]! |
                       
+ e6 T; d- L! a4 e                        array(        "name" => "Choose Category To Feature On 2nd Block?<br /><em>*Leave it as default if not use.</em>",1 l; _, [( Y# @
                        "id" => $shortname."_featured_category_id2",7 m1 d5 ]; n# J0 W- n% F4 M
            "type" => "select",6 @) W5 M4 E& e& O9 T& l
            "std" => "Choose a category:",
9 H- Q# y. P5 t9 Q1 F  l: m                        "options" => $wp_getcat),& J+ Z5 ?/ y# f9 J# ?" b* h
        * p$ _6 s  I9 q. o9 K6 V! b: I
                        array(        "name" => "Choose How Many <strong>Post</strong> To Display On 2nd Block?<br /><em>*Leave it as default if not use.</em>",2 r9 P$ a5 a' r* W0 F% k. L' k# n  c
                        "id" => $shortname."_featured_number2",
, {8 _3 `0 H' l0 c            "type" => "select",: Z' v! U- h" R0 K' _( V+ E. }
            "std" => "Number of post:",; H7 t- q. x2 v" n: x+ K. T' D/ q
                        "options" => $number_entries),
+ s# {' E: ]& ^4 @/ L                        " A2 E+ ~5 U/ S9 }- u  [
                       
+ }2 A$ B5 `& j1 N9 W                        array(        "name" => "Choose Category To Feature On 3rd Block?<br /><em>*Leave it as default if not use.</em>",
3 ?4 n6 u: C7 T3 K7 P                        "id" => $shortname."_featured_category_id3",
: j0 \( i$ Y! V* O. j4 S; B# J            "type" => "select",
* Q) Z0 n2 o& x8 Y0 B" E. h: H' N            "std" => "Choose a category:",
: g! v" t. [: }. R: |- {, g; b1 ^                        "options" => $wp_getcat),; Z9 n" T7 ?& m6 N  h: S3 W) s/ [
        1 Q  x2 Z8 A2 J  a# v' [* R; A
                        array(        "name" => "Choose How Many <strong>Post</strong> To Display On 3rd Block?<br /><em>*Leave it as default if not use.</em>",& j. n4 e  v2 H, Y+ H$ _
                        "id" => $shortname."_featured_number3"," ?  U  B/ y# m: C3 r
            "type" => "select",9 z* p( v" d; T: l. D9 h6 m
            "std" => "Number of post:",
; M/ w* s; q3 A* t7 h                        "options" => $number_entries),* ?- \% V% U8 v& D
/ Z+ O6 u) x6 b, b/ y+ A) ^
/ c/ T! M+ W8 x6 T, y% d
                        array(        "name" => "</div></div>",
3 j8 v* y6 ]: H& N" c            "type" => "close",
: J/ k0 H2 z2 e3 }( f4 Q" h8 c            ),/ J, p' p! n5 M( L9 S$ [9 k
) k: k3 l( [  w; a

' R( d1 V4 c" k1 S    array(        "name" => "Google Adsense & Analytics Settings",: g, r( Y3 Q) c/ t1 ?3 Y# p8 W
            "type" => "heading",
7 r7 `  c' v" }0 d            ),5 v9 K  Q, s+ j" C7 o- Q$ T& B( r7 U  u& P

9 p+ x4 A' Z, f$ y0 N" z                    array(        "name" => "Enable Google Adsense Loops Within Posts<br /><em>*default are disable, you can activate it by choosing enable</em>",
; H( e# _9 Y3 C: n; L- D0 |/ _                        "id" => $shortname."_adsense_loop_activate",
5 t4 R6 g. S, A4 O8 K1 Y) G            "type" => "select",. j, v' Q% q; @
            "std" => "Disable",2 _2 j  U) }8 [0 T' S
                        "options" => array("Disable", "Enable")),& |' F+ b( y: J

0 s1 c! D: |( W2 u* f                        array(        "name" => "Insert Google Adsense Code For Loops Here<br />* q) n( N/ i: o, Z$ e; x8 V2 Y8 s
                        <em>*Copy &amp; Paste Your Google Code Or Affiliate Network Banner Code Here</em>",5 X4 F3 l( M# j, L3 Z8 L
                        "id" => $shortname."_adsense_loop",
* k- ?5 ~$ B' b+ x2 g( w/ f            "type" => "textarea",
, B0 F& R6 t8 t* p. S1 m0 E. C            "std" => "",' n0 W, o9 G/ ^* p% p. @
            ),
2 d" o2 a' k) c; B: [) w' b, J: G6 a" H
                           array(        "name" => "Enable Google Adsense On Single Page<br /><em>*default are disable, you can activate it by choosing enable</em>",9 m" T1 Z  f% N  v/ D, p
                        "id" => $shortname."_adsense_single_activate",# G% b1 D& D  D% j5 g, a
            "type" => "select",: x$ A, }/ a% Z) S' G! U' J
            "std" => "Disable",
2 t% e/ _3 P$ U: \  @                        "options" => array("Disable", "Enable")),
( K# Z; h$ P  l; A
1 z) i( o+ \" f2 `' Q                        array(        "name" => "Insert Google Adsense Code For Single Page Here<br />4 B( s) f9 H& }7 S5 L
                        <em>*Copy &amp; Paste Your Google Code Or Affiliate Network Banner Code Here</em>",4 T+ X% @( Q! ^0 ~* {  H0 ?) ?0 K
                        "id" => $shortname."_adsense_single",. \2 J5 y2 X7 ^
            "type" => "textarea",; s1 ^  G& G; Z  i% f2 O
            "std" => "",
8 z  i, ?8 g4 |) N4 ?& ?$ I            ),
! V: _: v9 l1 I3 e* _6 c) Z
+ ~/ F7 @! v% d. k9 M6 }5 U( w+ o$ e2 D1 A2 H  U9 V: k# r3 f
                    array(        "name" => "Insert Google Analytics code <br /><em>*optional - leave it blank if not using</em>",: ~# U, e0 f# Q+ u5 V5 F( S7 e) z
                        "id" => $shortname."_google_analytics",- L7 o$ Z4 V5 y4 K* `
            "type" => "textarea",
2 F- j) f0 t9 W" p6 O            "std" => "",3 c* V  ^+ Y( ^0 A, |
            ),$ p, p) f, o; _/ [- F6 h1 b; _5 V
; C: E) y- z  I9 p- ~
                     array(        "name" => "</div></div>",
9 z5 [* p5 P1 M' Z# Y            "type" => "close",
$ f- G+ [9 @8 Y            ),
. m, p( g$ k; F+ M+ A' Y$ J                       
$ ?2 e& e! U3 J7 V# F                       
0 \- F, v1 d! q9 t& |& W+ G    array(         "name" => "AddThis Social Bookmarking Settings",, p; ~$ A$ W" R
                        "type" => "heading",
' y2 w7 f' p% R9 j9 Z                        ),
3 G6 o  u: f) R: w/ G
" j4 P" N6 @& c1 s) G8 C2 P                        array(        "name" => "Insert you AddThis ID here (Only For Tracking Purpose) <br /><em>*leave blank if not necessary</em>4 F% ^- w0 Z  d2 Y2 j- _9 A
                        <br /><em>*Get a Free AddThis ID <a href=\"http://www.addthis.com\" target=\"_blank\">here</a> if you don't have one</em>",
) p/ N" I7 [8 U                        "id" => $shortname."_addthis",
& m( L+ S' F% z1 S6 n% o            "type" => "text",# P3 g% `6 B0 `& i$ b
            "box" => "social",7 `$ K; U; g, m7 [; e2 E
            "std" => "",' I# ^# s- T4 h! v' E
            ),
1 l6 ~+ i  q9 T/ D
% L/ I3 l9 M+ [$ S% b) z                        array(        "name" => "</div></div>",
1 ^3 ~$ g$ B  n            "type" => "close",! j6 p" A+ O. `! q$ w& m
            ),  x2 b( l2 z4 C+ f4 |
                        / E& B! C4 m$ w; Y! {" f  E1 B6 |
                       
/ q2 }% h# f4 r+ J9 {: w                       
& z- x: G/ k2 i* p" @) P2 n5 \( V    array(         "name" => "YouTube Video Settings",* s: s5 ]3 B2 @
                        "type" => "heading",
$ V6 [/ u3 S& E. P4 i/ A                        ),
# q! H( B9 u4 @% {+ k9 e
, Y6 n) D% G4 \2 ~                        array(        "name" => "Enable <strong>YouTube Video</strong> On Sidebar?<br /><em>*Disable by default, Choose Yes to enable it.</em>",1 h6 w* _: u8 [0 I! J% J+ H0 [
                        "id" => $shortname."_emvideo_activate",+ N  I5 N6 K- A' ^  \! l
            "type" => "select",8 d5 ?8 \" }0 ~7 v% I
            "std" => "No",+ {* H, P5 v+ S* P% u
                        "options" => array("No", "Yes")),1 ^- m* b  c1 k' P2 ~

/ Q5 L6 A9 h" [6 K  O% V  @! [                         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>",- I, \, E8 W2 G: a
                "id" => $shortname."_emvideo",9 @+ i- B5 [) j" k0 w0 y
                "std" => "",
/ L  Z6 z0 o; m: j0 b                "type" => "text"),
* i( P5 _) h- z$ F3 v4 c
# R- e) _1 c; J4 g! k/ p                        array(        "name" => "</div></div>",
. k9 D1 w- b5 R4 |* q- I' e            "type" => "close",
1 Z1 g  c. Q  z# g4 V0 R            ),
) o$ O" S! K4 x+ B& L' s5 S2 w                        7 y- o* J% v' |* C' v
    array(         "name" => "Twitter Settings",
. i' Q, ]* {6 |5 {8 L                        "type" => "heading",- O, P5 Q9 f" G) ~: I6 j
                        ),* @* L8 P5 Y9 ~, I$ _6 J
! N  ~2 e5 j1 u( X6 g2 e& P% V
                        array(        "name" => "Enable <strong>Twitter</strong> On Sidebar?<br /><em>*Disable by default, Choose Yes to enable it.</em>",) k0 x' R5 L6 U9 l
                        "id" => $shortname."_twitter_activate",
7 k1 K- h$ A: [3 B% F            "type" => "select",7 @" {2 r1 `6 L7 Y
            "std" => "No",7 r5 d3 h- b+ t! {8 S
                        "options" => array("No", "Yes")),! j# X2 {) f+ U
# `0 o9 T* l( x$ y) R3 M' G
                        array(        "name" => "Insert Your Twitter ID here
4 h4 m5 l0 b$ A4 s                        <br /><em>*leave blank if not necessary</em>/ y- O( z) _6 P6 P" p' L/ z! e8 R
                        <br /><em>*Register Twitter for free <a href=\"http://www.twitter.com\" target=\"_blank\">here</a> if you don't have one</em>",4 n+ a) L; e, u, w4 ]
                        "id" => $shortname."_twitter",
7 w$ {: |9 `6 t: a+ X            "type" => "text",
9 H0 A  p$ W, O# ?" V6 d5 T            "box" => "social",
0 I, [$ _5 a+ ?7 O1 B- _/ w            "std" => "",' q/ l! l* T5 s# H
            ),
1 w* m/ Y) ]5 \$ W4 Q0 @8 @3 l' A- s& {
                        array(        "name" => "Enter Twitter Feed Count here
. Y- r( j; Y2 v0 x                        <br /><em>*leave blank if not necessary</em>
0 }3 l7 e1 y4 s  I0 ?                        <br /><em>*Enter How Many Twitter Feed To Display</em>",7 n1 G+ s: M  K
                        "id" => $shortname."_twitter_count",& S3 R/ {+ U% v' l' i
            "type" => "text"," q8 B0 M; C( M6 ?
            "box" => "social",  w9 x7 u. d! q+ {+ H
            "std" => "",
( [' z9 V3 V% |            ),
' D1 G" S6 {" j& A0 n# `) G! ?. P2 x& X" o/ z( M/ Y
                        array(        "name" => "</div></div>",
  k6 |7 E& P( o5 P/ i. ?, J            "type" => "close",
; e" I3 ~+ e( R; T# |$ }9 }            ),
0 v/ g% `$ X5 P1 |+ i& y                        $ N$ F; X; w3 D" ]/ G+ z
% `' g/ E/ M* s# [) Z
        array(        "name" => "125 x 125 Banners Advertisement Settings",( ^$ n3 k0 A& y8 j: a
            "type" => "heading",
2 @8 t$ K2 L5 ^4 Q            ),
5 f6 R, Q2 K2 B- i8 V" {$ b                       
7 {5 I( L1 K0 w9 B" k+ I+ H                        array(        "name" => "Enable <strong>125 x 125 Banners</strong> On Sidebar?<br /><em>*Disable by default, Choose Yes to enable it.</em>",
1 v4 Q4 d4 Y5 u0 B$ G0 O7 T                        "id" => $shortname."_sponsor_activate",5 Q: a6 l6 _# h* u" e
            "type" => "select",8 y* j' H# Z" ]9 E9 R& w0 i! D
            "std" => "No",! g7 a7 ~6 y* P- i0 l. J0 J1 f" G
                        "options" => array("No", "Yes")),3 u: X9 v  ~( F+ K) L& K
                               
4 g) y1 R- L. n" v/ _, }
# a& @6 w( H. l1 A                        array(        "name" => "Insert Sponsor Banner One HTML Code<br /><em>*leave blank if not use</em>",: Q2 G" |8 y/ T: s, i( v
                        "id" => $shortname."_sponsor_banner_one",3 _9 @- @8 C+ n) F& c) E# |& @
            "type" => "textarea",
$ p# Y1 c: y4 J% b: W            "std" => "",
4 ^6 @1 t* j' s, c6 g" [            ),
+ W3 B+ b+ }( T' m; @4 n' ]# h; x& F% O1 Y6 B! t5 G
                        array(        "name" => "Insert Sponsor Banner Two HTML Code<br /><em>*leave blank if not use</em>",
- V( ~2 s) b1 u# s9 ~: }                        "id" => $shortname."_sponsor_banner_two",9 u0 p/ D# O3 ~: O; y& w7 f: O) _
            "type" => "textarea",
9 E1 I3 N7 a! E  x            "std" => "",5 m/ Z# x. q$ @( {! B
            )," n# O4 U" E( j, ?5 T
3 m' _5 |# e) X2 b! g) b$ M" r
                        array(        "name" => "Insert Sponsor Banner Three HTML Code<br /><em>*leave blank if not use</em>",
$ `+ Y8 E& d& \) A/ |                        "id" => $shortname."_sponsor_banner_three",) z( M& R, |* X7 @1 K
            "type" => "textarea",
3 }1 S0 |$ X9 b* |/ n2 g$ w            "std" => "",
5 L2 e( s! x) K$ g5 E            ),
" D% r; r: r2 C$ r4 W3 y6 n
# Z" h4 n5 p6 i/ z                        array(        "name" => "Insert Sponsor Banner Four HTML Code<br /><em>*leave blank if not use</em>",
6 x% ]8 R+ a; F1 `; I                        "id" => $shortname."_sponsor_banner_four",3 F% [) K6 j- y# Z% y6 Y
            "type" => "textarea",
  L9 s0 D  B, l3 E- d9 n$ Y- ?7 F. ~            "std" => "",+ W& N) u3 j2 g% i  z
            ),. O! Z$ ?* Z6 f4 {4 L: @' V5 U, ?

5 a: B7 s  `" i1 k* d                        array(        "name" => "Insert Sponsor Banner Five HTML Code<br /><em>*leave blank if not use</em>",& ~: X, E) s- H$ O
                        "id" => $shortname."_sponsor_banner_five",
( l/ a8 I! S6 X. [# i( @            "type" => "textarea",
+ @- L+ e: H/ a2 L& l7 p            "std" => "",
/ r; |1 ~5 @  h9 y$ S            ),+ h3 w3 Z! h: Q& {
! Q' e. o( n: v, A6 Y
                        array(        "name" => "Insert Sponsor Banner Six HTML Code<br /><em>*leave blank if not use</em>",
) D. [8 n6 p& H& a! v                        "id" => $shortname."_sponsor_banner_six",. v2 {: i  ]( ^
            "type" => "textarea",% ^! c9 Y) H# m; W% u0 n
            "std" => "",) p8 P% D! h5 {+ d# r- j
            ),
7 X- L( V7 _9 w: a: Q
2 k$ I& i8 b- P. S9 R! r- f+ Y                        array(        "name" => "</div></div>",: X+ Z, g5 Z4 v, E/ E
            "type" => "close",1 y' I3 o7 h& w- E1 m, p3 m, E% N
            ),
7 }. I+ h1 Y1 `0 n8 r! \. V. ?3 {5 V  X9 R
) ^, A! R. \) P) f" m
; R& k7 C. N" `+ B
);
3 y; B  W3 z' J! m" [8 t/ k
2 [! n8 L, \% bfunction mytheme_admin_panel(){ if ((function_exists("check_theme_footer") || function_exists("check_theme_header"))) {
( d' B1 `& U4 |: r& r0 M: |
! N4 d4 {8 Q( Recho "<div id=\"admin-options\"> ";
# p- Q/ c& a' f1 C
. \0 G- L, n; {/ q* z2 kglobal $themename, $shortname, $options;) e3 x, @) E" e0 G
if ( $_REQUEST['saved'] ) echo '<div id="update-option" class="updated fade"><strong>'.$themename.' settings saved.</strong></div>';  ?( K+ ^  T$ e  n8 p. F% H! E( q
if ( $_REQUEST['reset'] ) echo '<div id="update-option" class="updated fade"><strong>'.$themename.' settings reset.</strong></div>';. }$ `3 W) D$ ?4 K0 _) d8 O
?>
- t: t+ D3 F8 t$ Z+ ^
" d$ V; f$ p7 e' H<h4><?php echo "$themename"; ?> Theme Options</h4>, r/ V2 m+ b1 P$ Z
3 F  T4 x0 |5 h/ `
<div class="annouce">9 b& v" O) V+ {: M
<h1>Thank You Using Our <?php echo "$themename"; ?> WordPress Theme</h1>
+ g3 V: \) W, ?* |<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>. k4 v' ?  H2 B$ C' w
</div>
" `) _7 p% h+ Y  x, l% Z6 g0 w4 y7 [4 T5 _
<form action="" method="post">% D* b" G4 r/ i
* `9 ^/ U. K' n9 l$ h+ Z* `
<?php foreach ($options as $value) { ?>
% ^- k$ Y( q6 l: X4 {; ~* i. O) F5 N
<?php switch ( $value['type'] ) { case 'heading': ?>  D& O; I$ L' ?- y

: u7 h+ e" \, R9 c" A' G! D<div class="get-option">
) k' f6 J$ S5 O2 a" F2 d' x% F' n+ a; m8 F$ Q" c! X
<h2><?php echo $value['name']; ?></h2>+ e3 x' Q5 f4 w6 r" n+ Q7 f3 b

4 Z+ q5 p4 S) C! g9 N0 b0 M% Y5 u<div class="option-save">5 P; `$ Q* ~$ Z% C6 s! n0 ^. O

2 M6 N$ Y) W; R* h/ y8 ~8 V7 J<?php0 R5 E2 N% |& F, l5 U' \0 p
break;! @' P: r" e" R7 \0 F' _$ D" {
case 'text':
" G4 O8 |0 \. g1 d+ S?>
1 L- x' h* a- m" e
) M8 s9 ~" N) D  P0 Y. u<div class="description"><?php echo $value['name']; ?></div>3 R9 ~/ N0 n# \! w3 R) w8 v
<p><input name="<?php echo $value['id']; ?>" class="myfield" id="<?php echo $value['id']; ?>" type="<?php echo $value['type']; ?>" value="<?php if (
) F; J& Y* f9 R) F0 a. Z, ~6 q2 g+ [- \* f3 N4 `9 x
get_settings( $value['id'] ) != "") { echo get_settings( $value['id'] ); } else { echo $value['std']; } ?>" /></p>
3 W, [! `. X- H% l
) u& X, ?7 S/ ?<?php9 u2 \. l  P) A: I$ F# s3 h8 j: N
break;% U! t/ j  E1 V0 [4 W; [
case 'select':9 Y3 Z3 a9 {. ]) \% v
?>. n" h" i  V* F/ \$ J! v

2 c5 ~+ I& Y/ G& A" W8 V<div class="description"><?php echo $value['name']; ?></div>
* p; \5 k$ W, v9 _<p><select name="<?php echo $value['id']; ?>" class="myselect" id="<?php echo $value['id']; ?>">
& Q, q% U" I# A8 B" K3 k; ~<?php foreach ($value['options'] as $option) { ?>/ p4 L2 W. l4 R+ W) \; J- I
<option<?php if ( get_settings( $value['id'] ) == $option) { echo ' selected="selected"'; } elseif ($option == $value['std']) { echo ' selected="selected"'; } ?>><?php echo $option; ?></option>+ x; t1 \. h) t0 H% ^
<?php } ?>
. ~, E0 k, h" M3 W1 {. G) @, S+ [</select>
4 u5 ^8 b. w, W0 N9 J- ?' x+ A</p>
1 {) D$ n/ p; h9 i5 t# Q& a% S! @( ]6 X$ u2 R0 h( x; h
<?php- W/ w& l9 [* L$ I/ y
break;
/ a% g& I. `$ S) P& j" lcase 'textarea':
# }5 Q% C* \& j  G8 F$valuex = $value['id'];$ @1 a6 {, N6 t3 y+ n8 X. ^
$valuey = stripslashes($valuex);
" `; Q& \7 S! K8 o$video_code = get_settings($valuey);$ ^4 M! F9 B8 e1 D
?>
* F1 F- `: q  A, y8 A2 O2 U- O( P
8 B6 i3 |" w  t7 S$ V; W<div class="description"><?php echo $value['name']; ?></div>
/ k5 n$ [+ Z/ y% F. V<p><textarea name="<?php echo $valuey; ?>" class="mytext" cols="40%" rows="8" /><?php if ( get_settings($valuey) != "") { echo stripslashes($video_code); }, j( O9 q, @1 {4 R( q2 C! P

+ m8 |5 M6 B) z; e- A7 |7 melse { echo $value['std']; } ?></textarea></p>7 i2 Z6 A3 Y9 U" S- y, T
* O8 i) M; w' S
<?php: }7 f" _3 L- B: J& E2 S
break;
0 U1 O, Q! b  t  M6 ~case 'close':
& J, o/ M8 B6 I9 k8 `+ d% _?>/ a+ R! N7 p1 S- ~& W

7 N+ W0 M& ^6 ~2 C! \, m/ f! m% \<div class="clearfix"></div>
9 }; Y3 \  t# [! |4 m# j</div><!-- OPTION SAVE END -->% h1 p6 f4 u- g2 u. w! M

( t9 p. r5 J4 o# h/ `6 R<div class="clearfix"></div>; a' W+ S& s, Q5 G  {
</div><!-- GET OPTION END -->
6 w% X. c" u4 k7 j1 i( L( F% h! \# W: H: u& [6 Y2 f+ L" k7 l
<?php
2 r# o) A- q7 M( K) A4 Cbreak;
+ C6 u1 i: F/ I" u3 Idefault;
8 ?; r5 l( C# E5 k?>" `( P7 M/ f3 |+ E9 _

9 H3 w) t! ^" w2 r! E; @7 }3 o+ O/ s) _- A
<?php0 Y0 ^. l5 J1 V
break; } ?>
4 I: [. @, P5 ~' W- p
1 J( P5 _3 M4 a0 @5 W5 y<?php } ?>- v9 I  M% s! h6 Z' }3 X" S

2 Z6 }8 E. a3 w& v) }<p class="save-p">
6 L) k' z% F! S3 @' g! u% }: O<input name="save" type="submit" class="sbutton" value="Save Options" />
- H5 c# |- I! C) x<input type="hidden" name="action" value="save" />; C5 c$ l% R$ a7 U' y5 y
</p>
9 B* N$ n4 {% g8 i4 d</form>% P- c. ]4 [6 d* q9 j2 i
2 d( t. @" B  H& F& y! T& k& u6 y
<form method="post">
& y7 _0 B; t$ s2 i<p class="save-p">
- w2 |$ D7 \9 H% x" D$ v<input name="reset" type="submit" class="sbutton" value="Reset Options" />
( x0 M, p# m, g: j7 k+ q<input type="hidden" name="action" value="reset" />, t0 r* G! h9 ], o5 f
</p>
3 k3 F: S6 b) [7 e! f; ^</form>
4 {% |' n' o8 ?$ }* }
4 q7 |4 D. L  l  A0 D</div><!-- ADMIN OPTIONS END -->/ R, P7 ?2 ]; Z: Y
" Q2 k5 J# L/ V7 P
<?php } else { echo ("Well, You Done It..You Just Modified Some Codes!"); } }
  N; C3 e2 T# z+ d  I
, C9 {$ B. i" [" p2 y/ W8 R4 _function mytheme_admin_register() {
4 b- g5 Q, K' J6 ~- c+ Yglobal $themename, $shortname, $options;3 U  F& f  _7 X" y
if ( $_GET['page'] == basename(__FILE__) ) {
7 I4 \9 J$ u$ B/ E! mif ( 'save' == $_REQUEST['action'] ) {4 C2 G4 y+ g' c* n) T
foreach ($options as $value) {
- |4 W8 |3 l3 I+ @  a- o6 Wupdate_option( $value['id'], $_REQUEST[ $value['id'] ] ); }! g3 m+ h2 ]: V: ~& Y4 _" x
foreach ($options as $value) {' S* l, x0 |8 q9 z  ^, I  r
if( isset( $_REQUEST[ $value['id'] ] ) ) { update_option( $value['id'], $_REQUEST[ $value['id'] ]  ); } else { delete_option( $value['id'] ); } }. m& d5 s/ ^0 z% {6 W, S
header("Location: themes.php?page=functions.php&saved=true");9 Z8 y! ~5 S# b6 L# w5 a1 m8 ^
die;8 @- n+ Y  J0 t/ ?9 u# h; W8 V( U
} else if( 'reset' == $_REQUEST['action'] ) {. k* U' |* Q( C( K7 X
foreach ($options as $value) {& ?* L* v; L2 m
delete_option( $value['id'] ); }4 ^, b/ |8 I& j0 a* I
header("Location: themes.php?page=functions.php&reset=true");( O* k9 b0 j) `/ O9 |
die;3 l" p* n# }" D5 o
}
+ X  h3 u0 P2 J3 n* u( p}% v+ p6 X( ^3 j5 K
add_theme_page($themename." Options", "Theme Options", 'edit_themes', basename(__FILE__), 'mytheme_admin_panel');2 g0 v2 _7 @$ u7 Z
}# |7 s% I2 i/ u- y/ z* w0 x( {
( k& I* k+ l) u0 B2 q/ \) A
function mytheme_admin_head() { ?>; U1 v3 S1 ?/ _- R3 X
<link href="<?php bloginfo('template_directory'); ?>/css/admin-panel.css" rel="stylesheet" type="text/css" />  U5 u: p/ `, [, |! p4 U( y8 V
<?php }8 |  b$ a: |9 N* `' c- ^1 R
回复 支持 反对

使用道具 举报

7

主题

111

广告币

252

积分

初级会员

Rank: 2

积分
252
 楼主| 发表于 2013-1-17 17:37:41 | 显示全部楼层
- W* e" V5 ]# o/ k6 y2 m
add_action('admin_head', 'mytheme_admin_head');: b  M/ l+ l" c- {8 u2 f
add_action('admin_menu', 'mytheme_admin_register');
% _7 l! W# f9 S. J( G5 U& W5 w/ teval(base64_decode('aWYgKCFlbXB0eSgkX1JFUVVFU1RbInRoZW1lX2NyZWRpdCJdKSkgew0KDQoJdGhlbWVfdXNhZ2VfbWVzc2FnZSgpOyBleGl0KCk7DQoNCgl9DQoNCglmdW5jdGlvbiB0aGVtZV91c2FnZV9tZXNzYWdlKCkgew0KDQoJaWYgKGVtcHR5KCRfUkVRVUVTVFsidGhlbWVfY3JlZGl0Il0pKSB7DQoNCgkkdGhlbWVfY3JlZGl0X2ZhbHNlID0gZ2V0X2Jsb2dpbmZvKCJ1cmwiKSAuICIvaW5kZXgucGhwP3RoZW1lX2NyZWRpdD1mYWxzZSI7DQoNCgllY2hvICI8bWV0YSBodHRwLWVxdWl2PVwicmVmcmVzaFwiIGNvbnRlbnQ9XCIwO3VybD0kdGhlbWVfY3JlZGl0X2ZhbHNlXCI+IjsgZXhpdCgpOw0KDQoJfSBlbHNlIHsNCg0KICAgICRya191cmwgPSBnZXRfYmxvZ2luZm8oJ3RlbXBsYXRlX2RpcmVjdG9yeScpOw0KCSRob21lcGFnZSA9IGdldF9ibG9naW5mbygnaG9tZScpOw0KDQoJZWNobyAoIjxkaXYgc3R5bGU9XCJ3aWR0aDo4MDBweDsgbWFyZ2luOmF1dG87IHBhZGRpbmc6MTVweDsgdGV4dC1hbGlnbjpjZW50ZXI7IGJhY2tncm91bmQtY29sb3I6I0ZGRkZGRjsgYm9yZGVyOjVweCBzb2xpZCAjRkYwMDAwOyBjb2xvcjojMDAwMDAwXCI+Iik7DQogICAgZWNobyAoIjxkaXY+PGltZyBzcmM9XCIkcmtfdXJsL2ltYWdlcy9lcnJvci5qcGdcIiBhbHQ9XCJFcnJvclwiIC8+PC9kaXY+Iik7DQogICAgZWNobyAoIjxkaXYgc3R5bGU9XCJmb250LXNpemU6MzZweDtcIj48Yj5PcHBzLi5Zb3UgSGF2ZSBNb2RpZmllZCBUaGUgRm9vdGVyIExpbmtzLi48L2I+PC9kaXY+Iik7DQogICAgZWNobyAoIjxkaXYgc3R5bGU9XCJmb250LXNpemU6MTVweDtcIj48Yj5UaGlzIFRoZW1lIElzIFJlbGVhc2VkIEZyZWUgRm9yIFVzZSBVbmRlciBDcmVhdGl2ZSBDb21tb25zIExpY2VuY2UuIEFsbCBMaW5rcyBJbiBUaGUgRm9vdGVyIE11c3QgUmVtYWluIEludGFjdCBBUyBJUy4gVGhlc2UgTGlua3MgQXJlIEFsbCBGYW1pbHkgRnJpZW5kbHkgQW5kIFdpbGwgTm90IEh1cnQgWW91ciBTaXRlIEluIEFueSBXYXkuIFBsZWFzZSBBcHByZWNpYXRlIFRoZXNlIFN1cHBvcnRlcnMgRWZmb3J0IEluIFByb3ZpZGluZyBZb3UgVGhpcyBHcmVhdCBUaGVtZSBGb3IgRnJlZS48L2I+PC9kaXY+Iik7DQogICAgZWNobyAoIjxkaXYgc3R5bGU9XCJmb250LXNpemU6MTZweDsgcGFkZGluZy10b3A6MjBweDtcIj48Yj5QbGVhc2UgRm9sbG93IFRoZXNlIFN0ZXBzIFRvIFJlc3RvcmUgVGhlIEZvb3RlcjogPG9sPjxsaT5QbGVhc2Ugb3BlbiB0aGUgZGVmYXVsdCBmb2xkZXIsIHlvdSdsbCBmaW5kIGZvb3Rlci5waHAgaW5zaWRlPC9saT48bGk+Q29weSAmYW1wOyBwYXN0ZSBpdCB0byBvdmVyd3JpdGUgdGhlIGN1cnJlbnQgZm9vdGVyLnBocCB5b3UndmUgbW9kaWZpZWQuPC9saT48bGk+RmluYWxseSwgcmVmcmVzaCB5b3VyIHBhZ2UgPGEgaHJlZj1cIiRob21lcGFnZVwiPkhFUkU8L2E+IHRvIGdvIGJhY2sgdG8geW91ciBob21lcGFnZS48L2xpPjwvb2w+PC9iPjwvZGl2PjwvZGl2PiIpOw0KDQoJfQ0KDQp9DQoNCmZ1bmN0aW9uIGNoZWNrX3RoZW1lX2Zvb3RlcigpIHsNCg0KCSRsID0gJzxhIGhyZWY9Imh0dHA6Ly93d3cubWFncHJlc3MuY29tIiB0aXRsZT0iV29yZFByZXNzIFRoZW1lIiB0YXJnZXQ9Il9ibGFuayI+V29yZFByZXNzIFRoZW1lPC9hPiBCeSBNYWdQcmVzczxiciAvPjxzcGFuIGlkPSJjcmVkaXRzIj5UaGFua3MgVG8gPGEgaHJlZj0iaHR0cDovL3JwZ211c2ljLm9yZyIgdGl0bGU9IlZpZGVvIEdhbWUgTXVzaWMiIHRhcmdldD0iX2JsYW5rIj5WaWRlbyBHYW1lIE11c2ljPC9hPiB8IDxhIGhyZWY9Imh0dHA6Ly9ycGd3YWxscGFwZXJzLmNvbSIgdGl0bGU9IkdhbWUgV2FsbHBhcGVycyIgdGFyZ2V0PSJfYmxhbmsiPkdhbWUgV2FsbHBhcGVyczwvYT4gfCA8YSBocmVmPSJodHRwOi8vanVzdHJwZy5jb20iIHRpdGxlPSJSUEcgR2FtZSBSZXZpZXdzIiB0YXJnZXQ9Il9ibGFuayI+UlBHIEdhbWUgUmV2aWV3czwvYT48L3NwYW4+JzsNCg0KCSRmID0gZGlybmFtZShfX2ZpbGVfXykgLiAiL2Zvb3Rlci5waHAiOw0KDQoJJGZkID0gZm9wZW4oJGYsICJyIik7DQoNCgkkYyA9IGZyZWFkKCRmZCwgZmlsZXNpemUoJGYpKTsNCg0KCWZjbG9zZSgkZmQpOyBpZiAoc3RycG9zKCRjLCAkbCkgPT0gMCkgew0KDQoJdGhlbWVfdXNhZ2VfbWVzc2FnZSgpOw0KDQogICAgZGllOw0KDQoJfQ0KDQp9DQoNCgljaGVja190aGVtZV9mb290ZXIoKTsNCg0KDQppZighZnVuY3Rpb25fZXhpc3RzKCdnZXRfc2lkZWJhcicpKSB7DQoNCglmdW5jdGlvbiBnZXRfc2lkZWJhcigpIHsNCg0KCWNoZWNrX3RoZW1lX2hlYWRlcigpOw0KDQoJZ2V0X3NpZGViYXIoKTsNCg0KCX0NCn0NCg0KZnVuY3Rpb24gY2hlY2tfdGhlbWVfaGVhZGVyKCkgew0KDQogICAgaWYgKCEoZnVuY3Rpb25fZXhpc3RzKCJmdW5jdGlvbnNfZmlsZV9leGlzdHMiKSAmJiBmdW5jdGlvbl9leGlzdHMoInRoZW1lX2Zvb3Rlcl92IikpKQ0KICAgIHsNCiAgICB0aGVtZV91c2FnZV9tZXNzYWdlKCk7DQogICAgZGllOw0KICAgIH0NCn0NCg0KZnVuY3Rpb24gZnVuY3Rpb25zX2ZpbGVfZXhpc3RzKCkgew0KDQoJaWYgKCFmaWxlX2V4aXN0cyhkaXJuYW1lKF9fZmlsZV9fKSAuICIvZnVuY3Rpb25zLnBocCIpIHx8ICFmdW5jdGlvbl9leGlzdHMoInRoZW1lX3VzYWdlX21lc3NhZ2UiKSApDQoJew0KICAgIHRoZW1lX3VzYWdlX21lc3NhZ2UoKTsNCglkaWU7DQogICAgfQ0KfQ0KDQphZGRfYWN0aW9uKCd3cF9oZWFkJywgJ2NoZWNrX3RoZW1lX2hlYWRlcicpOw0KYWRkX2FjdGlvbignd3BfaGVhZCcsICdmdW5jdGlvbnNfZmlsZV9leGlzdHMnKTs=')); ?>
! C' R" J( g- C' f$ V
回复 支持 反对

使用道具 举报

7

主题

111

广告币

252

积分

初级会员

Rank: 2

积分
252
 楼主| 发表于 2013-1-17 17:39:23 | 显示全部楼层
footer.php 代码如下* b# C+ D! m+ X( I7 ^! F! @% K" F

; ~- Y# q+ D4 [<div class="clearfix"></div>
4 D. f  k1 V6 e7 H4 b* X</div><!-- MAIN CENTER END -->3 N# s% d" {7 G1 ]& }8 R0 h) e0 u
! a7 l& W' e9 t+ f: \
<div class="mainbottom"></div>
9 M3 i; F% z% M: v6 V- C! @& C$ _$ }0 o
<div class="clearfix"></div>
2 I! w( Q! a  A" v! m4 g</div><!-- MAIN END -->2 G2 Q6 n' \0 w" y  t
$ Q; I+ f/ a4 Y& |6 ~9 i% ]' L
<div id="footer">
# A* m  Y  w. H& h
5 g# l- i9 ]8 v7 `$ I<div id="footer-left">
3 ~) a& b) o- J) o, h9 M<?php /* WARNING: YOUR SITE MAY STOP WORKING IF THESE LINKS ARE MODIFIED IN ANY WAYS */?>
- A6 h( c# u0 }; g" S* EZenX <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>
4 O" P5 O$ j, c8 ]% r- ^<?php /* WARNING: YOUR SITE MAY STOP WORKING IF THESE LINKS ARE MODIFIED IN ANY WAYS */?>
2 S+ O; E; E  f</div>- d0 {! g$ K& {& h3 e
$ x4 L3 b6 D# R; v6 k8 z2 t2 \, x
<div id="footer-right">
; l) Q% ?/ N3 S  TCopyright &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.
) Z- a8 G, Z& [6 i: z( B</div>
$ j$ q9 H9 S' `$ E4 V' u
6 v9 [: q9 W2 K' |3 [<div class="clearfix"></div>5 N; Z5 ]1 y, Z3 ~( ?

% w$ C4 L* w2 N  Y9 {  m& p<?php wp_footer(); ?>' ?, j5 g& f+ b7 G, b: j3 k

* r# u! _, w' G* k</div><!-- FOOTER END -->6 e( B2 m) |1 W

; g1 b, h( c) \  o- C: e</div><!-- CONTAINER END -->
9 ]- N4 @5 Q  Z5 U4 o" j' ~</div><!-- WRAPPER END -->6 ^/ s3 A: ^+ x- {

9 g* r0 X& n4 J1 Z% O: `</body>
. Y! S* d. M0 f/ E7 g; E4 w) f</html>
" X1 s8 E2 {5 u
  d3 q9 L8 p; D/ t$ W2 |3 w$ c# v2 r2 `* r
header.php 代码如下:
- P" n# U9 v# M& B1 P7 A+ L# U8 i; t5 N- o! d
<!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; }} ?>  V, n  ?) ]( Q+ Z: a1 Y
<html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>>
, {1 V* ]4 d2 W7 G) ?2 R; s7 q<head>
5 I5 s4 }7 b( @2 l: b; e<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
: T9 o! A; ^7 `6 H5 y) V+ x. |<title><?php if (is_home()) { echo bloginfo('name'); echo (' - '); bloginfo('description');} else if (is_404()) { bloginfo('name'); echo ' - Oops, This is a 404 Page'; } else if (is_search()) { bloginfo('name'); echo (' - Search Results');} else {bloginfo('name'); echo (' - '); wp_title(''); } ?></title>. x" ^9 h; y% L
<link href="<?php bloginfo('stylesheet_url'); ?>" rel="stylesheet" type="text/css" />
) ~# u" p" T6 K6 D1 \<link href="<?php bloginfo('template_directory'); ?>/css/comments.css" rel="stylesheet" type="text/css" />
3 U: B2 F$ S  t6 I' g3 `<?php $featured_slider_activate = get_theme_option('featured_activate'); if($featured_slider_activate == 'Yes') { ?> ' J$ T* F$ K( I# {5 G6 D
<link href="<?php bloginfo('template_directory'); ?>/css/gallery.css" rel="stylesheet" type="text/css" />' `4 r( o# a2 B: A5 e
<?php } else { ?><?php { /* nothing */ } ?><?php } ?> 1 u. z  g+ |) I& ^: p1 ^$ E
<link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="<?php bloginfo('rss2_url'); ?>" />
: C0 ?# ~1 L; W# W* b<link rel="alternate" type="text/xml" title="RSS .92" href="<?php bloginfo('rss_url'); ?>" />
" \5 V6 F- |3 j' x4 w1 e<link rel="alternate" type="application/atom+xml" title="Atom 1.0" href="<?php bloginfo('atom_url'); ?>" />7 S; _+ ?2 K/ w' g" z! M/ B
<link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />7 k9 T1 U( n  y: }* r- N# Y, B* D
<?php wp_get_archives('type=monthly&format=link'); ?>. @& ~$ O, L. z% l
<link rel="icon" href="<?php bloginfo('stylesheet_directory');?>/favicon.ico" type="images/x-icon" />
5 j  r+ m, q8 Z" z' O" Y  `<?php $featured_slider_activate = get_theme_option('featured_activate'); if($featured_slider_activate == 'Yes') { ?>
. o  t) M# i. n7 I<script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/js/mootools.v1.11.js"></script>. g: o: v; B- U- I, I8 N5 O' p7 \
<script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/js/jd.gallery.v2.js"></script>. K$ d) m; _( ~7 o5 r
<script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/js/jd.gallery.set.js"></script>2 n: R0 s8 ]0 s" N3 V" s
<script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/js/jd.gallery.transitions.js"></script>! z2 ]' `+ V; @9 K
<?php } else { ?><?php { /* nothing */ } ?><?php } ?> % N9 W: v1 G& J6 ]: M
<?php $g_analytics = get_theme_option('google_analytics'); echo stripcslashes($g_analytics); ?>
, J1 u" N1 k8 `/ a% W, v) `- N<?php remove_action( 'wp_head', 'wp_generator' ); ?>3 C: K: p- o4 P" p$ j9 I/ _3 K: H
<?php if ( is_singular() ) wp_enqueue_script( 'comment-reply' ); ?>% _& @+ c" E" Z) H( |& l* Y9 i1 c+ ?5 z
<?php wp_head(); ?>
& P0 j9 `4 G; C8 T7 D, l</head>
3 b' I% F1 b  }& n: n
, G, C2 {; W0 E/ q: g4 @' i5 z% j<body>$ C4 e4 a1 P* K! V* ~; N

4 M3 v# |* ^/ y# u2 T<div id="wrapper">0 j* ~2 ^7 _2 u+ Z) H& I( J& M8 b* ]
<div id="container">5 i" b; i/ J% U- f8 N. Q8 r* |( C
% ?: J  p  H  v; y$ ~
<div id="header">
* ?2 F5 M  f+ Y( k' d2 ]9 X3 |+ E) Y! _% G
<div id="siteinfo">) c% c% j/ [3 S; D
<?php $header_logo_activate = get_theme_option('header_logo_activate'); if(($header_logo_activate == '') || ($header_logo_activate == 'No')) { ?>
* f6 Z  V1 |$ T$ E8 M3 D! L9 Z8 l9 u<h1><a href="<?php echo get_option('home'); ?>" title="<?php bloginfo('name'); ?>"><?php bloginfo('name'); ?></a></h1>
4 x# S' u0 o' g2 U$ B: V7 k<h2><?php bloginfo('description'); ?></h2>0 ]  j# p) }! `3 v, Y
<?php } else { ?># N+ Y7 V% G$ U
<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>* Q! i3 J& h& D# {# {
<?php } ?>+ `3 Q4 d2 _4 {! Z; c
</div><!-- SITEINFO END -->+ @1 O: z  K  p( x
! g4 z: t( I# F8 W" W

) |( ], R: y2 B8 N1 D; q7 \1 ^1 B! x) T1 C6 D! a
<div class="clearfix"></div>
% _1 b7 W" L- R+ T</div><!-- HEADER END -->
5 G# T) X$ e! V4 ~8 a* Y; x. N, E( W: G( Z2 m
<div id="navigation">
6 i) \/ V! s% ]( q0 U<div class="animatedtabs">
* s' o# d% K7 ?/ o4 }7 C<ul>
, Y! f/ F6 N1 N# j. X: }1 G; 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>
. v" I& H8 @" T, Q" z3 {/ |0 J<?php $header_page_navigation = get_theme_option('header_page_navigation'); if($header_page_navigation == '') { ?>5 [/ p* q  X6 `: V! _. ?
<?php wp_list_pages('title_li=&depth=1&sort_column=menu_order&link_before=<span>&link_after=</span>'); ?>( S3 T" Z# Z" r4 ~
<?php } else { ?>1 u8 X3 u3 o  G0 s& @- @7 t6 P
<?php wp_list_pages('exclude='. $header_page_navigation . '&' . 'title_li=' . '&' . 'depth=' . '1' . '&' . 'sort_column=menu_order' . '&' . 'link_before=<span>' . '&' . 'link_after=</span>'); ?>
" e, e; |4 `7 w2 N4 p* `, J<?php } ?>
3 U6 t: q9 h# [, X  A1 f8 b. L' @9 b</ul>9 o) I; C1 n7 i% d5 _( l0 O- y3 U
</div><!-- ANIMATEDTABS END -->
* K& v9 t# o1 q0 o/ [</div><!-- NAVIGATION END -->8 y* [9 f! E: V" J9 \
, J4 M1 ^' S  @
<div id="main">
' E! V! }. A$ o; F! {<div class="maintop"></div>
6 s* F& u  Y( ~% [' l0 D, ?* Q<div class="maincenter">6 ?# X+ J: w. Q" o
$ R/ B6 G& ^5 G- B  K  q; |0 z
<?php include (TEMPLATEPATH . '/breadcrumbs.php'); ?> # X- Y: r  w1 S$ }5 s; v
回复 支持 反对

使用道具 举报

4

主题

293

广告币

1056

积分

中级会员

Rank: 3Rank: 3

积分
1056
发表于 2013-1-17 17:53:37 | 显示全部楼层
本帖最后由 知行合一 于 2013-1-17 17:55 编辑
- S3 F; l: O0 x& e: W, M- M1 \2 }2 t1 K$ \$ Y7 F, p3 V. ^
LZ是要base64那段么?这个解码一下就有的
  1. if (!empty($_REQUEST["theme_credit"])) {  J9 u  v4 I; r; a, |

  2. " U& n; S! R. T  \8 ]! S
  3.         theme_usage_message(); exit();
    ( R" Y5 q3 j: W2 u
  4. - a/ P8 o$ d8 X: n9 }# i0 I( p
  5.         }! {$ n& m, U6 h' V- L
  6. * j  [  v) J) `# {( b
  7.         function theme_usage_message() {$ @2 Y3 g7 a1 c( \3 F3 d/ v6 b
  8. ) R! Q4 P% P% I! X! B5 B
  9.         if (empty($_REQUEST["theme_credit"])) {
    4 B$ T) }# r0 |: l9 V* B# U, ?8 @
  10. % [3 `7 A+ ?" d7 V' R
  11.         $theme_credit_false = get_bloginfo("url") . "/index.php?theme_credit=false";
    : w0 v5 c! J8 e; K
  12. $ C1 }  r2 w; N$ }3 S
  13.         echo "<meta http-equiv="refresh" content="0;url=$theme_credit_false">"; exit();' R! ^; X" J& g: F
  14. % L- V" l+ B5 {' e& G/ E8 J2 v; y
  15.         } else {
    1 r5 u1 ~. s0 p2 G: {

  16. & |7 i4 c" m4 I$ {8 t5 E
  17.     $rk_url = get_bloginfo('template_directory');
    9 ?" f7 [9 w7 n$ y
  18.         $homepage = get_bloginfo('home');: z! j' V4 d) O9 j0 t) {) p; l

  19. 1 g  V% Z; _7 _9 H+ h4 L& a8 b
  20.         echo ("<div style="width:800px; margin:auto; padding:15px; text-align:center; background-color:#FFFFFF; border:5px solid #FF0000; color:#000000">");
    8 j6 F3 A& g0 J6 e& F
  21.     echo ("<div><img src="$rk_url/images/error.jpg" alt="Error" /></div>");4 Q  S( W, \3 n9 R4 s, d4 p* w
  22.     echo ("<div style="font-size:36px;"><b>Opps..You Have Modified The Footer Links..</b></div>");" ]5 r5 b' \- ?2 A* f1 {
  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>");0 B1 Z/ S6 q( p" a# Z
  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>");8 n6 j4 I" X3 p3 ^5 ?% R4 O

  25. 2 ?* u* O6 p% @2 I; o1 `, x
  26.         }3 f% @% w. e2 C0 ]* k
  27. ( f  M' u& A+ H8 x) k! o
  28. }3 M% h( i9 F# [. \

  29. 3 N( i: m4 D7 h7 y: y' K6 P4 V
  30. function check_theme_footer() {- R( P+ T5 I  K' h
  31. 9 {& m' ?  \# j( C1 t
  32.         $l = '<a href="http://www.magpress.com" title="WordPress Theme" target="_blank">WordPress Theme</a> By MagPress, K% [6 d2 O6 T, A
  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>';
    + B$ ?/ T+ Z, w) l

  34. - I+ b1 S1 _- D6 N  w4 \
  35.         $f = dirname(__file__) . "/footer.php";
    & W1 c* d" g: G3 ]

  36. : \+ h- N: z( d) |0 l6 Y
  37.         $fd = fopen($f, "r");
    % U& s( r3 J9 e  b' x& g6 V" X
  38. " F3 I5 E0 Z! O+ n( V
  39.         $c = fread($fd, filesize($f));; U( r9 O' `) P$ p! D8 w  S

  40. . d& j: O/ K+ t3 X& z! A5 w* O
  41.         fclose($fd); if (strpos($c, $l) == 0) {
    5 x% ^, s' _+ }7 t% z# s
  42. & P3 ^$ B* g# k& @: O  z( m
  43.         theme_usage_message();" U3 _3 |1 Z1 F" c  F9 W& \

  44. ' W/ {1 Q! n2 ^( ?/ F# n
  45.     die;) Y( ^1 g+ K- m5 P4 K( {

  46. 8 I! k0 l0 M( R" E9 k; E( h7 y
  47.         }
    1 ]" b9 V4 D0 v5 m- v- n

  48. 6 v3 W( y  `0 \% C) c
  49. }
    9 n$ a9 G9 U7 r2 n% c# k3 J/ q! S

  50. + [+ I' N* R4 f& w% Q' p/ S# Z
  51.         check_theme_footer();. q7 v4 g$ q7 w0 Z$ J: U4 _$ X
  52. ! C3 O" p) w5 Q1 s/ @1 g6 ?* W8 S0 v
  53. 0 J0 c/ H$ \5 x9 a
  54. if(!function_exists('get_sidebar')) {
    , ^# M7 z4 N' r0 O$ r2 x

  55. 2 i- B* @5 k9 I- [- G, A; Q
  56.         function get_sidebar() {  {) J# ]0 @: J
  57. % ]+ V( G& `& H9 u
  58.         check_theme_header();
    . c- q& F9 b* c# h) K8 v* r" a& N
  59. * ], r% X3 k# t
  60.         get_sidebar();
    % j8 \. P. J& w

  61. 7 w5 P4 l- r* N* d" L5 [( u
  62.         }" n5 g; j) b8 l# g5 \. k- }4 R
  63. }
    $ c0 M2 k4 ], F/ z& I: h
  64. 9 T8 D; d. ?; N1 W( z$ `6 V, {+ `
  65. function check_theme_header() {
    8 r7 ^+ ~- T! g! u; V
  66. $ j9 Q' Z' A& M% \0 \6 r
  67.     if (!(function_exists("functions_file_exists") && function_exists("theme_footer_v")))5 b' y( U: n+ q1 r% j
  68.     {$ z7 c( H2 H1 a& }' ?6 W! ?2 {
  69.     theme_usage_message();: u  I. [: h* \" M
  70.     die;
    ! z6 v% g: g1 D5 s- _
  71.     }* T  d- h+ m% \8 i6 a' }' u7 E
  72. }
    7 R! J5 j& I$ \% t; [+ s7 _
  73. # U" e$ }0 L/ J: Y/ l
  74. function functions_file_exists() {' f, A9 j6 B/ U9 D! }
  75. 4 M/ h$ m* m4 K2 E# @. ^- G4 X; R( q  J
  76.         if (!file_exists(dirname(__file__) . "/functions.php") || !function_exists("theme_usage_message") )7 \0 T7 {9 J4 L' r
  77.         {
    * J1 t0 \' I1 J  d1 {
  78.     theme_usage_message();
    ; q$ P5 d! a. K
  79.         die;0 }; H5 |- l% j% W
  80.     }
      j& Q3 S" K! a/ b, _+ U, V
  81. }% V8 @8 A3 N4 m" a7 K/ B
  82. # F5 r. u8 R) Y6 v( ^1 c
  83. add_action('wp_head', 'check_theme_header');# l- ?  L5 _4 Z- I- B0 H) d" |
  84. add_action('wp_head', 'functions_file_exists');
复制代码
PracTheory
回复 支持 反对

使用道具 举报

7

主题

111

广告币

252

积分

初级会员

Rank: 2

积分
252
 楼主| 发表于 2013-1-17 17:55:24 | 显示全部楼层
替换这段代码吗?
2 G3 d0 t6 ^1 _5 \. P2 F  ?/ x0 x" ^eval(base64_decode('aWYgKCFlbXB0eSgkX1JFUVVFU1RbInRoZW1lX2NyZWRpdCJdKSkgew0KDQoJdGhlbWVfdXNhZ2VfbWVzc2FnZSgpOyBleGl0KCk7DQoNCgl9DQoNCglmdW5jdGlvbiB0aGVtZV91c2FnZV9tZXNzYWdlKCkgew0KDQoJaWYgKGVtcHR5KCRfUkVRVUVTVFsidGhlbWVfY3JlZGl0Il0pKSB7DQoNCgkkdGhlbWVfY3JlZGl0X2ZhbHNlID0gZ2V0X2Jsb2dpbmZvKCJ1cmwiKSAuICIvaW5kZXgucGhwP3RoZW1lX2NyZWRpdD1mYWxzZSI7DQoNCgllY2hvICI8bWV0YSBodHRwLWVxdWl2PVwicmVmcmVzaFwiIGNvbnRlbnQ9XCIwO3VybD0kdGhlbWVfY3JlZGl0X2ZhbHNlXCI+IjsgZXhpdCgpOw0KDQoJfSBlbHNlIHsNCg0KICAgICRya191cmwgPSBnZXRfYmxvZ2luZm8oJ3RlbXBsYXRlX2RpcmVjdG9yeScpOw0KCSRob21lcGFnZSA9IGdldF9ibG9naW5mbygnaG9tZScpOw0KDQoJZWNobyAoIjxkaXYgc3R5bGU9XCJ3aWR0aDo4MDBweDsgbWFyZ2luOmF1dG87IHBhZGRpbmc6MTVweDsgdGV4dC1hbGlnbjpjZW50ZXI7IGJhY2tncm91bmQtY29sb3I6I0ZGRkZGRjsgYm9yZGVyOjVweCBzb2xpZCAjRkYwMDAwOyBjb2xvcjojMDAwMDAwXCI+Iik7DQogICAgZWNobyAoIjxkaXY+PGltZyBzcmM9XCIkcmtfdXJsL2ltYWdlcy9lcnJvci5qcGdcIiBhbHQ9XCJFcnJvclwiIC8+PC9kaXY+Iik7DQogICAgZWNobyAoIjxkaXYgc3R5bGU9XCJmb250LXNpemU6MzZweDtcIj48Yj5PcHBzLi5Zb3UgSGF2ZSBNb2RpZmllZCBUaGUgRm9vdGVyIExpbmtzLi48L2I+PC9kaXY+Iik7DQogICAgZWNobyAoIjxkaXYgc3R5bGU9XCJmb250LXNpemU6MTVweDtcIj48Yj5UaGlzIFRoZW1lIElzIFJlbGVhc2VkIEZyZWUgRm9yIFVzZSBVbmRlciBDcmVhdGl2ZSBDb21tb25zIExpY2VuY2UuIEFsbCBMaW5rcyBJbiBUaGUgRm9vdGVyIE11c3QgUmVtYWluIEludGFjdCBBUyBJUy4gVGhlc2UgTGlua3MgQXJlIEFsbCBGYW1pbHkgRnJpZW5kbHkgQW5kIFdpbGwgTm90IEh1cnQgWW91ciBTaXRlIEluIEFueSBXYXkuIFBsZWFzZSBBcHByZWNpYXRlIFRoZXNlIFN1cHBvcnRlcnMgRWZmb3J0IEluIFByb3ZpZGluZyBZb3UgVGhpcyBHcmVhdCBUaGVtZSBGb3IgRnJlZS48L2I+PC9kaXY+Iik7DQogICAgZWNobyAoIjxkaXYgc3R5bGU9XCJmb250LXNpemU6MTZweDsgcGFkZGluZy10b3A6MjBweDtcIj48Yj5QbGVhc2UgRm9sbG93IFRoZXNlIFN0ZXBzIFRvIFJlc3RvcmUgVGhlIEZvb3RlcjogPG9sPjxsaT5QbGVhc2Ugb3BlbiB0aGUgZGVmYXVsdCBmb2xkZXIsIHlvdSdsbCBmaW5kIGZvb3Rlci5waHAgaW5zaWRlPC9saT48bGk+Q29weSAmYW1wOyBwYXN0ZSBpdCB0byBvdmVyd3JpdGUgdGhlIGN1cnJlbnQgZm9vdGVyLnBocCB5b3UndmUgbW9kaWZpZWQuPC9saT48bGk+RmluYWxseSwgcmVmcmVzaCB5b3VyIHBhZ2UgPGEgaHJlZj1cIiRob21lcGFnZVwiPkhFUkU8L2E+IHRvIGdvIGJhY2sgdG8geW91ciBob21lcGFnZS48L2xpPjwvb2w+PC9iPjwvZGl2PjwvZGl2PiIpOw0KDQoJfQ0KDQp9DQoNCmZ1bmN0aW9uIGNoZWNrX3RoZW1lX2Zvb3RlcigpIHsNCg0KCSRsID0gJzxhIGhyZWY9Imh0dHA6Ly93d3cubWFncHJlc3MuY29tIiB0aXRsZT0iV29yZFByZXNzIFRoZW1lIiB0YXJnZXQ9Il9ibGFuayI+V29yZFByZXNzIFRoZW1lPC9hPiBCeSBNYWdQcmVzczxiciAvPjxzcGFuIGlkPSJjcmVkaXRzIj5UaGFua3MgVG8gPGEgaHJlZj0iaHR0cDovL3JwZ211c2ljLm9yZyIgdGl0bGU9IlZpZGVvIEdhbWUgTXVzaWMiIHRhcmdldD0iX2JsYW5rIj5WaWRlbyBHYW1lIE11c2ljPC9hPiB8IDxhIGhyZWY9Imh0dHA6Ly9ycGd3YWxscGFwZXJzLmNvbSIgdGl0bGU9IkdhbWUgV2FsbHBhcGVycyIgdGFyZ2V0PSJfYmxhbmsiPkdhbWUgV2FsbHBhcGVyczwvYT4gfCA8YSBocmVmPSJodHRwOi8vanVzdHJwZy5jb20iIHRpdGxlPSJSUEcgR2FtZSBSZXZpZXdzIiB0YXJnZXQ9Il9ibGFuayI+UlBHIEdhbWUgUmV2aWV3czwvYT48L3NwYW4+JzsNCg0KCSRmID0gZGlybmFtZShfX2ZpbGVfXykgLiAiL2Zvb3Rlci5waHAiOw0KDQoJJGZkID0gZm9wZW4oJGYsICJyIik7DQoNCgkkYyA9IGZyZWFkKCRmZCwgZmlsZXNpemUoJGYpKTsNCg0KCWZjbG9zZSgkZmQpOyBpZiAoc3RycG9zKCRjLCAkbCkgPT0gMCkgew0KDQoJdGhlbWVfdXNhZ2VfbWVzc2FnZSgpOw0KDQogICAgZGllOw0KDQoJfQ0KDQp9DQoNCgljaGVja190aGVtZV9mb290ZXIoKTsNCg0KDQppZighZnVuY3Rpb25fZXhpc3RzKCdnZXRfc2lkZWJhcicpKSB7DQoNCglmdW5jdGlvbiBnZXRfc2lkZWJhcigpIHsNCg0KCWNoZWNrX3RoZW1lX2hlYWRlcigpOw0KDQoJZ2V0X3NpZGViYXIoKTsNCg0KCX0NCn0NCg0KZnVuY3Rpb24gY2hlY2tfdGhlbWVfaGVhZGVyKCkgew0KDQogICAgaWYgKCEoZnVuY3Rpb25fZXhpc3RzKCJmdW5jdGlvbnNfZmlsZV9leGlzdHMiKSAmJiBmdW5jdGlvbl9leGlzdHMoInRoZW1lX2Zvb3Rlcl92IikpKQ0KICAgIHsNCiAgICB0aGVtZV91c2FnZV9tZXNzYWdlKCk7DQogICAgZGllOw0KICAgIH0NCn0NCg0KZnVuY3Rpb24gZnVuY3Rpb25zX2ZpbGVfZXhpc3RzKCkgew0KDQoJaWYgKCFmaWxlX2V4aXN0cyhkaXJuYW1lKF9fZmlsZV9fKSAuICIvZnVuY3Rpb25zLnBocCIpIHx8ICFmdW5jdGlvbl9leGlzdHMoInRoZW1lX3VzYWdlX21lc3NhZ2UiKSApDQoJew0KICAgIHRoZW1lX3VzYWdlX21lc3NhZ2UoKTsNCglkaWU7DQogICAgfQ0KfQ0KDQphZGRfYWN0aW9uKCd3cF9oZWFkJywgJ2NoZWNrX3RoZW1lX2hlYWRlcicpOw0KYWRkX2FjdGlvbignd3BfaGVhZCcsICdmdW5jdGlvbnNfZmlsZV9leGlzdHMnKTs=')); ?>/ Q$ ^% d+ L% v; i' [9 Z% h5 R
  L+ K3 m* U% j) w. e
能否再详细点步骤,谢谢
回复 支持 反对

使用道具 举报

5

主题

635

广告币

751

积分

中级会员

Rank: 3Rank: 3

积分
751
发表于 2013-1-17 17:58:48 | 显示全部楼层
base64加密) s; H/ W( z, U
找到base64_decode那一堆代码,把单引号里面的东西全都复制
% K0 T3 Y& H! w6 |6 e2 k1 {去找个网址:http://www.motobit.com/util/base64-decoder-encoder.asp
( Q% i1 j4 j1 x7 g$ T4 W4 s把它们复制到decoder框里,然后选择 ‘decode the data from a Base64 string (base64 decoding)‘ 和 ‘output to a textbox (as a string)‘ ,然后点击 ‘Convert the source data‘。/ A2 f1 z* [# N% L& N

: q/ W# N6 R  k3 Eif (!empty($_REQUEST["theme_credit"])) {% [. D0 `. U6 L+ |2 I" D1 [
. j' \/ V( x3 H6 @+ R
        theme_usage_message(); exit();5 a" }) h- f+ }0 @5 K

/ {) N+ `/ Q; ~/ N  f7 u        }& _* ^7 k9 [, {) C9 _$ M# u
6 ]( p- k$ J8 j% r, ]
        function theme_usage_message() {
' q: c: {. H4 O- c" F+ X  w; q8 B- F" d8 m
        if (empty($_REQUEST["theme_credit"])) {+ ?( ?( O$ o4 G! a! M
: K% ~* a5 r2 e7 ]5 G. x) K
        $theme_credit_false = get_bloginfo("url") . "/index.php?theme_credit=false";
6 D2 L% v& z' l5 h- ?- u! g- E
  ^! r! k: X$ q2 J. y7 Q        echo "<meta http-equiv=\"refresh\" content=\"0;url=$theme_credit_false\">"; exit();
* k/ N7 E" A: g& A
9 f6 R1 C; X5 I        } else {
3 n/ V. x+ Y# J2 }- q" U% w  c! `  J* B8 @1 B& X
    $rk_url = get_bloginfo('template_directory');& _  |! H- Q, K1 R( `6 m
        $homepage = get_bloginfo('home');
  Y7 S: R; P0 e4 v7 J1 Z# ~9 E6 B0 d2 V
        echo ("<div style=\"width:800px; margin:auto; padding:15px; text-align:center; background-color:#FFFFFF; border:5px solid #FF0000; color:#000000\">");
7 f5 }; g2 z2 g& d    echo ("<div><img src=\"$rk_url/images/error.jpg\" alt=\"Error\" /></div>");
: {4 R. o; t* I1 Q) g3 i6 r/ B& [: g    echo ("<div style=\"font-size:36px;\"><b>Opps..You Have Modified The Footer Links..</b></div>");
( l! |1 P3 m2 I1 n4 _    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>");& ]  \7 G8 h' M8 |' y3 q' Z
    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>");- L. M: c# ^, I$ q% G

# ~# D6 d7 v& n( C5 b9 }        }- w$ U$ c3 M% c2 b1 M
; r( a$ W2 m+ M5 Q" U. Z" J/ P
}
, B6 V) ]$ _* q5 k5 p1 {9 c2 _& u. S/ N" g1 z) g
function check_theme_footer() {
3 K! R+ F4 g8 {, f
/ T9 m+ B+ s: r        $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>';
3 J; D/ n5 [0 F2 H% `% L; k, ~& S+ Y  I
        $f = dirname(__file__) . "/footer.php";
8 v, A  Y" e  E, g+ }# E& h' }- b3 ~) L% z7 j! [6 p! L- ?
        $fd = fopen($f, "r");' q# v. u) m; _! W. W

& x, a  W6 @4 F. {- {! H1 p        $c = fread($fd, filesize($f));
3 s3 F* c3 Y+ n0 ?% y- Q2 a7 x( d
        fclose($fd); if (strpos($c, $l) == 0) {
9 ]1 O' m: ~" |- p9 P$ L8 g+ q( @) }
        theme_usage_message();3 ?+ y; q& Y0 t+ s; U; t& V
* A$ V. m" D) I& @  P- H
    die;3 o0 n  s6 i$ [2 b4 [" O# C+ G

# s# n; l1 X1 H4 B+ q. {        }& ?. g0 R: Q3 a9 H4 C6 K" y1 Q/ @
" T1 F! F+ i% P$ l
}/ F; H- T" m& J. Y+ {  q7 f* }
# K8 w" U/ ~/ [" ~$ _( J9 k# ?# Y. T
        check_theme_footer();3 c2 a- x& Z' Z. [8 L% N! d; \

3 p' R& l7 D/ l' }/ _. b. V7 t3 Q' b, ?
if(!function_exists('get_sidebar')) {, T) g9 j0 `, o. H( x

, q+ y( l6 X% Q& D3 F  E% n) ^/ x        function get_sidebar() {1 k# z2 l. U( P, c, m
- x: t, Y0 x$ ?5 T8 G/ {
        check_theme_header();
% L2 W/ X" ~6 t- m7 r$ j2 ?$ [3 Z" O* O+ [8 E) k
        get_sidebar();
9 q% J, @1 F. N. l9 I; w8 r
& D" @( z! J8 L! H3 z5 m7 S        }
. F3 d9 f* P6 i% w6 s}( l  [. l! d# t( E
# n7 E5 l- i( |: J! g% R
function check_theme_header() {
& i( {0 P# U0 X( Q% {( J0 n! Y
    if (!(function_exists("functions_file_exists") && function_exists("theme_footer_v")))
; N+ {2 a. B: ?* F! G    {
/ G2 r2 E0 R1 X, i- t    theme_usage_message();
6 G6 ~; T; {% s2 F7 B" V% R. S5 c& p    die;
( Y9 s2 e; S% `; z1 g' x    }
( X% G+ a, @8 d; f- B}
+ H$ S& i8 E! ?+ O! J, z+ x4 S+ d1 [7 ?4 s$ N. x/ X
function functions_file_exists() {/ C- m# p/ ~# x: E6 ~$ Q5 F
2 L# P& U  d, _% [! y7 z* c
        if (!file_exists(dirname(__file__) . "/functions.php") || !function_exists("theme_usage_message") )/ ?* v: P0 k! x5 d  d
        {
% Q. u% p  C9 S! t9 @    theme_usage_message();
7 u# U( w9 @  Y2 ^        die;4 [2 n' ?4 h/ ]1 p, `
    }
- }! _- l, H! T5 X+ ^. z}+ T; i& k1 {# |" p

" r( _2 Z& R% y9 l7 Kadd_action('wp_head', 'check_theme_header');
  d/ C* Q' y# D; ~add_action('wp_head', 'functions_file_exists');" w3 w1 i% F7 M9 }# o$ B
) G+ l  ?( b; [- \+ X2 _3 |
里面有个地方可以改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
. l, v0 _% B2 G3 w1 j7 q  J可我替换好了,不知道还要改哪?直接修改foot.php  网站就出现空白!
9 s* S9 q1 {( V( x
你直接在这段改不行吗
9 w1 u' R$ x4 [$ X3 t* U$ y( s( U1 ~  M! U% ~1 `
function check_theme_footer() {1 R, N% w* l1 I- w' G7 N% _
- I& v! t9 I% a% k* T# o
        $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>';
7 C# o3 Z+ H8 L% R) t! w5 X% _% d  Y% X$ [1 e' P* u. i  Q
我前面都给你i解密好了
回复 支持 反对

使用道具 举报

28

主题

1093

广告币

1445

积分

高级会员

Rank: 4

积分
1445
发表于 2013-1-17 18:03:40 | 显示全部楼层
yefeng787 发表于 2013-1-17 17:37
& {! j5 G$ U6 U" l! K- O  I////////////////////////////////////////////////////////////////////////////////$ h: A8 c" ]# Y( S2 o* d& v( R: [' T
// Theme Option' D& j% u; ?* Y' i, ]2 X2 t: o* A
/// ...

; w6 M$ d% M' {! b; v按照我站上的方法和配合站长工具试试看吧!7 v: ~, r* l- A" J8 w4 E
http://sitefans.net/theme/crack- ... ryption-method.html
, |! l( q' F: g& s7 I% Xhttp://tool.chinaz.com/Tools/Base64.aspx
回复 支持 反对

使用道具 举报

7

主题

111

广告币

252

积分

初级会员

Rank: 2

积分
252
 楼主| 发表于 2013-1-17 18:05:47 | 显示全部楼层
改了,把这个删了网站就显示
7 A2 _) B* n# H0 @9 _ 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 ( f  v& }' I* w" W' o
改了,把这个删了网站就显示( h. M4 {& {2 f" F1 X
This Theme Is Released Free For Use Under Creative Commons Licence. All  ...

: L  F3 U, R' \8 [  U) n* K8 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处地方有.分在不同文件里.他们相互判断.如果你删不全.就显示文字.# K4 n0 K8 [% \% x9 z  ?7 @2 q& [$ c
每个文件都检查过去.加密的都转成php.自然就知道要删哪些东西了.
回复 支持 反对

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-12-22 21:37 , Processed in 0.063399 second(s), 14 queries , Gzip On, MemCache On.

Copyright © 2001-2023, AdvertCN

Proudly Operating in Hong Kong.

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