# HG changeset patch # User Matti Hamalainen # Date 1300817401 -7200 # Node ID 4617c39366a56d0281261f9330c97b7bf8d673db # Parent ce4795aee106a7bcbf7c6707aecc2a6a3de16e6f Put program name and copyright into variables, and use them. diff -r ce4795aee106 -r 4617c39366a5 index.php --- 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"; + ?> - Potion research tool - <? echo $dbModes[$mode][0]." view (".$dbNames[$dbModes[$mode][1]][$active].")"; ?> + <? echo $progName." - ".$dbModes[$mode][0]." view (".$dbNames[$dbModes[$mode][1]][$active].")"; ?> @@ -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 @@ ?2 materials match !Accepted potion  Known to be possible potion by other attempts - AlchTool 1.9b © 2006-2011 Jeskko & Ggr Pupunen +