403Webshell
Server IP : 172.67.75.225  /  Your IP : 216.73.216.185
Web Server : nginx/1.27.1
System : Linux us-1 5.15.0-131-generic #141-Ubuntu SMP Fri Jan 10 21:18:28 UTC 2025 x86_64
User : vinodai ( 3134)
PHP Version : 7.4.33
Disable Function : exec,passthru,shell_exec,system,proc_open,popen,parse_ini_file,show_source
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /storage/v1396/chatgptkafila/public_html/wp-content/plugins/presto-player/inc/Database/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /storage/v1396/chatgptkafila/public_html/wp-content/plugins/presto-player/inc/Database/Table.php
<?php

namespace PrestoPlayer\Database;

class Table {

	/**
	 * Create a database table
	 *
	 * @param string  $name
	 * @param string  $columns
	 * @param integer $version
	 * @param array   $opts
	 * @return void
	 */
	public function create( $name, $columns, $version = 1, $opts = array() ) {
		$current_version = get_option( "{$name}_database_version", 0 );

		if ( $version == $current_version ) {
			return;
		}

		global $wpdb;

		$full_table_name = $wpdb->prefix . $name;

		$opts = wp_parse_args(
			$opts,
			array(
				'upgrade_method' => 'dbDelta',
				'table_options'  => '',
			)
		);

		$charset_collate = '';
		if ( $wpdb->has_cap( 'collation' ) ) {
			if ( ! empty( $wpdb->charset ) ) {
				$charset_collate = "DEFAULT CHARACTER SET $wpdb->charset";
			}
			if ( ! empty( $wpdb->collate ) ) {
				$charset_collate .= " COLLATE $wpdb->collate";
			}
		}

		$table_options = $charset_collate . ' ' . $opts['table_options'];

		// use dbDelta by default
		if ( 'dbDelta' == $opts['upgrade_method'] ) {
			require_once ABSPATH . 'wp-admin/includes/upgrade.php';
			dbDelta( "CREATE TABLE $full_table_name ( $columns ) $table_options" );
			update_option( "{$name}_database_version", $version );
			return;
		}

		if ( 'delete_first' == $opts['upgrade_method'] ) {
			$wpdb->query( "DROP TABLE IF EXISTS $full_table_name;" );
		}

		$wpdb->query( "CREATE TABLE IF NOT EXISTS $full_table_name ( $columns ) $table_options;" );

		update_option( "{$name}_database_version", $version );
	}

	/**
	 * Drops the table and database option
	 *
	 * @param string $name
	 * @return void
	 */
	public function drop( $name ) {
		global $wpdb;
		$wpdb->query( 'DROP TABLE IF EXISTS ' . $name );
		delete_option( "presto_courses_{$name}_database_version" );
	}

	public function exists( $name ) {
		global $wpdb;
		$table_name = $wpdb->prefix . $name;
		$query      = $wpdb->prepare( 'SHOW TABLES LIKE %s', $wpdb->esc_like( $table_name ) );
		if ( $wpdb->get_var( $query ) == $table_name ) {
			return true;
		}
		return false;
	}
}

Youez - 2016 - github.com/yon3zu
LinuXploit