Mercurial > hg > batmud > alchtool
changeset 45:4617c39366a5
Put program name and copyright into variables, and use them.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Tue, 22 Mar 2011 20:10:01 +0200 |
parents | ce4795aee106 |
children | 12a4526daf8a |
files | index.php |
diffstat | 1 files changed, 11 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/index.php Tue Mar 22 19:56:57 2011 +0200 +++ b/index.php Tue Mar 22 20:10:01 2011 +0200 @@ -260,10 +260,14 @@ } } +// Copyright information etc. +$progName = "AlchTool 1.9.0β"; +$progCopyright ="© 2006-2011 Jeskko & Ggr Pupunen"; + ?> <html> <head> - <title>Potion research tool - <? echo $dbModes[$mode][0]." view (".$dbNames[$dbModes[$mode][1]][$active].")"; ?></title> + <title><? echo $progName." - ".$dbModes[$mode][0]." view (".$dbNames[$dbModes[$mode][1]][$active].")"; ?></title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <link href="alch.css" title="compact" rel="stylesheet" type="text/css"> </head> @@ -294,8 +298,11 @@ { $file = fopen($dataFile, "r"); - while (($line = fgets($file)) !== FALSE) { - list ($m, $o, $h, $r) = preg_split("/\s+/", trim($line), 4); + while (($rawline = fgets($file)) !== FALSE) { + $line = trim($rawline); + if ($line == "" || $line[0] == '#') continue; + + list ($m, $o, $h, $r) = preg_split("/\s+/", $line, 4); // Get indexes $mn = array_search($m, $dbNames[0]); @@ -461,7 +468,7 @@ <tr><td class="close">?</td><th class="noframe">2 materials match</th></tr> <tr><td class="accepted">!</td><th class="noframe">Accepted potion</th></tr> <tr><td class="pair"> </td><th class="noframe">Known to be possible potion by other attempts</th></tr> - <tr><td colspan="2">AlchTool 1.9b © 2006-2011 Jeskko & Ggr Pupunen</td></tr> + <tr><td colspan="2"><? echo $progName." ".$progCopyright; ?></td></tr> </table> <? }