Location: PHPKode > projects > ARBS > arbs-1.5.1.78/default/config.inc.php
<?php
/*
 * ARBS - Advanced Resource Booking System
 * Copyright (C) 2005-2007 ITMC der TU Dortmund
 * Based on MRBS by Daniel Gardner <http://mrbs.sourceforge.net/>
 * 
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor,
 * Boston, MA 02110-1301, USA.
 */


/* ******************************************************************
 * NOTICE
 ********************************************************************
 * Please change at least the non-indented Parts of this config-file.
 * 
 * The indented blocks aren't *that* important (but you should have
 * a look at them, too.
 *******************************************************************/

			
			###########################################################################
			#   ARBS Configuration File
			#   Configure this file for your site.
			#   You shouldn't have to modify anything outside this file.
			###########################################################################
			
			#################################################
			# Various PHP-Settings
			# These setting can be used to solve problems
			# with this scripts.
			# Change them only if you know what you're doing!
			#################################################
			//ini_set("display_errors","1");
			//error_reporting(E_ALL);

###################
# Database settings
###################
# Which database system: "mysql"=MySQL
$dbsys = "mysql";
# Hostname of database server. For pgsql, can use "" instead of localhost
# to use Unix Domain Sockets instead of TCP/IP.
$db_host = "localhost";
# Database name:
$db_database = "arbs";

$db_login = "arbs";
# Database login password:
$db_password = "changeme";

 $DB_nopersist = 1;

################################
# Site identification information
#################################
$mrbs_admin = "Institut,Abteilung";
$mrbs_company = "ARBS<br><a href='http://www.uni-nordpol.de'>Universit&auml;t am Nordpol</a>";
$mrbs_url ="http://www.uni-nordpol.de/service/geraeteausleihe/start.htm";
$startpage="<a href=http://www.uni-nordpol.de/service/geraeteausleihe/start.htm>Startseite Ausleihe</a>";
#URL to dislpay a logo, set ="" to disable
$mrbs_logoimage="logo.gif";
#Page-Titel
$mrbs_pageheader = "";

################################
# Preset variables used in some forms
#################################
$mrbs_zip = "12345";
$mrbs_city = "Nordpol";

			################################
			#user database fields
			################################
			#this array contains the fields of table mrbs_entry AND mrbs_repeat(!!!) wich can be written by the user
			#note that the input fields in edit_entry.php have to be named like the database field
			#names should be choosen wisely to prevend them from overwriting other variables in the scripts
			
			#WARNING
			#please consult the manual before editing this. some fields have special functions and thus cannot be removed from the database structure
			#WARNING
			
			$db_entry_fields=array("name","description","advisor_name","advisor_email","advisor_phone","institute");
			#this array defines, wich fields are optional inputs
			#$db_entry_fields_optional[x]=true => $db_entry_fields[x] is optional
			$db_entry_fields_optional=array(false,true,false,false,false,false);
			#this array defines, wich fields are stored in the session and thus cannot be changed after the first booking
			#$db_entry_fields_session[x]=true => $db_entry_fields[x] will be stored
			$db_entry_fields_session=array(true,false,true,true,true,true);
			
			#define the structral output of the dbfields
			#consult the technical manual for details
			#
			# you may use the gettext-function _(...) for strings here; that way strings will be automatically translated if
			# there's a matchin entry in the po files. If not, just the given string will be used.
			$dbfield_structure=array(
			_("General")=>array(array("name",0,array("size"=>"40"),_("Lector").":","",false),
					                array("institute",4,array(
						"onchange"=>"javascript:if(this.selectedIndex==17)alert('Bitte tragen Sie ihre Einrichtung im Feld \'Kommentar\' ein');document.forms[3].elements[2].focus();",
			                        "option:not_selected"=>"--- Bitte ausw&auml;hlen ---",
			                        "option:FB01"=>"Mathematik",
			                        "option:FB02"=>"Physik",
			                        "option:FB03"=>"Chemie",
			                        "option:FB04"=>"Informatik",
			                        "option:FB05"=>"Statistik",
			                        "option:FB06"=>"Chemietechnik",
			                        "option:FB07"=>"Maschinenbau",
			                        "option:FB08"=>"Elektrotechnik,Informationstechnik",
			                        "option:FB09"=>"Raumplanung",
			                        "option:FB10"=>"Bauwesen",
			                        "option:FB11"=>"Wirtschafts- und Sozialwissen.",
			                        "option:FB12"=>"Erziehungswissenschaft,Soziologie",
			                        "option:FB13"=>"Rehabilitationswissenschaften",
			                        "option:FB14"=>"Humanwissenschaften und Theologie",
			                        "option:FB15"=>"Kulturwissenschaften",
			                        "option:FB16"=>"Musik,Kunst,Textil,Sport,Geographie",
			                        "option: "=>"Sonstige"
			                        ),_("Institute").":","",false),
			array("description",1,array("rows"=>"3","cols"=>"30"),_("Remarks").":",_("Here you may leave a message for special needs like cables, media etc."),false)
				),
			_("Advisor respective Collector")=>array(
					array("advisor_name",0,array("size"=>"40"),_("Name").":",_("These information will be used by us for possible callbacks."),false),
					array("advisor_phone",0,array("size"=>"40"),_("Phone").":",_("Phone number and eMail address will only be visible to us."),true),
					array("advisor_email",0,array("size"=>"40"),_("eMail").":","",true)
				)
			
			);
			#this defines, how the title field is beeing formed
			$titleformat=array("2");

################################
#Mailing rules
#note: there is no sendmail_adm_on_update/delete. most likely the administrator knows when he has changed something
################################
$mrbs_robot_email = "hide@address.com"; #adress in the "FROM" header of auto-mails
$mrbs_admin_email = "hide@address.com"; #adress where notifications are beeing send to
$sendmail_user_on_new=false;#send mail to mrbs_entry.advisor_email on creating new entrys
$sendmail_user_on_update=false;#send mail to mrbs_entry.advisor_email on updateing an entry
#same for administrator mails
$sendmail_admn_on_new=false;

			################################
			# Header Link Einstellungen
			#################################
			#Example: $header_links[0]="google;http://www.google.de;0;1";
			# first  part: link-text
			# second part: url (absolute or relative)
			# third  part: 0/1 add parameters to link (0=no,1=yes)
			# fourth part: 0/1 opens link in new window (0=no,1=yes)
			#$header_links[1]="Information;$instance/information/info.php;1;0";
			#$header_links[0]="Uni-Seite;http://www.uni-nordpol.de/;0;0";
			
			
			
			###################
			# Calendar settings
			###################
			#set this false to show the name instead of a booking block on the calendar where only one entry is present
			$showSingleEntrysAsBlock=true;
			# Resolution - what blocks can be booked, in seconds.
			# Default is half an hour: 1800 seconds.
			$resolution = 60*60;
			
			# Start and end of day, NOTE: These are integer hours only, 0-23, and
			# morningstarts must be < eveningends. See also eveningends_minutes.
			$morningstarts = 8;
			$eveningends   = 20;
			$lastBookingHour=16;
			
			$allowStartBookingAtWeekend=false;#if this is false, a user may book a device from friday to monday, but not from sunday to monday.
			# Minutes to add to $eveningends hours to get the real end of the day.
			# Examples: To get the last slot on the calendar to be 16:30-17:00, set
			# eveningends=16 and eveningends_minutes=30. To get a full 24 hour display
			# with 15-minute steps, set morningstarts=0; eveningends=23;
			# eveningends_minutes=45; and resolution=900.
			$eveningends_minutes = 0;
			
			# Start of week: 0 for Sunday, 1 for Monday, etc.
			$weekstarts = 1;
			
			# Trailer date format: 0 to show dates as "Jul 10", 1 for "10 Jul" 
			$dateformat = 0;
			
			########################
			# Miscellaneous settings
			########################
			
			
			#enable print page ('leihschein') ?
			$entryPrintEnabled=true;
			
			# Maximum repeating entrys (max needed +1):
			$max_rep_entrys = 365 + 1;
			
			# Default report span in days:
			$default_report_days = 60;
			
			# Results per page for searching:
			$search["count"] = 20;
			
			# Page refresh time (in seconds). Set to 0 to disable
			$refresh_rate = 0;
###############################################
# Authentication settings - read AUTHENTICATION
###############################################
# IP authentication allows any user to create bookings.
$auth["realm"]  = "ARBS";
$auth["type"]   = "ext"; //dont change this right now

# The various level two users (can modify other peoples settings)
# By default, only localhost is an administrator.
$auth["admin"][] = "admin";

#Benutzer-Array
global $users;
$users["admin"] = "changeme";

##########
# Language
##########

# an array with all available language files. for each entry xx, an lang.xxx files must be available in the instance directory
$language_available["Deutsch"]="de";
$language_available["English"]="en";
#the default language
$config_defaultlang="de";

/*
 * // TODO: This code has been commented out cause it overwrote the LC_MESSAGES-
 * flag needed by gettext()
 * 
# We also want to do locales for Dates/Times etc.
# Use the setlocale() function for this.

# Define the default locale here. For a list of supported
# locales on your system do "locale -a"
setlocale(LC_ALL,'C');

# We attempt to make up a sensible locale from the HTTP_ACCEPT_LANGUAGE
# environment variable. If this doesn't work for you, comment it out
# and assign locale directly.
# If HTTP_ACCEPT_LANGUAGE is a comma-separated list, take the first one.
$locale = ereg_replace(",.de", "", $HTTP_ACCEPT_LANGUAGE);


#
# Convert locale=xx to xx_XX; this is not correct for some locales???
if (strlen($locale) == 2) {
   $locale = strtolower($locale)."_".strtoupper($locale);
} else {
   $locale = strtolower(substr($locale,0,2))."_".strtoupper(substr($locale,3,2));
}
setlocale(LC_ALL,$locale);
*/

#allow changing of language by passing a new value via GET
// TODO: This part doesn't really belong in the config file!
if(isset($_GET['select_language'])){
    if(!in_array($_GET['select_language'],$language_available)){
        echo(_("invalid language selected"));
        exit;
    }
    $_SESSION['session_selected_language']=$_GET['select_language'];
}
$session_selected_language=$_SESSION['session_selected_language'];

#if needed, initialize language variable, then include language file for selected language
if($_SESSION['session_selected_language']==""){
    $_SESSION['session_selected_language']=$config_defaultlang; 
}

// TODO: Rework language including part
//require_once($instance."/lang.".$_SESSION['session_selected_language'].".inc.php");
if ($_SESSION['session_selected_language']!="de") {
	/* Since the german language-file has good chances to be updated more regularly
	 * than any other language-file, we include it as well.
	 * Since the strings are saved as constants, which can't be overwritten, we
	 * won't replace any strings, just add missing ones.
	 */
	//require_once($instance."/lang.de.inc.php");
}

			#############
			# Entry Types
			#############
			# This array maps entry type codes (letters A through J) into descriptions.
			# Each type has a color (see TD.x classes in the style sheet mrbs.css).
			#    A=Pink  B=Blue-green  C=Peach  D=Yellow      E=Light blue
			#    F=Orange   G=Red         H=Aqua   I=Light green J=Gray
			# The value for each type is a short (one word is best) description of the
			# type. The values must be escaped for HTML output ("R&amp;D").
			# Please leave I and E alone for compatibility.
			# If a type's entry is unset or empty, that type is not defined; it will not
			# be shown in the day view color-key, and not offered in the type selector
			# for new or edited entries.
			
			# $typel["A"] = "A";
			# $typel["B"] = "B";
			# $typel["C"] = "C";
			# $typel["D"] = "D";
			#$typel["F"] = $lang["external"];
			# $typel["F"] = "F";
			# $typel["G"] = "E";
			# $typel["H"] = "H";
			$typel["G"] = _("Reserved");
			# $typel["J"] = "J";
			$default_typel="G";
			
			#Modification enable/disable
			$mod_history_enable=false;#saves all critical sql querys in history.xml
			
			
			##########################################
			# PHP System Configuration - do not change
			##########################################
			# Disable magic quoting on database returns:
			set_magic_quotes_runtime(0);

?>
Return current item: ARBS