Esempio n. 1
0
<?php

require_once 'core/init.php';
$pageTitle = 'View Fixtures';
$user = new User();
if (!$user->isLoggedIn()) {
    Redirect::to('login.php');
}
// Defaults
$style = '';
$displayErrors = "none";
$errorDisplay = "";
$fixture = new Fixture();
if (isset($_GET['team']) && is_numeric($_GET['team'])) {
    $teamId = escape($_GET['team']);
    $fixtures = $fixture->getAllMatches($teamId);
    if (!$fixtures->count()) {
        $teamName = "";
        $errorMessage = "No fixtures to display, <a href='add-fixture.php'>Click here to add a fixture</a>";
    } else {
        $teamName = " - " . $fixtures->first()->Name;
        $fixtures = $fixtures->results();
    }
} else {
    if (isset($_GET['delete']) && $_GET['delete'] == true && isset($_GET['matchid']) && is_numeric($_GET['matchid'])) {
        try {
            $matchId = escape($_GET['matchid']);
            $fixture->delete($matchId);
            Session::flash('deleted', 'Fixture Deleted Successfully');
            Redirect::to('fixtures.php');
        } catch (Exception $e) {
Esempio n. 2
0
<?php

$pageTitle = "Fixtures";
include_once "main_header.php";
require_once 'core/init.php';
$fixture = new Fixture();
$fixtures = $fixture->getAllMatches()->results();
?>
		<div role="main" class="main">


			<div class="container">
								<br>
				<h2 style="margin-bottom:0px"><strong>Fixtures</strong></h2>
				<hr style="margin-bottom: 0px">




				<section class="panel">
					<header class="panel-heading">
						<div class="panel-actions">
							<a href="#" class="panel-action panel-action-toggle" data-panel-toggle></a>
							<a href="#" class="panel-action panel-action-dismiss" data-panel-dismiss></a>
						</div>

						<h2 class="panel-title" style="margin-bottom: -20px"><strong>1st Team Fixtures</strong> </h2>
					</header>
					<div class="panel-body">
						<table class="table table-bordered table-striped mb-none" id="example2" style="border:  none">
										<tbody>