<?php 
	session_start();
	include('database.php');
	DB_connexion(); 
?>


<!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" xml:lang="fr" lang="fr" dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="Description" content="Site perso,cours,ouvrages" />
<meta name="Keywords" content="WEBSITE perso " />
<meta name="Distribution" content="Global" />
<meta name="Robots" content="" />
<meta http-equiv="Content-Language" content="fr" />
<meta name="rating" content="general" />
<meta name="author" content="Patrice DELPY" />
<meta name="copyright" content="Copyright 2013" />
<meta name="generator" content="Patoche" />
<title>Patoche WEBSITE - 2013 - Template du site - en cours de développemment ...</title>
<!---------------------------------------------------------->	
<?php
		include('include_css_template_commun.php');
		include('include_css.php');
		include('css_tools_skill.php');
		include('include_javascript.php');

?> 

<link href="http://code.jquery.com/ui/1.10.4/themes/ui-lightness/jquery-ui.css" rel="stylesheet">
<script src="http://code.jquery.com/jquery-1.10.2.js"></script>
<script src="http://code.jquery.com/ui/1.10.4/jquery-ui.js"></script>

<style type="text/css">

#box_message {		display: inline;
					 float: left;
					 width: 932px;
					 height: 70px;
					 background-color: #FFFFFF; /*#5566CC;*/
		     }


#box_diaporama {	display: inline;
				float: left;
				width: 932px;
				height: 550px;
				 background-color: #FFFFFF; /* #7766CC;*/
		     }
			 

	.slideshow {  
       width: 640px;  
       height: 480px;  
       margin: 3em auto;
       overflow: hidden;
       border: 3px solid #f2f2f2;
    }  
    .slideshow ul {  
       width: 400%;  
       height: 200px;
       padding:0; margin:0;
       list-style:none;
    }  
    .slideshow li { float: left; }
			 
			 
</style>

<script>

function call_update()
{
			scruter();
			setTimeout("call_update()", 1000); //appelle la fonction 1 fois par  seconde
}

function scruter()
{
			var xhr = getXhr()
			// On défini ce qu'on va faire quand on aura la réponse
			xhr.onreadystatechange = function()
			{
					// On ne fait quelque chose que si on a tout reçu et que le serveur est ok
					if(xhr.readyState == 4 && xhr.status == 200)
					{
						retour = xhr.responseText;
						
						if(retour == 0)
						{  	
		
							$(function()
							{
									$( "#message_expiration" ).dialog({
									modal: true,
									title: "Infos",
									buttons: {
												Ok: function()
												{
													$( this ).dialog( "close" );
													document.location.href = "logout_expire.php";
												}
											 }
										});
							});
						}
					}
			}
					
			xhr.open("GET","session_timeout.php",true);
			xhr.send(null);
}

function getXhr()
{
			var xhr = null; 
			if(window.XMLHttpRequest) // Firefox et autres
			   xhr = new XMLHttpRequest(); 
			else if(window.ActiveXObject)
			{ // Internet Explorer 
			   try 
			   {
					xhr = new ActiveXObject("Msxml2.XMLHTTP");
			   } 
			   catch (e) 
			   {
					xhr = new ActiveXObject("Microsoft.XMLHTTP");
			   }
			}
			else 
			{ 
				// XMLHttpRequest non supporté par le navigateur 
				alert("Votre navigateur ne supporte pas les objets XMLHTTPRequest..."); 
				xhr = false; 
			} 

			return xhr;
}

</script>


	<script type="text/javascript">
		$(function()
		{
			setInterval(function(){
				$(".slideshow ul").animate({marginLeft:-640},800,function(){
					$(this).css({marginLeft:0}).find("li:last").after($(this).find("li:first"));
				})
			}, 3500);
		});
</script>

<!---------------------------------------------------------->	
</head>

<body>
<!---------------------------------------------------------->	
	<div class="main"> <!-- main -->
<!---------------------------------------------------------->	

          <div class="header">
                <div class="balise_titre">Patoche</div>
                <div class="balise_citation">
                &quot;Etre conscient que l'on est ignorant est un grand pas vers le savoir&quot;
                </div>
          </div> 
 
          <div class="banniere"></div>  

<!---------------------------------------------------------->
<?php
/*	include("include_barre_login.php");
	echo '<div id="box_icon">';
	include("debug_connexion_membre.php");
	echo '</div>';
	include("include_menu.php");*/
	
	echo '<div id="box_infos">';
			include("include_menu.php");
			
			echo '<div id="box_icon2">';
			include("connexion_membre.php");
			echo	'</div>';
			
			echo '<div id="box_icon3">';
			include("include_barre_login.php");
			echo	'</div>';

	echo	'</div>';
	$_SESSION['page_active'] = basename (__FILE__ );
?>
		

<!---------------------------------------------------------->	
            <div class="contenu"> <!-- contenu -->
<!---------------------------------------------------------->	
           
	<div id = "box_message">		
		<h2 class="retrait">Bienvenue sur mon site.</h2>
	</div>
	
	<div id = "box_diaporama">
<!--	
	<ul class="slideshow"> 
				<li><img src="diaporama/img/galerie/transistor.jpg" alt="" title="Invention du transistor MOSFETS &copy; Patrice Delpy"></li>
				<li><img src="diaporama/img/galerie/wafer.jpg" alt="" title="Le premier aop &copy; Patrice Delpy"></li>
				<li><img src="diaporama/img/galerie/opamp.jpg" alt="" title="Le premier aop &copy; Patrice Delpy"></li>
				<li><img src="diaporama/img/galerie/circuit.jpg" alt="" title="Le premier circuit intÃ©grÃ© &copy; Patrice Delpy"></li>
				<li><img src="diaporama/img/galerie/4004.jpg" alt="" title="Le premier processeur Intel &copy; Patrice Delpy"></li>
	</ul> 
-->	
	<div class="slideshow">  
    	<ul>
    		<li><img src="diaporama/img/galerie/transistor.jpg" alt="" title="Invention du transistor MOSFETS &copy; Patrice Delpy"/></li>
    		<li><img src="diaporama/img/galerie/wafer.jpg" alt="" title="Le premier aop &copy; Patrice Delpy" /></li>
    		<li><img src="diaporama/img/galerie/opamp.jpg" alt="" title="Le premier aop &copy; Patrice Delpy" /></li>
    		<li><img src="diaporama/img/galerie/circuit.jpg" alt="" title="Le premier circuit intégré &copy; Patrice Delpy" /></li>
			<li><img src="diaporama/img/galerie/4004.jpg" alt="" title="Le premier processeur Intel &copy; Patrice Delpy" /></li>
    	</ul>  
	</div>
	
	
	</div>
	
	<br/>
	<br/>
	<br/>
	<br/>
	<br/>

	<div id="message_expiration" style="display: none">
	<p>
	<span class="ui-icon ui-icon-circle-check" style="float:left; margin:0 7px 50px 0;"></span>
	La session a expiré. Veuillez vous reconnecter.
	</p>
	</div>

<!---------------------------------------------------------->	
<?php			
    include('include_pied_page.php');
	include('include_publicite.php');
?>
<!---------------------------------------------------------->	
			</div>  <!-- contenu -->
<!---------------------------------------------------------->	
	</div>   <!-- main -->
<!---------------------------------------------------------->	
	<script type="text/javascript">
		call_update()
	</script>
</body>
</html>
