summaryrefslogtreecommitdiff
path: root/make-post.php
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2011-09-01 21:09:56 -0400
committerLuke Shumaker <LukeShu@sbcglobal.net>2011-09-01 21:09:56 -0400
commit68056e6d92285e184518bc8c7130bb49767623f3 (patch)
treec2a24370d8d132f85fb929580078adaf49a3c5fb /make-post.php
parent116af031a42db23e836633d5298a9595ad0803c7 (diff)
Move config into one config.php file, add an index file, spit out complete HTML files, use CSSHEADmaster
Diffstat (limited to 'make-post.php')
-rw-r--r--make-post.php10
1 files changed, 7 insertions, 3 deletions
diff --git a/make-post.php b/make-post.php
index 200f853..2feff1c 100644
--- a/make-post.php
+++ b/make-post.php
@@ -1,8 +1,9 @@
<?php
-header('Content-type: text/html; charset=utf-8');
-$dir = '/home/luke/j1-uploads';
+require('config.php');
+global $dir;
if (!isset($_POST['filename'])) {
+ include('header.php');
echo '<form method="post" action="make-post.php">';
echo '<ul>';
if ($handle = opendir($dir)) {
@@ -19,7 +20,7 @@ if (!isset($_POST['filename'])) {
echo '</ul>';
echo '<input type="submit" value="submit" />';
echo '</form>';
- exit();
+ include('footer.php');
}
$filename = $dir.'/'.rawurlencode($_POST['filename']);
@@ -51,6 +52,7 @@ foreach ($lines as $line) {
}
if (!isset($_POST['q'])) {
+ include('header.php');
echo '<form method="post" action="make-post.php">';
echo '<input type="hidden" name="filename" value="'.htmlentities($_POST['filename']).'" />';
echo '<textarea name="open"></textarea>';
@@ -93,7 +95,9 @@ if (!isset($_POST['q'])) {
}
echo '<input type="submit" value="submit" />';
echo '</form>';
+ include('footer.php');
} else {
+ header('Content-type: text/plain; charset=utf-8');
$quotes = array();
foreach ($_POST['q'] as $reporter => $quote_id) {
$quote = $reporters[$reporter][$quote_id];