<?php include "classes/database.php"; include "includes/header.php"; include "includes/nav.php"; ?> <?php include "includes/referer.php"; httpReferer($_SERVER["HTTP_REFERER"]); ?> <div class="container content"> <?php $username = $_POST["username"]; $password = $_POST["password"]; function loginUser($username, $password, $db) { // SQL-Query $db->query("SELECT * FROM users\n\t\t\t\tWHERE username = :username\n\t\t\t\tAND password = :password"); // Prepared Statements $db->bind(":username", $username); $db->bind(":password", $password); $db->execute(); return $db->result(); } // User in Session-Variable speichern $_SESSION["user"] = loginUser($username, $password, $db); ?>
include 'core/init.php'; include 'core/timezones.php'; $user = new User(); $fb = new Facebook(); $template = new Template(); $fbaccount = new fbaccount(); $fbapps = new FbApps(); // Switch facebook account request if (Input::Get("switchFbAccount")) { if ($fbaccount->exists(Input::Get("switchFbAccount"))) { $user->UpdateOptions(array('default_Fb_Account' => Input::Get("switchFbAccount"))); if (!httpReferer()) { Redirect::To("settings.php"); } Redirect::To(httpReferer()); } } // Delete facebook account if (Input::get("action", "GET") == "deletefbaccount" && Input::get("id", "GET")) { try { $fbaccount->delete(Input::get("id", "GET")); Session::Flash("settings", "success", lang("FB_ACCOUNT_SUCCESS_DELETED"), true); } catch (Exception $ex) { Session::Flash("settings", "danger", $ex->GetMessage(), true); } Redirect::To("settings.php#tab-fbAccounts"); } // Delete facebook app if (Input::get("action", "GET") == "deletefbapp" && Input::get("id", "GET")) { try {