[Openfirst-cvscommit] base/config auth.php,1.1.1.1,1.2 first.php,1.1.1.1,1.2 install.php,1.1.1.1,1.2
Brought to you by:
xtimg
From: <xt...@us...> - 2003-06-21 15:48:39
|
Update of /cvsroot/openfirst/base/config In directory sc8-pr-cvs1:/tmp/cvs-serv24896/config Modified Files: auth.php first.php install.php Log Message: Fix miscellaneous bugs in base system. Index: auth.php =================================================================== RCS file: /cvsroot/openfirst/base/config/auth.php,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** auth.php 7 Jun 2003 16:11:31 -0000 1.1.1.1 --- auth.php 21 Jun 2003 15:48:35 -0000 1.2 *************** *** 48,61 **** function membersmenu($membertype) { // Show a members area menu. ! echo("<p><a href='$basepath/members'>Members Home</a> <a href='$basepath/awards/manage.php'>Manage Awards</a> <a href='$basepath/members/profile.php'>Members Profiles</a> <a href='$basepath/members/updateprofile.php'>Update Profile</a> <a href='$basepath/members/skills.php'>Update Skills</a> "); if($membertype == "administrator") { ! echo("<a href='$basepath/members/sqlinstall.php'>Install SQL Tables</a> ! <a href='$basepath/members/adduser.php'>Add User</a>"); ! if(is_readable("$basepath/news/addnews.php") == true) { ! echo(" <a href='$basepath/news/addnews.php'>Add news</a>"); } } - echo(" <a href='$basepath/members/logout.php'>Logout</a></p>"); return(0); } --- 48,68 ---- function membersmenu($membertype) { + global $basepath; + $basep = $basepath; // Show a members area menu. ! echo("<p><a href='$basep/members'>Members Home</a> ! ! <a href='$basep/awards/admin/'>Manage Awards</a> ! <a href='$basep/members/profile.php'>Members Profiles</a> ! <a href='$basep/members/updateprofile.php'>Update Profile</a> ! <a href='$basep/members/skills.php'>Update Skills</a> ! <a href='$basep/members/logout.php'>Logout</a>"); if($membertype == "administrator") { ! echo("<br /><b>Admin</b>: <a href='$basep/config/'>Configuration Area</a> <a href='$basep/members/adduser.php'>Add User</a>"); ! if(is_readable("$basep/news/addnews.php") == true) { ! echo(" <a href='$basep/news/addnews.php'>Add news</a>"); } + echo ("</p>"); } return(0); } Index: first.php =================================================================== RCS file: /cvsroot/openfirst/base/config/first.php,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** first.php 7 Jun 2003 16:11:32 -0000 1.1.1.1 --- first.php 21 Jun 2003 15:48:35 -0000 1.2 *************** *** 104,108 **** <br /> <code> ! chmod 655 globals.php </code></p> "); --- 104,109 ---- <br /> <code> ! cd config ! <br />chmod 666 globals.php </code></p> "); *************** *** 142,147 **** <tr><td>Mail From (the e-mail address that mail from the openFIRST site should appear to be from</td><td><input type="text" name="mailfrom" value="no...@op..."></td></tr> ! <tr><td>The base path to the OpenFIRST software</td><td><input type="text" name="basepath" ! value="/openfirst/"></td></tr> <tr><td></td><td><input type="submit" value="Set up OpenFIRST"></td></tr> </form> --- 143,151 ---- <tr><td>Mail From (the e-mail address that mail from the openFIRST site should appear to be from</td><td><input type="text" name="mailfrom" value="no...@op..."></td></tr> ! <tr><td>The base path to the OpenFIRST software ! (example: http://openfirst.sourceforge.net<strong>/openfirst</strong>) this should not have a ! trailing slash. ! </td><td><input type="text" name="basepath" ! value="/openfirst"></td></tr> <tr><td></td><td><input type="submit" value="Set up OpenFIRST"></td></tr> </form> Index: install.php =================================================================== RCS file: /cvsroot/openfirst/base/config/install.php,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** install.php 7 Jun 2003 16:11:32 -0000 1.1.1.1 --- install.php 21 Jun 2003 15:48:35 -0000 1.2 *************** *** 44,61 **** <?php if(function_exists(glob)) { ! foreach (glob("../*/config/*.mysql") as $filename) { ! $sqlf = str_replace(".", "-", str_replace(".sql", "",substr(strrchr($filename, "/"), 1))); ! echo("<br /> <input type='checkbox' name='$sqlf'>$sqlf</input>"); ! if($_POST[$sqlf] == "on") { // This doesn't quite work. I'm not sure why. $sf = fopen($filename, "r"); $query = ""; while($line = fgets($sf)) { ! if(substr($line, 0, 2) != "--" && substr($line, 0, 1) != "#") { ! $query = $query . $line; } } - $q = mysql_query(trim($query)); echo(" - <b>Submitted, and added.</b>"); } } --- 44,62 ---- <?php if(function_exists(glob)) { ! foreach (glob("../*/setup/*.mysql") as $filename) { ! $sqlf = str_replace(".", "-", str_replace(".mysql", "",substr(strrchr($filename, "/"), 1))); ! $dir = str_replace(".", "-", str_replace(".mysql", "", substr(strchr($filename, "/"), 1))); ! echo("<br /> <input type='checkbox' name='$dir'>$sqlf - $dir</input>"); ! if($_POST[$dir] == "on") { // This doesn't quite work. I'm not sure why. $sf = fopen($filename, "r"); $query = ""; while($line = fgets($sf)) { ! if(substr($line, 0, 2) != "--" && substr($line, 0, 1) != "#" && strlen($line) > 0) { ! $q = mysql_query(trim($line)); } } echo(" - <b>Submitted, and added.</b>"); + fclose($sf); } } |