<?php 

	$title = "Yönetim Paneli";
	$page_title = "Yönetim Paneli";

	$uye = $db->prepare("SELECT COUNT(*) FROM users");
	$uye->execute();
	$toplamuye = $uye->fetchColumn();
	
	$tickets = $db->from('tickets')->where('ticket_status', 1)->select('count(ticket_status) as total')->total();
	$bankdeposits = $db->from('bank_deposits')->where('status', 0)->select('count(status) as total')->total();
	$toplamsiparis = $db->from('orders')->select('count(order_id) as total')->total();
	$toplamtask = $db->from('tasks')->where('task_status', 0)->select('count(task_status) as total')->total();

	$services = $db->prepare("SELECT COUNT(*) FROM services");
	$services->execute();
	$toplamservices = $services->fetchColumn();

	$deposits = $db->prepare("SELECT COUNT(*) FROM deposits");
	$deposits->execute();
	$toplamdeposits = $deposits->fetchColumn();

	$reports = $db->from('api_report')->orderby('report_id', 'DESC')->all();
	$auto = $db->from('auto_report')->orderby('report_id', 'DESC')->all();

	require admin_view('index');