Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php include "templates/include/header.php" ?>
- <div id="adminHeader">
- <h2>Admin</h2>
- <p>Inloggad som: <b><?php echo htmlspecialchars( $_SESSION['username']) ?></b>. <a href="admin.php?action=logout"?>Logga ut</a></p>
- </div>
- <h1><?php echo $results['pageTitle']?></h1>
- <form action="admin.php?action=<?php echo $results['formAction']?>" method="post">
- <input type="hidden" name="articleId" value="<?php echo $results['article']->id ?>"/>
- <?php if ( isset( $results['errorMessage'] ) ) { ?>
- <div class="errorMessage"><?php echo $results['errorMessage'] ?></div>
- <?php } ?>
- <ul>
- <li>
- <label for="title">Filmtitel</label>
- <input type="text" name="title" id="title" placeholder="Filmens titel!" required autofocus maxlength="255" value="<?php echo htmlspecialchars( $results['article']->title )?>" />
- </li>
- <li>
- <label for="genre">Genre</label>
- <input type="text" name="genre" id="genre" placeholder="Genre" required autofocus maxlength="255" value="<?php echo htmlspecialchars( $results['article']->genre )?>" />
- </li>
- <li>
- <label for="summary">Movie Plot</label>
- <textarea name="summary" id="summary" placeholder="Description for the movie!" required maxlength="1000" style="height: 5em;"><?php echo htmlspecialchars( $results['article']->summary )?></textarea>
- </li>
- <li>
- <label for="content">Article Content</label>
- <textarea name="content" id="content" placeholder="The HTML content of the article" required maxlength="100000" style="height: 30em;"><?php echo htmlspecialchars( $results['article']->content )?></textarea>
- </li>
- <li>
- <label for="publicationDate">Day:</label>
- <input type="date" name="publicationDate" id="publicationDate" placeholder="RANDOM" required maxlength="10" value="<?php echo $results['article']->publicationDate ? date( "", $results['article']->publicationDate ) : "" ?>" />
- </li>
- </ul>
- <div class="buttons">
- <input type="submit" name="saveChanges" value="Save Changes" />
- <input type="submit" formnovalidate name="cancel" value="Cancel" />
- </div>
- </form>
- <?php if ( $results['article']->id ) { ?>
- <p><a href="admin.php?action=deleteArticle&articleId=<?php echo $results['article']->id ?>" onclick="return confirm('Delete This Article?')">Delete</a></p>
- <?php } ?>
- <?php include "templates/include/footer.php" ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement