<?php
# This file contains:
# 1) Environment Settings:
#   urls, path info, and database connection information
# 2) Cookie Settings
# 3) Configuration Settings:
#   debug, login, and optimization options, etc
# 5) Email config

# -------------------------------------------
# Environment Information
# -------------------------------------------
if ( isset($_SERVER['PHP_SELF']) && isset($_SERVER['HTTP_HOST']) ) {
	$truc_path = explode ('/', $_SERVER['PHP_SELF']);
	if (count($truc_path)>0) {
        	unset($truc_path[count($truc_path)-1]);
	}
	$truc_path=implode('/',$truc_path);

	$truc_url = 'http://' . $_SERVER['HTTP_HOST'] . $truc_path . '/';

} else {
    $truc_url = 'http://localhost/truc/' ;
}

define('TRUC_URL', $truc_url);
# Bugtracker url used only if you're not going to use the built in bugtacker
# Need to customize some code on results_view_verifications_page.php for this change
# define(BUGTRACKER_URL, "http://web_server_name/bugzilla/");

# Set the database type, host, db_name, and provide login information
define('DB_TYPE', 'MySQL');
define('DB_HOST', '{DB_HOST}');
define('DB_NAME', '{DB_NAME}');
define('DB_LOGIN', '{DB_USER}');
define('DB_PWORD', '{DB_PWD}');

# FCK EDITOR
define('FCK_EDITOR_BASEPATH', TRUC_URL ."FCKeditor/");
define('IMG_SRC', TRUC_URL ."images/");
define('ICON_SRC', TRUC_URL ."images/icons"); # Might not need icons
define('DOC_ROOT', TRUC_URL); # do not store documents in web server document root
define('FILE_UPLOAD_PATH', './file_upload/'); # include forwardslash at end of path
define('WINDOW_TITLE', 'TRUC 0.12.0');
define('PAGE_TITLE', 'TRUC');

# -------------------------------------------
# Cookies
# -------------------------------------------
define('USER_COOKIE_NAME','RTH_USER');
define('PWD_COOKIE_NAME','RTH_PWD');
define('COOKIE_PATH', '/'); # set this to something more restrictive if needed
define('COOKIE_DOMAIN', '');
define('COOKIE_EXPIRE_LENGTH', 30000000); # time for cookie to live in seconds (1 year)
define( 'ON', 1 );
define( 'OFF', 0 );

# -------------------------------------------
# Configuration Settings
# -------------------------------------------
define('LOGIN_METHOD', 'MD5'); # Type of encryption used (MD5, PLAIN, LDAP)
define('DEBUG', ON); # used to view debug info at the bottom of each page
define('LOGGING', ON); # not currently used. 
define('USE_JAVASCRIPT', true); # Allow javascript features.
define('USE_FCK_EDITOR', true);  # View textarea as fck editor.  Must have javascript enabled
define('IMPORT_EXPORT_TO_EXCEL', true);  # Set to false and all files will be imported and exported in csv format
define('REMOTE_TEST_EXE', true); # Enable remote test execution

# -------------------------------------------
# LDAP Settings
# -------------------------------------------
/*
define('LDAP_SERVER', 'ldap://server_name/');
define('LDAP_PORT', '389');
define('LDAP_ID', 'uid=user_id,ou=people,o=in_your,o=org');
define('LDAP_PWD', 'password');
define('LDAP_DN', 'ou=people,o=in_your,o=org');
*/

# --- notice display ---
# Control whether errors of level NOTICE, the lowest level of error,
#  are displayed to the user.  Default is OFF, but turning it ON may 
# be useful while debugging. Leave this set to ON while we developing
define('SHOW_WARNINGS', OFF);

# --- warning display ---
# Control whether errors of level WARNING, the middle level of error,
#  are displayed to the user.  Default is ON.  Turning it OFF may
#  hide useful information from the user.
define('SHOW_NOTICES', OFF);

# -------------------------------------------
# DEFINE EMAIL PROPERTIES
#	NOTE: Right now the system only works with SMTP.  
#		  You will have to supply a valid SMTP server name for email to work
#		  We will eventually implement something that allows for different mail protocols.
# -------------------------------------------
define('ADMIN_EMAIL', "webmaster@".$_SERVER['HTTP_HOST']);
define('SEND_EMAIL_NOTIFICATION', true);
define('SMTP_HOST', 'localhost');

# used for alternate row colors on tables
define('ROW1_STYLE', 'row-1');
define('ROW2_STYLE', 'row-2');

# -------------------------------------------
# Permissions
# -------------------------------------------
define('ANYBODY',	0);
define('USER',		10);
define('DEVELOPER',	20);
define('MANAGER',	30);
define('ADMIN',		40);
define('NOBODY',	100);

# -------------------------------------------
# DEFINE RECORDS PER PAGE
# -------------------------------------------
define('RECORDS_PER_PAGE_TESTSET_ADD', 100);
define('RECORDS_PER_PAGE_TESTSET_COPY', 100);
define('RECORDS_PER_PAGE_TESTSET_EDIT', 100);
define('RECORDS_PER_PAGE_TEST_REQ_ASSOC', 100);
define('RECORDS_PER_PAGE_PROJECT_EDIT_USERS', 100);
define('RECORDS_PER_PAGE_PROJECT_MANAGE_AREAS', 25);
define('RECORDS_PER_PAGE_PROJECT_MANAGE_ENVIRONMENTS', 25);
define('RECORDS_PER_PAGE_PROJECT_MANAGE_MACHINES', 25);
define('RECORDS_PER_PAGE_PROJECT_MANAGE_REQ_AREA_COVERED', 25);
define('RECORDS_PER_PAGE_PROJECT_MANAGE_REQ_DOC_TYPE', 25);
define('RECORDS_PER_PAGE_PROJECT_MANAGE_REQ_FUNCT', 25);
define('RECORDS_PER_PAGE_PROJECT_MANAGE_TESTTYPE', 25);
define('RECORDS_PER_PAGE_PROJECT_MANAGE_TEST_DOC_TYPE', 25);
define('RECORDS_PER_PAGE_PROJECT_MANAGE_USERS', 25);
define('RECORDS_PER_PAGE_REPORT_FAILED_VERIFIS', 100);
define('RECORDS_PER_PAGE_REQUIREMENTS', 25);
define('RECORDS_PER_PAGE_REQUIREMENT_NOTIFICATIONS', 100);
define('RECORDS_PER_PAGE_TEST_STEPS', 50);
define('RECORDS_PER_PAGE_ARCHIVE_TESTS', 25);
define('RECORDS_PER_PAGE_PROJECT_MANAGE_BUG_CATEGORY', 25);
define('RECORDS_PER_PAGE_PROJECT_MANAGE_BUG_COMPONENT', 25);
define('RECORDS_PER_PAGE_100', 100);
define('RECORDS_PER_PAGE_25', 25);

?>