Newer
Older
Digital_Repository / Repositories / statistics / config / inc.vars.es_src.php
<?php

	/*
		Configuration for ePrintstats project.
		The serialized vars in user.serialized.es.cfg are read after this
		so may override any values. This is done to allow settings to be 
		changed via the web admin interface. 

		Note that many of the variables are actually not used as eprintstats uses
		code from another project.
	*/

	// These are available globally by default.
	// Not all are relevant as code was copied from another project.
	define("ERROR_EXIT", 1); 
	define("ERROR_CONTINUE", 0); 
	define("GET_POST_PROCESS_INVALID", TRUE);
	define("UNSET_REQUEST", 1);
	define("UNSET_KEY", 2);
	define("UNSET_CONTINUE", 3);
	define("UNSET_ACTION", 4);
	define("UNSET_REPLACE", 5);
	define("NOT_EMPTY", 1);
	
	// These are loaded to $GLOBALS and are available throughout the program without using "global"
	$GLOBALS["config_vars"] = array(
		"debug" => array(
			"vTITLE" => "Debug output",
			"vDESCRIPTION" => "TRUE or FALSE selected for public or private",
			/* the initial page needs to be able to identify if public (no auth) or private (auth) */
			"public" => 1
		),
		"connections" => array(
			"vTITLE" => "SQL server settings",
			"vDESCRIPTION" => "Specify the server name, database name, and user accounts to use.",
			"sqlserver" => "localhost",
			"sqldatabase" => "eprintstats",
			"sqluser_public" => "eprintstatspub",
			"sqlpass_public" => "AuldGrizzel",
			// NJS 2006-06-14: Generalised the connection list to support
			// multiple EPrints archives. Also added the natural-language
			// archive name for easy reference.
			"eprints_archives" => array(
				"default" => array(
					"archive_name" => "EPrints Repositories @ Otago",
				),
				"otago_eprints" => array(
					"archive_name" => "Otago EPrints Repository",
					"sqlserver_eprints" => "localhost",
					"sqluser_eprints" => "otago_eprints",
					"sqlpass_eprints" => "DrSyntaxRidesAgain",
				),
				"cardrona" => array(
					"archive_name" => "Cardrona Community Repository",
					"sqlserver_eprints" => "localhost",
					"sqluser_eprints" => "cardrona",
					"sqlpass_eprints" => "chautquau",
				),
			),
		),
		"filelocation" => array(
			"vTITLE" => "File locations",
			"vDESCRIPTION" => "Install directory and location of required files.",
			"base_install_dir" => array(
				"unix" => "##EPRINTSSTATS##",
				"windows" => "C:/ePrintsStats",
			),
			"base_log_dir" => "logs",
			"base_includes_dir" => "includes",
			"base_session_dir" => "session",
			"base_config_dir" => "config",
		),
		"input_filter" => array(
			"vTITLE" => "Input filtering.",
			"vDESCRIPTION" => "Input checking for GET POST",
			/* List of allowed key/value pairs and COOKIES Values either explicit or a function */
			/* Escaping of strings destined for sql are dealt with by the sql object. */
			/* Excludes the action array which is explicitly named below. */
			/* How to deal with sets of parameters. Define arrays of them? */
			"keys" => array(
				"public" => array(
					"action" => array(
						"maxlength" => "20",
						"type" => "string",
						"action" => UNSET_REQUEST,
						"pattern" => "/[^\w]/i",
						"values" => array('one','two'),
					),
					"year" => array(
						"maxlength" => "50",
						"type" => "freetext",
						"action" => UNSET_REPLACE,
						"pattern" => "/[%;#--<>\(\)]/i",
						"replacement" => "",
						"content" => NOT_EMPTY,
					),
					"month" => array(
						"maxlength" => "50",
						"type" => "freetext",
						"action" => UNSET_REPLACE,
						"pattern" => "/[%;#--<>\(\)]/i",
						"replacement" => "",
						"content" => NOT_EMPTY,
					),
					"range" => array(
						"maxlength" => "20",
						"type" => "string",
						"action" => UNSET_REQUEST,
						"pattern" => "/[^\w]/i",
						"values" => array('one','two'),
					),
					"code" => array(
						"maxlength" => "3",
						"type" => "string",
						"action" => UNSET_REQUEST,
						"pattern" => "/[^\w]/i",
						"values" => array('one','two'),
					),
					/* maxlength here refers to largest integer */
					"id" => array(
						"maxlength" => "1005",
						"type" => "integer",
						"action" => UNSET_REQUEST,
					),
				),
			),
		),
		"general" => array(
			"vTITLE" => "General progam details",
			"vDESCRIPTION" => "Admin name and contact, prog title",
			"admin_name" => "ePrints Administrator",
			"admin_email" => "##EPRINTS_ADMIN_EMAIL##",
			"support_name" => "ePrints Administrator",
			"support_email" => "##EPRINTS_ADMIN_EMAIL##",
			"prog_title" => "ePrints Statistics",
			"prog_title_public" => "ePrints Statistics",
			"short_prog_title" => "es",
			"public_prog" => "index.php",
			"public_prog_request_uri" => "/index.php",
			"eprints_location" => "http://##EPRINTS_HOST##:##EPRINTS_PORT##",
			/* replaced admin_prog */
			"prog_address" => array(
				"public" => "index.php",
			),
		),
		/* NJS 2005-12-16
			Local network setup. Must correspond to the $local_IPs
			variable in eprints-usage.php.
		*/
		"local_networks" => array(
			"XA" => "Repository Admin",
			"XI" => "Otago Intranet",
		),
		"messages" => array(
			"vTITLE" => "Messages",
			"vDESCRIPTION" => "Error messages.",
			"message_noservice" => "This service is currently unavailable.",
			"message_missing_include" => "Missing include file.",
		),
		"actions" => array(
			"vTITLE" => "Form actions",
			"vDESCRIPTION" => "Which files are included for get/post actions. i.e the pub_default action will include the files listed in the array",
			"includes" => array(
				'public' => array(
					// NJS 2006-06-14
					'default' => array(
						'pub_default' => array ('inc.html.header.es.php','inc.fns.navbar.es.php','inc.html.navbar_global.es.php','inc.html.pub_default.es.php','inc.html.footer.es.php'),
						'no_service_public' => array ('inc.html.header.es.php','inc.html.no_service_public.es.php','inc.html.footer.es.php'),
						'cumulative_usage' => array ('inc.fns.cumulative_usage.es.php','inc.html.header.es.php','inc.fns.navbar.es.php','inc.html.navbar_global.es.php','inc.html.cumulative_usage.es.php','inc.html.footer.es.php'),
						'cumulative_usage_country' => array ('inc.fns.cumulative_usage_country.es.php','inc.html.header.es.php','inc.fns.navbar.es.php','inc.html.navbar_global.es.php','inc.html.cumulative_usage_country.es.php','inc.html.footer.es.php'),
						'show_detail_date' => array ('inc.fns.show_detail_date.es.php','inc.html.header.es.php','inc.fns.navbar.es.php','inc.html.navbar_global.es.php','inc.html.show_detail_date.es.php','inc.html.footer.es.php'),
						'show_detail_country' => array ('inc.fns.show_detail_country.es.php','inc.html.header.es.php','inc.fns.navbar.es.php','inc.html.navbar_global.es.php','inc.html.show_detail_country.es.php','inc.html.footer.es.php'),
						'show_detail_eprint' => array ('inc.fns.show_detail_eprint.es.php','inc.html.header.es.php','inc.fns.navbar.es.php','inc.html.navbar_global.es.php','inc.html.show_detail_eprint.es.php','inc.html.footer.es.php'),
					),
					'otago_eprints' => array(
						'pub_default' => array ('inc.html.header.es.php','inc.fns.navbar.es.php','inc.html.navbar_global.es.php','inc.html.pub_default.es.php','inc.html.footer.es.php'),
						'no_service_public' => array ('inc.html.header.es.php','inc.html.no_service_public.es.php','inc.html.footer.es.php'),
						'cumulative_usage' => array ('inc.fns.cumulative_usage.es.php','inc.html.header.es.php','inc.fns.navbar.es.php','inc.html.navbar_global.es.php','inc.html.cumulative_usage.es.php','inc.html.footer.es.php'),
						'cumulative_usage_country' => array ('inc.fns.cumulative_usage_country.es.php','inc.html.header.es.php','inc.fns.navbar.es.php','inc.html.navbar_global.es.php','inc.html.cumulative_usage_country.es.php','inc.html.footer.es.php'),
						'show_detail_date' => array ('inc.fns.show_detail_date.es.php','inc.html.header.es.php','inc.fns.navbar.es.php','inc.html.navbar_global.es.php','inc.html.show_detail_date.es.php','inc.html.footer.es.php'),
						'show_detail_country' => array ('inc.fns.show_detail_country.es.php','inc.html.header.es.php','inc.fns.navbar.es.php','inc.html.navbar_global.es.php','inc.html.show_detail_country.es.php','inc.html.footer.es.php'),
						'show_detail_eprint' => array ('inc.fns.show_detail_eprint.es.php','inc.html.header.es.php','inc.fns.navbar.es.php','inc.html.navbar_global.es.php','inc.html.show_detail_eprint.es.php','inc.html.footer.es.php'),
					),
					'cardrona' => array(
						'pub_default' => array ('inc.html.header.es.php','inc.fns.navbar.es.php','inc.html.navbar_global.es.php','inc.html.pub_default.es.php','inc.html.footer.es.php'),
						'no_service_public' => array ('inc.html.header.es.php','inc.html.no_service_public.es.php','inc.html.footer.es.php'),
						'cumulative_usage' => array ('inc.fns.cumulative_usage.es.php','inc.html.header.es.php','inc.fns.navbar.es.php','inc.html.navbar_global.es.php','inc.html.cumulative_usage.es.php','inc.html.footer.es.php'),
						'cumulative_usage_country' => array ('inc.fns.cumulative_usage_country.es.php','inc.html.header.es.php','inc.fns.navbar.es.php','inc.html.navbar_global.es.php','inc.html.cumulative_usage_country.es.php','inc.html.footer.es.php'),
						'show_detail_date' => array ('inc.fns.show_detail_date.es.php','inc.html.header.es.php','inc.fns.navbar.es.php','inc.html.navbar_global.es.php','inc.html.show_detail_date.es.php','inc.html.footer.es.php'),
						'show_detail_country' => array ('inc.fns.show_detail_country.es.php','inc.html.header.es.php','inc.fns.navbar.es.php','inc.html.navbar_global.es.php','inc.html.show_detail_country.es.php','inc.html.footer.es.php'),
						'show_detail_eprint' => array ('inc.fns.show_detail_eprint.es.php','inc.html.header.es.php','inc.fns.navbar.es.php','inc.html.navbar_global.es.php','inc.html.show_detail_eprint.es.php','inc.html.footer.es.php'),
					),
				),
			),
		),
	);