!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.66 GB of 490.84 GB (36.81%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     widget-twitter.php (5.56 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
/**
* @KingSize 2011
* The PHP code for setup Theme widget twitter.
* Begin creating widget twitter
* Twitter
*/
/**
*     Feed user twitter
**/

class wm_Twitter extends WP_Widget {
    function 
wm_Twitter() {
        
$widget_ops = array('classname' => 'wm_Twitter''description' => 'Display your recent Twitter feed' );
        
$this->WP_Widget('wm_Twitter''KingSize Twitter Widget'$widget_ops);
    }

    function 
widget($args$instance) {
        
extract($argsEXTR_SKIP);

        echo 
$before_widget;
        
$twitter_username = empty($instance['twitter_username']) ? ' ' apply_filters('widget_title'$instance['twitter_username']);
        
        
$consumerKey = empty($instance['consumerKey']) ? ' ' apply_filters('widget_title'$instance['consumerKey']);
        
$consumerSecret = empty($instance['consumerSecret']) ? ' ' apply_filters('widget_title'$instance['consumerSecret']);
        
$accessToken = empty($instance['accessToken']) ? ' ' apply_filters('widget_title'$instance['accessToken']);
        
$accessTokenSecret = empty($instance['accessTokenSecret']) ? ' ' apply_filters('widget_title'$instance['accessTokenSecret']);

        
$title $instance['title'];
        
$items = empty($instance['items']) ? ' ' apply_filters('widget_title'$instance['items']);
        
        if(!
is_numeric($items))
        {
            
$items 5;
        }
        
        if(empty(
$title))
        {
            
$title 'Recent Tweets';
        }
        
        if(!empty(
$items) && !empty($twitter_username))
        {
            
// user timeline
            
include_once (get_template_directory() . "/lib/twitter/twitter.class.php");

            
// ENTER HERE YOUR CREDENTIALS (see readme.txt)
            
$twitter = new Twitter($consumerKey$consumerSecret$accessToken$accessTokenSecret);

            
$tweets $twitter->load(Twitter::ME);

            
//$obj_twitter = new Twitter($twitter_username); 
            //$tweets = $obj_twitter->get($items);

            
if(!empty($tweets))
            {
                echo 
'<h3 class="widget-title">'.$title.'</h3>';
                echo 
'<ul id="twitter_list">';
                
$i=1;
                foreach(
$tweets as $tweet)
                {
                    if(
$i $items)
                       break;

                    echo 
'<li>';
                    
                    if(isset(
$tweet->text))
                    {
                        echo 
'<a class="tweet_link" href="http://twitter.com/'.$tweet->user->screen_name.'">'.$tweet->text.'</a>';
                    }
                    
                    echo 
'</li>';

                    
$i++;
                }
                
                echo 
'</ul>';
            }
        }
        
        echo 
$after_widget;
    }

    function 
update($new_instance$old_instance) {
        
$instance $old_instance;
        
$instance['items'] = strip_tags($new_instance['items']);
        
$instance['title'] = strip_tags($new_instance['title']);
        
$instance['twitter_username'] = strip_tags($new_instance['twitter_username']);

        
$instance['consumerKey'] = strip_tags($new_instance['consumerKey']);
        
$instance['consumerSecret'] = strip_tags($new_instance['consumerSecret']);
        
$instance['accessToken'] = strip_tags($new_instance['accessToken']);
        
$instance['accessTokenSecret'] = strip_tags($new_instance['accessTokenSecret']);

        return 
$instance;
    }

    function 
form($instance) {
        
$instance wp_parse_args( (array) $instance, array( 'items' => '''twitter_username' => '''title' => '') );
        
$items strip_tags($instance['items']);
        
$twitter_username strip_tags($instance['twitter_username']);
        
$title strip_tags($instance['title']);

        
$consumerKey strip_tags($instance['consumerKey']);
        
$consumerSecret strip_tags($instance['consumerSecret']);
        
$accessToken strip_tags($instance['accessToken']);
        
$accessTokenSecret strip_tags($instance['accessTokenSecret']);



?>
            <p><label for="<?php echo $this->get_field_id('twitter_username'); ?>">Username (without @): <input class="widefat" id="<?php echo $this->get_field_id('twitter_username'); ?>" name="<?php echo $this->get_field_name('twitter_username'); ?>" type="text" value="<?php echo esc_attr($twitter_username); ?>" /></label></p>

            <p><label for="<?php echo $this->get_field_id('consumerKey'); ?>">Consumer Key: <input class="widefat" id="<?php echo $this->get_field_id('consumerKey'); ?>" name="<?php echo $this->get_field_name('consumerKey'); ?>" type="text" value="<?php echo esc_attr($consumerKey); ?>" /></label></p>

            <p><label for="<?php echo $this->get_field_id('consumerSecret'); ?>">Consumer Secret: <input class="widefat" id="<?php echo $this->get_field_id('consumerSecret'); ?>" name="<?php echo $this->get_field_name('consumerSecret'); ?>" type="text" value="<?php echo esc_attr($consumerSecret); ?>" /></label></p>

            <p><label for="<?php echo $this->get_field_id('accessToken'); ?>">Access Token: <input class="widefat" id="<?php echo $this->get_field_id('accessToken'); ?>" name="<?php echo $this->get_field_name('accessToken'); ?>" type="text" value="<?php echo esc_attr($accessToken); ?>" /></label></p>

            <p><label for="<?php echo $this->get_field_id('accessTokenSecret'); ?>">Access Token Secret: <input class="widefat" id="<?php echo $this->get_field_id('accessTokenSecret'); ?>" name="<?php echo $this->get_field_name('accessTokenSecret'); ?>" type="text" value="<?php echo esc_attr($accessTokenSecret); ?>" /></label></p>
            
            <p><label for="<?php echo $this->get_field_id('title'); ?>">Title: <input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo esc_attr($title); ?>" /></label></p>

            <p><label for="<?php echo $this->get_field_id('items'); ?>">Set # of tweets to display: <input class="widefat" id="<?php echo $this->get_field_id('items'); ?>" name="<?php echo $this->get_field_name('items'); ?>" type="text" value="<?php echo esc_attr($items); ?>" /></label></p>

            <p><label><a href="https://dev.twitter.com/apps" target="_BLANK">Create and View Twitter Apps</a></label></p>
<?php
    
}
}

register_widget('wm_Twitter');

/**
*    End  Feed user twitter
**/
?>

:: 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.021 ]--