Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- *
- * @ This file is created by http://DeZender.Net
- * @ deZender (PHP7 Decoder for ionCube Encoder)
- *
- * @ Version : 4.0.8.9
- * @ Author : DeZender
- * @ Release on : 10.05.2019
- * @ Official site : http://DeZender.Net
- *
- */
- define('IEM_NO_CONTROLLER', true);
- define('IEM_CLI_MODE', true);
- error_reporting(32767);
- ini_set('display_errors', 1);
- require_once dirname(dirname(dirname(dirname(__FILE__)))) . '/index.php';
- require_once IEM_PUBLIC_PATH . '/functions/api/settings.php';
- $settings_api = new Settings_API();
- if ($settings_api->NeedDatabaseUpgrade()) {
- exit();
- }
- unset($settings_api);
- if (!SENDSTUDIO_SAFE_MODE && (strpos(SENDSTUDIO_DISABLED_FUNCTIONS, 'set_time_limit') === false)) {
- set_time_limit(0);
- }
- if (!defined('SENDSTUDIO_IS_SETUP') || !SENDSTUDIO_IS_SETUP) {
- exit();
- }
- require_once SENDSTUDIO_FUNCTION_DIRECTORY . '/sendstudio_functions.php';
- $path = IEM_ADDONS_PATH . '/installer/api/installer.php';
- if (!is_file($path)) {
- return false;
- }
- require_once $path;
- $options = CommandLine::parseArgs($argv);
- if (isset($options['flush-api'])) {
- $f = IEM_ADDONS_PATH . '/installer/install/global_backup/tmp/installer/api_functions.php';
- if (file_exists($f)) {
- $unlink = unlink($f);
- }
- else {
- echo 'There is no api File';
- }
- $db = IEM::getDatabase();
- $db->Query('DELETE FROM ' . SENDSTUDIO_TABLEPREFIX . 'config_settings WHERE area=\'at\' limit 1');
- $db->Query('DELETE FROM ' . SENDSTUDIO_TABLEPREFIX . 'config_settings WHERE area LIKE \'ltk.%\'');
- $db->Query('DELETE FROM ' . SENDSTUDIO_TABLEPREFIX . 'config_settings WHERE area LIKE \'k.%\'');
- exit();
- }
- $api = MT::S();
- if (isset($options['addon'])) {
- $addon = ($options['addon'] !== true ? $options['addon'] : 'all');
- $version = (isset($options['version']) ? $options['version'] : false);
- if (isset($options['install-files'])) {
- $addon = ($addon == 'all' ? false : $addon);
- MT::S()->CLI(MT::S()->get_install_files($addon, true, true, true, $version));
- MT::S()->CLI(MT::S()->using_schema, 'Schema-file');
- }
- else if (isset($options['uninstall'])) {
- $force = (isset($options['force']) ? true : false);
- $addon = (isset($options['addon']) ? $options['addon'] : 'none');
- $addon_info = MT_TOOLS::S()->public_addon_info($addon);
- if (!$addon_info) {
- MT::S()->CLI('The addon is not installed', 'Status');
- }
- $api->log_method = ['addon' => 'installer', 'method' => 'output'];
- require_once SENDSTUDIO_BASE_DIRECTORY . DIRECTORY_SEPARATOR . 'addons' . DIRECTORY_SEPARATOR . 'interspire_addons.php';
- $a = new Interspire_Addons();
- $result = $a->Process($addon, 'Uninstall');
- var_dump($result);
- }
- else if (isset($options['install'])) {
- $force = (isset($options['force']) ? true : false);
- $addon = (isset($options['addon']) ? $options['addon'] : 'none');
- $addon_info = MT_TOOLS::S()->public_addon_info($addon);
- if ($addon_info && $addon_info['installed']) {
- MT::S()->CLI('Addon already installed, to force use the option --force', 'Status');
- }
- else {
- $api->log_method = ['addon' => 'installer', 'method' => 'output'];
- require_once SENDSTUDIO_BASE_DIRECTORY . DIRECTORY_SEPARATOR . 'addons' . DIRECTORY_SEPARATOR . 'interspire_addons.php';
- $a = new Interspire_Addons();
- $result = $a->Process($addon, 'Install');
- var_dump($result);
- }
- }
- }
- else if (isset($options['add-user'])) {
- $user = ($options['add-user'] !== true ? $options['add-user'] : 'mtsupport');
- $groupid = (isset($options['groupid']) ? $options['groupid'] : 1);
- $password = (isset($options['password']) ? $options['password'] : false);
- $result = MT::S()->add_user($user, $password, $groupid);
- MT::S()->CLI($result, 'Add New User');
- }
- else if (isset($options['job'])) {
- $jobid = ($options['job'] !== true ? $options['job'] : false);
- if (isset($options['unsent'])) {
- MT::S()->CLI(MT::S()->job_unsent($jobid), 'Jobs Unsent');
- }
- else if (isset($options['clone'])) {
- $jobid = (empty($options['clone']) ? 0 : (int) $options['clone']);
- if (!$jobid) {
- MT::S()->CLI('You need to specify a jobid: --clone=jobID');
- }
- MT::S()->CLI(MT::S()->job_clone($jobid), 'Cloning Job');
- }
- }
- else if (isset($options['bounce'])) {
- if (isset($options['delete-hard'])) {
- $limit = (isset($options['limit']) ? (int) $options['limit'] : 1000);
- MT::S()->CLI('Delete Hard Bounces');
- MT::S()->bounce_delete_hard($limit);
- }
- else if (isset($options['set'])) {
- $hostname = (isset($options['hostname']) ? $options['hostname'] : 'localhost');
- $user = (isset($options['username']) ? $options['username'] : '');
- $pass = (isset($options['password']) ? $options['password'] : '');
- $imap = (isset($options['imap']) ? true : false);
- $extra = (isset($options['extra']) ? $options['extra'] : '/novalidate-cert');
- MT::S()->CLI('Setting bounce accounts');
- ...................................................................
- ......................................
- ...............
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement