<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="keywords" content="">
    <meta name="description" content="">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="shortcut icon" type="image/png" href="favicon.png">
    
	<link rel="stylesheet" type="text/css" href="./css/bootstrap.min.css">
	<link rel="stylesheet" type="text/css" href="style.css">
	<link rel="stylesheet" type="text/css" href="./css/font-awesome.min.css">
	
    
	<script src="./js/jquery-2.1.0.min.js"></script>
	<script src="./js/bootstrap.min.js"></script>
	<script src="./js/blocs.min.js"></script>
	<script src="./js/lazysizes.min.js" defer></script>
    <title>Home</title>

    
<!-- Google Analytics -->
 
<!-- Google Analytics END -->
    <style>

		textarea {
  background: url(images/benice.png) center center no-repeat; /* This ruins default border */
  border: 1px solid #888; background-color:#FFF3F3;color:#DF3F3F;
}
	input {
   color:#DF3F3F;
}
	
	</style>
	
	<script type="text/javascript">
		
function calcTotal(txtBox, totBox)
{
    var totVal;
    try
    { 
    totVal = document.getElementById(totBox).value;
    if(totVal!= null && totVal!='')
     {
       document.getElementById(totBox).value= eval(parseInt(document.getElementById(totBox).value) + parseInt(txtBox.value));   
     }
     else
     {
        document.getElementById(totBox).value= txtBox.value;           
     }
    }
    catch(e)
    {}
}
</script>
	
</head>
<body>
<!-- Main container -->
<div class="page-container">
<!-- ScrollToTop Button -->
<a class="bloc-button btn btn-d scrollToTop" onclick="scrollToTarget('1')"><span class="fa fa-chevron-up"></span></a>
<!-- ScrollToTop Button END-->


<!-- Footer - bloc-0 -->
<div class="bloc bgc-white bg-highway d-bloc " id="bloc-0">
	<div class="container bloc-lg">
		<div class="row">	
			<div class="col-sm-10">
<h3 class="mg-md">
					Nouveau Devis
				</h3>
<form method="post" action="deviscreer.php" name="demande">

<?php
	
	
	// on se connecte à notre base

$servername = "localhost:8889";
$username = "test";
$password = "test";
$dbname = "Clients";

// Create connection
$conn = new mysqli($servername, $username, $password, $dbname);
// Check connection
if ($conn->connect_error) {
    die("Connection failed: " . $conn->connect_error);
} 

$sql = "SELECT * FROM data";
$sql = "SELECT * FROM Modele WHERE type=1";
					// $sql = "UPDATE\n". "  `data`\n"." SET\n". " societe = \'testoooyeahhh\'\n". "WHERE\n". " id = 3";
$result = $conn->query($sql);

if ($result->num_rows > 0) {
    // output data of each row
    while($row = $result->fetch_assoc()) {
		
$DES=$row["description"];
$PRIX=$row["prix"];
$UNITE=$row["unite"];
$SYMTOT=$PRIX*2;
//$QTE=$area3[];
	print "<input type='checkbox' value=$ii name='choix[]'>";
	print "<input type='hidden' value=".$cellb." name='choixtype[]'>";
	print "<textarea {background-color: yellow;} cols=80 rows=1 name='area1[]'>".$DES."</textarea>";
		
	print "<textarea cols=10 rows=1 name='area3[]'>15</textarea>";
	print "<textarea cols=20 rows=1 name='area2[]'>".$PRIX."</textarea>";
	print "<textarea cols=10 rows=1 name='area4[]'>".$UNITE."</textarea>";
		//$TOTRES[]=val($PRIX)*15;
	print "<textarea cols=10 rows=1 name='area4[]'>".$SYMTOT."</textarea>";
	//print $suite;
	//echo "<input type='text' onblur=".chr(39)."calcTotal(this,".chr(39).chr(39)."'tot'".")".chr(39) ."'/><br>" ;
	
	
		print "<br>";
        //echo "Soc: " . $row["societe"]. " - Nom: " . $row["nom1"]. " - idx: " . $row["id"]. " " . $row["nom2"]. "<br>";
		//echo "Soc: " . $row["societe"]. " - Nom: " . $row["nom1"]. "  " . $row["nom2"]. "<br>";
    } 
    
	
	} else {
    echo "0 results";
}

//$sql = "INSERT INTO data (societe,nom1,nom2,nom3,nom4,nom5,titre,ac1,ac2,o1,o2,o3,mail,tel,gsm,pub,jour)
//VALUES ('$SOC' , '$NOM1', '$NOM2', '$NOM3', '$NOM4', '$NOM5', '$TITRE', '$AC1', '$AC2', '$O1', '$O2', '$O3', '$MAIL', '$TEL', '$GSM', '$PUB', //'$today')";


$conn->close();
	
	
	
	
	

	print "<input type='hidden' name='FichierDuClient' value=".$nomfichierclient.">";
	print "<input class='form-control' type='submit' name='submit' value='Envoyer'>
	</form>";
?>
		

				

			</div>

				</div>
			</div>
			
		</div>
	</div>



 
</tr>    
</table> 
</body>
</html>
