!C99Shell v. 2.0 [PHP 7 Update] [25.02.2019]!

Software: Apache. PHP/7.3.33 

uname -a: Linux acloudg.aryanict.com 4.18.0-513.9.1.lve.el8.x86_64 #1 SMP Mon Dec 4 15:01:22 UTC
2023 x86_64
 

uid=1095(katebhospital) gid=1098(katebhospital) groups=1098(katebhospital) 

Safe-mode: OFF (not secure)

/var/softaculous/sitepad/editor/site-data/plugins/kkart-pro/packages/kkart-blocks/src/   drwxr-xr-x
Free 293.67 GB of 429.69 GB (68.34%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     Installer.php (3.35 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
namespace Automattic\Kkart\Blocks;

/**
 * Installer class.
 * Handles installation of Blocks plugin dependencies.
 *
 * @internal
 */
class Installer {
    
/**
     * Constructor
     */
    
public function __construct() {
        
$this->init();
    }

    
/**
     * Installation tasks ran on admin_init callback.
     */
    
public function install() {
        
$this->maybe_create_tables();
    }

    
/**
     * Initialize class features.
     */
    
protected function init() {
        
add_action'admin_init', array( $this'install' ) );
    }

    
/**
     * Set up the database tables which the plugin needs to function.
     */
    
public function maybe_create_tables() {
        global 
$wpdb;

        
$schema_version    260;
        
$db_schema_version = (int) get_option'kkart_blocks_db_schema_version');

        if ( 
$db_schema_version >= $schema_version && !== $db_schema_version ) {
            return;
        }

        
$show_errors $wpdb->hide_errors();
        
$table_name  $wpdb->prefix 'kkart_reserved_stock';
        
$collate     $wpdb->has_cap'collation' ) ? $wpdb->get_charset_collate() : '';
        
$exists      $this->maybe_create_table(
            
$wpdb->prefix 'kkart_reserved_stock',
            
"
            CREATE TABLE 
{$wpdb->prefix}kkart_reserved_stock (
                `order_id` bigint(20) NOT NULL,
                `product_id` bigint(20) NOT NULL,
                `stock_quantity` double NOT NULL DEFAULT 0,
                `timestamp` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
                `expires` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
                PRIMARY KEY  (`order_id`, `product_id`)
            ) 
$collate;
            "
        
);

        if ( 
$show_errors ) {
            
$wpdb->show_errors();
        }

        if ( ! 
$exists ) {
            return 
$this->add_create_table_notice$table_name );
        }

        
// Update succeeded. This is only updated when successful and validated.
        // $schema_version should be incremented when changes to schema are made within this method.
        
update_option'kkart_blocks_db_schema_version'$schema_version );
    }

    
/**
     * Create database table, if it doesn't already exist.
     *
     * Based on admin/install-helper.php maybe_create_table function.
     *
     * @param string $table_name Database table name.
     * @param string $create_sql Create database table SQL.
     * @return bool False on error, true if already exists or success.
     */
    
protected function maybe_create_table$table_name$create_sql ) {
        global 
$wpdb;
        
        
$_table_name strtolower($table_name);
        
$col $wpdb->get_col$wpdb->prepare'SHOW TABLES LIKE %s'$table_name ), );
        
        if ( 
in_array$_table_namearray_map('strtolower'$col), true ) ) {
            return 
true;
        }

        
$wpdb->query$create_sql ); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared
        
$col $wpdb->get_col$wpdb->prepare'SHOW TABLES LIKE %s'$table_name ), );
        
        return 
in_array$table_namearray_map('strtolower'$col), true );
    }

    
/**
     * Add a notice if table creation fails.
     *
     * @param string $table_name Name of the missing table.
     */
    
protected function add_create_table_notice$table_name ) {
        
add_action(
            
'admin_notices',
            function() use ( 
$table_name ) {
                echo 
'<div class="error"><p>';
                
printf(
                    
/* Translators: %1$s table name, %2$s database user, %3$s database name. */
                    
esc_html__'Kkart %1$s table creation failed. Does the %2$s user have CREATE privileges on the %3$s database?''kkart' ),
                    
'<code>' esc_html$table_name ) . '</code>',
                    
'<code>' esc_htmlDB_USER ) . '</code>',
                    
'<code>' esc_htmlDB_NAME ) . '</code>'
                
);
                echo 
'</p></div>';
            }
        );
    }
}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

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

--[ c99shell v. 2.0 [PHP 7 Update] [25.02.2019] maintained by KaizenLouie | C99Shell Github | Generation time: 0.0037 ]--