[Openfirst-cvscommit] base/config first.php,1.65,1.66
Brought to you by:
xtimg
From: Jamie <ast...@us...> - 2005-11-23 18:15:31
|
Update of /cvsroot/openfirst/base/config In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12472/config Modified Files: first.php Log Message: Use glob() to generate list of DBMSs. Index: first.php =================================================================== RCS file: /cvsroot/openfirst/base/config/first.php,v retrieving revision 1.65 retrieving revision 1.66 diff -C2 -d -r1.65 -r1.66 *** first.php 19 Oct 2005 04:15:25 -0000 1.65 --- first.php 23 Nov 2005 18:15:18 -0000 1.66 *************** *** 1,336 **** ! <?php ! /* ! * openFIRST.base - config/first.php ! * ! * Copyright (C) 2003, ! * openFIRST Project ! * Original Author: Tim Ginn <tim...@po...> ! * ! * This program is free software; you can 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. ! * 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 should have received a copy of the GNU General Public License ! * along with this program; if not, write to the Free Software ! * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ! * ! */ ! ! // Purpose: Deal with the initial set up that must occur once the openFIRST ! // base system has been extracted. This file should be removed once ! // this task is complete, or the permissions on globals.php should be ! // changed to prevent unwanted modification of configuration options. ! ! // Initialize header/footer vars ! $Title = 'openFIRST Installation'; ! $StylePath = 'http://openfirst.sourceforge.net'; ! ! define('OPENFIRST_INSTALLATION_SCRIPT', true); // Only define if it's the installation script ! ! if(isset($_POST["sqlserver"])) { ! $sqlserver = $_POST["sqlserver"]; ! $sqluser = $_POST["sqluser"]; ! $sqlpassword = $_POST["sqlpassword"]; ! $sqldatabase = $_POST["sqldatabase"]; ! $fbasepath = realpath($_POST['fbasepath']); ! ! function GetVarValue($var) { ! ob_Start(); ! var_export($var); ! $Value = ob_Get_Contents(); ! ob_End_Clean(); ! return $Value; ! } ! ! // They have submitted the form, write a new globals.php file and test ! // options. ! $ConfigFile = "$fbasepath/includes/sitesettings.php"; ! if ( (file_exists($ConfigFile) && is_writable($ConfigFile)) || is_writable(dirname($ConfigFile)) ) { ! $file = file_get_contents('../includes/sitesettings.tpl'); ! $cookielogins = ((isset($_POST["cookielogins"]) && $_POST["cookielogins"]=="yes") ? true : false); ! $allowreg = ((isset($_POST["allowreg"]) && $_POST["allowreg"]=="yes") ? true : false); ! ! $find = array('%DBTYPE%', ! '%ENCRYPT%', ! '%TITLE%', ! '%VER%', ! '%DBSERVER%', ! '%DBUSER%', ! '%DBPASS%', ! '%DBNAME%', ! '%COOKIE%', ! '%REG%', ! '%HOME%', ! '%HEADER%', ! '%FOOTER%', ! '%MASTERMAIL%', ! '%BOTMAIL%', ! '%SERVER%', ! '%BASEPATH%', ! '%FBASEPATH%'); ! ! $replace = array(GetVarValue($_POST['dbasetype']), ! GetVarValue($_POST['encryption']), ! GetVarValue($_POST['title']), ! GetVarValue($_POST['version']), ! GetVarValue($_POST['sqlserver']), ! GetVarValue($_POST['sqluser']), ! GetVarValue($_POST['sqlpassword']), ! GetVarValue($_POST['sqldatabase']), ! GetVarValue($cookielogins), ! GetVarValue($allowreg), ! GetVarValue($_POST['home']), ! GetVarValue($_POST['header']), ! GetVarValue($_POST['footer']), ! GetVarValue($_POST['mailnotify']), ! GetVarValue($_POST['mailfrom']), ! GetVarValue($_POST['server']), ! GetVarValue($_POST['basepath']), ! GetVarValue($fbasepath)); ! ! $file = str_replace($find, $replace, $file); ! $hfile = fopen("$ConfigFile",'w'); fwrite($hfile, $file); fclose($hfile); ! ! // We write the settings file before including globals.php ! ! include_once("$fbasepath/includes/globals.php"); ! require_once("$fbasepath/includes/xmlModule.php"); ! $base = xmlModule::createFromFile(dirname(__FILE__).'/openfirst.info.xml'); ! ! include_once($Header); ! // This a series of statements, each of which are executed. If an error condition occurs, that ! // branch is ran. ! if (!$ogDB->createDB($ogSQLDatabase, $ogSQLTablePrefix)) { ! // Do this as an optional root user? ! echo '<p class="error">DB creation error: '.htmlentities($ogDB->errorString()).'</p>'; ! } else if (($err = $base->install()) !== true) { ! echo '<p class="error">Tables creation error: '.htmlentities($err).'</p>'; ! echo '<pre>'.htmlentities($ogLastQuery).'</pre>'; ! } else if (($ogUser = User::createNewUser('admin', 'openfirst')) == null) { ! echo '<p class="error">Error creating user: '.htmlentities($ogDB->errorString()).'</p>'; ! } else { ! $ogUser->addGroup(ugADMIN); ! $ogUser->saveData(); ! echo("<div class=\"success\"><h1>openFIRST Software Configured</h1> ! <p>If this page does not display errors elsewhere, then your openFIRST has now been successfully ! configured. If there are errors, check your configuration options and try again. You may now ! wish to change the permissions on <span class=\"file\">".htmlentities(basename($ConfigFile))."</span> to prevent unwanted changes ! to the configuration options. You should be able to login using the username ! <b class=\"user\">admin</b> and the password <b class=\"password\">openfirst</b>, if not, then either ! the password for that account has been changed, or the MySQL settings are incorrect.</p>"); ! echo '<p class="big">Continue to the <a href="'.htmlentities($BasePath).'/config/">administration page</a>.</p>'; ! } ! include_once($Footer); ! die; ! } else { ! /* echo '<p class="error"><span class="file">'.htmlentities($ConfigFile).'</span> is not writable</p> ! ';*/ ! include_once($header); ! echo("<h1 class=\"error\">System Configuration Error</h1> ! <p>Cannot write to configuration file. Please check permissions on <b>".htmlentities(basename($ConfigFile))."</b> and ! ensure that the web user has the ability to write to this file.</p> ! ! <p>For unix, this would typically require the command: ! <pre class=\"shell\">cd includes<br /> ! chmod 666 \"".htmlentities(addslashes(basename($ConfigFile)))."\"</pre></p>"); ! } ! } else { ! define('OPENFIRST_NO_INSTALLATION', true); ! // Do form ! include("../includes/globals.php"); ! include($Header); ! ! // Detect default options ! $basepath = substr($_SERVER["SCRIPT_NAME"], 0, -17); ! $server = $_SERVER["SERVER_NAME"]; ! $fbasepath = realpath(dirname(__FILE__).'/..'); ! $ConfigFile = "$fbasepath/includes/sitesettings.php"; ! ! $sqlhost = 'localhost'; ! if(ini_get('mysql.default_host') != '') { ! $sqlhost = ini_get('mysql.default_host'); ! } ! ! $sqluser = 'sqluser'; ! if(ini_get('mysql.default_user') != '') { ! $sqluser = ini_get('mysql.default_user'); ! } ! ! $sqlpass = ''; ! if(ini_get('mysql.default_password') != '') { ! $sqlpass = ini_get('mysql.default_password'); ! } ! ! $mailto = $_SERVER['SERVER_ADMIN']; ! $mailfrom = "openfirst@$server"; ! ! // User is visiting the configuration page, present them with a form ! // of options to fill out. ! ?> ! <div class="center"> ! <h1>Base Configuration</h1> ! <p class="center" style="max-width: 50em;">Congratulations for choosing openFIRST! Please proceed through ! this setup wizard to get your new openFIRST portal software set up and working ! quickly and painlessly. Also please make sure that before installing this script ! that you have the appropriate permissions set on <span class="file"><?php echo htmlentities($ConfigFile) ?></span> (if not ! then you may receive a collection of errors after submitting this form).</p> ! </div> ! <form action="<?php echo htmlentities("http://$server$basepath/config/first.php"); ?>" method="post"> ! <fieldset> ! <legend>Database Setup</legend> ! <dl class="setup"> ! <dd> ! <label for="dbasetype">Database Type</label> ! <input type='hidden' name='peardb' value='false'> ! <select name="dbasetype"> ! <option value="mysql" selected="selected">MySQL</option> ! <option value="mssql">Microsoft SQL</option> ! <option value="odbc">ODBC</option> ! </select> ! </dd> ! <dt></dt> ! <dd> ! <label for="title">Title of Website</label> ! <input type="text" name="title" value="openFIRST" /> ! </dd> ! <dt></dt> ! <dd> ! <label for="version">Version of Website</label> ! <input type="text" name="version" value="1.0" /> ! </dd> ! <dt></dt> ! <dd> ! <label for="sqlserver">Database Server Address</label> ! <input type="text" name="sqlserver" value="<?php echo htmlentities($sqlhost); ?>" /> ! </dd> ! <dt></dt> ! <dd> ! <label for="sqluser">Database User Name</label> ! <input type="text" name="sqluser" value="<?php echo htmlentities($sqluser); ?>" /> ! </dd> ! <dt></dt> ! <dd> ! <label for="sqlpassword">Database User Password</label> ! <input type="password" name="sqlpassword" value="<?php echo htmlentities($sqlpass); ?>" /> ! </dd> ! <dt></dt> ! <dd> ! <label for="sqldatabase">Database Name</label> ! <input type="text" name="sqldatabase" value="openfirst" /> ! </dd> ! <dt>(I this database does not already exist, the user entered above must have access to create it.</dt> ! </dl> ! </fieldset> ! ! <fieldset> ! <legend>Linking Options</legend> ! <dl class="setup"> ! <dd> ! <label for="home">Home Site</label> ! <input type="text" name="home" value="http://<?php echo htmlentities("$server$basepath"); ?>" /> ! </dd> ! <dt>This address will used for linking to your main page.</dt> ! <dd> ! <label for="header">Header file</label> ! <input type="text" name="header" value="<?php echo htmlentities(realpath("$fbasepath/style/headers.php")); ?>" /> ! </dd> ! <dt>This should be a full system path, eg, ! <code class="file">c:\inetpub\wwwroot\openfirst\style\header.php</code> or ! <code class="file">/home/site/public_html/openfirst/style/headers.php</code> ! </dt> ! <dd> ! <label for="footer">Footer file</label> ! <input type="text" name="footer" value="<?php echo htmlentities(realpath("$fbasepath/style/footers.php")); ?>" /> ! </dd> ! <dt>This should be a full system path, eg, ! <code class="file">c:\inetpub\wwwroot\openfirst\style\footers.php</code> or ! <code class="file">/home/site/public_html/openfirst/style/footers.php</code> ! </dt> ! <dd> ! <label for="">The server name</label> ! <input type="text" name="server" value="http://<?php echo htmlentities($server); ?>" /> ! <span class="warning">Must not have a trailing slash and must include a protocol.</span> ! </dd> ! <dt>eg, <code class="url"><b>http://openfirst.sourceforge.net</b>/openfirst</code></dt> ! <dd> ! <label for="basepath">URL base path</label> ! <input type="text" name="basepath" value="<?php echo htmlentities($basepath); ?>" /> ! <span class="warning">Must not have a trailing slash.</span> ! </dd> ! <dt>ie. example: <code class="url">http://openfirst.sourceforge.net<b>/openfirst</b></code>) this should ! always have a beginning slash but no ending slash. (If openFIRST is in the root directory, then leave blank.) ! </dt> ! <dd> ! <label for="fbasepath">File system path</label> ! <input type="text" name="fbasepath" value="<?php echo htmlentities($fbasepath); ?>" /> ! <span class="warning">Must not have a trailing slash.</span> ! </dd> ! <dt>eg, <code class="file">/home/openfirst/htdocs/openfirst</code> ! or <code class="file">c:\inetpub\wwwroot\openfirst</code>) this should not have a ending slash.</dt> ! </dl> ! </fieldset> ! ! <fieldset> ! <legend>Security Options</legend> ! <dl class="setup"> ! <dd> ! <label for="">Hashing method</label> ! <select name="encryption"> ! <option value='md5' selected='selected'>MD5 Message-Digest Algorithm</option> ! <option value='crypt'>Standard Unix DES-based encryption algorthm</option> ! <option value='crc32'>crc32 Polynomial</option> ! <option value='sha1'>US Secure Hash Algorithm 1 (sha1)</option> ! </select> ! </dd> ! <dt>If you are migrating from an existing system, this should be the same encryption ! style that system uses, otherwise all users will have to reset their password; otherwise, in ! most cases the default option is fine.</dt> ! <dd> ! <label for="cookielogins">Allow users to save their passwords?</label> ! <input type="checkbox" name="cookielogins" id="cookielogins" value="yes" checked />Allowed ! </dd> ! <dt>This feature uses cookies to automatically log in users into the openFIRST portal.</dt> ! <dd> ! <label for="allowreg">Allow users to register on the portal?</label> ! <input type="checkbox" name="allowreg" id="allowreg" value="yes" />Allowed ! </dd> ! <dt>Enabling this option will allow users to register on the website and log in to access the ! members area. Be careful when using this option.</dt> ! </dl> ! </fieldset> ! ! <fieldset> ! <legend>Mailing Options</legend> ! <dl class="setup"> ! <dd> ! <label for="mailnotify">Mail Notification</label> ! <input type="text" name="mailnotify" value="<?php echo htmlentities($mailto); ?>" /> ! </dd> ! <dt>The e-mail address used to notify you when significant events occur.</dt> ! <dd> ! <label for="mailfrom">Mail From</label> ! <input type="text" name="mailfrom" value="<?php echo htmlentities($mailfrom); ?>" /> ! </dd> ! <dt>The e-mail address that mail from the openFIRST site should appear to be from.</dt> ! </dl> ! </fieldset> ! <div class="center big"><button class="center big" type="submit">Set up openFIRST!</button></div> ! </form> ! <?php ! } ! if(is_readable("style/footers.php")) { ! include_once("style/footers.php"); ! } else { ! include_once("../style/footers.php"); ! } ! ?> --- 1,347 ---- ! <?php ! /* ! * openFIRST.base - config/first.php ! * ! * Copyright (C) 2003, ! * openFIRST Project ! * Original Author: Tim Ginn <tim...@po...> ! * ! * This program is free software; you can 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. ! * 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 should have received a copy of the GNU General Public License ! * along with this program; if not, write to the Free Software ! * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ! * ! */ ! ! // Purpose: Deal with the initial set up that must occur once the openFIRST ! // base system has been extracted. This file should be removed once ! // this task is complete, or the permissions on globals.php should be ! // changed to prevent unwanted modification of configuration options. ! ! // Initialize header/footer vars ! $Title = 'openFIRST Installation'; ! $StylePath = 'http://openfirst.sourceforge.net'; ! ! define('OPENFIRST_INSTALLATION_SCRIPT', true); // Only define if it's the installation script ! ! if(isset($_POST["sqlserver"])) { ! $sqlserver = $_POST["sqlserver"]; ! $sqluser = $_POST["sqluser"]; ! $sqlpassword = $_POST["sqlpassword"]; ! $sqldatabase = $_POST["sqldatabase"]; ! $fbasepath = realpath($_POST['fbasepath']); ! ! function GetVarValue($var) { ! ob_Start(); ! var_export($var); ! $Value = ob_Get_Contents(); ! ob_End_Clean(); ! return $Value; ! } ! ! // They have submitted the form, write a new globals.php file and test ! // options. ! $ConfigFile = "$fbasepath/includes/sitesettings.php"; ! if ( (file_exists($ConfigFile) && is_writable($ConfigFile)) || is_writable(dirname($ConfigFile)) ) { ! $file = file_get_contents('../includes/sitesettings.tpl'); ! $cookielogins = ((isset($_POST["cookielogins"]) && $_POST["cookielogins"]=="yes") ? true : false); ! $allowreg = ((isset($_POST["allowreg"]) && $_POST["allowreg"]=="yes") ? true : false); ! ! $find = array('%DBTYPE%', ! '%ENCRYPT%', ! '%TITLE%', ! '%VER%', ! '%DBSERVER%', ! '%DBUSER%', ! '%DBPASS%', ! '%DBNAME%', ! '%COOKIE%', ! '%REG%', ! '%HOME%', ! '%HEADER%', ! '%FOOTER%', ! '%MASTERMAIL%', ! '%BOTMAIL%', ! '%SERVER%', ! '%BASEPATH%', ! '%FBASEPATH%'); ! ! $replace = array(GetVarValue($_POST['dbasetype']), ! GetVarValue($_POST['encryption']), ! GetVarValue($_POST['title']), ! GetVarValue($_POST['version']), ! GetVarValue($_POST['sqlserver']), ! GetVarValue($_POST['sqluser']), ! GetVarValue($_POST['sqlpassword']), ! GetVarValue($_POST['sqldatabase']), ! GetVarValue($cookielogins), ! GetVarValue($allowreg), ! GetVarValue($_POST['home']), ! GetVarValue($_POST['header']), ! GetVarValue($_POST['footer']), ! GetVarValue($_POST['mailnotify']), ! GetVarValue($_POST['mailfrom']), ! GetVarValue($_POST['server']), ! GetVarValue($_POST['basepath']), ! GetVarValue($fbasepath)); ! ! $file = str_replace($find, $replace, $file); ! $hfile = fopen("$ConfigFile",'w'); fwrite($hfile, $file); fclose($hfile); ! ! // We write the settings file before including globals.php ! ! include_once("$fbasepath/includes/globals.php"); ! require_once("$fbasepath/includes/xmlModule.php"); ! $base = xmlModule::createFromFile(dirname(__FILE__).'/openfirst.info.xml'); ! ! include_once($Header); ! // This a series of statements, each of which are executed. If an error condition occurs, that ! // branch is ran. ! if (!$ogDB->createDB($ogSQLDatabase, $ogSQLTablePrefix)) { ! // Do this as an optional root user? ! echo '<p class="error">DB creation error: '.htmlentities($ogDB->errorString()).'</p>'; ! } else if (($err = $base->install()) !== true) { ! echo '<p class="error">Tables creation error: '.htmlentities($err).'</p>'; ! echo '<pre>'.htmlentities($ogLastQuery).'</pre>'; ! } else if (($ogUser = User::createNewUser('admin', 'openfirst')) == null) { ! echo '<p class="error">Error creating user: '.htmlentities($ogDB->errorString()).'</p>'; ! } else { ! $ogUser->addGroup(ugADMIN); ! $ogUser->saveData(); ! echo("<div class=\"success\"><h1>openFIRST Software Configured</h1> ! <p>If this page does not display errors elsewhere, then your openFIRST has now been successfully ! configured. If there are errors, check your configuration options and try again. You may now ! wish to change the permissions on <span class=\"file\">".htmlentities(basename($ConfigFile))."</span> to prevent unwanted changes ! to the configuration options. You should be able to login using the username ! <b class=\"user\">admin</b> and the password <b class=\"password\">openfirst</b>, if not, then either ! the password for that account has been changed, or the MySQL settings are incorrect.</p>"); ! echo '<p class="big">Continue to the <a href="'.htmlentities($BasePath).'/config/">administration page</a>.</p>'; ! } ! include_once($Footer); ! die; ! } else { ! /* echo '<p class="error"><span class="file">'.htmlentities($ConfigFile).'</span> is not writable</p> ! ';*/ ! include_once($header); ! echo("<h1 class=\"error\">System Configuration Error</h1> ! <p>Cannot write to configuration file. Please check permissions on <b>".htmlentities(basename($ConfigFile))."</b> and ! ensure that the web user has the ability to write to this file.</p> ! ! <p>For unix, this would typically require the command: ! <pre class=\"shell\">cd includes<br /> ! chmod 666 \"".htmlentities(addslashes(basename($ConfigFile)))."\"</pre></p>"); ! } ! } else { ! define('OPENFIRST_NO_INSTALLATION', true); ! // Do form ! include("../includes/globals.php"); ! include($Header); ! ! // Detect default options ! $basepath = substr($_SERVER["SCRIPT_NAME"], 0, -17); ! $server = $_SERVER["SERVER_NAME"]; ! $fbasepath = realpath(dirname(__FILE__).'/..'); ! $ConfigFile = "$fbasepath/includes/sitesettings.php"; ! ! $sqlhost = 'localhost'; ! if(ini_get('mysql.default_host') != '') { ! $sqlhost = ini_get('mysql.default_host'); ! } ! ! $sqluser = 'sqluser'; ! if(ini_get('mysql.default_user') != '') { ! $sqluser = ini_get('mysql.default_user'); ! } ! ! $sqlpass = ''; ! if(ini_get('mysql.default_password') != '') { ! $sqlpass = ini_get('mysql.default_password'); ! } ! ! $mailto = $_SERVER['SERVER_ADMIN']; ! $mailfrom = "openfirst@$server"; ! ! // DB types ! $dbms = array(); ! foreach(glob('../*DataBase.php') as $file) { ! $n = preg_match('#^.*/(.*)DataBase.php$#', $file, $matches); ! $dbms[] = $matches[1]; ! } ! ! // User is visiting the configuration page, present them with a form ! // of options to fill out. ! ?> ! <div class="center"> ! <h1>Base Configuration</h1> ! <p class="center" style="max-width: 50em;">Congratulations for choosing openFIRST! Please proceed through ! this setup wizard to get your new openFIRST portal software set up and working ! quickly and painlessly. Also please make sure that before installing this script ! that you have the appropriate permissions set on <span class="file"><?php echo htmlentities($ConfigFile) ?></span> (if not ! then you may receive a collection of errors after submitting this form).</p> ! </div> ! <form action="<?php echo htmlentities("http://$server$basepath/config/first.php"); ?>" method="post"> ! <fieldset> ! <legend>Database Setup</legend> ! <dl class="setup"> ! <dd> ! <label for="dbasetype">Database Type</label> ! <input type='hidden' name='peardb' value='false'> ! <select name="dbasetype"> ! <?php ! foreach($dbms as $i) { ! $e = htmlentities($i); ! echo '<option value="'.$e.'">'.$e.'</option> ! '; ! } ! ?> ! </select> ! </dd> ! <dt></dt> ! <dd> ! <label for="title">Title of Website</label> ! <input type="text" name="title" value="openFIRST" /> ! </dd> ! <dt></dt> ! <dd> ! <label for="version">Version of Website</label> ! <input type="text" name="version" value="1.0" /> ! </dd> ! <dt></dt> ! <dd> ! <label for="sqlserver">Database Server Address</label> ! <input type="text" name="sqlserver" value="<?php echo htmlentities($sqlhost); ?>" /> ! </dd> ! <dt></dt> ! <dd> ! <label for="sqluser">Database User Name</label> ! <input type="text" name="sqluser" value="<?php echo htmlentities($sqluser); ?>" /> ! </dd> ! <dt></dt> ! <dd> ! <label for="sqlpassword">Database User Password</label> ! <input type="password" name="sqlpassword" value="<?php echo htmlentities($sqlpass); ?>" /> ! </dd> ! <dt></dt> ! <dd> ! <label for="sqldatabase">Database Name</label> ! <input type="text" name="sqldatabase" value="openfirst" /> ! </dd> ! <dt>(I this database does not already exist, the user entered above must have access to create it.</dt> ! </dl> ! </fieldset> ! ! <fieldset> ! <legend>Linking Options</legend> ! <dl class="setup"> ! <dd> ! <label for="home">Home Site</label> ! <input type="text" name="home" value="http://<?php echo htmlentities("$server$basepath"); ?>" /> ! </dd> ! <dt>This address will used for linking to your main page.</dt> ! <dd> ! <label for="header">Header file</label> ! <input type="text" name="header" value="<?php echo htmlentities(realpath("$fbasepath/style/headers.php")); ?>" /> ! </dd> ! <dt>This should be a full system path, eg, ! <code class="file">c:\inetpub\wwwroot\openfirst\style\header.php</code> or ! <code class="file">/home/site/public_html/openfirst/style/headers.php</code> ! </dt> ! <dd> ! <label for="footer">Footer file</label> ! <input type="text" name="footer" value="<?php echo htmlentities(realpath("$fbasepath/style/footers.php")); ?>" /> ! </dd> ! <dt>This should be a full system path, eg, ! <code class="file">c:\inetpub\wwwroot\openfirst\style\footers.php</code> or ! <code class="file">/home/site/public_html/openfirst/style/footers.php</code> ! </dt> ! <dd> ! <label for="">The server name</label> ! <input type="text" name="server" value="http://<?php echo htmlentities($server); ?>" /> ! <span class="warning">Must not have a trailing slash and must include a protocol.</span> ! </dd> ! <dt>eg, <code class="url"><b>http://openfirst.sourceforge.net</b>/openfirst</code></dt> ! <dd> ! <label for="basepath">URL base path</label> ! <input type="text" name="basepath" value="<?php echo htmlentities($basepath); ?>" /> ! <span class="warning">Must not have a trailing slash.</span> ! </dd> ! <dt>ie. example: <code class="url">http://openfirst.sourceforge.net<b>/openfirst</b></code>) this should ! always have a beginning slash but no ending slash. (If openFIRST is in the root directory, then leave blank.) ! </dt> ! <dd> ! <label for="fbasepath">File system path</label> ! <input type="text" name="fbasepath" value="<?php echo htmlentities($fbasepath); ?>" /> ! <span class="warning">Must not have a trailing slash.</span> ! </dd> ! <dt>eg, <code class="file">/home/openfirst/htdocs/openfirst</code> ! or <code class="file">c:\inetpub\wwwroot\openfirst</code>) this should not have a ending slash.</dt> ! </dl> ! </fieldset> ! ! <fieldset> ! <legend>Security Options</legend> ! <dl class="setup"> ! <dd> ! <label for="">Hashing method</label> ! <select name="encryption"> ! <option value='md5' selected='selected'>MD5 Message-Digest Algorithm</option> ! <option value='crypt'>Standard Unix DES-based encryption algorthm</option> ! <option value='crc32'>crc32 Polynomial</option> ! <option value='sha1'>US Secure Hash Algorithm 1 (sha1)</option> ! </select> ! </dd> ! <dt>If you are migrating from an existing system, this should be the same encryption ! style that system uses, otherwise all users will have to reset their password; otherwise, in ! most cases the default option is fine.</dt> ! <dd> ! <label for="cookielogins">Allow users to save their passwords?</label> ! <input type="checkbox" name="cookielogins" id="cookielogins" value="yes" checked />Allowed ! </dd> ! <dt>This feature uses cookies to automatically log in users into the openFIRST portal.</dt> ! <dd> ! <label for="allowreg">Allow users to register on the portal?</label> ! <input type="checkbox" name="allowreg" id="allowreg" value="yes" />Allowed ! </dd> ! <dt>Enabling this option will allow users to register on the website and log in to access the ! members area. Be careful when using this option.</dt> ! </dl> ! </fieldset> ! ! <fieldset> ! <legend>Mailing Options</legend> ! <dl class="setup"> ! <dd> ! <label for="mailnotify">Mail Notification</label> ! <input type="text" name="mailnotify" value="<?php echo htmlentities($mailto); ?>" /> ! </dd> ! <dt>The e-mail address used to notify you when significant events occur.</dt> ! <dd> ! <label for="mailfrom">Mail From</label> ! <input type="text" name="mailfrom" value="<?php echo htmlentities($mailfrom); ?>" /> ! </dd> ! <dt>The e-mail address that mail from the openFIRST site should appear to be from.</dt> ! </dl> ! </fieldset> ! <div class="center big"><button class="center big" type="submit">Set up openFIRST!</button></div> ! </form> ! <?php ! } ! if(is_readable("style/footers.php")) { ! include_once("style/footers.php"); ! } else { ! include_once("../style/footers.php"); ! } ! ?> |