3 header("Cache-Control: no-cache, must-revalidate");
4 header("Expires: Fri, 01 Jan 2010 05:00:00 GMT");
5 header("Pragma: no-cache");
7 require_once('toolbox.php');
10 $params = array('login'=>'x', 'klice'=>'', 'penize'=>'i', 'jidlo'=>'i', 'karma'=>'i');
12 foreach ($params as $p=>$op) {
13 if (isset($_REQUEST[$p])) {
15 if (strpos($op, 'x') !== FALSE) {
16 $v = strtr($v, '!', '_');
18 if (strpos($op, 'i') !== FALSE) {
22 $U["${p}_safe"] = htmlentities($U[$p], ENT_QUOTES
);
31 <meta http
-equiv
='Content-Type' content
='text/html; charset=utf-8' />
32 <link rel
='stylesheet' type
='text/css' href
='styles.css' />
36 <?php
if ($valid && empty($_REQUEST['form_submit'])) { ?
>
42 <label
for="login" title
="Login na geocaching.com:">Jméno
</label
><br
/>
43 <input type
="text" name
="login" id
="login" value
="<?php echo $U['login_safe']; ?>" />
47 <label
for="karma">Karma
:</label
>
49 <input type
="text" name
="karma" id
="karma" value
="<?php echo $U['karma_safe']; ?>" />
52 <div id
="form_penize">
53 <label
for="penize">Zbylé zátky
:</label
>
55 <input type
="text" name
="penize" id
="penize" value
="<?php echo $U['penize_safe']; ?>" />
59 <label
for="jidlo">Jídlo
:</label
>
61 <input type
="text" name
="jidlo" id
="jidlo" value
="<?php echo $U['jidlo_safe']; ?>" />
65 <label
for="klice">Nalezené klíče
, micro
, perky i předměty oddělené čá
rkou (na pořadí klíčů a micro záleží
!):</label
>
67 <textarea cols
="30" rows
=8" name="klice
" id="klice
"><?php echo $U['klice_safe']; ?></textarea>
71 <input type="submit
" name="form_submit
" id="form_submit
" />
81 // TODO: check integers
82 // dbstats_update($U, '', 'invalid values');
84 echo "<div id
=\"result\"
>\n";
87 echo "<p
><span style
=\"color
:red
;font
-weight
:bold\"
>OPAKOVANY POKUS
</span
></p
>\n";
88 dbstats_update($U, '', 'retry_limit_reached');
89 if (LIMIT_TRIES_PER_DAY) {
90 echo "</div
></body
></html
>\n";
95 // echo "volam
ohodnot_hrace($
{U
['klice']})"; // DEBUG
98 echo '<div id="perky_preview
">';
99 foreach($U['perky'] as $perk) {
100 echo "<img src
='perky/$perk.jpg'/>\n";
104 echo "<hr
/> odkaz pro zalogovani
:<br
/>\n";
106 //echo "<pre
>U
=";print_r($U);echo "</pre
>";
108 $token_b64 = getToken($U);
110 dbstats_update($U, $token_b64, '');
112 $script="http
://${_SERVER['SERVER_NAME']}:${_SERVER['SERVER_PORT']}"
113 . str_replace('index.php','cert.php', $_SERVER['SCRIPT_NAME'])
122 // $script="http://${_SERVER['SERVER_NAME']}:${_SERVER['SERVER_PORT']}/~guppy/fallout/cert.php?$token_b64";
125 // $script = 'http://guppy.zemeplocha.info:10080/~guppy/fallout/cert.php?' . implode('/', array_keys($perky));
127 // echo "<a href=\"$script\">[url=$script][/url] </a><br />\n";
128 echo "<a href=\"$script\">CERTIFIKÁT</a><br />\n";
132 // print_r(decodeToken($token_b64));