[Openfirst-cvscommit] base/config globals.php,1.6,1.7
Brought to you by:
xtimg
From: Astronouth7303 <ast...@us...> - 2005-03-13 01:49:51
|
Update of /cvsroot/openfirst/base/config In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18262/config Modified Files: globals.php Log Message: Overwritting previous changes Index: globals.php =================================================================== RCS file: /cvsroot/openfirst/base/config/globals.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** globals.php 13 Mar 2005 01:43:42 -0000 1.6 --- globals.php 13 Mar 2005 01:49:26 -0000 1.7 *************** *** 1,119 **** <?php /* ! * openFIRST base configuration file ! * This file has been automatically generated by first.php. ! * it contains the basic configuration options required to ! * operate the OpenFIRST web portal software. Note, that ! * most configuration options are now stored in the MySQL ! * database, in the ofirst_config table. ! */ ! $dbasetype = 'mysql'; ! $ostype = 'windows'; ! if ($ostype == "windows") { ! ini_set("include_path", ini_get("include_path") . ";../config/;."); ! } else { ! ini_set("include_path", ini_get("include_path") . ":../config/:."); ! } ! include_once('dbase.php'); ! ! $encryption = 'md5'; ! ! $title = 'Astro73'; ! $version = 'CVS'; ! $sqlserver = 'localhost'; ! $sqluser = 'root'; ! $sqlpassword = ''; ! $sqldatabase = 'of_release'; ! if(function_exists("ofirst_dbconnect") == false) { ! die("Your version of PHP has not been compiled with SQL support, therefore the openFIRST web portal system cannot run on this system. Please contact your system administrator to request SQL support for your version of PHP."); ! } ! ! $sqlconnection = ofirst_dbconnect("$sqlserver","$sqluser","$sqlpassword"); ! ! if($peardb) { ! $sqlconnection = ofirst_select_db($sqldatabase); ! } else { ! ofirst_select_db($sqldatabase); ! } ! ! $pass_save_disabled=true; ! $regenabled=true; ! $home = 'http://astro73/openfirst'; ! $header = 'D:/XAMPP/htdocs/openFIRST/config/headers.php'; ! $footer = 'D:/XAMPP/htdocs/openFIRST/config/footers.php'; ! $mailnotify = 'admin@astro73'; ! $mailfrom = 'openfirst@astro73'; ! $basepath = '/openfirst'; ! $fbasepath = %FBASEPATH; ! ! // Determine what module the user is viewing ! ! $currentmodule = str_replace($basepath, "", $_SERVER["SCRIPT_NAME"]); ! $currentmodule = substr($currentmodule, 1, strpos($currentmodule, "/", 2) - 1); ! ! #FIXME: Use $fbasepath instead of getcwd() ! session_start(); ! include('auth.php'); ! if(function_exists("glob")) { ! // Include the functions using glob(); ! if(is_readable(getcwd() . "/../config/functions/")) { ! foreach (glob(getcwd() . "/../config/functions/*.php") as $filename) { ! include($filename); ! } ! } elseif (is_readable(getcwd() . "/../../config/functions/")) { ! foreach (glob(getcwd() . "/../../config/functions/*.php") as $filename) { ! include($filename); ! } ! } ! } else { ! // Include the functions without using glob(); ! } ! ! $headers = ""; ! ! $incl = ofirst_dbquery("SELECT * FROM ofirst_config"); ! ! // If there is no error then run the module add feature ! if(ofirst_dberrno() == 0) { ! // Begin to loop through modules from the databaes ! while($module = ofirst_dbfetch_object($incl)) { ! // Check if the value is try, if it is then run an include ! if( (bool) $module->active == true) { ! // Check if there are includes that need to be included ! if(! $module->includes == ""){ ! // If the list is not empty then explode the value and put it into inclist ! $inclist = explode(",",$module->includes); ! // This is to remove an error that you have if you don't check if there are more then 2 ! if(count($inclist) >= 2){ ! ! // Loop through the inclist and add them according to their paths ! foreach($inclist As $inc){ ! include("$fbasepath/$module->modulename/$inc"); ! } ! } else { ! // If there is only 1 include available then use this line to include it instead ! include("$fbasepath/$module->modulename/$module->includes"); ! } ! } ! ! // If the module has requested to be shown on the menu then add it ! if( (bool) $module->showonmenu == true) { ! // If it is the current module then color the item ! if ($currentmodule == $module->modulename){ ! $headers .= " » <font color='red'><u><a class='menu' href='$basepath/$module->modulename'>".ucwords($module->modulename)."</a></u></font> |"; ! ! // Declare important variables so that headers can pick them up and preview them ! ! $adminnav = str_replace("\$basepath", $basepath, $module->adminnavigation) . " <a href='http://bugzilla.openfirst.org'>Report Bug</a>"; ! $subnav = str_replace("\$basepath", $basepath, $module->modulenavigation); ! ! } else { ! $headers .= " » <a class='menu' href='$basepath/$module->modulename'>".ucwords($module->modulename)."</a> |"; ! } ! } ! } ! } } - - session_write_close(); ?> --- 1,15 ---- <?php /* ! * openFIRST globals.php ! * This is a placeholder file. It will be recreated ! * by first.php when you first access and configure ! * your OpenFIRST portal software. ! */ ! if(file_exists("../config/first.php")) { ! header("Location: ../config/first.php"); ! } elseif(file_exists("config/first.php")) { ! header("Location: config/first.php"); ! } elseif(file_exists("../../config/first.php")) { ! header("Location: ../../config/first.php"); } ?> |