aboutsummaryrefslogtreecommitdiff
path: root/admin/announcements
diff options
context:
space:
mode:
authorjhunkeler <jhunkeler@c5b2fb0a-d05d-0410-98c8-828840a80ff6>2009-12-27 19:21:11 -0500
committerjhunkeler <jhunkeler@c5b2fb0a-d05d-0410-98c8-828840a80ff6>2009-12-27 19:21:11 -0500
commited943b32335933f369d9aa459689e986c10421ae (patch)
tree0c862c0f28308dc95e2e382a64a9d3e4bf51cca9 /admin/announcements
parentd526decc4884710ae7fafe7aa5171e7f59b24292 (diff)
downloadbayonetcms-ed943b32335933f369d9aa459689e986c10421ae.tar.gz
(OC) fixed some bugs in the admin panel caused by the new sql wrapper. *need to figure out the avatar for smflogin block.
git-svn-id: http://svn.3rd-infantry-division.org/testing/branches/Bayonet CMS v2@403 c5b2fb0a-d05d-0410-98c8-828840a80ff6
Diffstat (limited to 'admin/announcements')
-rw-r--r--admin/announcements/functions.php11
1 files changed, 5 insertions, 6 deletions
diff --git a/admin/announcements/functions.php b/admin/announcements/functions.php
index 917e342..f45a7e3 100644
--- a/admin/announcements/functions.php
+++ b/admin/announcements/functions.php
@@ -26,7 +26,7 @@ function EditAnnouncements()
{
global $db;
- if(isset($_POST['announcementprocessed']))
+ if(isset($_POST['processed']))
{
//Secure our data to prevent injection attacks.
$title = addslashes($_POST['title']);
@@ -43,7 +43,7 @@ function EditAnnouncements()
<a href=\"?op=announcements\">Click here if you don't feel like waiting.</a>";
// 3 second redirect to go back to the edit page
- echo "<meta http-equiv=\"Refresh\" content=\"3;url=?op=announcements\">";
+ PageRedirect(2, "?op=announcements");
//die, because we have completed what we wanted to do.
return;
@@ -52,15 +52,14 @@ function EditAnnouncements()
//Grab the page from the database according to the $article_id passed to the function.
$result = $db->Query("SELECT title,text FROM bayonet_announcements WHERE announcement_id = 0");
- /** FIXME - this probably broke. */
- $announcement = $db->Fetch($result);
+ $announcement = $db->FetchRow($result);
?>
- <form action="<?php $_SERVER['PHP_SELF'] ?>" method="post">
+ <form action="<?php $_SERVER['PHP_SELF']; ?>" method="post">
<table>
<tr><td>Announcement Title: <input type="text" name="title" value="<?php echo $announcement['title'] ?>" maxlength="50" size="30" /> </td></tr>
<tr><td> <textarea id="markItUp" rows="30" cols="80" name="text"><?php echo $announcement['text'] ?></textarea> </td></tr>
- <tr><td> <input type="submit" name="announcementprocessed" value="Submit Changes" /> </td></tr>
+ <tr><td> <input type="submit" name="processed" value="Submit Changes" /> </td></tr>
</table>
</form>
<?php