summaryrefslogtreecommitdiff
path: root/index.php
diff options
context:
space:
mode:
authorChristian Pointner <equinox@ffgraz.net>2009-02-08 04:48:53 +0000
committerChristian Pointner <equinox@ffgraz.net>2009-02-08 04:48:53 +0000
commitf6be9edd401664d95e60ae3c81aeaf36723ba891 (patch)
tree86f2127f51f0f16053c1b593c722cf0a5eeecba4 /index.php
parent0c420c393dba896e14972ecb5181904f1a1342a4 (diff)
added login capability
Diffstat (limited to 'index.php')
-rw-r--r--index.php31
1 files changed, 23 insertions, 8 deletions
diff --git a/index.php b/index.php
index aed6a1a..8233594 100644
--- a/index.php
+++ b/index.php
@@ -1,4 +1,6 @@
<?php
+session_start();
+
if(isset($_REQUEST['lat'])) $lat = mysql_escape_string($_REQUEST['lat']);
if(isset($_REQUEST['lng'])) $lng = mysql_escape_string($_REQUEST['lng']);
if(isset($_REQUEST['res'])) $res = $_REQUEST['res'];
@@ -82,14 +84,27 @@ if($_SERVER['HTTP_HOST'] == 'dev-karte.ffgraz.net') {
</form>
</div>
</div>
- <div id="addressbox" class="box">
- <b>Adresse suchen:</b>
- <form action="#" onsubmit="showAddress(this.address.value); return false">
- <p>
- <input type="text" size="40" name="address" value="Lendkai 1" />
- <input type="submit" value="Suchen" />
- </p>
- </form>
+ <div id="southeastcontainer">
+ <div id="loginbox" class="box">
+ <script type="text/javascript">
+ <?php
+ if (!isset($_SESSION['logged_in']) || !$_SESSION['logged_in']) {
+ echo 'showFFLogin();';
+ } else {
+ echo 'showFFLogout("'.$_SESSION['username'].'");';
+ }
+ ?>11
+ </script>
+ </div>
+ <div id="addressbox" class="box">
+ <b>Adresse suchen:</b>
+ <form action="#" onsubmit="showAddress(this.address.value); return false">
+ <p>
+ <input type="text" size="35" name="address" value="Lendkai 1" />
+ <input type="submit" value="Suchen" />
+ </p>
+ </form>
+ </div>
</div>
</body>
</html>