<?php
/* Modified by NATYS */
/* $Id: settings.inc.php,v 1.13 2003/11/12 14:55:24 leyeti Exp $ */

/* get country names */
$intervals = array(
	array("15","15 ".Lang::getLanguageString("minutes")),
    array("20","20 ".Lang::getLanguageString("minutes")),
    array("30","30 ".Lang::getLanguageString("minutes")),
    array("60","60 ".Lang::getLanguageString("minutes"))
);

$default_view = array(
	array("index.php", "today"),
    array("week.php", "week"),
    array("month.php", "month")
);

$vcal_methods = array(
	array("as_file", "vcal_to_file"),
	array("as_email", "vcal_to_mail")
);

$holidays = array(
		  array("none","gentemp_repeater_0"),
		  array("at","countryat"),
		  array("br","countrybr"),
		  array("ca","countryca"),
		  array("cs","countryczech"),
		  array("de","countrygerman"),
		  array("fr","countryfrench"),
		  array("nl","countrynl"),
		  array("nz","countrynz"),
		  array("ru","countryua"),
		  array("no","countrynorway"),
		  array("us","countryus"),
		  array("za","countryza")
); 

$am = array();
for ($i = 5; $i <= 12; $i++) {
	array_push($am, array($i, $i.":00"));
}

$pm = array();
for ($i = 13; $i <= 24; $i++) {
	array_push($pm, array($i, $i.":00"));
}

/// NATYS ///
/*$tz = date("O",time());
$server_timezone = "GMT".substr($tz,0,3).":".substr($tz,3)." (hh:mm)";
*/
////////////

/* HOW IT WORKS 
 *
 * option key:	defines the name of the configtag that will be used to insert
 *				into te database
 * method: 	defines what form input type is used to display the settings
 *				if not defined a text input will be shown
 * choices: 	defines the names and value to be given to the form inputs
 *          	if not defined there wil be no names and empty values
 *				- the value of a choice is an array of selectbox options and values
 *				- names of choices are only translated if a valid translation is found
 * type: 		defines in which value column the 'value' is inserted into the db
 *				this must be defined
 * name:		defines the language string associated with the option
 *				if not defined the key of the setting we be used a language string
 * translate	for select boxes only. defines if the values of the options of the select 
 * 				box are to be translated. defualt is true
 */ 

/* settings array */
$settings["calendar"] = array(
/// NATYS ///
/*	"gensettings" => array(
					"server_timezone" => array(
						        	"method" => "static",
        						    "name" => "Server_timezone_is",
									"value" => $server_timezone
        					),
					"calendar_summer_timezone" => array(
						        	"method" => "text",
        						    "name" => "summer_timezone_is_gmt",
						            "size" => "6",
									"width" => "40",
									"note" => "timezone_format"

        					),
					"calendar_winter_timezone" => array(
						        	"method" => "text",
        						    "name" => "winter_timezone_is_gmt",
						            "size" => "6",
									"width" => "40",
									"note" => "timezone_format"
        					),
 					"admin" => true,
        			"title" => "country_time_settings"
	),
/////////////////		
*/	"settings" => array(
		"calendar_be_participant" => array(
        	"method" => "checkbox",
            "name" => "default_be_participant",
            "type" => "int",
		    "description" => "check i participate by default", 
            "default" => "1"
        ),
		"calendar_notification" => array(
        	"method" => "checkbox",
		"choices" => array(
				   array("name" => "screen","value"=>NOTIFY_SCREEN), 
				   array("name" => "MIM","value"=>NOTIFY_MIM),
				   array("name" => "email","value"=>NOTIFY_MAIL),
				   ),
		"layout" => "h", 
        "description" => "notification for calendar", 
        "type" => "int", 
        "dimensions" => 1, 
        "selections" => 1, 
        "default" => array("1","6") 
        ),
        "calendar_show_birthdays" => array(
        	"method" => "checkbox",
            "name" => "show_birthdays",
            "type" => "int",
		    "description" => "show birthdays in calendar", 
            "default" => "1" 
        ),
        "calendar_viewfrom" => array(
        	"method" => "select",
            "choices" => array(
            	array("name" => "","value"=>$am)),
           	"type" => "int",
			"description" => "daytime from where to display the appointments", 
            "default" => "8", 
            "name" => "viewfromto",
            "translate" => false
        ),
        "calendar_viewto" => array(
        	"method" => "select",
            "choices" => array(
            	array("name" => "","value"=>$pm)),
           	"type" => "int",
			"description" => "daytime until appointments should appear", 
            "default" => "19", 
            "name" => "viewfromto",
            "translate" => false
        ),
        "calendar_interval" => array(
        	"method" => "select",
            "choices" => array(
            	array("name" => "","value"=>$intervals)),
           	"type" => "int",
			"description" => "time intervalls for calendar in minutes", 
            "default" => "30", 
            "name" => "intervallength",
            "translate" => false
        ),
        "calendar_defaultview" => array(
        	"method" => "select",
            "choices" => array(
            	array("name" => "","value"=>$default_view)),
           	"type" => "str",
			"description" => "default calendar view", 
            "default" => "index.php", 
            "name" => "calendar_default_view",
            "translate" => true
        ),
        "calendar_holiday_system" => array(
        	"method" => "select",
            "choices" => array(
            	array("name" => "","value"=>$holidays)),
           	"type" => "str",
			"description" => "for which country to evaluate holidays", 
            "default" => "de", 
            "name" => "holidaysel",
            "translate" => true
        ),
		/* NATYS 
        "calendar_vcal_method" => array(
        	"method" => "select",
            "choices" => array(
            	array("name" => "","value"=>$vcal_methods)),
           	"type" => "str",
		    "description" => "default vcal creation method", 
            "default" => "to_file", 
            "name" => "calendar_vcal_method",
			"translate" => true
        ),
		*/
        "title" => "edit_calendar"
    )
);

?>