<!--Script to mark an navigation tab active-->
    <script type="text/JavaScript">
    	$(document).ready(function(){
    		$("ul[id=right_options] li:eq(0)").addClass("active");
    	});
    	
    </script>
	<?php 
//if unauthorized show error page else proceed
if (!isset($_SESSION['owner_id'])) {
    include_once ROOT_DIR . 'view/error/error_top.php';
    echo 'You are not authorized<br><a href="' . HTTP . 'login.php">Login</a>';
    include_once ROOT_DIR . 'view/error/error_bottom.php';
} else {
    include_once ROOT_DIR . 'user/owner/controller/ownerDetailsController.php';
    $controller = new OwnerDetailsController();
    $owner_details = $controller->invoke($_SESSION['owner_id']);
    //get student details
    $index = 0;
    include_once ROOT_DIR . 'user/owner/view/layout/header.php';
    ?>
			<!-- Owner Profile Update form-->
			<div class="container">
				<div class="row">
					<div class="col-sm-3">
					</div>

					<div class="col-sm-6">
					
						<form role="form" id="owner_form" action="<?php 
    echo HTTP . 'user/owner/view/updateProfile.php';
示例#2
0
	<!--Script to mark an navigation tab active-->
    <script type="text/JavaScript">
    	$(document).ready(function(){
    		$("ul[id=options] li:eq(0)").addClass("active");
    	});
    	
    </script>
	<?php 
#echo $_SESSION['owner_id'].'<br>';
if (!isset($_SESSION['owner_id'])) {
    include_once ROOT_DIR . 'view/error/error_top.php';
    echo 'You are not authorized<br><a href="' . HTTP . 'login.php">Login</a>';
    include_once ROOT_DIR . 'view/error/error_bottom.php';
} else {
    include_once ROOT_DIR . 'user/owner/controller/ownerDetailsController.php';
    $controller = new OwnerDetailsController();
    $result = $controller->invoke($_SESSION['owner_id']);
    //get owner details
    if (is_null($result)) {
        session_unset();
        session_destroy();
        include_once ROOT_DIR . 'view/error/error_top.php';
        echo 'You are not authorized<br><a href="' . HTTP . 'login.php">Login</a>';
        include_once ROOT_DIR . 'view/error/error_bottom.php';
    } else {
        include_once ROOT_DIR . 'user/owner/view/layout/header.php';
        if (isset($_GET['update'])) {
            $update = $_GET['update'];
            if ($update == 0) {
                echo "<div class='text-center text-danger'><strong>Update failed!<br>Some error occured, Try again later!</strong></div>";
            } else {