<!doctype html>
<html><head>
<meta charset="UTF-8">
<title>DEVIS</title>

	

	<link rel="stylesheet" href="textegencon.css" media="all" />
	<link href="https://fonts.googleapis.com/css?family=Noto+Sans" rel="stylesheet">
	<script src="/js/jquery-2.1.0.min.js"></script>
	<script src="js/jquery-ui.js"></script>
	<script src="js/jquery.ui.touch-punch.js"></script>
	<script src="/js/moment.js"></script>
	<script src="/js/jquery.redirect.js"></script>
	<script src="js/jquery.ui.touch-punch.js"></script>
	<!-- <script src="/js/swap.js"></script> -->
	
	</head>
<body onLoad="calculload()">


	<div class="gencont">
	
		<div id="logo" onclick="myFunction() "><img src= "logofac1.png" width="794"></div>	
		<div id="logo2" ><img src= "logofac3.png" width="487" height: "146"></div>
		<div id="logo3" ><img src= "logofac2.png" width="307" height: "26"></div>
	
	  <div id="company">
		<h2 class="name">Ypsoroof - Ipsotoit</h2>
        <h2 class="name2">135 rue montavaux, 7080, Frameries </h2>
        <h2 class="name2">065/793325. Entr.:BE0443870515</h2>
		  <h2 class="name2">Banque CPH IBAN:BBE75</h2>
		   <h2 class="name2">Compte: BE92 1262 1506 3723</h2>
      <!--  <div><a href="mailto:info@ypsoroof.com">info@ypsoroof.com</a></div> -->
      </div>
		 	
	
	

	 
        
		  <div id="client">
			
        <!--   <div class="to">CLIENT:</div> -->
            <h2 class="name"><?php echo $SOC ?></h2>
			<div class="address"><?php echo $TITRE.$NOM1 ?></div>
            <div class="address"><?php echo $NOM2 ?></div>
			<div class="address"><?php echo $NOM3 ?></div>
			<div class="address"><?php echo $NOM4?></div>
			<div class="address"><?php echo $NOM5?></div>
	
	
	
	
		
		   </div>
  </div>
				  
				  
						 
	<div style="clear:both"></div>
        
			 
			  <div id="invoice"><br>
         Modele N°<?php echo $NUM ?>
				 
          <div id="datestyle" class="date" style="border-bottom: 1px solid black; border-left: 4px  solid #EFD61E; max-width:300px" contenteditable="true" ><?php echo $DATE ?> </div>
		 
		</div>  
	<div style="clear:both"></div>
			
	
		
	<div style="clear:both"></div>

	
	
	
	
		<div id="mydiv">
  <div id="mydivheader">Outils</div>
  <p style="text-indent:0;">Memo</p>
  
	<div class='memo' contenteditable="true"><?php echo $MEMO ?> </div>
	<br>
<!--	<input type="checkbox" name="etat" value="4" ?php if ($ETATC==4) { print" checked "; }?> ></input> Brouillon<br>
	<input type="checkbox" name="efface">Efface la ligne au click<br> -->
	
	 
	
	
	 <button class="bld">B</button>
<button class="itl">I</button>
<button class="UpZ">+</button>	
<button class="SmZ">-</button>	
<button class="udr">S</button><br>
<button class="pst">Enregistrer</button><br>
<button class="swp">Centrer</button>
	<button class="gauche">Gauche</button><br>
	<button class="juste">Justifer</button>
	<br>
	<button class="indente">Indente</button>
	<button class="outdente">outdente</button>
	
	 <p style="text-indent:0;">---</p>
		<form action="index.html">
               <input class="form-control"  type="submit" value="HOME" />
	            </form>
	
</div>

	
	
	


	
	
	
<script>
			
 $( function() {
  	 $("#mydiv" ).draggable().css("position", "fixed");
	 
	 $("#mydiv").draggable()
  .click(function() {
    $(this).draggable({ disabled: false });
}).dblclick(function() {
    $(this).draggable({ disabled: true });
});
	 
	 
  } );
	</script>	
  
	
<script type="text/javascript">   
	
			
 var fontSize = 3;
	 
	
	$(".UpZ").on('click',function(){
	  if (fontSize < 7){
      fontSize++;
    document.execCommand("fontSize", false, fontSize);
  var a = $("#textarea").html();
		  }

});
			$(".SmZ").on('click',function(){
	//document.execCommand('fontSize', false,  '2')
		 if (fontSize > 1) {
      fontSize--;
    document.execCommand("fontSize", false, fontSize);
  var a = $("#textarea").html();
		 					}
});
$(".bld").on('click',function(){
	document.execCommand('bold');
	
  var a = $("#textarea").html();

});

$(".itl").on('click',function(){
	document.execCommand('italic');
  var a = $("#textarea").html();
	
});
	$(".udr").on('click',function(){
	document.execCommand('underline');
  var a = $("#textarea").html();
	
});
	$(".pst").on('click',function(){
//alert( $("p:last").html() );	
		$.redirect('testpostreconmod.php', {'dnum':<?php echo $NumeroIndexDevisP ?>,'didxcli':<?php echo $NumeroIdxClient ?>,'dremarque':$("div.rest").html() });
		
	
	});
	
	
	
	
	$(".swp").on('click',function(){
	document.execCommand('justifyCenter');
  var a = $("#textarea").html();	
	});
	
	$(".gauche").on('click',function(){
	document.execCommand('justifyLeft');
  var a = $("#textarea").html();	
	});
	$(".juste").on('click',function(){
	document.execCommand('justifyFull');
  var a = $("#textarea").html();	
	});

$(".indente").on('click',function(){
	document.execCommand("indent", true, null);
  var a = $("#textarea").html();	
	});
	$(".outdente").on('click',function(){
	document.execCommand("outdent", true, null);
  var a = $("#textarea").html();	
	});
	   
	   
							
	
	

	function myFunction() {
    var x = document.getElementById("mydiv");
    if (x.style.display === "none") {
        x.style.display = "block";
    } else {
        x.style.display = "none";
    }
}
	
	
	</script>
	



<script>
		
		//alert("ok");

		//$( "div.rest" ).html('?php echo $REMARQUE ?>') ;	
	
	</script>	

<div class="rest" contenteditable="true">
	
	<?php 
	$final=" ".$TITRE.$NOM1;
	$posclient = strpos($REMARQUE, $final);
										 
	if ($posclient > 0) {
	$REMARQUE=$REMARQUE;								 
	} else { $REMARQUE=str_replace('Le client',' Le client,'.$final,$REMARQUE);	} 
										 
	echo $REMARQUE ?> 
	
	
	
<br>
	
</div>


</body>		

</html>
