| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- <?php
- $setup = array();
- $setup['title'] = "Rediger Nyhed";
- $setup['headline'] = "Odense Track - Administration";
- $setup['keywords'] = "administration,admin";
- $setup['description'] = "Odense Track Administration";
-
- Design::header($setup, 100);
-
- // First we need to know if we are deleting something!
-
- if (isset($_GET['action'])) { // We are deleting this!
- if ($_GET['action'] == 'del') {
- Alter::deleteNews($_GET['id']);
- }
- die(); // Something went wrong. Dont execute rest of code!
- }
-
-
- // It did, yay! - Lets fetch it
- $result = Get::NewsArticle($_GET['id']);
-
-
- if (isset($_POST['title'])) {
- Alter::editNews($_GET['id'], $_POST['title'], $_POST['textinput']);
- }
- ?>
-
- <div class="page">
- <h1>Rediger Nyhed</h1> <div class="pull_right"><a href="?page=newsadmin">Nyheder</a><span class="seperator"></span><a href="?page=eventadmin">Events</a></div>
- <div class="border"></div>
- <br />
- <div class='editorform'>
- <form method="POST" action="">
- <input type="text" class='editformtitle' required placeholder='Nyhedstitel' value="<?php echo $result['title']; ?>" name="title" />
- <br /><br />
- <textarea name='textinput' class='editor'><?php echo strip_tags($result['content'], '<br><p><b><i><u><img><a><strong><pre><em><span><div><h1><h2><h3><h4><h5><h6><h7><sub><sup><blockquote><code>'); ?></textarea>
- <br />
- <input type="submit" class='button btn btn-success pull_right' value="Rediger" />
-
- </form>
- </div>
- <div class='clear'></div>
- </div>
-
- <?php
- Design::footer(true);
|