summaryrefslogtreecommitdiff
path: root/www/functions/func_user.php
diff options
context:
space:
mode:
Diffstat (limited to 'www/functions/func_user.php')
-rw-r--r--www/functions/func_user.php13
1 files changed, 13 insertions, 0 deletions
diff --git a/www/functions/func_user.php b/www/functions/func_user.php
new file mode 100644
index 0000000..2e49651
--- /dev/null
+++ b/www/functions/func_user.php
@@ -0,0 +1,13 @@
+<?
+function user($db){
+ echo "loged in as: " . $_SESSION["username"];
+ $safe_name=SQLite3::escapeString("$_SESSION[username]");
+ $invite_db = $db->query("SELECT invites FROM user WHERE name='" . $safe_name . "';");
+ $invite_ar = $invite_db->fetchArray(SQLITE3_NUM);
+ $invite = $invite_ar[0];
+
+ echo "<br><br>";
+ echo "You have currently $invite invites. <br>";
+ return true;
+}
+