openfirst-cvscommit Mailing List for openFIRST (Page 83)
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: <xt...@us...> - 2003-08-26 03:28:35
|
Update of /cvsroot/openfirst/photogallery In directory sc8-pr-cvs1:/tmp/cvs-serv27781 Modified Files: index.php Log Message: Force colours upon the main page that make it readable (where background was explicitly set). Index: index.php =================================================================== RCS file: /cvsroot/openfirst/photogallery/index.php,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** index.php 23 Aug 2003 20:32:49 -0000 1.7 --- index.php 26 Aug 2003 03:28:22 -0000 1.8 *************** *** 50,56 **** ?> ! <tr onMouseOver="this.style.backgroundColor='#cccccc'" onMouseOut="this.style.backgroundColor='#ffffff'" bgcolor="#ffffff"> ! <td width="61"><div align="center"><a href="gallery.php?ID=<?php echo $gallery->ID; ?>"><img src="gallery.PNG" border="0"></a></div></td> ! <td width="147"><a href='gallery.php?ID=<?php echo $gallery->ID; ?>'><?php echo $gallery->GalleryName; ?></a></td> <td width="297"><?php echo $gallery->Description; ?></td> <td width="176"><?php echo date("F j, Y, g:i a",$gallery->Dates); ?></td> --- 50,56 ---- ?> ! <tr onMouseOver="this.style.backgroundColor='#cccccc'" onMouseOut="this.style.backgroundColor='#ffffff'" bgcolor="#ffffff" style="color: #000000;"> ! <td width="61"><div align="center"><a href="gallery.php?ID=<?php echo $gallery->ID; ?>" style="color: #000000;"><img src="gallery.PNG" border="0"></a></div></td> ! <td width="147"><a href='gallery.php?ID=<?php echo $gallery->ID; ?>' style="color: #000000;"><?php echo $gallery->GalleryName; ?></a></td> <td width="297"><?php echo $gallery->Description; ?></td> <td width="176"><?php echo date("F j, Y, g:i a",$gallery->Dates); ?></td> |
From: <xt...@us...> - 2003-08-26 03:23:08
|
Update of /cvsroot/openfirst/photogallery/admin In directory sc8-pr-cvs1:/tmp/cvs-serv27259 Modified Files: makethumb.php Log Message: Add some friendly error trapping for systems without the GD libraries Index: makethumb.php =================================================================== RCS file: /cvsroot/openfirst/photogallery/admin/makethumb.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** makethumb.php 23 Aug 2003 20:32:49 -0000 1.5 --- makethumb.php 26 Aug 2003 03:22:54 -0000 1.6 *************** *** 36,39 **** --- 36,45 ---- if (isset($user->user)){ + if(function_exists("gd_info") == false) { + echo("<p>Cannot create thumbnails because your version of PHP was not compiled with GD support. + [ <a href='index.php'>Manage</a> ]</p>"); + die(include($footer)); + } + $query = ofirst_dbquery("SELECT * FROM ofirst_photogallery_galleries WHERE ID = '".$_GET['ID']."'") or die(ofirst_dberror()); $gallery = ofirst_dbfetch_object($query); *************** *** 65,67 **** } include($footer); ! ?> \ No newline at end of file --- 71,73 ---- } include($footer); ! ?> |
From: <xt...@us...> - 2003-08-26 02:14:05
|
Update of /cvsroot/openfirst/photogallery/setup In directory sc8-pr-cvs1:/tmp/cvs-serv20047 Modified Files: setup.mssql setup.mysql Log Message: Fix older installs, updating them to have dates in the proper era Index: setup.mssql =================================================================== RCS file: /cvsroot/openfirst/photogallery/setup/setup.mssql,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** setup.mssql 23 Aug 2003 20:32:49 -0000 1.1 --- setup.mssql 24 Aug 2003 15:43:19 -0000 1.2 *************** *** 2,4 **** CREATE TABLE `ofirst_photogallery_comments` (`ID` tinyint(3) unsigned NOT NULL auto_increment,`Image` tinytext,`Gallery` tinytext,`Author` tinytext,`EMail` tinytext,`Comment` text,`Dates` text, PRIMARY KEY (`ID`)) TYPE=MyISAM; CREATE TABLE `ofirst_photogallery_image` (`ID` tinyint(3) unsigned NOT NULL auto_increment,`Image` tinytext,`Gallery` tinytext,`ImageName` tinytext,`Description` tinytext,`Comment` text,`Dates` text, PRIMARY KEY (`ID`)) TYPE=MyISAM; ! INSERT INTO ofirst_config SET includes='photogallery.php',modulename='photogallery',showonmenu='0',active='0',adminnavigation='<a href="$basepath/photogallery/admin/">Gallery Manager</a> | <a href="$basepath/photogallery/admin/newgallery.php">New Gallery</a>',modulenavigation='<a href="$basepath/photogallery/">View Gallery</a>'; \ No newline at end of file --- 2,5 ---- CREATE TABLE `ofirst_photogallery_comments` (`ID` tinyint(3) unsigned NOT NULL auto_increment,`Image` tinytext,`Gallery` tinytext,`Author` tinytext,`EMail` tinytext,`Comment` text,`Dates` text, PRIMARY KEY (`ID`)) TYPE=MyISAM; CREATE TABLE `ofirst_photogallery_image` (`ID` tinyint(3) unsigned NOT NULL auto_increment,`Image` tinytext,`Gallery` tinytext,`ImageName` tinytext,`Description` tinytext,`Comment` text,`Dates` text, PRIMARY KEY (`ID`)) TYPE=MyISAM; ! INSERT INTO ofirst_config SET includes='photogallery.php',modulename='photogallery',showonmenu='0',active='0',adminnavigation='<a href="$basepath/photogallery/admin/">Gallery Manager</a> | <a href="$basepath/photogallery/admin/newgallery.php">New Gallery</a>',modulenavigation='<a href="$basepath/photogallery/">View Gallery</a>'; ! ALTER TABLE ofirst_photogallery_galleries CHANGE Dates Dates TEXT; Index: setup.mysql =================================================================== RCS file: /cvsroot/openfirst/photogallery/setup/setup.mysql,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** setup.mysql 21 Aug 2003 17:55:56 -0000 1.10 --- setup.mysql 24 Aug 2003 15:43:19 -0000 1.11 *************** *** 2,4 **** CREATE TABLE `ofirst_photogallery_comments` (`ID` tinyint(3) unsigned NOT NULL auto_increment,`Image` tinytext,`Gallery` tinytext,`Author` tinytext,`EMail` tinytext,`Comment` text,`Dates` text, PRIMARY KEY (`ID`)) TYPE=MyISAM; CREATE TABLE `ofirst_photogallery_image` (`ID` tinyint(3) unsigned NOT NULL auto_increment,`Image` tinytext,`Gallery` tinytext,`ImageName` tinytext,`Description` tinytext,`Comment` text,`Dates` text, PRIMARY KEY (`ID`)) TYPE=MyISAM; ! INSERT INTO ofirst_config SET includes='photogallery.php',modulename='photogallery',showonmenu='0',active='0',adminnavigation='<a href="$basepath/photogallery/admin/">Gallery Manager</a> | <a href="$basepath/photogallery/admin/newgallery.php">New Gallery</a>',modulenavigation='<a href="$basepath/photogallery/">View Gallery</a>'; \ No newline at end of file --- 2,5 ---- CREATE TABLE `ofirst_photogallery_comments` (`ID` tinyint(3) unsigned NOT NULL auto_increment,`Image` tinytext,`Gallery` tinytext,`Author` tinytext,`EMail` tinytext,`Comment` text,`Dates` text, PRIMARY KEY (`ID`)) TYPE=MyISAM; CREATE TABLE `ofirst_photogallery_image` (`ID` tinyint(3) unsigned NOT NULL auto_increment,`Image` tinytext,`Gallery` tinytext,`ImageName` tinytext,`Description` tinytext,`Comment` text,`Dates` text, PRIMARY KEY (`ID`)) TYPE=MyISAM; ! INSERT INTO ofirst_config SET includes='photogallery.php',modulename='photogallery',showonmenu='0',active='0',adminnavigation='<a href="$basepath/photogallery/admin/">Gallery Manager</a> | <a href="$basepath/photogallery/admin/newgallery.php">New Gallery</a>',modulenavigation='<a href="$basepath/photogallery/">View Gallery</a>'; ! ALTER TABLE ofirst_photogallery_galleries CHANGE Dates Dates TEXT; |
From: <xt...@us...> - 2003-08-25 23:25:35
|
Update of /cvsroot/openfirst/messenger In directory sc8-pr-cvs1:/tmp/cvs-serv21902 Modified Files: messenger.php Log Message: Ensure that message is always readable by forcing on certain colours Index: messenger.php =================================================================== RCS file: /cvsroot/openfirst/messenger/messenger.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** messenger.php 23 Aug 2003 20:31:57 -0000 1.6 --- messenger.php 25 Aug 2003 16:50:02 -0000 1.7 *************** *** 84,94 **** <table style="position: absolute; left: 32px; top: 163px; width: 384px; height: 19px" width="400"> <tr> ! <th>Private Messaging System Alert</th> </tr> <tr> ! <td height="25" bgcolor="#FFFFFF"><img src="<?php echo $basepath; ?>/messenger/msg.png" alt="New Message"> <br> <center>You have <b><?php echo $messages; ?></b> new Messages(s) in your visitor ! inbox!<br><br>[ <a href="<?php echo $basepath; ?>/messenger/inbox.php">Visitor Inbox</a> ]<br><br></p></center></td> </tr> </table> --- 84,96 ---- <table style="position: absolute; left: 32px; top: 163px; width: 384px; height: 19px" width="400"> <tr> ! <th style="background-color: #cccccc; color: #000000;">Private ! Messaging System Alert</th> </tr> <tr> ! <td height="25" style="background-color: #ffffff; color: #000000;" ! ><img src="<?php echo $basepath; ?>/messenger/msg.png" alt="New Message"> <br> <center>You have <b><?php echo $messages; ?></b> new Messages(s) in your visitor ! inbox!<br><br>[ <a href="<?php echo $basepath; ?>/messenger/inbox.php" style="color: #000000;">Visitor Inbox</a> ]<br><br></p></center></td> </tr> </table> *************** *** 96,98 **** } } ! ?> \ No newline at end of file --- 98,100 ---- } } ! ?> |
From: <xt...@us...> - 2003-08-25 01:56:20
|
Update of /cvsroot/openfirst/photogallery/admin In directory sc8-pr-cvs1:/tmp/cvs-serv18835 Modified Files: newgallery.php Log Message: Fix two broken links. Index: newgallery.php =================================================================== RCS file: /cvsroot/openfirst/photogallery/admin/newgallery.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** newgallery.php 23 Aug 2003 20:32:49 -0000 1.6 --- newgallery.php 24 Aug 2003 15:34:47 -0000 1.7 *************** *** 40,46 **** if(isset($_POST['create'])){ ! mkdir("../".$gallerydir.$_POST['galleryname'],0777) or die("<br><br><center>Can't create folder! [ <a href='manage.php'>Manage</a> ]"); ! mkdir("../".$gallerydir.$_POST['galleryname']."/thumbs",0777) or die("<br><br><center>Can't create folder! [ <a href='manage.php'>Manage</a> ]"); ofirst_dbquery("INSERT INTO ofirst_photogallery_galleries (GalleryName, Author, Dates, Description) values( '".$_POST['galleryname']."', '".$user->user."', '".time()."', --- 40,47 ---- if(isset($_POST['create'])){ ! mkdir("../".$gallerydir.$_POST['galleryname'],0777) or die("<br><br><center>Can't create folder! [ <a href='index.php'>Manage</a> ]"); ! mkdir("../".$gallerydir.$_POST['galleryname']."/thumbs",0777) or die("<br><br><center>Can't create folder! [ <a href='index.php'>Manage</a> ]"); + echo time(); ofirst_dbquery("INSERT INTO ofirst_photogallery_galleries (GalleryName, Author, Dates, Description) values( '".$_POST['galleryname']."', '".$user->user."', '".time()."', |
From: <xt...@us...> - 2003-08-24 18:51:07
|
Update of /cvsroot/openfirst/base/config In directory sc8-pr-cvs1:/tmp/cvs-serv17367 Modified Files: dbase.php first.php Log Message: Add ODBC functionality Index: dbase.php =================================================================== RCS file: /cvsroot/openfirst/base/config/dbase.php,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** dbase.php 24 Aug 2003 15:01:12 -0000 1.7 --- dbase.php 24 Aug 2003 18:51:04 -0000 1.8 *************** *** 52,55 **** --- 52,64 ---- } return(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 != "") { + return(odbc_connect($server, $username, $password, $newlink)); + } else { + return(odbc_connect($server, $username, $password)); + } } exit; *************** *** 96,99 **** --- 105,117 ---- } 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($linkidentifier)); + } else { + return(odbc_error()); + } } exit; *************** *** 116,119 **** --- 134,146 ---- } 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($linkidentifer)); + } else { + return(odbc_errormsg()); + } } exit; *************** *** 142,150 **** return(mssql_query($string)); } } exit(0); } ! function ofirst_dbfetch_object($resource) { global $dbasetype; if($dbasetype == "mysql") { --- 169,183 ---- 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, $linkidentifer)); } exit(0); } ! function ofirst_dbfetch_object($resource, $rownumber = "") { global $dbasetype; if($dbasetype == "mysql") { *************** *** 158,161 **** --- 191,203 ---- } 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)); + } } *************** *** 175,180 **** } return(mssql_num_rows($resource)); } - exit(0); } --- 217,230 ---- } 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()); + } } exit(0); } Index: first.php =================================================================== RCS file: /cvsroot/openfirst/base/config/first.php,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** first.php 24 Aug 2003 15:22:40 -0000 1.21 --- first.php 24 Aug 2003 18:51:04 -0000 1.22 *************** *** 206,209 **** --- 206,210 ---- <option value="mysql" selected="selected">MySQL</option> <option value="mssql">Microsoft SQL</option> + <option value="odbc">ODBC</option> </select> <tr><td>Title of Software</td><td><input type="text" name="title" value="openFIRST" /></td></tr> |
From: <xt...@us...> - 2003-08-24 15:22:43
|
Update of /cvsroot/openfirst/base/config In directory sc8-pr-cvs1:/tmp/cvs-serv17137 Modified Files: first.php Log Message: Add selecting database to globals.php (where it should be, anyway) instead of relying on auth.php to handle this. Index: first.php =================================================================== RCS file: /cvsroot/openfirst/base/config/first.php,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** first.php 23 Aug 2003 19:54:34 -0000 1.20 --- first.php 24 Aug 2003 15:22:40 -0000 1.21 *************** *** 70,73 **** --- 70,74 ---- } \$sqlconnection = ofirst_dbconnect(\"\$sqlserver\",\"\$sqluser\",\"\$sqlpassword\"); + ofirst_select_db(\$sqldatabase); \$home = '" . $_POST["home"] . "'; |
From: <xt...@us...> - 2003-08-24 15:03:49
|
Update of /cvsroot/openfirst/base/config In directory sc8-pr-cvs1:/tmp/cvs-serv14109 Modified Files: dbase.php Log Message: Fix silly recursive errors causing many problems. Index: dbase.php =================================================================== RCS file: /cvsroot/openfirst/base/config/dbase.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** dbase.php 24 Aug 2003 03:49:10 -0000 1.6 --- dbase.php 24 Aug 2003 15:01:12 -0000 1.7 *************** *** 1,5 **** <?php /* ! * openFIRST.base - config/functions/dbase.php * * Copyright (C) 2003, --- 1,5 ---- <?php /* ! * openFIRST.base - config/dbase.php * * Copyright (C) 2003, *************** *** 72,78 **** } if($linkidentifier != "") { ! return(mysql_select_db($databasename, $linkidentifier)); } else { ! return(mysql_select_db($databasename)); } } --- 72,78 ---- } if($linkidentifier != "") { ! return(mssql_select_db($databasename, $linkidentifier)); } else { ! return(mssql_select_db($databasename)); } } *************** *** 103,113 **** global $dbasetype; if($dbasetype == "mysql") { ! if(function_exists("ofirst_dberror") == 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(ofirst_dberror($linkidentifier)); } else { ! return(ofirst_dberror()); } } elseif ($dbasetype == "mssql") { --- 103,113 ---- global $dbasetype; 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."); } if($linkidentifier != "") { ! return(mysql_error($linkidentifier)); } else { ! return(mysql_error()); } } elseif ($dbasetype == "mssql") { *************** *** 154,158 **** return(mysql_fetch_object($resource)); } 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."); } --- 154,158 ---- 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."); } *************** *** 166,170 **** global $dbasetype; if($dbasetype == "mysql") { ! if(function_exists("ofirst_dbnum_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."); } --- 166,170 ---- global $dbasetype; 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."); } |
From: <xt...@us...> - 2003-08-24 03:49:15
|
Update of /cvsroot/openfirst/base/config In directory sc8-pr-cvs1:/tmp/cvs-serv570 Modified Files: dbase.php Log Message: Make wrapper function not call itself for the functionality that it should use MySQL for (sheesh, that was a bad bug to catch) Index: dbase.php =================================================================== RCS file: /cvsroot/openfirst/base/config/dbase.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** dbase.php 24 Aug 2003 03:06:50 -0000 1.5 --- dbase.php 24 Aug 2003 03:49:10 -0000 1.6 *************** *** 169,173 **** 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(ofirst_dbnum_rows($resource)); } elseif($dbasetype == "mssql") { if(function_exists("mssql_num_rows") == false) { --- 169,173 ---- 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) { |
From: <xt...@us...> - 2003-08-24 03:06:54
|
Update of /cvsroot/openfirst/base/config In directory sc8-pr-cvs1:/tmp/cvs-serv29154 Modified Files: dbase.php Log Message: Make optional what is optional in ofirst_select_db() Index: dbase.php =================================================================== RCS file: /cvsroot/openfirst/base/config/dbase.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** dbase.php 23 Aug 2003 20:37:30 -0000 1.4 --- dbase.php 24 Aug 2003 03:06:50 -0000 1.5 *************** *** 56,60 **** } ! function ofirst_select_db($databasename, $linkidentifier) { global $dbasetype; if($dbasetype == "mysql") { --- 56,60 ---- } ! function ofirst_select_db($databasename, $linkidentifier = "") { global $dbasetype; if($dbasetype == "mysql") { |
From: <xt...@us...> - 2003-08-24 01:41:20
|
Update of /cvsroot/openfirst/search In directory sc8-pr-cvs1:/tmp/cvs-serv13453 Modified Files: index.php Log Message: Replace mysql functions with new database functions, allowing multiple database types to be used easily. Index: index.php =================================================================== RCS file: /cvsroot/openfirst/search/index.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** index.php 19 Aug 2003 23:24:49 -0000 1.3 --- index.php 23 Aug 2003 20:26:11 -0000 1.4 *************** *** 75,85 **** <p><sub>This search looks through member profiles</sub></p>"); ! $qu = mysql_query("SELECT * FROM ofirst_members WHERE description LIKE '%" . $_GET["q"] . "%' OR signature LIKE '% " . $_GET["q"] . " %' OR firstname LIKE '%" . $_GET["q"] . "%' OR lastname LIKE '%" . $_GET["q"] . "%' OR team LIKE '%" . $_GET["q"] . "%';"); ! if(mysql_num_rows($qu) == 0) { echo("<p>Your search has returned no results.</p>"); } else { echo("<table> <tr><th>User</th><th>Name</th><th>Division</th><th>Team</th></tr>"); ! while($q = mysql_fetch_object($qu)) { echo("<tr><td><a href='$basepath/members/profile.php?id=$q->user'>$q->user</a></td> <td>$q->firstname $q->lastname</td><td>$q->division</td><td>$q->team</td></tr>"); --- 75,85 ---- <p><sub>This search looks through member profiles</sub></p>"); ! $qu = ofirst_dbquery("SELECT * FROM ofirst_members WHERE description LIKE '%" . $_GET["q"] . "%' OR signature LIKE '% " . $_GET["q"] . " %' OR firstname LIKE '%" . $_GET["q"] . "%' OR lastname LIKE '%" . $_GET["q"] . "%' OR team LIKE '%" . $_GET["q"] . "%';"); ! if(ofirst_dbnum_rows($qu) == 0) { echo("<p>Your search has returned no results.</p>"); } else { echo("<table> <tr><th>User</th><th>Name</th><th>Division</th><th>Team</th></tr>"); ! while($q = ofirst_dbfetch_object($qu)) { echo("<tr><td><a href='$basepath/members/profile.php?id=$q->user'>$q->user</a></td> <td>$q->firstname $q->lastname</td><td>$q->division</td><td>$q->team</td></tr>"); *************** *** 92,102 **** <p><sub>This search looks through guestbook postings</sub></p>"); ! $qu = mysql_query("SELECT * FROM ofirst_guestbook WHERE guest LIKE '%" . $_GET["q"] . "%' OR webpage LIKE '% " . $_GET["q"] . " %' OR location LIKE '%" . $_GET["q"] . "%' OR comment LIKE '%" . $_GET["q"] . "%';"); ! if(mysql_num_rows($qu) == 0) { echo("<p>Your search has returned no results.</p>"); } else { echo("<table> <tr><th>Guest</th><th>Webpage</th><th>Location</th><th>Comment</th></tr>"); ! while($q = mysql_fetch_object($qu)) { echo("<tr><td>$q->guest</td> <td><a href='$q->webpage'>$q->webpage</a></td><td>$q->location</td><td>$q->comment</td></tr>"); --- 92,102 ---- <p><sub>This search looks through guestbook postings</sub></p>"); ! $qu = ofirst_dbquery("SELECT * FROM ofirst_guestbook WHERE guest LIKE '%" . $_GET["q"] . "%' OR webpage LIKE '% " . $_GET["q"] . " %' OR location LIKE '%" . $_GET["q"] . "%' OR comment LIKE '%" . $_GET["q"] . "%';"); ! if(ofirst_dbnum_rows($qu) == 0) { echo("<p>Your search has returned no results.</p>"); } else { echo("<table> <tr><th>Guest</th><th>Webpage</th><th>Location</th><th>Comment</th></tr>"); ! while($q = ofirst_dbfetch_object($qu)) { echo("<tr><td>$q->guest</td> <td><a href='$q->webpage'>$q->webpage</a></td><td>$q->location</td><td>$q->comment</td></tr>"); *************** *** 112,122 **** <p><sub>This search looks through workspace files (you may not have permission to access some of the resulting documents)</sub></p>"); ! $qu = mysql_query("SELECT * FROM ofirst_workspace_files WHERE name LIKE '%" . $_GET["q"] . "%' OR owner LIKE '% " . $_GET["q"] . " %' OR date LIKE '%" . $_GET["q"] . "%' OR filetype LIKE '%" . $_GET["q"] . "%' OR location LIKE '%" . $_GET["q"] . "%' OR division LIKE '%" . $_GET["q"] . "%';"); ! if(mysql_num_rows($qu) == 0) { echo("<p>Your search has returned no results.</p>"); } else { echo("<table> <tr><th>Name</th><th>Owner</th><th>Date</th><th>File Type</th><th>Location</th><th>Division</th></tr>"); ! while($q = mysql_fetch_object($qu)) { echo("<tr><td><a href='$basepath/members/workspace.php'>$q->name</a></td><td>$q->owner</td><td>$q->date</td><td>$q->filetype</td><td>$q->location</td><td>$q->division</td></tr>"); } --- 112,122 ---- <p><sub>This search looks through workspace files (you may not have permission to access some of the resulting documents)</sub></p>"); ! $qu = ofirst_dbquery("SELECT * FROM ofirst_workspace_files WHERE name LIKE '%" . $_GET["q"] . "%' OR owner LIKE '% " . $_GET["q"] . " %' OR date LIKE '%" . $_GET["q"] . "%' OR filetype LIKE '%" . $_GET["q"] . "%' OR location LIKE '%" . $_GET["q"] . "%' OR division LIKE '%" . $_GET["q"] . "%';"); ! if(ofirst_dbnum_rows($qu) == 0) { echo("<p>Your search has returned no results.</p>"); } else { echo("<table> <tr><th>Name</th><th>Owner</th><th>Date</th><th>File Type</th><th>Location</th><th>Division</th></tr>"); ! while($q = ofirst_dbfetch_object($qu)) { echo("<tr><td><a href='$basepath/members/workspace.php'>$q->name</a></td><td>$q->owner</td><td>$q->date</td><td>$q->filetype</td><td>$q->location</td><td>$q->division</td></tr>"); } *************** *** 132,142 **** <p><sub>This search looks through news postings</sub></p>"); ! $qu = mysql_query("SELECT * FROM ofirst_news WHERE poster LIKE '%" . $_GET["q"] . "%' OR date LIKE '% " . $_GET["q"] . " %' OR title LIKE '%" . $_GET["q"] . "%' OR news LIKE '%" . $_GET["q"] . "%';"); ! if(mysql_num_rows($qu) == 0) { echo("<p>Your search has returned no results.</p>"); } else { echo("<table> <tr><th>Poster</th><th>Date</th><th>Title</th><th>News</th></tr>"); ! while($q = mysql_fetch_object($qu)) { echo("<tr><td>$q->poster</td><td>$q->date</td><td>$q->title</td><td>$q->news</td></tr>"); } --- 132,142 ---- <p><sub>This search looks through news postings</sub></p>"); ! $qu = ofirst_dbquery("SELECT * FROM ofirst_news WHERE poster LIKE '%" . $_GET["q"] . "%' OR date LIKE '% " . $_GET["q"] . " %' OR title LIKE '%" . $_GET["q"] . "%' OR news LIKE '%" . $_GET["q"] . "%';"); ! if(ofirst_dbnum_rows($qu) == 0) { echo("<p>Your search has returned no results.</p>"); } else { echo("<table> <tr><th>Poster</th><th>Date</th><th>Title</th><th>News</th></tr>"); ! while($q = ofirst_dbfetch_object($qu)) { echo("<tr><td>$q->poster</td><td>$q->date</td><td>$q->title</td><td>$q->news</td></tr>"); } |
From: <xt...@us...> - 2003-08-24 01:12:50
|
Update of /cvsroot/openfirst/news In directory sc8-pr-cvs1:/tmp/cvs-serv13330 Modified Files: viewnews.php Log Message: Replace mysql functions with new database functions, allowing multiple database types to be used easily. Index: viewnews.php =================================================================== RCS file: /cvsroot/openfirst/news/viewnews.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** viewnews.php 29 Jul 2003 15:32:49 -0000 1.3 --- viewnews.php 23 Aug 2003 20:25:13 -0000 1.4 *************** *** 27,41 **** */ - mysql_select_db($sqldatabase,$sqlconnection); - function shownews($limit = 5) { // Get a list of the users able to // be contacted via the feedback form. ! $query = mysql_query("SELECT * FROM ofirst_news ORDER BY ID DESC LIMIT $limit;"); ! if (mysql_num_rows($query) != 0){ ! while($news = mysql_fetch_object($query)){ echo("<table> <tr><th> </th><th><strong>$news->title</strong></th></tr> --- 27,39 ---- */ function shownews($limit = 5) { // Get a list of the users able to // be contacted via the feedback form. ! $query = ofirst_dbquery("SELECT * FROM ofirst_news ORDER BY ID DESC LIMIT $limit;"); ! if (ofirst_dbnum_rows($query) != 0){ ! while($news = ofirst_dbfetch_object($query)){ echo("<table> <tr><th> </th><th><strong>$news->title</strong></th></tr> |
From: <xt...@us...> - 2003-08-23 21:15:32
|
Update of /cvsroot/openfirst/base/config In directory sc8-pr-cvs1:/tmp/cvs-serv13776 Modified Files: dbase.php Log Message: Add ofirst_dberror() wrapper function. Index: dbase.php =================================================================== RCS file: /cvsroot/openfirst/base/config/dbase.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** dbase.php 23 Aug 2003 20:10:12 -0000 1.2 --- dbase.php 23 Aug 2003 20:28:59 -0000 1.3 *************** *** 100,103 **** --- 100,123 ---- } + function ofirst_dberror($linkidentifier = "") { + global $dbasetype; + 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."); + } + if($linkidentifier != "") { + return(mysql_error($linkidentifier)); + } 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); + } + exit; + } + function ofirst_dbquery($string, $linkidentifier = "", $batchsize = "") { global $dbasetype; *************** *** 146,153 **** global $dbasetype; 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."); } ! return(mysql_num_rows($resource)); } elseif($dbasetype == "mssql") { if(function_exists("mssql_num_rows") == false) { --- 166,173 ---- global $dbasetype; if($dbasetype == "mysql") { ! if(function_exists("ofirst_dbnum_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(ofirst_dbnum_rows($resource)); } elseif($dbasetype == "mssql") { if(function_exists("mssql_num_rows") == false) { |
From: <xt...@us...> - 2003-08-23 21:01:09
|
Update of /cvsroot/openfirst/logger/setup In directory sc8-pr-cvs1:/tmp/cvs-serv8822 Modified Files: setup.mysql Log Message: Add member column, as required by new functionality. Index: setup.mysql =================================================================== RCS file: /cvsroot/openfirst/logger/setup/setup.mysql,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** setup.mysql 28 Jun 2003 16:08:38 -0000 1.8 --- setup.mysql 23 Aug 2003 19:50:17 -0000 1.9 *************** *** 1,2 **** ! CREATE TABLE `ofirst_logger` (`ID` int(6) unsigned NOT NULL auto_increment, `IPAddress` tinytext, `Date` tinytext, `Location` tinytext, `QueryString` tinytext, `HostLookup` tinytext, `Browser` tinytext, PRIMARY KEY (`ID`)) TYPE=MyISAM; ! INSERT INTO ofirst_config SET modulename='logger',showonmenu='0',active='0',adminnavigation='<a href="$basepath/logger/reset.php">Reset Logger</a> | <a href="$basepath/logger/rawdata.php">Raw Data</a>',includes='logger.php'; \ No newline at end of file --- 1,3 ---- ! CREATE TABLE IF NOT EXISTS `ofirst_logger` (`ID` int(6) unsigned NOT NULL auto_increment, `IPAddress` tinytext, `Date` tinytext, `Location` tinytext, `QueryString` tinytext, `HostLookup` tinytext, `Browser` tinytext, PRIMARY KEY (`ID`)) TYPE=MyISAM; ! ALTER TABLE ofirst_logger ADD column Member TEXT; ! INSERT INTO ofirst_config SET modulename='logger',showonmenu='0',active='0',adminnavigation='<a href="$basepath/logger/reset.php">Reset Logger</a> | <a href="$basepath/logger/rawdata.php">Raw Data</a>',includes='logger.php'; |
From: <xt...@us...> - 2003-08-23 20:40:51
|
Update of /cvsroot/openfirst/news/setup In directory sc8-pr-cvs1:/tmp/cvs-serv13330/setup Added Files: setup.mssql Log Message: Replace mysql functions with new database functions, allowing multiple database types to be used easily. --- NEW FILE: setup.mssql --- CREATE TABLE IF NOT EXISTS `ofirst_news` (`ID` int(6) unsigned NOT NULL auto_increment, `date` TINYTEXT, `poster` TINYTEXT, `title` TINYTEXT, `news` TEXT, PRIMARY KEY (`ID`)) Type=MyISAM; ALTER TABLE ofirst_news ADD COLUMN image TEXT; INSERT INTO ofirst_config SET modulename='news',showonmenu='0',active='0',adminnavigation='<a href="$basepath/news/admin/">Admin Main</a>',modulenavigation='<a href="$basepath/news/">Current News</a>',includes='viewnews.php'; |
From: <xt...@us...> - 2003-08-23 20:37:34
|
Update of /cvsroot/openfirst/base/config In directory sc8-pr-cvs1:/tmp/cvs-serv14947 Modified Files: auth.php dbase.php install.php modules.php Log Message: Replace mysql functions with new database functions, allowing multiple database types to be used easily. Modify module installer to handle more than just MySQL databases. Index: auth.php =================================================================== RCS file: /cvsroot/openfirst/base/config/auth.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** auth.php 20 Aug 2003 23:11:50 -0000 1.4 --- auth.php 23 Aug 2003 20:37:30 -0000 1.5 *************** *** 29,33 **** if(isset($encryption) == false) { $encryption = "crypt"; } - mysql_select_db($sqldatabase,$sqlconnection); // Provide functions for the various encryption types... --- 29,32 ---- *************** *** 80,97 **** if(isset($_SESSION['authcode'])) { $authcode = $_SESSION['authcode']; ! $query = mysql_query("SELECT * FROM ofirst_members WHERE authcode='$authcode';"); ! if(mysql_errno() == 0 && mysql_num_rows($query) == 1) { ! $user = mysql_fetch_object($query); } else { unset($_SESSION['authcode']); ! $query = mysql_query("SELECT * FROM ofirst_members WHERE user='" . $_POST["login"] . "';"); ! if(mysql_errno() == 0) { ! $user = mysql_fetch_object($query); ! if(mysql_num_rows($query) == 1) { if(cryptpassword($_POST["password"], $encryption, $user->password) == $user->password) { session_register("authcode"); $_SESSION["authcode"] = rand(1,50000000); ! $aquery = mysql_query("UPDATE ofirst_members SET authcode='" . $_SESSION["authcode"] . "' WHERE user='" . $_POST["login"] . "';"); } else { unset($user); --- 79,96 ---- if(isset($_SESSION['authcode'])) { $authcode = $_SESSION['authcode']; ! $query = ofirst_dbquery("SELECT * FROM ofirst_members WHERE authcode='$authcode';"); ! if(ofirst_dberrno() == 0 && ofirst_dbnum_rows($query) == 1) { ! $user = ofirst_dbfetch_object($query); } else { unset($_SESSION['authcode']); ! $query = ofirst_dbquery("SELECT * FROM ofirst_members WHERE user='" . $_POST["login"] . "';"); ! if(ofirst_dberrno() == 0) { ! $user = ofirst_dbfetch_object($query); ! if(ofirst_dbnum_rows($query) == 1) { if(cryptpassword($_POST["password"], $encryption, $user->password) == $user->password) { session_register("authcode"); $_SESSION["authcode"] = rand(1,50000000); ! $aquery = ofirst_dbquery("UPDATE ofirst_members SET authcode='" . $_SESSION["authcode"] . "' WHERE user='" . $_POST["login"] . "';"); } else { unset($user); *************** *** 102,113 **** } elseif(isset($_POST["login"]) == true && isset($_POST["password"]) == true) { ! $query = mysql_query("SELECT * FROM ofirst_members WHERE user='" . $_POST["login"] . "';"); ! if(mysql_errno() == 0) { ! $user = mysql_fetch_object($query); ! if(mysql_num_rows($query) == 1) { if(cryptpassword($_POST["password"], $encryption, $user->password) == $user->password) { session_register("authcode"); $_SESSION["authcode"] = rand(1,50000000); ! $aquery = mysql_query("UPDATE ofirst_members SET authcode='" . $_SESSION["authcode"] . "' WHERE user='" . $_POST["login"] . "';"); } else { unset($user); --- 101,112 ---- } elseif(isset($_POST["login"]) == true && isset($_POST["password"]) == true) { ! $query = ofirst_dbquery("SELECT * FROM ofirst_members WHERE user='" . $_POST["login"] . "';"); ! if(ofirst_dberrno() == 0) { ! $user = ofirst_dbfetch_object($query); ! if(ofirst_dbnum_rows($query) == 1) { if(cryptpassword($_POST["password"], $encryption, $user->password) == $user->password) { session_register("authcode"); $_SESSION["authcode"] = rand(1,50000000); ! $aquery = ofirst_dbquery("UPDATE ofirst_members SET authcode='" . $_SESSION["authcode"] . "' WHERE user='" . $_POST["login"] . "';"); } else { unset($user); *************** *** 118,127 **** ! if(mysql_errno() != 0) { // There was an error, check if it's because they didn't create the // members table. ! if(mysql_errno() == 1146) { echo("<p>Members table does not exist, therefore I am creating it.</p>"); ! $query = mysql_query("CREATE TABLE ofirst_members ( UNIQUE(user), user CHAR(128), --- 117,126 ---- ! if(ofirst_dberrno() != 0) { // There was an error, check if it's because they didn't create the // members table. ! if(ofirst_dberrno() == 1146) { echo("<p>Members table does not exist, therefore I am creating it.</p>"); ! $query = ofirst_dbquery("CREATE TABLE ofirst_members ( UNIQUE(user), user CHAR(128), *************** *** 147,155 **** skills TEXT );"); ! if(mysql_errno() == 0) { // Insert a default user 'administrator' and set them to have // administrative access and some password. ! $query = mysql_query("INSERT INTO ofirst_members (user, membertype, password) VALUES('admin', 'administrator', '" . cryptpassword("openfirst", $encryption) ."');"); --- 146,154 ---- skills TEXT );"); ! if(ofirst_dberrno() == 0) { // Insert a default user 'administrator' and set them to have // administrative access and some password. ! $query = ofirst_dbquery("INSERT INTO ofirst_members (user, membertype, password) VALUES('admin', 'administrator', '" . cryptpassword("openfirst", $encryption) ."');"); *************** *** 158,162 **** die(); } else { ! die(mysql_error()); } } --- 157,161 ---- die(); } else { ! die(ofirst_dberror()); } } *************** *** 164,169 **** if(isset($user->user)) { $query = "UPDATE ofirst_members SET lastseen='" . date("h:m:s M d, Y") . "' WHERE user='$user->user';"; ! $q = mysql_query($query); unset($q); } ! ?> \ No newline at end of file --- 163,168 ---- if(isset($user->user)) { $query = "UPDATE ofirst_members SET lastseen='" . date("h:m:s M d, Y") . "' WHERE user='$user->user';"; ! $q = ofirst_dbquery($query); unset($q); } ! ?> Index: dbase.php =================================================================== RCS file: /cvsroot/openfirst/base/config/dbase.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** dbase.php 23 Aug 2003 20:28:59 -0000 1.3 --- dbase.php 23 Aug 2003 20:37:30 -0000 1.4 *************** *** 103,113 **** global $dbasetype; 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."); } if($linkidentifier != "") { ! return(mysql_error($linkidentifier)); } else { ! return(mysql_error()); } } elseif ($dbasetype == "mssql") { --- 103,113 ---- global $dbasetype; if($dbasetype == "mysql") { ! if(function_exists("ofirst_dberror") == 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(ofirst_dberror($linkidentifier)); } else { ! return(ofirst_dberror()); } } elseif ($dbasetype == "mssql") { Index: install.php =================================================================== RCS file: /cvsroot/openfirst/base/config/install.php,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** install.php 29 Jun 2003 03:35:14 -0000 1.13 --- install.php 23 Aug 2003 20:37:30 -0000 1.14 *************** *** 26,30 **** * */ ! // Purpose: set up OpenFIRST modules -- currently only installs MySQL tables include("../config/globals.php"); --- 26,30 ---- * */ ! // Purpose: set up OpenFIRST modules include("../config/globals.php"); *************** *** 44,54 **** 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(isset($_POST[$dir]) == true && $_POST[$dir] == "on") { ! $q = mysql_query("CREATE table IF NOT EXISTS `ofirst_config` (`modulename` CHAR(25) NOT NULL, `showonmenu` BOOL, `active` BOOL, `adminnavigation` TEXT, `modulenavigation` TEXT, `includes` TEXT, PRIMARY KEY (`modulename`));"); --- 44,54 ---- if(function_exists("glob")) { ! foreach (glob("../*/setup/*.$dbasetype") as $filename) { ! $sqlf = str_replace(".", "-", str_replace(".$dbasetype", "",substr(strrchr($filename, "/"), 1))); ! $dir = str_replace(".", "-", str_replace(".$dbasetype", "", substr(strchr($filename, "/"), 1))); echo("<br /> <input type='checkbox' name='$dir'>$sqlf - $dir</input>"); if(isset($_POST[$dir]) == true && $_POST[$dir] == "on") { ! $q = ofirst_dbquery("CREATE table IF NOT EXISTS `ofirst_config` (`modulename` CHAR(25) NOT NULL, `showonmenu` BOOL, `active` BOOL, `adminnavigation` TEXT, `modulenavigation` TEXT, `includes` TEXT, PRIMARY KEY (`modulename`));"); *************** *** 58,62 **** while($line = fgets($sf)) { if(substr($line, 0, 2) != "--" && substr($line, 0, 1) != "#" && strlen($line) > 0) { ! $q = mysql_query(trim($line)); } } --- 58,62 ---- while($line = fgets($sf)) { if(substr($line, 0, 2) != "--" && substr($line, 0, 1) != "#" && strlen($line) > 0) { ! $q = ofirst_dbquery(trim($line)); } } *************** *** 74,83 **** if($fil != ".." && $fil != "." && $fil != "") { $filename = "../$file/setup/$fil"; ! $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(isset($_POST[$dir]) == true && $_POST[$dir] == "on") { ! $q = mysql_query("CREATE table IF NOT EXISTS `ofirst_config` (`modulename` CHAR(25) NOT NULL, `showonmenu` BOOL, `active` BOOL, `adminnavigation` TEXT, `modulenavigation` TEXT, `includes` TEXT, PRIMARY KEY (`modulename`));"); --- 74,83 ---- if($fil != ".." && $fil != "." && $fil != "") { $filename = "../$file/setup/$fil"; ! $sqlf = str_replace(".", "-", str_replace(".$dbasetype", "",substr(strrchr($filename, "/"), 1))); ! $dir = str_replace(".", "-", str_replace(".$dbasetype", "", substr(strchr($filename, "/"), 1))); echo("<br /> <input type='checkbox' name='$dir'>$sqlf - $dir</input>"); if(isset($_POST[$dir]) == true && $_POST[$dir] == "on") { ! $q = ofirst_dbquery("CREATE table IF NOT EXISTS `ofirst_config` (`modulename` CHAR(25) NOT NULL, `showonmenu` BOOL, `active` BOOL, `adminnavigation` TEXT, `modulenavigation` TEXT, `includes` TEXT, PRIMARY KEY (`modulename`));"); *************** *** 88,92 **** while($line = fgets($sf, 4096)) { if(substr($line, 0, 2) != "--" && substr($line, 0, 1) != "#" && strlen($line) > 0) { ! $q = mysql_query(trim($line)); } } --- 88,92 ---- while($line = fgets($sf, 4096)) { if(substr($line, 0, 2) != "--" && substr($line, 0, 1) != "#" && strlen($line) > 0) { ! $q = ofirst_dbquery(trim($line)); } } Index: modules.php =================================================================== RCS file: /cvsroot/openfirst/base/config/modules.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** modules.php 28 Jun 2003 17:29:29 -0000 1.4 --- modules.php 23 Aug 2003 20:37:30 -0000 1.5 *************** *** 38,43 **** // Query for current module information and loop through with while ! $query = mysql_query("SELECT * FROM ofirst_config"); ! while($module = mysql_fetch_object($query)){ // Set values to update db for checkboxes if(isset($_POST[$module->modulename.'-active'])) { $active = "1"; } else { $active = "0"; } --- 38,43 ---- // Query for current module information and loop through with while ! $query = ofirst_dbquery("SELECT * FROM ofirst_config"); ! while($module = ofirst_dbfetch_object($query)){ // Set values to update db for checkboxes if(isset($_POST[$module->modulename.'-active'])) { $active = "1"; } else { $active = "0"; } *************** *** 45,53 **** // Creater query string then update information in database ! mysql_query("UPDATE ofirst_config SET modulename = '".$_POST[$module->modulename.'-modulename']."', includes = '".$_POST[$module->modulename.'-includes']."', showonmenu = '".$showonmenu."', ! active = '".$active."' WHERE modulename = '".$module->modulename."'") or die(mysql_error()); } --- 45,53 ---- // Creater query string then update information in database ! ofirst_dbquery("UPDATE ofirst_config SET modulename = '".$_POST[$module->modulename.'-modulename']."', includes = '".$_POST[$module->modulename.'-includes']."', showonmenu = '".$showonmenu."', ! active = '".$active."' WHERE modulename = '".$module->modulename."'") or die(ofirst_dberror()); } *************** *** 71,76 **** </tr> <?php ! $query = mysql_query("SELECT * FROM ofirst_config"); ! while($module = mysql_fetch_object($query)){ ?> <tr> --- 71,76 ---- </tr> <?php ! $query = ofirst_dbquery("SELECT * FROM ofirst_config"); ! while($module = ofirst_dbfetch_object($query)){ ?> <tr> |
From: <xt...@us...> - 2003-08-23 20:32:52
|
Update of /cvsroot/openfirst/photogallery In directory sc8-pr-cvs1:/tmp/cvs-serv14346 Modified Files: email.php gallery.php index.php photogallery.php viewphoto.php Log Message: Replace mysql functions with new database functions, allowing multiple database types to be used easily. Index: email.php =================================================================== RCS file: /cvsroot/openfirst/photogallery/email.php,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** email.php 22 Aug 2003 15:49:12 -0000 1.7 --- email.php 23 Aug 2003 20:32:49 -0000 1.8 *************** *** 32,37 **** // Get gallery information ! $query = mysql_query("SELECT * FROM ofirst_photogallery_galleries WHERE ID = '".$_GET['ID']."'"); ! $gallery = mysql_fetch_object($query); // If user has hit the send option then --- 32,37 ---- // Get gallery information ! $query = ofirst_dbquery("SELECT * FROM ofirst_photogallery_galleries WHERE ID = '".$_GET['ID']."'"); ! $gallery = ofirst_dbfetch_object($query); // If user has hit the send option then Index: gallery.php =================================================================== RCS file: /cvsroot/openfirst/photogallery/gallery.php,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** gallery.php 22 Aug 2003 16:49:33 -0000 1.9 --- gallery.php 23 Aug 2003 20:32:49 -0000 1.10 *************** *** 32,37 **** // Retrieve gallery information ! $query = mysql_query("SELECT * FROM ofirst_photogallery_galleries WHERE ID = '".$_GET['ID']."'"); ! $gallery = mysql_fetch_object($query); ?> --- 32,37 ---- // Retrieve gallery information ! $query = ofirst_dbquery("SELECT * FROM ofirst_photogallery_galleries WHERE ID = '".$_GET['ID']."'"); ! $gallery = ofirst_dbfetch_object($query); ?> Index: index.php =================================================================== RCS file: /cvsroot/openfirst/photogallery/index.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** index.php 22 Aug 2003 15:49:12 -0000 1.6 --- index.php 23 Aug 2003 20:32:49 -0000 1.7 *************** *** 46,51 **** // List galleries from database ! $query = mysql_query("SELECT * FROM ofirst_photogallery_galleries"); ! while($gallery = mysql_fetch_object($query)){ ?> --- 46,51 ---- // List galleries from database ! $query = ofirst_dbquery("SELECT * FROM ofirst_photogallery_galleries"); ! while($gallery = ofirst_dbfetch_object($query)){ ?> *************** *** 60,64 **** // If there are no galleries then say there are none ! if (mysql_num_rows($query) == 0){ echo "<tr><td>--</td><td><br>There are no galleries uploaded<br><br></td>"; } --- 60,64 ---- // If there are no galleries then say there are none ! if (ofirst_dbnum_rows($query) == 0){ echo "<tr><td>--</td><td><br>There are no galleries uploaded<br><br></td>"; } Index: photogallery.php =================================================================== RCS file: /cvsroot/openfirst/photogallery/photogallery.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** photogallery.php 22 Aug 2003 15:49:12 -0000 1.4 --- photogallery.php 23 Aug 2003 20:32:49 -0000 1.5 *************** *** 39,44 **** // If option is true then preview the image as a thumb else no thumb ! $query = mysql_query("SELECT * FROM ofirst_photogallery_galleries WHERE ID = '$gallery'"); ! $thisgallery = mysql_fetch_object($query); if($option){ --- 39,44 ---- // If option is true then preview the image as a thumb else no thumb ! $query = ofirst_dbquery("SELECT * FROM ofirst_photogallery_galleries WHERE ID = '$gallery'"); ! $thisgallery = ofirst_dbfetch_object($query); if($option){ Index: viewphoto.php =================================================================== RCS file: /cvsroot/openfirst/photogallery/viewphoto.php,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** viewphoto.php 22 Aug 2003 16:27:47 -0000 1.8 --- viewphoto.php 23 Aug 2003 20:32:49 -0000 1.9 *************** *** 36,40 **** if(ISSET($_POST['addcomment'])){ ! mysql_query("INSERT INTO ofirst_photogallery_comments SET Image = '".$_GET['PHOTO']."', Gallery = '".$_GET['ID']."', --- 36,40 ---- if(ISSET($_POST['addcomment'])){ ! ofirst_dbquery("INSERT INTO ofirst_photogallery_comments SET Image = '".$_GET['PHOTO']."', Gallery = '".$_GET['ID']."', *************** *** 42,46 **** EMail = '".$_POST['email']."', Comment = '".$_POST['comment']."', ! Date = '".time()."'") or die(mysql_error()); echo "<br><br>Your comment has been successfully posted! [ <a href='viewphoto.php?ID=".$_GET['ID']."&PHOTO=".$_GET['PHOTO']."'>View Image</a> ]<br><br>"; --- 42,46 ---- EMail = '".$_POST['email']."', Comment = '".$_POST['comment']."', ! Date = '".time()."'") or die(ofirst_dberror()); echo "<br><br>Your comment has been successfully posted! [ <a href='viewphoto.php?ID=".$_GET['ID']."&PHOTO=".$_GET['PHOTO']."'>View Image</a> ]<br><br>"; *************** *** 52,56 **** if(ISSET($user->user)){ ! mysql_query("DELETE FROM ofirst_photogallery_comments WHERE ID = '".$_GET['COMMENT']."'"); echo "<br><br>Comment has been deleted, thank you! [ <a href='viewphoto.php?ID=".$_GET['ID']."&PHOTO=".$_GET['PHOTO']."'>View Image</a> ]<br><br>"; die(include($footer)); --- 52,56 ---- if(ISSET($user->user)){ ! ofirst_dbquery("DELETE FROM ofirst_photogallery_comments WHERE ID = '".$_GET['COMMENT']."'"); echo "<br><br>Comment has been deleted, thank you! [ <a href='viewphoto.php?ID=".$_GET['ID']."&PHOTO=".$_GET['PHOTO']."'>View Image</a> ]<br><br>"; die(include($footer)); *************** *** 60,69 **** // Retrieve image data from the database ! $imgquery = mysql_query("SELECT * FROM ofirst_photogallery_image WHERE Gallery = '".$_GET['ID']."' AND Image = '".$_GET['PHOTO']."'"); ! $image = mysql_fetch_object($imgquery); // Retrieve information about the photos related gallery ! $query = mysql_query("SELECT * FROM ofirst_photogallery_galleries WHERE ID = '".$_GET['ID']."'"); ! $gallery = mysql_fetch_object($query); ?> --- 60,69 ---- // Retrieve image data from the database ! $imgquery = ofirst_dbquery("SELECT * FROM ofirst_photogallery_image WHERE Gallery = '".$_GET['ID']."' AND Image = '".$_GET['PHOTO']."'"); ! $image = ofirst_dbfetch_object($imgquery); // Retrieve information about the photos related gallery ! $query = ofirst_dbquery("SELECT * FROM ofirst_photogallery_galleries WHERE ID = '".$_GET['ID']."'"); ! $gallery = ofirst_dbfetch_object($query); ?> *************** *** 79,83 **** <tr> <td width="20%"><a href="gallery.php?ID=<?php echo $gallery->ID; ?>"><img src="gallery.PNG" border="0"></a></td> ! <td width="80%"><?php if(mysql_num_rows($imgquery) == 0){ echo $_GET['PHOTO']; }else{ echo $image->ImageName; } ?></td> </tr> <tr> --- 79,83 ---- <tr> <td width="20%"><a href="gallery.php?ID=<?php echo $gallery->ID; ?>"><img src="gallery.PNG" border="0"></a></td> ! <td width="80%"><?php if(ofirst_dbnum_rows($imgquery) == 0){ echo $_GET['PHOTO']; }else{ echo $image->ImageName; } ?></td> </tr> <tr> *************** *** 91,95 **** <?php // If there are values for the query then preview the image ! if(! mysql_num_rows($imgquery) == 0){ ?> <tr> --- 91,95 ---- <?php // If there are values for the query then preview the image ! if(! ofirst_dbnum_rows($imgquery) == 0){ ?> <tr> *************** *** 155,162 **** <?php // Check if there are comments in the database ! $query = mysql_query("SELECT * FROM ofirst_photogallery_comments WHERE Gallery = '".$_GET['ID']."' AND Image = '".$_GET['PHOTO']."'"); // Run through the comments and display them ! while($comment = mysql_fetch_object($query)){ ?> --- 155,162 ---- <?php // Check if there are comments in the database ! $query = ofirst_dbquery("SELECT * FROM ofirst_photogallery_comments WHERE Gallery = '".$_GET['ID']."' AND Image = '".$_GET['PHOTO']."'"); // Run through the comments and display them ! while($comment = ofirst_dbfetch_object($query)){ ?> *************** *** 179,183 **** // If there are no values then preview no comments text ! if(mysql_num_rows($query) == 0){ echo "<tr><td> </td><td>There are no comments for this image!</td></tr>"; } --- 179,183 ---- // If there are no values then preview no comments text ! if(ofirst_dbnum_rows($query) == 0){ echo "<tr><td> </td><td>There are no comments for this image!</td></tr>"; } |
Update of /cvsroot/openfirst/photogallery/admin In directory sc8-pr-cvs1:/tmp/cvs-serv14346/admin Modified Files: cleargallery.php edit.php editphoto.php index.php makethumb.php newgallery.php upload.php Log Message: Replace mysql functions with new database functions, allowing multiple database types to be used easily. Index: cleargallery.php =================================================================== RCS file: /cvsroot/openfirst/photogallery/admin/cleargallery.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** cleargallery.php 22 Aug 2003 16:24:42 -0000 1.5 --- cleargallery.php 23 Aug 2003 20:32:49 -0000 1.6 *************** *** 39,44 **** // Retrieve gallery information ! $query = mysql_query("SELECT * FROM ofirst_photogallery_galleries WHERE ID = '".$_GET['ID']."'"); ! $gallery = mysql_fetch_object($query); // Check if user initiates the confirm of clearing the gallery --- 39,44 ---- // Retrieve gallery information ! $query = ofirst_dbquery("SELECT * FROM ofirst_photogallery_galleries WHERE ID = '".$_GET['ID']."'"); ! $gallery = ofirst_dbfetch_object($query); // Check if user initiates the confirm of clearing the gallery Index: edit.php =================================================================== RCS file: /cvsroot/openfirst/photogallery/admin/edit.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** edit.php 22 Aug 2003 16:24:43 -0000 1.5 --- edit.php 23 Aug 2003 20:32:49 -0000 1.6 *************** *** 43,48 **** die(include($footer)); } elseif(isset($_GET["DELETE"]) == true && isset($_GET["CONFIRMED"]) == true) { ! $query = mysql_query("SELECT * FROM ofirst_photogallery_galleries WHERE ID = '".$_GET['DELETE']."'") or die(mysql_error()); ! $gallery = mysql_fetch_object($query); // Delete the directory as asked above --- 43,48 ---- die(include($footer)); } elseif(isset($_GET["DELETE"]) == true && isset($_GET["CONFIRMED"]) == true) { ! $query = ofirst_dbquery("SELECT * FROM ofirst_photogallery_galleries WHERE ID = '".$_GET['DELETE']."'") or die(ofirst_dberror()); ! $gallery = ofirst_dbfetch_object($query); // Delete the directory as asked above *************** *** 72,76 **** } ! mysql_query("DELETE FROM ofirst_photogallery_galleries WHERE ID = '".$_GET['DELETE']."'") or die(mysql_error()); echo "<br><br><center>The gallery has been deleted! [ <a href='index.php'>Manage</a> ]</center><br>"; die(include($footer)); --- 72,76 ---- } ! ofirst_dbquery("DELETE FROM ofirst_photogallery_galleries WHERE ID = '".$_GET['DELETE']."'") or die(ofirst_dberror()); echo "<br><br><center>The gallery has been deleted! [ <a href='index.php'>Manage</a> ]</center><br>"; die(include($footer)); *************** *** 80,85 **** // Check if user initiated delete of particular photo and run photo and thumb delete if(ISSET($_GET['DELETEPHOTO'])){ ! $query = mysql_query("SELECT * FROM ofirst_photogallery_galleries WHERE ID = '".$_GET['ID']."'") or die(mysql_error()); ! $gallery = mysql_fetch_object($query); unlink("../".$gallerydir.$gallery->GalleryName."/".$_GET['PHOTO']) or die("<br><br><center>Can't remove gallery! [ <a href='index.php'>Manage</a> ]"); --- 80,85 ---- // Check if user initiated delete of particular photo and run photo and thumb delete if(ISSET($_GET['DELETEPHOTO'])){ ! $query = ofirst_dbquery("SELECT * FROM ofirst_photogallery_galleries WHERE ID = '".$_GET['ID']."'") or die(ofirst_dberror()); ! $gallery = ofirst_dbfetch_object($query); unlink("../".$gallerydir.$gallery->GalleryName."/".$_GET['PHOTO']) or die("<br><br><center>Can't remove gallery! [ <a href='index.php'>Manage</a> ]"); *************** *** 95,100 **** // Get information above the gallery ! $query = mysql_query("SELECT * FROM ofirst_photogallery_galleries WHERE ID = '".$_GET['ID']."'"); ! $gallery = mysql_fetch_object($query); ?> --- 95,100 ---- // Get information above the gallery ! $query = ofirst_dbquery("SELECT * FROM ofirst_photogallery_galleries WHERE ID = '".$_GET['ID']."'"); ! $gallery = ofirst_dbfetch_object($query); ?> Index: editphoto.php =================================================================== RCS file: /cvsroot/openfirst/photogallery/admin/editphoto.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** editphoto.php 22 Aug 2003 16:24:43 -0000 1.3 --- editphoto.php 23 Aug 2003 20:32:49 -0000 1.4 *************** *** 39,48 **** // Get information relating to this particular image ! $query = mysql_query("SELECT * FROM ofirst_photogallery_galleries WHERE ID = '".$_GET['ID']."'"); ! $gallery = mysql_fetch_object($query); ! $imgquery = mysql_query("SELECT * FROM ofirst_photogallery_image WHERE ! Gallery = '".$_GET['ID']."' AND Image = '".$_GET['PHOTO']."'") or die(mysql_error()); ! $image = mysql_fetch_object($imgquery); // Check if a text file relating to this image is present then prepare to fill it into the descriptions box --- 39,48 ---- // Get information relating to this particular image ! $query = ofirst_dbquery("SELECT * FROM ofirst_photogallery_galleries WHERE ID = '".$_GET['ID']."'"); ! $gallery = ofirst_dbfetch_object($query); ! $imgquery = ofirst_dbquery("SELECT * FROM ofirst_photogallery_image WHERE ! Gallery = '".$_GET['ID']."' AND Image = '".$_GET['PHOTO']."'") or die(ofirst_dberror()); ! $image = ofirst_dbfetch_object($imgquery); // Check if a text file relating to this image is present then prepare to fill it into the descriptions box *************** *** 66,82 **** } ! if(mysql_num_rows($imgquery) == 0){ ! mysql_query("INSERT INTO ofirst_photogallery_image SET Image = '".$_GET['PHOTO']."', Gallery = '".$_GET['ID']."', ImageName = '".$_POST['imagename']."', Description = '".$description."', ! Dates = '".$_POST['date']."'") or die(mysql_error()); } else { ! mysql_query("UPDATE ofirst_photogallery_image SET ImageName = '".$_POST['imagename']."', Description = '".$description."', Dates = '".$_POST['date']."' ! WHERE Gallery = '".$_GET['ID']."' AND Image = '".$_GET['PHOTO']."'") or die(mysql_error()); } if(isset($_POST['deletefile'])){ --- 66,82 ---- } ! if(ofirst_dbnum_rows($imgquery) == 0){ ! ofirst_dbquery("INSERT INTO ofirst_photogallery_image SET Image = '".$_GET['PHOTO']."', Gallery = '".$_GET['ID']."', ImageName = '".$_POST['imagename']."', Description = '".$description."', ! Dates = '".$_POST['date']."'") or die(ofirst_dberror()); } else { ! ofirst_dbquery("UPDATE ofirst_photogallery_image SET ImageName = '".$_POST['imagename']."', Description = '".$description."', Dates = '".$_POST['date']."' ! WHERE Gallery = '".$_GET['ID']."' AND Image = '".$_GET['PHOTO']."'") or die(ofirst_dberror()); } if(isset($_POST['deletefile'])){ *************** *** 94,98 **** // Delete file information from the database upon request if(isset($_POST['deleteall'])){ ! mysql_query("DELETE FROM ofirst_photogallery_image WHERE Gallery = '".$_GET['ID']."' AND Image = '".$_GET['PHOTO']."'"); echo "<br><br>The description of this image has been removed! [ <a href='editphoto.php?ID=".$_GET['ID']."&PHOTO=".$_GET['PHOTO']."'>Manage</a> ]<br><br>"; die(include($footer)); --- 94,98 ---- // Delete file information from the database upon request if(isset($_POST['deleteall'])){ ! ofirst_dbquery("DELETE FROM ofirst_photogallery_image WHERE Gallery = '".$_GET['ID']."' AND Image = '".$_GET['PHOTO']."'"); echo "<br><br>The description of this image has been removed! [ <a href='editphoto.php?ID=".$_GET['ID']."&PHOTO=".$_GET['PHOTO']."'>Manage</a> ]<br><br>"; die(include($footer)); Index: index.php =================================================================== RCS file: /cvsroot/openfirst/photogallery/admin/index.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** index.php 22 Aug 2003 16:24:43 -0000 1.5 --- index.php 23 Aug 2003 20:32:49 -0000 1.6 *************** *** 52,57 **** // Retrieve galleries from database and list them accordingly ! $query = mysql_query("SELECT * FROM ofirst_photogallery_galleries"); ! while($gallery = mysql_fetch_object($query)){ ?> --- 52,57 ---- // Retrieve galleries from database and list them accordingly ! $query = ofirst_dbquery("SELECT * FROM ofirst_photogallery_galleries"); ! while($gallery = ofirst_dbfetch_object($query)){ ?> *************** *** 69,73 **** // If there are no values then preview an error ! if (mysql_num_rows($query) == 0){ echo "\n <tr>\n <td> </td>\n <td><br>There are no galleries uploaded<br><br></td>\n"; } --- 69,73 ---- // If there are no values then preview an error ! if (ofirst_dbnum_rows($query) == 0){ echo "\n <tr>\n <td> </td>\n <td><br>There are no galleries uploaded<br><br></td>\n"; } Index: makethumb.php =================================================================== RCS file: /cvsroot/openfirst/photogallery/admin/makethumb.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** makethumb.php 22 Aug 2003 16:24:43 -0000 1.4 --- makethumb.php 23 Aug 2003 20:32:49 -0000 1.5 *************** *** 36,41 **** if (isset($user->user)){ ! $query = mysql_query("SELECT * FROM ofirst_photogallery_galleries WHERE ID = '".$_GET['ID']."'") or die(mysql_error()); ! $gallery = mysql_fetch_object($query); $dirlocate = "../".$gallerydir.$gallery->GalleryName; --- 36,41 ---- if (isset($user->user)){ ! $query = ofirst_dbquery("SELECT * FROM ofirst_photogallery_galleries WHERE ID = '".$_GET['ID']."'") or die(ofirst_dberror()); ! $gallery = ofirst_dbfetch_object($query); $dirlocate = "../".$gallerydir.$gallery->GalleryName; Index: newgallery.php =================================================================== RCS file: /cvsroot/openfirst/photogallery/admin/newgallery.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** newgallery.php 22 Aug 2003 16:24:43 -0000 1.5 --- newgallery.php 23 Aug 2003 20:32:49 -0000 1.6 *************** *** 43,47 **** mkdir("../".$gallerydir.$_POST['galleryname']."/thumbs",0777) or die("<br><br><center>Can't create folder! [ <a href='manage.php'>Manage</a> ]"); ! mysql_query("INSERT INTO ofirst_photogallery_galleries (GalleryName, Author, Dates, Description) values( '".$_POST['galleryname']."', '".$user->user."', '".time()."', '".$_POST['description']."')"); --- 43,47 ---- mkdir("../".$gallerydir.$_POST['galleryname']."/thumbs",0777) or die("<br><br><center>Can't create folder! [ <a href='manage.php'>Manage</a> ]"); ! ofirst_dbquery("INSERT INTO ofirst_photogallery_galleries (GalleryName, Author, Dates, Description) values( '".$_POST['galleryname']."', '".$user->user."', '".time()."', '".$_POST['description']."')"); Index: upload.php =================================================================== RCS file: /cvsroot/openfirst/photogallery/admin/upload.php,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** upload.php 22 Aug 2003 16:24:43 -0000 1.7 --- upload.php 23 Aug 2003 20:32:49 -0000 1.8 *************** *** 38,43 **** } ! $query = mysql_query("SELECT * FROM ofirst_photogallery_galleries WHERE ID = '".$_GET['ID']."'"); ! $gallery = mysql_fetch_object($query); // Check if user initiates upload process and run upload process --- 38,43 ---- } ! $query = ofirst_dbquery("SELECT * FROM ofirst_photogallery_galleries WHERE ID = '".$_GET['ID']."'"); ! $gallery = ofirst_dbfetch_object($query); // Check if user initiates upload process and run upload process |
From: <xt...@us...> - 2003-08-23 20:32:52
|
Update of /cvsroot/openfirst/photogallery/setup In directory sc8-pr-cvs1:/tmp/cvs-serv14346/setup Added Files: setup.mssql Log Message: Replace mysql functions with new database functions, allowing multiple database types to be used easily. --- NEW FILE: setup.mssql --- CREATE TABLE `ofirst_photogallery_galleries` (`ID` TINYINT (3) UNSIGNED NOT NULL auto_increment, `GalleryName` TEXT, `Author` TEXT, `Dates` text, `Description` TEXT, `NumPhotos` INT (3) UNSIGNED DEFAULT '0' NOT NULL, PRIMARY KEY(`ID`)) TYPE=MyISAM; CREATE TABLE `ofirst_photogallery_comments` (`ID` tinyint(3) unsigned NOT NULL auto_increment,`Image` tinytext,`Gallery` tinytext,`Author` tinytext,`EMail` tinytext,`Comment` text,`Dates` text, PRIMARY KEY (`ID`)) TYPE=MyISAM; CREATE TABLE `ofirst_photogallery_image` (`ID` tinyint(3) unsigned NOT NULL auto_increment,`Image` tinytext,`Gallery` tinytext,`ImageName` tinytext,`Description` tinytext,`Comment` text,`Dates` text, PRIMARY KEY (`ID`)) TYPE=MyISAM; INSERT INTO ofirst_config SET includes='photogallery.php',modulename='photogallery',showonmenu='0',active='0',adminnavigation='<a href="$basepath/photogallery/admin/">Gallery Manager</a> | <a href="$basepath/photogallery/admin/newgallery.php">New Gallery</a>',modulenavigation='<a href="$basepath/photogallery/">View Gallery</a>'; |
From: <xt...@us...> - 2003-08-23 20:32:46
|
Update of /cvsroot/openfirst/news/admin In directory sc8-pr-cvs1:/tmp/cvs-serv13330/admin Modified Files: index.php Log Message: Replace mysql functions with new database functions, allowing multiple database types to be used easily. Index: index.php =================================================================== RCS file: /cvsroot/openfirst/news/admin/index.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** index.php 20 Aug 2003 15:03:25 -0000 1.5 --- index.php 23 Aug 2003 20:25:13 -0000 1.6 *************** *** 54,58 **** $now = date("D M j G:i:s T Y"); ! $query = mysql_query("INSERT INTO ofirst_news (date, poster, title, news, image) VALUES ('$now', '$user->user', '" . $_POST["title"] . "', '" . $_POST["news"] . "', '" . $_POST["image"] . "');"); echo("The news item " . $_POST["title"] . " has been added."); --- 54,58 ---- $now = date("D M j G:i:s T Y"); ! $query = ofirst_dbquery("INSERT INTO ofirst_news (date, poster, title, news, image) VALUES ('$now', '$user->user', '" . $_POST["title"] . "', '" . $_POST["news"] . "', '" . $_POST["image"] . "');"); echo("The news item " . $_POST["title"] . " has been added."); |
From: <xt...@us...> - 2003-08-23 20:32:01
|
Update of /cvsroot/openfirst/messenger/setup In directory sc8-pr-cvs1:/tmp/cvs-serv14220/setup Added Files: setup.mssql Log Message: Replace mysql functions with new database functions, allowing multiple database types to be used easily. --- NEW FILE: setup.mssql --- CREATE TABLE `ofirst_messenger_messages` (`ID` int(6) unsigned NOT NULL auto_increment, `Sender` tinytext, `Receiver` tinytext, `Subject` tinytext, `Body` text, `Status` tinytext, `Date` tinytext, PRIMARY KEY (`ID`)) TYPE=MyISAM; CREATE TABLE `ofirst_messenger_usersonline` (`ID` int(6) unsigned NOT NULL auto_increment, `IPAddress` tinytext, `Location` tinytext, `Timestamp` text, `Member` tinytext, PRIMARY KEY (`ID`)) TYPE=MyISAM; INSERT INTO ofirst_config SET modulename='messenger',showonmenu='0',active='0',modulenavigation='<a href="$basepath/messenger/">Users Online</a> | <a href="$basepath/messenger/inbox.php">Inbox</a> | <a href="$basepath/messenger/newmsg.php">Send Message</a>',includes='messenger.php'; |
From: <xt...@us...> - 2003-08-23 20:32:01
|
Update of /cvsroot/openfirst/messenger In directory sc8-pr-cvs1:/tmp/cvs-serv14220 Modified Files: inbox.php index.php messenger.php newmsg.php viewmsg.php Log Message: Replace mysql functions with new database functions, allowing multiple database types to be used easily. Index: inbox.php =================================================================== RCS file: /cvsroot/openfirst/messenger/inbox.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** inbox.php 20 Aug 2003 00:40:28 -0000 1.4 --- inbox.php 23 Aug 2003 20:31:57 -0000 1.5 *************** *** 36,40 **** // If querystring delete is set with a value then delete the specified recordset if (isset($_GET['DELETE'])) { ! mysql_query("DELETE FROM ofirst_messenger_messages WHERE ID = '".$_GET['DELETE']."'") or die(mysql_error()); echo "<br><p>Message has been removed, thank you! [ <a href='inbox.php'>Inbox</a> ]</p><br>"; die(include($footer)); --- 36,40 ---- // If querystring delete is set with a value then delete the specified recordset if (isset($_GET['DELETE'])) { ! ofirst_dbquery("DELETE FROM ofirst_messenger_messages WHERE ID = '".$_GET['DELETE']."'") or die(ofirst_dberror()); echo "<br><p>Message has been removed, thank you! [ <a href='inbox.php'>Inbox</a> ]</p><br>"; die(include($footer)); *************** *** 43,47 **** // If user specifies to delete all messesges then delete them if (isset($_POST['deleteall'])) { ! mysql_query("DELETE FROM ofirst_messenger_messages WHERE Receiver = '".$user->user."'") or die(mysql_error()); echo "<br><p>All messages have been deleted, thank you! [ <a href='inbox.php'>Inbox</a> ]</p><br>"; die(include($footer)); --- 43,47 ---- // If user specifies to delete all messesges then delete them if (isset($_POST['deleteall'])) { ! ofirst_dbquery("DELETE FROM ofirst_messenger_messages WHERE Receiver = '".$user->user."'") or die(ofirst_dberror()); echo "<br><p>All messages have been deleted, thank you! [ <a href='inbox.php'>Inbox</a> ]</p><br>"; die(include($footer)); *************** *** 49,56 **** // Retrieve Messages relating to the users IP address then loop through them ! $query = mysql_query("SELECT * FROM ofirst_messenger_messages WHERE Receiver = '".$user->user."'"); ?> <h1>Visitor Inbox for Messaging</h1> ! <p>You have (<?php echo mysql_num_rows($query); ?>) messages within your inbox.</p> <table width="661"> <tr> --- 49,56 ---- // Retrieve Messages relating to the users IP address then loop through them ! $query = ofirst_dbquery("SELECT * FROM ofirst_messenger_messages WHERE Receiver = '".$user->user."'"); ?> <h1>Visitor Inbox for Messaging</h1> ! <p>You have (<?php echo ofirst_dbnum_rows($query); ?>) messages within your inbox.</p> <table width="661"> <tr> *************** *** 62,66 **** </tr> <?php ! while($messages = mysql_fetch_object($query)){ ?> <tr> --- 62,66 ---- </tr> <?php ! while($messages = ofirst_dbfetch_object($query)){ ?> <tr> *************** *** 84,88 **** <?php } ! if(mysql_num_rows($query) == 0){ echo "<tr><td>--</td><td>--</td><td>No new messages!</td><td>--</td><td>--</td></tr>"; } --- 84,88 ---- <?php } ! if(ofirst_dbnum_rows($query) == 0){ echo "<tr><td>--</td><td>--</td><td>No new messages!</td><td>--</td><td>--</td></tr>"; } Index: index.php =================================================================== RCS file: /cvsroot/openfirst/messenger/index.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** index.php 20 Aug 2003 00:40:28 -0000 1.4 --- index.php 23 Aug 2003 20:31:57 -0000 1.5 *************** *** 40,45 **** // Find user online records in the database ! $query = mysql_query("SELECT * FROM ofirst_messenger_usersonline"); ! while($userinf = mysql_fetch_object($query)){ ?> <tr> --- 40,45 ---- // Find user online records in the database ! $query = ofirst_dbquery("SELECT * FROM ofirst_messenger_usersonline"); ! while($userinf = ofirst_dbfetch_object($query)){ ?> <tr> Index: messenger.php =================================================================== RCS file: /cvsroot/openfirst/messenger/messenger.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** messenger.php 20 Aug 2003 00:40:28 -0000 1.5 --- messenger.php 23 Aug 2003 20:31:57 -0000 1.6 *************** *** 33,37 **** // Check if a record for the persons IP is made if not then create it or else update current record info ! $query = mysql_query("SELECT * FROM ofirst_messenger_usersonline WHERE IPAddress = '".$IP."'"); if(ISSET($user->user)){ --- 33,37 ---- // Check if a record for the persons IP is made if not then create it or else update current record info ! $query = ofirst_dbquery("SELECT * FROM ofirst_messenger_usersonline WHERE IPAddress = '".$IP."'"); if(ISSET($user->user)){ *************** *** 41,70 **** } ! if (mysql_num_rows($query) == 0){ $timeout = $TIME+30; ! mysql_query("INSERT INTO ofirst_messenger_usersonline (IPAddress,Location,Timestamp,Member) values( '".$IP."' ,'".$SCRIPT."' ,'".$timeout."' ! ,'".$memberinf."')") or die("INSERT: ".mysql_error()); } else { $timeout = $TIME + 480; ! mysql_query("UPDATE ofirst_messenger_usersonline SET Timestamp = '".$timeout."', Member = '".$memberinf."', Location = '".$SCRIPT."' WHERE IPAddress = '".$IP."'") or die("UPDATE: ".mysql_error()); } // Delete all records that are overdue the Timestamp expiry amount based on current time ! mysql_query("DELETE FROM ofirst_messenger_usersonline WHERE Timestamp < '".$TIME."'") or die("DELETE: ".mysql_error()); // Check how many records of users are available and put in user usable variable ! $query = mysql_query("SELECT * FROM ofirst_messenger_usersonline"); ! $usersonline = "There are currently <b>".mysql_num_rows($query)."</b> persons on this website! [ <a href='./'>View List</a> ]"; // Check how many people are previewing the same exact script location and put in user usable variable ! $page_query = mysql_query("SELECT * FROM ofirst_messenger_usersonline WHERE Location = '".$SCRIPT."'"); ! $usersonpage = "There are currently <b>".mysql_num_rows($page_query)."</b> viewing this page!"; if(isset($user->user)){ --- 41,70 ---- } ! if (ofirst_dbnum_rows($query) == 0){ $timeout = $TIME+30; ! ofirst_dbquery("INSERT INTO ofirst_messenger_usersonline (IPAddress,Location,Timestamp,Member) values( '".$IP."' ,'".$SCRIPT."' ,'".$timeout."' ! ,'".$memberinf."')") or die("INSERT: ".ofirst_dberror()); } else { $timeout = $TIME + 480; ! ofirst_dbquery("UPDATE ofirst_messenger_usersonline SET Timestamp = '".$timeout."', Member = '".$memberinf."', Location = '".$SCRIPT."' WHERE IPAddress = '".$IP."'") or die("UPDATE: ".ofirst_dberror()); } // Delete all records that are overdue the Timestamp expiry amount based on current time ! ofirst_dbquery("DELETE FROM ofirst_messenger_usersonline WHERE Timestamp < '".$TIME."'") or die("DELETE: ".ofirst_dberror()); // Check how many records of users are available and put in user usable variable ! $query = ofirst_dbquery("SELECT * FROM ofirst_messenger_usersonline"); ! $usersonline = "There are currently <b>".ofirst_dbnum_rows($query)."</b> persons on this website! [ <a href='./'>View List</a> ]"; // Check how many people are previewing the same exact script location and put in user usable variable ! $page_query = ofirst_dbquery("SELECT * FROM ofirst_messenger_usersonline WHERE Location = '".$SCRIPT."'"); ! $usersonpage = "There are currently <b>".ofirst_dbnum_rows($page_query)."</b> viewing this page!"; if(isset($user->user)){ *************** *** 72,81 **** // Check if the user has any new Messages ! $query = mysql_query("SELECT * FROM ofirst_messenger_messages WHERE Status = 'New' AND Receiver = '".$user->user."'") or die(mysql_error()); ! $messages = mysql_num_rows($query); // Update Message status so they don't show after the person requests the next page ! mysql_query("UPDATE ofirst_messenger_messages SET Status = 'Read' WHERE Receiver = '".$user->user."'") or die(mysql_error()); // If there are one ore more then one Messages then preview the Message box --- 72,81 ---- // Check if the user has any new Messages ! $query = ofirst_dbquery("SELECT * FROM ofirst_messenger_messages WHERE Status = 'New' AND Receiver = '".$user->user."'") or die(ofirst_dberror()); ! $messages = ofirst_dbnum_rows($query); // Update Message status so they don't show after the person requests the next page ! ofirst_dbquery("UPDATE ofirst_messenger_messages SET Status = 'Read' WHERE Receiver = '".$user->user."'") or die(ofirst_dberror()); // If there are one ore more then one Messages then preview the Message box Index: newmsg.php =================================================================== RCS file: /cvsroot/openfirst/messenger/newmsg.php,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** newmsg.php 20 Aug 2003 16:07:45 -0000 1.7 --- newmsg.php 23 Aug 2003 20:31:57 -0000 1.8 *************** *** 37,41 **** if (isset($_POST['send'])) { ! mysql_query("INSERT INTO ofirst_messenger_messages (Sender,Receiver,Subject,Body, Status, Date) values( '".$user->user."' ,'".$_POST['recip']."' --- 37,41 ---- if (isset($_POST['send'])) { ! ofirst_dbquery("INSERT INTO ofirst_messenger_messages (Sender,Receiver,Subject,Body, Status, Date) values( '".$user->user."' ,'".$_POST['recip']."' *************** *** 43,52 **** ,'".$_POST['body']."' ,'New' ! ,'".time()."')") or die("INSERT ERROR: ".mysql_error()); // Get information about the receiver ! $query = mysql_query("SELECT * FROM ofirst_members WHERE user = '".$_POST['recip']."'") or die(mysql_error()); ! $receiver = mysql_fetch_object($query); // Send mail notification to use via multipart mail function if the function exists already --- 43,52 ---- ,'".$_POST['body']."' ,'New' ! ,'".time()."')") or die("INSERT ERROR: ".ofirst_dberror()); // Get information about the receiver ! $query = ofirst_dbquery("SELECT * FROM ofirst_members WHERE user = '".$_POST['recip']."'") or die(ofirst_dberror()); ! $receiver = ofirst_dbfetch_object($query); // Send mail notification to use via multipart mail function if the function exists already *************** *** 80,85 **** if (ISSET($_GET['RECIP'])){ ! $query = mysql_query("SELECT * FROM ofirst_messenger_usersonline WHERE ID = '".$_GET['RECIP']."'"); ! $recipient = mysql_fetch_object($query); echo "<input type='hidden' name='recip' value='".$recipient->Member."'>"; --- 80,85 ---- if (ISSET($_GET['RECIP'])){ ! $query = ofirst_dbquery("SELECT * FROM ofirst_messenger_usersonline WHERE ID = '".$_GET['RECIP']."'"); ! $recipient = ofirst_dbfetch_object($query); echo "<input type='hidden' name='recip' value='".$recipient->Member."'>"; *************** *** 88,95 **** echo "<select name='recip' id='recip'>"; ! $query = mysql_query("SELECT * FROM ofirst_messenger_usersonline"); echo $recipient->Member; ! while($recipient = mysql_fetch_object($query)){ if($recipient->Member != "none"){ echo "<option>".$recipient->Member."<option>"; --- 88,95 ---- echo "<select name='recip' id='recip'>"; ! $query = ofirst_dbquery("SELECT * FROM ofirst_messenger_usersonline"); echo $recipient->Member; ! while($recipient = ofirst_dbfetch_object($query)){ if($recipient->Member != "none"){ echo "<option>".$recipient->Member."<option>"; Index: viewmsg.php =================================================================== RCS file: /cvsroot/openfirst/messenger/viewmsg.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** viewmsg.php 20 Aug 2003 00:40:28 -0000 1.4 --- viewmsg.php 23 Aug 2003 20:31:57 -0000 1.5 *************** *** 36,46 **** // Retrieve recordset based on querystring ID data, then preview the information ! $query = mysql_query("SELECT * FROM ofirst_messenger_messages WHERE ID='".$_GET['ID']."'") or die("SELECT: ".mysql_error()); ! $msg = mysql_fetch_object($query); // Retrieve user information based Message information ! $qsend = mysql_query("SELECT * FROM ofirst_messenger_usersonline WHERE IPAddress='".$msg->Sender."'") or die("SELECT: ".mysql_error()); ! $sender = mysql_fetch_object($qsend); ?> <h1>Viewing Message</h1> --- 36,46 ---- // Retrieve recordset based on querystring ID data, then preview the information ! $query = ofirst_dbquery("SELECT * FROM ofirst_messenger_messages WHERE ID='".$_GET['ID']."'") or die("SELECT: ".ofirst_dberror()); ! $msg = ofirst_dbfetch_object($query); // Retrieve user information based Message information ! $qsend = ofirst_dbquery("SELECT * FROM ofirst_messenger_usersonline WHERE IPAddress='".$msg->Sender."'") or die("SELECT: ".ofirst_dberror()); ! $sender = ofirst_dbfetch_object($qsend); ?> <h1>Viewing Message</h1> |
Update of /cvsroot/openfirst/members In directory sc8-pr-cvs1:/tmp/cvs-serv14123 Modified Files: adduser.php divisions.php links.php logout.php profile.php skills.php updateprofile.php web.php workspace.php Log Message: Replace mysql functions with new database functions, allowing multiple database types to be used easily. Index: adduser.php =================================================================== RCS file: /cvsroot/openfirst/members/adduser.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** adduser.php 12 Aug 2003 05:02:59 -0000 1.4 --- adduser.php 23 Aug 2003 20:31:16 -0000 1.5 *************** *** 36,43 **** if(isset($_POST["ndivision"]) == true && $_POST["ndivision"] != "") { $_POST["division"] = $_POST["ndivision"]; ! $q = mysql_query("INSERT INTO ofirst_divisions (division, description) VALUES ( '" . $_POST["division"] . "', '" . $_POST["divisiondescription"] . "');"); } ! $q = mysql_query("INSERT INTO ofirst_members (user, firstname, lastname, password, membertype, division, year, email, icq, aim, msn, yim, description, signature, picturelocation, team, dateregistered) --- 36,43 ---- if(isset($_POST["ndivision"]) == true && $_POST["ndivision"] != "") { $_POST["division"] = $_POST["ndivision"]; ! $q = ofirst_dbquery("INSERT INTO ofirst_divisions (division, description) VALUES ( '" . $_POST["division"] . "', '" . $_POST["divisiondescription"] . "');"); } ! $q = ofirst_dbquery("INSERT INTO ofirst_members (user, firstname, lastname, password, membertype, division, year, email, icq, aim, msn, yim, description, signature, picturelocation, team, dateregistered) *************** *** 100,105 **** <br><select name="division"> <?php ! $div = mysql_query("SELECT division FROM ofirst_divisions;"); ! while($d = mysql_fetch_object($div)) { echo("<option value='$d->division'>$d->division</option>"); } --- 100,105 ---- <br><select name="division"> <?php ! $div = ofirst_dbquery("SELECT division FROM ofirst_divisions;"); ! while($d = ofirst_dbfetch_object($div)) { echo("<option value='$d->division'>$d->division</option>"); } Index: divisions.php =================================================================== RCS file: /cvsroot/openfirst/members/divisions.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** divisions.php 12 Aug 2003 04:45:57 -0000 1.1 --- divisions.php 23 Aug 2003 20:31:16 -0000 1.2 *************** *** 36,55 **** if(isset($_GET["division"]) == true) { $division = $_GET["division"]; } if($division != "") { ! $div = mysql_fetch_object(mysql_query("SELECT * FROM ofirst_divisions WHERE division='$division';")); echo("<h2>$div->division</h2> <sub><a href='divisions.php?division='>View list of all divisions</a></sub> <p>$div->description</p> <h2>$div->division Division Members</h2>"); ! $members = mysql_query("SELECT user, firstname, lastname, year, dateregistered, lastseen FROM ofirst_members WHERE division='$div->division';"); echo("<table> <tr><th>Full Name</th><th>Year</th><th>Date Registered</th><th>Last Seen</th></tr>"); ! while ($m = mysql_fetch_object($members)) { echo("<tr><td><a href='profile.php?id=$m->user'>$m->firstname $m->lastname</a></td><td>$m->year</td><td>$m->dateregistered</td><td>$m->lastseen</td></tr>"); } } else { ! $d = mysql_query("SELECT * FROM ofirst_divisions;"); echo("<table>"); ! while ($div = mysql_fetch_object($d)) { echo("<tr><th><a href='divisions.php?division=$div->division'>$div->division</a></th><td>$div->description</td></tr>"); } --- 36,55 ---- if(isset($_GET["division"]) == true) { $division = $_GET["division"]; } if($division != "") { ! $div = ofirst_dbfetch_object(ofirst_dbquery("SELECT * FROM ofirst_divisions WHERE division='$division';")); echo("<h2>$div->division</h2> <sub><a href='divisions.php?division='>View list of all divisions</a></sub> <p>$div->description</p> <h2>$div->division Division Members</h2>"); ! $members = ofirst_dbquery("SELECT user, firstname, lastname, year, dateregistered, lastseen FROM ofirst_members WHERE division='$div->division';"); echo("<table> <tr><th>Full Name</th><th>Year</th><th>Date Registered</th><th>Last Seen</th></tr>"); ! while ($m = ofirst_dbfetch_object($members)) { echo("<tr><td><a href='profile.php?id=$m->user'>$m->firstname $m->lastname</a></td><td>$m->year</td><td>$m->dateregistered</td><td>$m->lastseen</td></tr>"); } } else { ! $d = ofirst_dbquery("SELECT * FROM ofirst_divisions;"); echo("<table>"); ! while ($div = ofirst_dbfetch_object($d)) { echo("<tr><th><a href='divisions.php?division=$div->division'>$div->division</a></th><td>$div->description</td></tr>"); } Index: links.php =================================================================== RCS file: /cvsroot/openfirst/members/links.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** links.php 13 Aug 2003 11:52:30 -0000 1.1 --- links.php 23 Aug 2003 20:31:16 -0000 1.2 *************** *** 30,39 **** if (isset($_POST["ncategory"]) == true && isset($user->user) == true && $_POST["ncategory"] != "") { ! $q = mysql_query("INSERT INTO ofirst_resources_categories (category) VALUES ('" . $_POST["ncategory"] . "');"); $_POST["category"] = $_POST["ncategory"]; } if (isset($_POST["address"]) == true && isset($user->user) == true) { ! $q = mysql_query("INSERT INTO ofirst_resources_links (address, name, category, type, creator, date) VALUES ('" . $_POST["address"] . "', '" . $_POST["name"] . "', '" . $_POST["category"] . "', '" . $_POST["type"] . "', '$user->user', '" . date("D M d Y") . "');"); } ?> --- 30,39 ---- if (isset($_POST["ncategory"]) == true && isset($user->user) == true && $_POST["ncategory"] != "") { ! $q = ofirst_dbquery("INSERT INTO ofirst_resources_categories (category) VALUES ('" . $_POST["ncategory"] . "');"); $_POST["category"] = $_POST["ncategory"]; } if (isset($_POST["address"]) == true && isset($user->user) == true) { ! $q = ofirst_dbquery("INSERT INTO ofirst_resources_links (address, name, category, type, creator, date) VALUES ('" . $_POST["address"] . "', '" . $_POST["name"] . "', '" . $_POST["category"] . "', '" . $_POST["type"] . "', '$user->user', '" . date("D M d Y") . "');"); } ?> *************** *** 41,51 **** <h1>Link Listing</h1> <?php ! $cats = mysql_query("SELECT category FROM ofirst_resources_categories;"); ! while($c = mysql_fetch_object($cats)) { echo("<h2>$c->category</h2>"); echo("<table> <tr><th>Type</th><th>Link</th><th>Creator</th><th>Date</th></tr>"); ! $links = mysql_query("SELECT * FROM ofirst_resources_links WHERE category='$c->category';"); ! while($l = mysql_fetch_object($links)) { echo("<tr><td><img src='$l->type' alt=''></td><td><a href='$l->address'>$l->name</a></td><td>$l->creator</td><td>$l->date</td></tr>"); } --- 41,51 ---- <h1>Link Listing</h1> <?php ! $cats = ofirst_dbquery("SELECT category FROM ofirst_resources_categories;"); ! while($c = ofirst_dbfetch_object($cats)) { echo("<h2>$c->category</h2>"); echo("<table> <tr><th>Type</th><th>Link</th><th>Creator</th><th>Date</th></tr>"); ! $links = ofirst_dbquery("SELECT * FROM ofirst_resources_links WHERE category='$c->category';"); ! while($l = ofirst_dbfetch_object($links)) { echo("<tr><td><img src='$l->type' alt=''></td><td><a href='$l->address'>$l->name</a></td><td>$l->creator</td><td>$l->date</td></tr>"); } *************** *** 62,67 **** <tr><th>Category</th><td> <select name='category'>"); ! $cats = mysql_query("SELECT category FROM ofirst_resources_categories;"); ! while($c = mysql_fetch_object($cats)) { echo("<option value='$c->category'>$c->category</option>"); } --- 62,67 ---- <tr><th>Category</th><td> <select name='category'>"); ! $cats = ofirst_dbquery("SELECT category FROM ofirst_resources_categories;"); ! while($c = ofirst_dbfetch_object($cats)) { echo("<option value='$c->category'>$c->category</option>"); } *************** *** 70,75 **** <tr><th>Type of Document</th><td> <select name='type'>"); ! $types = mysql_query("SELECT image, description FROM ofirst_workspace_filetypes GROUP BY description ORDER BY description;"); ! while ($type = mysql_fetch_object($types)) { if($type->description == "HTML Page") { echo("<option value='$type->image' selected='selected'>$type->description</option>"); --- 70,75 ---- <tr><th>Type of Document</th><td> <select name='type'>"); ! $types = ofirst_dbquery("SELECT image, description FROM ofirst_workspace_filetypes GROUP BY description ORDER BY description;"); ! while ($type = ofirst_dbfetch_object($types)) { if($type->description == "HTML Page") { echo("<option value='$type->image' selected='selected'>$type->description</option>"); Index: logout.php =================================================================== RCS file: /cvsroot/openfirst/members/logout.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** logout.php 23 Jul 2003 13:26:42 -0000 1.4 --- logout.php 23 Aug 2003 20:31:16 -0000 1.5 *************** *** 34,39 **** <h1>Logged Out</h1> <?php ! $q = mysql_query("UPDATE ofirst_members SET authcode = NULL WHERE user='$user->user';"); ! echo(mysql_error()); @session_start(); @session_destroy(); --- 34,39 ---- <h1>Logged Out</h1> <?php ! $q = ofirst_dbquery("UPDATE ofirst_members SET authcode = NULL WHERE user='$user->user';"); ! echo(ofirst_dberror()); @session_start(); @session_destroy(); Index: profile.php =================================================================== RCS file: /cvsroot/openfirst/members/profile.php,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** profile.php 12 Aug 2003 17:47:25 -0000 1.10 --- profile.php 23 Aug 2003 20:31:16 -0000 1.11 *************** *** 90,98 **** if($_GET["orderby"] == "") { $_GET["orderby"] = "user"; } if(isset($extra) == true && $extra != "") { ! $query = mysql_query("SELECT * FROM ofirst_members where " . $_GET["orderby"] . " is NOT NULL $extra ORDER BY " . $_GET["orderby"] . ";"); } else { ! $query = mysql_query("SELECT * FROM ofirst_members where " . $_GET["orderby"] . " is NOT NULL ORDER BY " . $_GET["orderby"] . ";"); } ! while($q = mysql_fetch_object($query)) { echo("<tr><td><a href='profile.php?id=$q->user'>$q->user</a></td><td>$q->team</td>"); if($q->email != "") { echo("<td><img src='email.png' alt='email available' /></td>"); } else { echo("<td></td>"); } --- 90,98 ---- if($_GET["orderby"] == "") { $_GET["orderby"] = "user"; } if(isset($extra) == true && $extra != "") { ! $query = ofirst_dbquery("SELECT * FROM ofirst_members where " . $_GET["orderby"] . " is NOT NULL $extra ORDER BY " . $_GET["orderby"] . ";"); } else { ! $query = ofirst_dbquery("SELECT * FROM ofirst_members where " . $_GET["orderby"] . " is NOT NULL ORDER BY " . $_GET["orderby"] . ";"); } ! while($q = ofirst_dbfetch_object($query)) { echo("<tr><td><a href='profile.php?id=$q->user'>$q->user</a></td><td>$q->team</td>"); if($q->email != "") { echo("<td><img src='email.png' alt='email available' /></td>"); } else { echo("<td></td>"); } *************** *** 107,112 **** <?php } else { ! $query = mysql_query("SELECT * FROM ofirst_members WHERE user='" . $_GET["id"] . "';"); ! while($q = mysql_fetch_object($query)) { if (function_exists('emoticon_translate')) { --- 107,112 ---- <?php } else { ! $query = ofirst_dbquery("SELECT * FROM ofirst_members WHERE user='" . $_GET["id"] . "';"); ! while($q = ofirst_dbfetch_object($query)) { if (function_exists('emoticon_translate')) { Index: skills.php =================================================================== RCS file: /cvsroot/openfirst/members/skills.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** skills.php 28 Jun 2003 03:01:25 -0000 1.2 --- skills.php 23 Aug 2003 20:31:16 -0000 1.3 *************** *** 44,52 **** } $query = "UPDATE ofirst_members SET skills='$skilled' WHERE user='$user->user';"; ! $q = mysql_query($query); unset($q); $query = "SELECT * FROM ofirst_members WHERE user='$user->user';"; ! $q = mysql_query($query); ! $user = mysql_fetch_object($q); echo("Updated Skills"); --- 44,52 ---- } $query = "UPDATE ofirst_members SET skills='$skilled' WHERE user='$user->user';"; ! $q = ofirst_dbquery($query); unset($q); $query = "SELECT * FROM ofirst_members WHERE user='$user->user';"; ! $q = ofirst_dbquery($query); ! $user = ofirst_dbfetch_object($q); echo("Updated Skills"); Index: updateprofile.php =================================================================== RCS file: /cvsroot/openfirst/members/updateprofile.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** updateprofile.php 12 Aug 2003 05:02:59 -0000 1.4 --- updateprofile.php 23 Aug 2003 20:31:16 -0000 1.5 *************** *** 33,39 **** if(isset($_POST["ndivision"]) == true && $_POST["ndivision"] != "") { $_POST["division"] = $_POST["ndivision"]; ! $q = mysql_query("INSERT INTO ofirst_divisions (division) VALUES ( '" . $_POST["division"] . "');"); ! $q = mysql_query("UPDATE ofirst_divisions SET description='" . $_POST["divisiondescription"] . "' WHERE division='" . $_POST["division"] . "';"); } $query = "UPDATE ofirst_members SET firstname='" . $_POST["firstname"] . "', lastname='" . $_POST["lastname"] . "' --- 33,39 ---- if(isset($_POST["ndivision"]) == true && $_POST["ndivision"] != "") { $_POST["division"] = $_POST["ndivision"]; ! $q = ofirst_dbquery("INSERT INTO ofirst_divisions (division) VALUES ( '" . $_POST["division"] . "');"); ! $q = ofirst_dbquery("UPDATE ofirst_divisions SET description='" . $_POST["divisiondescription"] . "' WHERE division='" . $_POST["division"] . "';"); } $query = "UPDATE ofirst_members SET firstname='" . $_POST["firstname"] . "', lastname='" . $_POST["lastname"] . "' *************** *** 42,49 **** $_POST["yim"] . "', signature='" . $_POST["signature"] . "', description='" . $_POST["description"] . "', picturelocation='" . $_POST["picturelocation"] . "' WHERE user='$user->user';"; ! $q = mysql_query($query); if(isset($_POST["password"]) == true && isset($_POST["cpassword"]) == true) { if($_POST["password"] == $_POST["cpassword"] && $_POST["password"] != "") { ! $query = mysql_query("UPDATE ofirst_members SET password='" . cryptpassword($_POST["password"], $encryption) ."' WHERE user='$user->user';"); echo("Password Changed."); } elseif ($_POST["password"] != $_POST["cpassword"]) { --- 42,49 ---- $_POST["yim"] . "', signature='" . $_POST["signature"] . "', description='" . $_POST["description"] . "', picturelocation='" . $_POST["picturelocation"] . "' WHERE user='$user->user';"; ! $q = ofirst_dbquery($query); if(isset($_POST["password"]) == true && isset($_POST["cpassword"]) == true) { if($_POST["password"] == $_POST["cpassword"] && $_POST["password"] != "") { ! $query = ofirst_dbquery("UPDATE ofirst_members SET password='" . cryptpassword($_POST["password"], $encryption) ."' WHERE user='$user->user';"); echo("Password Changed."); } elseif ($_POST["password"] != $_POST["cpassword"]) { *************** *** 70,75 **** Existing: <br><select name='division'>"); ! $div = mysql_query("SELECT division FROM ofirst_divisions;"); ! while($d = mysql_fetch_object($div)) { echo("<option value='$d->division'"); if($d->division == $user->division) { echo(" selected='selected'"); } --- 70,75 ---- Existing: <br><select name='division'>"); ! $div = ofirst_dbquery("SELECT division FROM ofirst_divisions;"); ! while($d = ofirst_dbfetch_object($div)) { echo("<option value='$d->division'"); if($d->division == $user->division) { echo(" selected='selected'"); } Index: web.php =================================================================== RCS file: /cvsroot/openfirst/members/web.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** web.php 12 Aug 2003 17:09:14 -0000 1.1 --- web.php 23 Aug 2003 20:31:16 -0000 1.2 *************** *** 32,36 **** $user = substr($_GET["uri"],1, strpos($_GET["uri"], "/", 2) - 1); $file = substr($_GET["uri"],strlen($user) + 2, strlen($_GET["uri"]) - strlen($user)); ! $vfs = mysql_fetch_object(mysql_query("SELECT virtfspath FROM ofirst_workspace_users WHERE user='$user';")); $vfs = $vfs->virtfspath . "www/"; if(substr($file, -1, 1) == "/") { $file .= "index.html"; } --- 32,36 ---- $user = substr($_GET["uri"],1, strpos($_GET["uri"], "/", 2) - 1); $file = substr($_GET["uri"],strlen($user) + 2, strlen($_GET["uri"]) - strlen($user)); ! $vfs = ofirst_dbfetch_object(ofirst_dbquery("SELECT virtfspath FROM ofirst_workspace_users WHERE user='$user';")); $vfs = $vfs->virtfspath . "www/"; if(substr($file, -1, 1) == "/") { $file .= "index.html"; } Index: workspace.php =================================================================== RCS file: /cvsroot/openfirst/members/workspace.php,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** workspace.php 20 Aug 2003 15:25:28 -0000 1.8 --- workspace.php 23 Aug 2003 20:31:16 -0000 1.9 *************** *** 34,39 **** // Get important data used throughout this. ! $wsu = mysql_query("SELECT * FROM ofirst_workspace_users WHERE user='$user->user';"); ! $ws = mysql_fetch_object($wsu); if(isset($_GET["action"]) == true && $_GET["action"] == "view" && isset($_GET["view"]) == true) { --- 34,39 ---- // Get important data used throughout this. ! $wsu = ofirst_dbquery("SELECT * FROM ofirst_workspace_users WHERE user='$user->user';"); ! $ws = ofirst_dbfetch_object($wsu); if(isset($_GET["action"]) == true && $_GET["action"] == "view" && isset($_GET["view"]) == true) { *************** *** 41,45 **** $file = $ws->virtfspath . "/" . $_GET["file"]; } else { ! $vfs = mysql_fetch_object(mysql_query("SELECT virtfspath FROM ofirst_workspace_users WHERE user='" . $_GET["owner"] . "';")); $file = $vfs->virtfspath; } --- 41,45 ---- $file = $ws->virtfspath . "/" . $_GET["file"]; } else { ! $vfs = ofirst_dbfetch_object(ofirst_dbquery("SELECT virtfspath FROM ofirst_workspace_users WHERE user='" . $_GET["owner"] . "';")); $file = $vfs->virtfspath; } *************** *** 59,66 **** function fileicon ($extension='unknown') { $extension = strtolower($extension); ! $query = mysql_query("SELECT * FROM ofirst_workspace_filetypes WHERE extension='$extension';"); ! if (mysql_num_rows($query) != 0){ ! while ($fi = mysql_fetch_object($query)) { return("<img src='$fi->image' alt='$fi->description' title='$fi->description'>"); } --- 59,66 ---- function fileicon ($extension='unknown') { $extension = strtolower($extension); ! $query = ofirst_dbquery("SELECT * FROM ofirst_workspace_filetypes WHERE extension='$extension';"); ! if (ofirst_dbnum_rows($query) != 0){ ! while ($fi = ofirst_dbfetch_object($query)) { return("<img src='$fi->image' alt='$fi->description' title='$fi->description'>"); } *************** *** 73,77 **** if(isset($_POST["action"]) == true && $_POST["action"] == "modify") { echo("Your modifications to "" . $_POST["file"] . "" have been made [ <a href='workspace.php'>Return to workspace</a> ]"); ! $vfs = mysql_fetch_object(mysql_query("SELECT virtfspath FROM ofirst_workspace_users WHERE user='" . $_POST["owner"] . "';")); $fi = fopen($vfs->virtfspath . "/" . $_POST["filepath"] . "/" . $_POST["file"], 'w'); fputs($fi, $_POST["newdata"]); --- 73,77 ---- if(isset($_POST["action"]) == true && $_POST["action"] == "modify") { echo("Your modifications to "" . $_POST["file"] . "" have been made [ <a href='workspace.php'>Return to workspace</a> ]"); ! $vfs = ofirst_dbfetch_object(ofirst_dbquery("SELECT virtfspath FROM ofirst_workspace_users WHERE user='" . $_POST["owner"] . "';")); $fi = fopen($vfs->virtfspath . "/" . $_POST["filepath"] . "/" . $_POST["file"], 'w'); fputs($fi, $_POST["newdata"]); *************** *** 79,83 **** die(include($footer)); } elseif ($_POST["action"] == "setperm") { ! mysql_query("UPDATE ofirst_workspace_files SET permissions='" . $_POST["userperm"] . $_POST["groupperm"] . $_POST["otherperm"] . "' WHERE name='" . $_POST["file"] . "' AND owner='" . $_POST["owner"] . "' AND location='" . $_POST["filepath"] . "';"); echo("Permissions on file "" . $_POST["file"] . "" have been modified. [ <a href='workspace.php'>Return to workspace</a> ]"); die(include($footer)); --- 79,83 ---- die(include($footer)); } elseif ($_POST["action"] == "setperm") { ! ofirst_dbquery("UPDATE ofirst_workspace_files SET permissions='" . $_POST["userperm"] . $_POST["groupperm"] . $_POST["otherperm"] . "' WHERE name='" . $_POST["file"] . "' AND owner='" . $_POST["owner"] . "' AND location='" . $_POST["filepath"] . "';"); echo("Permissions on file "" . $_POST["file"] . "" have been modified. [ <a href='workspace.php'>Return to workspace</a> ]"); die(include($footer)); *************** *** 85,89 **** if(isset($_POST["action"]) == true && $_POST["action"] == "makedirectory") { mkdir(getcwd() . "/virtfs/$user->user/$filepath/" . $_POST["directory"]); ! $uf = mysql_query("INSERT INTO ofirst_workspace_files (size, location, owner, permissions, date, description, filetype, name) VALUES('0', '$filepath', '$user->user', 'drw-------', '" . date('D M d Y h:m:s') . "', 'Sub Directory', 'dir-" . $_POST["directorytype"] . "', '" . $_POST["directory"] . "');"); echo("Sub directory Created [<a href='workspace.php?filepath=$filepath'>Return to Workspace</a> ]"); --- 85,89 ---- if(isset($_POST["action"]) == true && $_POST["action"] == "makedirectory") { mkdir(getcwd() . "/virtfs/$user->user/$filepath/" . $_POST["directory"]); ! $uf = ofirst_dbquery("INSERT INTO ofirst_workspace_files (size, location, owner, permissions, date, description, filetype, name) VALUES('0', '$filepath', '$user->user', 'drw-------', '" . date('D M d Y h:m:s') . "', 'Sub Directory', 'dir-" . $_POST["directorytype"] . "', '" . $_POST["directory"] . "');"); echo("Sub directory Created [<a href='workspace.php?filepath=$filepath'>Return to Workspace</a> ]"); *************** *** 97,101 **** die(include($footer)); } elseif($_GET["action"] == "delete" && isset($_GET["confirmed"]) == true) { ! $del = mysql_query("DELETE FROM ofirst_workspace_files WHERE name='" . $_GET["file"] . "' AND owner='$user->user' AND location='" . $_GET["filepath"] . "';"); unlink($ws->virtfspath . "/" . $_GET["file"]); echo("The file <strong>"" . $_GET["file"] . ""</strong> has been deleted. [ <a href='workspace.php'>Workspace</a> ]"); --- 97,101 ---- die(include($footer)); } elseif($_GET["action"] == "delete" && isset($_GET["confirmed"]) == true) { ! $del = ofirst_dbquery("DELETE FROM ofirst_workspace_files WHERE name='" . $_GET["file"] . "' AND owner='$user->user' AND location='" . $_GET["filepath"] . "';"); unlink($ws->virtfspath . "/" . $_GET["file"]); echo("The file <strong>"" . $_GET["file"] . ""</strong> has been deleted. [ <a href='workspace.php'>Workspace</a> ]"); *************** *** 107,111 **** // Handle directory deletion if($_GET["action"] == "removedirectory" && isset($_GET["confirmed"]) == true) { ! $del = mysql_query("DELETE FROM ofirst_workspace_files WHERE name='" . $_GET["directory"] . "' AND owner='$user->user' AND location='" . $_GET["filepath"] ."';"); // deldir() based on code originally written by: fl...@cu... --- 107,111 ---- // Handle directory deletion if($_GET["action"] == "removedirectory" && isset($_GET["confirmed"]) == true) { ! $del = ofirst_dbquery("DELETE FROM ofirst_workspace_files WHERE name='" . $_GET["directory"] . "' AND owner='$user->user' AND location='" . $_GET["filepath"] ."';"); // deldir() based on code originally written by: fl...@cu... *************** *** 141,145 **** // Handle file modification if($_GET["action"] == "modify") { ! $fi = mysql_fetch_object(mysql_query("SELECT * FROM ofirst_workspace_files WHERE name='" . $_GET["file"] . "' AND location='" . $_GET["filepath"] . "' AND owner='" . $_GET["owner"] . "';")); echo("<h1>Modify " . $_GET["file"] . "</h1> <table style='width: 500px;'> --- 141,145 ---- // Handle file modification if($_GET["action"] == "modify") { ! $fi = ofirst_dbfetch_object(ofirst_dbquery("SELECT * FROM ofirst_workspace_files WHERE name='" . $_GET["file"] . "' AND location='" . $_GET["filepath"] . "' AND owner='" . $_GET["owner"] . "';")); echo("<h1>Modify " . $_GET["file"] . "</h1> <table style='width: 500px;'> *************** *** 148,155 **** <tr><th>File Name</th><td>" . $_GET["file"] . "</td></tr> <tr><th>File Type</th><td>"); ! $query = mysql_query("SELECT * FROM ofirst_workspace_filetypes WHERE extension='$fi->filetype';"); ! if (mysql_num_rows($query) != 0){ ! while ($fil = mysql_fetch_object($query)) { echo("<img src='$fil->image' alt='$fil->description' title='$fil->description'><br>$fil->description"); $fimg = $fil->image; --- 148,155 ---- <tr><th>File Name</th><td>" . $_GET["file"] . "</td></tr> <tr><th>File Type</th><td>"); ! $query = ofirst_dbquery("SELECT * FROM ofirst_workspace_filetypes WHERE extension='$fi->filetype';"); ! if (ofirst_dbnum_rows($query) != 0){ ! while ($fil = ofirst_dbfetch_object($query)) { echo("<img src='$fil->image' alt='$fil->description' title='$fil->description'><br>$fil->description"); $fimg = $fil->image; *************** *** 197,201 **** echo("<form method='post' action='workspace.php'>"); echo("<textarea name='newdata' style='width: 275px; height: 125px;'>"); ! $vfs = mysql_fetch_object(mysql_query("SELECT virtfspath FROM ofirst_workspace_users WHERE user='" . $_GET["owner"] . "';")); $fi = fopen($vfs->virtfspath . "/" . $_GET["filepath"] . "/" . $_GET["file"], 'r'); htmlentities(fpassthru($fi)); --- 197,201 ---- echo("<form method='post' action='workspace.php'>"); echo("<textarea name='newdata' style='width: 275px; height: 125px;'>"); ! $vfs = ofirst_dbfetch_object(ofirst_dbquery("SELECT virtfspath FROM ofirst_workspace_users WHERE user='" . $_GET["owner"] . "';")); $fi = fopen($vfs->virtfspath . "/" . $_GET["filepath"] . "/" . $_GET["file"], 'r'); htmlentities(fpassthru($fi)); *************** *** 222,234 **** // Handle file viewing (complete with information on what viewer to use to open the file) if($_GET["action"] == "view" && isset($_GET["view"]) == false) { ! $fi = mysql_fetch_object(mysql_query("SELECT * FROM ofirst_workspace_files WHERE name='" . $_GET["file"] . "' AND location='" . $_GET["filepath"] . "' AND owner='" . $_GET["owner"] . "';")); echo("<h1>View " . $_GET["file"] . "</h1> <table> <tr><th>File Name</th><td>" . $_GET["file"] . "</td></tr> <tr><th>File Type</th><td>"); ! $query = mysql_query("SELECT * FROM ofirst_workspace_filetypes WHERE extension='$fi->filetype';"); ! if (mysql_num_rows($query) != 0){ ! while ($fil = mysql_fetch_object($query)) { echo("<img src='$fil->image' alt='$fil->description' title='$fil->description'> $fil->description"); } --- 222,234 ---- // Handle file viewing (complete with information on what viewer to use to open the file) if($_GET["action"] == "view" && isset($_GET["view"]) == false) { ! $fi = ofirst_dbfetch_object(ofirst_dbquery("SELECT * FROM ofirst_workspace_files WHERE name='" . $_GET["file"] . "' AND location='" . $_GET["filepath"] . "' AND owner='" . $_GET["owner"] . "';")); echo("<h1>View " . $_GET["file"] . "</h1> <table> <tr><th>File Name</th><td>" . $_GET["file"] . "</td></tr> <tr><th>File Type</th><td>"); ! $query = ofirst_dbquery("SELECT * FROM ofirst_workspace_filetypes WHERE extension='$fi->filetype';"); ! if (ofirst_dbnum_rows($query) != 0){ ! while ($fil = ofirst_dbfetch_object($query)) { echo("<img src='$fil->image' alt='$fil->description' title='$fil->description'> $fil->description"); } *************** *** 254,258 **** $name = str_replace("&", "and", $name); copy($filename, "$ws->virtfspath/" . $_POST["filepath"] . "/$name"); ! $uf = mysql_query("INSERT INTO ofirst_workspace_files (size, location, owner, division, permissions, date, description, filetype, name) VALUES('" .( filesize("$ws->virtfspath/" . $_POST["filepath"] . "/$name") / 1024). "', '" . $_POST["filepath"] . "', '$user->user', '" . $_POST["division"] . "', '" . $_POST["userperm"] . $_POST["groupperm"] . $_POST["otherperm"] . "', '" . date('D M d Y h:m:s') . "', '" . $_POST["description"] . "', '" . strtolower(substr($name, strrpos($name, ".") +1)) . "', '$name');"); echo("File "$name" has been uploaded successfully. [ <a href='workspace.php'>Workspace</a> | <a href='workspace.php?file=$name&action=view&filepath=" . $_POST["filepath"] ."'>View</a> ]"); die(include($footer)); --- 254,258 ---- $name = str_replace("&", "and", $name); copy($filename, "$ws->virtfspath/" . $_POST["filepath"] . "/$name"); ! $uf = ofirst_dbquery("INSERT INTO ofirst_workspace_files (size, location, owner, division, permissions, date, description, filetype, name) VALUES('" .( filesize("$ws->virtfspath/" . $_POST["filepath"] . "/$name") / 1024). "', '" . $_POST["filepath"] . "', '$user->user', '" . $_POST["division"] . "', '" . $_POST["userperm"] . $_POST["groupperm"] . $_POST["otherperm"] . "', '" . date('D M d Y h:m:s') . "', '" . $_POST["description"] . "', '" . strtolower(substr($name, strrpos($name, ".") +1)) . "', '$name');"); echo("File "$name" has been uploaded successfully. [ <a href='workspace.php'>Workspace</a> | <a href='workspace.php?file=$name&action=view&filepath=" . $_POST["filepath"] ."'>View</a> ]"); die(include($footer)); *************** *** 262,267 **** <h1>Personal Workspace</h1> <p><?php ! $files = mysql_fetch_object(mysql_query("SELECT SUM(size) as used FROM ofirst_workspace_files WHERE owner='$user->user';")); ! if(mysql_num_rows($wsu) == 1) { ?> <table style="width: 500px;"> --- 262,267 ---- <h1>Personal Workspace</h1> <p><?php ! $files = ofirst_dbfetch_object(ofirst_dbquery("SELECT SUM(size) as used FROM ofirst_workspace_files WHERE owner='$user->user';")); ! if(ofirst_dbnum_rows($wsu) == 1) { ?> <table style="width: 500px;"> *************** *** 278,283 **** </table></td><td> <?php ! $dirs = mysql_query("SELECT * FROM ofirst_workspace_files WHERE permissions like 'd%' AND owner='$user->user' AND location='$filepath';"); ! if(mysql_num_rows($dirs) > 0) { ?> <p><strong>Your Sub Directories (<?php echo($filepath); ?>)</strong></p> --- 278,283 ---- </table></td><td> <?php ! $dirs = ofirst_dbquery("SELECT * FROM ofirst_workspace_files WHERE permissions like 'd%' AND owner='$user->user' AND location='$filepath';"); ! if(ofirst_dbnum_rows($dirs) > 0) { ?> <p><strong>Your Sub Directories (<?php echo($filepath); ?>)</strong></p> *************** *** 285,289 **** <?php echo("<tr><th>Icon</th><th>Name</th><th>Date Created</th><th>Actions</th></tr>"); ! while($d = mysql_fetch_object($dirs)) { echo("<tr><td>" . fileicon($d->filetype) . "</td><td><a href='workspace.php?filepath=$d->location$d->name'>$d->name</a></td><td>$d->date</td><td><a href='workspace.php?action=removedirectory&directory=$d->name&filepath=$filepath'>Remove Directory</a></td></tr>"); } --- 285,289 ---- <?php echo("<tr><th>Icon</th><th>Name</th><th>Date Created</th><th>Actions</th></tr>"); ! while($d = ofirst_dbfetch_object($dirs)) { echo("<tr><td>" . fileicon($d->filetype) . "</td><td><a href='workspace.php?filepath=$d->location$d->name'>$d->name</a></td><td>$d->date</td><td><a href='workspace.php?action=removedirectory&directory=$d->name&filepath=$filepath'>Remove Directory</a></td></tr>"); } *************** *** 296,302 **** <table> <?php ! $files = mysql_query("SELECT * FROM ofirst_workspace_files WHERE permissions not like 'd%' AND owner='$user->user' AND location='$filepath';"); echo("<tr><th>File Type</th><th>Name</th><th>Division</th><th>Permissions</th><th>Date</th><th>Description</th> <th>Actions</th></tr>"); ! while($file = mysql_fetch_object($files)) { $file->name = str_replace("\"", """, $file->name); echo("<tr><td>" . fileicon($file->filetype) . "</td><td>$file->name</td><td>$file->division</td> --- 296,302 ---- <table> <?php ! $files = ofirst_dbquery("SELECT * FROM ofirst_workspace_files WHERE permissions not like 'd%' AND owner='$user->user' AND location='$filepath';"); echo("<tr><th>File Type</th><th>Name</th><th>Division</th><th>Permissions</th><th>Date</th><th>Description</th> <th>Actions</th></tr>"); ! while($file = ofirst_dbfetch_object($files)) { $file->name = str_replace("\"", """, $file->name); echo("<tr><td>" . fileicon($file->filetype) . "</td><td>$file->name</td><td>$file->division</td> *************** *** 358,363 **** <tr><th>File</th><td> <input name="userfile[]" type="file"></td></tr> <tr><th>Division</th><td><select name="division"><?php ! $d = mysql_query("SELECT division FROM ofirst_divisions;"); ! while($di = mysql_fetch_object($d)) { if($di->division == $user->division) { echo("<option value='$di->division' selected='selected'>$di->division</option>"); --- 358,363 ---- <tr><th>File</th><td> <input name="userfile[]" type="file"></td></tr> <tr><th>Division</th><td><select name="division"><?php ! $d = ofirst_dbquery("SELECT division FROM ofirst_divisions;"); ! while($di = ofirst_dbfetch_object($d)) { if($di->division == $user->division) { echo("<option value='$di->division' selected='selected'>$di->division</option>"); *************** *** 398,405 **** <table> <?php ! $files = mysql_query("SELECT * FROM ofirst_workspace_files WHERE permissions like '____r%';"); echo("<tr><th>File Type</th><th>Name</th><th>Owner</th><th>Division</th><th>Permissions</th><th>Date</th><th>Description</th> <th>Actions</th></tr>"); ! while($file = mysql_fetch_object($files)) { echo("<tr><td>" . fileicon($file->filetype) . "</td><td>$file->name</td><td>$file->owner</td><td>$file->division</td> --- 398,405 ---- <table> <?php ! $files = ofirst_dbquery("SELECT * FROM ofirst_workspace_files WHERE permissions like '____r%';"); echo("<tr><th>File Type</th><th>Name</th><th>Owner</th><th>Division</th><th>Permissions</th><th>Date</th><th>Description</th> <th>Actions</th></tr>"); ! while($file = ofirst_dbfetch_object($files)) { echo("<tr><td>" . fileicon($file->filetype) . "</td><td>$file->name</td><td>$file->owner</td><td>$file->division</td> *************** *** 415,422 **** <table> <?php ! $files = mysql_query("SELECT * FROM ofirst_workspace_files WHERE permissions like '%r__';"); echo("<tr><th>File Type</th><th>Name</th><th>Owner</th><th>Division</th><th>Permissions</th><th>Date</th><th>Description</th> <th>Actions</th></tr>"); ! while($file = mysql_fetch_object($files)) { echo("<tr><td>" . fileicon($file->filetype) . "</td><td>$file->name</td><td>$file->owner</td><td>$file->division</td> --- 415,422 ---- <table> <?php ! $files = ofirst_dbquery("SELECT * FROM ofirst_workspace_files WHERE permissions like '%r__';"); echo("<tr><th>File Type</th><th>Name</th><th>Owner</th><th>Division</th><th>Permissions</th><th>Date</th><th>Description</th> <th>Actions</th></tr>"); ! while($file = ofirst_dbfetch_object($files)) { echo("<tr><td>" . fileicon($file->filetype) . "</td><td>$file->name</td><td>$file->owner</td><td>$file->division</td> *************** *** 436,448 **** if(isset($_GET["activate"]) == true && $_GET["activate"] == true) { if(is_writable(getcwd() . "/virtfs/") == true) { ! mysql_query("INSERT INTO ofirst_workspace_users (quota, user, virtfspath, frozen) VALUES('10', '$user->user', '" . getcwd() . "/virtfs/$user->user/', '0');"); mkdir(getcwd() . "/virtfs/$user->user/"); mkdir(getcwd() . "/virtfs/$user->user/www/"); mkdir(getcwd() . "/virtfs/$user->user/$filepath/" . $_POST["directory"]); ! $uf = mysql_query("INSERT INTO ofirst_workspace_files (size, location, owner, permissions, date, description, filetype, name) VALUES('0', '$filepath', '$user->user', 'drw-------', '" . date('D M d Y h:m:s') . "', 'Web Site Directory', 'dir-folder_html.png', 'www');"); ! $uf = mysql_query("INSERT INTO ofirst_workspace_files (size, location, owner, permissions, date, description, filetype, name) VALUES('0', '/www', '$user->user', '-rw-------', '" . date('D M d Y h:m:s') . "', 'Main Page for Personal Web Site', 'html', 'index.html');"); --- 436,448 ---- if(isset($_GET["activate"]) == true && $_GET["activate"] == true) { if(is_writable(getcwd() . "/virtfs/") == true) { ! ofirst_dbquery("INSERT INTO ofirst_workspace_users (quota, user, virtfspath, frozen) VALUES('10', '$user->user', '" . getcwd() . "/virtfs/$user->user/', '0');"); mkdir(getcwd() . "/virtfs/$user->user/"); mkdir(getcwd() . "/virtfs/$user->user/www/"); mkdir(getcwd() . "/virtfs/$user->user/$filepath/" . $_POST["directory"]); ! $uf = ofirst_dbquery("INSERT INTO ofirst_workspace_files (size, location, owner, permissions, date, description, filetype, name) VALUES('0', '$filepath', '$user->user', 'drw-------', '" . date('D M d Y h:m:s') . "', 'Web Site Directory', 'dir-folder_html.png', 'www');"); ! $uf = ofirst_dbquery("INSERT INTO ofirst_workspace_files (size, location, owner, permissions, date, description, filetype, name) VALUES('0', '/www', '$user->user', '-rw-------', '" . date('D M d Y h:m:s') . "', 'Main Page for Personal Web Site', 'html', 'index.html');"); |
From: <xt...@us...> - 2003-08-23 20:31:20
|
Update of /cvsroot/openfirst/members/setup In directory sc8-pr-cvs1:/tmp/cvs-serv14123/setup Added Files: setup.mssql Log Message: Replace mysql functions with new database functions, allowing multiple database types to be used easily. --- NEW FILE: setup.mssql --- INSERT INTO ofirst_config SET modulename='members',showonmenu='0',active='0'; UPDATE ofirst_config SET modulenavigation='<a href="$basepath/members/workspace.php">Workspace</a> | <a href="$basepath/members/divisions.php">Divisions</a> | <a href="$basepath/members/profile.php">Profile</a> | <a href="$basepath/members/links.php">Links</a> | <a href="$basepath/members/skills.php">Skills</a> | <a href="$basepath/members/updateprofile.php">Update Profile</a> | <a href="$basepath/members/logout.php">Logout</a>',adminnavigation='<a href="$basepath/members/adduser.php">Add Users</a> | <a href="$basepath/config/">Configuration</a>' where modulename='members'; CREATE TABLE IF NOT EXISTS ofirst_workspace_users (quota BIGINT, user CHAR(128), virtfspath TEXT, frozen INT(1)); CREATE TABLE IF NOT EXISTS ofirst_workspace_files(size BIGINT, name TEXT, location TEXT, owner TEXT, division TEXT, permissions TEXT, date TEXT, description TEXT, filetype TEXT); DROP TABLE IF EXISTS ofirst_workspace_filetypes; CREATE TABLE IF NOT EXISTS ofirst_workspace_filetypes (extension CHAR(50), image TEXT, description TEXT); CREATE TABLE IF NOT EXISTS ofirst_divisions(division CHAR(50) UNIQUE, description TEXT); INSERT INTO ofirst_divisions (division, description) VALUES('Sample Division', 'A generic division responsible for taking care of everything.'); CREATE TABLE IF NOT EXISTS ofirst_resources_links (address CHAR(255) UNIQUE, name TEXT, category TEXT, type TEXT, creator TEXT, date TEXT); CREATE TABLE IF NOT EXISTS ofirst_resources_categories (category CHAR(250) UNIQUE); INSERT INTO ofirst_resources_categories (category) VALUES ('General'); INSERT INTO ofirst_resources_links (address, name, category, type, creator, date) VALUES('http://www.openfirst.org', 'open FIRST Web Portal System', 'General', 'icons/mimetypes/html.png', 'open FIRST Development Team', ''); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('dir-folder.png', 'icons/filesystems/folder.png', 'Standard Sub Directory'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('dir-folder_green.png', 'icons/filesystems/folder_green.png', 'Standard Sub Directory'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('dir-folder_red.png', 'icons/filesystems/folder_red.png', 'Standard Sub Directory'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('dir-folder_orange.png', 'icons/filesystems/folder_orange.png', 'Standard Sub Directory'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('dir-folder_yellow.png', 'icons/filesystems/folder_yellow.png', 'Standard Sub Directory'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('dir-folder_grey.png', 'icons/filesystems/folder_grey.png', 'Standard Sub Directory'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('dir-folder_violet.png', 'icons/filesystems/folder_violet.png', 'Standard Sub Directory'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('dir-trashcan_full.png', 'icons/filesystems/trashcan_full.png', 'Junk Sub Directory'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('dir-favorites.png', 'icons/filesystems/favorites.png', 'Favourites Sub Directory'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('dir-folder_cool.png', 'icons/filesystems/folder_cool.png', 'Smiley Sub Directory'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('dir-folder_penguin.png', 'icons/filesystems/folder_penguin.png', 'Penguin-ified Sub Directory'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('dir-folder_cd.png', 'icons/filesystems/folder_cd.png', 'CD-ROM Sub Directory'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('dir-folder_home.png', 'icons/filesystems/folder_home.png', 'Home Sub Directory'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('dir-folder_html.png', 'icons/filesystems/folder_html.png', 'Web Sub Directory'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('dir-folder_image.png', 'icons/filesystems/folder_image.png', 'Image Sub Directory'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('dir-folder_important.png', 'icons/filesystems/folder_important.png', 'Important Sub Directory'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('dir-folder_man.png', 'icons/filesystems/folder_man.png', 'Documentation Sub Directory'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('dir-folder_midi.png', 'icons/filesystems/folder_midi.png', 'Midi Sub Directory'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('dir-folder_sound.png', 'icons/filesystems/folder_sound.png', 'Audio Sub Directory'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('dir-folder_tar.png', 'icons/filesystems/folder_tar.png', 'Archive Sub Directory'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('dir-folder_video.png', 'icons/filesystems/folder_video.png', 'Video Sub Directory'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('dir-network_local.png', 'icons/filesystems/network_local.png', 'Network Sub Directory'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('dir-folder_txt.png', 'icons/filesystems/folder_txt.png', 'Text Documents Directory'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('dir-folder_wordprocessing.png', 'icons/filesystems/folder_wordprocessing.png', 'Word Processing Directory'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('unknown', 'icons/mimetypes/unknown.png', 'Unknown file type'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('jpg', 'icons/mimetypes/image.png', 'JPEG Image'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('jpeg', 'icons/mimetypes/image.png', 'JPEG Image'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('spl', 'icons/mimetypes/netscape_doc.png', 'Netscape Shockwave Flash'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('ai', 'icons/mimetypes/postscript.png', 'Adobe Illustrator Document'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('xls', 'icons/mimetypes/spreadsheet.png', 'Microsoft Excel Spreadsheet'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('xlc', 'icons/mimetypes/spreadsheet.png', 'Microsoft Excel Spreadsheet'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('xll', 'icons/mimetypes/spreadsheet.png', 'Microsoft Excel Spreadsheet'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('xlm', 'icons/mimetypes/spreadsheet.png', 'Microsoft Excel Spreadsheet'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('xlw', 'icons/mimetypes/spreadsheet.png', 'Microsoft Excel Spreadsheet'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('ppt', 'icons/mimetypes/document.png', 'Microsoft PowerPoint Document'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('ppz', 'icons/mimetypes/document.png', 'Microsoft PowerPoint Document'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('pdf', 'icons/mimetypes/pdf.png', 'PDF Document'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('pgp', 'icons/mimetypes/file_locked.png', 'PGP/MIME Encrypted Message Header'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('gpg', 'icons/mimetypes/file_locked.png', 'PGP/MIME Encrypted Message Header'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('asc', 'icons/mimetypes/file_locked.png', 'PGP/MIME Encrypted Message Header'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('p10', 'icons/mimetypes/mime.png', 'S/MIME Certification Request'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('p7m', 'icons/mimetypes/file_locked.png', 'PKCS#7 (S/MIME) Formatted Data'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('p7c', 'icons/mimetypes/file_locked.png', 'PKCS#7 (S/MIME) Formatted Data'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('ps', 'icons/mimetypes/postscript.png', 'PostScript Document'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('sdp', 'icons/mimetypes/real.png', 'RealPlayer File'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('smil', 'icons/mimetypes/real.png', 'RealPlayer File'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('smi', 'icons/mimetypes/real.png', 'RealPlayer File'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('asf', 'icons/mimetypes/video.png', 'ASF Media'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('rm', 'icons/mimetypes/real.png', 'RealPlayer File'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('af', 'icons/mimetypes/real.png', 'RealPlayer File'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('au', 'icons/mimetypes/real.png', 'RealPlayer File'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('ra', 'icons/mimetypes/real.png', 'RealPlayer File'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('ram', 'icons/mimetypes/real.png', 'RealPlayer File'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('rmm', 'icons/mimetypes/real.png', 'RealPlayer File'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('aiff', 'icons/mimetypes/real.png', 'RealPlayer File'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('au', 'icons/mimetypes/sound.png', 'ULAW (Sun) Audio'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('snd', 'icons/mimetypes/sound.png', 'ULAW (Sun) Audio'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('kar', 'icons/mimetypes/sound.png', 'Karaoke file'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('mid', 'icons/mimetypes/midi.png', 'MIDI Audio'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('midi', 'icons/mimetypes/midi.png', 'MIDI Audio'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('mod', 'icons/mimetypes/sound.png', 'Amiga Soundtracker Audio'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('s3m', 'icons/mimetypes/sound.png', 'Amiga Soundtracker Audio'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('stm', 'icons/mimetypes/sound.png', 'Amiga Soundtracker Audio'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('ult', 'icons/mimetypes/sound.png', 'Amiga Soundtracker Audio'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('uni', 'icons/mimetypes/sound.png', 'Amiga Soundtracker Audio'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('xm', 'icons/mimetypes/sound.png', 'Amiga Soundtracker Audio'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('m15', 'icons/mimetypes/sound.png', 'Amiga Soundtracker Audio'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('mtm', 'icons/mimetypes/sound.png', 'Amiga Soundtracker Audio'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('669', 'icons/mimetypes/sound.png', 'Amiga Soundtracker Audio'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('it', 'icons/mimetypes/sound.png', 'Amiga Soundtracker Audio'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('mp3', 'icons/mimetypes/sound.png', 'MPEG Layer 3 Audio'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('m3u', 'icons/mimetypes/sound.png', 'Streaming MPEG Layer 3 Audio'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('pls', 'icons/mimetypes/sound.png', 'MP3 ShoutCast Playlist'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('wav', 'icons/mimetypes/sound.png', 'WAV Audio'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('mpg', 'icons/mimetypes/video.png', 'MPEG Video'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('mpeg', 'icons/mimetypes/video.png', 'MPEG Video'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('qt', 'icons/mimetypes/video.png', 'QuickTime Video'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('mov', 'icons/mimetypes/video.png', 'QuickTime Video'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('moov', 'icons/mimetypes/video.png', 'QuickTime Video'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('qtvr', 'icons/mimetypes/video.png', 'QuickTime Video'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('rv', 'icons/mimetypes/real.png', 'RealPlayer Video'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('fli', 'icons/mimetypes/video.png', 'Autodesk FLIC File'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('flc', 'icons/mimetypes/video.png', 'Autodesk FLIC File'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('mng', 'icons/mimetypes/images.png', 'MNG Image'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('avi', 'icons/mimetypes/video.png', 'Microsoft AVI Video'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('ics', 'icons/mimetypes/vcalendar.png', 'iCalendar File'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('css', 'icons/mimetypes/txt.png', 'Cascading Style Sheet'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('cssl', 'icons/mimetypes/txt.png', 'Cascading Style Sheet'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('readme', 'icons/mimetypes/txt.png', 'English Text'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('html', 'icons/mimetypes/html.png', 'HTML Page'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('htm', 'icons/mimetypes/html.png', 'HTML Page'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('mrml', 'icons/mimetypes/html.png', 'Multimedia Retrieval Markup Language Document'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('txt', 'icons/mimetypes/txt.png', 'Plain Text'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('eml', 'icons/mimetypes/message.png', 'E-mail message'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('wsz', 'icons/mimetypes/colorscm.png', 'Compressed Winamp skin'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('xhtml', 'icons/mimetypes/html.png', 'XHTML Family Document'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('zoo', 'icons/mimetypes/tgz.png', 'Zoo Archive'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('zip', 'icons/mimetypes/tgz.png', 'Zip Archive'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('tar.lzo', 'icons/mimetypes/tgz.png', 'Lzopped Tar Archive'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('lzo', 'icons/mimetypes/tgz.png', 'Lzopped File'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('tzo', 'icons/mimetypes/tgz.png', 'Lzopped Tar Archive'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('tgz', 'icons/mimetypes/tgz.png', 'Gzipped Tar Archive'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('tar.gz', 'icons/mimetypes/tgz.png', 'Gzipped Tar Archive'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('tar.bz', 'icons/mimetypes/tgz.png', 'Bzipped Tar Archive'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('tar.bz2', 'icons/mimetypes/tgz.png', 'Bzipped Tar Archive'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('tar.Z', 'icons/mimetypes/tgz.png', 'Compressed Tar Archive'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('tar', 'icons/mimetypes/tgz.png', 'Tar Archive'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('rar', 'icons/mimetypes/tgz.png', 'Rar Archive'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('lzh', 'icons/mimetypes/tgz.png', 'Lha Archive'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('lha', 'icons/mimetypes/tgz.png', 'Lha Archive'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('gz', 'icons/mimetypes/tgz.png', 'Gzip File'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('tgz', 'icons/mimetypes/tgz.png', 'Gzip File'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('cpio', 'icons/mimetypes/tgz.png', 'CPIO Archive'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('Z', 'icons/mimetypes/tgz.png', 'UNIX Compressed File'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('bz2', 'icons/mimetypes/tgz.png', 'Bzip2 File'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('bz', 'icons/mimetypes/tgz.png', 'Bzip File'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('arj', 'icons/mimetypes/tgz.png', 'ARJ Archive'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('a', 'icons/mimetypes/tgz.png', 'Ar Archive'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('cgm', 'icons/mimetypes/image.png', 'Computer Graphics Metafile'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('g3', 'icons/mimetypes/image.png', 'CCITT G3 Fax'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('gif', 'icons/mimetypes/image.png', 'GIF Image'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('png', 'icons/mimetypes/image.png', 'PNG Image'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('tif', 'icons/mimetypes/image.png', 'TIFF Image'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('tiff', 'icons/mimetypes/image.png', 'TIFF Image'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('bmp', 'icons/mimetypes/image.png', 'Windows BMP Image'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('eps', 'icons/mimetypes/image.png', 'Encapsulated PostScript File'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('epsi', 'icons/mimetypes/image.png', 'Encapsulated PostScript File'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('epsf', 'icons/mimetypes/image.png', 'Encapsulated PostScript File'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('ico', 'icons/mimetypes/image.png', 'Windows Icon'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('jng', 'icons/mimetypes/image.png', 'JNG Image'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('msod', 'icons/mimetypes/image.png', 'Microsoft Office Drawing'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('pcx', 'icons/mimetypes/image.png', 'PCX Image'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('pcd', 'icons/mimetypes/image.png', 'PhotoCD Image'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('pbm', 'icons/mimetypes/image.png', 'Portable Bitmap Image'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('pgm', 'icons/mimetypes/image.png', 'Portable Graymap Image'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('ppm', 'icons/mimetypes/image.png', 'Portable Pixmap Image'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('pnm', 'icons/mimetypes/image.png', 'Portable Pixmap Image'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('tga', 'icons/mimetypes/image.png', 'Truevision Targa Image'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('xbm', 'icons/mimetypes/image.png', 'X BitMap Image'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('xcf', 'icons/apps/gimp.png', 'GIMP Native Image Format'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('xpm', 'icons/mimetypes/image.png', 'X PixMap Image'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('fig', 'icons/mimetypes/vectorgfx.png', 'XFig File'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('wmf', 'icons/mimetypes/vectorgfx.png', 'Windows MetaFile'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('svg', 'icons/mimetypes/vectorgfx.png', 'Scalable Vector Graphics'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('xml', 'icons/mimetypes/html.png', 'eXtensible Markup Language Document'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('xslt', 'icons/mimetypes/unknown.png', 'XSLT Stylesheet File'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('fo', 'icons/mimetypes/unknown.png', 'XSL Formating Object File'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('xslfo', 'icons/mimetypes/unknown.png', 'XSL Formating Object File'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('vct', 'icons/mimetypes/vcard.png', 'Electronic Business Card'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('vcs', 'icons/mimetypes/vcalendar.png', 'vCalendar Interchange File'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('sdc', 'icons/ooo/ooo_calc.png', 'StarOffice Calc Spreadsheet'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('sds', 'icons/ooo/ooo_calc.png', 'StarChart 5.0'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('sda', 'icons/ooo/ooo_draw.png', 'StarDraw 5.0'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('sdd', 'icons/ooo/ooo_impress.png', 'StarOffice Impress Presentation'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('sds', 'icons/ooo/ooo_math.png', 'StarMath 5.0'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('sdw', 'icons/ooo/ooo_writer.png', 'StarWriter 5.0'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('sgl', 'icons/ooo/ooo_writer.png', 'StarWriter 5.0 Master Document'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('sxc', 'icons/ooo/ooo_calc.png', 'OpenOffice.org 1.0 Spreadsheet'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('stc', 'icons/ooo/ooo_calc.png', 'OpenOffice.org Spreadsheet Template'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('stc', 'icons/ooo/ooo_draw.png', 'OpenOffice.org 1.0 Drawing'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('std', 'icons/ooo/ooo_draw.png', 'OpenOffice.org Drawing Template'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('sxi', 'icons/ooo/ooo_impress.png', 'OpenOffice.org 1.0 Presentation'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('sti', 'icons/ooo/ooo_impress.png', 'OpenOffice.org Presentation Template'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('sxw', 'icons/ooo/ooo_writer.png', 'OpenOffice.org 1.0 Text Document'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('stw', 'icons/ooo/ooo_writer.png', 'OpenOffice.org Text Document Template'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('sxg', 'icons/ooo/ooo_writer.png', 'OpenOffice.org 1.0 Master Document'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('adb', 'icons/mimetypes/source_cpp.png', 'Ada Source File'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('ads', 'icons/mimetypes/source_cpp.png', 'Ada Source File'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('bib', 'icons/mimetypes/tex.png', 'Bibliographic Data (Bibtex)'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('hh', 'icons/mimetypes/source_h.png', 'C++ Header File'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('h', 'icons/mimetypes/source_h.png', 'C Header File'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('cpp', 'icons/mimetypes/source_cpp.png', 'C++ Source File'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('cxx', 'icons/mimetypes/source_cpp.png', 'C++ Source File'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('cc', 'icons/mimetypes/source_cpp.png', 'C++ Source File'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('c', 'icons/mimetypes/source_c.png', 'C Source File'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('m', 'icons/mimetypes/source_c.png', 'Objective-C Source File'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('csv', 'icons/mimetypes/txt.png', 'Text File with Comma Separated Values'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('dif', 'icons/mimetypes/txt.png', 'Differences Between Files'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('diff', 'icons/mimetypes/txt.png', 'Differences Between Files'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('patch', 'icons/mimetypes/txt.png', 'Differences Between Files'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('java', 'icons/mimetypes/source_java.png', 'Java Source File'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('java', 'icons/mimetypes/unknown.png', 'File List (for the Kate File List Loader Plugin)'; INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('ksysv_log', 'icons/mimetypes/log.png', 'SysV-Init Editor logfile'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('log', 'icons/mimetypes/log.png', 'Application logfile'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('sgml', 'icons/mimetypes/txt.png', 'SGML Document'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('lyx', 'icons/mimetypes/dvi.png', 'LyX Document'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('makefile', 'icons/mimetypes/make.png', 'Makefile'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('moc', 'icons/mimetypes/source_moc.png', 'Qt Meta Object File'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('latex', 'icons/mimetypes/tex.png', 'Text File with Comma Separated Values'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('url', 'icons/mimetypes/html.png', 'Internet Shortcut'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('wml', 'icons/mimetypes/html.png', 'WML Document'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('p', 'icons/mimetypes/source_p.png', 'Pascal Source File'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('pas', 'icons/mimetypes/source_p.png', 'Pascal Source File'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('pl', 'icons/mimetypes/source_pl.png', 'Perl Source File'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('pm', 'icons/mimetypes/source_pl.png', 'Perl Source File'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('py', 'icons/mimetypes/source_py.png', 'Python Source File'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('tcl', 'icons/mimetypes/source.png', 'Tcl File'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('tk', 'icons/mimetypes/source.png', 'Tcl File'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('tex', 'icons/mimetypes/tex.png', 'TeX File'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('ltx', 'icons/mimetypes/tex.png', 'TeX File'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('sty', 'icons/mimetypes/tex.png', 'TeX File'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('cls', 'icons/mimetypes/tex.png', 'TeX File'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('rtf', 'icons/mimetypes/document.png', 'Rich Text Format'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('rss', 'icons/mimetypes/document.png', 'RDF Site Summary'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('rdf', 'icons/mimetypes/document.png', 'Resource Description Framework (RDF) File'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('sieve', 'icons/mimetypes/unknown.png', 'SIEVE Mail Filter Script'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('siv', 'icons/mimetypes/unknown.png', 'SIEVE Mail Filter Script'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('gsf', 'icons/mimetypes/unknown.png', 'Ghostscript Font'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('spd', 'icons/mimetypes/unknown.png', 'Speedo Font'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('gra', 'icons/mimetypes/unknown.png', 'Graphite Scientific Graph'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('karbon', 'icons/mimetypes/unknown.png', 'Karbon14 Document'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('chrt', 'icons/mimetypes/unknown.png', 'KChart Document'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('kfo', 'icons/mimetypes/unknown.png', 'KFormula Document'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('flw', 'icons/mimetypes/unknown.png', 'Kivio Document'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('kon', 'icons/mimetypes/unknown.png', 'Kontour Document'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('kpr', 'icons/mimetypes/unknown.png', 'KPresenter Document'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('kpt', 'icons/mimetypes/unknown.png', 'KPresenter Document'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('kra', 'icons/mimetypes/unknown.png', 'Krita Document'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('ksp', 'icons/mimetypes/unknown.png', 'KSpread Document'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('ktheme', 'icons/mimetypes/colorscm.png', 'KDE Theme'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('kud', 'icons/mimetypes/unknown.png', 'Kugar Data File'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('kwd', 'icons/mimetypes/unknown.png', 'KWord Document'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('kwt', 'icons/mimetypes/unknown.png', 'KWord Document'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('ts', 'icons/mimetypes/unknown.png', 'Message Catalog'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('py', 'icons/mimetypes/unknown.png', 'Python Program'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('pyc', 'icons/mimetypes/unknown.png', 'Python Bytecode'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('abw', 'icons/mimetypes/wordprocessing.png', 'AbiWord Document'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('zabw', 'icons/mimetypes/wordprocessing.png', 'AbiWord Document'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('abw.bz2', 'icons/mimetypes/wordprocessing.png', 'AbiWord Document'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('bzabw', 'icons/mimetypes/wordprocessing.png', 'AbiWord Document'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('abw.gz', 'icons/mimetypes/wordprocessing.png', 'AbiWord Document'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('ag', 'icons/mimetypes/applix.png', 'Applix Graphics Document'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('as', 'icons/mimetypes/applix.png', 'Applix Spreadsheets Document'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('aw', 'icons/mimetypes/applix.png', 'Applix Words Document'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('aw', 'icons/apps/wp.png', 'WordPerfect Document'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('sam', 'icons/mimetypes/wordprocessing.png', 'Lotus AmiPro Document'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('arts', 'icons/mimetypes/mime_audio.png', 'Arts Builder'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('awk', 'icons/mimetypes/shellscript.png', 'Awk Shell Script'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('sh', 'icons/mimetypes/shellscript.png', 'SH/Bash Shell Script'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('csh', 'icons/mimetypes/shellscript.png', 'SH/Bash Shell Script'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('cda', 'icons/mimetypes/mime_track.png', 'CD Audio'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('cue', 'icons/mimetypes/mime_track.png', 'CDRWIN cue-sheet'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('core', 'icons/mimetypes/core.png', 'Program Crash Data'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('deb', 'icons/mimetypes/deb.png', 'Debian Package'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('der', 'icons/actions/lock.png', 'DER, PEM, or Netscape Encoded X.509 Certificate'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('cer', 'icons/actions/lock.png', 'DER, PEM, or Netscape Encoded X.509 Certificate'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('crt', 'icons/actions/lock.png', 'DER, PEM, or Netscape Encoded X.509 Certificate'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('cert', 'icons/actions/lock.png', 'DER, PEM, or Netscape Encoded X.509 Certificate'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('pem', 'icons/actions/lock.png', 'DER, PEM, or Netscape Encoded X.509 Certificate'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('p12', 'icons/actions/lock.png', 'PKCS#12 Certificate Bundle'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('pfx', 'icons/actions/lock.png', 'PKCS#12 Certificate Bundle'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('man', 'icons/mimetypes/man.png', 'Troff Document with Manpage Macros'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('tr', 'icons/mimetypes/man.png', 'Troff Document'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('roff', 'icons/mimetypes/man.png', 'Troff Document'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('~', 'icons/mimetypes/recycled.png', 'Backup Document'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('%', 'icons/mimetypes/recycled.png', 'Backup Document'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('bak', 'icons/mimetypes/recycled.png', 'Backup Document'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('old', 'icons/mimetypes/recycled.png', 'Backup Document'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('sik', 'icons/mimetypes/recycled.png', 'Backup Document'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('rpm', 'icons/mimetypes/rpm.png', 'RPM Package File'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('wb1', 'icons/mimetypes/spreadsheet.png', 'Quattro Pro Document'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('wb2', 'icons/mimetypes/spreadsheet.png', 'Quattro Pro Document'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('wb3', 'icons/mimetypes/spreadsheet.png', 'Quattro Pro Document'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('pl', 'icons/mimetypes/source_pl.png', 'PERL Program'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('perl', 'icons/mimetypes/source_pl.png', 'PERL Program'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('o', 'icons/mimetypes/binary.png', 'Object Code'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('ogg', 'icons/mimetypes/sound.png', 'Ogg Multimedia'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('class', 'icons/mimetypes/binary.png', 'Java Class'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('jar', 'icons/mimetypes/source_java.png', 'Java Archive'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('iso', 'icons/mimetypes/mime_track.png', 'ISO9660 image file'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('hwp', 'icons/mimetypes/wordprocessing.png', 'HancomWord Document'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('gnumeric', 'icons/mimetypes/txt.png', 'GNUmeric Spreadsheet'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('ui', 'icons/mimetypes/widget_doc.png', 'Qt Designer File'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('desktop', 'icons/actions/exec.png', 'Desktop Config File'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('kdelnk', 'icons/actions/exec.png', 'Desktop Config File'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('dvi', 'icons/mimetypes/dvi.png', 'TeX Device Independent File'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('edu', 'icons/apps/keduca.png', 'Edu Document'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('exe', 'icons/actions/exec.png', 'Microsoft Windows Executable'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('bdf', 'icons/mimetypes/font_bitmap.png', 'BDF Bitmap Font'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('bdf.Z', 'icons/mimetypes/font_bitmap.png', 'BDF Bitmap Font'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('bdf.gz', 'icons/mimetypes/font_bitmap.png', 'BDF Bitmap Font'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('pcf', 'icons/mimetypes/font_bitmap.png', 'PCF Bitmap Font'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('pcf.Z', 'icons/mimetypes/font_bitmap.png', 'PCF Bitmap Font'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('pcf.gz', 'icons/mimetypes/font_bitmap.png', 'PCF Bitmap Font'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('snf.gz', 'icons/mimetypes/font_bitmap.png', 'SNF Bitmap Font'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('snf.Z', 'icons/mimetypes/font_bitmap.png', 'SNF Bitmap Font'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('snf', 'icons/mimetypes/font_bitmap.png', 'SNF Bitmap Font'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('ttf', 'icons/mimetypes/font_truetype.png', 'Truetype Font'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('pfa', 'icons/mimetypes/font_type1.png', 'PostScript Type1 Font'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('pfb', 'icons/mimetypes/font_type1.png', 'PostScript Type1 Font'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('po', 'icons/mimetypes/gettext.png', 'Message Catalog'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('po', 'icons/mimetypes/gettext.png', 'Message Catalog'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('pot', 'icons/mimetypes/gettext.png', 'Message Catalog'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('shell', 'icons/apps/konsole.png', 'File to open a shell'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('kpm', 'icons/mimetypes/kpovmodeler_doc.png', 'KPovModeler File'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('sgrd', 'icons/apps/ksysguard.png', 'KDE System Guard'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('swf', 'icons/apps/netscape.png', 'Shockwave Flash Media'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('gf', 'icons/mimetypes/metafont.png', 'Generic Font'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('pk', 'icons/mimetypes/pk.png', 'Packed Font'); |
From: <xt...@us...> - 2003-08-23 20:30:18
|
Update of /cvsroot/openfirst/logger In directory sc8-pr-cvs1:/tmp/cvs-serv13990 Modified Files: index.php logger.php rawdata.php reset.php track.php Log Message: Replace mysql functions with new database functions, allowing multiple database types to be used easily. Index: index.php =================================================================== RCS file: /cvsroot/openfirst/logger/index.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** index.php 28 Jun 2003 15:23:48 -0000 1.3 --- index.php 23 Aug 2003 20:30:12 -0000 1.4 *************** *** 41,51 **** if (isset($_GET['DELETE'])) { ! mysql_query("DELETE FROM ofirst_logger WHERE IPAddress = '".$_GET['DELETE']."'") or die(mysql_error()); } ! $query = mysql_query("SELECT * FROM ofirst_logger GROUP BY IPAddress LIMIT $min,$max"); ! $amount = mysql_num_rows($query); ?> --- 41,51 ---- if (isset($_GET['DELETE'])) { ! ofirst_dbquery("DELETE FROM ofirst_logger WHERE IPAddress = '".$_GET['DELETE']."'") or die(ofirst_dberror()); } ! $query = ofirst_dbquery("SELECT * FROM ofirst_logger GROUP BY IPAddress LIMIT $min,$max"); ! $amount = ofirst_dbnum_rows($query); ?> *************** *** 76,80 **** <? ! while($log = mysql_fetch_object($query)){ echo "<tr>"; echo " <td>$log->ID</td>"; --- 76,80 ---- <? ! while($log = ofirst_dbfetch_object($query)){ echo "<tr>"; echo " <td>$log->ID</td>"; Index: logger.php =================================================================== RCS file: /cvsroot/openfirst/logger/logger.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** logger.php 21 Aug 2003 13:06:48 -0000 1.5 --- logger.php 23 Aug 2003 20:30:12 -0000 1.6 *************** *** 45,49 **** } ! mysql_query("INSERT INTO ofirst_logger (IPAddress,Date,Location,QueryString,HostLookup,Browser,Member) values('".$IP."' ,'".$DATE."' --- 45,49 ---- } ! ofirst_dbquery("INSERT INTO ofirst_logger (IPAddress,Date,Location,QueryString,HostLookup,Browser,Member) values('".$IP."' ,'".$DATE."' *************** *** 52,56 **** ,'".$HOST."' ,'".$BROWSER."' ! ,'".$MEMBER."')") or die(mysql_error()); ?> --- 52,56 ---- ,'".$HOST."' ,'".$BROWSER."' ! ,'".$MEMBER."')") or die(ofirst_dberror()); ?> Index: rawdata.php =================================================================== RCS file: /cvsroot/openfirst/logger/rawdata.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** rawdata.php 28 Jun 2003 15:23:48 -0000 1.5 --- rawdata.php 23 Aug 2003 20:30:12 -0000 1.6 *************** *** 38,46 **** if (isset($_GET['DELETE'])) { ! mysql_query("DELETE FROM ofirst_logger WHERE ID = '".$_GET['DELETE']."'"); } ! $query = mysql_query("SELECT * FROM ofirst_logger LIMIT $min,$max"); ! $amount = mysql_num_rows($query); ?> <h1>View Log Information</h1> --- 38,46 ---- if (isset($_GET['DELETE'])) { ! ofirst_dbquery("DELETE FROM ofirst_logger WHERE ID = '".$_GET['DELETE']."'"); } ! $query = ofirst_dbquery("SELECT * FROM ofirst_logger LIMIT $min,$max"); ! $amount = ofirst_dbnum_rows($query); ?> <h1>View Log Information</h1> *************** *** 64,68 **** </tr> <? ! while($log = mysql_fetch_object($query)){ echo "<tr>"; echo " <td>$log->ID</td>"; --- 64,68 ---- </tr> <? ! while($log = ofirst_dbfetch_object($query)){ echo "<tr>"; echo " <td>$log->ID</td>"; Index: reset.php =================================================================== RCS file: /cvsroot/openfirst/logger/reset.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** reset.php 28 Jun 2003 15:23:48 -0000 1.4 --- reset.php 23 Aug 2003 20:30:12 -0000 1.5 *************** *** 31,35 **** if (isset($_POST['confirm'])) { if(isset($user->user) == true && $user->membertype == 'administrator') { ! mysql_query("DELETE FROM ofirst_logger"); echo "<p>Logger system has been reset</p>"; } else { --- 31,35 ---- if (isset($_POST['confirm'])) { if(isset($user->user) == true && $user->membertype == 'administrator') { ! ofirst_dbquery("DELETE FROM ofirst_logger"); echo "<p>Logger system has been reset</p>"; } else { Index: track.php =================================================================== RCS file: /cvsroot/openfirst/logger/track.php,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** track.php 21 Aug 2003 13:06:48 -0000 1.7 --- track.php 23 Aug 2003 20:30:12 -0000 1.8 *************** *** 30,38 **** if (isset($_GET['DELETE'])) { ! mysql_query("DELETE FROM ofirst_logger WHERE IPAddress = '".$_GET['ID']."'") or die(mysql_error()); } ! $query = mysql_query("SELECT * FROM ofirst_logger WHERE IPAddress='".$_GET['ID']."'"); ! $amount = mysql_num_rows($query); ?> <h1>View Log Information</h1> --- 30,38 ---- if (isset($_GET['DELETE'])) { ! ofirst_dbquery("DELETE FROM ofirst_logger WHERE IPAddress = '".$_GET['ID']."'") or die(ofirst_dberror()); } ! $query = ofirst_dbquery("SELECT * FROM ofirst_logger WHERE IPAddress='".$_GET['ID']."'"); ! $amount = ofirst_dbnum_rows($query); ?> <h1>View Log Information</h1> *************** *** 52,56 **** </tr> <? ! while($log = mysql_fetch_object($query)) { echo "<tr>"; echo " <td>$log->ID</td>"; --- 52,56 ---- </tr> <? ! while($log = ofirst_dbfetch_object($query)) { echo "<tr>"; echo " <td>$log->ID</td>"; |