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( "ALTER TABLE `tbl_gf_payments` ADD `QRCode` VARCHAR(200) NULL DEFAULT NULL;", "ALTER TABLE `tbl_gf_payments` ADD `CreatedAt` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP", "CREATE TABLE `tbl_gf_api_calls` ( `id` int(11) NOT NULL, `userId` int(11) NOT NULL, `method` varchar(200) COLLATE utf8_unicode_ci NOT NULL, `lastCall` datetime NOT NULL )", "CREATE TABLE IF NOT EXISTS `tbl_gf_ticket_fields` ( `FieldId` int(11) NOT NULL, `FieldLabel` varchar(100) DEFAULT NULL, `FieldType` varchar(30) DEFAULT NULL, `FieldColName` varchar(100) DEFAULT NULL, `DisableField` tinyint(1) DEFAULT 0, `Mandatory` tinyint(1) DEFAULT 0 );", "CREATE TABLE IF NOT EXISTS `tbl_gf_tckt_dept_fields` ( `Id` int(11) NOT NULL, `DepartmentId` int(11) DEFAULT 0, `FieldId` int(11) DEFAULT 0 );", "ALTER TABLE `tbl_gf_api_calls` ADD PRIMARY KEY (`id`);", "ALTER TABLE `tbl_gf_api_calls` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;", "ALTER TABLE `tbl_gf_email_settings` ADD `loginLink` INT NOT NULL DEFAULT '1';", "ALTER TABLE `tbl_gf_email_settings` ADD `registerLink` INT NOT NULL DEFAULT '1';", "update `tbl_gf_email_settings` set `assets_version` = `assets_version` + 1;", "ALTER TABLE `tbl_gf_payment_methods` ADD `allowedMethod` TINYINT NULL;", "ALTER TABLE tbl_gf_tckt_category ADD internal_name VARCHAR(255) NULL DEFAULT NULL;", "ALTER TABLE tbl_gf_payment_methods ADD FlatFee FLOAT DEFAULT 0;", "ALTER TABLE tbl_gf_payments ADD InvoiceFlatFee FLOAT DEFAULT 0;", "ALTER TABLE tbl_gf_email_settings ADD RemoteServices tinyint(1) DEFAULT 0;", "INSERT INTO `tbl_gf_form_type` (`FormTypeId`, `FormType`, `InHeader`, `Class`, `FTOrderBy`) VALUES (23, 'Remote Services', 0, NULL, 5);", "UPDATE tbl_gf_form_type SET FTOrderBy = '2' WHERE FormTypeId = '23';", "UPDATE tbl_gf_form_type SET FTOrderBy = '4' WHERE FormTypeId = '3';", "UPDATE tbl_gf_form_type SET FTOrderBy = '5' WHERE FormTypeId = '20';", "INSERT INTO `tbl_gf_tckt_category` ( `TcktCategory`, `DisableTcktCategory`, ` DisableEdit `, ` type `, `internal_name`) VALUES ('Order Verification', '0', '1', 'Payment', 'Order Verification');", "INSERT INTO `tbl_gf_tckt_category` (`TcktCategory`, `DisableTcktCategory`, ` DisableEdit `, ` type `, `internal_name`) VALUES ('Order Delay', '0', '1', 'Order', 'Order Delay');", "UPDATE tbl_gf_tckt_category SET internal_name = TcktCategory;", "ALTER TABLE `tbl_gf_client_menu` ADD remoteservices varchar(100) DEFAULT 'Remote Services';", "ALTER TABLE tbl_gf_codes ADD RemoteOrder tinyint(1) DEFAULT 0;", "ALTER TABLE `tbl_gf_client_menu` ADD remoteorders varchar(100) DEFAULT 'Remote Orders';", "INSERT INTO `tbl_gf_form_type` (`FormTypeId`, `FormType`, `InHeader`, `Class`, `FTOrderBy`) VALUES (24, 'Remote', 1, NULL, 22);", "INSERT INTO `tbl_gf_forms` ( `Form`, `FormTypeId`, `FormURL`, `IsNew`, `HiddenForm`, `FormUrlNew`) VALUES ('New Remote Orders', '24', 'newimeiorders.php', '0', '0', '".$CI->config->item('apanel_name')."/services/newimeiorders?rms=3');", "INSERT INTO tbl_gf_forms (Form, FormTypeId, FormURL, IsNew, HiddenForm, FormURLNew) VALUES ('Manage Services', 23, '', 1, 0, '".$CI->config->item('apanel_name')."/services/services?fs=3');", "INSERT INTO `tbl_gf_forms` ( `Form`, `FormTypeId`, `FormURL`, `IsNew`, `HiddenForm`, `FormUrlNew`) VALUES ('Add Category', 23, '', 0, 1, '".$CI->config->item('apanel_name')."/services/category?fs=3');", "INSERT INTO `tbl_gf_forms` ( `Form`, `FormTypeId`, `FormURL`, `IsNew`, `HiddenForm`, `FormUrlNew`) VALUES ('Manage Categories', 23, '', 0, 1, '".$CI->config->item('apanel_name')."/category/add?fs=3');", "INSERT INTO `tbl_gf_forms` ( `Form`, `FormTypeId`, `FormURL`, `IsNew`, `HiddenForm`, `FormUrlNew`) VALUES ('Add Service', 23, '', 0, 1, '".$CI->config->item('apanel_name')."/services/package?fs=3');", "INSERT INTO `tbl_gf_forms` ( `Form`, `FormTypeId`, `FormURL`, `IsNew`, `HiddenForm`, `FormUrlNew`) VALUES ('Quick Price Change', 23, '', 0, 0, '".$CI->config->item('apanel_name')."/services/quickpricing?srvc=3');", "INSERT INTO `tbl_gf_forms` ( `Form`, `FormTypeId`, `FormURL`, `IsNew`, `HiddenForm`, `FormUrlNew`) VALUES ('Reset Custom Prices', 23, '', 0, 0, '".$CI->config->item('apanel_name')."/services/resetprices?srvc=3');", "INSERT INTO `tbl_gf_forms` ( `Form`, `FormTypeId`, `FormURL`, `IsNew`, `HiddenForm`, `FormUrlNew`) VALUES ('Hide Services At Web', 23, '', 0, 0, '".$CI->config->item('apanel_name')."/services/hideservices?sc=3');", "INSERT INTO `tbl_gf_forms` ( `Form`, `FormTypeId`, `FormURL`, `IsNew`, `HiddenForm`, `FormUrlNew`) VALUES ('UnArchive Services', 23, '', 0, 0, '".$CI->config->item('apanel_name')."/services/unarchiveservices?sc=3');", "INSERT INTO `tbl_gf_forms` ( `Form`, `FormTypeId`, `FormURL`, `IsNew`, `HiddenForm`, `FormUrlNew`) VALUES ('Quick Group Price Change', 23, '', 1, 0, '".$CI->config->item('apanel_name')."/services/groupquickpricing?srvc=3');", "INSERT INTO `tbl_gf_forms` ( `Form`, `FormTypeId`, `FormURL`, `IsNew`, `HiddenForm`, `FormUrlNew`) VALUES ('Hide Services For Group', 23, '', 0, 0, '".$CI->config->item('apanel_name')."/services/hideservicesForGroup?sc=3');", "INSERT INTO `tbl_gf_forms` ( `Form`, `FormTypeId`, `FormURL`, `IsNew`, `HiddenForm`, `FormUrlNew`) VALUES ('Hide Services For All Users', 23, '', 0, 0, '".$CI->config->item('apanel_name')."/services/hideservicesforallusers?sc=3');", "INSERT INTO `tbl_gf_forms` ( `Form`, `FormTypeId`, `FormURL`, `IsNew`, `HiddenForm`, `FormUrlNew`) VALUES ('Delete Remote Services', 23, '', 0, 1, '".$CI->config->item('apanel_name')."/services/services');", "INSERT INTO `tbl_gf_forms` ( `Form`, `FormTypeId`, `FormURL`, `IsNew`, `HiddenForm`, `FormUrlNew`) VALUES ('New Remote Orders', 24, '', 0, 0, '".$CI->config->item('apanel_name')."/services/newimeiorders?rms=3');", "INSERT INTO `tbl_gf_forms` ( `Form`, `FormTypeId`, `FormURL`, `IsNew`, `HiddenForm`, `FormUrlNew`) VALUES ('In Process Remote Orders', 24, '', 0, 0, '".$CI->config->item('apanel_name')."/services/inprocessimeiorders?rms=3');", "INSERT INTO `tbl_gf_forms` ( `Form`, `FormTypeId`, `FormURL`, `IsNew`, `HiddenForm`, `FormUrlNew`) VALUES ('Accepted Remote Orders', 24, '', 0, 0, '".$CI->config->item('apanel_name')."/services/codes?codeStatusId=4&pT=2&searchType=3&rm=1&rms=3');", "INSERT INTO `tbl_gf_forms` ( `Form`, `FormTypeId`, `FormURL`, `IsNew`, `HiddenForm`, `FormUrlNew`) VALUES ('Remote Orders History', 24, '', 0, 0, '".$CI->config->item('apanel_name')."/services/codes?bulk=1&searchType=3&rm=1&rms=3');", "INSERT INTO `tbl_gf_forms` ( `Form`, `FormTypeId`, `FormURL`, `IsNew`, `HiddenForm`, `FormUrlNew`) VALUES ('Remote Orders For Verification', 24, '', 0, 0, '".$CI->config->item('apanel_name')."/services/verifyorders?rm=1&rms=3');", // "INSERT INTO `tbl_gf_forms` ( `Form`, `FormTypeId`, `FormURL`, `IsNew`, `HiddenForm`, `FormUrlNew`) VALUES // ('Stop Orders Retrieval via API', 24, '', 0, 0, '".$CI->config->item('apanel_name')."/services/apiorders?rm=1&rms=3');", // "INSERT INTO `tbl_gf_forms` ( `Form`, `FormTypeId`, `FormURL`, `IsNew`, `HiddenForm`, `FormUrlNew`) VALUES // ('Pending API Orders', 24, '', 0, 0, '".$CI->config->item('apanel_name')."/services/pendingapiorders?rm=1&rms=3');", "ALTER TABLE `tbl_gf_retail_payments` ADD `QRCode` VARCHAR(200) NULL DEFAULT NULL;", "delete from `tbl_gf_forms` where FormId not in ( select minid from (select min(FormId) as minid from `tbl_gf_forms` group by Form, FormUrlNew) as newtable )", ) ; 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']]); } } $query = $CI->db->query("SELECT TcktCategoryId FROM `tbl_gf_tckt_category` where internal_name like '%Order%'"); $deptCats = array(); if($query) { foreach($query->result() as $row) { $deptCats[] = $row->TcktCategoryId; } } $categories_id = implode(',', $deptCats); $CI->db->where('DeptName', 'Customer Support For Orders'); $CI->db->update("tbl_gf_tckt_dept", array('categories'=> $categories_id));