openfirst-cvscommit Mailing List for openFIRST (Page 5)
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: Jamie <ast...@us...> - 2006-02-06 01:52:17
|
Update of /cvsroot/openfirst/news In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12329/news Modified Files: index.php Log Message: More porting work (holly ****) Index: index.php =================================================================== RCS file: /cvsroot/openfirst/news/index.php,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** index.php 6 Feb 2006 01:42:54 -0000 1.12 --- index.php 6 Feb 2006 01:52:07 -0000 1.13 *************** *** 32,39 **** Here are the most recent news outbreaks.<br><br> <?php ! $admin=false; ! if (isset($user->membertype)) { ! $admin=($user->membertype == "administrator"); ! } if (isset($_GET['show'])) { shownews(99999,$admin); --- 32,36 ---- Here are the most recent news outbreaks.<br><br> <?php ! $admin= $ogUser->isAdmin(); if (isset($_GET['show'])) { shownews(99999,$admin); |
From: Jamie <ast...@us...> - 2006-02-06 01:52:17
|
Update of /cvsroot/openfirst/news/admin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12329/news/admin Modified Files: index.php Log Message: More porting work (holly ****) Index: index.php =================================================================== RCS file: /cvsroot/openfirst/news/admin/index.php,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** index.php 6 Jan 2004 17:16:23 -0000 1.16 --- index.php 6 Feb 2006 01:52:07 -0000 1.17 *************** *** 26,38 **** * */ ! include_once("../../config/globals.php"); ! include_once($header); echo("<h1>Add News</h1>"); ! if(isset($user->membertype)){ ! if($user->membertype == "administrator") { ! if(! isset($_POST["news"])) { // Display a form for news. ?> <form name="NewsForm" id="NewsForm" method="post" action="index.php" enctype="multipart/form-data"> --- 26,39 ---- * */ ! include_once("../../includes/globals.php"); ! include_once($ogHeader); echo("<h1>Add News</h1>"); ! $ogUser->mustBeAdmin(); ! ! if(! isset($_POST["news"])) { // Display a form for news. + $upload_dir = dirname(__FILE__)."/../images/upload/"; ?> <form name="NewsForm" id="NewsForm" method="post" action="index.php" enctype="multipart/form-data"> *************** *** 53,61 **** <td width="332"><input type="radio" name="imagesrc" id="imagesrc1" value="1" checked><label for="imagesrc1">Select Image</label> <select name="image" style="width:250px"> ! <option selected>(none)</option> <?php ! if(is_readable(getcwd()."/../images/upload/")) { ! $dir=opendir(getcwd()."/../images/upload/"); ! while (false !== ($filename = readdir($dir))) { if ($filename != "." && $filename != "..") { echo("<option>$filename</option>"); --- 54,61 ---- <td width="332"><input type="radio" name="imagesrc" id="imagesrc1" value="1" checked><label for="imagesrc1">Select Image</label> <select name="image" style="width:250px"> ! <option selected="selected">(none)</option> <?php ! if(is_readable($upload_dir)) { ! foreach(glob($upload_dir.'*') as $filename) { if ($filename != "." && $filename != "..") { echo("<option>$filename</option>"); *************** *** 67,71 **** <br><input type="radio" name="imagesrc" id="imagesrc2" value="2"><label for="imagesrc2">Upload New Image</label> <?php ! if(is_writeable($fbasepath."/news/images/upload/")){ echo('<input type="file" name="imgfile" accept="image/*" style="width: 250px;">'); }else{ --- 67,71 ---- <br><input type="radio" name="imagesrc" id="imagesrc2" value="2"><label for="imagesrc2">Upload New Image</label> <?php ! if(is_writeable($upload_dir)){ echo('<input type="file" name="imgfile" accept="image/*" style="width: 250px;">'); }else{ *************** *** 115,124 **** echo("The news item " . $_POST["title"] . " has been added. [ <a href='../index.php'>Main</a> ]"); - } - } - } else { - echo("You must be logged on as an administrative user to add news."); } ! include_once($footer); ?> --- 115,120 ---- echo("The news item " . $_POST["title"] . " has been added. [ <a href='../index.php'>Main</a> ]"); } ! include_once($ogFooter); ?> |
From: Jamie <ast...@us...> - 2006-02-06 01:43:08
|
Update of /cvsroot/openfirst/news In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9077/news Modified Files: index.php viewnews.php Added Files: openfirst.info.xml Removed Files: openfirst.info.php Log Message: Started port to oF2 Index: viewnews.php =================================================================== RCS file: /cvsroot/openfirst/news/viewnews.php,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** viewnews.php 14 Mar 2005 00:53:58 -0000 1.15 --- viewnews.php 6 Feb 2006 01:42:54 -0000 1.16 *************** *** 30,45 **** // Get a list of the users able to // be contacted via the feedback form. ! global $basepath; ! $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("<br><table width='500'> ! <tr><th><strong>$news->title</strong></th></tr>"); if($news->image!=""){ ! echo("<tr><td><center><img src='$news->image' alt='$news->title'></center></td></tr>"); } ! echo("<tr><td class='sub'>Posted on $news->date by $news->poster</td></tr><tr><td>"); if(function_exists("emoticon_translate")){ echo(emoticon_translate($news->news)); --- 30,45 ---- // Get a list of the users able to // be contacted via the feedback form. ! global $BasePath, $ogDB; ! $query = $ogDB->select('news', '*', '', array('order' => 'ID', 'limit' => $limit)); ! if ($ogDB->numberOfRows($query) != 0){ ! while($news = $ogDB->fetchObject($query)){ ! echo("<br /><table width='500'> ! <tr><th><strong>{$news->title}</strong></th></tr>"); if($news->image!=""){ ! echo("<tr><td><center><img src='{$news->image}' alt='{$news->title}'></center></td></tr>"); } ! echo("<tr><td class='sub'>Posted on {$news->date} by {$news->poster}</td></tr><tr><td>"); if(function_exists("emoticon_translate")){ echo(emoticon_translate($news->news)); *************** *** 47,63 **** echo($news->news); } ! echo("<br><br><center>[ <a href='$basepath/news/comments.php?ID=$news->ID'>View Comments</a> ]</center></td></tr>"); ! if($admin){ ! echo('<tr><td class="sub"><div style="" align="right">Admin options: <a href="'.$basepath.'/news/admin/editnews.php?id='.$news->ID.'"><img alt="Edit story" border=0 src="'.$basepath.'/news/images/newdoc.gif" align=absmiddle>Edit story</a>'); ! echo('<a href="'.$basepath.'/news/admin/killnews.php?id='.$news->ID.'"><img alt="Delete story" border=0 src="'.$basepath.'/news/images/killdoc.gif" align=absmiddle>Delete story</a></div></td></tr>'); } ! echo("</table><br>"); } } else { ! echo("There is not yet any news.<br><br>"); } if($admin){ ! echo("<div align=center>[ <b><a href=\"$basepath/news/admin\">Post News</a></b> ]</div>"); } return(0); --- 47,63 ---- echo($news->news); } ! echo("<br /><br /><center>[ <a href='{$BasePath}/news/comments.php?ID={$news->ID}'>View Comments</a> ]</center></td></tr>"); ! if ($admin) { ! echo('<tr><td class="sub"><div style="" align="right">Admin options: <a href="'.$BasePath.'/news/admin/editnews.php?id='.$news->ID.'"><img alt="Edit story" border=0 src="'.$BasePath.'/news/images/newdoc.gif" align=absmiddle>Edit story</a>'); ! echo('<a href="'.$BasePath.'admin/killnews.php?id='.$news->ID.'"><img alt="Delete story" border=0 src="'.$BasePath.'/news/images/killdoc.gif" align=absmiddle>Delete story</a></div></td></tr>'); } ! echo("</table><br />"); } } else { ! echo("There is not yet any news.<br /><br />"); } if($admin){ ! echo("<div align=center>[ <b><a href=\"$BasePath/news/admin\">Post News</a></b> ]</div>"); } return(0); --- NEW FILE: openfirst.info.xml --- <?xml version="1.0"?> <module xmlns="http://openfirst.org/xml/module/1.0" id="openfirst.news"> <!-- Info --> <!-- This is not used, except as meta data --> <name>News</name> <version>CVS</version> <author>Tim Ginn</author> <maintainer>Jamie Bliss</maintainer> <includes> <include>$fModPath/viewnews.php</include> </includes> <!-- Configuration --> <!-- Either entities or CDATA can be used. Just make sure it's parsed into the literal XHTML. --> <!-- Note the two ways of including BasePath. --> <navbar><![CDATA[ <a href="$ModPath/">Current News</a> | <a href="$ModPath/rssfeed.php">Stream our News</a> ]]></navbar> <adminbar><![CDATA[ <a href="$ModPath/admin/">Add News</a> ]]></adminbar> <!-- Database setup --> <db> <table name="news"> <fields> <!-- Should be self explainatory --> <field name="ID" null="no" autoincrement="yes"><type length="6" unsigned="yes">int</type></field> <field name="post_date"><type>date</type></field> <field name="poster"><type>text</type></field> <field name="title"><type>tinytext</type></field> <field name="news"><type>text</type></field> <field name="image"><type>text</type></field> </fields> <keys> <key type="PRIMARY"> <col>ID</col> </key> </keys> </table> <!-- Need to change this to an ID-based system. --> <table name="news_comments"> <fields> <field name="ID" null="no" autoincrement="yes"><type unsigned="yes" length="6">int</type></field> <field name="Author"><type>text</type></field> <field name="EMail"><type>tinytext</type></field> <field name="Website"><type>tinytext</type></field> <field name="Comment"><type>tinytext</type></field> <field name="comment_date"><type>date</type></field> <field name="StoryID" null="no"><type length="6" unsigned="yes">int</type></field> </fields> <keys> <key type="PRIMARY"> <col>ID</col> </key> <key name="StoryID"> <col>StoryID</col> </key> </keys> </table> </db> </module> --- openfirst.info.php DELETED --- Index: index.php =================================================================== RCS file: /cvsroot/openfirst/news/index.php,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** index.php 24 Dec 2003 00:46:37 -0000 1.11 --- index.php 6 Feb 2006 01:42:54 -0000 1.12 *************** *** 3,7 **** * openFIRST.news - index.php * ! * Copyright (C) 2003, * openFIRST Project * Original Author: Tim Ginn <tim...@sy...> --- 3,7 ---- * openFIRST.news - index.php * ! * Copyright (C) 2005, * openFIRST Project * Original Author: Tim Ginn <tim...@sy...> *************** *** 26,31 **** * */ ! include_once("../config/globals.php"); ! include_once($header); ?> <h2>Top Headlines</h2> --- 26,31 ---- * */ ! include_once("../includes/globals.php"); ! include_once($ogHeader); ?> <h2>Top Headlines</h2> *************** *** 33,42 **** <?php $admin=false; ! if (isset($user->membertype)){ $admin=($user->membertype == "administrator"); } ! if(isset($_GET['show'])){ ! shownews(99999,$admin); ! }else{ shownews(5,$admin); // Shows 5 pieces of news. } --- 33,42 ---- <?php $admin=false; ! if (isset($user->membertype)) { $admin=($user->membertype == "administrator"); } ! if (isset($_GET['show'])) { ! shownews(99999,$admin); ! } else { shownews(5,$admin); // Shows 5 pieces of news. } *************** *** 44,47 **** [ <a href="index.php?show=all">Show All News</a> ] <?php ! include_once($footer); ?> --- 44,47 ---- [ <a href="index.php?show=all">Show All News</a> ] <?php ! include_once($ogFooter); ?> |
From: Jamie <ast...@us...> - 2006-02-06 01:43:06
|
Update of /cvsroot/openfirst/news/setup In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9077/news/setup Removed Files: setup.mssql setup.mysql Log Message: Started port to oF2 --- setup.mysql DELETED --- --- setup.mssql DELETED --- |
From: Jamie <ast...@us...> - 2005-12-12 04:02:13
|
Update of /cvsroot/openfirst/base/style/images In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29528/style/images Added Files: slug.gif Log Message: I forgot the star of the show! (But need to look into the source and license. Mambo's forum has the same image.) --- NEW FILE: slug.gif --- (This appears to be a binary file; contents omitted.) |
From: Jamie <ast...@us...> - 2005-12-12 03:02:03
|
Update of /cvsroot/openfirst/base/includes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20503/includes Added Files: skinfunctions.php Log Message: Slimier. Slug ads implemented. (Although they need some tweaking in styling.) --- NEW FILE: skinfunctions.php --- <?php /* * openFIRST.base - includes/skinfunctions.php * * Copyright (C) 2003, * openFIRST Project * Original Author: Jamie Bliss <ja...@op...> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ // Purpose: Defines a few convenience functions for skinning. It is not // included by default because the functions don't follow the naming // convention. /** Prints out a slug advertisement. * @param $slug string The slug * @todo Move implementation to skin */ function slug($slug) { global $StylePath; $eslug = htmlentities($slug); $eimage = htmlentities($StylePath).'/images/slug.gif'; // Image source: http://www.onescience.com/forum/images/slug_125.gif //onclick=\"handleSlugClick(this)\" echo "<div class=\"slug\"><img src=\"{$eimage}\" alt=\"(SLUG)\" title=\"Show slug\" /><span>{$eslug}</span></div>"; } /** Prints out the URI for a slug. * @param $slug string The slug */ function suri($slug) { echo htmlentities(ofGetSlugURI($slug)); } /** Prints out the header. */ /*function header() { global $Header; include_once($Header); } /** Prints out the footer. */ /*function footer() { global $Footer; include_once($Footer); } /** Prints out a message. * Will be implemented with i18n */ function msg($id, $dir=false) { # } ?> |
From: Jamie <ast...@us...> - 2005-12-12 03:02:02
|
Update of /cvsroot/openfirst/base/style In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20503/style Modified Files: headers.php Added Files: slugs.css slugs.js Log Message: Slimier. Slug ads implemented. (Although they need some tweaking in styling.) --- NEW FILE: slugs.css --- .slug { margin: .2em; float: left; /* Set font size, etc. to normal */ } .slug > img { cursor: pointer; border: none; } .slug > span { display: none; border: thin solid silver; } /*.slug > img:active + span, .slug > img:focus + span, .slug:focus > span, .slug:active > span { display: inline; }*/ /*.slug > img:hover + span, .slug:hover > span { display: inline; }*/ /*.slug > span:selection { display: inline; } .slug > span::selection { display: inline; }*/ --- NEW FILE: slugs.js --- // Pass this the DOM event function handleSlugClick(evt) { var obj = evt.target; if (obj.parentNode.className != 'slug') return; var target = obj.nextSibling; if (target.style.display == "none") { target.style.display = "inline"; } else if (target.style.display == "inline") { target.style.display = "none"; } else { target.style.display = "inline"; } } document.documentElement.addEventListener('click', handleSlugClick, true); // TODO: Add support for non-JS browsers Index: headers.php =================================================================== RCS file: /cvsroot/openfirst/base/style/headers.php,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** headers.php 24 Nov 2005 03:28:42 -0000 1.13 --- headers.php 12 Dec 2005 03:01:53 -0000 1.14 *************** *** 51,54 **** --- 51,56 ---- <meta name="generator" content="openFIRST - http://openfirst.sf.net" /> <link rel="stylesheet" type="text/css" href="<?php echo htmlentities($StylePath); ?>/style.css" /> + <link rel="stylesheet" type="text/css" href="<?php echo htmlentities($StylePath); ?>/slugs.css" /> + <script type="application/x-javascript" src="<?php echo htmlentities($StylePath); ?>/slugs.js" /> <?php if (isset($ogMoreHeadItems) && is_array($ogMoreHeadItems)) { |
From: Jamie <ast...@us...> - 2005-12-10 22:55:25
|
Update of /cvsroot/openfirst/www/htdocs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6870/www/htdocs Modified Files: roadmap.php Log Message: minor version number update Index: roadmap.php =================================================================== RCS file: /cvsroot/openfirst/www/htdocs/roadmap.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** roadmap.php 28 Nov 2005 00:42:55 -0000 1.3 --- roadmap.php 10 Dec 2005 22:55:17 -0000 1.4 *************** *** 7,11 **** each alpha based on that feature.</p> <ul> ! <li><b>2.0a1</b> - Object Oriented design for the Portal Software</li> <li><b>2.0</b> - Greatly enhanced module system with a rich API <!--Whether or not this is completed depends on your definition of rich--></li> --- 7,11 ---- each alpha based on that feature.</p> <ul> ! <li><b>2.0</b> - Object Oriented design for the Portal Software</li> <li><b>2.0</b> - Greatly enhanced module system with a rich API <!--Whether or not this is completed depends on your definition of rich--></li> |
From: Jamie <ast...@us...> - 2005-11-28 00:43:04
|
Update of /cvsroot/openfirst/www/htdocs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7782/www/htdocs Modified Files: roadmap.php Log Message: Updated the roadmap. (Prep the i18n team; they're on deck.) Index: roadmap.php =================================================================== RCS file: /cvsroot/openfirst/www/htdocs/roadmap.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** roadmap.php 19 Nov 2005 02:22:53 -0000 1.2 --- roadmap.php 28 Nov 2005 00:42:55 -0000 1.3 *************** *** 1,25 **** ! <h1><img ! src="/image/news_subscribe.png" ! alt="" title=""> Roadmap</h1> ! <h2>Development</h2> <h3>Coordinator: <a href="mailto:ja...@op...">Jamie</a></h3> ! <ul> ! <li><b>2.0a1</b> - Object Oriented design for the Portal ! Software</li> ! <li><b>2.0</b> - Greatly enhanced module system with a rich ! API<!--Whether or not this is completed depends on your definition of rich--></li> ! <li><b>2.0a1</b> - Introduction of slugs which give a ! standard and intuitive format for linking to data within each ! module</li> ! <li><b>2.0a2</b> - Skining of some kind.</li> </ul> ! <p>More details are available at: <a ! href="http://endeavour.zapto.org/astro73/blog/new-things-for-openfirst/">New ! things for openFIRST</a>.</p> ! <h2>Internationalization</h2> <h3>Coordinator: <a href="mailto: gui...@op...">Guilherme</a></h3> --- 1,25 ---- ! <h1><img src="/image/news_subscribe.png" alt="" title=""> Roadmap</h1> ! <h2 id="dev">Development</h2> <h3>Coordinator: <a href="mailto:ja...@op...">Jamie</a></h3> ! <p>Within the alpha stage of Long Haul, we are porting modules to the new system and gradually adding ! the features we want. Expect with every alpha a new big feature and a new module. (I've also nicknamed ! each alpha based on that feature.</p> <ul> ! <li><b>2.0a1</b> - Object Oriented design for the Portal Software</li> ! <li><b>2.0</b> - Greatly enhanced module system with a rich API ! <!--Whether or not this is completed depends on your definition of rich--></li> ! <li><del><b>2.0a1</b> - Introduction of slugs which give a standard and intuitive format for linking to ! data within each module.</del> <ins>Completed.</ins></li> ! <li><b>2.0a3</b> ("slimey") - Make slugs prevelent and used (increase sliminess); and port a module.</li> ! <li><b>2.0a4</b> ("pentacostal") - Add <a href="#i18n">i18n/L10n</a> capabilities.</li> ! <li><b>2.0a3</b> ("communal") - Integrate portions of the members module; port ! <tt class="module-id">openfirst.members</tt>.</li> </ul> ! <p>More details are available at: ! <a href="http://endeavour.zapto.org/astro73/blog/new-things-for-openfirst/">New things for openFIRST</a>.</p> ! <h2 id="i18n">Internationalization</h2> <h3>Coordinator: <a href="mailto: gui...@op...">Guilherme</a></h3> *************** *** 32,36 **** </ul> ! <h2>Validity</h2> <h3>Coordinator: <a href="mailto: da...@op...">Daniel</a></h3> --- 32,36 ---- </ul> ! <h2 id="valid">Validity</h2> <h3>Coordinator: <a href="mailto: da...@op...">Daniel</a></h3> *************** *** 41,45 **** </ul> ! <h2>Testing</h2> <h3>Coordinator: T.B.D. (Volunteers are needed)</h3> --- 41,45 ---- </ul> ! <h2 id="test">Testing</h2> <h3>Coordinator: T.B.D. (Volunteers are needed)</h3> *************** *** 52,56 **** </ul> ! <h2>Accessibility</h2> <h3>Coordinator: T.B.D. (Volunteers are needed)</h3> --- 52,56 ---- </ul> ! <h2 id="access">Accessibility</h2> <h3>Coordinator: T.B.D. (Volunteers are needed)</h3> *************** *** 65,69 **** </ul> ! <h2>Administration</h2> <h3>Coordinator: <a href="mailto: ti...@op...">Tim</a></h3> --- 65,69 ---- </ul> ! <h2 id="admin">Administration</h2> <h3>Coordinator: <a href="mailto: ti...@op...">Tim</a></h3> *************** *** 74,78 **** </ul> ! <h2>Evangelism</h2> <h3>Coordinator: T.B.D. (Volunteers are needed)</h3> --- 74,78 ---- </ul> ! <h2 id="pr">Evangelism</h2> <h3>Coordinator: T.B.D. (Volunteers are needed)</h3> |
From: Jamie <ast...@us...> - 2005-11-25 18:15:15
|
Update of /cvsroot/openfirst/base/includes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8550/includes Modified Files: dbase.php Log Message: Fixed error message that was hard-coded to MS SQL Index: dbase.php =================================================================== RCS file: /cvsroot/openfirst/base/includes/dbase.php,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** dbase.php 23 Nov 2005 21:53:48 -0000 1.17 --- dbase.php 25 Nov 2005 18:15:03 -0000 1.18 *************** *** 72,76 **** if (!function_exists($name)) { $typetext = $this->getTypeName(); ! trigger_error("$typetext 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.", E_USER_ERROR); } --- 72,76 ---- if (!function_exists($name)) { $typetext = $this->getTypeName(); ! trigger_error("$typetext support is not available in your version of PHP. To use the openFIRST Web Portal Software, please either enable $typetext support, or choose another database type.", E_USER_ERROR); } |
From: Jamie <ast...@us...> - 2005-11-24 03:28:50
|
Update of /cvsroot/openfirst/base/style In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9571/style Modified Files: headers.php Log Message: Don't use entities in non-XHTML mode. Index: headers.php =================================================================== RCS file: /cvsroot/openfirst/base/style/headers.php,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** headers.php 23 Nov 2005 18:33:38 -0000 1.12 --- headers.php 24 Nov 2005 03:28:42 -0000 1.13 *************** *** 58,64 **** } if (isset($ogMoreStyles) && trim($ogMoreStyles) != '') { ! echo '<style type="text/css"> ! '.htmlentities($ogMoreStyles).' ! </style> '; } --- 58,64 ---- } if (isset($ogMoreStyles) && trim($ogMoreStyles) != '') { ! echo '<style type="text/css">/*<![CDATA[*/ ! '.$ogMoreStyles.' ! /*]]>*/</style> '; } *************** *** 151,153 **** } ! ?> --- 151,153 ---- } ! ?> \ No newline at end of file |
From: Jamie <ast...@us...> - 2005-11-24 01:34:33
|
Update of /cvsroot/openfirst/base/includes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24827/includes Modified Files: xmlModule.php Log Message: oops... Didn't install.... Index: xmlModule.php =================================================================== RCS file: /cvsroot/openfirst/base/includes/xmlModule.php,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** xmlModule.php 23 Nov 2005 18:41:38 -0000 1.10 --- xmlModule.php 24 Nov 2005 01:34:23 -0000 1.11 *************** *** 191,201 **** /*public*/ function install() { global $ogDB; ! if (!is_array($this->mTables)) return true; ! foreach($this->mTables as $table) { ! if (!$ogDB->updateTableFromObject($table) || ($ogDB->errorNumber() != 0)) { ! # echo $table->getName(); ! $err = $ogDB->errorString(); ! echo $err; ! return $err; } } --- 191,202 ---- /*public*/ function install() { global $ogDB; ! if (is_array($this->mTables)) { ! foreach($this->mTables as $table) { ! if (!$ogDB->updateTableFromObject($table) || ($ogDB->errorNumber() != 0)) { ! # echo $table->getName(); ! $err = $ogDB->errorString(); ! echo $err; ! return $err; ! } } } |
From: Jamie <ast...@us...> - 2005-11-23 22:00:37
|
Update of /cvsroot/openfirst/base/includes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4653/includes Modified Files: functions.php Log Message: ofFixMagicQuotes() fix-up Index: functions.php =================================================================== RCS file: /cvsroot/openfirst/base/includes/functions.php,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** functions.php 23 Nov 2005 21:52:26 -0000 1.14 --- functions.php 23 Nov 2005 22:00:25 -0000 1.15 *************** *** 235,242 **** function ofFixMagicQuotes(&$arr) { $sybase = (bool)ini_get('magic_quotes_sybase'); foreach( $arr as $key => $val ) { if( is_array( $val ) ) { ofFixMagicQuotes( $arr[$key] ); ! } else { if ($sybase) { // We really should just die() here and make them get a decent configuration. --- 235,243 ---- function ofFixMagicQuotes(&$arr) { $sybase = (bool)ini_get('magic_quotes_sybase'); + if (count($arr) <= 0) return; foreach( $arr as $key => $val ) { if( is_array( $val ) ) { ofFixMagicQuotes( $arr[$key] ); ! } else if (is_string($val)) { if ($sybase) { // We really should just die() here and make them get a decent configuration. |
From: Jamie <ast...@us...> - 2005-11-23 21:54:00
|
Update of /cvsroot/openfirst/base/includes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3053/includes Modified Files: dbase.php Log Message: Adding $unique to the REPLACE list (unless it's changed by the other) Index: dbase.php =================================================================== RCS file: /cvsroot/openfirst/base/includes/dbase.php,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** dbase.php 23 Nov 2005 19:01:33 -0000 1.16 --- dbase.php 23 Nov 2005 21:53:48 -0000 1.17 *************** *** 349,353 **** */ function replace( $table, $unique, $values ) { ! $sql = "REPLACE INTO ".$this->quoteTable($table)." SET ".$this->quoteFDPairs($values); return $this->query( $sql ); } --- 349,353 ---- */ function replace( $table, $unique, $values ) { ! $sql = "REPLACE INTO ".$this->quoteTable($table)." SET ".$this->quoteFDPairs($values+$unique); return $this->query( $sql ); } |
From: Jamie <ast...@us...> - 2005-11-23 21:52:34
|
Update of /cvsroot/openfirst/base/includes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2803/includes Modified Files: functions.php globals.php Log Message: magic quotes support (which should die, btw) Index: functions.php =================================================================== RCS file: /cvsroot/openfirst/base/includes/functions.php,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** functions.php 22 Nov 2005 16:26:53 -0000 1.13 --- functions.php 23 Nov 2005 21:52:26 -0000 1.14 *************** *** 217,219 **** --- 217,250 ---- echo '</pre>'; } + + /** Check magic quotes settings + */ + function ofCheckMagicQuotes() { + set_magic_quotes_runtime(false); //Back, you foul demons! Back! Back! + ini_set('magic_quotes_sybase', false); + if (get_magic_quotes_gpc()) { // Gah! + // Quite making our lives difficult!! + ofFixMagicQuotes($_GET); + ofFixMagicQuotes($_POST); + ofFixMagicQuotes($_COOKIES); + } + } + + /** Fixes magic quote munging! + */ + function ofFixMagicQuotes(&$arr) { + $sybase = (bool)ini_get('magic_quotes_sybase'); + foreach( $arr as $key => $val ) { + if( is_array( $val ) ) { + ofFixMagicQuotes( $arr[$key] ); + } else { + if ($sybase) { + // We really should just die() here and make them get a decent configuration. + $arr[$key] = str_replace("''", "'", $val); + } else { + $arr[$key] = stripslashes( $val ); + } + } + } + } ?> \ No newline at end of file Index: globals.php =================================================================== RCS file: /cvsroot/openfirst/base/includes/globals.php,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** globals.php 22 Nov 2005 16:34:07 -0000 1.22 --- globals.php 23 Nov 2005 21:52:26 -0000 1.23 *************** *** 111,114 **** --- 111,118 ---- require_once('functions.php'); + // This should been done at the earliest possible time. + // Which is now. + ofCheckMagicQuotes(); + if (!defined('OPENFIRST_NO_INSTALLATION')) { require_once('dbase.php'); |
From: Jamie <ast...@us...> - 2005-11-23 20:27:22
|
Update of /cvsroot/openfirst/base/includes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15926/includes Modified Files: MySQLDataBase.php Log Message: Removed broken implementation of select() Index: MySQLDataBase.php =================================================================== RCS file: /cvsroot/openfirst/base/includes/MySQLDataBase.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** MySQLDataBase.php 22 Nov 2005 03:32:42 -0000 1.4 --- MySQLDataBase.php 23 Nov 2005 20:27:14 -0000 1.5 *************** *** 198,202 **** * $options does nothing, currently. */ ! function select( $table, $vars, $conds='', $options = array() ) { $vars = $this->quoteField( $vars ); --- 198,202 ---- * $options does nothing, currently. */ ! /* function select( $table, $vars, $conds='', $options = array() ) { $vars = $this->quoteField( $vars ); *************** *** 223,227 **** } return $this->query( $sql ); ! } /** UPDATE wrapper, takes a condition array and a SET array. --- 223,227 ---- } return $this->query( $sql ); ! }*/ /** UPDATE wrapper, takes a condition array and a SET array. |
From: Jamie <ast...@us...> - 2005-11-23 19:01:48
|
Update of /cvsroot/openfirst/base/includes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24502/includes Modified Files: dbase.php Log Message: DataBase::select() no longer double-quotes columns Index: dbase.php =================================================================== RCS file: /cvsroot/openfirst/base/includes/dbase.php,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** dbase.php 22 Nov 2005 03:32:42 -0000 1.15 --- dbase.php 23 Nov 2005 19:01:33 -0000 1.16 *************** *** 296,300 **** function select( $table, $vars, $conds='', $options = array() ) { - $vars = $this->quoteField( $vars ); if( is_array( $table ) ) { $from = ' FROM ' . $this->quoteTable( $table ); --- 296,299 ---- |
From: Jamie <ast...@us...> - 2005-11-23 18:41:45
|
Update of /cvsroot/openfirst/base/includes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19542/includes Modified Files: xmlModule.php Log Message: Fixing "Invalid argument to foreach" errors Index: xmlModule.php =================================================================== RCS file: /cvsroot/openfirst/base/includes/xmlModule.php,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** xmlModule.php 19 Oct 2005 04:11:41 -0000 1.9 --- xmlModule.php 23 Nov 2005 18:41:38 -0000 1.10 *************** *** 191,194 **** --- 191,195 ---- /*public*/ function install() { global $ogDB; + if (!is_array($this->mTables)) return true; foreach($this->mTables as $table) { if (!$ogDB->updateTableFromObject($table) || ($ogDB->errorNumber() != 0)) { |
From: Jamie <ast...@us...> - 2005-11-23 18:33:55
|
Update of /cvsroot/openfirst/base/style In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17214/style Modified Files: headers.php Log Message: more isset() vs. is_object() errors Index: headers.php =================================================================== RCS file: /cvsroot/openfirst/base/style/headers.php,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** headers.php 22 Nov 2005 16:32:20 -0000 1.11 --- headers.php 23 Nov 2005 18:33:38 -0000 1.12 *************** *** 130,134 **** <?php ! if (isset($ogUser) && isset($ogCurrentModule) && $ogUser->isAdmin() && ($nav = $ogCurrentModule->getAdminBar())){ ?> <tr> --- 130,134 ---- <?php ! if (is_object($ogUser) && is_object($ogCurrentModule) && $ogUser->isAdmin() && ($nav = $ogCurrentModule->getAdminBar())){ ?> <tr> |
From: Jamie <ast...@us...> - 2005-11-23 18:30:08
|
Update of /cvsroot/openfirst/base/config In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16138/config Modified Files: first.php Log Message: wrong path in DBMS glob() Index: first.php =================================================================== RCS file: /cvsroot/openfirst/base/config/first.php,v retrieving revision 1.67 retrieving revision 1.68 diff -C2 -d -r1.67 -r1.68 *** first.php 23 Nov 2005 18:21:33 -0000 1.67 --- first.php 23 Nov 2005 18:29:54 -0000 1.68 *************** *** 177,181 **** // DB types $dbms = array(); ! foreach(glob('../*DataBase.php') as $file) { $matches = array(); $n = preg_match('#^.*/(.*)DataBase.php$#', $file, $matches); --- 177,181 ---- // DB types $dbms = array(); ! foreach(glob("$fbasepath/includes/*DataBase.php") as $file) { $matches = array(); $n = preg_match('#^.*/(.*)DataBase.php$#', $file, $matches); |
From: Jamie <ast...@us...> - 2005-11-23 18:21:41
|
Update of /cvsroot/openfirst/base/config In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13940/config Modified Files: first.php Log Message: avoid "___ not defined" errors Index: first.php =================================================================== RCS file: /cvsroot/openfirst/base/config/first.php,v retrieving revision 1.66 retrieving revision 1.67 diff -C2 -d -r1.66 -r1.67 *** first.php 23 Nov 2005 18:15:18 -0000 1.66 --- first.php 23 Nov 2005 18:21:33 -0000 1.67 *************** *** 178,181 **** --- 178,182 ---- $dbms = array(); foreach(glob('../*DataBase.php') as $file) { + $matches = array(); $n = preg_match('#^.*/(.*)DataBase.php$#', $file, $matches); $dbms[] = $matches[1]; |
From: Jamie <ast...@us...> - 2005-11-23 18:15:31
|
Update of /cvsroot/openfirst/base/config In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12472/config Modified Files: first.php Log Message: Use glob() to generate list of DBMSs. Index: first.php =================================================================== RCS file: /cvsroot/openfirst/base/config/first.php,v retrieving revision 1.65 retrieving revision 1.66 diff -C2 -d -r1.65 -r1.66 *** first.php 19 Oct 2005 04:15:25 -0000 1.65 --- first.php 23 Nov 2005 18:15:18 -0000 1.66 *************** *** 1,336 **** ! <?php ! /* ! * openFIRST.base - config/first.php ! * ! * Copyright (C) 2003, ! * openFIRST Project ! * Original Author: Tim Ginn <tim...@po...> ! * ! * This program is free software; you can redistribute it and/or modify ! * it under the terms of the GNU General Public License as published by ! * the Free Software Foundation; either version 2 of the License, or ! * (at your option) any later version. ! * ! * This program is distributed in the hope that it will be useful, ! * but WITHOUT ANY WARRANTY; without even the implied warranty of ! * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ! * GNU General Public License for more details. ! * This program is distributed in the hope that it will be useful, ! * but WITHOUT ANY WARRANTY; without even the implied warranty of ! * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ! * GNU General Public License for more details. ! * ! * You should have received a copy of the GNU General Public License ! * along with this program; if not, write to the Free Software ! * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ! * ! */ ! ! // Purpose: Deal with the initial set up that must occur once the openFIRST ! // base system has been extracted. This file should be removed once ! // this task is complete, or the permissions on globals.php should be ! // changed to prevent unwanted modification of configuration options. ! ! // Initialize header/footer vars ! $Title = 'openFIRST Installation'; ! $StylePath = 'http://openfirst.sourceforge.net'; ! ! define('OPENFIRST_INSTALLATION_SCRIPT', true); // Only define if it's the installation script ! ! if(isset($_POST["sqlserver"])) { ! $sqlserver = $_POST["sqlserver"]; ! $sqluser = $_POST["sqluser"]; ! $sqlpassword = $_POST["sqlpassword"]; ! $sqldatabase = $_POST["sqldatabase"]; ! $fbasepath = realpath($_POST['fbasepath']); ! ! function GetVarValue($var) { ! ob_Start(); ! var_export($var); ! $Value = ob_Get_Contents(); ! ob_End_Clean(); ! return $Value; ! } ! ! // They have submitted the form, write a new globals.php file and test ! // options. ! $ConfigFile = "$fbasepath/includes/sitesettings.php"; ! if ( (file_exists($ConfigFile) && is_writable($ConfigFile)) || is_writable(dirname($ConfigFile)) ) { ! $file = file_get_contents('../includes/sitesettings.tpl'); ! $cookielogins = ((isset($_POST["cookielogins"]) && $_POST["cookielogins"]=="yes") ? true : false); ! $allowreg = ((isset($_POST["allowreg"]) && $_POST["allowreg"]=="yes") ? true : false); ! ! $find = array('%DBTYPE%', ! '%ENCRYPT%', ! '%TITLE%', ! '%VER%', ! '%DBSERVER%', ! '%DBUSER%', ! '%DBPASS%', ! '%DBNAME%', ! '%COOKIE%', ! '%REG%', ! '%HOME%', ! '%HEADER%', ! '%FOOTER%', ! '%MASTERMAIL%', ! '%BOTMAIL%', ! '%SERVER%', ! '%BASEPATH%', ! '%FBASEPATH%'); ! ! $replace = array(GetVarValue($_POST['dbasetype']), ! GetVarValue($_POST['encryption']), ! GetVarValue($_POST['title']), ! GetVarValue($_POST['version']), ! GetVarValue($_POST['sqlserver']), ! GetVarValue($_POST['sqluser']), ! GetVarValue($_POST['sqlpassword']), ! GetVarValue($_POST['sqldatabase']), ! GetVarValue($cookielogins), ! GetVarValue($allowreg), ! GetVarValue($_POST['home']), ! GetVarValue($_POST['header']), ! GetVarValue($_POST['footer']), ! GetVarValue($_POST['mailnotify']), ! GetVarValue($_POST['mailfrom']), ! GetVarValue($_POST['server']), ! GetVarValue($_POST['basepath']), ! GetVarValue($fbasepath)); ! ! $file = str_replace($find, $replace, $file); ! $hfile = fopen("$ConfigFile",'w'); fwrite($hfile, $file); fclose($hfile); ! ! // We write the settings file before including globals.php ! ! include_once("$fbasepath/includes/globals.php"); ! require_once("$fbasepath/includes/xmlModule.php"); ! $base = xmlModule::createFromFile(dirname(__FILE__).'/openfirst.info.xml'); ! ! include_once($Header); ! // This a series of statements, each of which are executed. If an error condition occurs, that ! // branch is ran. ! if (!$ogDB->createDB($ogSQLDatabase, $ogSQLTablePrefix)) { ! // Do this as an optional root user? ! echo '<p class="error">DB creation error: '.htmlentities($ogDB->errorString()).'</p>'; ! } else if (($err = $base->install()) !== true) { ! echo '<p class="error">Tables creation error: '.htmlentities($err).'</p>'; ! echo '<pre>'.htmlentities($ogLastQuery).'</pre>'; ! } else if (($ogUser = User::createNewUser('admin', 'openfirst')) == null) { ! echo '<p class="error">Error creating user: '.htmlentities($ogDB->errorString()).'</p>'; ! } else { ! $ogUser->addGroup(ugADMIN); ! $ogUser->saveData(); ! echo("<div class=\"success\"><h1>openFIRST Software Configured</h1> ! <p>If this page does not display errors elsewhere, then your openFIRST has now been successfully ! configured. If there are errors, check your configuration options and try again. You may now ! wish to change the permissions on <span class=\"file\">".htmlentities(basename($ConfigFile))."</span> to prevent unwanted changes ! to the configuration options. You should be able to login using the username ! <b class=\"user\">admin</b> and the password <b class=\"password\">openfirst</b>, if not, then either ! the password for that account has been changed, or the MySQL settings are incorrect.</p>"); ! echo '<p class="big">Continue to the <a href="'.htmlentities($BasePath).'/config/">administration page</a>.</p>'; ! } ! include_once($Footer); ! die; ! } else { ! /* echo '<p class="error"><span class="file">'.htmlentities($ConfigFile).'</span> is not writable</p> ! ';*/ ! include_once($header); ! echo("<h1 class=\"error\">System Configuration Error</h1> ! <p>Cannot write to configuration file. Please check permissions on <b>".htmlentities(basename($ConfigFile))."</b> and ! ensure that the web user has the ability to write to this file.</p> ! ! <p>For unix, this would typically require the command: ! <pre class=\"shell\">cd includes<br /> ! chmod 666 \"".htmlentities(addslashes(basename($ConfigFile)))."\"</pre></p>"); ! } ! } else { ! define('OPENFIRST_NO_INSTALLATION', true); ! // Do form ! include("../includes/globals.php"); ! include($Header); ! ! // Detect default options ! $basepath = substr($_SERVER["SCRIPT_NAME"], 0, -17); ! $server = $_SERVER["SERVER_NAME"]; ! $fbasepath = realpath(dirname(__FILE__).'/..'); ! $ConfigFile = "$fbasepath/includes/sitesettings.php"; ! ! $sqlhost = 'localhost'; ! if(ini_get('mysql.default_host') != '') { ! $sqlhost = ini_get('mysql.default_host'); ! } ! ! $sqluser = 'sqluser'; ! if(ini_get('mysql.default_user') != '') { ! $sqluser = ini_get('mysql.default_user'); ! } ! ! $sqlpass = ''; ! if(ini_get('mysql.default_password') != '') { ! $sqlpass = ini_get('mysql.default_password'); ! } ! ! $mailto = $_SERVER['SERVER_ADMIN']; ! $mailfrom = "openfirst@$server"; ! ! // User is visiting the configuration page, present them with a form ! // of options to fill out. ! ?> ! <div class="center"> ! <h1>Base Configuration</h1> ! <p class="center" style="max-width: 50em;">Congratulations for choosing openFIRST! Please proceed through ! this setup wizard to get your new openFIRST portal software set up and working ! quickly and painlessly. Also please make sure that before installing this script ! that you have the appropriate permissions set on <span class="file"><?php echo htmlentities($ConfigFile) ?></span> (if not ! then you may receive a collection of errors after submitting this form).</p> ! </div> ! <form action="<?php echo htmlentities("http://$server$basepath/config/first.php"); ?>" method="post"> ! <fieldset> ! <legend>Database Setup</legend> ! <dl class="setup"> ! <dd> ! <label for="dbasetype">Database Type</label> ! <input type='hidden' name='peardb' value='false'> ! <select name="dbasetype"> ! <option value="mysql" selected="selected">MySQL</option> ! <option value="mssql">Microsoft SQL</option> ! <option value="odbc">ODBC</option> ! </select> ! </dd> ! <dt></dt> ! <dd> ! <label for="title">Title of Website</label> ! <input type="text" name="title" value="openFIRST" /> ! </dd> ! <dt></dt> ! <dd> ! <label for="version">Version of Website</label> ! <input type="text" name="version" value="1.0" /> ! </dd> ! <dt></dt> ! <dd> ! <label for="sqlserver">Database Server Address</label> ! <input type="text" name="sqlserver" value="<?php echo htmlentities($sqlhost); ?>" /> ! </dd> ! <dt></dt> ! <dd> ! <label for="sqluser">Database User Name</label> ! <input type="text" name="sqluser" value="<?php echo htmlentities($sqluser); ?>" /> ! </dd> ! <dt></dt> ! <dd> ! <label for="sqlpassword">Database User Password</label> ! <input type="password" name="sqlpassword" value="<?php echo htmlentities($sqlpass); ?>" /> ! </dd> ! <dt></dt> ! <dd> ! <label for="sqldatabase">Database Name</label> ! <input type="text" name="sqldatabase" value="openfirst" /> ! </dd> ! <dt>(I this database does not already exist, the user entered above must have access to create it.</dt> ! </dl> ! </fieldset> ! ! <fieldset> ! <legend>Linking Options</legend> ! <dl class="setup"> ! <dd> ! <label for="home">Home Site</label> ! <input type="text" name="home" value="http://<?php echo htmlentities("$server$basepath"); ?>" /> ! </dd> ! <dt>This address will used for linking to your main page.</dt> ! <dd> ! <label for="header">Header file</label> ! <input type="text" name="header" value="<?php echo htmlentities(realpath("$fbasepath/style/headers.php")); ?>" /> ! </dd> ! <dt>This should be a full system path, eg, ! <code class="file">c:\inetpub\wwwroot\openfirst\style\header.php</code> or ! <code class="file">/home/site/public_html/openfirst/style/headers.php</code> ! </dt> ! <dd> ! <label for="footer">Footer file</label> ! <input type="text" name="footer" value="<?php echo htmlentities(realpath("$fbasepath/style/footers.php")); ?>" /> ! </dd> ! <dt>This should be a full system path, eg, ! <code class="file">c:\inetpub\wwwroot\openfirst\style\footers.php</code> or ! <code class="file">/home/site/public_html/openfirst/style/footers.php</code> ! </dt> ! <dd> ! <label for="">The server name</label> ! <input type="text" name="server" value="http://<?php echo htmlentities($server); ?>" /> ! <span class="warning">Must not have a trailing slash and must include a protocol.</span> ! </dd> ! <dt>eg, <code class="url"><b>http://openfirst.sourceforge.net</b>/openfirst</code></dt> ! <dd> ! <label for="basepath">URL base path</label> ! <input type="text" name="basepath" value="<?php echo htmlentities($basepath); ?>" /> ! <span class="warning">Must not have a trailing slash.</span> ! </dd> ! <dt>ie. example: <code class="url">http://openfirst.sourceforge.net<b>/openfirst</b></code>) this should ! always have a beginning slash but no ending slash. (If openFIRST is in the root directory, then leave blank.) ! </dt> ! <dd> ! <label for="fbasepath">File system path</label> ! <input type="text" name="fbasepath" value="<?php echo htmlentities($fbasepath); ?>" /> ! <span class="warning">Must not have a trailing slash.</span> ! </dd> ! <dt>eg, <code class="file">/home/openfirst/htdocs/openfirst</code> ! or <code class="file">c:\inetpub\wwwroot\openfirst</code>) this should not have a ending slash.</dt> ! </dl> ! </fieldset> ! ! <fieldset> ! <legend>Security Options</legend> ! <dl class="setup"> ! <dd> ! <label for="">Hashing method</label> ! <select name="encryption"> ! <option value='md5' selected='selected'>MD5 Message-Digest Algorithm</option> ! <option value='crypt'>Standard Unix DES-based encryption algorthm</option> ! <option value='crc32'>crc32 Polynomial</option> ! <option value='sha1'>US Secure Hash Algorithm 1 (sha1)</option> ! </select> ! </dd> ! <dt>If you are migrating from an existing system, this should be the same encryption ! style that system uses, otherwise all users will have to reset their password; otherwise, in ! most cases the default option is fine.</dt> ! <dd> ! <label for="cookielogins">Allow users to save their passwords?</label> ! <input type="checkbox" name="cookielogins" id="cookielogins" value="yes" checked />Allowed ! </dd> ! <dt>This feature uses cookies to automatically log in users into the openFIRST portal.</dt> ! <dd> ! <label for="allowreg">Allow users to register on the portal?</label> ! <input type="checkbox" name="allowreg" id="allowreg" value="yes" />Allowed ! </dd> ! <dt>Enabling this option will allow users to register on the website and log in to access the ! members area. Be careful when using this option.</dt> ! </dl> ! </fieldset> ! ! <fieldset> ! <legend>Mailing Options</legend> ! <dl class="setup"> ! <dd> ! <label for="mailnotify">Mail Notification</label> ! <input type="text" name="mailnotify" value="<?php echo htmlentities($mailto); ?>" /> ! </dd> ! <dt>The e-mail address used to notify you when significant events occur.</dt> ! <dd> ! <label for="mailfrom">Mail From</label> ! <input type="text" name="mailfrom" value="<?php echo htmlentities($mailfrom); ?>" /> ! </dd> ! <dt>The e-mail address that mail from the openFIRST site should appear to be from.</dt> ! </dl> ! </fieldset> ! <div class="center big"><button class="center big" type="submit">Set up openFIRST!</button></div> ! </form> ! <?php ! } ! if(is_readable("style/footers.php")) { ! include_once("style/footers.php"); ! } else { ! include_once("../style/footers.php"); ! } ! ?> --- 1,347 ---- ! <?php ! /* ! * openFIRST.base - config/first.php ! * ! * Copyright (C) 2003, ! * openFIRST Project ! * Original Author: Tim Ginn <tim...@po...> ! * ! * This program is free software; you can redistribute it and/or modify ! * it under the terms of the GNU General Public License as published by ! * the Free Software Foundation; either version 2 of the License, or ! * (at your option) any later version. ! * ! * This program is distributed in the hope that it will be useful, ! * but WITHOUT ANY WARRANTY; without even the implied warranty of ! * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ! * GNU General Public License for more details. ! * This program is distributed in the hope that it will be useful, ! * but WITHOUT ANY WARRANTY; without even the implied warranty of ! * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ! * GNU General Public License for more details. ! * ! * You should have received a copy of the GNU General Public License ! * along with this program; if not, write to the Free Software ! * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ! * ! */ ! ! // Purpose: Deal with the initial set up that must occur once the openFIRST ! // base system has been extracted. This file should be removed once ! // this task is complete, or the permissions on globals.php should be ! // changed to prevent unwanted modification of configuration options. ! ! // Initialize header/footer vars ! $Title = 'openFIRST Installation'; ! $StylePath = 'http://openfirst.sourceforge.net'; ! ! define('OPENFIRST_INSTALLATION_SCRIPT', true); // Only define if it's the installation script ! ! if(isset($_POST["sqlserver"])) { ! $sqlserver = $_POST["sqlserver"]; ! $sqluser = $_POST["sqluser"]; ! $sqlpassword = $_POST["sqlpassword"]; ! $sqldatabase = $_POST["sqldatabase"]; ! $fbasepath = realpath($_POST['fbasepath']); ! ! function GetVarValue($var) { ! ob_Start(); ! var_export($var); ! $Value = ob_Get_Contents(); ! ob_End_Clean(); ! return $Value; ! } ! ! // They have submitted the form, write a new globals.php file and test ! // options. ! $ConfigFile = "$fbasepath/includes/sitesettings.php"; ! if ( (file_exists($ConfigFile) && is_writable($ConfigFile)) || is_writable(dirname($ConfigFile)) ) { ! $file = file_get_contents('../includes/sitesettings.tpl'); ! $cookielogins = ((isset($_POST["cookielogins"]) && $_POST["cookielogins"]=="yes") ? true : false); ! $allowreg = ((isset($_POST["allowreg"]) && $_POST["allowreg"]=="yes") ? true : false); ! ! $find = array('%DBTYPE%', ! '%ENCRYPT%', ! '%TITLE%', ! '%VER%', ! '%DBSERVER%', ! '%DBUSER%', ! '%DBPASS%', ! '%DBNAME%', ! '%COOKIE%', ! '%REG%', ! '%HOME%', ! '%HEADER%', ! '%FOOTER%', ! '%MASTERMAIL%', ! '%BOTMAIL%', ! '%SERVER%', ! '%BASEPATH%', ! '%FBASEPATH%'); ! ! $replace = array(GetVarValue($_POST['dbasetype']), ! GetVarValue($_POST['encryption']), ! GetVarValue($_POST['title']), ! GetVarValue($_POST['version']), ! GetVarValue($_POST['sqlserver']), ! GetVarValue($_POST['sqluser']), ! GetVarValue($_POST['sqlpassword']), ! GetVarValue($_POST['sqldatabase']), ! GetVarValue($cookielogins), ! GetVarValue($allowreg), ! GetVarValue($_POST['home']), ! GetVarValue($_POST['header']), ! GetVarValue($_POST['footer']), ! GetVarValue($_POST['mailnotify']), ! GetVarValue($_POST['mailfrom']), ! GetVarValue($_POST['server']), ! GetVarValue($_POST['basepath']), ! GetVarValue($fbasepath)); ! ! $file = str_replace($find, $replace, $file); ! $hfile = fopen("$ConfigFile",'w'); fwrite($hfile, $file); fclose($hfile); ! ! // We write the settings file before including globals.php ! ! include_once("$fbasepath/includes/globals.php"); ! require_once("$fbasepath/includes/xmlModule.php"); ! $base = xmlModule::createFromFile(dirname(__FILE__).'/openfirst.info.xml'); ! ! include_once($Header); ! // This a series of statements, each of which are executed. If an error condition occurs, that ! // branch is ran. ! if (!$ogDB->createDB($ogSQLDatabase, $ogSQLTablePrefix)) { ! // Do this as an optional root user? ! echo '<p class="error">DB creation error: '.htmlentities($ogDB->errorString()).'</p>'; ! } else if (($err = $base->install()) !== true) { ! echo '<p class="error">Tables creation error: '.htmlentities($err).'</p>'; ! echo '<pre>'.htmlentities($ogLastQuery).'</pre>'; ! } else if (($ogUser = User::createNewUser('admin', 'openfirst')) == null) { ! echo '<p class="error">Error creating user: '.htmlentities($ogDB->errorString()).'</p>'; ! } else { ! $ogUser->addGroup(ugADMIN); ! $ogUser->saveData(); ! echo("<div class=\"success\"><h1>openFIRST Software Configured</h1> ! <p>If this page does not display errors elsewhere, then your openFIRST has now been successfully ! configured. If there are errors, check your configuration options and try again. You may now ! wish to change the permissions on <span class=\"file\">".htmlentities(basename($ConfigFile))."</span> to prevent unwanted changes ! to the configuration options. You should be able to login using the username ! <b class=\"user\">admin</b> and the password <b class=\"password\">openfirst</b>, if not, then either ! the password for that account has been changed, or the MySQL settings are incorrect.</p>"); ! echo '<p class="big">Continue to the <a href="'.htmlentities($BasePath).'/config/">administration page</a>.</p>'; ! } ! include_once($Footer); ! die; ! } else { ! /* echo '<p class="error"><span class="file">'.htmlentities($ConfigFile).'</span> is not writable</p> ! ';*/ ! include_once($header); ! echo("<h1 class=\"error\">System Configuration Error</h1> ! <p>Cannot write to configuration file. Please check permissions on <b>".htmlentities(basename($ConfigFile))."</b> and ! ensure that the web user has the ability to write to this file.</p> ! ! <p>For unix, this would typically require the command: ! <pre class=\"shell\">cd includes<br /> ! chmod 666 \"".htmlentities(addslashes(basename($ConfigFile)))."\"</pre></p>"); ! } ! } else { ! define('OPENFIRST_NO_INSTALLATION', true); ! // Do form ! include("../includes/globals.php"); ! include($Header); ! ! // Detect default options ! $basepath = substr($_SERVER["SCRIPT_NAME"], 0, -17); ! $server = $_SERVER["SERVER_NAME"]; ! $fbasepath = realpath(dirname(__FILE__).'/..'); ! $ConfigFile = "$fbasepath/includes/sitesettings.php"; ! ! $sqlhost = 'localhost'; ! if(ini_get('mysql.default_host') != '') { ! $sqlhost = ini_get('mysql.default_host'); ! } ! ! $sqluser = 'sqluser'; ! if(ini_get('mysql.default_user') != '') { ! $sqluser = ini_get('mysql.default_user'); ! } ! ! $sqlpass = ''; ! if(ini_get('mysql.default_password') != '') { ! $sqlpass = ini_get('mysql.default_password'); ! } ! ! $mailto = $_SERVER['SERVER_ADMIN']; ! $mailfrom = "openfirst@$server"; ! ! // DB types ! $dbms = array(); ! foreach(glob('../*DataBase.php') as $file) { ! $n = preg_match('#^.*/(.*)DataBase.php$#', $file, $matches); ! $dbms[] = $matches[1]; ! } ! ! // User is visiting the configuration page, present them with a form ! // of options to fill out. ! ?> ! <div class="center"> ! <h1>Base Configuration</h1> ! <p class="center" style="max-width: 50em;">Congratulations for choosing openFIRST! Please proceed through ! this setup wizard to get your new openFIRST portal software set up and working ! quickly and painlessly. Also please make sure that before installing this script ! that you have the appropriate permissions set on <span class="file"><?php echo htmlentities($ConfigFile) ?></span> (if not ! then you may receive a collection of errors after submitting this form).</p> ! </div> ! <form action="<?php echo htmlentities("http://$server$basepath/config/first.php"); ?>" method="post"> ! <fieldset> ! <legend>Database Setup</legend> ! <dl class="setup"> ! <dd> ! <label for="dbasetype">Database Type</label> ! <input type='hidden' name='peardb' value='false'> ! <select name="dbasetype"> ! <?php ! foreach($dbms as $i) { ! $e = htmlentities($i); ! echo '<option value="'.$e.'">'.$e.'</option> ! '; ! } ! ?> ! </select> ! </dd> ! <dt></dt> ! <dd> ! <label for="title">Title of Website</label> ! <input type="text" name="title" value="openFIRST" /> ! </dd> ! <dt></dt> ! <dd> ! <label for="version">Version of Website</label> ! <input type="text" name="version" value="1.0" /> ! </dd> ! <dt></dt> ! <dd> ! <label for="sqlserver">Database Server Address</label> ! <input type="text" name="sqlserver" value="<?php echo htmlentities($sqlhost); ?>" /> ! </dd> ! <dt></dt> ! <dd> ! <label for="sqluser">Database User Name</label> ! <input type="text" name="sqluser" value="<?php echo htmlentities($sqluser); ?>" /> ! </dd> ! <dt></dt> ! <dd> ! <label for="sqlpassword">Database User Password</label> ! <input type="password" name="sqlpassword" value="<?php echo htmlentities($sqlpass); ?>" /> ! </dd> ! <dt></dt> ! <dd> ! <label for="sqldatabase">Database Name</label> ! <input type="text" name="sqldatabase" value="openfirst" /> ! </dd> ! <dt>(I this database does not already exist, the user entered above must have access to create it.</dt> ! </dl> ! </fieldset> ! ! <fieldset> ! <legend>Linking Options</legend> ! <dl class="setup"> ! <dd> ! <label for="home">Home Site</label> ! <input type="text" name="home" value="http://<?php echo htmlentities("$server$basepath"); ?>" /> ! </dd> ! <dt>This address will used for linking to your main page.</dt> ! <dd> ! <label for="header">Header file</label> ! <input type="text" name="header" value="<?php echo htmlentities(realpath("$fbasepath/style/headers.php")); ?>" /> ! </dd> ! <dt>This should be a full system path, eg, ! <code class="file">c:\inetpub\wwwroot\openfirst\style\header.php</code> or ! <code class="file">/home/site/public_html/openfirst/style/headers.php</code> ! </dt> ! <dd> ! <label for="footer">Footer file</label> ! <input type="text" name="footer" value="<?php echo htmlentities(realpath("$fbasepath/style/footers.php")); ?>" /> ! </dd> ! <dt>This should be a full system path, eg, ! <code class="file">c:\inetpub\wwwroot\openfirst\style\footers.php</code> or ! <code class="file">/home/site/public_html/openfirst/style/footers.php</code> ! </dt> ! <dd> ! <label for="">The server name</label> ! <input type="text" name="server" value="http://<?php echo htmlentities($server); ?>" /> ! <span class="warning">Must not have a trailing slash and must include a protocol.</span> ! </dd> ! <dt>eg, <code class="url"><b>http://openfirst.sourceforge.net</b>/openfirst</code></dt> ! <dd> ! <label for="basepath">URL base path</label> ! <input type="text" name="basepath" value="<?php echo htmlentities($basepath); ?>" /> ! <span class="warning">Must not have a trailing slash.</span> ! </dd> ! <dt>ie. example: <code class="url">http://openfirst.sourceforge.net<b>/openfirst</b></code>) this should ! always have a beginning slash but no ending slash. (If openFIRST is in the root directory, then leave blank.) ! </dt> ! <dd> ! <label for="fbasepath">File system path</label> ! <input type="text" name="fbasepath" value="<?php echo htmlentities($fbasepath); ?>" /> ! <span class="warning">Must not have a trailing slash.</span> ! </dd> ! <dt>eg, <code class="file">/home/openfirst/htdocs/openfirst</code> ! or <code class="file">c:\inetpub\wwwroot\openfirst</code>) this should not have a ending slash.</dt> ! </dl> ! </fieldset> ! ! <fieldset> ! <legend>Security Options</legend> ! <dl class="setup"> ! <dd> ! <label for="">Hashing method</label> ! <select name="encryption"> ! <option value='md5' selected='selected'>MD5 Message-Digest Algorithm</option> ! <option value='crypt'>Standard Unix DES-based encryption algorthm</option> ! <option value='crc32'>crc32 Polynomial</option> ! <option value='sha1'>US Secure Hash Algorithm 1 (sha1)</option> ! </select> ! </dd> ! <dt>If you are migrating from an existing system, this should be the same encryption ! style that system uses, otherwise all users will have to reset their password; otherwise, in ! most cases the default option is fine.</dt> ! <dd> ! <label for="cookielogins">Allow users to save their passwords?</label> ! <input type="checkbox" name="cookielogins" id="cookielogins" value="yes" checked />Allowed ! </dd> ! <dt>This feature uses cookies to automatically log in users into the openFIRST portal.</dt> ! <dd> ! <label for="allowreg">Allow users to register on the portal?</label> ! <input type="checkbox" name="allowreg" id="allowreg" value="yes" />Allowed ! </dd> ! <dt>Enabling this option will allow users to register on the website and log in to access the ! members area. Be careful when using this option.</dt> ! </dl> ! </fieldset> ! ! <fieldset> ! <legend>Mailing Options</legend> ! <dl class="setup"> ! <dd> ! <label for="mailnotify">Mail Notification</label> ! <input type="text" name="mailnotify" value="<?php echo htmlentities($mailto); ?>" /> ! </dd> ! <dt>The e-mail address used to notify you when significant events occur.</dt> ! <dd> ! <label for="mailfrom">Mail From</label> ! <input type="text" name="mailfrom" value="<?php echo htmlentities($mailfrom); ?>" /> ! </dd> ! <dt>The e-mail address that mail from the openFIRST site should appear to be from.</dt> ! </dl> ! </fieldset> ! <div class="center big"><button class="center big" type="submit">Set up openFIRST!</button></div> ! </form> ! <?php ! } ! if(is_readable("style/footers.php")) { ! include_once("style/footers.php"); ! } else { ! include_once("../style/footers.php"); ! } ! ?> |
Update of /cvsroot/openfirst/www/htdocs/cvs/smartcvs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32739/smartcvs Removed Files: checkout-to-projectsettings.png choose-directory.png confirmation-to-finish.png enter-password.png index.php license.png new-repository.png program-version.png projectsettings-to-confirmation.png repository-to-manage.png repository-to-modules.png repositorymanager-click-ok.png repositorymanager-to-add.png select-modules.png target-directory.png target-to-checkout.png tip-of-the-day.png welcome-screen.png Log Message: Removing www/htdocs/cvs, screws up filesystems that are case-insensitive. --- confirmation-to-finish.png DELETED --- --- tip-of-the-day.png DELETED --- --- repositorymanager-click-ok.png DELETED --- --- checkout-to-projectsettings.png DELETED --- --- new-repository.png DELETED --- --- index.php DELETED --- --- projectsettings-to-confirmation.png DELETED --- --- enter-password.png DELETED --- --- target-to-checkout.png DELETED --- --- choose-directory.png DELETED --- --- select-modules.png DELETED --- --- repositorymanager-to-add.png DELETED --- --- repository-to-manage.png DELETED --- --- welcome-screen.png DELETED --- --- repository-to-modules.png DELETED --- --- program-version.png DELETED --- --- license.png DELETED --- --- target-directory.png DELETED --- |
Update of /cvsroot/openfirst/www/htdocs/cvs/smartcvs3 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32739/smartcvs3 Removed Files: checkout-to-projectsettings.png choose-directory.png confirmation-to-finish.png enter-password.png index.php license.png new-repository.png program-version.png projectsettings-to-confirmation.png repository-to-manage.png repository-to-modules.png repositorymanager-click-ok.png repositorymanager-to-add.png select-modules.png target-directory.png target-to-checkout.png tip-of-the-day.png welcome-screen.png Log Message: Removing www/htdocs/cvs, screws up filesystems that are case-insensitive. --- confirmation-to-finish.png DELETED --- --- tip-of-the-day.png DELETED --- --- repositorymanager-click-ok.png DELETED --- --- checkout-to-projectsettings.png DELETED --- --- new-repository.png DELETED --- --- index.php DELETED --- --- projectsettings-to-confirmation.png DELETED --- --- enter-password.png DELETED --- --- target-to-checkout.png DELETED --- --- choose-directory.png DELETED --- --- select-modules.png DELETED --- --- repositorymanager-to-add.png DELETED --- --- repository-to-manage.png DELETED --- --- welcome-screen.png DELETED --- --- repository-to-modules.png DELETED --- --- program-version.png DELETED --- --- license.png DELETED --- --- target-directory.png DELETED --- |
From: Jamie <ast...@us...> - 2005-11-22 16:37:20
|
Update of /cvsroot/openfirst/awards/admin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25779/awards/admin Modified Files: index.php Log Message: -Serious updates (A whole lot of changes...) (admin/index.php) -no trailing line (awards.php) Index: index.php =================================================================== RCS file: /cvsroot/openfirst/awards/admin/index.php,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** index.php 30 Jun 2005 03:28:30 -0000 1.25 --- index.php 22 Nov 2005 16:37:09 -0000 1.26 *************** *** 1,312 **** ! <?php ! /* ! * openFIRST.awards - admin/index.php ! * ! * Copyright (C) 2003, ! * openFIRST Project ! * Original Author: David Di Biase <dav...@ea...> ! * ! * This program is free software; you can redistribute it and/or modify ! * it under the terms of the GNU General Public License as published by ! * the Free Software Foundation; either version 2 of the License, or ! * (at your option) any later version. ! * ! * This program is distributed in the hope that it will be useful, ! * but WITHOUT ANY WARRANTY; without even the implied warranty of ! * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ! * GNU General Public License for more details. ! * ! * You should have received a copy of the GNU General Public License ! * along with this program; if not, write to the Free Software ! * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ! * ! */ ! include_once("../../includes/globals.php"); ! include_once($Header); ! ! // Check if user is an admin then allow processes ! if(isset($user->user)){ ! ! if($user->membertype=="administrator"){ ! // If user has posted delete then delete specified record in querystring DELETE ! if (isset($_GET['DELETE'])){ ! ofirst_dbquery('DELETE FROM '. ! ofirst_dbquote_table('awards'). ! ' WHERE '. ! ofirst_dbquote_name('ID'). ! ' = '. ! ofirst_dbquote_data($_GET['DELETE']) ! ) or die("DELETE: ". ofirst_dberror()); ! ! echo("<p>Award information has been deleted.</p><p>[ <a href='./'>Manage Awards</a> ]</p>"); ! die(include_once($footer)); ! } ! $DisplayForm = true; ! $CreateNew = true; ! if (array_key_exists('AwardID', $_POST)) { ! $CreateNew = false; ! $DisplayForm = false; ! } ! if (array_key_exists('create', $_POST)) { ! $CreateNew = true; ! $DisplayForm = false; ! } ! if (array_key_exists('modify', $_POST)) { ! $CreateNew = false; ! $DisplayForm = false; ! } ! ! $firstaward = false; ! if (isset($_POST['firstaward'])) $firstaward = $_POST['firstaward'] == '1' ? true : false; ! $firstawardname = ''; ! if (isset($_POST['firstawardname'])) $firstawardname = $_POST['firstawardname']; ! $award = ''; ! if (isset($_POST['award'])) $award = $_POST['award']; ! $event = ''; ! if (isset($_POST['event'])) $event = $_POST['event']; ! $date = date('Y-n-j'); ! if (isset($_POST['date'])) $date = $_POST['date']; ! $recipient = ''; ! if (isset($_POST['recipient'])) $recipient = $_POST['recipient']; ! $description = ''; ! if (isset($_POST['description'])) $description = $_POST['description']; ! $type = 'gold'; ! if (isset($_POST['type'])) $type = $_POST['type']; ! ! ! // If user has posted create then insert new award record ! if ($CreateNew && !$DisplayForm){ ! if ($award != '' || $firstaward){ ! if($firstaward) { ! $sql = 'SELECT * FROM '.$ogDB->quoteTable('firstawards'). ! ' WHERE '.$ogDB->quoteField('AwardName').'='.$ogDB->quoteData($firstawardname). ! ' LIMIT 0,1'; ! $faq = $ogDB->query($sql); ! $fa = $ogDB->fetchObject($faq); ! $award = $fa->AwardName; ! $description = $fa->Description; ! } ! $sql = 'INSERT INTO '. ! $ogDB->quoteTable('awards').' SET '. ! $ogDB->quoteFDPairs(array('AwardName' => $award, ! 'FIRSTAward' => $firstaward, ! 'Event' => $event, ! 'Date' => $date, ! 'Image' => $type, ! 'Description' => $description, ! 'Recipient' => $recipient ! )); ! $ogDB->query($sql) or die(trigger_error('an openFIRST DB error')); ! ! echo("<p>Congratulations on your new award. Award submitted!</p><p>[ <a href='./'>Manage Awards</a> ]</p>"); ! } else { ! echo("<p>Please enter a name for the award.</p><p>[ <a href='./'>Manage Awards</a> ]</p>"); ! } ! die(include_once($Footer)); ! } ! ! // If the user has submitted modifications to an award, then make them. ! ! if (!$CreateNew && !$DisplayForm){ ! if ($award != "" || $firstaward){ ! if ($firstaward) { ! $faq = ofirst_dbquery('SELECT * FROM '.ofirst_dbquote_table('awards').' WHERE '. ! ofirst_dbquote_name('AwardName').'='. ! ofirst_dbquote_data($firstawardname)); ! $fa = ofirst_dbfetch_object($faq); ! $award = $fa->AwardName; ! $description = $fa->Description; ! } ! ! ofirst_dbquery('UPDATE '.ofirst_dbquote_table('awards').' SET '. ! ofirst_dbquote_fd_pairs(array( ! 'AwardName' => $award, ! 'FIRSTAward' => $firstaward, ! 'Event' => $event, ! 'Date' => $date, ! 'Image' => $type, ! 'Description' => $description, ! 'Recipient' => $recipient)). ! ' WHERE '.ofirst_dbquote_name('ID').'='.ofirst_dbquote_data(AwardID)) ! or die("UPDATE: ".ofirst_dberror()); ! ! echo("<p>Award modifications submitted!</p><p>[ <a href='./'>Manage Awards</a> ]</p>"); ! } else { ! echo("<p>Please enter a name for the award.</p><p>[ <a href='./'>Manage Awards</a> ]</p>"); ! } ! die(include_once($footer)); ! } ! ! ! // If the user has elected to modify an award, fill the form with those details. ! if(!$CreateNew) { ! $sql = 'SELECT * FROM '.$ogDB->quoteTable('awards'). ! ' WHERE '.$ogDB->quoteField('ID').'='.$ogDB->quoteData('AwardID'); ! $award = $ogDB->fetchObject($ogDB->query($sql)); ! $award->template = false; ! ! } else { ! $award = (object)''; ! $award->template = true; ! $award->AwardName = 'Autodesk Visualization Award'; ! $award->Description = ''; ! $award->Event = ''; ! $award->Date = date('Y-n-j'); ! $award->Recipient = 'Team Award'; ! $award->Image = 'gold'; ! $award->FIRSTAward = '1'; ! } ! ?> ! ! <h1>Manage Award Information</h1> ! <form method="post" action="index.php"> ! <table> ! <colgroup> ! <col /> ! </colgroup> ! <colgroup> ! <col /> ! </colgroup> ! <tr> ! <th colspan="2"><?php ! if (!$award->template) { ! echo("Modify an Existing Award ! <input type='hidden' id='AwardID' name='AwardID' value='$award->ID'>"); ! } else { ! echo("Add A New Award"); ! } ! ?></th> ! </tr> ! <tr> ! <th>Award Name</th> ! <td class="left"> ! <table class="no-space left"> ! <tr> ! <td> ! <input type='radio' name='firstaward' value='1' <?php if ($award->FIRSTAward) echo 'checked="checked"'; ?>> ! </td> ! <td> FIRST Award</td> ! </td> ! <td> ! <select name='firstawardname'> ! <?php ! $faq = $ogDB->query('SELECT * FROM '.$ogDB->quoteTable('firstawards').' ORDER BY '.$ogDB->quoteField('AwardName')); ! while($fa = $ogDB->fetchObject($faq)) { ! echo "<option value='$fa->AwardName'"; ! if ($award->AwardName == $fa->AwardName) echo 'selected'; ! echo ">$fa->AwardName</option>"; ! } ! ?> ! </select> ! </td> ! </tr> ! <tr> ! <td> ! <input type='radio' name='firstaward' value='0' <?php if (!$award->FIRSTAward) echo 'checked="checked"'; ?>> ! </td> ! <td> Custom Award</td> ! </td> ! <td> ! <input name="award" type="text" id="award" value="<?php if (!$award->FIRSTAward) echo $award->AwardName; ?>"> ! </td> ! </tr> ! </table> ! </td> ! </tr> ! <tr> ! <th>Regional/Event</th> ! <td class="left"><input name="event" type="text" id="event" value="<?php echo $award->Event; ?>"></td> ! </tr> ! <tr> ! <th>Date</th> ! <td class="left"><input name="date" type="text" id="date" value="<?php ! echo $award->Date; ! ?>" size="10"> ! <sub>(Use this syntax: Year-Month-Day)</sub></td> ! </tr> ! <tr> ! <th>Recipient</th> ! <td class="left"><input name="recipient" type="text" id="recipient" value="<?php ! echo $award->Recipient; ! ?>"></td> ! </tr> ! <tr> ! <th>Description<br />(leave blank for FIRST Awards)</th> ! <td><textarea name="description" cols="30" rows="5"><?php echo $award->Description; ?></textarea></td> ! </tr> ! <tr> ! <th>Award Type</th> ! <td class="left"><table> ! <tr> ! <td><img src="<?php echo($BasePath); ?>/awards/awardsgold.png" alt="Gold"></td> ! <td><img src="<?php echo($BasePath); ?>/awards/awardssilver.png" alt="Silver"></td> ! <td><img src="<?php echo($BasePath); ?>/awards/awardsbronze.png" alt="Bronze"></td> ! </tr> ! <tr> ! <td><div align="center"> ! <input name="type" type="radio" value="gold" <?php ! if (strcasecmp($award->Image, 'gold') == 0) echo 'checked="checked"'; ! ?>> ! </div></td> ! <td><div align="center"> ! <input type="radio" name="type" value="silver" <?php ! if (strcasecmp($award->Image, 'silver') == 0) echo 'checked="checked"'; ! ?>> ! </div></td> ! <td><div align="center"> ! <input type="radio" name="type" value="bronze" <?php ! if (strcasecmp($award->Image, 'bronze') == 0) echo 'checked="checked"'; ! ?>> ! </div></td> ! </tr> ! </table></td> ! </tr> ! <tr> ! <td colspan="2" class="center"> ! <?php if($award->template) { ?> ! <input name="create" type="submit" id="create" value="Create Award"> ! <?php } else { ?> ! <input name="modify" type="submit" id="modify" value="Modify Award"></td> ! <?php } ?> ! </td> ! </tr> ! </table> ! </form> ! <table> ! <tr> ! <th colspan="2">Award Name</th> ! <th>Event</th> ! <th>Date</th> ! <th>Recipient</th> ! <th>Option</th> ! </tr> ! <?php ! // Loop through awards ordered by date ! $query = $ogDB->query('SELECT * FROM '.$ogDB->quoteTable('awards').' ORDER BY '.$ogDB->quoteName('Date')); ! while($awards = $ogDB->fetchObject($query)){ ! ?> ! <tr> ! <td><img src="<?php echo($BasePath); ?>/awards/awards<?php echo $awards->Image; ?>.png" alt="<?php echo $awards->Image; ?>"></td> ! <td><?php echo $awards->AwardName; ?></td> ! <td><?php echo $awards->Event; ?></td> ! <td><?php echo $awards->Date; ?></td> ! <td><?php echo $awards->Recipient; ?></td> ! <td><div align="center">[ <a href='./?DELETE=<?php echo $awards->ID; ?>'>Delete</a> | <a href='./?MODIFY=<?php echo $awards->ID; ?>'>Modify</a> ]</div></td> ! </tr> ! <?php ! } ! if($ogDB->numberOfRows($query) == 0){ ! echo '<tr><td colspan="6">No awards entered!</td></tr>'; ! } ! ?> ! </table> ! <br /> ! <?php ! } else { ! echo("<h1>Manage Award Information</h1><p>Only administrators can use this feature</p>"); ! } ! } else { ! showlogin(); ! } ! include_once($Footer); ! ?> --- 1,293 ---- ! <?php ! /* ! * openFIRST.awards - admin/index.php ! * ! * Copyright (C) 2003, ! * openFIRST Project ! * Original Author: David Di Biase <dav...@ea...> ! * ! * This program is free software; you can redistribute it and/or modify ! * it under the terms of the GNU General Public License as published by ! * the Free Software Foundation; either version 2 of the License, or ! * (at your option) any later version. ! * ! * This program is distributed in the hope that it will be useful, ! * but WITHOUT ANY WARRANTY; without even the implied warranty of ! * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ! * GNU General Public License for more details. ! * ! * You should have received a copy of the GNU General Public License ! * along with this program; if not, write to the Free Software ! * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ! * ! */ ! include_once("../../includes/globals.php"); ! $ogUser->mustBeAdmin(); ! include_once($Header); ! ! // Check if user is an admin then allow processes ! // If user has posted delete then delete specified record in querystring DELETE ! if (isset($_GET['DELETE'])){ ! $ogDB->delete('awards', array('ID' => $_GET['DELETE'])) or die("DELETE: ". $ogDB->errorString()); ! ! ! echo("<p>Award information has been deleted.</p><p>[ <a href='./'>Manage Awards</a> ]</p>"); ! die(include_once($footer)); ! } ! $DisplayForm = true; ! $CreateNew = true; ! if (array_key_exists('AwardID', $_POST)) { ! $CreateNew = false; ! $DisplayForm = false; ! } ! if (array_key_exists('create', $_POST)) { ! $CreateNew = true; ! $DisplayForm = false; ! } ! if (array_key_exists('modify', $_POST)) { ! $CreateNew = false; ! $DisplayForm = false; ! } ! ! $firstaward = false; ! if (isset($_POST['firstaward'])) $firstaward = $_POST['firstaward'] == '1' ? true : false; ! $firstawardname = ''; ! if (isset($_POST['firstawardname'])) $firstawardname = $_POST['firstawardname']; ! $award = ''; ! if (isset($_POST['award'])) $award = $_POST['award']; ! $event = ''; ! if (isset($_POST['event'])) $event = $_POST['event']; ! $date = date('Y-n-j'); ! if (isset($_POST['date'])) $date = $_POST['date']; ! $recipient = ''; ! if (isset($_POST['recipient'])) $recipient = $_POST['recipient']; ! $description = ''; ! if (isset($_POST['description'])) $description = $_POST['description']; ! $type = 'gold'; ! if (isset($_POST['type'])) $type = $_POST['type']; ! ! ! // If user has posted create then insert new award record ! if ($CreateNew && !$DisplayForm){ ! if ($award != '' || $firstaward){ ! if($firstaward) { ! $faq = $ogDB->select( 'firstawards', '*', array('AwardName' => $firstawardname), array('LIMIT' => '0,1') ); ! $fa = $ogDB->fetchObject($faq); ! $award = $fa->AwardName; ! $description = $fa->Description; ! } ! $ogDB->insert( 'awards', ! array( 'AwardName' => $award, ! 'FIRSTAward' => $firstaward, ! 'Event' => $event, ! 'Date' => $date, ! 'Image' => $type, ! 'Description' => $description, ! 'Recipient' => $recipient ! ) ! ) or trigger_error('an openFIRST DB error'); ! ! echo("<p>Congratulations on your new award. Award submitted!</p><p>[ <a href='./'>Manage Awards</a> ]</p>"); ! } else { ! echo("<p>Please enter a name for the award.</p><p>[ <a href='./'>Manage Awards</a> ]</p>"); ! } ! include_once($Footer); ! die(); ! } ! ! // If the user has submitted modifications to an award, then make them. ! ! if (!$CreateNew && !$DisplayForm){ ! if ($award != "" || $firstaward){ ! if ($firstaward) { ! $faq = $ogDB->select('awards', '*', array('AwardName' => $firstawardname)); ! $fa = $ogDB->fetchObject($faq); ! $award = $fa->AwardName; ! $description = $fa->Description; ! } ! ! $ogDB->update( 'awards', ! array( 'AwardName' => $award, ! 'FIRSTAward' => $firstaward, ! 'Event' => $event, ! 'Date' => $date, ! 'Image' => $type, ! 'Description' => $description, ! 'Recipient' => $recipient ! ), ! array('ID' => AwardID) ! ) or die("UPDATE: ".$ogDB->errorString()); ! ! echo("<p>Award modifications submitted!</p><p>[ <a href='./'>Manage Awards</a> ]</p>"); ! } else { ! echo("<p>Please enter a name for the award.</p><p>[ <a href='./'>Manage Awards</a> ]</p>"); ! } ! include_once($Footer); ! die(); ! } ! ! ! // If the user has elected to modify an award, fill the form with those details. ! if(!$CreateNew) { ! $award = $ogDB->fetchObject($ogDB->select('awards', array('ID' => $AwardID))); ! $award->template = false; ! ! } else { ! $award = (object)''; ! $award->template = true; ! $award->AwardName = 'Autodesk Visualization Award'; ! $award->Description = ''; ! $award->Event = ''; ! $award->Date = date('Y-n-j'); ! $award->Recipient = 'Team Award'; ! $award->Image = 'gold'; ! $award->FIRSTAward = '1'; ! } ! ?> ! ! <h1>Manage Award Information</h1> ! <form method="post" action="index.php"> ! <table> ! <colgroup> ! <col /> ! </colgroup> ! <colgroup> ! <col /> ! </colgroup> ! <tr> ! <th colspan="2"><?php ! if (!$award->template) { ! echo("Modify an Existing Award ! <input type='hidden' id='AwardID' name='AwardID' value='".htmlentities($award->ID)."'>"); ! } else { ! echo("Add A New Award"); ! } ! ?></th> ! </tr> ! <tr> ! <th>Award Name</th> ! <td class="left"> ! <table class="no-space left"> ! <tr> ! <td> ! <input type='radio' name='firstaward' value='1' <?php if ($award->FIRSTAward) echo 'checked="checked"'; ?>> ! </td> ! <td> FIRST Award</td> ! </td> ! <td> ! <select name='firstawardname'> ! <?php ! $faq = $ogDB->select('firstawards', 'AwardName', array(), array('order' => 'AwardName')); ! while($fa = $ogDB->fetchObject($faq)) { ! echo "<option value='$fa->AwardName'"; ! if ($award->AwardName == $fa->AwardName) echo 'selected'; ! echo ">$fa->AwardName</option>"; ! } ! ?> ! </select> ! </td> ! </tr> ! <tr> ! <td> ! <input type='radio' name='firstaward' value='0' <?php if (!$award->FIRSTAward) echo 'checked="checked"'; ?>> ! </td> ! <td> Custom Award</td> ! </td> ! <td> ! <input name="award" type="text" id="award" value="<?php if (!$award->FIRSTAward) echo $award->AwardName; ?>"> ! </td> ! </tr> ! </table> ! </td> ! </tr> ! <tr> ! <th>Regional/Event</th> ! <td class="left"><input name="event" type="text" id="event" value="<?php echo $award->Event; ?>"></td> ! </tr> ! <tr> ! <th>Date</th> ! <td class="left"><input name="date" type="text" id="date" value="<?php ! echo $award->Date; ! ?>" size="10"> ! <sub>(Use this syntax: Year-Month-Day)</sub></td> ! </tr> ! <tr> ! <th>Recipient</th> ! <td class="left"><input name="recipient" type="text" id="recipient" value="<?php ! echo $award->Recipient; ! ?>"></td> ! </tr> ! <tr> ! <th>Description<br />(leave blank for FIRST Awards)</th> ! <td><textarea name="description" cols="30" rows="5"><?php echo $award->Description; ?></textarea></td> ! </tr> ! <tr> ! <th>Award Type</th> ! <td class="left"><table> ! <tr> ! <td><img src="<?php echo($BasePath); ?>/awards/awardsgold.png" alt="Gold"></td> ! <td><img src="<?php echo($BasePath); ?>/awards/awardssilver.png" alt="Silver"></td> ! <td><img src="<?php echo($BasePath); ?>/awards/awardsbronze.png" alt="Bronze"></td> ! </tr> ! <tr> ! <td><div align="center"> ! <input name="type" type="radio" value="gold" <?php ! if (strcasecmp($award->Image, 'gold') == 0) echo 'checked="checked"'; ! ?>> ! </div></td> ! <td><div align="center"> ! <input type="radio" name="type" value="silver" <?php ! if (strcasecmp($award->Image, 'silver') == 0) echo 'checked="checked"'; ! ?>> ! </div></td> ! <td><div align="center"> ! <input type="radio" name="type" value="bronze" <?php ! if (strcasecmp($award->Image, 'bronze') == 0) echo 'checked="checked"'; ! ?>> ! </div></td> ! </tr> ! </table></td> ! </tr> ! <tr> ! <td colspan="2" class="center"> ! <?php if($award->template) { ?> ! <input name="create" type="submit" id="create" value="Create Award"> ! <?php } else { ?> ! <input name="modify" type="submit" id="modify" value="Modify Award"></td> ! <?php } ?> ! </td> ! </tr> ! </table> ! </form> ! <table> ! <tr> ! <th colspan="2">Award Name</th> ! <th>Event</th> ! <th>Date</th> ! <th>Recipient</th> ! <th>Option</th> ! </tr> ! <?php ! // Loop through awards ordered by date ! $query = $ogDB->select('awards', '*', array(), array('order' => 'Date')); ! while($awards = $ogDB->fetchObject($query)){ ! ?> ! <tr> ! <td><img src="<?php echo($BasePath); ?>/awards/awards<?php echo $awards->Image; ?>.png" alt="<?php echo $awards->Image; ?>"></td> ! <td><?php echo $awards->AwardName; ?></td> ! <td><?php echo $awards->Event; ?></td> ! <td><?php echo $awards->Date; ?></td> ! <td><?php echo $awards->Recipient; ?></td> ! <td><div align="center">[ <a href='./?DELETE=<?php echo $awards->ID; ?>'>Delete</a> | <a href='./?MODIFY=<?php echo $awards->ID; ?>'>Modify</a> ]</div></td> ! </tr> ! <?php ! } ! if($ogDB->numberOfRows($query) == 0){ ! echo '<tr><td colspan="6">No awards entered!</td></tr>'; ! } ! ?> ! </table> ! <br /> ! <?php ! include_once($Footer); ! ?> |