[Openfirst-cvscommit] awards/admin index.php,1.2,1.3
Brought to you by:
xtimg
From: <xt...@us...> - 2003-06-23 11:38:13
|
Update of /cvsroot/openfirst/awards/admin In directory sc8-pr-cvs1:/tmp/cvs-serv8961/admin Modified Files: index.php Log Message: Convert all styles to use CSS, fix indenting problems. Index: index.php =================================================================== RCS file: /cvsroot/openfirst/awards/admin/index.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** index.php 21 Jun 2003 11:45:53 -0000 1.2 --- index.php 23 Jun 2003 11:38:10 -0000 1.3 *************** *** 1,5 **** <?php /* ! * openFIRST.awards - manage.php * * Copyright (C) 2003, --- 1,5 ---- <?php /* ! * openFIRST.awards - admin/index.php * * Copyright (C) 2003, *************** *** 26,95 **** * */ ! include("../../config/globals.php"); include($header); ! mysql_select_db("openFIRST",$sqlconnection); // Check if user is an admin then allow processes if (isset($user->user)){ ! // 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("<br><br><center>Award information has been deleted. [ <a href='./'>Manage Award</a> ]"); - die(include($footer)); - } - // 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']."')") or die("INSERT: ".mysql_error()); - echo("<br><br><center>Congratulations on your new award. Award submitted! [ <a href='./'>Manage Award</a> ]"); - die(include($footer)); - } - ?> <h1>Manage Award Information</h1> <?php membersmenu($user->membertype); ?> ! <p><a href="./">Manage Awards </a> <a href="<?php echo("$basepath/awards/"); ?>">View Awards</a> </p> ! <form name="form1" method="post" action="./"> ! <table width="500" border="1" align="center" cellpadding="5" cellspacing="0" bordercolor="#999999"> ! <tr bgcolor="#999999"> ! <td width="142"> </td> ! <td width="248"><font color="#FFFFFF">Add A New Award</font></td> </tr> ! <tr> ! <td><div align="right">Award Name:</div></td> <td><input name="award" type="text" id="award"></td> </tr> ! <tr> ! <td><div align="right">Regional/Event:</div></td> <td><input name="event" type="text" id="event"></td> </tr> ! <tr> ! <td><div align="right">Date:</div></td> ! <td><input name="date" type="text" id="date" value="<?php echo date("Y-n-j"); ?>" size="10"> ! <font size="2">(Use this syntax: Year-Month-Day)</font></td> </tr> ! <tr> ! <td><div align="right">Recipient:</div></td> <td><input name="recipient" type="text" id="recipient" value="Team Award"></td> </tr> ! <tr> ! <td><div align="right">Award Type:</div></td> ! <td><table width="75%" border="0" cellspacing="0" cellpadding="4"> ! <tr> ! <td><div align="center"><img src="<?php echo($basepath); ?>/awards/awardsgold.png" alt="Gold" width="25" height="30"></div></td> ! <td><div align="center"><img src="<?php echo($basepath); ?>/awards/awardssilver.png" alt="Silver" width="25" height="30"></div></td> ! <td><div align="center"><img src="<?php echo($basepath); ?>/awards/awardsbronze.png" alt="Bronze" width="25" height="30"></div></td> </tr> ! <tr> <td><div align="center"> <input name="type" type="radio" value="gold" checked> --- 26,93 ---- * */ ! include("../../config/globals.php"); include($header); ! mysql_select_db($sqldatabase,$sqlconnection); // Check if user is an admin then allow processes if (isset($user->user)){ ! // 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>"); ! die(include($footer)); ! } // 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']."')") ! or die("INSERT: ".mysql_error()); ! ! echo("<p></p>Congratulations on your new award. Award submitted! [ <a href='./'>Manage Award</a> ]</p>"); ! die(include($footer)); ! } ?> <h1>Manage Award Information</h1> <?php membersmenu($user->membertype); ?> ! <p><a href="./">Manage Awards</a> <a href="<?php echo("$basepath/awards/"); ?>">View Awards</a> </p> ! <form method="post" action="./"> ! <table> ! <tr> ! <th> </th> ! <th>Add A New Award</th> </tr> ! <tr> ! <th>Award Name</th> <td><input name="award" type="text" id="award"></td> </tr> ! <tr> ! <th>Regional/Event</th> <td><input name="event" type="text" id="event"></td> </tr> ! <tr> ! <th>Date</th> ! <td><input name="date" type="text" id="date" value="<?php echo date("Y-n-j"); ?>" size="10"> ! <sub>(Use this syntax: Year-Month-Day)</sub></td> </tr> ! <tr> ! <td>Recipient</td> <td><input name="recipient" type="text" id="recipient" value="Team Award"></td> </tr> ! <tr> ! <th>Award Type</th> ! <td><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" checked> *************** *** 110,121 **** </table> </form> ! <table width="600" border="1" align="center" cellpadding="5" cellspacing="0" bordercolor="#999999"> ! <tr bgcolor="#999999"> ! <td> </td> ! <td width="152"><center><font color="#FFFFFF">Award Name</font><center></td> ! <td width="95"><center><font color="#FFFFFF">Event</font><center></td> ! <td width="84"><center><font color="#FFFFFF">Date</font><center></td> ! <td width="118"><center><font color="#FFFFFF">Recipient</font><center></td> ! <td width="89"><center><font color="#FFFFFF">Option</font><center></td> </tr> <?php --- 108,119 ---- </table> </form> ! <table> ! <tr> ! <th> </th> ! <th>Award Name</th> ! <th>Event</th> ! <th>Date</th> ! <th>Recipient</th> ! <th>Option</th> </tr> <?php *************** *** 130,141 **** <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> ]</div></td> </tr> ! <? } ?> </table> <?php ! }else{ showlogin(); } --- 128,140 ---- <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> ]</div></td> </tr> ! <?php ! } ?> </table> <?php ! } else { showlogin(); } |