openfirst-cvscommit Mailing List for openFIRST (Page 37)
Brought to you by:
xtimg
You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(41) |
Jun
(210) |
Jul
(39) |
Aug
(153) |
Sep
(147) |
Oct
(173) |
Nov
(81) |
Dec
(163) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(33) |
Feb
(18) |
Mar
|
Apr
(62) |
May
|
Jun
(100) |
Jul
(38) |
Aug
(58) |
Sep
(1) |
Oct
|
Nov
(25) |
Dec
(172) |
2005 |
Jan
(31) |
Feb
(12) |
Mar
(67) |
Apr
(92) |
May
(247) |
Jun
(34) |
Jul
(36) |
Aug
(192) |
Sep
(15) |
Oct
(42) |
Nov
(92) |
Dec
(4) |
2006 |
Jan
|
Feb
(21) |
Mar
|
Apr
|
May
|
Jun
(53) |
Jul
(7) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2007 |
Jan
|
Feb
|
Mar
(4) |
Apr
(4) |
May
|
Jun
(15) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Astronouth7303 <ast...@us...> - 2005-03-13 19:47:19
|
Update of /cvsroot/openfirst/news In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2915/news Modified Files: viewnews.php Log Message: More misunderstanding stuff Index: viewnews.php =================================================================== RCS file: /cvsroot/openfirst/news/viewnews.php,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** viewnews.php 27 Dec 2003 01:00:33 -0000 1.12 --- viewnews.php 13 Mar 2005 19:47:06 -0000 1.13 *************** *** 30,33 **** --- 30,34 ---- // Get a list of the users able to // be contacted via the feedback form. + global $basepath, $home; $query = ofirst_dbquery("SELECT * FROM ofirst_news ORDER BY ID DESC LIMIT $limit;"); *************** *** 46,53 **** echo($news->news); } ! echo("<br><br><center>[ <a href='".$GLOBALS["basepath"]."/news/comments.php?ID=$news->ID'>View Comments</a> ]</center></td></tr>"); if($admin){ ! echo('<tr><td class="sub"><div style="" align="right">Admin options: <a href="'.$GLOBALS["basepath"].'/news/admin/editnews.php?id='.$news->ID.'"><img alt="Edit story" border=0 src="'.$GLOBALS["basepath"].'/news/images/newdoc.gif" align=absmiddle>Edit story</a>'); ! echo('<a href="'.$GLOBALS["basepath"].'/news/admin/killnews.php?id='.$news->ID.'"><img alt="Delete story" border=0 src="'.$GLOBALS["basepath"].'/news/images/killdoc.gif" align=absmiddle>Delete story</a></div></td></tr>'); } echo("</table><br>"); --- 47,54 ---- echo($news->news); } ! echo("<br><br><center>[ <a href='$home$basepath/news/comments.php?ID=$news->ID'>View Comments</a> ]</center></td></tr>"); if($admin){ ! echo('<tr><td class="sub"><div style="" align="right">Admin options: <a href="'.$home.$basepath.'/news/admin/editnews.php?id='.$news->ID.'"><img alt="Edit story" border=0 src="'.$GLOBALS["basepath"].'/news/images/newdoc.gif" align=absmiddle>Edit story</a>'); ! echo('<a href="'.$home.$basepath.'/news/admin/killnews.php?id='.$news->ID.'"><img alt="Delete story" border=0 src="'.$home.$basepath.'/news/images/killdoc.gif" align=absmiddle>Delete story</a></div></td></tr>'); } echo("</table><br>"); *************** *** 58,62 **** } if($admin){ ! echo("<div align=center>[ <b><a href=\"".$GLOBALS["basepath"]."/news/admin\">Post News</a></b> ]</div>"); } return(0); --- 59,63 ---- } if($admin){ ! echo("<div align=center>[ <b><a href=\"$home$basepath/news/admin\">Post News</a></b> ]</div>"); } return(0); |
From: Astronouth7303 <ast...@us...> - 2005-03-13 19:42:58
|
Update of /cvsroot/openfirst/base In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1660 Modified Files: index.php Log Message: More misunderstanding stuff Index: index.php =================================================================== RCS file: /cvsroot/openfirst/base/index.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** index.php 23 Nov 2003 23:15:09 -0000 1.5 --- index.php 13 Mar 2005 19:42:47 -0000 1.6 *************** *** 59,63 **** $qu = ofirst_dbquery("SELECT guest, date FROM ofirst_guestbook ORDER BY guest LIMIT 5;"); if(ofirst_dbnum_rows($qu)!=0){ ! echo("<table width=200><tr><th>Guestbook</th></tr><tr><td><div>Last records in our <a href=\"$basepath/guestbook\">guestbook</a>: </div>"); while($q = ofirst_dbfetch_object($qu)) { echo("<sub><strong><a href='/guestbook/' target='_content'>$q->guest</a></strong><br>$q->date</sub><br>"); --- 59,63 ---- $qu = ofirst_dbquery("SELECT guest, date FROM ofirst_guestbook ORDER BY guest LIMIT 5;"); if(ofirst_dbnum_rows($qu)!=0){ ! echo("<table width=200><tr><th>Guestbook</th></tr><tr><td><div>Last records in our <a href=\"$home$basepath/guestbook\">guestbook</a>: </div>"); while($q = ofirst_dbfetch_object($qu)) { echo("<sub><strong><a href='/guestbook/' target='_content'>$q->guest</a></strong><br>$q->date</sub><br>"); *************** *** 69,75 **** $qu = ofirst_dbquery("SELECT AwardName FROM ofirst_awards;"); if(ofirst_dbnum_rows($qu)!=0){ ! echo("<table width=200><tr><th>Awards</th></tr><tr><td><div>Our team has received the following <a href=\"$basepath/awards\">awards</a>: </div>"); while($q = ofirst_dbfetch_object($qu)) { ! echo("<sub><a href='$basepath/awards' target='_content'>$q->AwardName</a></sub><br>"); } echo("</td></tr></table><br />"); --- 69,75 ---- $qu = ofirst_dbquery("SELECT AwardName FROM ofirst_awards;"); if(ofirst_dbnum_rows($qu)!=0){ ! echo("<table width=200><tr><th>Awards</th></tr><tr><td><div>Our team has received the following <a href=\"$home$basepath/awards\">awards</a>: </div>"); while($q = ofirst_dbfetch_object($qu)) { ! echo("<sub><a href='$home$basepath/awards' target='_content'>$q->AwardName</a></sub><br>"); } echo("</td></tr></table><br />"); *************** *** 79,83 **** <ul>".str_replace(" |"," ",str_replace("»","<li>",$headers))."</ul></td></tr></table><br />"); if(function_exists("get_visitors")) { ! echo("<table width=200><tr><th>Stats</th></tr><tr><td><div>Website <a href=\"$basepath/logger/stats.php\">usage statistics</a>: </div>"); echo("<sub><strong>".get_totalpages()." pages served to ".get_visitors()." visitors</strong></sub>"); echo("</td></tr></table><br />"); --- 79,83 ---- <ul>".str_replace(" |"," ",str_replace("»","<li>",$headers))."</ul></td></tr></table><br />"); if(function_exists("get_visitors")) { ! echo("<table width=200><tr><th>Stats</th></tr><tr><td><div>Website <a href=\"$home$basepath/logger/stats.php\">usage statistics</a>: </div>"); echo("<sub><strong>".get_totalpages()." pages served to ".get_visitors()." visitors</strong></sub>"); echo("</td></tr></table><br />"); *************** *** 95,99 **** //are there more news? if(ofirst_dbnum_rows(ofirst_dbquery("SELECT * FROM ofirst_news"))>5){ ! echo("<div align=right>[ <b><a href=\"$basepath/news/index.php?show=all\">More News</a></b> ]</div>"); } } --- 95,99 ---- //are there more news? if(ofirst_dbnum_rows(ofirst_dbquery("SELECT * FROM ofirst_news"))>5){ ! echo("<div align=right>[ <b><a href=\"$home$basepath/news/index.php?show=all\">More News</a></b> ]</div>"); } } |
From: Astronouth7303 <ast...@us...> - 2005-03-13 19:38:55
|
Update of /cvsroot/openfirst/base/config In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv439/config Modified Files: globals.tpl Log Message: More misunderstanding stuff Index: globals.tpl =================================================================== RCS file: /cvsroot/openfirst/base/config/globals.tpl,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** globals.tpl 13 Mar 2005 19:22:21 -0000 1.5 --- globals.tpl 13 Mar 2005 19:38:46 -0000 1.6 *************** *** 109,113 **** } else { ! $headers .= " » <a class='menu' href='$basepath/$module->modulename'>".ucwords($module->modulename)."</a> |"; } } --- 109,113 ---- } else { ! $headers .= " » <a class='menu' href='$home$basepath/$module->modulename'>".ucwords($module->modulename)."</a> |"; } } |
From: Astronouth7303 <ast...@us...> - 2005-03-13 19:23:19
|
Update of /cvsroot/openfirst/base/config In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28598/config Modified Files: footers.php Log Message: More misunderstanding stuff Index: footers.php =================================================================== RCS file: /cvsroot/openfirst/base/config/footers.php,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** footers.php 2 Nov 2003 21:15:23 -0000 1.10 --- footers.php 13 Mar 2005 19:23:09 -0000 1.11 *************** *** 18,25 **** <div> <div align="right"><a href= ! "http://openfirst.sourceforge.net"><img src="<?php echo("$basepath/images/"); ?>poweredby-small.png" width="177" height="30" border="0" alt="Powered by openFIRST Software - http://openfirst.sourceforge.net"></a><a href= "http://validator.w3.org/check?uri=http%3A//openfirst.sourceforge.net/"> ! <img src="<?php echo("$basepath/images/"); ?>w3c401.png" alt="Valid HTML 4.01" width="88" height="31" border="0"></a> </div> </div> --- 18,25 ---- <div> <div align="right"><a href= ! "http://openfirst.sourceforge.net"><img src="<?php echo("$home$basepath/images/"); ?>poweredby-small.png" width="177" height="30" border="0" alt="Powered by openFIRST Software - http://openfirst.sourceforge.net"></a><a href= "http://validator.w3.org/check?uri=http%3A//openfirst.sourceforge.net/"> ! <img src="<?php echo("$home$basepath/images/"); ?>w3c401.png" alt="Valid HTML 4.01" width="88" height="31" border="0"></a> </div> </div> |
From: Astronouth7303 <ast...@us...> - 2005-03-13 19:22:30
|
Update of /cvsroot/openfirst/base/config In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28385/config Modified Files: globals.tpl Log Message: More misunderstanding stuff Index: globals.tpl =================================================================== RCS file: /cvsroot/openfirst/base/config/globals.tpl,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** globals.tpl 13 Mar 2005 01:43:42 -0000 1.4 --- globals.tpl 13 Mar 2005 19:22:21 -0000 1.5 *************** *** 101,105 **** // 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 --- 101,105 ---- // If it is the current module then color the item if ($currentmodule == $module->modulename){ ! $headers .= " » <font color='red'><u><a class='menu' href='$home$basepath/$module->modulename'>".ucwords($module->modulename)."</a></u></font> |"; // Declare important variables so that headers can pick them up and preview them |
From: Astronouth7303 <ast...@us...> - 2005-03-13 19:09:27
|
Update of /cvsroot/openfirst/base/config In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24490/config Modified Files: headers.php Log Message: Correction from misinterpretation of $home and $basepath Index: headers.php =================================================================== RCS file: /cvsroot/openfirst/base/config/headers.php,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** headers.php 1 Sep 2003 17:29:45 -0000 1.19 --- headers.php 13 Mar 2005 19:09:16 -0000 1.20 *************** *** 48,56 **** <table width="100%" border="0" cellspacing="0" cellpadding="6"> <tr> ! <td> <img src="<?php echo("$basepath/images/"); ?>openfirst.png" alt="openFIRST Portal System"> </td> </tr> <tr> ! <th id="topmenu" style="background-image: url('<?php echo($basepath); ?>/images/back.gif');"> <?php if(ISSET($headers)){ --- 48,56 ---- <table width="100%" border="0" cellspacing="0" cellpadding="6"> <tr> ! <td> <img src="<?php echo("$home$basepath/images/"); ?>openfirst.png" alt="openFIRST Portal System"> </td> </tr> <tr> ! <th id="topmenu" style="background-image: url('<?php echo("$home$basepath"); ?>/images/back.gif');"> <?php if(ISSET($headers)){ |
From: Astronouth7303 <ast...@us...> - 2005-03-13 19:06:45
|
Update of /cvsroot/openfirst/base/config In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23645/config Modified Files: first.php Log Message: Corrected the defaults so that home would not point to the same dir as basepath Index: first.php =================================================================== RCS file: /cvsroot/openfirst/base/config/first.php,v retrieving revision 1.50 retrieving revision 1.51 diff -C2 -d -r1.50 -r1.51 *** first.php 13 Mar 2005 01:43:41 -0000 1.50 --- first.php 13 Mar 2005 19:06:34 -0000 1.51 *************** *** 142,146 **** } ! // Detect default options $basepath = substr($_SERVER["SCRIPT_NAME"], 0, -17); $server = $_SERVER["SERVER_NAME"]; --- 142,146 ---- } ! // Detect default options $basepath = substr($_SERVER["SCRIPT_NAME"], 0, -17); $server = $_SERVER["SERVER_NAME"]; *************** *** 150,166 **** if (!$windows) { ! $windows = (strstr(getcwd(), "\\")) ? true : false; } if (!$windows && isset($_SERVER['SERVER_SIGNATURE'])) { ! $windows = (strstr($_SERVER['SERVER_SIGNATURE'], '(win32)')) ? true : false; } if (!$windows && isset($_SERVER['PATH'])) { ! $windows = (strstr($_SERVER['PATH'], "\\")) ? true : false; } if (!$windows && isset($_SERVER['SystemRoot'])) { ! $windows = (strstr($_SERVER['SystemRoot'], "\\")) ? true : false; } if (!$windows && isset($_SERVER['SystemRoot'])) { ! $windows = (substr($_SERVER['SystemRoot'], 0, 1) == "C:") ? true : false; } --- 150,166 ---- if (!$windows) { ! $windows = (strstr(getcwd(), "\\")) ? true : false; // Contains backslash } if (!$windows && isset($_SERVER['SERVER_SIGNATURE'])) { ! $windows = (strstr($_SERVER['SERVER_SIGNATURE'], '(win32)')) ? true : false; // contains (win32) } if (!$windows && isset($_SERVER['PATH'])) { ! $windows = (strstr($_SERVER['PATH'], "\\")) ? true : false; // Contains backslash } if (!$windows && isset($_SERVER['SystemRoot'])) { ! $windows = (strstr($_SERVER['SystemRoot'], "\\")) ? true : false; // Contains backslash } if (!$windows && isset($_SERVER['SystemRoot'])) { ! $windows = (substr($_SERVER['SystemRoot'], 1, 1) == ':') ? true : false; // begins with a windows drive } *************** *** 263,267 **** to your main page) <em>Note:</em> Do not place a slash after the link ie. http://www.yoursite.com</font></td> ! <td> <input type="text" name="home" value="<?php echo htmlentities("http://$server$basepath"); ?>" ></td> </tr> <tr> --- 263,267 ---- to your main page) <em>Note:</em> Do not place a slash after the link ie. http://www.yoursite.com</font></td> ! <td> <input type="text" name="home" value="<?php echo htmlentities("http://$server"); ?>" ></td> </tr> <tr> |
From: <bug...@we...> - 2005-03-13 15:36:46
|
http://bugzilla.openfirst.org/show_bug.cgi?id=245 Summary: Add e-mail address for webmaster of site to BZ submissions. Product: openFIRST Version: unspecified Platform: All OS/Version: All Status: NEW Severity: enhancement Priority: P2 Component: base AssignedTo: de...@op... ReportedBy: ti...@op... It would be nice to have the e-mail addresses of webmasters for sites that encounter specific bugs to be recorded and added to the list of people watching a bug. This way people would be able to know the status of the bugs that they've encountered automatically, and for more difficult bugs we would be able to have a way to contact them in order to narrow down possiblities. ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. |
From: <bug...@we...> - 2005-03-13 15:30:54
|
http://bugzilla.openfirst.org/show_bug.cgi?id=192 ------- Additional Comments From ti...@op... 2005-03-13 09:30 ------- *** Bug 193 has been marked as a duplicate of this bug. *** ------- You are receiving this mail because: ------- You reported the bug, or are watching the reporter. |
From: <bug...@we...> - 2005-03-13 15:30:54
|
http://bugzilla.openfirst.org/show_bug.cgi?id=193 ti...@op... changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution| |DUPLICATE Summary|Automated Bug Report - |demo site reports errors |members |pertaining to emoticon | |include ------- Additional Comments From ti...@op... 2005-03-13 09:30 ------- *** This bug has been marked as a duplicate of 192 *** ------- You are receiving this mail because: ------- You reported the bug, or are watching the reporter. |
From: <bug...@we...> - 2005-03-13 15:30:15
|
http://bugzilla.openfirst.org/show_bug.cgi?id=193 ti...@op... changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|de...@op... |ti...@op... Status|NEW |UNCONFIRMED Platform| |All ------- Additional Comments From ti...@op... 2005-03-13 09:30 ------- Reassign, since it pertains to the demo. ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. You reported the bug, or are watching the reporter. |
From: <bug...@we...> - 2005-03-13 15:28:40
|
http://bugzilla.openfirst.org/show_bug.cgi?id=192 ti...@op... changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution| |FIXED ------- Additional Comments From ti...@op... 2005-03-13 09:28 ------- This has been fixed; along with other files that had conflicts in merging. The demo site is now working properly. ------- You are receiving this mail because: ------- You reported the bug, or are watching the reporter. |
From: <bug...@we...> - 2005-03-13 15:28:03
|
http://bugzilla.openfirst.org/show_bug.cgi?id=192 ti...@op... changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|de...@op... |ti...@op... Status|NEW |UNCONFIRMED Platform| |All Summary|Automated Bug Report - |base/config/index.php has |members |errors with SQL stats | |display ------- Additional Comments From ti...@op... 2005-03-13 09:27 ------- Error resulted from conflicts during merge of version changes. Error is specific to this site. ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. You reported the bug, or are watching the reporter. |
From: Astronouth7303 <ast...@us...> - 2005-03-13 02:09:10
|
Update of /cvsroot/openfirst/awards/admin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23125/awards/admin Modified Files: index.php Log Message: Fixed bug if there was no award Index: index.php =================================================================== RCS file: /cvsroot/openfirst/awards/admin/index.php,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** index.php 7 Aug 2004 02:06:59 -0000 1.17 --- index.php 13 Mar 2005 02:09:00 -0000 1.18 *************** *** 96,100 **** $award = ofirst_dbfetch_object(ofirst_dbquery("SELECT * FROM ofirst_awards WHERE ID='" . $_GET["MODIFY"] . "';")); } else { ! $award = object; } ?> --- 96,100 ---- $award = ofirst_dbfetch_object(ofirst_dbquery("SELECT * FROM ofirst_awards WHERE ID='" . $_GET["MODIFY"] . "';")); } else { ! $award = ''; } ?> *************** *** 180,186 **** <th> </th> <?php if($award == "") { ?> ! <td><input name="create" type="submit" id="create" value="Create Listing"></td> <?php } else { ?> ! <td><input name="modify" type="submit" id="modify" value="Modify Listing"></td> <?php } ?> </tr> --- 180,186 ---- <th> </th> <?php if($award == "") { ?> ! <td><input name="create" type="submit" id="create" value="Create Award"></td> <?php } else { ?> ! <td><input name="modify" type="submit" id="modify" value="Modify Award"></td> <?php } ?> </tr> |
From: Astronouth7303 <ast...@us...> - 2005-03-13 01:52:18
|
Update of /cvsroot/openfirst/base/config In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18848/config Added Files: .cvsignore Log Message: Ignoring Globals.php --- NEW FILE: .cvsignore --- Globals.php |
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"); } ?> |
From: Astronouth7303 <ast...@us...> - 2005-03-13 01:46:22
|
Update of /cvsroot/openfirst/base/config In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17485/config Modified Files: dbase.php Log Message: More error fixes Index: dbase.php =================================================================== RCS file: /cvsroot/openfirst/base/config/dbase.php,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** dbase.php 13 Mar 2005 01:43:41 -0000 1.19 --- dbase.php 13 Mar 2005 01:46:12 -0000 1.20 *************** *** 256,260 **** function ofirst_dbsize() { ! global $dbasetype, $peardb; if($dbasetype == "mysql") { $dbsize = 0; --- 256,260 ---- function ofirst_dbsize() { ! global $dbasetype, $peardb, $sqldatabase; if($dbasetype == "mysql") { $dbsize = 0; |
From: Astronouth7303 <ast...@us...> - 2005-03-13 01:43:54
|
Update of /cvsroot/openfirst/base/config In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16813/config Modified Files: dbase.php first.php globals.php globals.tpl Log Message: -Added ofirst_dbcreate() -Fixed some errors -Corrected bug in globals.tpl Index: first.php =================================================================== RCS file: /cvsroot/openfirst/base/config/first.php,v retrieving revision 1.49 retrieving revision 1.50 diff -C2 -d -r1.49 -r1.50 *** first.php 13 Mar 2005 01:33:45 -0000 1.49 --- first.php 13 Mar 2005 01:43:41 -0000 1.50 *************** *** 48,64 **** } ofirst_dbcreate("$sqlserver","$sqluser","$sqlpassword", $sqldatabase); ! ofirst_dbconnect("$sqlserver","$sqluser","$sqlpassword"); ! ofirst_select_db($sqldatabase); ! ! ofirst_dbquery("CREATE TABLE `ofirst_config` ( ! `modulename` varchar(25) NOT NULL default '', ! `showonmenu` tinyint(1) default NULL, ! `active` tinyint(1) default NULL, ! `adminnavigation` text, ! `modulenavigation` text, ! `includes` text, ! PRIMARY KEY (`modulename`) ! )"); ! echo ofirst_dberror(); function GetVarValue($var) { --- 48,52 ---- } ofirst_dbcreate("$sqlserver","$sqluser","$sqlpassword", $sqldatabase); ! echo 'DB/tables creation error: '.ofirst_dberror(); function GetVarValue($var) { Index: dbase.php =================================================================== RCS file: /cvsroot/openfirst/base/config/dbase.php,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** dbase.php 13 Mar 2005 01:25:21 -0000 1.18 --- dbase.php 13 Mar 2005 01:43:41 -0000 1.19 *************** *** 26,30 **** // without having to be completely rewritten or released as two // different versions. ! $lastquery; if(isset($dbasetype) == false) { $dbasetype = "mysql"; } --- 26,30 ---- // without having to be completely rewritten or released as two // different versions. ! $lastquery = ''; if(isset($dbasetype) == false) { $dbasetype = "mysql"; } *************** *** 271,273 **** --- 271,290 ---- } } + + function ofirst_dbcreate($sqlserver, $sqluser, $sqlpassword, $sqldatabase) { + /* Create database if it does not already exist */ + ofirst_dbconnect("$sqlserver","$sqluser","$sqlpassword"); + ofirst_dbquery("CREATE DATABASE IF NOT EXISTS $sqldatabase;"); + ofirst_select_db($sqldatabase); + + ofirst_dbquery("CREATE TABLE `ofirst_config` ( + `modulename` varchar(25) NOT NULL default '', + `showonmenu` tinyint(1) default NULL, + `active` tinyint(1) default NULL, + `adminnavigation` text, + `modulenavigation` text, + `includes` text, + PRIMARY KEY (`modulename`) + )"); + } ?> Index: globals.tpl =================================================================== RCS file: /cvsroot/openfirst/base/config/globals.tpl,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** globals.tpl 13 Mar 2005 01:27:50 -0000 1.3 --- globals.tpl 13 Mar 2005 01:43:42 -0000 1.4 *************** *** 45,49 **** $mailfrom = %BOTMAIL%; $basepath = %BASEPATH%; ! $fbasepath = %FBASEPATH; // Determine what module the user is viewing --- 45,49 ---- $mailfrom = %BOTMAIL%; $basepath = %BASEPATH%; ! $fbasepath = %FBASEPATH%; // Determine what module the user is viewing Index: globals.php =================================================================== RCS file: /cvsroot/openfirst/base/config/globals.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** globals.php 13 Mar 2005 01:19:58 -0000 1.5 --- globals.php 13 Mar 2005 01:43:42 -0000 1.6 *************** *** 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"); } ! ?> \ No newline at end of file --- 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(); ! ?> |
From: Astronouth7303 <ast...@us...> - 2005-03-13 01:33:55
|
Update of /cvsroot/openfirst/base/config In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13642/config Modified Files: first.php Log Message: Wrong selection group Index: first.php =================================================================== RCS file: /cvsroot/openfirst/base/config/first.php,v retrieving revision 1.48 retrieving revision 1.49 diff -C2 -d -r1.48 -r1.49 *** first.php 13 Mar 2005 01:27:50 -0000 1.48 --- first.php 13 Mar 2005 01:33:45 -0000 1.49 *************** *** 236,255 **** </td> <td> ! <input type='hidden' name='peardb' value='true'> <select name="dbasetype"> ! <option value="dbase">dBase (through PEAR DB)</option> ! <option value="fbsql">FrontBase (through PEAR DB)</option> ! <option value="ibase">InterBase (through PEAR DB)</option> ! <option value="ifx">Informix (through PEAR DB)</option> ! <option value="msql">Mini SQL (through PEAR DB)</option> ! <option value="mssql">Microsoft SQL Server (through PEAR DB)</option> ! <option value="mysql">MySQL (for servers running MySQL <= 4.0) (through PEAR DB)</option> ! <option value="mysqli">MySQL (for servers running MySQL >= 4.1) (through PEAR DB)</option> ! <option value="oci8">Oracle 7/8/9 (through PEAR DB)</option> ! <option value="odbc">ODBC (Open Database Connectivity) (through PEAR DB)</option> ! <option value="pgsql">PostgreSQL (through PEAR DB)</option> ! <option value="sqlite">SQLite (through PEAR DB)</option> ! <option value="sybase">Sybase (through PEAR DB)</option> ! </select> <tr> <td>Title of Website</td> --- 236,245 ---- </td> <td> ! <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> <tr> <td>Title of Website</td> |
From: Astronouth7303 <ast...@us...> - 2005-03-13 01:28:04
|
Update of /cvsroot/openfirst/base/config In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11973/config Modified Files: first.php globals.tpl Log Message: Removed any remenents of PEAR support, because there isn't any Index: first.php =================================================================== RCS file: /cvsroot/openfirst/base/config/first.php,v retrieving revision 1.47 retrieving revision 1.48 diff -C2 -d -r1.47 -r1.48 *** first.php 13 Mar 2005 01:19:58 -0000 1.47 --- first.php 13 Mar 2005 01:27:50 -0000 1.48 *************** *** 43,47 **** $sqlpassword = $_POST["sqlpassword"]; $sqldatabase = $_POST["sqldatabase"]; - $peardb = $_POST['peardb']; include_once("./dbase.php"); if(function_exists("ofirst_dbconnect") == false) { --- 43,46 ---- *************** *** 77,84 **** $cookielogins = ((isset($_POST["cookielogins"]) && $_POST["cookielogins"]=="yes") ? true : false); $allowreg = ((isset($_POST["allowreg"]) && $_POST["allowreg"]=="yes") ? true : false); - if(! isset($_POST["peardb"])) { $_POST["peardb"] = false; } $find = array('%DBTYPE%', - '%PEAR%', '%OS%', '%ENCRYPT%', --- 76,81 ---- *************** *** 100,104 **** $replace = array(GetVarValue($_POST['dbasetype']), - GetVarValue($_POST['peardb']), GetVarValue($_POST['ostype']), GetVarValue($_POST['encryption']), --- 97,100 ---- *************** *** 181,193 **** } - $fd = explode(($windows ? ';' : ':'), ini_get('include_path')); - - $peardb = false; - foreach($fd as $d) { - if(file_exists("$d/DB.php")) { - $peardb = true; - } - } - $sqlhost = 'localhost'; if(ini_get('mysql.default_host') != '') { --- 177,180 ---- *************** *** 246,267 **** <td>Database Type <?php - if ($peardb) { - echo ("<br />The PEAR Database Abstraction layer exists and will be used."); - } ?> </td> ! <td><?php ! if(! $peardb) { ! ?> ! <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> ! ! <?php ! } else { ! ?> <input type='hidden' name='peardb' value='true'> <select name="dbasetype"> --- 233,239 ---- <td>Database Type <?php ?> </td> ! <td> <input type='hidden' name='peardb' value='true'> <select name="dbasetype"> *************** *** 280,286 **** <option value="sybase">Sybase (through PEAR DB)</option> </select> - <?php - } - ?> <tr> <td>Title of Website</td> --- 252,255 ---- Index: globals.tpl =================================================================== RCS file: /cvsroot/openfirst/base/config/globals.tpl,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** globals.tpl 29 Dec 2004 22:03:20 -0000 1.2 --- globals.tpl 13 Mar 2005 01:27:50 -0000 1.3 *************** *** 9,13 **** */ $dbasetype = %DBTYPE%; - $peardb = %PEAR%; $ostype = %OS%; if ($ostype == "windows") { --- 9,12 ---- |
From: Astronouth7303 <ast...@us...> - 2005-03-13 01:25:35
|
Update of /cvsroot/openfirst/base/config In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11298/config Modified Files: dbase.php Log Message: Removed any remenents of PEAR support, because there isn't any Index: dbase.php =================================================================== RCS file: /cvsroot/openfirst/base/config/dbase.php,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** dbase.php 6 Jan 2005 22:01:07 -0000 1.17 --- dbase.php 13 Mar 2005 01:25:21 -0000 1.18 *************** *** 42,49 **** $newlink = "", $intclientflags = "") { global $dbasetype, $peardb, $connectdsn; ! if($peardb) { ! $connectdsn = "$dbasetype://$username:$password@$server/"; ! return(0); ! } elseif($dbasetype == "mysql") { if(function_exists("mysql_connect") == false) { die("MySQL support is not available in your version of PHP. To use the openFIRST Web Portal Software, please either enable MySQL support, or choose another database type."); --- 42,46 ---- $newlink = "", $intclientflags = "") { global $dbasetype, $peardb, $connectdsn; ! if($dbasetype == "mysql") { if(function_exists("mysql_connect") == false) { die("MySQL support is not available in your version of PHP. To use the openFIRST Web Portal Software, please either enable MySQL support, or choose another database type."); *************** *** 76,82 **** function ofirst_select_db($databasename, $linkidentifier = "") { global $dbasetype, $peardb, $connectdsn; ! if($peardb) { ! return($connectdsn =& DB::connect("$connectdsn$databasename")); ! } elseif($dbasetype == "mysql") { if(function_exists("mysql_select_db") == false) { die("MySQL support is not available in your version of PHP. To use the openFIRST Web Portal Software, please either enable MySQL support, or choose another database type."); --- 73,77 ---- function ofirst_select_db($databasename, $linkidentifier = "") { global $dbasetype, $peardb, $connectdsn; ! if($dbasetype == "mysql") { if(function_exists("mysql_select_db") == false) { die("MySQL support is not available in your version of PHP. To use the openFIRST Web Portal Software, please either enable MySQL support, or choose another database type."); *************** *** 103,113 **** function ofirst_dberrno($linkidentifier = "") { global $dbasetype, $peardb; ! if($peardb) { ! if($linkidentifier != "") { ! return(DB_Error::getCode($linkidentifier)); ! } else { ! return(DB_Error::getCode()); ! } ! } elseif($dbasetype == "mysql") { if(function_exists("mysql_errno") == false) { die("MySQL support is not available in your version of PHP. To use the openFIRST Web Portal Software, please either enable MySQL support, or choose another database type."); --- 98,102 ---- function ofirst_dberrno($linkidentifier = "") { global $dbasetype, $peardb; ! if($dbasetype == "mysql") { if(function_exists("mysql_errno") == false) { die("MySQL support is not available in your version of PHP. To use the openFIRST Web Portal Software, please either enable MySQL support, or choose another database type."); *************** *** 138,148 **** function ofirst_dberror($linkidentifier = "") { global $dbasetype, $peardb; ! if($peardb) { ! if($linkidentifier != "") { ! return(DB_Error::getMessage($linkidentifier)); ! } else { ! return(DB_Error::getMessage()); ! } ! } elseif($dbasetype == "mysql") { if(function_exists("mysql_error") == false) { die("MySQL support is not available in your version of PHP. To use the openFIRST Web Portal Software, please either enable MySQL support, or choose another database type."); --- 127,131 ---- function ofirst_dberror($linkidentifier = "") { global $dbasetype, $peardb; ! if($dbasetype == "mysql") { if(function_exists("mysql_error") == false) { die("MySQL support is not available in your version of PHP. To use the openFIRST Web Portal Software, please either enable MySQL support, or choose another database type."); *************** *** 175,187 **** $lastquery = "\$string = \"$string\", \$linkidentifier = \"$linkidentifier\", \$batchsize = \"$batchsize\""; ! if($peardb) { ! if($batchsize != "") { ! return($sqlconnection->query($string, $linkidentifier, $batchsize)); ! } elseif($linkidentifier != "") { ! return($sqlconnection->query($string, $linkidentifier)); ! } else { ! return($sqlconnection->query($string)); ! } ! } elseif($dbasetype == "mysql") { if(function_exists("mysql_query") == false) { die("MySQL support is not available in your version of PHP. To use the openFIRST Web Portal Software, please either enable MySQL support, or choose another database type."); --- 158,162 ---- $lastquery = "\$string = \"$string\", \$linkidentifier = \"$linkidentifier\", \$batchsize = \"$batchsize\""; ! if($dbasetype == "mysql") { if(function_exists("mysql_query") == false) { die("MySQL support is not available in your version of PHP. To use the openFIRST Web Portal Software, please either enable MySQL support, or choose another database type."); *************** *** 215,226 **** function ofirst_dbfetch_object($resource, $rownumber = "") { global $dbasetype, $peardb; ! if($peardb) { ! if($rownumber != "") { ! return(DB_FETCHMODE_OBJECT($resource, $rownumber)); ! } else { ! return(DB_FETCHMODE_OBJECT($resource)); ! } ! ! } elseif($dbasetype == "mysql") { if(function_exists("mysql_fetch_object") == false) { die("MySQL support is not available in your version of PHP. To use the openFIRST Web Portal Software, please either enable MySQL support, or choose another database type."); --- 190,194 ---- function ofirst_dbfetch_object($resource, $rownumber = "") { global $dbasetype, $peardb; ! if($dbasetype == "mysql") { if(function_exists("mysql_fetch_object") == false) { die("MySQL support is not available in your version of PHP. To use the openFIRST Web Portal Software, please either enable MySQL support, or choose another database type."); *************** *** 249,259 **** function ofirst_dbnum_rows($resource) { global $dbasetype, $peardb; ! if($peardb) { ! if($resource != "") { ! return(DB_result::numRows($resource)); ! } else { ! return(DB_result::numRows()); ! } ! } elseif($dbasetype == "mysql") { if(function_exists("mysql_num_rows") == false) { die("MySQL support is not available in your version of PHP. To use the openFIRST Web Portal Software, please either enable MySQL support, or choose another database type."); --- 217,221 ---- function ofirst_dbnum_rows($resource) { global $dbasetype, $peardb; ! if($dbasetype == "mysql") { if(function_exists("mysql_num_rows") == false) { die("MySQL support is not available in your version of PHP. To use the openFIRST Web Portal Software, please either enable MySQL support, or choose another database type."); *************** *** 280,286 **** function ofirst_dbname_version() { global $dbasetype, $peardb; ! if($peardb) { ! return "PEAR DB"; ! } elseif($dbasetype == "mysql") { $v = ofirst_dbfetch_object(ofirst_dbquery("SELECT VERSION() AS mysql_version")); return "MySQL $v->mysql_version"; --- 242,246 ---- function ofirst_dbname_version() { global $dbasetype, $peardb; ! if($dbasetype == "mysql") { $v = ofirst_dbfetch_object(ofirst_dbquery("SELECT VERSION() AS mysql_version")); return "MySQL $v->mysql_version"; |
From: Astronouth7303 <ast...@us...> - 2005-03-13 01:20:21
|
Update of /cvsroot/openfirst/base/config In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9875/config Modified Files: Tag: NewDB dbase.php No tag first.php globals.php Tag: NewDB globals.tpl Log Message: Last PEAR commit for now Index: first.php =================================================================== RCS file: /cvsroot/openfirst/base/config/first.php,v retrieving revision 1.46 retrieving revision 1.47 diff -C2 -d -r1.46 -r1.47 *** first.php 7 Jan 2005 20:31:06 -0000 1.46 --- first.php 13 Mar 2005 01:19:58 -0000 1.47 *************** *** 39,57 **** if(isset($_POST["ostype"])) { - include_once("./dbase.php"); $sqlserver = $_POST["sqlserver"]; $sqluser = $_POST["sqluser"]; $sqlpassword = $_POST["sqlpassword"]; $sqldatabase = $_POST["sqldatabase"]; if(function_exists("ofirst_dbconnect") == false) { die("Your version of PHP has not been compiled with MySQL support, therefore the openFIRST web portal system cannot run on this system. Please contact your system administrator to request MySQL support for your version of PHP."); } ! $sqlconnection = ofirst_dbconnect("$sqlserver","$sqluser","$sqlpassword"); ! ! /* Create database if it does not already exist */ ! ofirst_dbquery("CREATE DATABASE IF NOT EXISTS $sqldatabase;"); ! ofirst_select_db($sqldatabase); function GetVarValue($var) { ob_Start(); --- 39,66 ---- if(isset($_POST["ostype"])) { $sqlserver = $_POST["sqlserver"]; $sqluser = $_POST["sqluser"]; $sqlpassword = $_POST["sqlpassword"]; $sqldatabase = $_POST["sqldatabase"]; + $peardb = $_POST['peardb']; + include_once("./dbase.php"); if(function_exists("ofirst_dbconnect") == false) { die("Your version of PHP has not been compiled with MySQL support, therefore the openFIRST web portal system cannot run on this system. Please contact your system administrator to request MySQL support for your version of PHP."); } ! ofirst_dbcreate("$sqlserver","$sqluser","$sqlpassword", $sqldatabase); ! ofirst_dbconnect("$sqlserver","$sqluser","$sqlpassword"); ofirst_select_db($sqldatabase); + ofirst_dbquery("CREATE TABLE `ofirst_config` ( + `modulename` varchar(25) NOT NULL default '', + `showonmenu` tinyint(1) default NULL, + `active` tinyint(1) default NULL, + `adminnavigation` text, + `modulenavigation` text, + `includes` text, + PRIMARY KEY (`modulename`) + )"); + echo ofirst_dberror(); + function GetVarValue($var) { ob_Start(); Index: dbase.php =================================================================== RCS file: /cvsroot/openfirst/base/config/dbase.php,v retrieving revision 1.15.2.1 retrieving revision 1.15.2.2 diff -C2 -d -r1.15.2.1 -r1.15.2.2 *** dbase.php 6 Jan 2005 21:57:52 -0000 1.15.2.1 --- dbase.php 13 Mar 2005 01:19:58 -0000 1.15.2.2 *************** *** 26,38 **** // without having to be completely rewritten or released as two // different versions. ! $lastquery = ""; //Used for debugging if(isset($dbasetype) == false) { $dbasetype = "mysql"; } ! $connections = array(0 => array('conn' => NULL, 'res' => NULL, 'db' => NULL)); ! ! $connectdsn = ""; if(isset($peardb) && $peardb) { // Include the PEAR Database Abstraction Layer ! include_once("DB.php"); echo "PEAR is being used<br />\n"; } elseif(! isset($peardb)) { --- 26,43 ---- // without having to be completely rewritten or released as two // different versions. ! $lastquery = ''; //Used for debugging if(isset($dbasetype) == false) { $dbasetype = "mysql"; } ! #Note: This includes the capability to connect to multiple DBs of different types at the same time. ! $connections = array(0 => array('dbms' => NULL, # the PEAR DB object for the extension being used ! 'conn' => NULL, # the connection identifier, or DB_common in PEAR ! 'res' => NULL, # the last result, or DB_result in PEAR ! 'db' => NULL, # the currently selected DB ! 'dsn' => NULL # the PEAR DSN of the DB server ! )); ! if(isset($peardb) && $peardb) { // Include the PEAR Database Abstraction Layer ! include_once('DB.php'); echo "PEAR is being used<br />\n"; } elseif(! isset($peardb)) { *************** *** 45,57 **** global $connections, $dbasetype, $peardb; if($peardb) { ! $connections[$ID] = "$dbasetype://$username:$password@$server/"; return($ID); } elseif($dbasetype == "mysql") { if(function_exists("mysql_connect") == false) { ! die("MySQL support is not available in your version of PHP. To use the openFIRST Web Portal Software, please either enable MySQL support, or choose another database type."); } ! if($intclientflags != "") { $connections[$ID]['conn'] = mysql_connect($server, $username, $password, $newlink, $intclientflags); ! } elseif($newlink != "") { $connections[$ID]['conn'] = mysql_connect($server, $username, $password, $newlink); } else { --- 50,63 ---- global $connections, $dbasetype, $peardb; if($peardb) { ! $connections[$ID]['dbms'] =& DB::factory($dbasetype); ! $connections[$ID]['dsn'] = "$dbasetype://$username:$password@$server/"; return($ID); } elseif($dbasetype == "mysql") { if(function_exists("mysql_connect") == false) { ! die("MySQL support is not available in your version of PHP. To use the openFIRST Web Portal Software, please either enable MySQL support, or choose another database type. (mysql_connect)"); } ! /*if($intclientflags != "") { $connections[$ID]['conn'] = mysql_connect($server, $username, $password, $newlink, $intclientflags); ! } else*/if($newlink != "") { $connections[$ID]['conn'] = mysql_connect($server, $username, $password, $newlink); } else { *************** *** 60,69 **** } elseif ($dbasetype == "mssql") { if(function_exists("mssql_connect") == false) { ! die("Microsoft SQL support is not available in your version of PHP. To use the openFIRST Web Portal Software, please either enable Microsoft SQL support, or choose another database type."); } $connections[$ID]['conn'] = mssql_connect($server, $username, $password); } elseif ($dbasetype == "odbc") { if(function_exists("odbc_connect") == false) { ! die("ODBC support is not available in your version of PHP. To use the openFIRST Web Portal Software, please either enable ODBC support, or choose another database type."); } if($newlink != "") { --- 66,75 ---- } elseif ($dbasetype == "mssql") { if(function_exists("mssql_connect") == false) { ! die("Microsoft SQL support is not available in your version of PHP. To use the openFIRST Web Portal Software, please either enable Microsoft SQL support, or choose another database type. (mssql_connect)"); } $connections[$ID]['conn'] = mssql_connect($server, $username, $password); } elseif ($dbasetype == "odbc") { if(function_exists("odbc_connect") == false) { ! die("ODBC support is not available in your version of PHP. To use the openFIRST Web Portal Software, please either enable ODBC support, or choose another database type. (odbc_connect)"); } if($newlink != "") { *************** *** 76,105 **** } function ofirst_select_db($databasename, $ID = 0) { global $connections, $dbasetype, $peardb; $connections[$ID]['db'] = $databasename; if($peardb) { ! $connections[$ID]['conn'] = $connections[$ID]['conn'] =& DB::connect($connections[$ID]['conn'].$databasename); ! if (DB::isError ($connections[$ID])) return FALSE; } elseif($dbasetype == "mysql") { if(function_exists("mysql_select_db") == false) { ! die("MySQL support is not available in your version of PHP. To use the openFIRST Web Portal Software, please either enable MySQL support, or choose another database type."); } - // if($linkidentifier != "") { return(mysql_select_db($databasename, $connections[$ID]['conn'])); - /* } else { - return(mysql_select_db($databasename)); - }*/ } elseif ($dbasetype == "mssql") { if(function_exists("mssql_select_db") == false) { ! die("Microsoft SQL support is not available in your version of PHP. To use the openFIRST Web Portal Software, please either enable Microsoft SQL support, or choose another database type."); } - // if($linkidentifier != "") { return(mssql_select_db($databasename, $connections[$ID]['conn'])); - /* } else { - return(mssql_select_db($databasename)); - / }*/ } elseif ($dbasetype == "odbc") { // ODBC doesn't require selecting a DB --- 82,155 ---- } + function ofirst_dbdisconnect($ID = 0) { + global $connections, $dbasetype, $peardb; + $connections[$ID]['db'] = $databasename; + if($peardb) { + if (DB::isConnection($connections[$ID]['conn'])) { + if ($connections[$ID]['res'] !== null) { + $connections[$ID]['res']->free(); + } + $connections[$ID]['res'] = null; + if (method_exists($connections[$ID]['conn'], 'disconnect')) { + $connections[$ID]['conn']->disconnect(); + } + $connections[$ID]['conn'] = null; + } + $connections[$ID]['dbms'] = null; + unset($connections[$ID]); + return true; + } elseif($dbasetype == "mysql") { + if(function_exists("mysql_close") == false) { + die("MySQL support is not available in your version of PHP. To use the openFIRST Web Portal Software, please either enable MySQL support, or choose another database type. (mysql_close)"); + } + $val = mysql_close($connections[$ID]['conn']); + if ($val) unset($connections[$ID]); + return $val; + } elseif ($dbasetype == "mssql") { + if(function_exists("mssql_close") == false) { + die("Microsoft SQL support is not available in your version of PHP. To use the openFIRST Web Portal Software, please either enable Microsoft SQL support, or choose another database type. (mssql_close)"); + } + $val = mssql_close($connections[$ID]['conn']); + if ($val) unset($connections[$ID]); + return $val; + } elseif ($dbasetype == "odbc") { + if(function_exists("odbc_close") == false) { + die("ODBC support is not available in your version of PHP. To use the openFIRST Web Portal Software, please either enable ODBC support, or choose another database type. (odbc_close)"); + } + $val = odbc_close($connections[$ID]['conn']); + if ($val) unset($connections[$ID]); + return $val; + } + } + function ofirst_select_db($databasename, $ID = 0) { global $connections, $dbasetype, $peardb; $connections[$ID]['db'] = $databasename; if($peardb) { ! if (DB::isConnection($connections[$ID]['conn'])) { ! if ($connections[$ID]['res'] !== null) { ! $connections[$ID]['res']->free(); ! } ! $connections[$ID]['res'] = null; ! if (method_exists($connections[$ID]['dbms'], 'disconnect')) { ! $connections[$ID]['conn']->disconnect(); ! } ! $connections[$ID]['conn'] = null; ! } ! echo $connections[$ID]['dsn'].$databasename."<br />\n"; ! $connections[$ID]['conn'] =& $connections[$ID]['dbms']->connect($connections[$ID]['dsn'].$databasename); ! if (DB::isError($connections[$ID]['conn'])) return FALSE; } elseif($dbasetype == "mysql") { if(function_exists("mysql_select_db") == false) { ! die("MySQL support is not available in your version of PHP. To use the openFIRST Web Portal Software, please either enable MySQL support, or choose another database type. (mysql_select_db)"); } return(mysql_select_db($databasename, $connections[$ID]['conn'])); } elseif ($dbasetype == "mssql") { if(function_exists("mssql_select_db") == false) { ! die("Microsoft SQL support is not available in your version of PHP. To use the openFIRST Web Portal Software, please either enable Microsoft SQL support, or choose another database type. (mssql_select_db)"); } return(mssql_select_db($databasename, $connections[$ID]['conn'])); } elseif ($dbasetype == "odbc") { // ODBC doesn't require selecting a DB *************** *** 111,142 **** global $connections, $dbasetype, $peardb; if($peardb) { ! // if($linkidentifier != "") { ! return(DB_Error::getCode($connections[$ID]['conn'])); #FIXME: Use last return ! /* } else { ! return(DB_Error::getCode()); ! }*/ } elseif($dbasetype == "mysql") { if(function_exists("mysql_errno") == false) { ! die("MySQL support is not available in your version of PHP. To use the openFIRST Web Portal Software, please either enable MySQL support, or choose another database type."); } - // if($linkidentifier != "") { return(mysql_errno($connections[$ID]['conn'])); - /* } else { - return(mysql_errno()); - }*/ } elseif ($dbasetype == "mssql") { if(function_exists("mssql_connect") == false) { ! die("Microsoft SQL support is not available in your version of PHP. To use the openFIRST Web Portal Software, please either enable Microsoft SQL support, or choose another database type."); } return(0); } elseif ($dbasetype == "odbc") { if(function_exists("odbc_error") == false) { ! die("ODBC support is not enabled in your version of PHP. To use the openFIRST Web Portal Software, please either enable ODBC support, or choose another database type."); } - // if($linkidentifier != "") { return(odbc_error($connections[$ID]['conn'])); - /* } else { - return(odbc_error()); - }*/ } exit(0); --- 161,186 ---- global $connections, $dbasetype, $peardb; if($peardb) { ! if (DB::isError($connections[$ID]['dbms'])) { ! return $connections[$ID]['dbms']->getCode(); ! } elseif (DB::isError($connections[$ID]['conn'])) { ! return $connections[$ID]['conn']->getCode(); ! } elseif (DB::isError($connections[$ID]['res'])) { ! return $connections[$ID]['res']->getCode(); ! } } elseif($dbasetype == "mysql") { if(function_exists("mysql_errno") == false) { ! die("MySQL support is not available in your version of PHP. To use the openFIRST Web Portal Software, please either enable MySQL support, or choose another database type. (mysql_errno)"); } return(mysql_errno($connections[$ID]['conn'])); } elseif ($dbasetype == "mssql") { if(function_exists("mssql_connect") == false) { ! die("Microsoft SQL support is not available in your version of PHP. To use the openFIRST Web Portal Software, please either enable Microsoft SQL support, or choose another database type. (mssql_connect)"); } return(0); } elseif ($dbasetype == "odbc") { if(function_exists("odbc_error") == false) { ! die("ODBC support is not enabled in your version of PHP. To use the openFIRST Web Portal Software, please either enable ODBC support, or choose another database type. (odbc_error)"); } return(odbc_error($connections[$ID]['conn'])); } exit(0); *************** *** 146,177 **** global $connections, $dbasetype, $peardb; if($peardb) { ! // if($linkidentifier != "") { ! return(DB_Error::getMessage($connections[$ID]['conn'])); ! /* } else { ! return(DB_Error::getMessage()); ! }*/ } elseif($dbasetype == "mysql") { if(function_exists("mysql_error") == false) { ! die("MySQL support is not available in your version of PHP. To use the openFIRST Web Portal Software, please either enable MySQL support, or choose another database type."); } - // if($linkidentifier != "") { return(mysql_error($connections[$ID]['conn'])); - /* } else { - return(mysql_error()); - }*/ } elseif ($dbasetype == "mssql") { if(function_exists("mssql_connect") == false) { ! die("Microsoft SQL support is not available in your version of PHP. To use the openFIRST Web Portal Software, please either enable Microsoft SQL support, or choose another database type."); } return(0); } elseif ($dbasetype == "odbc") { if(function_exists("odbc_errormsg") == false) { ! die("ODBC support is not available in your version of PHP. To use the openFIRST Web Portal Software, please either enable ODBC support, or choose another database type."); } - // if($linkidentifier != "") { return(odbc_errormsg($connections[$ID]['conn'])); - /* } else { - return(odbc_errormsg()); - }*/ } exit(0); --- 190,215 ---- global $connections, $dbasetype, $peardb; if($peardb) { ! if (DB::isError($connections[$ID]['dbms'])) { ! return DB::errorMessage($connections[$ID]['dbms']).' (in DBMS object)'; ! } elseif (DB::isError($connections[$ID]['conn'])) { ! return DB::errorMessage($connections[$ID]['conn']).' (in Connection object)'; ! } elseif (DB::isError($connections[$ID]['res'])) { ! return DB::errorMessage($connections[$ID]['res']).' (in Result object)'; ! } } elseif($dbasetype == "mysql") { if(function_exists("mysql_error") == false) { ! die("MySQL support is not available in your version of PHP. To use the openFIRST Web Portal Software, please either enable MySQL support, or choose another database type. (mysql_error)"); } return(mysql_error($connections[$ID]['conn'])); } elseif ($dbasetype == "mssql") { if(function_exists("mssql_connect") == false) { ! die("Microsoft SQL support is not available in your version of PHP. To use the openFIRST Web Portal Software, please either enable Microsoft SQL support, or choose another database type. (mssql_connect)"); } return(0); } elseif ($dbasetype == "odbc") { if(function_exists("odbc_errormsg") == false) { ! die("ODBC support is not available in your version of PHP. To use the openFIRST Web Portal Software, please either enable ODBC support, or choose another database type. (odbc_errormsg)"); } return(odbc_errormsg($connections[$ID]['conn'])); } exit(0); *************** *** 179,219 **** function ofirst_dbquery($string, $ID = 0, $batchsize = "") { ! global $connections, $dbasetype, $peardb, $sqlconnection, $lastquery; ! $lastquery = "ofirst_dbquery(): \$string = \"$string\", \$linkidentifier = \"$linkidentifier\", \$batchsize = \"$batchsize\""; if($peardb) { if($batchsize != "") { ! return($sqlconnection->query($string, $connections[$ID]['conn'], $batchsize)); ! } else/*if($linkidentifier != "")*/ { ! return($sqlconnection->query($string, $connections[$ID]['conn'])); ! }/* else { ! return($sqlconnection->query($string)); ! }*/ } elseif($dbasetype == "mysql") { if(function_exists("mysql_query") == false) { ! die("MySQL support is not available in your version of PHP. To use the openFIRST Web Portal Software, please either enable MySQL support, or choose another database type."); } ! // if($linkidentifier != "") { ! return(mysql_query($string, $connections[$ID]['conn'])); ! /* } else { ! return(mysql_query($string)); ! }*/ } elseif($dbasetype == "mssql") { if(function_exists("mssql_query") == false) { ! die("Microsoft SQL support is not available in your version of PHP. To use the openFIRST Web Portal Software, please either enable Microsoft SQL support, or choose another database type."); } if($batchsize != "") { ! return(mssql_query($string, $connections[$ID]['conn'], $batchsize)); ! } else/*if($linkidentifier != "")*/ { ! return(mssql_query($string, $connections[$ID]['conn'])); ! }/* else { ! return(mssql_query($string)); ! }*/ } elseif ($dbasetype == "odbc") { if(function_exists("odbc_exec") == false) { ! die("ODBC support is not available in your version of PHP. To use the openFIRST Web Portal Software, please either enable ODBC support, or choose another database type."); } // Note: this may be misleading, the variable names are not reflective of their content in this particular line, as the odbc function uses an order different from the other databases. ! return(odbc_exec($string, $connections[$ID]['conn'])); } exit(0); --- 217,260 ---- function ofirst_dbquery($string, $ID = 0, $batchsize = "") { ! global $connections, $dbasetype, $peardb, $lastquery; ! $lastquery = "ofirst_dbquery(): \$string = \"$string\", \$ID = \"$ID\", \$batchsize = \"$batchsize\""; if($peardb) { + if ($connections[$ID]['res'] !== null) { + $connections[$ID]['res']->free(); + } + $connections[$ID]['res'] = null; + if (DB::isError($connections[$ID]['conn'])) { + die('DB Error: '.ofirst_dberror().' ('.ofirst_dberrno().')'); + } if($batchsize != "") { ! $connections[$ID]['res'] =& $connections[$ID]['conn']->query($string, $connections[$ID]['conn'], $batchsize); ! } else { ! $connections[$ID]['res'] =& $connections[$ID]['conn']->query($string, $connections[$ID]['conn']); ! } ! return $ID; } elseif($dbasetype == "mysql") { if(function_exists("mysql_query") == false) { ! die("MySQL support is not available in your version of PHP. To use the openFIRST Web Portal Software, please either enable MySQL support, or choose another database type. (mysql_query)"); } ! $connections[$ID]['res'] = mysql_query($string, $connections[$ID]['conn']); ! return $ID; } elseif($dbasetype == "mssql") { if(function_exists("mssql_query") == false) { ! die("Microsoft SQL support is not available in your version of PHP. To use the openFIRST Web Portal Software, please either enable Microsoft SQL support, or choose another database type. (mssql_query)"); } if($batchsize != "") { ! $connections[$ID]['res'] = mssql_query($string, $connections[$ID]['conn'], $batchsize); ! } else { ! $connections[$ID]['res'] = mssql_query($string, $connections[$ID]['conn']); ! } ! return $ID; } elseif ($dbasetype == "odbc") { if(function_exists("odbc_exec") == false) { ! die("ODBC support is not available in your version of PHP. To use the openFIRST Web Portal Software, please either enable ODBC support, or choose another database type. (odbc_exec)"); } // Note: this may be misleading, the variable names are not reflective of their content in this particular line, as the odbc function uses an order different from the other databases. ! $connections[$ID]['res'] = odbc_exec($connections[$ID]['conn'], $string); ! return $ID; } exit(0); *************** *** 222,253 **** #FIXME: Make associative arrays #FIXME: Use $connections[$ID]['res'] ! function ofirst_dbfetch_object($resource, $rownumber = "", $ID = 0) { global $connections, $dbasetype, $peardb; if($peardb) { if($rownumber != "") { ! return(DB_FETCHMODE_OBJECT($resource, $rownumber)); } else { ! return(DB_FETCHMODE_OBJECT($resource)); } } elseif($dbasetype == "mysql") { if(function_exists("mysql_fetch_object") == false) { ! die("MySQL support is not available in your version of PHP. To use the openFIRST Web Portal Software, please either enable MySQL support, or choose another database type."); } ! return(mysql_fetch_object($resource)); } elseif($dbasetype == "mssql") { if(function_exists("mssql_fetch_object") == false) { ! die("Microsoft SQL support is not available in your version of PHP. To use the openFIRST Web Portal Software, please either enable Microsoft SQL support, or choose another database type."); } ! return(mssql_fetch_object($resource)); } elseif($dbasetype == "odbc") { if(function_exists("odbc_fetch_object") == false) { ! die("ODBC support is not available in your version of PHP. To use the openFIRST Web Portal Software, please either enable ODBC support, or choose another database type."); ! ! } if($rownumber != "") { ! return(odbc_fetch_object($resource, $rownumber)); } else { ! return(odbc_fetch_object($resource)); } } --- 263,293 ---- #FIXME: Make associative arrays #FIXME: Use $connections[$ID]['res'] ! function ofirst_dbfetch_object($ID = 0, $rownumber = "") { global $connections, $dbasetype, $peardb; if($peardb) { if($rownumber != "") { ! return($connections[$ID]['res']->fetchRow($rownumber)); } else { ! return($connections[$ID]['res']->fetchRow()); } } elseif($dbasetype == "mysql") { if(function_exists("mysql_fetch_object") == false) { ! die("MySQL support is not available in your version of PHP. To use the openFIRST Web Portal Software, please either enable MySQL support, or choose another database type. (mysql_fetch_object)"); } ! return(mysql_fetch_object($connections[$ID]['res'])); } elseif($dbasetype == "mssql") { if(function_exists("mssql_fetch_object") == false) { ! die("Microsoft SQL support is not available in your version of PHP. To use the openFIRST Web Portal Software, please either enable Microsoft SQL support, or choose another database type. (mssql_fetch_object)"); } ! return(mssql_fetch_object($connections[$ID]['res'])); } elseif($dbasetype == "odbc") { if(function_exists("odbc_fetch_object") == false) { ! die("ODBC support is not available in your version of PHP. To use the openFIRST Web Portal Software, please either enable ODBC support, or choose another database type. (odbc_fetch_object)"); ! } if($rownumber != "") { ! return(odbc_fetch_object($connections[$ID]['res'], $rownumber)); } else { ! return(odbc_fetch_object($connections[$ID]['res'])); } } *************** *** 257,284 **** #FIXME: Use $connections[$ID]['res'] ! function ofirst_dbnum_rows($resource) { global $connections, $dbasetype, $peardb; if($peardb) { ! if($resource != "") { ! return(DB_result::numRows($resource)); ! } else { ! return(DB_result::numRows()); ! } } elseif($dbasetype == "mysql") { if(function_exists("mysql_num_rows") == false) { ! die("MySQL support is not available in your version of PHP. To use the openFIRST Web Portal Software, please either enable MySQL support, or choose another database type."); } ! return(mysql_num_rows($resource)); } elseif($dbasetype == "mssql") { if(function_exists("mssql_num_rows") == false) { ! die("Microsoft SQL support is not available in your version of PHP. To use the openFIRST Web Portal Software, please either enable Microsoft SQL support, or choose another database type."); } ! return(mssql_num_rows($resource)); } elseif($dbasetype == "odbc") { if(function_exists("odbc_num_rows") == false) { ! die("ODBC support is not available in your version of PHP. To use the openFIRST Web Portal Software, please either enable ODBC support, or choose another database type."); } ! if($resource != "") { ! return(odbc_num_rows($resource)); } else { return(odbc_num_rows()); --- 297,320 ---- #FIXME: Use $connections[$ID]['res'] ! function ofirst_dbnum_rows($ID = 0) { global $connections, $dbasetype, $peardb; if($peardb) { ! return($connections[$ID]['res']->numRows()); } elseif($dbasetype == "mysql") { if(function_exists("mysql_num_rows") == false) { ! die("MySQL support is not available in your version of PHP. To use the openFIRST Web Portal Software, please either enable MySQL support, or choose another database type. (mysql_num_rows)"); } ! return(mysql_num_rows($connections[$ID]['res'])); } elseif($dbasetype == "mssql") { if(function_exists("mssql_num_rows") == false) { ! die("Microsoft SQL support is not available in your version of PHP. To use the openFIRST Web Portal Software, please either enable Microsoft SQL support, or choose another database type. (mssql_num_rows)"); } ! return(mssql_num_rows($connections[$ID]['res'])); } elseif($dbasetype == "odbc") { if(function_exists("odbc_num_rows") == false) { ! die("ODBC support is not available in your version of PHP. To use the openFIRST Web Portal Software, please either enable ODBC support, or choose another database type. (odbc_num_rows)"); } ! if($connections[$ID]['res'] != "") { ! return(odbc_num_rows($connections[$ID]['res'])); } else { return(odbc_num_rows()); *************** *** 291,297 **** global $connections, $dbasetype, $peardb; if($peardb) { ! return "PEAR DB"; } elseif($dbasetype == "mysql") { ! $v = ofirst_dbfetch_object(ofirst_dbquery("SELECT VERSION() AS mysql_version")); return "MySQL $v->mysql_version"; } elseif($dbasetype == "mssql") { --- 327,333 ---- global $connections, $dbasetype, $peardb; if($peardb) { ! return 'PEAR DB (API version '.$connections[$ID]['conn']->apiVersion().')'; } elseif($dbasetype == "mysql") { ! $v = ofirst_dbfetch_object(ofirst_dbquery("SELECT VERSION() AS mysql_version", $ID)); return "MySQL $v->mysql_version"; } elseif($dbasetype == "mssql") { *************** *** 309,319 **** if($dbasetype == "mysql") { $dbsize = 0; ! $dq = ofirst_dbquery("SHOW TABLE STATUS FROM " $connections[$ID]['db'], 0); ! while($d = ofirst_dbfetch_object($dq)) { $dbsize += $d->Data_length + $d->Index_length; } return (int) (($dbsize + 0.5) / 1024 * 10) / 10 . " KB"; } elseif($dbasetype == "mssql") { ! $s = ofirst_dbfetch_object(ofirst_dbquery("SELECT ((SUM(size) * 8.0) * 1024.0) as dbsize FROM sysfiles", 0)); return (int) (( $s->dbsize + 0.5) / 1024 * 10) / 10 . " KB"; } else { --- 345,356 ---- if($dbasetype == "mysql") { $dbsize = 0; ! ofirst_dbquery("SHOW TABLE STATUS FROM ".$connections[$ID]['db'], $ID); ! while($d = ofirst_dbfetch_object($ID)) { $dbsize += $d->Data_length + $d->Index_length; } return (int) (($dbsize + 0.5) / 1024 * 10) / 10 . " KB"; } elseif($dbasetype == "mssql") { ! ofirst_dbquery("SELECT ((SUM(size) * 8.0) * 1024.0) as dbsize FROM sysfiles", $ID); ! $s = ofirst_dbfetch_object($ID); return (int) (( $s->dbsize + 0.5) / 1024 * 10) / 10 . " KB"; } else { *************** *** 321,323 **** --- 358,414 ---- } } + + function ofirst_dbcreate($server, $user, $password, $database) { + ofirst_dbconnect("$sqlserver","$sqluser","$sqlpassword"); + #TODO: Rewrite this so that we can do it in PEAR + if (!ofirst_select_db($sqldatabase)) { + /* Create database if it does not already exist */ + ofirst_dbquery("CREATE DATABASE IF NOT EXISTS $sqldatabase;"); + } + ofirst_select_db($sqldatabase); + ofirst_dbdisconnect(); + } + + function ofirst_dbclean_up() { + global $connections; + foreach ($connections as $key => $connect) { + ofirst_dbdisconnect($key); + } + } + + function ofirst_dbfree_result($ID = 0) { + global $connections, $dbasetype, $peardb; + if($peardb) { + if (method_exists($connections[$ID]['res'], 'free')) { + $connections[$ID]['res']->free(); + } + $connections[$ID]['res'] = null; + } elseif($dbasetype == "mysql") { + if(function_exists("mysql_num_rows") == false) { + die("MySQL support is not available in your version of PHP. To use the openFIRST Web Portal Software, please either enable MySQL support, or choose another database type. (mysql_num_rows)"); + } + return(mysql_num_rows($connections[$ID]['res'])); + } elseif($dbasetype == "mssql") { + if(function_exists("mssql_num_rows") == false) { + die("Microsoft SQL support is not available in your version of PHP. To use the openFIRST Web Portal Software, please either enable Microsoft SQL support, or choose another database type. (mssql_num_rows)"); + } + return(mssql_num_rows($connections[$ID]['res'])); + } elseif($dbasetype == "odbc") { + if(function_exists("odbc_free_result") == false) { + die("ODBC support is not available in your version of PHP. To use the openFIRST Web Portal Software, please either enable ODBC support, or choose another database type. (odbc_free_result)"); + } + if($connections[$ID]['res'] !== null) { + if (odbc_free_result($connections[$ID]['res'])) { + $connections[$ID]['res'] = null; + return true; + } else { + return false; + } + } else { + return(odbc_num_rows()); + } + } + exit(0); + } + ?> Index: globals.tpl =================================================================== RCS file: /cvsroot/openfirst/base/config/globals.tpl,v retrieving revision 1.2.2.2 retrieving revision 1.2.2.3 diff -C2 -d -r1.2.2.2 -r1.2.2.3 *** globals.tpl 7 Jan 2005 20:30:35 -0000 1.2.2.2 --- globals.tpl 13 Mar 2005 01:19:58 -0000 1.2.2.3 *************** *** 31,35 **** $sqlconnection = ofirst_dbconnect("$sqlserver","$sqluser","$sqlpassword"); ! ofirst_select_db($sqldatabase); $pass_save_disabled=%COOKIE%; --- 31,37 ---- $sqlconnection = ofirst_dbconnect("$sqlserver","$sqluser","$sqlpassword"); ! if (!ofirst_select_db($sqldatabase)) { ! die('Unable to connect to the database and/or select table. The error was: '.ofirst_dberror(0).' ('.ofirst_dberrno(0).')'); ! } $pass_save_disabled=%COOKIE%; *************** *** 53,65 **** 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(); --- 55,67 ---- if(function_exists("glob")) { // Include the functions using glob(); ! // if(is_readable("$fbasepath/config/functions/")) { ! foreach (glob("$fbasepath/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(); Index: globals.php =================================================================== RCS file: /cvsroot/openfirst/base/config/globals.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** globals.php 7 Jan 2005 20:28:25 -0000 1.4 --- globals.php 13 Mar 2005 01:19:58 -0000 1.5 *************** *** 1,115 **** <?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 = %DBTYPE%; ! $peardb = %PEAR%; ! $ostype = %OS%; ! 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 = %ENCRYPT%; ! ! $title = %TITLE%; ! $version = %VER%; ! $sqlserver = %DBSERVER%; ! $sqluser = %DBUSER%; ! $sqlpassword = %DBPASS%; ! $sqldatabase = %DBNAME%; ! 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"); ! ofirst_select_db($sqldatabase); ! ! $pass_save_disabled=%COOKIE%; ! $regenabled=%REG%; ! $home = %HOME%; ! $header = %HEADER%; ! $footer = %FOOTER%; ! $mailnotify = %MASTERMAIL%; ! $mailfrom = %BOTMAIL%; ! $basepath = %BASEPATH%; ! $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"); } ! ?> \ No newline at end of file |
From: Astronouth7303 <ast...@us...> - 2005-03-13 01:20:10
|
Update of /cvsroot/openfirst/base/config/functions In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9875/config/functions Modified Files: debug.php Log Message: Last PEAR commit for now Index: debug.php =================================================================== RCS file: /cvsroot/openfirst/base/config/functions/debug.php,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** debug.php 28 Dec 2004 18:28:35 -0000 1.10 --- debug.php 13 Mar 2005 01:19:58 -0000 1.11 *************** *** 31,34 **** --- 31,35 ---- set_error_handler("ofirst_error_handler"); + $NO_ADD_BUG = TRUE; // Handles errors by displaying a message and contacting openFIRST *************** *** 36,39 **** --- 37,41 ---- function ofirst_error_handler($errno,$error,$file,$line) { global $dbasetype, $ostype, $sqlserver, $currentmodule, $user, $mailnotify, $mailfrom, $lastquery; + global $NO_ADD_BUG; $dberrno = ofirst_dberrno(); *************** *** 50,53 **** --- 52,56 ---- Current Module: $currentmodule Error Number: $errno"; + $specifics = "PHP_SELF: " . $_SERVER["PHP_SELF"] . " HTTP Host: " . $_SERVER["HTTP_HOST"] . " *************** *** 56,65 **** User (if exists): $user->user User Access Level: $user->membertype ! Error Description: $error in $file on line $line" . (($dberrno <> 0) ? "" : (" DB Error Number: $dberrno DB Error: " . ofirst_dberror() . " Last Query: $lastquery")); ! // Notify the appropriate local contact mail($mailnotify, "$error in $file on line $line", "Error Description: $error in $file on line $line --- 59,79 ---- User (if exists): $user->user User Access Level: $user->membertype ! Error Description: $error in $file on line $line" . (($dberrno != 0) ? "" : (" DB Error Number: $dberrno DB Error: " . ofirst_dberror() . " Last Query: $lastquery")); ! #var_dump($NO_ADD_BUG); ! if ($NO_ADD_BUG) ! { ! if ($errno == 2) return; ! echo "<br /><b>Error:</b><blockquote>"; ! echo "<b>Details:</b><pre>"; ! echo $details; ! echo "</pre><b>Specifics:</b><pre>"; ! echo $specifics; ! echo "</pre></blockquote>"; ! } else { ! // Notify the appropriate local contact mail($mailnotify, "$error in $file on line $line", "Error Description: $error in $file on line $line *************** *** 74,78 **** "&uri=" . urlencode($_SERVER["HTTP_HOST"] . $_SERVER["SCRIPT_NAME"]). "&details=".urlencode($details). ! "&specifics=".urlencode($specifics), "r"); if(! $bugzilla) { --- 88,93 ---- "&uri=" . urlencode($_SERVER["HTTP_HOST"] . $_SERVER["SCRIPT_NAME"]). "&details=".urlencode($details). ! "&specifics=".urlencode($specifics) . ! ($NO_ADD_BUG ? "&no-commit=true" : ""), "r"); if(! $bugzilla) { *************** *** 94,97 **** --- 109,113 ---- } } + } } ?> |
From: <bug...@we...> - 2005-03-05 03:07:48
|
http://bugzilla.openfirst.org/show_bug.cgi?id=242 ti...@op... changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Platform| |All Resolution| |INVALID ------- Additional Comments From ti...@op... 2005-03-04 21:07 ------- Insufficient information. No md5sum or version information provided. ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. You reported the bug, or are watching the reporter. |
From: <bug...@we...> - 2005-02-26 21:02:29
|
http://bugzilla.openfirst.org/show_bug.cgi?id=232 ti...@op... changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Platform| |All Resolution| |INVALID Summary|Automated Bug Report - poll |Undefined property: | |usertype in | |poll/admin/add.php (which | |doesn't exist as a file in | |CVS) ------- Additional Comments From ti...@op... 2005-02-26 06:48 ------- Mark as invalid since there is no poll/admin/add.php in CVS. ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. You reported the bug, or are watching the reporter. |