@Ghazascanner
_2019runbot
Ghazascanner File Manager
server :Linux phosweb008 3.10.0-1160.el7.x86_64 #1 SMP Mon Oct 19 16:18:59 UTC 2020 x86_64
Current Path :
/
homepage
/
wordpress
/
wp-content
/
plugins
/
ktai_style
/
admin
/
Path :
Upload File :
New :
File
Dir
//homepage/wordpress/wp-content/plugins/ktai_style/admin/install.php
<?php add_action('init', array('Ktai_Style_Install', 'install')); add_action('deactivate_ktai_style/ktai_style.php', array('Ktai_Style_Install', 'uninstall')); /* ================================================== * Ktai Style Install class ================================================== */ class Ktai_Style_Install { public function install() { global $wpdb, $user_level; get_currentuserinfo(); if ($user_level < 8) { return; } $charset_collate = ''; if ( version_compare(mysql_get_server_info(), '4.1.0', '>=') ) { if ( ! empty($wpdb->charset) ) $charset_collate = "DEFAULT CHARACTER SET $wpdb->charset"; if ( ! empty($wpdb->collate) ) $charset_collate .= " COLLATE $wpdb->collate"; } $sql = "CREATE TABLE IF NOT EXISTS `{$wpdb->prefix}ktaisession` ( `sid` varchar(32) NOT NULL, `next_id` varchar(32) NULL default NULL, `expires` datetime NOT NULL default '0000-00-00 00:00:00', `user_login` varchar(60) NOT NULL default '', `user_pass` varchar(64) NOT NULL default '', `user_agent` varchar(255) NULL, `term_id` varchar(64) NULL, `sub_id` varchar(64) NULL, `data` text NULL, PRIMARY KEY (`sid`) ) $charset_collate;"; require_once ABSPATH . 'wp-admin/upgrade-functions.php'; dbDelta($sql); return; } public function uninstall() { global $wpdb, $user_level; get_currentuserinfo(); if ($user_level < 8) { return; } $sql = "DROP TABLE IF EXISTS `{$wpdb->prefix}ktaisession`;"; $wpdb->query($sql); return; } // ===== End of class ==================== } ?>