Example #1
0
    update_config_token("access_port", $config["access_port"]);
    update_config_token("url_updatemanager", $config["url_updatemanager"]);
    update_config_token("access_public", $config["access_public"]);
    update_config_token("loginhash_pwd", $config["loginhash_pwd"]);
    update_config_token("csv_standard_encoding", $config["csv_standard_encoding"]);
    update_config_token("enable_update_manager", $config["enable_update_manager"]);
    update_config_token("max_direct_download", $config["max_direct_download"]);
    if ($is_enterprise) {
        update_config_token("enable_pass_policy", $config["enable_pass_policy"]);
        update_config_token("pass_size", $config["pass_size"]);
        update_config_token("pass_needs_numbers", $config["pass_needs_numbers"]);
        update_config_token("pass_needs_symbols", $config["pass_needs_symbols"]);
        update_config_token("pass_expire", $config["pass_expire"]);
        update_config_token("first_login", $config["first_login"]);
        update_config_token("mins_fail_pass", $config["mins_fail_pass"]);
        update_config_token("number_attempts", $config["number_attempts"]);
    }
    echo ui_print_success_message(__('Successfully updated'), '', true, 'h3', true);
}
// Render SYSTEM language code, not current language.
$table = new StdClass();
$table->width = '100%';
$table->class = 'search-table-button';
$table->colspan = array();
$table->data = array();
$incident_reporter_options[0] = __('Disabled');
$incident_reporter_options[1] = __('Enabled');
$language_config = get_db_value('value', 'tconfig', 'token', 'language_code');
$table->data[0][0] = print_select_from_sql('SELECT id_language, name FROM tlanguage ORDER BY name', 'language_code', $language_config, '', '', '', true, false, false, __('Language'));
$table->data[0][1] = print_input_text("sitename", $config["sitename"], '', 30, 50, true, __('Sitename'));
$error_log_options[0] = __('Disabled');
Example #2
0
    update_config_token("smtp_user", $config["smtp_user"]);
    update_config_token("smtp_pass", $config["smtp_pass"]);
    update_config_token("news_smtp_port", $config["news_smtp_port"]);
    update_config_token("news_smtp_host", $config["news_smtp_host"]);
    update_config_token("news_smtp_user", $config["news_smtp_user"]);
    update_config_token("news_smtp_pass", $config["news_smtp_pass"]);
    update_config_token("pop_host", $config["pop_host"]);
    update_config_token("pop_user", $config["pop_user"]);
    update_config_token("pop_pass", $config["pop_pass"]);
    update_config_token("pop_port", $config["pop_port"]);
    update_config_token("smtp_queue_retries", $config["smtp_queue_retries"]);
    update_config_token("max_pending_mail", $config["max_pending_mail"]);
    update_config_token("batch_newsletter", $config["batch_newsletter"]);
    update_config_token("news_batch_newsletter", $config["news_batch_newsletter"]);
    update_config_token("batch_email_validation", $config["batch_email_validation"]);
    update_config_token("active_validate", $config["active_validate"]);
}
$table->width = '99%';
$table->class = 'search-table-button';
$table->colspan = array();
$table->data = array();
$table->data[2][0] = print_input_text("notification_period", $config["notification_period"], '', 7, 7, true, __('Notification period'));
$table->data[2][0] .= integria_help("notification_period", true);
$table->data[2][1] = print_input_text("mail_from", $config["mail_from"], '', 30, 50, true, __('System mail from address'));
$table->colspan[3][0] = 3;
$table->data[3][1] = "<h4>" . __("SMTP Parameters") . integria_help("mailsetup", true) . "</h4>";
$table->data[4][0] = print_input_text("smtp_host", $config["smtp_host"], '', 35, 200, true, __('SMTP Host'));
$table->data[4][0] .= print_help_tip(__("Left it blank if you want to use your local mail, instead an external SMTP host"), true);
$table->data[4][1] = print_input_text("smtp_port", $config["smtp_port"], '', 5, 10, true, __('SMTP Port'));
$table->data[5][0] = print_input_text("smtp_user", $config["smtp_user"], '', 25, 200, true, __('SMTP User'));
$table->data[5][1] = print_input_text("smtp_pass", $config["smtp_pass"], '', 25, 200, true, __('SMTP Password'));
Example #3
0
function load_config()
{
    global $config;
    require_once $config["homedir"] . '/include/functions_db.php';
    $configs = get_db_all_rows_in_table('tconfig');
    if ($configs === false) {
        include $config["homedir"] . "/general/error_invalidconfig.php";
        exit;
    }
    foreach ($configs as $c) {
        $config[$c["token"]] = $c["value"];
    }
    if (!isset($config["block_size"])) {
        $config["block_size"] = 25;
    }
    if (!isset($config["notification_period"])) {
        $config["notification_period"] = "86400";
    }
    if (!isset($config["autowu_completion"])) {
        $config["autowu_completion"] = "0";
    }
    if (!isset($config["no_wu_completion"])) {
        $config["no_wu_completion"] = "";
    }
    if (!isset($config["FOOTER_EMAIL"])) {
        $config["FOOTER_EMAIL"] = __('Please do NOT answer this email, it has been automatically created by Integria (http://integria.sourceforge.net).');
    }
    if (!isset($config["HEADER_EMAIL"])) {
        $config["HEADER_EMAIL"] = "Hello, \n\nThis is an automated message coming from Integria\n\n";
    }
    if (!isset($config["currency"])) {
        $config["currency"] = "€";
    }
    if (!isset($config["hours_perday"])) {
        $config["hours_perday"] = 8;
    }
    if (!isset($config["limit_size"])) {
        $config["limit_size"] = 1000;
    }
    if (!isset($config["sitename"])) {
        $config["sitename"] = "INTEGRIA";
    }
    if (!isset($config["fontsize"])) {
        $config['fontsize'] = 7;
    }
    if (!isset($config["incident_reporter"])) {
        $config['incident_reporter'] = 0;
    }
    if (!isset($config["show_owner_incident"])) {
        $config["show_owner_incident"] = 1;
    }
    if (!isset($config["show_creator_incident"])) {
        $config["show_creator_incident"] = 1;
    }
    if (!isset($config["smtp_host"])) {
        $config["smtp_host"] = "localhost";
    }
    if (!isset($config["wokring_weekends"])) {
        $config["wokring_weekends"] = 0;
    }
    if (!isset($config["smtp_user"])) {
        $config["smtp_user"] = "";
    }
    if (!isset($config["smtp_pass"])) {
        $config["smtp_pass"] = "";
    }
    if (!isset($config["smtp_port"])) {
        $config["smtp_port"] = 25;
    }
    if (!isset($config["pop_host"])) {
        $config["pop_host"] = "localhost";
    }
    if (!isset($config["pop_port"])) {
        $config["pop_port"] = 110;
    }
    if (!isset($config["pop_user"])) {
        $config["pop_user"] = "";
    }
    if (!isset($config["pop_pass"])) {
        $config["pop_pass"] = "";
    }
    if (!isset($config["audit_delete_days"])) {
        $config["audit_delete_days"] = 45;
    }
    if (!isset($config["iwu_defaultime"])) {
        $config["iwu_defaultime"] = "0.25";
    }
    if (!isset($config["pwu_defaultime"])) {
        $config["pwu_defaultime"] = "4";
    }
    if (!isset($config["timezone"])) {
        $config["timezone"] = "Europe/Madrid";
    }
    if (!isset($config["api_acl"])) {
        $config["api_acl"] = "127.0.0.1";
    }
    if (!isset($config["auto_incident_close"])) {
        $config["auto_incident_close"] = "72";
    }
    if (!isset($config["language_code"])) {
        $config["language_code"] = "en_GB";
    }
    if (!isset($config["flash_charts"])) {
        $config["flash_charts"] = true;
    }
    // Mail address used to send mails
    if (!isset($config["mail_from"])) {
        $config["mail_from"] = "integria@localhost";
    }
    if (!isset($config["site_logo"])) {
        $config["site_logo"] = "integria_logo.png";
    }
    if (!isset($config["header_logo"])) {
        $config["header_logo"] = "integria_logo_header.png";
    }
    if (!isset($config["email_on_incident_update"])) {
        $config["email_on_incident_update"] = 0;
    }
    if (!isset($config["error_log"])) {
        $config["error_log"] = 1;
    }
    if (!isset($config["sql_query_limit"])) {
        $config["sql_query_limit"] = 1500;
    }
    if (!isset($config["pdffont"])) {
        $config["pdffont"] = $config["homedir"] . "/include/fonts/FreeSans.ttf";
    }
    if (!isset($config["font"])) {
        $config["font"] = $config["homedir"] . "/include/fonts/smallfont.ttf";
    }
    if (!isset($config["audit_category_default"])) {
        $config["audit_category_default"] = 1;
    }
    if (!isset($config["max_file_size"])) {
        $config["max_file_size"] = "50M";
    }
    if (!isset($config["enable_newsletter"])) {
        $config["enable_newsletter"] = 0;
    }
    if (!isset($config["batch_newsletter"])) {
        $config["batch_newsletter"] = 15;
    }
    if (!isset($config["want_chat"])) {
        $config["want_chat"] = 0;
    }
    if (!isset($config["lead_warning_time"])) {
        $config["lead_warning_time"] = "7";
    }
    if (!isset($config["incident_creation_wu"])) {
        $config["incident_creation_wu"] = 0;
    }
    if (!isset($config["graphviz_win"])) {
        $config["graphviz_win"] = "C:\\Program Files\\Graphviz 2.28\\bin";
    }
    if (!isset($config["months_to_delete_incidents"])) {
        $config["months_to_delete_incidents"] = 12;
    }
    if (!isset($config["working_weekends"])) {
        $config["working_weekends"] = 0;
    }
    if (!isset($config["mask_emails"])) {
        $config["mask_emails"] = 0;
    }
    if (!isset($config['attachment_store'])) {
        $config['attachment_store'] = $config['homedir'] . 'attachment';
    }
    if (!isset($config['session_timeout'])) {
        $config['session_timeout'] = 9000;
    }
    if (!isset($config['update_manager_installed'])) {
        $config['update_manager_installed'] = 1;
    }
    if (!isset($config["inventory_path"])) {
        $config["inventory_path"] = $config["homedir"] . "attachment/inventory";
    }
    if (!isset($config["remote_inventory_type"])) {
        $config["remote_inventory_type"] = 0;
    }
    if (!isset($config["inventory_default_owner"])) {
        $config["inventory_default_owner"] = "";
    }
    if (!isset($config["smtp_queue_retries"])) {
        $config["smtp_queue_retries"] = 10;
    }
    if (!isset($config["access_protocol"])) {
        $config["access_protocol"] = false;
    }
    if (!isset($config["access_port"])) {
        $config["access_port"] = "";
    }
    if (!isset($config["access_public"])) {
        if (isset($_SERVER["SERVER_NAME"])) {
            $config["access_public"] = $_SERVER["SERVER_NAME"];
        } else {
            $config["access_public"] = "localhost";
        }
        update_config_token("access_public", $config["access_public"]);
    }
    if (!isset($config["license"])) {
        $config["license"] = "INTEGRIA-FREE";
        update_config_token("license", $config["license"]);
    }
    if (!isset($config["news_smtp_host"])) {
        $config["news_smtp_host"] = "";
    }
    if (!isset($config["news_smtp_user"])) {
        $config["news_smtp_user"] = "";
    }
    if (!isset($config["news_smtp_pass"])) {
        $config["news_smtp_pass"] = "";
    }
    if (!isset($config["news_smtp_port"])) {
        $config["news_smtp_port"] = "";
    }
    if (!isset($config["news_batch_newsletter"])) {
        $config["news_batch_newsletter"] = "";
    }
    if (!isset($config["enabled_ticket_editor"])) {
        $config["enabled_ticket_editor"] = 0;
    }
    if (!isset($config["email_ticket_on_creation_and_closing"])) {
        $config["email_ticket_on_creation_and_closing"] = 0;
    }
    if (!isset($config["batch_email_validation"])) {
        $config["batch_email_validation"] = 10;
    }
    if (!isset($config["active_validate"])) {
        $config["active_validate"] = 1;
    }
    if (!isset($config["enable_update_manager"])) {
        $config["enable_update_manager"] = true;
    }
    if (!isset($config["invoice_auto_id"])) {
        $config["invoice_auto_id"] = 0;
    }
    if (!isset($config["invoice_id_pattern"])) {
        $config["invoice_id_pattern"] = "15/[1000]";
    }
    if (!isset($config["change_creator_owner"])) {
        $config["change_creator_owner"] = 1;
    }
}
Example #4
0
    update_config_token("FOOTER_EMAIL", $config["FOOTER_EMAIL"]);
    update_config_token("notification_period", $config["notification_period"]);
    update_config_token("mail_from", $config["mail_from"]);
    update_config_token("smtp_port", $config["smtp_port"]);
    update_config_token("smtp_host", $config["smtp_host"]);
    update_config_token("smtp_user", $config["smtp_user"]);
    update_config_token("smtp_pass", $config["smtp_pass"]);
    update_config_token("smtp_proto", $config["smtp_proto"]);
    update_config_token("pop_host", $config["pop_host"]);
    update_config_token("pop_user", $config["pop_user"]);
    update_config_token("pop_pass", $config["pop_pass"]);
    update_config_token("pop_port", $config["pop_port"]);
    update_config_token("smtp_queue_retries", $config["smtp_queue_retries"]);
    update_config_token("max_pending_mail", $config["max_pending_mail"]);
    update_config_token("batch_newsletter", $config["batch_newsletter"]);
    update_config_token("select_pop_imap", $config["select_pop_imap"]);
    echo ui_print_success_message(__('Successfully updated'), '', true, 'h3', true);
}
$smtp_prococols = array('' => __('None'), 'ssl' => 'ssl', 'sslv2' => 'sslv2', 'sslv3' => 'sslv3', 'tls' => 'tls');
$popimap = array(0 => __('POP'), 1 => __('IMAP'));
$table = new StdClass();
$table->width = '100%';
$table->class = 'search-table-button';
$table->colspan = array();
$cols = 3;
$table->data = array();
$row = array();
$row[] = print_input_text("notification_period", $config["notification_period"], '', 7, 7, true, __('Notification period') . integria_help("notification_period", true));
$row[] = print_input_text("mail_from", $config["mail_from"], '', 30, 50, true, __('System mail from address'));
$table->data[] = $row;
$row = array();
Example #5
0
    update_config_token("autocreate_remote_users", $config["autocreate_remote_users"]);
    update_config_token("default_remote_profile", $config["default_remote_profile"]);
    update_config_token("default_remote_group", $config["default_remote_group"]);
    update_config_token("autocreate_blacklist", $config["autocreate_blacklist"]);
    update_config_token("ldap_server", $config["ldap_server"]);
    update_config_token("ldap_port", $config["ldap_port"]);
    update_config_token("ldap_version", $config["ldap_version"]);
    update_config_token("ldap_start_tls", $config["ldap_start_tls"]);
    update_config_token("ldap_base_dn", $config["ldap_base_dn"]);
    update_config_token("ldap_login_attr", $config["ldap_login_attr"]);
    //Active Directory
    update_config_token('ad_server', $config['ad_server']);
    update_config_token('ad_port', $config['ad_port']);
    update_config_token('ad_start_tls', $config['ad_start_tls']);
    update_config_token('ad_domain', $config['ad_domain']);
    update_config_token("session_timeout", $config["session_timeout"]);
}
if (!isset($config['auth_methods'])) {
    $auth_method = 'mysql';
} else {
    $auth_method = $config['auth_methods'];
}
$disabled = false;
$table->width = '99%';
$table->class = 'search-table-button';
$table->colspan = array();
$table->data = array();
$auth_methods = array('mysql' => __('Local Integria'), 'ldap' => __('LDAP'));
if ($is_enterprise) {
    add_enterprise_auth_methods($auth_methods);
}
Example #6
0
    update_config_token("limit_size", $config["limit_size"]);
    update_config_token("show_owner_incident", $config["show_owner_incident"]);
    update_config_token("show_creator_incident", $config["show_creator_incident"]);
    update_config_token("auto_incident_close", $config["auto_incident_close"]);
    update_config_token("iw_creator_enabled", $config["iw_creator_enabled"]);
    update_config_token("incident_creation_wu", $config["incident_creation_wu"]);
    update_config_token("incident_type_change", $config["incident_type_change"]);
    update_config_token("change_incident_datetime", $config["change_incident_datetime"]);
    update_config_token("enabled_ticket_editor", $config["enabled_ticket_editor"]);
    update_config_token("email_ticket_on_creation_and_closing", $config["email_ticket_on_creation_and_closing"]);
    update_config_token("ticket_owner_is_creator", $config["ticket_owner_is_creator"]);
    update_config_token("show_user_name", $config["show_user_name"]);
    update_config_token("required_ticket_type", $config["required_ticket_type"]);
    update_config_token("show_creator_blank", $config["show_creator_blank"]);
    update_config_token("check_closed_incidents", $config["check_closed_incidents"]);
    update_config_token("days_check_closed_incidents", $config["days_check_closed_incidents"]);
    foreach ($status as $id => $name) {
        $sql = sprintf('UPDATE tincident_status SET name = "%s"
			WHERE id = %d', $name, $id);
        process_sql($sql);
    }
    foreach ($resolutions as $id => $name) {
        $sql = sprintf('UPDATE tincident_resolution SET name = "%s"
			WHERE id = %d', $name, $id);
        process_sql($sql);
    }
    echo '<h3 class="suc">' . __('Updated successfuly') . '</h3>';
}
echo '<form method="post">';
$table->width = '99%';
$table->class = 'search-table';
    $config["max_days_wu"] = (int) get_parameter("max_days_wu", 0);
    $config["max_days_wo"] = (int) get_parameter("max_days_wo", 0);
    $config["max_days_audit"] = (int) get_parameter("max_days_audit", 15);
    $config["max_days_session"] = (int) get_parameter("max_days_session", 7);
    $config["max_days_workflow_events"] = (int) get_parameter("max_days_workflow_events", 900);
    $config["max_days_fs_files"] = (int) get_parameter("max_days_fs_files", 7);
    $config["max_days_files_track"] = (int) get_parameter("max_days_files_track", 15);
    update_config_token("max_days_events", $config["max_days_events"]);
    update_config_token("max_days_incidents", $config["max_days_incidents"]);
    update_config_token("max_days_wu", $config["max_days_wu"]);
    update_config_token("max_days_wo", $config["max_days_wo"]);
    update_config_token("max_days_audit", $config["max_days_audit"]);
    update_config_token("max_days_session", $config["max_days_session"]);
    update_config_token("max_days_workflow_events", $config["max_days_workflow_events"]);
    update_config_token("max_days_fs_files", $config["max_days_fs_files"]);
    update_config_token("max_days_files_track", $config["max_days_files_track"]);
}
$table = new StdClass();
$table->width = '100%';
$table->class = 'search-table-button';
$table->colspan = array();
$table->data = array();
$row = array();
$cell = 0;
$row[$cell] = print_input_text("max_days_events", $config["max_days_events"], '', 4, 4, true, __('Days to delete events') . integria_help("old_events", true));
$cell++;
$row[$cell] = print_input_text("max_days_incidents", $config["max_days_incidents"], '', 4, 4, true, __('Days to delete tickets') . integria_help("old_incidents", true));
$cell++;
$row[$cell] = print_input_text("max_days_wu", $config["max_days_wu"], '', 4, 4, true, __('Days to delete work units') . integria_help("old_wu", true));
$cell++;
$table->data[] = $row;
Example #8
0
    $config["block_size"] = (int) get_parameter("block_size", 20);
    $config["fontsize"] = (int) get_parameter("fontsize", 10);
    $config["font"] = get_parameter("font", "smallfont.ttf");
    $config["pdffont"] = get_parameter("pdffont", "code.ttf");
    $config["site_logo"] = get_parameter("site_logo", "custom_logos/integria_logo.png");
    $config["header_logo"] = get_parameter("header_logo", "custom_logos/integria_logo_header.png");
    $config["login_background"] = (string) get_parameter("login_background");
    $config["flash_charts"] = get_parameter("flash_charts");
    update_config_token("block_size", $config["block_size"]);
    update_config_token("fontsize", $config["fontsize"]);
    update_config_token("font", $config["font"]);
    update_config_token("pdffont", $config["pdffont"]);
    update_config_token("site_logo", $config["site_logo"]);
    update_config_token("header_logo", $config["header_logo"]);
    update_config_token("login_background", $config["login_background"]);
    update_config_token("flash_charts", $config["flash_charts"]);
    echo ui_print_success_message(__('Successfully updated'), '', true, 'h3', true);
}
$table = new StdClass();
$table->width = '100%';
$table->class = 'search-table-button';
$table->colspan = array();
$table->data = array();
function get_logo_files()
{
    $base_dir = 'images/custom_logos';
    $files = list_files($base_dir, ".png", 1, 0);
    $files = array_merge($files, list_files($base_dir, ".jpg", 1, 0));
    $files = array_merge($files, list_files($base_dir, ".gif", 1, 0));
    $retval = array();
    foreach ($files as $file) {
function db_update_schema()
{
    global $config;
    $dir = $config["homedir"] . "extras/mr";
    $message = '';
    if (file_exists($dir) && is_dir($dir)) {
        if (is_readable($dir)) {
            $files = scandir($dir);
            // Get all the files from the directory ordered by asc
            if ($files !== false) {
                $pattern = "/^\\d+\\.sql\$/";
                $sqlfiles = preg_grep($pattern, $files);
                // Get the name of the correct files
                $files = null;
                $pattern = "/\\.sql\$/";
                $replacement = "";
                $sqlfiles_num = preg_replace($pattern, $replacement, $sqlfiles);
                // Get the number of the file
                $sqlfiles = null;
                if ($sqlfiles_num) {
                    foreach ($sqlfiles_num as $sqlfile_num) {
                        $file = "{$dir}/{$sqlfile_num}.sql";
                        if ($config["minor_release"] >= $sqlfile_num) {
                            if (!file_exists($dir . "/updated") || !is_dir($dir . "/updated")) {
                                mkdir($dir . "/updated");
                            }
                            $file_dest = "{$dir}/updated/{$sqlfile_num}.sql";
                            if (copy($file, $file_dest)) {
                                unlink($file);
                            }
                        } else {
                            $result = db_run_sql_file($file);
                            if ($result) {
                                update_config_token("minor_release", $sqlfile_num);
                                if ($config["minor_release"] == $sqlfile_num) {
                                    if (!file_exists($dir . "/updated") || !is_dir($dir . "/updated")) {
                                        mkdir($dir . "/updated");
                                    }
                                    $file_dest = "{$dir}/updated/{$sqlfile_num}.sql";
                                    if (copy($file, $file_dest)) {
                                        unlink($file);
                                    }
                                }
                                $message = "<h3 class='suc'>" . __('The database schema has been updated to the minor release') . " {$sqlfile_num}</h3>";
                            } else {
                                $message = "<h3 class='error'>" . __('An error occurred while updating the database schema to the minor release ') . " {$sqlfile_num}</h3>";
                                break;
                            }
                        }
                    }
                }
            }
        } else {
            $message = "<h3 class='error'>" . __('The directory ' . $dir . ' should have read permissions in order to update the database schema') . "</h3>";
        }
    } else {
        $message = "<h3 class='error'>" . __('The directory ' . $dir . ' does not exist') . "</h3>";
    }
    return $message;
}
Example #10
0
print_setup_tabs('license', $is_enterprise);
$update = (bool) get_parameter("update");
$unblock_users = (bool) get_parameter("unblock_users", 0);
if ($update) {
    # Update of Integria license
    $update_manager_installed = get_db_value('value', 'tconfig', 'token', 'update_manager_installed');
    if ($update_manager_installed == 1) {
        $license_info_key = get_parameter('license_info_key', '');
        if (empty($license_info_key)) {
            $license_info_key = 'INTEGRIA-FREE';
        }
        $sql_update = "UPDATE tconfig SET `value`='{$license_info_key}'\n\t\t\tWHERE `token`='license'";
        $update_manage_settings_result = process_sql($sql_update);
        $config["license"] = $license_info_key;
        $config["url_updatemanager"] = get_parameter("url_updatemanager", $config["url_updatemanager"]);
        update_config_token("url_updatemanager", $config["url_updatemanager"]);
    } else {
        $sql_insert = "INSERT INTO tconfig (`token`, `value`) VALUES ('update_manager_installed', '1');";
        process_sql($sql_insert);
        $sql_insert = "INSERT INTO tconfig (`token`, `value`) VALUES ('license', 'INTEGRIA-FREE');";
        process_sql($sql_insert);
        $sql_insert = "INSERT INTO tconfig (`token`, `value`) VALUES ('current_package', '0');";
        process_sql($sql_insert);
        $sql_insert = "INSERT INTO tconfig (`token`, `value`) VALUES ('url_updatemanager', 'https://artica.es/integriaupdate4/server.php');";
        process_sql($sql_insert);
    }
    echo ui_print_success_message(__('Successfully updated'), '', true, 'h3', true);
}
if ($unblock_users) {
    license_unblock_users();
}
Example #11
0
$labels = get_inventory_generic_labels();
$update = (bool) get_parameter("update");
if ($update) {
    $config["remote_inventory_type"] = (int) get_parameter("remote_inventory_type", 0);
    $config["inventory_default_owner"] = (string) get_parameter("inventory_default_owner", "");
    $companies = get_parameter("companies", explode(',', $config["inventory_default_companies"]));
    $config["inventory_default_companies"] = join(',', $companies);
    $users = get_parameter("users", explode(',', $config["inventory_default_users"]));
    $config["inventory_default_users"] = join(',', $users);
    update_config_token("remote_inventory_type", $config["remote_inventory_type"]);
    update_config_token("inventory_default_owner", $config["inventory_default_owner"]);
    update_config_token("inventory_default_companies", $config["inventory_default_companies"]);
    update_config_token("inventory_default_users", $config["inventory_default_users"]);
    foreach ($labels as $k => $lab) {
        $config["pandora_{$k}"] = get_parameter("pandora_{$k}");
        update_config_token("pandora_{$k}", $config["pandora_{$k}"]);
    }
    echo ui_print_success_message(__('Successfully updated'), '', true, 'h3', true);
}
$table = new StdClass();
$table->width = '100%';
$table->class = 'search-table-button';
$table->colspan = array();
$table->data = array();
$button = print_input_hidden('update', 1, true);
$button .= print_submit_button(__('Update'), 'upd_button', false, 'class="sub upd"', true);
$table_remote_inventory = enterprise_hook('setup_print_remote_inventory_type');
if ($table_remote_inventory !== ENTERPRISE_NOT_HOOK) {
    $table->data[3][0] = $table_remote_inventory;
    $table->colspan[3][0] = 2;
}
Example #12
0
$update = (bool) get_parameter("update");
if ($update) {
    $config["no_wu_completion"] = (string) get_parameter("no_wu_completion", "");
    $config["hours_perday"] = (int) get_parameter("hours_perday", "8");
    $config["autowu_completion"] = (int) get_parameter("autowu_completion", 0);
    $config["pwu_defaultime"] = get_parameter("pwu_defaultime", 4);
    $config["currency"] = (string) get_parameter("currency", "€");
    /*
    	process_sql ("DELETE FROM tconfig WHERE token = 'no_wu_completion'");
    	process_sql ("INSERT INTO tconfig (token, value) VALUES ('no_wu_completion', '".$config["no_wu_completion"]."')");
    */
    update_config_token("no_wu_completion", $config["no_wu_completion"]);
    update_config_token("hours_perday", $config["hours_perday"]);
    update_config_token("autowu_completion", $config["autowu_completion"]);
    update_config_token("pwu_defaultime", $config["pwu_defaultime"]);
    update_config_token("currency", $config["currency"]);
}
$table->width = '99%';
$table->class = 'search-table-button';
$table->colspan = array();
$table->data = array();
$table->data[0][0] = print_input_text("no_wu_completion", $config["no_wu_completion"], '', 20, 500, true, __('No WU completion users'));
$table->data[0][0] .= integria_help("no_wu_completion", true);
$table->data[0][1] = print_input_text("hours_perday", $config["hours_perday"], '', 5, 5, true, __('Work hours per day'));
$table->data[0][1] .= integria_help("hours_perday", true);
$table->data[1][0] = print_input_text("autowu_completion", $config["autowu_completion"], '', 7, 7, true, __('Auto WU Completion (days)'));
$table->data[1][0] .= integria_help("autowu_completion", true);
$table->data[1][1] = print_input_text("pwu_defaultime", $config["pwu_defaultime"], '', 5, 5, true, __('Project WU Default time'));
$table->data[2][0] = print_input_text("currency", $config["currency"], '', 3, 3, true, __('Currency'));
$button = print_input_hidden('update', 1, true);
$button .= print_submit_button(__('Update'), 'upd_button', false, 'class="sub upd"', true);
Example #13
0
$update = (bool) get_parameter("update");
if ($update) {
    $config["invoice_logo"] = (string) get_parameter("invoice_logo");
    $config["invoice_header"] = (string) get_parameter("invoice_header");
    $config["invoice_footer"] = (string) get_parameter("invoice_footer");
    $config["invoice_tax_name"] = (string) get_parameter("invoice_tax_name");
    $config["lead_warning_time"] = get_parameter("lead_warning_time", "7");
    $config["invoice_auto_id"] = get_parameter("invoice_auto_id");
    $config["invoice_id_pattern"] = (string) get_parameter("invoice_id_pattern", "15/[1000]");
    update_config_token("invoice_logo", $config["invoice_logo"]);
    update_config_token("invoice_header", $config["invoice_header"]);
    update_config_token("invoice_footer", $config["invoice_footer"]);
    update_config_token("invoice_tax_name", $config["invoice_tax_name"]);
    update_config_token("lead_warning_time", $config["lead_warning_time"]);
    update_config_token("invoice_auto_id", $config["invoice_auto_id"]);
    update_config_token("invoice_id_pattern", $config["invoice_id_pattern"]);
    //Update lead progress names
    $progress["0"] = get_parameter("progress_0");
    $progress["20"] = get_parameter("progress_20");
    $progress["40"] = get_parameter("progress_40");
    $progress["60"] = get_parameter("progress_60");
    $progress["80"] = get_parameter("progress_80");
    $progress["100"] = get_parameter("progress_100");
    $progress["101"] = get_parameter("progress_101");
    $progress["102"] = get_parameter("progress_102");
    $progress["200"] = get_parameter("progress_200");
    foreach ($progress as $key => $value) {
        process_sql_update('tlead_progress', array('name' => $value), array('id' => $key));
    }
}
$table->width = '99%';
Example #14
0
    update_config_token("limit_size", $config["limit_size"]);
    update_config_token("show_owner_incident", $config["show_owner_incident"]);
    update_config_token("show_creator_incident", $config["show_creator_incident"]);
    update_config_token("auto_incident_close", $config["auto_incident_close"]);
    update_config_token("iw_creator_enabled", $config["iw_creator_enabled"]);
    update_config_token("incident_creation_wu", $config["incident_creation_wu"]);
    update_config_token("incident_type_change", $config["incident_type_change"]);
    update_config_token("change_incident_datetime", $config["change_incident_datetime"]);
    update_config_token("enabled_ticket_editor", $config["enabled_ticket_editor"]);
    update_config_token("ticket_owner_is_creator", $config["ticket_owner_is_creator"]);
    update_config_token("show_user_name", $config["show_user_name"]);
    update_config_token("required_ticket_type", $config["required_ticket_type"]);
    update_config_token("show_creator_blank", $config["show_creator_blank"]);
    update_config_token("check_closed_incidents", $config["check_closed_incidents"]);
    update_config_token("days_check_closed_incidents", $config["days_check_closed_incidents"]);
    update_config_token("external_modify_tickets", $config["external_modify_tickets"]);
    foreach ($status as $id => $name) {
        $sql = sprintf('UPDATE tincident_status SET name = "%s"
			WHERE id = %d', $name, $id);
        process_sql($sql);
    }
    foreach ($resolutions as $id => $name) {
        $sql = sprintf('UPDATE tincident_resolution SET name = "%s"
			WHERE id = %d', $name, $id);
        process_sql($sql);
    }
    echo ui_print_success_message(__('Updated successfuly'), '', true, 'h3', true);
}
echo '<form method="post">';
$table = new StdClass();
$table->width = '100%';
Example #15
0
    $users = get_parameter("users", explode(',', $config["inventory_default_users"]));
    $config["inventory_default_users"] = join(',', $users);
    update_config_token("remote_inventory_type", $config["remote_inventory_type"]);
    update_config_token("inventory_default_owner", $config["inventory_default_owner"]);
    update_config_token("inventory_default_companies", $config["inventory_default_companies"]);
    update_config_token("inventory_default_users", $config["inventory_default_users"]);
    update_config_token("duplicate_inventory_name", $config["duplicate_inventory_name"]);
    foreach ($labels as $k => $lab) {
        $config["pandora_{$k}"] = get_parameter("pandora_{$k}");
        update_config_token("pandora_{$k}", $config["pandora_{$k}"]);
    }
    update_config_token("pandora_url", $config["pandora_url"]);
    update_config_token("pandora_api_password", $config["pandora_api_password"]);
    update_config_token("pandora_user", $config["pandora_user"]);
    update_config_token("pandora_pass", $config["pandora_pass"]);
    update_config_token("default_contract", $config["default_contract"]);
}
$table->width = '99%';
$table->class = 'search-table-button';
$table->colspan = array();
$table->data = array();
$table->data[0][0] = print_input_text("pandora_url", $config["pandora_url"], '', 30, 100, true, __('Pandora FMS URL'));
$table->data[0][1] = print_input_text("pandora_api_password", $config["pandora_api_password"], '', 30, 100, true, __('Pandora FMS API password'));
$table->data[1][0] = print_input_text("pandora_user", $config["pandora_user"], '', 30, 100, true, __('Pandora FMS User'));
$table->data[1][1] = print_input_text("pandora_pass", $config["pandora_pass"], '', 30, 100, true, __('Pandora FMS User password'));
$contracts = get_contracts();
$table->data[2][0] = print_select($contracts, 'default_contract', $config["default_contract"], '', __('Select'), '', true, 0, true, __('Default Contract'));
$table->data[2][1] = print_checkbox("duplicate_inventory_name", 1, $config["duplicate_inventory_name"], true, __('Allow inventory objects with the same name'));
$button = print_input_hidden('update', 1, true);
$button .= print_submit_button(__('Update'), 'upd_button', false, 'class="sub upd"', true);
$table_remote_inventory = enterprise_hook('setup_print_remote_inventory_type');