Mercurial > hg > batmud > misc
changeset 154:407e55d83f68 misc
Sync.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Tue, 21 Dec 2010 23:55:09 +0000 |
parents | fd57384798a0 |
children | a7c027f7f9a4 |
files | materials/index.php materials/stats.php materials/submit.php |
diffstat | 3 files changed, 31 insertions(+), 30 deletions(-) [+] |
line wrap: on
line diff
--- a/materials/index.php Tue Dec 21 23:24:35 2010 +0000 +++ b/materials/index.php Tue Dec 21 23:55:09 2010 +0000 @@ -90,7 +90,8 @@ <li>You can sort by any column by clicking on the column name. Clicking again will change sorting direction (ascending/descending).</li> <li>Filtering to show only certain type of materials or materials with certain feature(s) is possible, - for example <a href="index.php?s=0&d=asc&f[1]=5&f[2]=3">show only 'incr. sturdy' AND 'highly magical'</a> materials.</li> + for example <a href="index.php?s=0&d=asc&f[1]=5&f[2]=3">show only 'incr. sturdy' + AND 'highly magical'</a> materials. Click on desired feature (table cell) to add a filter.</li> <li>Columns can be disabled from the filtering list (shift or ctrl with mouse click to select several)</li> </ul> </td>
--- a/materials/stats.php Tue Dec 21 23:24:35 2010 +0000 +++ b/materials/stats.php Tue Dec 21 23:55:09 2010 +0000 @@ -7,8 +7,8 @@ $users = array(); $total = 0; -foreach ($submitGUIDS as $guid => $user) { - $g = strtolower($guid); +foreach ($submitPasswords as $password => $user) { + $g = strtolower($password); $filename = "data-".strtolower($user).".log"; $file = @fopen($filename, "r");
--- a/materials/submit.php Tue Dec 21 23:24:35 2010 +0000 +++ b/materials/submit.php Tue Dec 21 23:55:09 2010 +0000 @@ -1,4 +1,4 @@ -<? +f<? $pageTitle = "Alloy combination submitter"; $pageIndex = "submit.php"; @@ -8,16 +8,16 @@ require "guids.inc.php"; $formMode = -1; -$hasGUID = FALSE; +$hasPassword = FALSE; $hasData = FALSE; // Get form arguments, if they are set if (isset($_GET["guid"])) { - $formGUID = $_GET["guid"]; - $hasGUID = TRUE; + $formPassword = $_GET["guid"]; + $hasPassword = TRUE; } elseif (isset($_POST["guid"])) { - $formGUID = stripslashes($_POST["guid"]); - $hasGUID = TRUE; + $formPassword = stripslashes($_POST["guid"]); + $hasPassword = TRUE; } if (isset($_POST["data"])) { @@ -26,20 +26,20 @@ } -// Check submitter GUID -if ($hasGUID) { - if (strlen($formGUID) < 6 || strlen($formGUID) > 20) { +// Check submitter password +if ($hasPassword) { + if (strlen($formPassword) < 6 || strlen($formPassword) > 20) { $formMode = -1; - $errorMsg = "Submitter GUID <b>'".htmlentities(substr($formGUID, 0, 20))."...'</b> is invalid."; + $errorMsg = "Submitter password <b>'".htmlentities(substr($formPassword, 0, 20))."...'</b> is invalid."; } else - if (!isset($submitGUIDS[$formGUID])) { + if (!isset($submitPasswords[$formPassword])) { $formMode = -1; - $errorMsg = "Submitter GUID <b>'".htmlentities($formGUID)."'</b> is not known. ". - "Please check that you have entered your GUID code correctly (it is case-sensitive!)<br /><br />". - "Also, if you received your GUID recently (during last 10 minutes or so), it might not have ". + $errorMsg = "Submitter password <b>'".htmlentities($formPassword)."'</b> is not known. ". + "Please check that you have entered your password code correctly (it is case-sensitive!)<br /><br />". + "Also, if you received your Password recently (during last 10 minutes or so), it might not have ". "yet been added to the system. Wait for a bit and try again."; } else { - // GUID is ok + // Password is ok if ($hasData) { // Got some data, go and check it for sanity $formMode = 2; @@ -64,7 +64,7 @@ } } } else { - // By default, assume we are in GUID setup mode + // By default, assume we are in Password setup mode $formMode = 0; } @@ -174,13 +174,13 @@ ?> <p> Welcome to the Pupunen alloy database submit form. Before you can proceed to submit -your combinations, you will need to enter your personal submitter GUID in the -form below. To get your own GUID code, ask for one via tell from <b>Ggr</b> @ BatMUD. +your combinations, you will need to enter your personal submitter Password in the +form below. To get your own Password code, ask for one via tell from <b>Ggr</b> @ BatMUD. This identification system is in place to lessen the possibility of fake submissions. </p> <form action="<? echo $pageIndex; ?>" method="get"> -<b>Submitter GUID code:</b> <input type="text" name="guid" size="30" class="itext" -<? if ($hasGUID) echo "value=\"".$formGUID."\""; ?> /> +<b>Submitter Password code:</b> <input type="text" name="guid" size="30" class="itext" +<? if ($hasPassword) echo "value=\"".$formPassword."\""; ?> /> <input type="submit" value=" Continue " class="isubmit" /> </form> <h2>NOTICE!</h2> @@ -206,15 +206,15 @@ pageHead(); ?> <form action="<? echo $pageIndex; ?>" method="post"> -Submitter: <b><? echo htmlentities($submitGUIDS[$formGUID]); ?></b><br /><br /> +Submitter: <b><? echo htmlentities($submitPasswords[$formPassword]); ?></b><br /><br /> <textarea name="data" cols="80" rows="10"></textarea><br /><br /> <div class="icenter"> -<input type="hidden" value="<? echo htmlentities($formGUID); ?>" name="guid" /> +<input type="hidden" value="<? echo htmlentities($formPassword); ?>" name="guid" /> <input type="submit" value=" Submit " class="isubmit" /> </div> </form> <p> -<b>Feel free to bookmark this page, to avoid entering the GUID each time.</b> +<b>Feel free to bookmark this page, to avoid entering the Password each time.</b> </p> <p> With the above form, you can submit alloy combinations to be included in this @@ -248,12 +248,12 @@ if (count($alloys) > 0) { // Open datafile and save accepted data - $filename = "data-".strtolower($submitGUIDS[$formGUID]).".log"; + $filename = "data-".strtolower($submitPasswords[$formPassword]).".log"; $outFile = @fopen($filename, "a"); if ($outFile !== FALSE) { @chmod($filename, 0600); foreach ($alloys as $val) { - $s = $formGUID."#".$val[0]; + $s = $formPassword."#".$val[0]; for ($i = 1; $i < count($val) - 1; $i++) $s .= "+".$val[$i]; $s .= "=".$val[count($val) - 1]."\n"; @@ -272,7 +272,7 @@ // Save the error messages, just in case if ($errorSet) { - $filename = "error-".strtolower($submitGUIDS[$formGUID]).".log"; + $filename = "error-".strtolower($submitPasswords[$formPassword]).".log"; $outFile = @fopen($filename, "a"); if ($outFile !== FALSE) { @chmod($filename, 0600); @@ -301,7 +301,7 @@ } else { echo "<p><b>No alloy combinations could be parsed from input.</b></p>\n"; } - echo "<p>[ <a href=\"?guid=".urlencode($formGUID)."\">Click here to return to the submit page</a> ]</p>\n"; + echo "<p>[ <a href=\"?guid=".urlencode($formPassword)."\">Click here to return to the submit page</a> ]</p>\n"; pageEnd(); } else { if ($errorSet)