0,0 → 1,87 |
<?php |
/* |
Copyright (C) 2003-2004 MJG/04-Inconceivable.org |
See file LICENSE for licensing details. |
See file VERSION for versioning/author/source details |
See file CHANGELOG for changes from version to version |
*/ |
|
/* Configuration Notes |
=================== |
- Comments leading with a '(*)' are for internal use only. |
Do not change. |
*/ |
|
// Before we do anything, set what errors to report |
error_reporting (E_ALL ^ E_NOTICE); |
|
// Init var/arrays |
$CONF = array(); // (*) Hold configuration info |
$E = array(); // (*) Hold error info |
$TODAY = array(); // (*) Hold today's events data |
$EVENT = array(); // (*) Hold event data |
|
// Setup $CONF |
// + Appt! specific |
$CONF['__version'] = "1.35"; // (*) Appt! version |
// + Database |
$CONF['dbConn'] = ""; // (*) Database connection resource |
$CONF['dbDB'] = ""; // Database name |
$CONF['dbHost'] = "localhost"; // Database host |
$CONF['dbUser'] = ""; // Database user |
$CONF['dbPass'] = ""; // Database user's password |
$CONF['tbl_cal'] = "calendar"; // Table for events |
// + Paths, URLs, files |
$CONF['path_base'] = "/home/andreas/public_html/pm"; // Absolute path to base directory |
$CONF['path_site'] = $CONF['path_base'] . "/site"; // Absolute path to /site directory |
$CONF['path_include'] = $CONF['path_site'] . "/include"; // Absolute path to /site/include directory |
$CONF['path_lib'] = $CONF['path_site'] . "/lib"; // Absolute path to /site/lib directory |
// $CONF['url_base'] = "http://62.178.157.104:1081/~andreas/pm/"; // Absolute URL to Appt!'s location |
$CONF['url_base'] = "."; // Absolute URL to Appt!'s location |
$CONF['url_site'] = $CONF['url_base'] . "/site"; // Absolute or relative URL to /site directory |
$CONF['url_images'] = $CONF['url_site'] . "/images"; // Absolute or relative url to /site/images directory |
$CONF['url_include'] = $CONF['url_site'] . "/include"; // Absolute or relative url to /site/include directory |
$CONF['url_admin'] = "admin"; // Relative url to admin directory |
// + Schedule Administration |
$CONF['adm_user'] = "admin"; // Username to allow into Schedule Administration |
$CONF['adm_pass'] = ""; // Username's password |
$CONF['adm_authed'] = 0; // (*) 0 - not authenticated, 1 - is authenticationed |
$CONF['adm_authed_timeout'] = 900; // Number of seconds until authenticationtimes out |
|
// Initialization Procedures |
// Put all form input into a single array |
foreach ( $_GET as $k=>$v ) |
{ |
if ( !empty($v) && !isset($FORM[$k]) ) $FORM[$k] = $v; |
// echo "<!-- $k = $v -->"; |
} |
foreach ( $_POST as $k=>$v ) |
{ |
if ( !empty($v) && !isset($FORM[$k]) ) $FORM[$k] = $v; |
// echo "<!-- $k = $v -->"; |
} |
// + Set year/month/today to defaults if not set |
if ( !isset($FORM['year']) && !isset($FORM['month']) && !isset($FORM['today']) ) |
{ |
$FORM['year'] = date("Y", time()); |
$FORM['month'] = date("n", time()); |
$FORM['today'] = date("j", time()); |
|
} |
// + Setup $year/$month/$today compatibility vars |
$year = $FORM['year']; |
$month = $FORM['month']; |
$today = $FORM['today']; |
$id = $_REQUEST['id']; |
$header = $_REQUEST['header']; |
$del = $_REQUEST['del']; |
// + Date manipulation always done |
$daylong = date("l",mktime(1,1,1,$month,$today,$year)); |
$monthlong = date("F",mktime(1,1,1,$month,$today,$year)); |
$dayone = date("w",mktime(1,1,1,$month,1,$year)); |
$numdays = date("t",mktime(1,1,1,$month,1,$year)); |
$alldays = array('Son','Mon','Die','Mit','Don','Fre','Sam'); |
$next_year = $year + 1; |
$last_year = $year - 1; |
if ($today > $numdays) { $today--; } |
?> |