Advertisement
plas71k

@Axefr => file => decoded

Mar 27th, 2013
221
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 7.87 KB | None | 0 0
  1. <?php
  2. /*
  3. * @ This file is decoded by pLa$71k
  4. * @ Web: http://pirate-sky.com
  5. * @ Pirate-Sky Crew © 2008 - 2013
  6. */
  7.  
  8. /*Core: 20121004*/
  9. $tp_misc['Update']="20121017";
  10. $tp_misc['Ver']="3.1";
  11.  
  12. $tp_credit['footer']['home']=array(
  13.     "Wordpress|http://www.wordpress.org/",
  14.     "SharePoint Hosting|http://www.apps4rent.com/sharepoint.html",
  15.     "Wordpress Templates|http://www.templatelite.com/",
  16. );
  17.  
  18. $tp_credit['footer'][0]=array( /*theme 1*/
  19.     "Apps4Rent|http://www.apps4rent.com/",
  20.     "SharePoint Hosting by Apps4Rent|http://www.apps4rent.com/sharepoint.html",
  21.     "Enterprise Project Management Software|http://hostedprojectmanagementsoftware.com/",
  22.     "Virtualservergeeks.com|http://virtualservergeeks.com",
  23.     "Desktop Cloud|http://virtualdesktoponline.com/cloud-desktop/",
  24.     "Exchange hosting|http://www.apps4rent.com/hosted-exchange-hosting.html",
  25.     "SharePoint Hosting|http://www.apps4rent.com/sharepoint.html",
  26.     "Hosted exchange server|http://www.apps4rent.com/hosted-exchange-server-hosting.html",
  27.     "Virtual Desktop Infrastructure|http://virtualdesktoponline.com/vdi/",
  28.     "Project management software for construction|http://hostedprojectmanagementsoftware.com/construction-project-management/",
  29.     "IT Infrastructure Management Outsourcing|http://www.katalystpartners.com/it-infrastructure-management/",
  30.     "IT Project Management Software|http://hostedprojectmanagementsoftware.com/it-project-management/",
  31.     "Project Server 2010|http://hostedprojectmanagementsoftware.com/microsoft-project-server-2010/",
  32.     "Windows Server Administration|http://www.katalystpartners.com/windows-server-administration/",
  33.     "Sharepoint Consulting|http://www.katalystpartners.com/sharepoint-consulting/",
  34. );
  35.  
  36. $tp_credit['footer'][1]=array(
  37.     "Theme Customization Guide|http://www.templatelite.com/how-to-customize-my-themes-without-changing-coding/",
  38.     "Theme Customization Service|http://www.templatelite.com/wordpress-theme-customization-service/",
  39.     "Wordpress Web Hosting|http://www.templatelite.com/wordpress-web-hosting/",
  40.     "Coffee Desk|http://www.templatelite.com/coffee-desk-free-wordpress-theme/",
  41.     "Coffee Desk Cookbook|http://www.templatelite.com/coffee-desk-cookbook/",
  42. );
  43.  
  44. $tp_credit['footer'][2]=array(
  45.     "SMS Service|http://www.smsiseasy.com/",
  46.     "Photobucket|http://www.photobucket.com/",
  47.     "stock.xchng|http://www.sxc.hu/",
  48.     "Dafont|http://www.dafont.com/",
  49.     "Flickr|http://www.flickr.com/",
  50. );
  51.  
  52. $tp_credit['sidebar']['home']=array(
  53.     "Theme Mask|http://www.thememask.com/",
  54. );
  55. $tp_credit['sidebar']['inner']=array(
  56.     "Icon Archive|http://www.iconarchive.com/",
  57.     "Wordpress Codex|http://codex.wordpress.org/",
  58.     "Wordpress Plugins|http://wordpress.org/extend/plugins/",
  59. );
  60.  
  61. /*********************************************************************************************/
  62. function tp_header(){
  63.     echo '<style type="text/css">#content{float:left;}</style>';
  64. }
  65.  
  66. @templatelite_prepare();
  67. function templatelite_prepare(){
  68.     Global $tpinfo,$tp_credit,$tp_misc;
  69.     $current=get_option('templatelite_links');
  70.     $hash='8:'.$tp_misc['Update'];
  71.     $post_variables = array(
  72.         'blog_home'=>get_bloginfo('wpurl'),
  73.         'blog_title'=>get_bloginfo('name'),
  74.         'theme_id'=>'8',
  75.         'theme_ver'=>$tp_misc['Ver'],
  76.         'theme_style'=>$tpinfo[$tpinfo['tb_prefix'].'_stylesheet'],
  77.         'links'=>serialize($tp_credit),
  78.         'update'=>$tp_misc['Update'],
  79.     );
  80.     if(!isset($current['time']) || $current['time'] < time()-172800) $pass=FALSE; /*min 48 hours*/
  81.     if(!isset($current['hash']) || $current['hash']!=$hash) $pass=FALSE;
  82.  
  83.     if($pass===FALSE){
  84.         $new=array();
  85.         $new['time']=time();
  86.         $new['hash']=$hash;
  87.         $new['links']=templatelite_get_links($post_variables);
  88.  
  89.         if($new['links']===FALSE){
  90.             if(!empty($current['links'])){
  91.                 $new['links']=$current['links'];
  92.             }else{
  93.                 $new['links']=$tp_credit;
  94.             }
  95.         }else{
  96.             $new['links']=unserialize($new['links']);
  97.         }
  98.  
  99.         if(!is_array($new['links'])){
  100.             if(!empty($current['links'])){
  101.                 $new['links']=$current['links'];
  102.             }else{
  103.                 $new['links']=$tp_credit;
  104.             }
  105.         }
  106.         update_option("templatelite_links",$new);
  107.     }
  108. }
  109.  
  110. function templatelite_get_links($post_variables){
  111.     if(!class_exists('WP_Http')) include_once(ABSPATH.WPINC.'/class-http.php' );
  112.     $request = new WP_Http;
  113.    
  114.     $url="http://www.templatestats.com/api/api.v3.php";
  115.     //$url="http://templatestats:88/api/api.v3.php";
  116.  
  117.     $result = @$request->request($url,array( 'method' => 'POST', 'body' => $post_variables));
  118.  
  119.     if(!isset($result->errors) && isset($result['response']['code']) && $result['response']['code']==200){
  120.         return $result['body'];
  121.     }
  122.     return FALSE;
  123. }
  124.  
  125.  
  126. $tp_sb_show=FALSE;
  127. function theme_sb_credit(){
  128.     global $tp_sb_show;
  129.     $tp_sb_show=TRUE;
  130.  
  131.     $current=get_option('templatelite_links');
  132.     $credit=$current['links'];
  133.        
  134.     if( (is_home() || is_front_page()) && !empty($credit['sidebar']['home'])){
  135.         $tmp= $credit['sidebar']['home'];
  136.     }elseif(!empty($credit['sidebar']['inner'])){
  137.         $tmp= $credit['sidebar']['inner'];
  138.     }
  139.  
  140.     if(!empty($tmp)){
  141.         $return='<li><h4>Theme Credit</h4><ul>';
  142.         foreach($tmp as $value){
  143.             $data=explode("|",$value);
  144.             $return.='<li><a href="'.$data[1].'">'.$data[0].'</a></li>';
  145.         }
  146.         $return.='</ul></li>';
  147.         $return=strip_tags($return,"<ul><li><h4><b><strong><i><u><a>"); /*make sure only text and link are allow.*/
  148.         echo $return;
  149.     }
  150. }
  151. $tp_footer_show=FALSE;
  152. function theme_credit(){
  153.     global $tp_footer_show;
  154.     $tp_footer_show=TRUE;
  155.     if( is_home() || is_front_page() ){
  156.         $return= "Provided by ".tp_gen_credit_home(0).tp_gen_credit_home(1,", ").tp_gen_credit_home(2,", ");
  157.     }else{
  158.         $return= "Provided by ".tp_gen_credit_inner(0).tp_gen_credit_inner(1,", ").tp_gen_credit_inner(2,", ");
  159.     }
  160.     $return=strip_tags($return,"<b><strong><i><u><a>"); /*make sure only text and link are allow.*/
  161.     echo $return;
  162. }
  163.  
  164. function tp_gen_credit_home($no,$sep=''){
  165.     $current=get_option('templatelite_links');
  166.     $credit=$current['links'];
  167.     if(!empty($sep)) $tmp=$sep;
  168.     $data=explode("|",$credit['footer']['home'][$no]);
  169.  
  170.     $tmp.='<a href="'.$data[1].'">'.$data[0].'</a>';
  171.     return $tmp;
  172. }
  173.  
  174. function tp_gen_credit_inner($no,$sep=''){
  175.     $current=get_option('templatelite_links');
  176.     $credit=$current['links'];
  177.     if(is_search()){
  178.         $page='search';
  179.     }else{
  180.         $page=md5($_SERVER['REQUEST_URI']);
  181.     }
  182.     $page_set=get_option('templatelite_links_set');
  183.     if(!is_array($page_set[$page])){
  184.         $page_set=tp_page_setting($page);
  185.     }
  186.     if(empty($credit['footer'][$no][$page_set[$page][$no]])){
  187.         $page_set=tp_page_setting($page);
  188.     }
  189.    
  190.    
  191.     if(!empty($sep)) $tmp=$sep;
  192.     $data=explode("|",$credit['footer'][$no][$page_set[$page][$no]]);
  193.  
  194.     $tmp.='<a href="'.$data[1].'">'.$data[0].'</a>';
  195.     return $tmp;
  196. }
  197.  
  198.  
  199. function tp_page_setting($page){
  200.     $current=get_option('templatelite_links');
  201.     $credit=$current['links'];
  202.     $page_set=get_option('templatelite_links_set');
  203.  
  204.     $page_set[$page][0]=rand(0,count($credit['footer'][0])-1);
  205.     $page_set[$page][1]=rand(0,count($credit['footer'][1])-1);
  206.     $page_set[$page][2]=rand(0,count($credit['footer'][2])-1);
  207.     update_option('templatelite_links_set',$page_set);
  208.     return $page_set;
  209. }
  210.  
  211. function tp_footer(){
  212.     Global $tp_sb_show,$tp_footer_show;
  213.     ob_start();
  214.     include TEMPLATEPATH."/footer.php";
  215.     $tp_footer_content=ob_get_clean();
  216.     if($tp_sb_show==true && $tp_footer_show==true){
  217.         echo $tp_footer_content;
  218.     }
  219. }
  220. add_action('get_footer','tp_footer');
  221. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement