Beispiel #1
0
require_once dirname(__FILE__) . "/Tweet.php";
require_once dirname(__FILE__) . "/Comment.php";
require_once dirname(__FILE__) . "/Message.php";
require_once dirname(__FILE__) . "/Friend.php";
$conn = new mysqli($dbHost, $dbUser, $dbPassword, $dbName);
mysql_query("SET NAMES utf8");
if ($conn->connect_errno) {
    //error number
    die("Db connection not initialized properly " . $conn->connect_error);
}
User::SetConnection($conn);
//żeby klasa user potrafila polaczyc sie z baza danych
Tweet::SetConnection($conn);
Comment::SetConnection($conn);
Message::SetConnection($conn);
Friend::SetConnection($conn);
//pasek nawigacji:
$userToUse = $_SESSION['userId'];
if (isset($_SESSION['userId'])) {
    ?>
    <!DOCTYPE html>
    <html>
    <head>
        <!--<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -->

    </head>

    <body>
    <div class="nav">

        <ul>