Пример #1
0
session_start();
if (isset($_POST['addteam']) && isset($_SESSION['username'])) {
    require_once 'logindb.php.inc';
    $login = new localDB("connect.ini");
    $result = $login->addplayer($_POST['addteam'], $_SESSION['username']);
}
if (isset($_POST['removeplayer']) && isset($_SESSION['username'])) {
    require_once 'logindb.php.inc';
    $login = new localDB("connect.ini");
    $result = $login->removeplayer($_POST['removeplayer'], $_SESSION['username']);
}
if (isset($_SESSION['username'])) {
    $x = "<p class='welcome'>Welcome, <a class='removealine' href='account.php' title=''>" . $_SESSION['username'] . "</a></p>";
    require_once 'logindb.php.inc';
    $login = new localDB("connect.ini");
    $response = $login->myteam($_SESSION['username']);
} else {
    header('Location: accessdenied.php');
}
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" 
integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous">
<link href="css/layout.css" rel="stylesheet" type="text/css" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Fantasy Sport Guide</title>
</head>

<body>