install folder from your server for security reasons then refresh this page!');} // Get all the required files and functions require(HESK_PATH . 'hesk_settings.inc.php'); // Save the default language for the settings page before choosing user's preferred one $hesk_settings['language_default'] = $hesk_settings['language']; require(HESK_PATH . 'inc/common.inc.php'); $hesk_settings['language'] = $hesk_settings['language_default']; require(HESK_PATH . 'inc/admin_functions.inc.php'); require(HESK_PATH . 'inc/setup_functions.inc.php'); hesk_load_database_functions(); hesk_session_start(); hesk_dbConnect(); hesk_isLoggedIn(); // Check permissions for this feature hesk_checkPermission('can_man_settings'); // Load custom fields require_once(HESK_PATH . 'inc/custom_fields.inc.php'); // Test languages function if (isset($_GET['test_languages'])) { hesk_testLanguage(0); } elseif (isset($_GET['test_themes'])) { hesk_testTheme(0); } $help_folder = '../language/' . $hesk_settings['languages'][$hesk_settings['language']]['folder'] . '/help_files/'; $enable_save_settings = 0; $enable_use_attachments = 0; // Print header require_once(HESK_PATH . 'inc/header.inc.php'); // Print main manage users page require_once(HESK_PATH . 'inc/show_admin_nav.inc.php'); // Demo mode? Hide values of sensitive settings if ( defined('HESK_DEMO') ) { require_once(HESK_PATH . 'inc/admin_settings_demo.inc.php'); } /* This will handle error, success and notice messages */ hesk_handle_messages(); ?>

>

/$subdir\n"; $themes .= " |-> /customer\n"; $err = ''; //region Create Ticket $files_to_test = array('category-select.php', 'create-ticket.php', 'create-ticket-confirmation.php'); $themes .= " |-> /create-ticket: "; foreach ($files_to_test as $test_file) { if (!file_exists($dir . $subdir . '/customer/create-ticket/' . $test_file)) { $err .= " |----> MISSING: $test_file\n"; } } if ($err) { $add = 0; $themes .= "ERROR\n$err"; } else { $themes .= "OK\n"; } //endregion $err = ''; //region Knowledgebase $files_to_test = array('search-results.php', 'view-article.php', 'view-category.php'); $themes .= " |-> /knowledgebase: "; foreach ($files_to_test as $test_file) { if (!file_exists($dir . $subdir . '/customer/knowledgebase/' . $test_file)) { $err .= " |----> MISSING: $test_file\n"; } } if ($err) { $add = 0; $themes .= "ERROR\n$err"; } else { $themes .= "OK\n"; } //endregion $err = ''; //region View Ticket $files_to_test = array('form.php', 'view-ticket.php'); $themes .= " |-> /view-ticket"; foreach ($files_to_test as $test_file) { if (!file_exists($dir . $subdir . '/customer/view-ticket/' . $test_file)) { $err .= " |----> MISSING: $test_file\n"; } } if ($err) { $add = 0; $themes .= "ERROR\n$err"; } else { $themes .= ": OK\n"; } //endregion //region Solo files $files_to_test = array('error.php', 'index.php', 'maintenance.php'); foreach ($files_to_test as $test_file) { if (!file_exists($dir . $subdir . '/customer/' . $test_file)) { $add = 0; $themes .= " |----> MISSING: $test_file\n"; } else { $themes .= " |-> $test_file: OK\n"; } } //endregion if (!file_exists($dir . $subdir . '/print-ticket.php')) { $add = 0; $themes .= " |----> MISSING: print-ticket.php\n"; } else { $themes .= " |-> print-ticket.php: OK\n"; } if (!file_exists($dir . $subdir . '/config.json')) { $add = 0; $themes .= " |----> MISSING: config.json\n"; } else { $themes .= " |-> config.json: OK\n"; } } // Build markup if ($add) { // Pull the name from config.json $config = file_get_contents($dir . $subdir . '/config.json'); $config_json = json_decode($config, true); $html .= ''; } } if ($return_options) { return $html; } else { ?> <?php echo $hesklang['test_theme_folder']; ?>

|

/$subdir\n"; $text .= " |-> text.php: "; if (file_exists($langu)) { $tmp = file_get_contents($langu); // Some servers add slashes to file_get_contents output if ( strpos ($tmp, '[\\\'LANGUAGE\\\']') !== false ) { $tmp = stripslashes($tmp); } $err = ''; if (!preg_match('/\$hesklang\[\'LANGUAGE\'\]\=\'(.*)\'\;/',$tmp,$l)) { $err .= " |----> MISSING: \$hesklang['LANGUAGE']\n"; } if (strpos($tmp,'$hesklang[\'ENCODING\']') === false) { $err .= " |----> MISSING: \$hesklang['ENCODING']\n"; } if (strpos($tmp,'$hesklang[\'_COLLATE\']') === false) { $err .= " |----> MISSING: \$hesklang['_COLLATE']\n"; } if (strpos($tmp,'$hesklang[\'EMAIL_HR\']') === false) { $err .= " |----> MISSING: \$hesklang['EMAIL_HR']\n"; } /* Check if language file is for current version */ if (strpos($tmp,'$hesklang[\'email_authentication_method\']') === false) { $err .= " |----> WRONG VERSION (not ".$hesk_settings['hesk_version'].")\n"; } if ($err) { $text .= "ERROR\n" . $err; $add = 0; } else { $l[1] = hesk_input($l[1]); $l[1] = str_replace('|',' ',$l[1]); $text .= "OK ($l[1])\n"; } } else { $text .= "ERROR\n"; $text .= " |----> MISSING: text.php\n"; $add = 0; } /* Check emails folder */ $text .= " |-> /emails: "; if (file_exists($email) && filetype($email) == 'dir') { $err = ''; foreach ($valid_emails as $eml) { if (!file_exists($email.'/'.$eml.'.txt')) { $err .= " |----> MISSING: $eml.txt\n"; } } if ($err) { $text .= "ERROR\n" . $err; $add = 0; } else { $text .= "OK\n"; } } else { $text .= "ERROR\n"; $text .= " |----> MISSING: /emails folder\n"; $add = 0; } $text .= " |-> /html_emails: "; if (file_exists($html_email) && filetype($html_email) == 'dir') { $err = ''; foreach ($valid_emails as $eml) { if (!file_exists($html_email.'/'.$eml.'.txt')) { $err .= " |----> MISSING: $eml.txt\n"; } } if ($err) { $text .= "ERROR\n" . $err; $add = 0; } else { $text .= "OK\n"; } } else { $text .= "ERROR\n"; $text .= " |----> MISSING: /html_emails folder\n"; $add = 0; } $text .= "\n"; /* Add an option for the