Exemplo n.º 1
0
function hesk_iSaveSettings()
{
    global $hesk_settings, $hesklang;
    $spam_question = hesk_generate_SPAM_question();
    $hesk_settings['secimg_use'] = empty($_SESSION['set_captcha']) ? 0 : 1;
    $hesk_settings['use_spamq'] = empty($_SESSION['use_spamq']) ? 0 : 1;
    $hesk_settings['question_ask'] = $spam_question[0];
    $hesk_settings['question_ans'] = $spam_question[1];
    $hesk_settings['set_attachments'] = empty($_SESSION['set_attachments']) ? 0 : 1;
    $hesk_settings['hesk_version'] = HESK_NEW_VERSION;
    if (isset($_SERVER['HTTP_HOST'])) {
        $hesk_settings['site_url'] = 'http://' . $_SERVER['HTTP_HOST'];
        if (isset($_SERVER['REQUEST_URI'])) {
            $hesk_settings['hesk_url'] = 'http://' . $_SERVER['HTTP_HOST'] . str_replace('/install/install.php', '', $_SERVER['REQUEST_URI']);
        }
    }
    /* Encode and escape characters */
    $set = $hesk_settings;
    foreach ($hesk_settings as $k => $v) {
        if (is_array($v)) {
            continue;
        }
        $set[$k] = addslashes($v);
    }
    $set['debug_mode'] = 0;
    $set['email_providers'] = count($set['email_providers']) ? "'" . implode("','", $set['email_providers']) . "'" : '';
    $set['notify_spam_tags'] = count($set['notify_spam_tags']) ? "'" . implode("','", $set['notify_spam_tags']) . "'" : '';
    // Check if PHP version is 5.2.3+
    $set['db_vrsn'] = version_compare(PHP_VERSION, '5.2.3') >= 0 ? 1 : 0;
    hesk_iSaveSettingsFile($set);
    return true;
}
Exemplo n.º 2
0
*  Trade Agreements with the United States of America or
*  with the European Union.

*  Removing any of the copyright notices without purchasing a license
*  is expressly forbidden. To remove HESK copyright notice you must purchase
*  a license for this script. For more information on how to obtain
*  a license please visit the page below:
*  https://www.hesk.com/buy.php
*******************************************************************************/
define('IN_SCRIPT', 1);
define('HESK_PATH', '../');
/* Get all the required files and functions */
require HESK_PATH . 'hesk_settings.inc.php';
require HESK_PATH . 'inc/common.inc.php';
require HESK_PATH . 'inc/setup_functions.inc.php';
$spam_question = hesk_generate_SPAM_question();
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
header('Content-type: text/plain');
?>
<a href="Javascript:void(0)" onclick="Javascript:hesk_rate('generate_spam_question.php','question')"><?php 
echo $hesklang['genq'];
?>
</a><br />

<?php 
echo $hesklang['q_q'];
?>
:<br />
<textarea name="s_question_ask" rows="3" cols="40"><?php 
Exemplo n.º 3
0
function hesk_defaultSettings()
{
    $spam_question = hesk_generate_SPAM_question();
    $secimg_sum = '';
    for ($i = 1; $i <= 10; $i++) {
        $secimg_sum .= substr('AEUYBDGHJLMNPQRSTVWXZ123456789', rand(0, 29), 1);
    }
    // --> General settings
    $hesk_settings['site_title'] = 'My Web site';
    $hesk_settings['site_url'] = 'http://www.domain.com';
    $hesk_settings['webmaster_mail'] = '*****@*****.**';
    $hesk_settings['noreply_mail'] = '*****@*****.**';
    $hesk_settings['noreply_name'] = 'Help Desk';
    // --> Language settings
    $hesk_settings['can_sel_lang'] = 0;
    $hesk_settings['language'] = 'English';
    $hesk_settings['languages'] = array('English' => array('folder' => 'en', 'hr' => '------ Reply above this line ------'));
    // --> Database settings
    $hesk_settings['db_host'] = 'localhost';
    $hesk_settings['db_name'] = 'hesk';
    $hesk_settings['db_user'] = '******';
    $hesk_settings['db_pass'] = '******';
    $hesk_settings['db_pfix'] = 'hesk_';
    $hesk_settings['db_vrsn'] = 0;
    // ==> HELP DESK
    // --> Help desk settings
    $hesk_settings['hesk_title'] = 'Help Desk';
    $hesk_settings['hesk_url'] = 'http://www.domain.com/helpdesk';
    $hesk_settings['admin_dir'] = 'admin';
    $hesk_settings['attach_dir'] = 'attachments';
    $hesk_settings['max_listings'] = 20;
    $hesk_settings['print_font_size'] = 12;
    $hesk_settings['autoclose'] = 7;
    $hesk_settings['max_open'] = 0;
    $hesk_settings['new_top'] = 0;
    $hesk_settings['reply_top'] = 0;
    // --> Features
    $hesk_settings['autologin'] = 1;
    $hesk_settings['autoassign'] = 1;
    $hesk_settings['custopen'] = 1;
    $hesk_settings['rating'] = 1;
    $hesk_settings['cust_urgency'] = 1;
    $hesk_settings['sequential'] = 1;
    $hesk_settings['list_users'] = 0;
    $hesk_settings['debug_mode'] = 0;
    $hesk_settings['short_link'] = 0;
    // --> SPAM Prevention
    $hesk_settings['secimg_use'] = 1;
    $hesk_settings['secimg_sum'] = $secimg_sum;
    $hesk_settings['recaptcha_use'] = 0;
    $hesk_settings['recaptcha_ssl'] = 0;
    $hesk_settings['recaptcha_public_key'] = '';
    $hesk_settings['recaptcha_private_key'] = '';
    $hesk_settings['question_use'] = 0;
    $hesk_settings['question_ask'] = $spam_question[0];
    $hesk_settings['question_ans'] = $spam_question[1];
    // --> Security
    $hesk_settings['attempt_limit'] = 6;
    $hesk_settings['attempt_banmin'] = 60;
    $hesk_settings['email_view_ticket'] = 0;
    // --> Attachments
    $hesk_settings['attachments'] = array('use' => 1, 'max_number' => 2, 'max_size' => 1048576, 'allowed_types' => array('.gif', '.jpg', '.png', '.zip', '.rar', '.csv', '.doc', '.docx', '.xls', '.xlsx', '.txt', '.pdf'));
    // ==> KNOWLEDGEBASE
    // --> Knowledgebase settings
    $hesk_settings['kb_enable'] = 1;
    $hesk_settings['kb_wysiwyg'] = 1;
    $hesk_settings['kb_search'] = 2;
    $hesk_settings['kb_search_limit'] = 10;
    $hesk_settings['kb_views'] = 1;
    $hesk_settings['kb_date'] = 1;
    $hesk_settings['kb_recommendanswers'] = 1;
    $hesk_settings['kb_rating'] = 1;
    $hesk_settings['kb_substrart'] = 200;
    $hesk_settings['kb_cols'] = 2;
    $hesk_settings['kb_numshow'] = 3;
    $hesk_settings['kb_popart'] = 6;
    $hesk_settings['kb_latest'] = 6;
    $hesk_settings['kb_index_popart'] = 3;
    $hesk_settings['kb_index_latest'] = 3;
    // ==> EMAIL
    // --> Email sending
    $hesk_settings['smtp'] = 0;
    $hesk_settings['smtp_host_name'] = 'localhost';
    $hesk_settings['smtp_host_port'] = 25;
    $hesk_settings['smtp_timeout'] = 10;
    $hesk_settings['smtp_ssl'] = 0;
    $hesk_settings['smtp_tls'] = 0;
    $hesk_settings['smtp_user'] = '';
    $hesk_settings['smtp_password'] = '';
    // --> Email piping
    $hesk_settings['email_piping'] = 0;
    // --> POP3 Fetching
    $hesk_settings['pop3'] = 0;
    $hesk_settings['pop3_host_name'] = 'mail.domain.com';
    $hesk_settings['pop3_host_port'] = 110;
    $hesk_settings['pop3_tls'] = 0;
    $hesk_settings['pop3_keep'] = 0;
    $hesk_settings['pop3_user'] = '';
    $hesk_settings['pop3_password'] = '';
    // --> Email loops
    $hesk_settings['loop_hits'] = 6;
    $hesk_settings['loop_time'] = 300;
    // --> Detect email typos
    $hesk_settings['detect_typos'] = 1;
    $hesk_settings['email_providers'] = array('gmail.com', 'hotmail.com', 'hotmail.co.uk', 'yahoo.com', 'yahoo.co.uk', 'aol.com', 'aol.co.uk', 'msn.com', 'live.com', 'live.co.uk', 'mail.com', 'googlemail.com', 'btinternet.com', 'btopenworld.com');
    // --> Other
    $hesk_settings['strip_quoted'] = 1;
    $hesk_settings['save_embedded'] = 1;
    $hesk_settings['multi_eml'] = 0;
    $hesk_settings['confirm_email'] = 0;
    $hesk_settings['open_only'] = 1;
    // ==> MISC
    // --> Date & Time
    $hesk_settings['diff_hours'] = 0;
    $hesk_settings['diff_minutes'] = 0;
    $hesk_settings['daylight'] = 1;
    $hesk_settings['timeformat'] = 'Y-m-d H:i:s';
    // --> Other
    $hesk_settings['alink'] = 1;
    $hesk_settings['submit_notice'] = 0;
    $hesk_settings['online'] = 0;
    $hesk_settings['online_min'] = 10;
    $hesk_settings['check_updates'] = 1;
    // ==> CUSTOM FIELDS
    $hesk_settings['custom_fields'] = array('custom1' => array('use' => 0, 'place' => 0, 'type' => 'text', 'req' => 0, 'name' => 'Custom field 1', 'maxlen' => 255, 'value' => ''), 'custom2' => array('use' => 0, 'place' => 0, 'type' => 'text', 'req' => 0, 'name' => 'Custom field 2', 'maxlen' => 255, 'value' => ''), 'custom3' => array('use' => 0, 'place' => 0, 'type' => 'text', 'req' => 0, 'name' => 'Custom field 3', 'maxlen' => 255, 'value' => ''), 'custom4' => array('use' => 0, 'place' => 0, 'type' => 'text', 'req' => 0, 'name' => 'Custom field 4', 'maxlen' => 255, 'value' => ''), 'custom5' => array('use' => 0, 'place' => 0, 'type' => 'text', 'req' => 0, 'name' => 'Custom field 5', 'maxlen' => 255, 'value' => ''), 'custom6' => array('use' => 0, 'place' => 0, 'type' => 'text', 'req' => 0, 'name' => 'Custom field 6', 'maxlen' => 255, 'value' => ''), 'custom7' => array('use' => 0, 'place' => 0, 'type' => 'text', 'req' => 0, 'name' => 'Custom field 7', 'maxlen' => 255, 'value' => ''), 'custom8' => array('use' => 0, 'place' => 0, 'type' => 'text', 'req' => 0, 'name' => 'Custom field 8', 'maxlen' => 255, 'value' => ''), 'custom9' => array('use' => 0, 'place' => 0, 'type' => 'text', 'req' => 0, 'name' => 'Custom field 9', 'maxlen' => 255, 'value' => ''), 'custom10' => array('use' => 0, 'place' => 0, 'type' => 'text', 'req' => 0, 'name' => 'Custom field 10', 'maxlen' => 255, 'value' => ''), 'custom11' => array('use' => 0, 'place' => 0, 'type' => 'text', 'req' => 0, 'name' => 'Custom field 11', 'maxlen' => 255, 'value' => ''), 'custom12' => array('use' => 0, 'place' => 0, 'type' => 'text', 'req' => 0, 'name' => 'Custom field 12', 'maxlen' => 255, 'value' => ''), 'custom13' => array('use' => 0, 'place' => 0, 'type' => 'text', 'req' => 0, 'name' => 'Custom field 13', 'maxlen' => 255, 'value' => ''), 'custom14' => array('use' => 0, 'place' => 0, 'type' => 'text', 'req' => 0, 'name' => 'Custom field 14', 'maxlen' => 255, 'value' => ''), 'custom15' => array('use' => 0, 'place' => 0, 'type' => 'text', 'req' => 0, 'name' => 'Custom field 15', 'maxlen' => 255, 'value' => ''), 'custom16' => array('use' => 0, 'place' => 0, 'type' => 'text', 'req' => 0, 'name' => 'Custom field 16', 'maxlen' => 255, 'value' => ''), 'custom17' => array('use' => 0, 'place' => 0, 'type' => 'text', 'req' => 0, 'name' => 'Custom field 17', 'maxlen' => 255, 'value' => ''), 'custom18' => array('use' => 0, 'place' => 0, 'type' => 'text', 'req' => 0, 'name' => 'Custom field 18', 'maxlen' => 255, 'value' => ''), 'custom19' => array('use' => 0, 'place' => 0, 'type' => 'text', 'req' => 0, 'name' => 'Custom field 19', 'maxlen' => 255, 'value' => ''), 'custom20' => array('use' => 0, 'place' => 0, 'type' => 'text', 'req' => 0, 'name' => 'Custom field 20', 'maxlen' => 255, 'value' => ''));
    return $hesk_settings;
}