Mercurial > hg > batmud > misc
changeset 140:efc7f68f6bb3 misc
Cleanups.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Mon, 20 Dec 2010 23:45:23 +0000 |
parents | ff2d8ebe1818 |
children | 5ae07cabfb95 |
files | materials/alloy.php materials/index.php materials/submit.php |
diffstat | 3 files changed, 14 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/materials/alloy.php Mon Dec 20 23:36:19 2010 +0000 +++ b/materials/alloy.php Mon Dec 20 23:45:23 2010 +0000 @@ -1,9 +1,12 @@ <? $pageTitle = "Ggr's BatMUD Alloy Browser"; $pageIndex = "alloy.php"; + +require "mcommon.inc.php"; require "materials.inc.php"; require "alloys.inc.php"; + if (isset($_GET["o"])) $showOnly = intval($_GET["o"]); else @@ -14,7 +17,7 @@ $showMatName = strtoupper(substr($showMat,0,1)).substr($showMat, 1); } -require "../header.inc.php"; +printPageHeader($pageTitle); ?> <h1><? echo $pageTitle; ?></h1> <form action="<? echo $pageIndex; ?>" method="get"> @@ -202,5 +205,5 @@ echo "</table>\n"; } -require "../footer.inc.php"; +printPageFooter(); ?>
--- a/materials/index.php Mon Dec 20 23:36:19 2010 +0000 +++ b/materials/index.php Mon Dec 20 23:45:23 2010 +0000 @@ -1,11 +1,11 @@ <? $pageTitle = "Ggr's BatMUD Material Browser"; $pageIndex = "index.php"; +require "mcommon.inc.php"; require "materials.inc.php"; $sortDirs = array("asc", "desc"); - if (isset($_GET["s"])) { $sortColumn = intval($_GET["s"]); } else @@ -50,6 +50,7 @@ return ($res ? -1 : 1); } + if ($sortColumn <= 0 || $sortColumn >= 18) { $sortColumn = 0; if ($sortDirection) @@ -69,8 +70,7 @@ echo ">"; } - -require "../header.inc.php"; +printPageHeader($pageTitle); ?> <h1><? echo $pageTitle; ?></h1> <form action="<? echo $pageIndex; ?>" method="get"> @@ -191,5 +191,6 @@ } echo "</table>\n"; -require "../footer.inc.php"; + +printPageFooter(); ?>
--- a/materials/submit.php Mon Dec 20 23:36:19 2010 +0000 +++ b/materials/submit.php Mon Dec 20 23:45:23 2010 +0000 @@ -1,6 +1,8 @@ <? $pageTitle = "Alloy combo submitter"; $pageIndex = "submit.php"; + +require "mcommon.inc.php"; require "materials.inc.php"; require "alloys.inc.php"; require "guids.inc.php"; @@ -99,13 +101,13 @@ function pageHead() { global $pageTitle; - require "../header.inc.php"; + printPageHeader($pageTitle); echo "<h1>".$pageTitle."</h1>\n"; } function pageEnd() { - echo "</body>\n</html>\n"; + printPageFooter(); } function addAlloy(&$alloys, $names)