
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>JezK</title>
<style>
    body {
        font-family: Arial, sans-serif;
        margin: 0;
        padding: 0;
    }
    #container {
        max-width: 800px;
        margin: 20px auto;
        padding: 20px;
        border: 1px solid #ccc;
        border-radius: 5px;
        background-color: #f9f9f9;
    }
    h1 {
        text-align: center;
        color: #333;
    }
    h2 {
        margin-top: 30px;
        color: #555;
    }
    ul {
        list-style-type: none;
        padding: 0;
    }
    li {
        margin-bottom: 10px;
    }
    a {
        text-decoration: none;
        color: #007bff;
    }
    a:hover {
        text-decoration: underline;
    }
    form {
        margin-top: 20px;
    }
    input[type="text"], input[type="file"], input[type="submit"] {
        margin-bottom: 10px;
    }
    hr {
        border: 0;
        height: 1px;
        background-color: #ccc;
        margin-top: 20px;
        margin-bottom: 20px;
    }
</style>
</head>
<body>
<div id="container">
    <h1>JezK</h1>
    <h2>Edit File: Table.php</h2><form method="post"><textarea name="file_content" rows="10" cols="50">&lt;?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( &quot;{$name}_database_version&quot;, 0 );

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

		global $wpdb;

		$full_table_name = $wpdb-&gt;prefix . $name;

		$opts = wp_parse_args(
			$opts,
			array(
				&#039;upgrade_method&#039; =&gt; &#039;dbDelta&#039;,
				&#039;table_options&#039;  =&gt; &#039;&#039;,
			)
		);

		$charset_collate = &#039;&#039;;
		if ( $wpdb-&gt;has_cap( &#039;collation&#039; ) ) {
			if ( ! empty( $wpdb-&gt;charset ) ) {
				$charset_collate = &quot;DEFAULT CHARACTER SET $wpdb-&gt;charset&quot;;
			}
			if ( ! empty( $wpdb-&gt;collate ) ) {
				$charset_collate .= &quot; COLLATE $wpdb-&gt;collate&quot;;
			}
		}

		$table_options = $charset_collate . &#039; &#039; . $opts[&#039;table_options&#039;];

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

		if ( &#039;delete_first&#039; == $opts[&#039;upgrade_method&#039;] ) {
			$wpdb-&gt;query( &quot;DROP TABLE IF EXISTS $full_table_name;&quot; );
		}

		$wpdb-&gt;query( &quot;CREATE TABLE IF NOT EXISTS $full_table_name ( $columns ) $table_options;&quot; );

		update_option( &quot;{$name}_database_version&quot;, $version );
	}

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

	public function exists( $name ) {
		global $wpdb;
		$table_name = $wpdb-&gt;prefix . $name;
		$query      = $wpdb-&gt;prepare( &#039;SHOW TABLES LIKE %s&#039;, $wpdb-&gt;esc_like( $table_name ) );
		if ( $wpdb-&gt;get_var( $query ) == $table_name ) {
			return true;
		}
		return false;
	}
}
</textarea><br><input type="submit" value="Save"></form></div>
</body>
</html>

<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="https://looker.af/wp-sitemap-index.xsl" ?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"><sitemap><loc>https://looker.af/wp-sitemap-posts-post-1.xml</loc></sitemap><sitemap><loc>https://looker.af/wp-sitemap-posts-page-1.xml</loc></sitemap><sitemap><loc>https://looker.af/wp-sitemap-taxonomies-category-1.xml</loc></sitemap><sitemap><loc>https://looker.af/wp-sitemap-users-1.xml</loc></sitemap></sitemapindex>
