2010-12-07 20:19:27 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
require_once (__DIR__."/configs/navigation.php");
|
|
|
|
require_once (__DIR__."/configs/ACL.php");
|
|
|
|
|
|
|
|
require_once 'propel/runtime/lib/Propel.php';
|
|
|
|
Propel::init(__DIR__."/configs/propel-config.php");
|
|
|
|
|
|
|
|
//DateTime in PHP 5.3.0+ need a default timezone set.
|
|
|
|
$tz = ini_get('date.timezone') ? ini_get('date.timezone') : 'America/Toronto';
|
|
|
|
date_default_timezone_set($tz);
|
|
|
|
|
|
|
|
require_once (__DIR__."/configs/constants.php");
|
|
|
|
require_once (__DIR__."/configs/conf.php");
|
|
|
|
require_once 'DB.php';
|
|
|
|
|
|
|
|
require_once 'Playlist.php';
|
|
|
|
require_once 'StoredFile.php';
|
|
|
|
require_once 'Schedule.php';
|
|
|
|
require_once 'Shows.php';
|
|
|
|
require_once 'Users.php';
|
|
|
|
|
|
|
|
global $CC_CONFIG, $CC_DBC;
|
|
|
|
$dsn = $CC_CONFIG['dsn'];
|
|
|
|
|
|
|
|
$CC_DBC = DB::connect($dsn, TRUE);
|
|
|
|
if (PEAR::isError($CC_DBC)) {
|
|
|
|
echo "ERROR: ".$CC_DBC->getMessage()." ".$CC_DBC->getUserInfo()."\n";
|
|
|
|
exit(1);
|
|
|
|
}
|
|
|
|
$CC_DBC->setFetchMode(DB_FETCHMODE_ASSOC);
|
|
|
|
|
2010-12-30 00:43:17 +01:00
|
|
|
Zend_Session::start();
|
|
|
|
|
2010-12-07 20:19:27 +01:00
|
|
|
class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
|
|
|
|
{
|
|
|
|
protected function _initDoctype()
|
|
|
|
{
|
|
|
|
$this->bootstrap('view');
|
|
|
|
$view = $this->getResource('view');
|
|
|
|
$view->doctype('XHTML1_STRICT');
|
|
|
|
}
|
|
|
|
|
|
|
|
protected function _initHeadLink()
|
|
|
|
{
|
|
|
|
$view = $this->getResource('view');
|
|
|
|
|
2011-01-16 23:12:02 +01:00
|
|
|
$view->headLink()->appendStylesheet('/css/redmond/jquery-ui-1.8.8.custom.css');
|
2010-12-07 20:19:27 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
protected function _initHeadScript()
|
|
|
|
{
|
|
|
|
$view = $this->getResource('view');
|
|
|
|
$view->headScript()->appendFile('/js/libs/jquery-1.4.4.min.js','text/javascript');
|
2011-01-16 23:12:02 +01:00
|
|
|
$view->headScript()->appendFile('/js/libs/jquery-ui-1.8.8.custom.min.js','text/javascript');
|
2011-01-27 00:31:59 +01:00
|
|
|
$view->headScript()->appendFile('/js/libs/stuHover.js','text/javascript');
|
2011-01-31 05:05:49 +01:00
|
|
|
$view->headScript()->appendFile('/js/libs/jquery.stickyPanel.js','text/javascript');
|
|
|
|
|
|
|
|
$view->headScript()->appendFile('/js/airtime/common/common.js','text/javascript');
|
2010-12-07 20:19:27 +01:00
|
|
|
|
2011-01-30 22:47:11 +01:00
|
|
|
//TODO: Find better place to put this in.
|
2011-01-31 00:20:47 +01:00
|
|
|
$view->addHelperPath('../application/views/helpers', 'Airtime_View_Helper');
|
2011-01-30 22:47:11 +01:00
|
|
|
}
|
2010-12-07 20:19:27 +01:00
|
|
|
}
|
|
|
|
|