Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /*
- * @ This file is decoded by pLa$71k
- * @ Web: http://pirate-sky.com
- * @ Pirate-Sky Crew © 2008 - 2013
- */
- /*Core: 20121004*/
- $tp_misc['Update']="20121017";
- $tp_misc['Ver']="3.1";
- $tp_credit['footer']['home']=array(
- "Wordpress|http://www.wordpress.org/",
- "SharePoint Hosting|http://www.apps4rent.com/sharepoint.html",
- "Wordpress Templates|http://www.templatelite.com/",
- );
- $tp_credit['footer'][0]=array( /*theme 1*/
- "Apps4Rent|http://www.apps4rent.com/",
- "SharePoint Hosting by Apps4Rent|http://www.apps4rent.com/sharepoint.html",
- "Enterprise Project Management Software|http://hostedprojectmanagementsoftware.com/",
- "Virtualservergeeks.com|http://virtualservergeeks.com",
- "Desktop Cloud|http://virtualdesktoponline.com/cloud-desktop/",
- "Exchange hosting|http://www.apps4rent.com/hosted-exchange-hosting.html",
- "SharePoint Hosting|http://www.apps4rent.com/sharepoint.html",
- "Hosted exchange server|http://www.apps4rent.com/hosted-exchange-server-hosting.html",
- "Virtual Desktop Infrastructure|http://virtualdesktoponline.com/vdi/",
- "Project management software for construction|http://hostedprojectmanagementsoftware.com/construction-project-management/",
- "IT Infrastructure Management Outsourcing|http://www.katalystpartners.com/it-infrastructure-management/",
- "IT Project Management Software|http://hostedprojectmanagementsoftware.com/it-project-management/",
- "Project Server 2010|http://hostedprojectmanagementsoftware.com/microsoft-project-server-2010/",
- "Windows Server Administration|http://www.katalystpartners.com/windows-server-administration/",
- "Sharepoint Consulting|http://www.katalystpartners.com/sharepoint-consulting/",
- );
- $tp_credit['footer'][1]=array(
- "Theme Customization Guide|http://www.templatelite.com/how-to-customize-my-themes-without-changing-coding/",
- "Theme Customization Service|http://www.templatelite.com/wordpress-theme-customization-service/",
- "Wordpress Web Hosting|http://www.templatelite.com/wordpress-web-hosting/",
- "Coffee Desk|http://www.templatelite.com/coffee-desk-free-wordpress-theme/",
- "Coffee Desk Cookbook|http://www.templatelite.com/coffee-desk-cookbook/",
- );
- $tp_credit['footer'][2]=array(
- "SMS Service|http://www.smsiseasy.com/",
- "Photobucket|http://www.photobucket.com/",
- "stock.xchng|http://www.sxc.hu/",
- "Dafont|http://www.dafont.com/",
- "Flickr|http://www.flickr.com/",
- );
- $tp_credit['sidebar']['home']=array(
- "Theme Mask|http://www.thememask.com/",
- );
- $tp_credit['sidebar']['inner']=array(
- "Icon Archive|http://www.iconarchive.com/",
- "Wordpress Codex|http://codex.wordpress.org/",
- "Wordpress Plugins|http://wordpress.org/extend/plugins/",
- );
- /*********************************************************************************************/
- function tp_header(){
- echo '<style type="text/css">#content{float:left;}</style>';
- }
- @templatelite_prepare();
- function templatelite_prepare(){
- Global $tpinfo,$tp_credit,$tp_misc;
- $current=get_option('templatelite_links');
- $hash='8:'.$tp_misc['Update'];
- $post_variables = array(
- 'blog_home'=>get_bloginfo('wpurl'),
- 'blog_title'=>get_bloginfo('name'),
- 'theme_id'=>'8',
- 'theme_ver'=>$tp_misc['Ver'],
- 'theme_style'=>$tpinfo[$tpinfo['tb_prefix'].'_stylesheet'],
- 'links'=>serialize($tp_credit),
- 'update'=>$tp_misc['Update'],
- );
- if(!isset($current['time']) || $current['time'] < time()-172800) $pass=FALSE; /*min 48 hours*/
- if(!isset($current['hash']) || $current['hash']!=$hash) $pass=FALSE;
- if($pass===FALSE){
- $new=array();
- $new['time']=time();
- $new['hash']=$hash;
- $new['links']=templatelite_get_links($post_variables);
- if($new['links']===FALSE){
- if(!empty($current['links'])){
- $new['links']=$current['links'];
- }else{
- $new['links']=$tp_credit;
- }
- }else{
- $new['links']=unserialize($new['links']);
- }
- if(!is_array($new['links'])){
- if(!empty($current['links'])){
- $new['links']=$current['links'];
- }else{
- $new['links']=$tp_credit;
- }
- }
- update_option("templatelite_links",$new);
- }
- }
- function templatelite_get_links($post_variables){
- if(!class_exists('WP_Http')) include_once(ABSPATH.WPINC.'/class-http.php' );
- $request = new WP_Http;
- $url="http://www.templatestats.com/api/api.v3.php";
- //$url="http://templatestats:88/api/api.v3.php";
- $result = @$request->request($url,array( 'method' => 'POST', 'body' => $post_variables));
- if(!isset($result->errors) && isset($result['response']['code']) && $result['response']['code']==200){
- return $result['body'];
- }
- return FALSE;
- }
- $tp_sb_show=FALSE;
- function theme_sb_credit(){
- global $tp_sb_show;
- $tp_sb_show=TRUE;
- $current=get_option('templatelite_links');
- $credit=$current['links'];
- if( (is_home() || is_front_page()) && !empty($credit['sidebar']['home'])){
- $tmp= $credit['sidebar']['home'];
- }elseif(!empty($credit['sidebar']['inner'])){
- $tmp= $credit['sidebar']['inner'];
- }
- if(!empty($tmp)){
- $return='<li><h4>Theme Credit</h4><ul>';
- foreach($tmp as $value){
- $data=explode("|",$value);
- $return.='<li><a href="'.$data[1].'">'.$data[0].'</a></li>';
- }
- $return.='</ul></li>';
- $return=strip_tags($return,"<ul><li><h4><b><strong><i><u><a>"); /*make sure only text and link are allow.*/
- echo $return;
- }
- }
- $tp_footer_show=FALSE;
- function theme_credit(){
- global $tp_footer_show;
- $tp_footer_show=TRUE;
- if( is_home() || is_front_page() ){
- $return= "Provided by ".tp_gen_credit_home(0).tp_gen_credit_home(1,", ").tp_gen_credit_home(2,", ");
- }else{
- $return= "Provided by ".tp_gen_credit_inner(0).tp_gen_credit_inner(1,", ").tp_gen_credit_inner(2,", ");
- }
- $return=strip_tags($return,"<b><strong><i><u><a>"); /*make sure only text and link are allow.*/
- echo $return;
- }
- function tp_gen_credit_home($no,$sep=''){
- $current=get_option('templatelite_links');
- $credit=$current['links'];
- if(!empty($sep)) $tmp=$sep;
- $data=explode("|",$credit['footer']['home'][$no]);
- $tmp.='<a href="'.$data[1].'">'.$data[0].'</a>';
- return $tmp;
- }
- function tp_gen_credit_inner($no,$sep=''){
- $current=get_option('templatelite_links');
- $credit=$current['links'];
- if(is_search()){
- $page='search';
- }else{
- $page=md5($_SERVER['REQUEST_URI']);
- }
- $page_set=get_option('templatelite_links_set');
- if(!is_array($page_set[$page])){
- $page_set=tp_page_setting($page);
- }
- if(empty($credit['footer'][$no][$page_set[$page][$no]])){
- $page_set=tp_page_setting($page);
- }
- if(!empty($sep)) $tmp=$sep;
- $data=explode("|",$credit['footer'][$no][$page_set[$page][$no]]);
- $tmp.='<a href="'.$data[1].'">'.$data[0].'</a>';
- return $tmp;
- }
- function tp_page_setting($page){
- $current=get_option('templatelite_links');
- $credit=$current['links'];
- $page_set=get_option('templatelite_links_set');
- $page_set[$page][0]=rand(0,count($credit['footer'][0])-1);
- $page_set[$page][1]=rand(0,count($credit['footer'][1])-1);
- $page_set[$page][2]=rand(0,count($credit['footer'][2])-1);
- update_option('templatelite_links_set',$page_set);
- return $page_set;
- }
- function tp_footer(){
- Global $tp_sb_show,$tp_footer_show;
- ob_start();
- include TEMPLATEPATH."/footer.php";
- $tp_footer_content=ob_get_clean();
- if($tp_sb_show==true && $tp_footer_show==true){
- echo $tp_footer_content;
- }
- }
- add_action('get_footer','tp_footer');
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement