<?php 
session_start();
require_once("../../includes/display_internal_user_dryout.inc.php");
require_once("../../includes/functions_internal_user_dryout.inc.php");
$obj = new data();
$connect = $obj->funConnect();
$display = new display();
$display->logout_iu();
$id = $_REQUEST['id'];
if($id == 1){$url = 'User Manual_Seven Oceans Commercial_Chartering.pdf';}
if($id == 2){$url = 'User Manual_Seven Oceans Commercial_Operations.pdf';}
if($id == 3){$url = 'User Manual_Seven Oceans Commercial_F&A.pdf';}
$pagename = basename($_SERVER['PHP_SELF']);
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title><?php $display->title(); ?></title>
<?php $display->favicon(); ?>
<meta content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' name='viewport'>
<?php $display->css(); ?>
<?php $display->js(); ?>
<script src='https://cdnjs.cloudflare.com/ajax/libs/pdf.js/2.3.200/pdf.js'></script>
<link href="../../css/jquery.alerts.css" rel="stylesheet" type="text/css" />
<script src='../../js/jquery.autosize.js'></script>
<script language="JavaScript" type="text/javascript" src="../../js/jquery.alerts.js"></script>
<script src="../../js/timer.js" type="text/javascript"></script>

<script type="text/javascript">

</script>
<style>
.animated {
	vertical-align: top; 
	transition: height 0.2s;
	-webkit-transition: height 0.2s; 
	-moz-transition: height 0.2s; 
}

form.cmxform label.error, label.error {
	/* remove the next line when you have trouble in IE6 with labels in list */
	font-family:Verdana, Arial, Helvetica, sans-serif;
	font-size:10px;
	color: red;
	font-style:normal;
	font-weight:lighter;
	margin:5px;
	vertical-align:top;
}
.span span{
	font-weight:bold;
}
</style>
</head>
    <body class="skin-blue fixed">
        <!-- header logo: style can be found in header.less -->
        <?php $display->header_tag(); ?>
		<div class="wrapper row-offcanvas row-offcanvas-left">
            <?php $display->leftmenu(13); ?>
			<aside class="right-side">                
                <!-- Content Header (Page header) -->
                 <section class="content-header">
                    <h1>
                        <i class="fa fa-book"></i>&nbsp;User Guides&nbsp;&nbsp;&nbsp;&nbsp;<small><div class="headline text-center" id="time" style="color:#000; font-weight:bold; font-size:12px;">( 20 Jul 2015 4:40:44 PM )</div></small>
                    </h1>
                    <ol class="breadcrumb">
                        <li><a href="../"><i class="fa fa-home"></i> Home</a></li>
                        <li class="active">User Guides</li>
                    </ol>
                </section>
                <div align="right" style="margin-top:5px;margin-bottom:5px;margin-right:15px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="module_cbt.php"><button class="btn btn-info btn-flat">Back</button></a></div>
                <!-- Main content -->
                <section class="content">
                    <div class="row">
						<div class="col-xs-12" style="text-align:center;">
						<!--<iframe src="../../attachment/<?=$url;?>#toolbar=0&navpanes=0" id="fraDisabled" style="min-height:98vh; overflow:auto;pointer-events:none;" width="100%" ></iframe>  --> 
						<div id="pdf-viewer"></div>  
						</div><!-- /.col -->
					</div>   
				
				<!--   content ends here..................-->
                </section><!-- /.content -->
            </aside><!-- /.right-side -->
			
        </div><!-- ./wrapper -->
<?php $display->footer(); ?>

    </body>
</html>
<script>
window.onload = function() {
    document.addEventListener("contextmenu", function(e){
        e.preventDefault();
        if(event.keyCode == 123) {
        disableEvent(e);
    }
    }, false);
 function disableEvent(e) {
        if(e.stopPropagation) {
            e.stopPropagation();
        } else if(window.event) {
            window.event.cancelBubble = true;
        }
    }
}
$(document).contextmenu(function() { return false;});
url = "../../attachment/<?=$url;?>";
var thePdf = null;
var scale = 2;
pdfjsLib.getDocument(url).promise.then(function(pdf) {
          thePdf = pdf;
          viewer = document.getElementById('pdf-viewer');
          for(page = 1; page <= pdf.numPages; page++) {
            canvas = document.createElement("canvas");
            canvas.className = 'pdf-page-canvas';
            viewer.appendChild(canvas);
            renderPage(page, canvas);
          }
      });
      function renderPage(pageNumber, canvas) {
          thePdf.getPage(pageNumber).then(function(page) {
            viewport = page.getViewport(scale);
            canvas.height = viewport.height;
            canvas.width = viewport.width;
            page.render({canvasContext: canvas.getContext('2d'), viewport: viewport});
      });
      }
</script>