summaryrefslogtreecommitdiff
path: root/tdd-protocol.php
diff options
context:
space:
mode:
authoremkael <emkael@tlen.pl>2018-11-07 22:08:03 +0100
committeremkael <emkael@tlen.pl>2018-11-07 23:03:32 +0100
commit5f655f3b9fff2f41754b9612ce178b495910f4d4 (patch)
treed0e5371d8b7e8a11b03953325bf98005c3fe824b /tdd-protocol.php
parentf5998c8bad50636ce95567eec4f9f3b837c017cc (diff)
Moving app to separate directory, scanning for PBN files in a separate directory
Fixes #2
Diffstat (limited to 'tdd-protocol.php')
-rw-r--r--tdd-protocol.php29
1 files changed, 0 insertions, 29 deletions
diff --git a/tdd-protocol.php b/tdd-protocol.php
deleted file mode 100644
index 3dcc0d8..0000000
--- a/tdd-protocol.php
+++ /dev/null
@@ -1,29 +0,0 @@
-<?php
-
-$prefix = $_GET['prefix'];
-$round = (int)$_GET['round'];
-$board = (int)$_GET['board'];
-
-require_once('tdd-bootstrap.php');
-
-$protocol = new Protocol($prefix, $round, $board);
-
-// security check
-$html_filename = $protocol->get_filename();
-$len = strlen($html_filename);
-$request_uri_ending = substr($_SERVER['REQUEST_URI'], -$len-1);
-if($request_uri_ending != '/' . $html_filename) {
- die('This script cannot be called directly!');
-}
-//
-
-$deals_by_tables = load_deals_for_tables($prefix, $round, $board);
-if (count($deals_by_tables) > 0) {
- foreach($deals_by_tables as $table => $deal) {
- $protocol->set_deal($table, $deal);
- }
- echo $protocol->output();
-}
-else {
- readfile($html_filename);
-}