 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Print</title>
<?php
session_start();
include('includes/class.user.php');
$user = new User();
include('includes/class.lock.php');
include('includes/class.helper.php');
$helper = new Helper();
?>
<style type="text/css">
body {
	font-size:17px;
	font-family:Tahoma, Geneva, sans-serif;line-height:22px;
}
.print_button {
	color:#fff;
	background:#09F;
	padding:5px 15px;
	font-weight:bold;
	border:none;
}
.footertd {
	padding:5px;
	background:#000;
	color:#fff;
	width:300px;
}
</style>
</head>

<body style="direction:rtl;"><?php
if(isset($_REQUEST['submit'])){ 
$values = $_POST;
unset($values['submit']);
unset($values['mode']);
unset($values['_wysihtml5_mode']);
$message=$helper->insert("tbl_templates_assigned",$values,"","");
 ?>
  
                  <table border="0"  id="print" width="600px" style="margin-left:auto;margin-right:auto;">
                  <tr><td>
                  <table border="0" width="600px" cellpadding="0" cellspacing="0">
                  <tr><td align="center" colspan="2"><img src="images/logo.png"/>
                  </td></tr>
                   <tr><td colspan="2">
                    <p style="text-align:center;"><b><u><?php echo $_REQUEST['title'];?></u></b></p>
                   </td></tr>
                  <tr><td colspan="2">
                    <?php echo $_REQUEST['description'];?>
                  </td></tr>
                    </table>
                    </td></tr>
                    </table>
                  
          <p style="text-align:center;"><button class="print_button" onclick="javascript:printDiv('print')" />Print</button></p>
<script language="javascript" type="text/javascript">
        function printDiv(divID) {
            var divElements = document.getElementById(divID).innerHTML;
            var oldPage = document.body.innerHTML;
            document.body.innerHTML = 
              "<html><head><title></title></head><body>" + 
              divElements + "</body>";
            window.print();
            document.body.innerHTML = oldPage;
        }
    </script>
         
 <?php
	}
	?>
</body>
</html>