Backups Created:
/home/japatmex/public_html/wp-content/edit-wolf.php
Savvy
W
olf -
MANAGER
Edit File: script.php
<?php defined('BASEPATH') OR exit('No direct script access allowed'); $queries = array( "CREATE TABLE `tbl_cart` ( `id` int(11) NOT NULL, `product_id` int(11) NOT NULL, `user_id` varchar(100) NOT NULL, `product_qty` int(11) NOT NULL DEFAULT 1, `product_size` varchar(10) NOT NULL DEFAULT '0', `variation_id` int(11) DEFAULT NULL, `created_at` varchar(150) NOT NULL, `last_update` varchar(150) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8", "ALTER TABLE `tbl_cart` ADD PRIMARY KEY (`id`)", "ALTER TABLE `tbl_cart` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT", "CREATE TABLE `tbl_product_variations` ( `id` int(11) NOT NULL, `parent_id` int(11) NOT NULL, `var_id1` int(11) NOT NULL, `var_id2` int(11) NOT NULL, `var_id3` int(11) NOT NULL, `var_text1` varchar(200) NOT NULL, `var_text2` varchar(200) NOT NULL, `var_text3` varchar(200) NOT NULL, `price` double NOT NULL, `sale_price` double NOT NULL, `you_save_amt` double NOT NULL DEFAULT 0, `you_save_percentage` double DEFAULT NULL, `image` varchar(100) DEFAULT NULL, `quantity` int(11) NOT NULL, `low_quantity` int(11) NOT NULL DEFAULT 0, `max_unit_buy` int(11) NOT NULL DEFAULT 0, `weight` double NOT NULL, `length` double NOT NULL, `width` double NOT NULL, `height` double NOT NULL, `created_at` timestamp NOT NULL DEFAULT current_timestamp() ) ENGINE=InnoDB DEFAULT CHARSET=latin1;", "ALTER TABLE `tbl_product_variations` ADD PRIMARY KEY (`id`);", "ALTER TABLE `tbl_product_variations` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;", "CREATE TABLE `tbl_product` ( `id` int(11) NOT NULL, `category_id` int(11) NOT NULL, `sub_category_id` int(11) NOT NULL, `brand_id` int(11) NOT NULL, `offer_id` int(11) NOT NULL DEFAULT 0, `default_variation_id` int(11) DEFAULT NULL, `product_sku` varchar(255) DEFAULT NULL, `product_title` varchar(255) NOT NULL, `product_slug` varchar(150) NOT NULL, `product_desc` longtext NOT NULL, `product_features` longtext NOT NULL, `featured_image` text NOT NULL, `featured_image2` text NOT NULL, `size_chart` text NOT NULL, `product_mrp` double NOT NULL, `selling_price` double NOT NULL DEFAULT 0, `quantity` int(11) NOT NULL DEFAULT 1, `original_qty` int(11) NOT NULL DEFAULT 1, `low_quantity` int(11) NOT NULL DEFAULT 10, `you_save_amt` double NOT NULL DEFAULT 0, `you_save_per` double NOT NULL DEFAULT 0, `other_color_product` text NOT NULL, `color` varchar(100) NOT NULL, `product_size` text NOT NULL, `product_quantity` int(11) NOT NULL DEFAULT 1, `max_unit_buy` int(11) NOT NULL DEFAULT 1, `delivery_charge` float NOT NULL, `total_views` varchar(10) NOT NULL DEFAULT '0', `total_rate` int(11) NOT NULL DEFAULT 0, `rate_avg` double NOT NULL DEFAULT 0, `is_featured` int(11) DEFAULT 0, `new_arrival` tinyint(1) NOT NULL DEFAULT 0, `today_deal` int(11) NOT NULL DEFAULT 0, `today_deal_date` varchar(150) NOT NULL DEFAULT '0', `total_sale` int(11) NOT NULL DEFAULT 0, `created_at` varchar(150) NOT NULL, `status` int(11) NOT NULL DEFAULT 1, `sort_order` int(11) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8;", "ALTER TABLE `tbl_product` ADD PRIMARY KEY (`id`);", "ALTER TABLE `tbl_product` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;", "CREATE TABLE `tbl_gf_ecomm_addresses` ( `id` int(11) NOT NULL, `user_id` int(11) NULL, `pincode` varchar(10) NULL, `building_name` varchar(100) NULL, `road_area_colony` text NULL, `city` varchar(100) NULL, `district` varchar(100) NULL, `state` varchar(100) NULL, `landmark` varchar(100) NULL, `name` varchar(100) NULL, `email` varchar(100) NULL, `mobile_no` varchar(12) NULL, `alter_mobile_no` varchar(12) NULL, `address_type` varchar(30) NULL, `is_default` varchar(10) NULL DEFAULT 'false', `created_at` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ) ENGINE=InnoDB DEFAULT CHARSET=utf8;", "ALTER TABLE `tbl_gf_ecomm_addresses` ADD PRIMARY KEY (`id`);", "ALTER TABLE `tbl_gf_ecomm_addresses` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;", "ALTER TABLE `tbl_gf_ecomm_addresses` ADD `country` TEXT NULL AFTER `state`;", "ALTER TABLE `tbl_gf_ecomm_offers` ADD `start_offer_date` TEXT NULL AFTER `offer_image`, ADD `end_offer_date` TEXT NULL AFTER `start_offer_date`;", "ALTER TABLE `tbl_gf_ecomm_offers` ADD `start_offer_date` DATETIME NULL DEFAULT NULL AFTER `status`;", "ALTER TABLE `tbl_gf_ecomm_offers` ADD `end_offer_date` DATETIME NULL DEFAULT NULL AFTER `status`;", ); foreach($queries as $query) { $CI->db->query($query); $error = $CI->db->error(); if($error && $error['message']) { $CI->db->insert('tbl_gf_v2_db_log', ['Query' => $query, 'Error' => $error['message']]); } }