<?php

require_once 'classes/members.php';
require_once 'classes/games.php';
require_once 'classes/teams.php';
require_once 'classes/registration.php';
$member = new Members(1);
$members = new Members();
$game = new Games(2);
$team = new Teams(1);
$registration = new Registration(1);
var_dump($member);
var_dump($game);
var_dump($team);
var_dump($registration);
var_dump($members->getMembers());
Example #2
0
<?php

require './View/View.php';
$view = new View();
require './Model/Members.php';
$members = new Members();
$maxMembers = count($members->getMembers());
// use the "ternary operator" operator to check if the page is set
$page = isset($_GET['page']) ? (int) $_GET['page'] : 0;
// use the "ternary operator" to check to see if page is 0
$prev = $page == 0 ? 0 : $page - 1;
$next = $page + 1;
$linesPerPage = 6;
?>
<!DOCTYPE HTML>
<!-- this file has the overall look and feel of the website -->
<html>
<head>
    <title>Sweets Complete | Members</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <meta name="description" content="Sweets Complete">
    <meta name="keywords" content="">
    <link rel="stylesheet" href="css/main.css" type="text/css">
    <link rel="shortcut icon" href="images/favicon.ico?v=2" type="image/x-icon"/>
</head>
<body>
<div id="wrapper">
    <div id="maincontent">

        <div id="header">
            <div id="logo" class="left">
Example #3
0
//$users=['rasko', 'admin', 'bot'];
//echo<<<HTML
//<method = "POST">
//         Username: <input type = "text" name = "user" />
//         <input type = "submit" />
//      </form>
//HTML;
//$_POST["user"]='******';
//if(isset($_POST["user"])) {
//    if(in_array($_POST["user"], $users)) {
//        $position=array_search($_POST["user"], $users);
//        echo "<br><br>$position<br><br>";
//        $user1=new User;
//        try {
//        $user1->user_login();
//        }
//        catch (Exception $ex) {
//            echo $ex->getMessage();
//        }
//    }
//    else {
//        echo 'User does not exist';
//    }
//}
$list = new Members();
$user1 = new User("Ana Zamos");
$list->addMember($user1);
$user2 = new User("Rasko Lazic");
$list->addMember($user2);
$list->getMembers();