Files
Mozilla/mozilla/webtools/addons/inc/init.php
mike.morgan%oregonstate.edu 1913766488 .htaccess, README
updated .htaccess file to define include_path to prepend/append files are processed properly.
    added installation instructions.

config-dist.php
    added REPO_DIR to store constant for repository.
    added site config information handoff to smarty display object for correct webpaths.

developers/*
    developers index page along with accompanying template.

search.php
    this will be the main search (placeholder).


git-svn-id: svn://10.0.0.236/trunk@175953 18797224-902f-48f8-a5cc-f745e15eee43
2005-07-12 11:34:42 +00:00

65 lines
1.6 KiB
PHP

<?php
// Include config file.
require_once('config.php');
// Set runtime options.
ini_set('display_errors',DISPLAY_ERRORS);
ini_set('error_reporting',ERROR_REPORTING);
ini_set('magic_quotes_gpc',0);
// Include required libraries and classes.
require_once('DB.php');
require_once(LIB.'/smarty/libs/Smarty.class.php');
require_once(LIB.'/addon.class.php');
require_once(LIB.'/auth.class.php');
require_once(LIB.'/rdf.class.php');
require_once(LIB.'/rss.class.php');
require_once(LIB.'/session.class.php');
require_once(LIB.'/sql.class.php');
require_once(LIB.'/user.class.php');
require_once(LIB.'/version.class.php');
// Instantiate Smarty class.
$smarty = new Smarty();
// Set up smarty.
$smarty->template_dir = TEMPLATE_DIR;
$smarty->compile_dir = COMPILE_DIR;
$smarty->cache_dir = CACHE_DIR;
$smarty->config_dir = CONFIG_DIR;
// Pass config variables to Smarty object.
$smarty->assign('config',
array( 'webpath' => WEB_PATH,
'rootpath' => ROOT_PATH,
'repo' => REPO_DIR)
);
// Instantiate SQL class.
$db = new SQL();
// Define PEAR options.
$dsn = array (
'phptype' => 'mysql',
'dbsyntax' => 'mysql',
'username' => DB_USER,
'password' => DB_PASS,
'hostspec' => DB_HOST,
'database' => DB_NAME
);
// Try to connect. If we do not connect, show standard 'gone fishing' error page.
if (!$db->connect($dsn)) {
$wrapper = 'inc/wrappers/nonav.tpl';
$smarty->assign(
array(
'content'=>'site-down.tpl',
'error'=>$db->error
)
);
$smarty->display($wrapper);
exit;
}
?>