changeset 87:95781f84cbe7

Cleanups.
author Matti Hamalainen <ccr@tnsp.org>
date Mon, 09 Oct 2017 18:47:12 +0300
parents 7ec0ad742009
children 4c88842414dd
files herbs/index.php
diffstat 1 files changed, 23 insertions(+), 19 deletions(-) [+]
line wrap: on
line diff
--- a/herbs/index.php	Mon Mar 09 10:11:04 2015 +0200
+++ b/herbs/index.php	Mon Oct 09 18:47:12 2017 +0300
@@ -1,4 +1,6 @@
 <?php
+$pageTitle = "Some stupid plants (original by Jeskko, improved by Ggr)";
+
 $terrainData = array(
   array("light forests"   , "lf", "f"),
   array("heavy forests"   , "hf", "F"),
@@ -117,24 +119,25 @@
 }
 
 
-?>
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<html>
- <head>
-  <title>Some stupid plants</title>
-  <link href="style.css" title="compact" rel="stylesheet" type="text/css">
- </head>
-<body>
-<table>
-<caption>Some stupid plants</caption>
-<tr>
-<th>Plant name</th>
-<th>Seasons</th>
-<th>Terrain types</th>
-<th>Herb pair</th>
-<th>Information</th>
-</tr>
-<?php
+echo
+  "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\">\n".
+  "<html>\n".
+  "  <head>\n".
+  "    <title>".$pageTitle."</title>\n".
+  "    <link href=\"style.css\" rel=\"stylesheet\" type=\"text/css\">\n".
+  "  </head>\n".
+  "<body>\n".
+  "<table>\n".
+  "  <caption>".$pageTitle."</caption>\n".
+  "  <tr>\n".
+  "    <th>Plant name</th>\n".
+  "    <th>Seasons</th>\n".
+  "    <th>Terrain types</th>\n".
+  "    <th>Herb pair</th>\n".
+  "    <th>Information</th>\n".
+  "  </tr>\n";
+
+
 $sefilter = FALSE;
 $trfilter = FALSE;
 if (isset($_GET["terrain"]))
@@ -167,7 +170,7 @@
 
   $row++;
   echo
-    "<tr class=\"".(($row % 2) ? "even" : "odd")."\">".
+    "  <tr class=\"".(($row % 2) ? "even" : "odd")."\">".
     "<td>".$data["name"]."</td>".
     "<td>".implode(", ", $seasons)."</td>".
     "<td>";
@@ -184,6 +187,7 @@
     "<td>".$data["info"]."</td>".
     "</tr>\n";
 }
+
 ?>
 </table>
 </body>