<?php
if (!defined("root")) {
	define("root", $_SERVER['DOCUMENT_ROOT']);
}
require(root."/___simple_config.php");
session_start();
$pageSubOf = "pages";
$pageName = "prediksi-bola";
$pageTitle = "Prediksi Bola";
$thisUrl = "prediksi-bola";
$pageUrl = "/".adminFolder."/$thisUrl";
$coutSpecs = array('nl'=>"n");
require(root."/".adminFolder."/_common.php");
require(root."/".adminFolder."/_lib/db.php");
require(root."/".adminFolder."/_lib/main.php");

$a = cekpost(cleanQuery($_GET["a"]), "");
require(root."/".adminFolder."/_tpl/tag_html_a.php");
cout('
<style type="text/css">
	
</style>
');

require(root."/".adminFolder."/_tpl/openbody.php");
require(root."/".adminFolder."/_tpl/header.php");
cout('<div class="page-header">');
	cout('<h1>'.$pageTitle.'</h1>');
cout('</div>');
# MAIN
###### ###### ###### ###### ###### ###### ###### ###### ###### ###### ###### ###### ###### ###### ###### ###### ###### ###### ###### ###### ###### ###### ###### ######
if ($a=="" || $a=="main") {
	cout('<div class="section_submenus">');
		cout('<ul class="nav nav-tabs" role="tablist">');
			cout('<li role="presentation" class="active"><a href="'.$pageUrl.'/" title="Main List"><span class="glyphicon glyphicon-list"></span> Main</a></li>');
			cout('<li role="presentation"><a href="'.$pageUrl.'/add/" title="Add New"><span class="glyphicon glyphicon-plus"></span> Add</a></li>');
		cout('</ul>');
	cout('</div>');
	
	cout('<nav class="navbar navbar-default">
		<div class="container-fluid">
			<!-- Brand and toggle get grouped for better mobile display -->
			<div class="navbar-header">
				<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
					<span class="sr-only">Toggle navigation</span>
					<span class="icon-bar"></span>
					<span class="icon-bar"></span>
					<span class="icon-bar"></span>
				</button>
				<a class="navbar-brand" href="#">Filter</a>
			</div>
			<!-- Collect the nav links, forms, and other content for toggling -->
			<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
				<form class="navbar-form navbar-left" role="search" method="post" target="filter_iframe" action="/'.adminFolder.'/_ajax/ajax_teachers.php?a=section_main">
					<div class="form-group">
						<label for="fil_tim1">Team A</label>
						<input type="text" name="fil_tim1" id="fil_tim1" class="form-control" placeholder="% Team A %">
					</div>
					<div class="form-group">
						<label for="fil_tim2">Team B</label>
						<input type="text" name="fil_tim2" id="fil_tim2" class="form-control" placeholder="% Team B %">
					</div>
					<div class="form-group">
						<label for="fil_prediksi">Prediction</label>
						<input type="text" name="fil_prediksi" id="fil_prediksi" class="form-control" placeholder="% Content %">
					</div>
					<div class="form-group">
						<label for="fil_isactive">Active?</label>
						<select name="fil_isactive" id="fil_isactive" class="form-control">
							<option value="">All</option>
							<option value="1">Active</option>
							<option value="0">Non-Active</option>
						</select>
					</div>
					<button type="button" class="btn btn-primary" onclick="filterReload(\''.$pageName.'\', 1);return false;">Search</button>
				</form>
				<script>
					$("#fil_tim1, #fil_tim2, #fil_prediksi").keypress(function (e) {
						if(e.which == 13) {
							filterReload(\''.$pageName.'\', 1);
							return false;
						}
					});
				</script>
			</div><!-- /.navbar-collapse -->
		</div><!-- /.container-fluid -->
	</nav>');
	cout('<div class="ajax_resp"></div>');
	cout('<script>filterReload(\''.$pageName.'\', 1);</script>');
}
###### ###### ###### ###### ###### ###### ###### ###### ###### ###### ###### ###### ###### ###### ###### ###### ###### ###### ###### ###### ###### ###### ###### ######

# VIEW
###### ###### ###### ###### ###### ###### ###### ###### ###### ###### ###### ###### ###### ###### ###### ###### ###### ###### ###### ###### ###### ###### ###### ######
if ($a=="view") {
	$id = cekpost(cleanQuery($_GET["id"]), "0");
	cout('<div class="section_submenus">');
		cout('<ul class="nav nav-tabs" role="tablist">');
			cout('<li role="presentation"><a href="'.$pageUrl.'/" title="Main List"><span class="glyphicon glyphicon-list"></span> <span class="hidden-xs hidden-sm">Main</span></a></li>');
			cout('<li role="presentation"><a href="'.$pageUrl.'/add/" title="Add New"><span class="glyphicon glyphicon-plus"></span> <span class="hidden-xs hidden-sm">Add</span></a></li>');
			cout('<li role="presentation" class="active"><a href="'.$pageUrl.'/view/'.$id.'/" title="View"><span class="glyphicon glyphicon-file"></span> <span class="hidden-xs hidden-sm">View</span></a></li>');
			cout('<li role="presentation"><a href="'.$pageUrl.'/edit/'.$id.'/" title="Edit"><span class="glyphicon glyphicon-edit"></span> <span class="hidden-xs hidden-sm">Edit</span></a></li>');
			cout('<li role="presentation"><a href="'.$pageUrl.'/delete/'.$id.'/" title="Delete"><span class="glyphicon glyphicon-trash"></span> <span class="hidden-xs hidden-sm">Delete</span></a></li>');
		cout('</ul>');
	cout('</div>');
	cout('<div class="ajax_resp"></div>');
	cout('<script>call_section("'.$pageName.'", "section_view", '.$id.');</script>');
}
###### ###### ###### ###### ###### ###### ###### ###### ###### ###### ###### ###### ###### ###### ###### ###### ###### ###### ###### ###### ###### ###### ###### ######

# DELETE
###### ###### ###### ###### ###### ###### ###### ###### ###### ###### ###### ###### ###### ###### ###### ###### ###### ###### ###### ###### ###### ###### ###### ######
if ($a=="delete") {
	$id = cekpost(cleanQuery($_GET["id"]), "0");
	cout('<div class="section_submenus">');
		cout('<ul class="nav nav-tabs" role="tablist">');
			cout('<li role="presentation"><a href="'.$pageUrl.'/" title="Main List"><span class="glyphicon glyphicon-list"></span> <span class="hidden-xs hidden-sm">Main</span></a></li>');
			cout('<li role="presentation"><a href="'.$pageUrl.'/add/" title="Add New"><span class="glyphicon glyphicon-plus"></span> <span class="hidden-xs hidden-sm">Add</span></a></li>');
			cout('<li role="presentation"><a href="'.$pageUrl.'/view/'.$id.'/" title="View"><span class="glyphicon glyphicon-file"></span> <span class="hidden-xs hidden-sm">View</span></a></li>');
			cout('<li role="presentation"><a href="'.$pageUrl.'/edit/'.$id.'/" title="Edit"><span class="glyphicon glyphicon-edit"></span> <span class="hidden-xs hidden-sm">Edit</span></a></li>');
			cout('<li role="presentation" class="active"><a href="'.$pageUrl.'/delete/'.$id.'/" title="Delete"><span class="glyphicon glyphicon-trash"></span> <span class="hidden-xs hidden-sm">Delete</span></a></li>');
		cout('</ul>');
	cout('</div>');
	cout('<div class="ajax_resp"></div>');
	cout('<script>call_section("'.$pageName.'", "section_delete", '.$id.');</script>');
}
###### ###### ###### ###### ###### ###### ###### ###### ###### ###### ###### ###### ###### ###### ###### ###### ###### ###### ###### ###### ###### ###### ###### ######

# EDIT
###### ###### ###### ###### ###### ###### ###### ###### ###### ###### ###### ###### ###### ###### ###### ###### ###### ###### ###### ###### ###### ###### ###### ######
if ($a=="edit") {
	$id = cekpost(cleanQuery($_GET["id"]), "0");
	cout('<div class="section_submenus">');
		cout('<ul class="nav nav-tabs" role="tablist">');
			cout('<li role="presentation"><a href="'.$pageUrl.'/" title="Main List"><span class="glyphicon glyphicon-list"></span> <span class="hidden-xs hidden-sm">Main</span></a></li>');
			cout('<li role="presentation"><a href="'.$pageUrl.'/add/" title="Add New"><span class="glyphicon glyphicon-plus"></span> <span class="hidden-xs hidden-sm">Add</span></a></li>');
			cout('<li role="presentation"><a href="'.$pageUrl.'/view/'.$id.'/" title="View"><span class="glyphicon glyphicon-file"></span> <span class="hidden-xs hidden-sm">View</span></a></li>');
			cout('<li role="presentation" class="active"><a href="'.$pageUrl.'/edit/'.$id.'/" title="Edit"><span class="glyphicon glyphicon-edit"></span> <span class="hidden-xs hidden-sm">Edit</span></a></li>');
			cout('<li role="presentation"><a href="'.$pageUrl.'/delete/'.$id.'/" title="Delete"><span class="glyphicon glyphicon-trash"></span> <span class="hidden-xs hidden-sm">Delete</span></a></li>');
		cout('</ul>');
	cout('</div>');
	cout('<div class="ajax_resp"></div>');
	cout('<script>call_section("'.$pageName.'", "section_edit", '.$id.');</script>');
}
###### ###### ###### ###### ###### ###### ###### ###### ###### ###### ###### ###### ###### ###### ###### ###### ###### ###### ###### ###### ###### ###### ###### ######

# ADD
###### ###### ###### ###### ###### ###### ###### ###### ###### ###### ###### ###### ###### ###### ###### ###### ###### ###### ###### ###### ###### ###### ###### ######
if ($a=="add") {
	cout('<div class="section_submenus">');
		cout('<ul class="nav nav-tabs" role="tablist">');
			cout('<li role="presentation"><a href="'.$pageUrl.'/" title="Main List"><span class="glyphicon glyphicon-list"></span> <span class="hidden-xs hidden-sm">Main</span></a></li>');
			cout('<li role="presentation" class="active"><a href="'.$pageUrl.'/add/" title="Add New"><span class="glyphicon glyphicon-plus"></span> <span class="hidden-xs hidden-sm">Add</span></a></li>');
		cout('</ul>');
	cout('</div>');
	cout('<div class="ajax_resp"></div>');
	cout('<script>call_section("'.$pageName.'", "section_add", "");</script>');
}
###### ###### ###### ###### ###### ###### ###### ###### ###### ###### ###### ###### ###### ###### ###### ###### ###### ###### ###### ###### ###### ###### ###### ######

require(root."/".adminFolder."/_tpl/footer.php");
require(root."/".adminFolder."/_tpl/tag_html_b.php");
?>