<?PHP
#
#   FILE:  SPT--EditAnnouncement.html
#
#   REQUIRED FUNCTIONS:
#       (none)
#
#   REQUIRED FORM FIELDS:
#       F_Heading
#           - headline for new or edited announcement
#       F_Text
#           - text for new or edited announcement
#
?>

<br>
<?PHP  if (EditingAnnouncement()) {  ?>
    <h1>Edit News Item or Announcement</h1>
<?PHP  } else {  ?>
    <h1>Add News Item or Announcement</h1>
<?PHP  }  ?>
<form method="POST" action="index.php?P=EditAnnouncementComplete">
<table border="0" cellpadding="0" cellspacing="5" align="center">
    <?php  if (AnnouncementInfoAvailable()) {  ?>
    <tr><td colspan="2">
		<b>Announcement Preview:</b>
        <hr>
        <table border="0" cellpadding="0" cellspacing="0" width="505" align="center" class="lightBody">
            <tr>
                <td><div class="AnnouncementHeadline"><?php  PreviewAnnouncementHeading();  ?></div></td>
            </tr>
            <tr>
                <td><div class="AnnouncementInfo"><?php  PrintAnnouncementDate();  ?></div></td>
            </tr>
            <tr>    
                <td><div class="AnnouncementText"><?php  PreviewAnnouncementText();  ?></div></td>
            </tr>
        </table>
        <hr>
    </td></tr>
    <?php  }  ?>
    <tr>
        <td align="right">Heading:</td>
        <td><input type="text" name="F_Heading" value="<?php  PrintAnnouncementHeading();  ?>" size="45" maxlength="55"></td>
    </tr>
    <tr>
        <td align="right" valign="top">Story:</td>
        <td><textarea name="F_Text" value="" rows="4" cols="45" wrap><?php  PrintAnnouncementText();  ?></textarea></td>
    </tr>
    <tr>
        <td></td>
        <td>
            <input type="submit" name="SubmitResult" value="Preview">
            <?php  if (AnnouncementInfoAvailable()) {  ?>
                <input type="submit" name="SubmitResult" value="Submit">
            <?php  }  ?>
            <?php  if (EditingAnnouncement()) {  ?>
                <input type="submit" name="SubmitResult" value="Delete">
            <?php  }  ?>
            <input type="submit" name="SubmitResult" value="Cancel">
        </td>
    </tr>
</table>
</form>
