Пример #1
0
<?php

include_once __DIR__ . "/../resources/code/models.php";
include_once __DIR__ . "/../resources/code/lang_coverage.php";
include_once __DIR__ . "/../controller/pwctrl_competition.php";
if (!isset($_SESSION)) {
    session_start();
}
if (!isset($_POST["search-data"])) {
    header("Location: ../view/403.php");
    exit;
}
$results = CompetitionController::search(strtolower($_POST["search-data"]));
if ($results["establishments"] == NULL) {
    $numOfEstablishments = 0;
} else {
    $numOfEstablishments = count($results["establishments"]);
}
if ($results["pinchos"] == NULL) {
    $numOfPinchos = 0;
} else {
    $numOfPinchos = count($results["pinchos"]);
}
$totalSearchElements = $numOfPinchos + $numOfEstablishments;
?>


<!DOCTYPE html>
<html>
<head>
	<meta charset="UTF-8">