<? if ($saved): ?>
<h2>Ãndringar sparade!</h2>
<? else: ?>
<form action="?p=n&a=e" method="post">
<fieldset>
<legend>Redigera nyhet</legend>
<div>
<input type="hidden" name="id" value="<?=$newsItem['id']?>" />
<label for="title">Titel:</label>
<input type="text" name="title" value="<?=$newsItem['title']?>" class="text" />
</div>
<div>
<?php
include('js/fckeditor/fckeditor.php');
$oFCKeditor = new FCKeditor('body');
$oFCKeditor->BasePath = 'js/fckeditor/';
$oFCKeditor->Value = $newsItem['body'];
$oFCKeditor->ToolbarSet = "custom";
$oFCKeditor->Width = "650";
$oFCKeditor->Height = "400";
$oFCKeditor->Create() ;
?>
</div>
<div>
<label for="visible">Synlig:</label>
<input type="checkbox" name="visible" id="visible" <?= $newsItem['is_visible'] ? 'checked' : '' ?> />
</div>
<div>
<input type="submit" value="Spara ändringar" />,
<a href="?p=n&a=r&id=<?=$newsItem['id']?>" onclick="return confirm('Ãr du säker?')">Ta bort</a>
eller <a href="?p=n">Avbryt</a>
</div>
</fieldset>
</form>
<? endif; ?>