diff options
| author | Horus3 | 2014-02-09 17:21:59 +0100 |
|---|---|---|
| committer | Horus3 | 2014-02-09 17:21:59 +0100 |
| commit | 65dc06eab2305800ad862b4621807fd7d4f7fe8d (patch) | |
| tree | c8efcc90589d30ecbe838fc7822c8d031cbececa /account.php | |
| download | jungegemeinde-65dc06eab2305800ad862b4621807fd7d4f7fe8d.tar.gz | |
Init
Diffstat (limited to 'account.php')
| -rw-r--r-- | account.php | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/account.php b/account.php new file mode 100644 index 0000000..0717182 --- /dev/null +++ b/account.php @@ -0,0 +1,54 @@ +<?php include('auth.php'); +include("header.php"); + +if ($_SESSION["username"] != "jg-adlershof"){ + + $username = $_SESSION["username"]; + $db_check = new SQLite3("/var/www/jungegemeinde/database/share.db"); + + $safe_username = SQLite3::escapeString("$username"); + $email_db = $db_check->query("SELECT email FROM user where name='$safe_username';"); + while($email_array = $email_db->fetchArray(SQLITE3_NUM)){ + foreach($email_array as $thirdelement){ + $email=$thirdelement; + } + } + + /*Anzahl der hochgeladenen Dateien.*/ + $count_db = $db_check->query("SELECT count(*) as count FROM file where fk=(SELECT id from user where name='$safe_username');"); + $count_array = $count_db->fetchArray(); + $count = $count_array["count"]; + + +//echo "$username Test $email"; +echo " +<div id='content_container' align='center'> + <br> + <div class='kleineschrift'> + <div class='ueberschrift'><p>JUNGE GEMEINDE ADLERSHOF</p> + </div> + </div> + +<br> +<div class='mittlereschrift'> + Verwalte deine Account Informationen hier. +</div> +<br> + + +<table><tr> +<td><p>Name: </td><td align='right'>$username</p></td></tr> +<tr><td><p>E-Mail:</td><td align='right'>$email</p></td></tr> +<tr><td align='left'><p>Stored files:</td> <td align='right'>$count</p></td></tr> +</table> + + +"; + + +} else { +header("Location: member_login.php"); +exit; +} + +?> |
