<?php
session_start();
require_once("../../app/config.php");
if(!isset($_SESSION['offshore_userid'])){echo "<script>window.location.href='".$url."/login';</script>";}
$row=mysqli_fetch_array(mysqli_query($dbc, "SELECT * FROM users WHERE id='".$_SESSION['offshore_userid']."'"));
$username=$row['username'];
$ip_address=user_ip();
if($_SESSION['offshore_password']!=$row['password']){
	redirect($url."/app/user/logout");
}
mysqli_query($dbc, "UPDATE users SET ip_address='$ip_address' WHERE id='".$_SESSION['offshore_userid']."'");
$admin=mysqli_fetch_array(mysqli_query($dbc, "SELECT * FROM admin WHERE id=1"));
if(empty($admin['image_link'])){
	$cast2="../asset/global_assets/images/placeholders/placeholder.jpg";
}else{
	$cast2="../asset/profile/".$admin['image_link'];
}
if(empty($row['image_link'])){
	$cast="../asset/global_assets/images/placeholders/placeholder.jpg";
}else{
	$cast="../asset/profile/".$row['image_link'];
}?>
<!DOCTYPE html>
<html lang="en">
<head>
	<base href="<?php echo $url; ?>/user/"/>
	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
	<link rel="apple-touch-icon" sizes="76x76" href="../asset/<?php echo $logo['image_link']; ?>">
	<link rel="icon" type="image/png" sizes="96x96" href="../asset/<?php echo $logo['image_link']; ?>">
	<title><?php echo $set['site_name']; ?></title>

	<!-- Global stylesheets -->
	<link href="https://fonts.googleapis.com/css?family=Ubuntu:400,300,100,500,700,900" rel="stylesheet" type="text/css">
	<link href="../asset/global_assets/css/icons/icomoon/styles.css" rel="stylesheet" type="text/css">
	<link href="../asset/global_assets/css/icons/fontawesome/styles.min.css" rel="stylesheet" type="text/css">
	<link href="../asset/user/assets/css/bootstrap.css" rel="stylesheet" type="text/css">
	<link href="../asset/user/assets/css/bootstrap_limitless.css" rel="stylesheet" type="text/css">
	<link href="../asset/user/assets/css/layout.css" rel="stylesheet" type="text/css">
	<link href="../asset/user/assets/css/components.min.css" rel="stylesheet" type="text/css">
	<link href="../asset/user/assets/css/colors.css" rel="stylesheet" type="text/css">
	<!-- /global stylesheets -->

	<!-- Core JS files -->
	<script src="../asset/global_assets/js/main/jquery.min.js"></script>
	<script src="../asset/global_assets/js/main/bootstrap.bundle.min.js"></script>
	<script src="../asset/global_assets/js/plugins/loaders/blockui.min.js"></script>
	<script src="../asset/global_assets/js/plugins/ui/ripple.min.js"></script>
	<!-- /core JS files -->

	<!-- Theme JS files -->
	<script src="../asset/global_assets/js/plugins/forms/styling/uniform.min.js"></script>

	<script src="../asset/global_assets/js/plugins/visualization/d3/d3.min.js"></script>
	<script src="../asset/global_assets/js/plugins/visualization/d3/d3_tooltip.js"></script>
	<script src="../asset/global_assets/js/plugins/forms/styling/switchery.min.js"></script>
	<script src="../asset/global_assets/js/plugins/forms/selects/bootstrap_multiselect.js"></script>
	<script src="../asset/global_assets/js/plugins/ui/moment/moment.min.js"></script>
	<script src="../asset/global_assets/js/plugins/pickers/daterangepicker.js"></script>
	<script src="../asset/global_assets/js/plugins/tables/datatables/datatables.min.js"></script>
	<script src="../asset/global_assets/js/plugins/forms/selects/select2.min.js"></script>

	<script src="../asset/user/assets/js/app.js"></script>
	<script src="../asset/global_assets/js/demo_pages/dashboard.js"></script>
	<script src="../asset/global_assets/js/demo_pages/login.js"></script>
	<script src="../asset/global_assets/js/demo_pages/datatables_advanced.js"></script>
	<script src="../asset/global_assets/js/demo_pages/datatables_basic.js"></script>
	<script src="../asset/global_assets/js/demo_pages/form_layouts.js"></script>
	<script src="../asset/global_assets/js/demo_pages/form_select2.js"></script>
	<script src="../asset/global_assets/js/demo_pages/form_checkboxes_radios.js"></script>
	<script src="../asset/global_assets/js/plugins/ui/prism.min.js"></script>
	<link href="../asset/toastr/toastr.css" rel="stylesheet">
	<script src="../asset/toastr/toastr.js"></script>
	<script type="text/javascript" src="https://js.stripe.com/v2/"></script>
	<script type="text/javascript" src="https://rawgit.com/jessepollak/card/master/dist/card.js"></script>
	<!-- /theme JS files -->

</head>