<?php
/**
* MiniClick
* Gestionnaire de tableau collaboratif
* Copyright (C) 2006 Guillaume Monet <gm@ibreizh.net>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 
*
* @package miniclick
* @version 5.0.0
* @comment Not finished
*/
session_start();
?>
<html>
<head>
<STYLE type="text/css">
body {
	font-family: helvetica, sans-serif;
	font-size: 8pt;
}
</style>
<meta http-equiv="refresh" content="3">
</head>
<body>
<?
include("connection/connection.php");
mysql_connect ($host,$user,$pass);
$base = mysql_select_db($db);
if(!$base){
        die("Impossible de se connecter  la base");
}
$_SESSION['exten'] = "5602";
$appels = mysql_query("SELECT * FROM APPEL WHERE Appele='".$_SESSION['exten']."' ORDER BY Date DESC LIMIT 0,1");

while ($appel = mysql_fetch_object($appels)){
	echo "Dernier appel : <br>Appelant $appel->Appelant<br> Appele $appel->Appele<br> Date $appel->Date<br>";
	$calls = mysql_query("SELECT * FROM CA WHERE Client_Id='$appel->Appelant'");
	$call = mysql_fetch_object($calls);
	echo "Nom : $call->Nom <br>";
	echo "Societe : $call->Societe <br>";
}
?>
</body>
</html>