!C99Shell v. 1.0 pre-release build #13!

Software: Apache. PHP/5.5.15 

uname -a: Windows NT SVR-DMZ 6.1 build 7600 (Windows Server 2008 R2 Enterprise Edition) i586 

SYSTEM 

Safe-mode: OFF (not secure)

C:\cumbreclima\wp-content\plugins\wordpress-seo\admin\   drwxrwxrwx
Free 4.13 GB of 39.52 GB (10.45%)
Detected drives: [ a ] [ c ] [ d ] [ e ] [ f ]
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     class-yoast-notification-center.php (3.35 KB)      -rw-rw-rw-
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
/**
 * @package WPSEO\Admin
 */

/**
 * Handles notifications storage and display.
 */
class Yoast_Notification_Center {

    const 
TRANSIENT_KEY 'yoast_notifications';

    
/**
     * The singleton instance of this object
     *
     * @var \Yoast_Notification_Center
     */
    
private static $instance null;

    
/**
     * @var array
     */
    
private $notifications = array();

    
/**
     * Construct
     */
    
private function __construct() {

        
// Load the notifications from cookie
        
$this->notifications $this->get_notifications_from_transient();

        
// Clear the cookie
        
if ( count$this->notifications ) > ) {
            
$this->remove_transient();
        }

        
add_action'all_admin_notices', array( $this'display_notifications' ) );
        
add_action'shutdown', array( $this'set_transient' ) );
        
add_action'wp_ajax_yoast_get_notifications', array( $this'ajax_get_notifications' ) );
    }

    
/**
     * Singleton getter
     *
     * @return Yoast_Notification_Center
     */
    
public static function get() {

        if ( 
null == self::$instance ) {
            
self::$instance = new self();
        }

        return 
self::$instance;
    }

    
/**
     * Get the notifications from cookie
     *
     * @return array
     */
    
private function get_notifications_from_transient() {

        
// The notifications array
        
$notifications = array();

        
$transient_notifications get_transientself::TRANSIENT_KEY );

        
// Check if cookie is set
        
if ( false !== $transient_notifications ) {

            
// Get json notifications from cookie
            
$json_notifications json_decode$transient_notificationstrue );

            
// Create Yoast_Notification objects
            
if ( count$json_notifications ) > ) {
                foreach ( 
$json_notifications as $json_notification ) {
                    
$notifications[] = new Yoast_Notification$json_notification['message'], $json_notification['options'] );
                }
            }
        }

        return 
$notifications;
    }

    
/**
     * Clear the cookie
     */
    
private function remove_transient() {
        
delete_transientself::TRANSIENT_KEY );
    }

    
/**
     * Clear local stored notifications
     */
    
private function clear_notifications() {
        
$this->notifications = array();
    }

    
/**
     * Write the notifications to a cookie (hooked on shutdown)
     */
    
public function set_transient() {

        
// Count local stored notifications
        
if ( count$this->notifications ) > ) {

            
// Create array with all notifications
            
$arr_notifications = array();

            
// Add each notification as array to $arr_notifications
            
foreach ( $this->notifications as $notification ) {
                
$arr_notifications[] = $notification->to_array();
            }

            
// Set the cookie with notifications
            
set_transientself::TRANSIENT_KEYjson_encode$arr_notifications ), ( MINUTE_IN_SECONDS 10 ) );
        }
    }

    
/**
     * Add notification to the cookie
     *
     * @param Yoast_Notification $notification
     */
    
public function add_notificationYoast_Notification $notification ) {
        
$this->notifications[] = $notification;
    }

    
/**
     * Display the notifications
     */
    
public function display_notifications() {
        
$this->notifications array_unique$this->notifications );

        
// Display notifications
        
if ( count$this->notifications ) > ) {
            foreach ( 
$this->notifications as $notification ) {
                echo 
$notification;
            }
        }

        
// Clear the local stored notifications
        
$this->clear_notifications();
    }

    
/**
     * AJAX display notifications
     */
    
public function ajax_get_notifications() {

        
// Display the notices
        
$this->display_notifications();

        
// AJAX die
        
exit;
    }

}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ ok ]

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

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

--[ c99shell v. 1.0 pre-release build #13 powered by Captain Crunch Security Team | http://ccteam.ru | Generation time: 0.0156 ]--