Show sourcecode

The following files exists in this folder. Click to view.

Foogler_blog/pages

PAuthor.php
PCommentProcess.php
PDeleteCommentProcess.php
PDeletePost.php
PDeletePostProcess.php
PEditPost.php
PEditPostProcess.php
PErDiagramme.php
PIndex.php
PInstall.php
PInstallProcess.php
PNewPost.php
PNewPostProcess.php
PRssFeed.php
PShowPost.php
PStatistics.php
PValidate.php
login/

PNewPost.php

40 lines ASCII Windows (CRLF)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<?php
//--------------------------
//PNewPost.php
//
//Page for adding new post
//--------------------------

//Checks that user is logged in
if(!isset($_SESSION['accountUser'])) {
  require_once(
"login/PLogin.php");
  exit;  
}

//Add post form HTML
$html = <<<END
<h2>New post</h2>
<form action="?p=newp" method="POST">
  <input type="hidden" name="idAuthor" value="
{$_SESSION['accountId']}" />
  <label for="postTitle">Title:</label>
  <input type="text" name="postTitle" id="postTitle" class="textboxLong" />
  <label for="postText">Post:</label>
  <textarea name="postText" id="postText" style="height:300px;"></textarea>
  <label for="tags">Tags (separated by a comma):</label><br />
  <input type="text" name="tags" id="tags" class="textboxLong" />
  <input type="submit" value="Save post" class="button" />
</form>
END;

//-----------------
//Prints HTML
require_once(TP_SOURCEPATH 'CHTMLPage.php');

$page = new CHTMLPage();

$page->printHTMLHeader();
$page->printPageHeader();
$page->printPageBody($html);
$page->printTagList();
$page->printRightColumn();