	<?php
	/*$db = Xcrud_db::get_instance();
	$db->query('Select user_name from tickets where status = 1'); // executes query, returns count of affected rows
	$zatvoren = count($db->result()); // loads results as list of arrays
	$db1 = Xcrud_db::get_instance();
	$db1->query('Select user_name from tickets where status = 0'); // executes query, returns count of affected rows
	$otvoren = count($db1->result()); // loads results as list of arrays
	
	//$db->row(); // loads one result row as associative array
	//$var = $db->escape($var); // escapes variable, ads single quotes
	//$db->insert_id(); // returns last insert id
	*/
	?>
	<!-- BEGIN DASHBOARD STATS -->
	<div class="row" id="scores">
				<div class="col-lg-3 col-md-3 col-sm-6 col-xs-12">
					<div class="dashboard-stat green-haze">
						<div class="visual">
							<i class="fa fa-bar-chart-o"></i>
						</div>
						<div class="details">
							<div class="number" id="otvoren">
							</div>
							<div class="desc">
								 Otvorenih kvarova
							</div>
						</div>
						<a class="more ajaxify" href="../smart/pages/allticket.php">
						Pogledaj <i class="m-icon-swapright m-icon-white"></i>
						</a>
					</div>
				</div>
				<div class="col-lg-3 col-md-3 col-sm-6 col-xs-12 hidden-xs">
					<div class="dashboard-stat red-intense">
						<div class="visual">
							<i class="fa fa-bar-chart-o"></i>
						</div>
						<div class="details">
							<div class="number" id="zatvoren">
								 <?php //echo $zatvoren;?>
							</div>
							<div class="desc">
								 Zatvorenih kvarova
							</div>
						</div>
						<a class="more" href="javascript:;">
						Pogledaj <i class="m-icon-swapright m-icon-white"></i>
						</a>
					</div>
				</div>
				<div class="col-lg-3 col-md-3 col-sm-6 col-xs-12 hidden-xs">
					<div class="dashboard-stat grey-gallery">
						<div class="visual">
							<i class="fa fa-bar-chart-o"></i>
						</div>
						<div class="details">
							<div class="number" id="svega">
								 <?php //echo $zatvoren + $otvoren;?>
							</div>
							<div class="desc">
								 Ukupno kvarova
							</div>
						</div>
						<a class="more" href="javascript:;">
						Pogledaj <i class="m-icon-swapright m-icon-white"></i>
						</a>
					</div>
				</div>
				<div class="col-lg-3 col-md-3 col-sm-6 col-xs-12 hidden-xs">
					<div class="dashboard-stat purple-plum">
						<div class="visual">
							<i class="fa fa-bar-chart-o"></i>
						</div>
						<div class="details">
							<div class="number" id="procenat">
								 <?php //echo FLOOR(($otvoren / ($zatvoren + $otvoren))*100)."%";?>
							</div>
							<div class="desc">
								 Otvorenih kvarova %
							</div>
						</div>
						<a class="more" href="javascript:;">
						Pogledaj <i class="m-icon-swapright m-icon-white"></i>
						</a>
					</div>
				</div>
			</div>
	<!-- END DASHBOARD STATS -->