Rename most of the _parts_ .php files too (not the preamble though)

Fix plans, from too much over- and under-quoting.
This commit is contained in:
Jeff Teunissen 2007-03-22 05:54:08 +00:00
parent e1800a17c2
commit fc3ce061c3
12 changed files with 17 additions and 28 deletions

View file

@ -3,16 +3,16 @@
$columns = 'content'; $columns = 'content';
define ('siteHome', "/home/groups/q/qu/quake/htdocs"); define ('siteHome', "/home/groups/q/qu/quake/htdocs");
require siteHome . "/parts/library.php"; // Load function library require siteHome . "/parts/library.inc"; // Load function library
if ($need) { if ($need) {
need ($need); need ($need);
unset ($need); unset ($need);
} }
require siteHome . "/parts/head.php"; // Load the HEAD and open BODY require siteHome . "/parts/head.inc"; // Load the HEAD and open BODY
require siteHome . "/parts/topstrip.php"; // Display top strip require siteHome . "/parts/topstrip.inc"; // Display top strip
require siteHome . "/parts/titletable.php"; // Display main title w/ logos require siteHome . "/parts/titletable.inc"; // Display main title w/ logos
require siteHome . "/parts/menu.php"; // Load up the menu require siteHome . "/parts/menu.inc"; // Load up the menu
$contentClass = ''; $contentClass = '';
if ($modules && $modules = explode (" ", $modules)) { if ($modules && $modules = explode (" ", $modules)) {
@ -22,7 +22,7 @@
echo '<DIV id="features">'; echo '<DIV id="features">';
for ($i = 0; $i < count ($modules); $i++) { for ($i = 0; $i < count ($modules); $i++) {
include siteHome . "/parts/" . $modules[$i] . ".php"; include siteHome . "/parts/" . $modules[$i] . ".inc";
} }
echo '</DIV>'; echo '</DIV>';
} }
@ -41,7 +41,7 @@
?> ?>
<DIV <?=$contentClass?> id="content"><!-- Content Start --> <DIV <?=$contentClass?> id="content"><!-- Content Start -->
<? <?
require siteHome . "/parts/topmain.php"; // insert page title require siteHome . "/parts/topmain.inc"; // insert page title
/* /*
This is cool. We add the postamble to a function in the This is cool. We add the postamble to a function in the
@ -50,7 +50,7 @@
*/ */
function postamble () function postamble ()
{ {
include siteHome . "/parts/postamble.php"; // heehee include siteHome . "/parts/postamble.inc"; // heehee
} }
register_shutdown_function (postamble); register_shutdown_function (postamble);

View file

@ -3,7 +3,7 @@
$need = 'auth'; $need = 'auth';
require "parts/preamble.php"; // Load most of document require "parts/preamble.php"; // Load most of document
need ("boxes news sql"); need ("boxes html news sql");
// set up local vars // set up local vars
$mode = $_REQUEST['mode']; $mode = $_REQUEST['mode'];
@ -31,9 +31,12 @@
} }
newsBoxTitle ("Post Plan Entry"); newsBoxTitle ("Post Plan Entry");
$form = '<FORM action="' . thisURL . '" method="post">' $form = '<FORM action="' . thisURL . '" method="post">'
. 'Subject: <INPUT type="text" name="planSubj" size="59" value="'. stripSlashes ($planSubj) .'"><BR>' . 'Subject: '
. '<INPUT type="text" name="planSubj" size="59" value="'
. convertFromHTML (stripSlashes ($planSubj)) . '">'
. '</INPUT><BR>'
. '<TEXTAREA name="planText" rows="25" cols="64">' . '<TEXTAREA name="planText" rows="25" cols="64">'
. stripSlashes ($planText) . convertFromHTML (stripSlashes ($planText))
. '</TEXTAREA><BR>' . '</TEXTAREA><BR>'
. '<INPUT align="center" type="submit" name="mode" value="Post"></INPUT>' . '<INPUT align="center" type="submit" name="mode" value="Post"></INPUT>'
. '<INPUT align="center" type="submit" name="mode" value="Preview"></INPUT>' . '<INPUT align="center" type="submit" name="mode" value="Preview"></INPUT>'

View file

@ -6,25 +6,11 @@
if (!$userInfo['u_admin']) // no access from non-admin if (!$userInfo['u_admin']) // no access from non-admin
bailout ('<P>You don\'t have access to this page (yet?). Bug an admin to delete a plan post.</P>'); bailout ('<P>You don\'t have access to this page (yet?). Bug an admin to delete a plan post.</P>');
need ('sql'); need ('boxes date html news sql table');
function convertToHTML ($string)
{
$table = array_flip (get_html_translation_table (HTML_ENTITIES));
return strtr ($string, $table);
}
function convertFromHTML ($string)
{
$table = get_html_translation_table (HTML_ENTITIES);
return strtr ($string, $table);
}
function planEntrySummary ($a) function planEntrySummary ($a)
{ {
need ("date"); need ('date html');
return return
'<TR>' '<TR>'
@ -37,7 +23,7 @@
function planEntryEditor ($array) function planEntryEditor ($array)
{ {
need ("boxes date news"); need ('boxes date html');
$id = $array['p_id']; $id = $array['p_id'];
$usr = $array['p_user']; $usr = $array['p_user'];