<?php
 define("_VALID_PHP", true);
 require_once("../../init.php");
$page = basename($_SERVER["PHP_SELF"]);
$heder = "Brojcanici";
$mali = " > pregled svih brojača";
$korisnik = $user->username;
$lokal = $user->fname;
$prezime = $user->lname;
$koje = $user->name;
//echo $koje;
$ip = $_SERVER['REMOTE_ADDR']; 
$kome = $user->sendto;
$id_user = $user->uid;
$dept = $user->todept;
$gdeje = "(".$dept.")";
//echo $kome;
//echo $dept;
$firma = $user->country;
$upit = 'manager REGEXP "[[:<:]]'.$id_user.'[[:>:]]"';
$upits = 'serviser REGEXP "[[:<:]]'.$id_user.'[[:>:]]"';
//echo $upit;
	
include('../../xcrud/xcrud.php');
Xcrud_config::$jquery_no_conflict = true; // jquery conflicts with SyntaxHighlighter
//odavde idu komnade ka xcrud-u
$xcrud = Xcrud::get_instance();
$xcrud->table('c_counters');
$xcrud->table_name('Popis elektronskih brojcanika');
$xcrud->subselect('Lokal','SELECT Arcade_Name FROM c_slots WHERE id_slot={id_slot}');
$xcrud->subselect('Pozicija','SELECT Seat FROM c_slots WHERE id_slot={id_slot}');
$xcrud->columns('Lokal,id_user,Pozicija,id_slot,in_m,out_m,bet_m,win_m,games_m,jackpot,rc,Note,vreme');
$xcrud->relation('id_slot','c_slots','id_slot','Game_System');
$xcrud->relation('id_user','users','id',array('fname','lname'));
$xcrud->unset_remove();
$xcrud->unset_add();

?>
<!-- BEGIN PAGE HEADER-->
<h3 class="page-title">
<?php echo $heder;?><small><?php echo $mali;?></small>
</h3>
<div class="page-bar">
	<ul class="page-breadcrumb">
		<li>
			<i class="fa fa-home"></i>
			<a href="index.php">Home</a>
			<i class="fa fa-angle-right"></i>
		</li>
		<li>
			<a href="#"><?php echo $heder;?></a>
		</li>
	</ul>
	</div>
	<div id="alert_green">
	</div>
	<!-- END PAGE HEADER-->
	<!-- BEGIN PAGE CONTENT-->
	<div class="row">
	
	<div class="col-md-12">
	<?php echo $xcrud->render(); ?>

	</div>
</div>
<!-- END PAGE CONTENT-->