Location: PHPKode > projects > ACollab > include/lib/constants.inc.php
<?php 
/****************************************************************************************/
/* ACollab                                                                              */
/****************************************************************************************/
/* Copyright (c) 2002-2004  Adaptive Technology Resource Centre / University of Toronto */
/*                                                                                      */
/* http://atutor.ca/acollab                                                             */
/*                                                                                      */
/* This program is free software. You may 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 may access the GNU General Public License at:                                    */
/* http://www.opensource.org/licenses/gpl-license.php                                   */
/*                                                                                      */
/* You may contact the Adaptive Technology Resource Centre at                           */
/* Robarts Library, University of Toronto                                               */
/* 130 St. George Street, Toronto, Ontario, Canada M5S 1A5                              */
/* Further contact information is available at http://www.utoronto.ca/atrc/             */
/****************************************************************************************/
/* Programmer:                                                                          */
/* Joel Kronenberg - ATRC                                                               */
/****************************************************************************************/

if (!defined('AC_INCLUDE_PATH')) { exit; }


define('AC_VERSION', '1.2');
define('ONLINE_UPDATE', 3); /* update the user expiry every 3 min */

if (!isset($_SERVER['REQUEST_URI'])) {
	$REQUEST_URI = $_SERVER['SCRIPT_NAME'];
	if ($_SERVER['QUERY_STRING'] != '') {
		$REQUEST_URI .= '?'.$_SERVER['QUERY_STRING'];
	}
	$_SERVER['REQUEST_URI'] = $REQUEST_URI;
}


/* get the base url									*/
$dir_deep		= substr_count(AC_INCLUDE_PATH, '..');
$current_url	= $_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF'];
$url_parts		= explode('/', $current_url);
$_base_href		= array_slice($url_parts, 0, count($url_parts) - $dir_deep-1);
$_base_href		= 'http://'.implode('/', $_base_href).'/';

$_base_path = substr($_base_href, strlen('http://'.$_SERVER['HTTP_HOST']));

/* relative uri */
$_rel_url = '/'.implode('/', array_slice($url_parts, count($url_parts) - $dir_deep-1));

/* the languages that are right to left: */
/* arabic, farsi, hebrew, urdo */
$_rtl_languages = array('ar', 'fa', 'he', 'ur');

$_file_types = array('doc' => array('application/msword',       'MS Word'),
                     'pdf' => array('application/pdf',          'PDF'),
                     'zip' => array('application/zip',          'Zip Archive'),
                     'gif' => array('image/gif',                'GIF Image'),
                     'jpeg'=> array('image/jpeg',               'JPEG Image'),
                     'jpg' => array('image/jpeg',               'JPEG Image'),
                     'png' => array('image/png',                'PNG Image'),
                     'txt' => array('text/plain',               'Plain Text'),
                     'php' => array('text/plain',               'Plain Text'),
                     'html'=> array('text/html',                'HTML Web Page'),
                     'htm' => array('text/html',                'HTML Web Page'),
                     'xls' => array('application/vnd.ms-excel', 'MS Excel'),
                     'rtf' => array('application/rtf',          'Rich Text Format'),
					 'mpg' => array('video/mpeg',               'MPEG Video'),
				 	 'mpeg'=> array('video/mpeg',               'MPEG Video'),
					 'mov' => array('video/quicktime',			'MOV Video'),
					 'qt'  => array('video/quicktime',          'QuickTime Video'),
					 'gz'  => array('application/x-gzip',       'GZip Archive'),
					 'tgz' => array('application/x-gzip',       'GZip Archive'),
					 'tar' => array('application/x-tar',        'Tar Archive'),
					);

$_nots[2]  = array('name' => 'NOTIFY_CALENDAR', 'tools' => true);
$_nots[4]  = array('name' => 'NOTIFY_LIBRARY',  'tools' => false);
$_nots[8]  = array('name' => 'NOTIFY_DRAFT',    'tools' => true);

define('N_CALENDAR', '2');
define('N_LIBRARY',  '4');
define('N_DRAFT',    '8');


?>
Return current item: ACollab