<?php
session_start();
ob_start();
$user = $_SESSION["user_id"];
$contract_id = $_REQUEST['J'];
$carcheck ="";
if (!isset($_SESSION["user_id"])) {    header("location:../logout.php");}
include "../../actions/dbPDO.php";

    $myLic = $db->prepare('SELECT carcheck from contracts where contract_id = ? ');
							$myLic->bindParam(1,$contract_id);
							$myLic->execute();
        if($myLic->rowCount()>0){$row = $myLic->fetch(PDO::FETCH_ASSOC);
                $carcheck = $row["carcheck"];}
?>
<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <title>'طباعة التشييك'</title>
    <link rel="stylesheet" href="css/print.css">
  </head>
  <body onload ="javascript: window.print(); setTimeout(window.close, 2000);">
      <page size="S4">
        <div class="row">
        <img  src="<?php echo "../".$carcheck; ?>" alt="صورة التشييك غير متاحة"  >
        </div>
      </page>
  </body>
</html>
