[Openfirst-cvscommit] awards/admin index.php,1.6,1.7
Brought to you by:
xtimg
From: <xt...@us...> - 2003-08-23 20:03:23
|
Update of /cvsroot/openfirst/awards/admin In directory sc8-pr-cvs1:/tmp/cvs-serv10278/admin Modified Files: index.php Log Message: Add support for multiple database types Index: index.php =================================================================== RCS file: /cvsroot/openfirst/awards/admin/index.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** index.php 23 Jul 2003 21:08:37 -0000 1.6 --- index.php 23 Aug 2003 20:03:13 -0000 1.7 *************** *** 35,39 **** // If user has posted delete then delete specified record in querystring DELETE if (ISSET($_GET['DELETE'])){ ! mysql_query("DELETE FROM ofirst_awards WHERE ID = '".$_GET['DELETE']."'") or die("DELETE: ".mysql_error()); echo("<p>Award information has been deleted. [ <a href='./'>Manage Award</a> ]</p>"); --- 35,39 ---- // If user has posted delete then delete specified record in querystring DELETE if (ISSET($_GET['DELETE'])){ ! ofirst_dbquery("DELETE FROM ofirst_awards WHERE ID = '".$_GET['DELETE']."'") or die("DELETE: ".mysql_error()); echo("<p>Award information has been deleted. [ <a href='./'>Manage Award</a> ]</p>"); *************** *** 43,47 **** // If user has posted create then insert new award record if (ISSET($_POST['create'])){ ! mysql_query("INSERT INTO ofirst_awards (AwardName,Event,Date,Image,Recipient) values( '".$_POST['award']."', '".$_POST['event']."', '".$_POST['date']. "', '".$_POST['type']."', '".$_POST['recipient']."')") --- 43,47 ---- // If user has posted create then insert new award record if (ISSET($_POST['create'])){ ! ofirst_dbquery("INSERT INTO ofirst_awards (AwardName,Event,Date,Image,Recipient) values( '".$_POST['award']."', '".$_POST['event']."', '".$_POST['date']. "', '".$_POST['type']."', '".$_POST['recipient']."')") *************** *** 55,59 **** if (ISSET($_POST['modify'])){ ! mysql_query("UPDATE ofirst_awards SET AwardName='".$_POST['award']."', Event = '".$_POST['event']."', Date = '".$_POST['date'] . "', --- 55,59 ---- if (ISSET($_POST['modify'])){ ! ofirst_dbquery("UPDATE ofirst_awards SET AwardName='".$_POST['award']."', Event = '".$_POST['event']."', Date = '".$_POST['date'] . "', *************** *** 69,73 **** // If the user has elected to modify an award, fill the form with those details. if(isset($_GET["MODIFY"])) { ! $award = mysql_fetch_object(mysql_query("SELECT * FROM ofirst_awards WHERE ID='" . $_GET["MODIFY"] . "';")); } else { $award = ""; --- 69,73 ---- // If the user has elected to modify an award, fill the form with those details. if(isset($_GET["MODIFY"])) { ! $award = ofirst_dbfetch_object(ofirst_dbquery("SELECT * FROM ofirst_awards WHERE ID='" . $_GET["MODIFY"] . "';")); } else { $award = ""; *************** *** 159,164 **** <?php // Loop through awards ordered by date ! $query = mysql_query("SELECT * FROM ofirst_awards ORDER BY Date"); ! while($awards = mysql_fetch_object($query)){ ?> <tr> --- 159,164 ---- <?php // Loop through awards ordered by date ! $query = ofirst_dbquery("SELECT * FROM ofirst_awards ORDER BY Date"); ! while($awards = ofirst_dbfetch_object($query)){ ?> <tr> |