<?php include("lib/Config.php");
/*$my_ips = array('127.0.0.1');
$my_ip=$_SERVER['REMOTE_ADDR'];
if(!in_array($my_ip,$my_ips)){header("Location:http://www.google.com");exit();}*/
checkadminlogin();
$DB=new database;
?>
<!DOCTYPE html>
<html lang="en"><head>
	<meta charset="utf-8">
	<!--<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0" />-->
	<title>.:: <?php echo getRecord('id','settings','1','title');?> | Admin ::.</title>

	<!--=== CSS ===-->
	<link href="assets/css/bootstrap.min.css" rel="stylesheet" type="text/css" />	
	<link href="assets/css/main.css" rel="stylesheet" type="text/css" />
	<link href="assets/css/plugins.css" rel="stylesheet" type="text/css" />
	<link href="assets/css/responsive.css" rel="stylesheet" type="text/css" />
	<link href="assets/css/icons.css" rel="stylesheet" type="text/css" />
	<link href="assets/css/fontawesome/font-awesome.min.css" rel="stylesheet" >	
	<!-- <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,600,700' rel='stylesheet' type='text/css'> -->
	<link href="assets/css/jquery.dataTables.min.css" rel="stylesheet" >
	<!--=== JS ===-->
    <script type="text/javascript" src="assets/js/libs/jquery-1.10.2.min.js"></script>
	<script type="text/javascript" src="assets/plugins/jquery-ui/jquery-ui-1.10.2.custom.min.js"></script>
	<script type="text/javascript" src="assets/js/bootstrap.min.js"></script>
	<script type="text/javascript" src="assets/js/libs/lodash.compat.min.js"></script>
	<script type="text/javascript" src="assets/plugins/touchpunch/jquery.ui.touch-punch.min.js"></script>
	<script type="text/javascript" src="assets/plugins/event.swipe/jquery.event.move.js"></script>
	<script type="text/javascript" src="assets/plugins/event.swipe/jquery.event.swipe.js"></script>
	<script type="text/javascript" src="assets/js/libs/breakpoints.js"></script>
	<script type="text/javascript" src="assets/plugins/respond/respond.min.js"></script>
	<script type="text/javascript" src="assets/plugins/cookie/jquery.cookie.min.js"></script>
	<script type="text/javascript" src="assets/plugins/slimscroll/jquery.slimscroll.min.js"></script>
	<script type="text/javascript" src="assets/plugins/slimscroll/jquery.slimscroll.horizontal.min.js"></script>
	<script type="text/javascript" src="assets/plugins/sparkline/jquery.sparkline.min.js"></script>
	<script type="text/javascript" src="assets/plugins/flot/jquery.flot.min.js"></script>
	<script type="text/javascript" src="assets/plugins/flot/jquery.flot.tooltip.min.js"></script>
	<script type="text/javascript" src="assets/plugins/flot/jquery.flot.resize.min.js"></script>
	<script type="text/javascript" src="assets/plugins/flot/jquery.flot.time.min.js"></script>
	<script type="text/javascript" src="assets/plugins/flot/jquery.flot.growraf.min.js"></script>
	<script type="text/javascript" src="assets/plugins/easy-pie-chart/jquery.easy-pie-chart.min.js"></script>
	<script type="text/javascript" src="assets/plugins/daterangepicker/moment.min.js"></script>
	<script type="text/javascript" src="assets/plugins/daterangepicker/daterangepicker.js"></script>
	<script type="text/javascript" src="assets/plugins/blockui/jquery.blockUI.min.js"></script>
	<script type="text/javascript" src="assets/plugins/fullcalendar/fullcalendar.min.js"></script>	
	<script type="text/javascript" src="assets/plugins/uniform/jquery.uniform.min.js"></script>
	<script type="text/javascript" src="assets/plugins/select2/select2.min.js"></script>
    <script type="text/javascript" src="assets/plugins/fileinput/fileinput.js"></script>	
	<script type="text/javascript" src="assets/plugins/validation/jquery.validate.min.js"></script>
    <script type="text/javascript" src="assets/plugins/validation/additional-methods.min.js"></script>	
    <script type="text/javascript" src="assets/plugins/noty/jquery.noty.js"></script>
	<script type="text/javascript" src="assets/plugins/noty/layouts/top.js"></script>
	<script type="text/javascript" src="assets/plugins/noty/themes/default.js"></script>
	<script type="text/javascript" src="assets/plugins/bootstrap-colorpicker/bootstrap-colorpicker.min.js"></script>
	<script type="text/javascript" src="assets/plugins/nprogress/nprogress.js"></script>
	<script type="text/javascript" src="assets/plugins/bootbox/bootbox.js"></script>
	<script type="text/javascript" src="assets/js/app.js"></script>
    <script type="text/javascript" src="assets/js/plugins.js"></script>
    <script type="text/javascript" src="assets/js/plugins.form-components.js"></script>
    <script type="text/javascript" src="assets/plugins/fileupload/bootstrap-fileupload.min.js"></script>
	<?php $cur_page=str_replace('.php','',basename($_SERVER['SCRIPT_FILENAME']));?>
	<script>
	$(document).ready(function(){
		"use strict";
		App.init(); // Init layout and core plugins
		Plugins.init(); // Init all plugins
		FormComponents.init(); // Init all form-specific plugins		
	$('#<?php echo $cur_page;?>').DataTable( {
        "processing": true,
        "serverSide": true,
        "ajax": "<?php echo $cur_page;?>_data.php",
		 "dom": "<'row'<'col-sm-3'l><'col-sm-3'f><'col-sm-6'p>>" +
         "<'row'<'col-sm-12'tr>>" +
         "<'row'<'col-sm-5'i><'col-sm-7'p>>",
    } );
	});
	</script>
    
	<script type="text/javascript" src="assets/js/custom.js"></script>    
    <script type="text/javascript" src="assets/js/demo/form_validation.js"></script> 
    <script type="text/javascript" src="assets/js/demo/ui_general.js"></script>
	<script type="text/javascript" src="assets/js/demo/pages_calendar.js"></script>
	<!--<script type="text/javascript" src="assets/js/demo/charts/chart_filled_blue.js"></script>
	<script type="text/javascript" src="assets/js/demo/charts/chart_simple.js"></script>   -->
	<script type="text/javascript" src="assets/plugins/typeahead/typeahead.min.js"></script>
	<script type="text/javascript" src="assets/plugins/autosize/jquery.autosize.min.js"></script>
	<script type="text/javascript" src="assets/plugins/inputlimiter/jquery.inputlimiter.min.js"></script>
	<script type="text/javascript" src="assets/plugins/tagsinput/jquery.tagsinput.min.js"></script>
	<script type="text/javascript" src="assets/plugins/duallistbox/jquery.duallistbox.min.js"></script>
	<script type="text/javascript" src="assets/plugins/bootstrap-inputmask/jquery.inputmask.min.js"></script>
	<script type="text/javascript" src="assets/plugins/bootstrap-wysihtml5/wysihtml5.min.js"></script>
	<script type="text/javascript" src="assets/plugins/bootstrap-wysihtml5/bootstrap-wysihtml5.min.js"></script>
	<script type="text/javascript" src="assets/plugins/bootstrap-multiselect/bootstrap-multiselect.min.js"></script>
	<script type="text/javascript" src="assets/plugins/globalize/globalize.js"></script>
	<script type="text/javascript" src="assets/plugins/globalize/cultures/globalize.culture.de-DE.js"></script>
	<script type="text/javascript" src="assets/plugins/globalize/cultures/globalize.culture.ja-JP.js"></script>
	<script type="text/javascript" src="assets/js/demo/form_components.js"></script>
	<script type="text/javascript" src="assets/plugins/flot/jquery.flot.orderBars.min.js"></script>
	<script type="text/javascript" src="assets/plugins/flot/jquery.flot.selection.min.js"></script>	
	<script type="text/javascript" src="assets/plugins/knob/jquery.knob.min.js"></script>
	<script type="text/javascript" src="assets/js/demo/ui_sliders.js"></script>
	<script type="text/javascript" src="assets/plugins/nestable/jquery.nestable.min.js"></script>
	<script type="text/javascript" src="assets/js/demo/ui_nestable_list.js"></script>
   
   <script type="text/javascript" src="assets/js/jquery.dataTables.min.js"></script> 
	<!-- <script type="text/javascript" src="assets/plugins/datatables/jquery.dataTables.min.js"></script>
	<script type="text/javascript" src="assets/plugins/datatables/tabletools/TableTools.min.js"></script> 
	<script type="text/javascript" src="assets/plugins/datatables/colvis/ColVis.min.js"></script> 
	<script type="text/javascript" src="assets/plugins/datatables/DT_bootstrap.js"></script> -->
    
    <!--<script type="text/javascript" src="assets/plugins/datatables/jquery.dataTables.min.js"></script>
	<script type="text/javascript" src="assets/plugins/datatables/DT_bootstrap.js"></script>
	<script type="text/javascript" src="assets/plugins/datatables/responsive/datatables.responsive.js"></script>-->
    
    <script type="text/javascript" src="assets/ckfinder/ckfinder.js"></script>
    <script type="text/javascript" src="assets/ckfinder/ckeditor/ckeditor.js"></script>
    <script type="text/javascript" src="assets/js/countrycodes.js"></script>	
</head>

<body class="theme-dark">
<header class="header navbar navbar-fixed-top" role="banner">
		<!-- Top Navigation Bar -->
		<div class="container">

			<!-- Only visible on smartphones, menu toggle -->
			<ul class="nav navbar-nav">
				<li class="nav-toggle"><a href="javascript:void(0);" title=""><i class="icon-reorder"></i></a></li>
			</ul>

			<!-- Logo -->
			<a class="navbar-brand" href="index.php">
           <h3><?php echo getRecord('id','settings','1','title');?></h3>
			</a>
			<ul class="nav navbar-nav navbar-right">
				
				<li class="dropdown user">
					<a href="#" class="dropdown-toggle" data-toggle="dropdown">
						<!--<img alt="" src="assets/img/avatar1_small.jpg" />-->
						<i class="icon-male"></i>
						<span class="username" style="text-transform:capitalize;">Welcome <?php echo $_SESSION['admin']['name'];?></span>
						<i class="icon-caret-down small"></i>
					</a>
					<ul class="dropdown-menu">
						<li><a href="settings.php?action=list"><i class="icon-user"></i> Settings</a></li>						
						<li><a href="logout.php" onClick="return confirm('Are you sure you want to Logout')"><i class="icon-key"></i> Log Out</a></li>
					</ul>
				</li>
				<!-- /user login dropdown -->
			</ul>
			<!-- /Top Right Menu -->
		</div>
	</header>
  <div id="container">
<?php include("links/menu.php");?>