par
billledouble » 06 sept. 2011, 15:07
Bonjour,
Merci pour votre feedback, ci-après le code dans son intégralité :
Merci d'avance pour vos suggestions.
Marc
1ère page
Code : Tout sélectionner
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
if (PHP_VERSION < 6) {
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
}
$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
}
// REQUETES
mysql_select_db($database_donatoo, $donatoo);
$query_r_lst_interventionthematics = "SELECT * FROM lst_interventionthematics";
$r_lst_interventionthematics = mysql_query($query_r_lst_interventionthematics, $donatoo) or die(mysql_error());
$row_r_lst_interventionthematics = mysql_fetch_assoc($r_lst_interventionthematics);
$totalRows_r_lst_interventionthematics = mysql_num_rows($r_lst_interventionthematics);
mysql_select_db($database_donatoo, $donatoo);
$query_r_lst_interventionareas = "SELECT * FROM lst_interventionareas";
$r_lst_interventionareas = mysql_query($query_r_lst_interventionareas, $donatoo) or die(mysql_error());
$row_r_lst_interventionareas = mysql_fetch_assoc($r_lst_interventionareas);
$totalRows_r_lst_interventionareas = mysql_num_rows($r_lst_interventionareas);
mysql_select_db($database_donatoo, $donatoo);
$query_r_lst_countries = "SELECT * FROM lst_countries ORDER BY id ASC";
$r_lst_countries = mysql_query($query_r_lst_countries, $donatoo) or die(mysql_error());
$row_r_lst_countries = mysql_fetch_assoc($r_lst_countries);
$totalRows_r_lst_countries = mysql_num_rows($r_lst_countries);
?>
<!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>Rechercher une source de financement</title>
<link href="searchcall.css" rel="stylesheet" type="text/css" title="forms" />
<link href="../../templates/donatoopublicfr/css/template.css" rel="stylesheet" type="text/css" title="forms" />
</head>
<body>
<div class="art-blockheader">
<div class="l"></div>
<div class="r"></div>
<h3 class="t">Chercher un cause à soutenir !</h3>
</div>
<div class="art-blockcontent-body"">
<form action="searchresults.php" method="get" name="search" id="search">
<table width="100%" border="1">
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td>Pays d'intervention</td>
<td> </td>
<td>
<select name="country" id="country">
<?php
do {
?>
<option value="<?php echo $row_r_lst_countries['id']?>"><?php echo $row_r_lst_countries['countryfr']?></option>
<?php
} while ($row_r_lst_countries = mysql_fetch_assoc($r_lst_countries));
$rows = mysql_num_rows($r_lst_countries);
if($rows > 0) {
mysql_data_seek($r_lst_countries, 0);
$row_r_lst_countries = mysql_fetch_assoc($r_lst_countries);
}
?>
</select>
</td>
<td> </td>
</tr>
<tr>
<td> </td>
<td>Thématique d'intervention</td>
<td> </td>
<td>
<select name="issues" id="issues">
<?php
do {
?>
<option value="<?php echo $row_r_lst_interventionthematics['id']?>"><?php echo $row_r_lst_interventionthematics['thematicfr']?></option>
<?php
} while ($row_r_lst_interventionthematics = mysql_fetch_assoc($r_lst_interventionthematics));
$rows = mysql_num_rows($r_lst_interventionthematics);
if($rows > 0) {
mysql_data_seek($r_lst_interventionthematics, 0);
$row_r_lst_interventionthematics = mysql_fetch_assoc($r_lst_interventionthematics);
}
?>
</select>
</td>
<td> </td>
</tr>
<tr>
<td> </td>
<td>Aire d'intervention</td>
<td> </td>
<td>
<select name="areas" id="areas">
<option value=""""></option>
<?php
do {
?>
<option value="<?php echo $row_r_lst_interventionareas['id']?>"><?php echo $row_r_lst_interventionareas['areafr']?></option>
<?php
} while ($row_r_lst_interventionareas = mysql_fetch_assoc($r_lst_interventionareas));
$rows = mysql_num_rows($r_lst_interventionareas);
if($rows > 0) {
mysql_data_seek($r_lst_interventionareas, 0);
$row_r_lst_interventionareas = mysql_fetch_assoc($r_lst_interventionareas);
}
?>
</select>
</td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td><input class="button" type="submit" name="submit" id="submit" value="Rechercher"></td>
<td> </td>
</tr>
</table>
</form>
</div>
</div>
</body>
</html>
<?php
mysql_free_result($r_lst_interventionthematics);
mysql_free_result($r_lst_interventionareas);
mysql_free_result($r_lst_countries);
?>
Seconde page
Code : Tout sélectionner
<?php
// VERIFIER QUE LES VARIABLES GET PASSENT BIEN
echo "<pre>";
print_r($_GET);
echo "</pre>";
?>
<?php
// DANS $WHERE ON INSERE LA CLAUSE WHERE DE LA REQUETE,
// CETTE CLAUSE DEPEND DES VARIABLES RENVOYEES PAR LE
// FORMULAIRE
$where = "";
// if(isset($_GET['TypeEnregistrement']) && $_GET['TypeEnregistrement']=='nounou')
// SI L'UTILISATEUR A SPECIFIE UN PAYS, ON CREE LA CLAUSE
// WHERE AVEC COUNTRY
$country = $_GET['country'];
if(isset($country) and $country != null)
$where = "WHERE country = $country";
// SI L'UTILISATEUR A SPECIFIE LA THEMATIQUE D'INTERVENTION, ON CREE LA CLAUSE
// WHERE AVEC ISSUES
$issues = $_GET['issues'];
if(isset($issues) and $issues != null and $where != "")
{
$where .= " AND issues = '$issues'";
}
// SI L'UTILISATEUR A SPECIFIE LA ZONE D'INTERVENTION, ON CREE LA CLAUSE
// WHERE AVEC AREAS
$areas = $_GET['areas'];
if(isset($areas) and $areas != null and $where != "")
{
$where .= " AND areas = '$areas'";
}
?>
<?php
echo $where;
?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
if (PHP_VERSION < 6) {
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
}
$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
}
mysql_select_db($database_donatoo, $donatoo);
$query_r_lst_callprog = "SELECT * FROM doo_call_prog $where";
$r_lst_callprog = mysql_query($query_r_lst_callprog, $donatoo) or die(mysql_error());
$row_r_lst_callprog = mysql_fetch_assoc($r_lst_callprog);
$totalRows_r_lst_callprog = mysql_num_rows($r_lst_callprog);
mysql_select_db($database_donatoo, $donatoo);
$query_r_lst_callaction = "SELECT doo_call_action $where";
$r_lst_callaction = mysql_query($query_r_lst_callaction, $donatoo) or die(mysql_error());
$row_r_lst_callaction = mysql_fetch_assoc($r_lst_callaction);
$totalRows_r_lst_callaction = mysql_num_rows($r_lst_callaction);
mysql_select_db($database_donatoo, $donatoo);
$query_r_lst_calloverhead = "SELECT doo_call_overhead $where";
$r_lst_calloverhead = mysql_query($query_r_lst_calloverhead, $donatoo) or die(mysql_error());
$row_r_lst_calloverhead = mysql_fetch_assoc($r_lst_calloverhead);
$totalRows_r_lst_calloverhead = mysql_num_rows($r_lst_calloverhead);
mysql_select_db($database_donatoo, $donatoo);
$query_r_lst_calltime = "SELECT doo_call_time $where";
$r_lst_calltime = mysql_query($query_r_lst_calltime, $donatoo) or die(mysql_error());
$row_r_lst_calltime = mysql_fetch_assoc($r_lst_calltime);
$totalRows_r_lst_calltime = mysql_num_rows($r_lst_calltime);
mysql_select_db($database_donatoo, $donatoo);
$query_r_lst_callcompetences = "SELECT doo_call_competences $where";
$r_lst_callcompetences = mysql_query($query_r_lst_callcompetences, $donatoo) or die(mysql_error());
$row_r_lst_callcompetences = mysql_fetch_assoc($r_lst_callcompetences);
$totalRows_r_lst_callcompetences = mysql_num_rows($r_lst_callcompetences);
mysql_select_db($database_donatoo, $donatoo);
$query_r_lst_callideas = "SELECT * FROM doo_call_ideas $where";
$r_lst_callideas = mysql_query($query_r_lst_ideas, $donatoo) or die(mysql_error());
$row_r_lst_callideas = mysql_fetch_assoc($r_lst_callideas);
$totalRows_r_lst_callideas = mysql_num_rows($r_lst_callideas);
?>
<!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>Chercher une cause à soutenir</title>
<link href="fds_assearch.css" rel="stylesheet" type="text/css" />
<script src="SpryAssets/SpryTabbedPanels.js" type="text/javascript"></script>
<link href="spryAssets/SpryTabbedPanels.css" rel="stylesheet" type="text/css" />
<link href="css/bd_if_search.css" rel="stylesheet" type="text/css" />
</head>
<body class="twoColFixLtHdr">
<div id="Results">
<div id="TabbedPanels1" class="TabbedPanels">
<ul class="TabbedPanelsTabGroup">
<li class="TabbedPanelsTab" tabindex="0" style="font-family:'Trebuchet MS'; font-size:11px">Projets
<?php
$resultat = mysql_num_rows($r_lst_callprog);
echo "[$resultat résultats\n]";
?>
</li>
<li class="TabbedPanelsTab" tabindex="0" style="font-family:'Trebuchet MS'; font-size:11px">Actions
<?php
$resultat = mysql_num_rows($r_lst_callaction);
echo "[$resultat résultats\n]";
?>
</li>
<li class="TabbedPanelsTab" tabindex="0" style="font-family:'Trebuchet MS'; font-size:11px">Frais de structure
<?php
$resultat = mysql_num_rows($r_lst_overhead);
echo "[$resultat résultats\n]";
?>
</li>
<li class="TabbedPanelsTab" tabindex="0" style="font-family:'Trebuchet MS'; font-size:11px">Temps
<?php
$resultat = mysql_num_rows($r_lst_calltime);
echo "[$resultat résultats\n]";
?>
</li>
<li class="TabbedPanelsTab" tabindex="0" style="font-family:'Trebuchet MS'; font-size:11px">Compétences
<?php
$resultat = mysql_num_rows($r_lst_callcompetences);
echo "[$resultat résultats\n]";
?>
</li>
<li class="TabbedPanelsTab" tabindex="0" style="font-family:'Trebuchet MS'; font-size:11px">Idées
<?php
$resultat = mysql_num_rows($r_lst_callideas);
echo "[$resultat résultats\n]";
?>
</li>
</ul>
<div class="TabbedPanelsContentGroup">
<div class="TabbedPanelsContent">
<table width="100%" border="0">
<tr class="res_title">
<td scope="row">Thématique</td>
<td>Aire d'intervention</td>
<td>Pays</td>
<td>Titre du projet</td>
<td>Date de début</td>
<td>Date de fin</td>
<td>x</td>
<td>x</td>
<td>x</td>
</tr>
<?php do { ?>
<form action="X" id="projet" name="projet" method="get">
<tr class="res_list">
<td scope="row">
<input name="id" type="hidden" id="id" value="<?php echo $row_r_lst_callprog['id']; ?>" />
<?php echo $row_r_lst_callprog['issues']; ?></td>
<td><?php echo $row_r_lst_callprog['areas']; ?></td>
<td><?php echo $row_r_lst_callprog['country']; ?></td>
<td><?php
$max_caracteres=50;
// On compte le nombre de lettre grace a strlen
if (strlen($row_r_lst_callprog['nameprog'])>$max_caracteres){
// On coupe la chaine de caractere a max_caracteres
$row_r_lst_callprog['nameprog'] = substr($row_r_lst_callprog['nameprog'], 0, $max_caracteres);
// On recupere la position du dernier espace
$position_espace = strrpos($row_r_lst_callprog['nameprog'], " ");
$row_r_lst_callprog['nameprog'] = substr($row_r_lst_callprog['nameprog'], 0, $position_espace);
// On affiche les ...
$row_r_lst_callprog['nameprog'] = $row_r_lst_callprog['nameprog']."...";
}
echo $row_r_lst_callprog['nameprog'];
?>
</td>
<td><?php echo $row_r_lst_callprog['datestartprog']; ?></td>
<td><?php echo $row_r_lst_callprog['dateendprog']; ?></td>
<td> </td>
<td> </td>
<td><input type="image" src="../../images/icones/Computer.png" width="15" height="15" name="submit" id="submit" value="fiche IF" /></td>
</tr>
</form>
<?php } while ($row_r_lst_callprog = mysql_fetch_assoc($r_lst_callprog)); ?>
</table>
</div>
<div class="TabbedPanelsContent">
<table width="100%" border="0">
<tr class="res_title">
<td scope="row">Thématique</td>
<td>Aire d'intervention</td>
<td>Pays</td>
<td>Titre du projet</td>
<td>Date de début</td>
<td>Date de fin</td>
<td>x</td>
<td>x</td>
<td>x</td>
</tr>
<?php do { ?>
<form action="X" id="action" name="action" method="get">
<tr class="res_list">
<td scope="row">
<input name="id" type="hidden" id="id" value="<?php echo $row_r_lst_callaction['id']; ?>" />
<?php echo $row_r_lst_callaction['issues']; ?></td>
<td><?php echo $row_r_lst_callaction['areas']; ?></td>
<td><?php echo $row_r_lst_callaction['country']; ?></td>
<td><?php
$max_caracteres=50;
// On compte le nombre de lettre grace a strlen
if (strlen($row_r_lst_callaction['nameaction'])>$max_caracteres){
// On coupe la chaine de caractere a max_caracteres
$row_r_lst_callaction['nameaction'] = substr($row_r_lst_callaction['nameaction'], 0, $max_caracteres);
// On recupere la position du dernier espace
$position_espace = strrpos($row_r_lst_callaction['nameaction'], " ");
$row_r_lst_callaction['nameaction'] = substr($row_r_lst_callaction['nameaction'], 0, $position_espace);
// On affiche les ...
$row_r_lst_callaction['nameaction'] = $row_r_lst_callaction['nameaction']."...";
}
echo $row_r_lst_callaction['nameaction'];
?>
</td>
<td><?php echo $row_r_lst_callaction['datestartaction']; ?></td>
<td><?php echo $row_r_lst_callaction['dateendaction']; ?></td>
<td> </td>
<td> </td>
<td><input type="image" src="../../images/icones/Computer.png" width="15" height="15" name="submit" id="submit" value="fiche IF" /></td>
</tr>
</form>
<?php } while ($row_r_lst_callaction = mysql_fetch_assoc($r_lst_callaction)); ?>
</table>
</div>
<div class="TabbedPanelsContent">
<table width="100%" border="0">
<tr class="res_title">
<td scope="row">X - Thématique</td>
<td>Aire d'intervention</td>
<td>Pays</td>
<td>Titre du projet</td>
<td>Date de début</td>
<td>Date de fin</td>
<td>x</td>
<td>x</td>
<td>x</td>
</tr>
<?php do { ?>
<form action="X" id="fraisstructure" name="fraisstructure" method="get">
<tr class="res_list">
<td scope="row"><input name="id" type="hidden" id="id" value="<?php echo $row_r_lst_calloverhead['id']; ?>" /></td>
<td><?php echo $row_r_lst_calloverhead['areas']; ?></td>
<td><?php echo $row_r_lst_calloverhead['country']; ?></td>
<td><?php
$max_caracteres=50;
// On compte le nombre de lettre grace a strlen
if (strlen($row_r_lst_calloverhead['nameoverhead'])>$max_caracteres){
// On coupe la chaine de caractere a max_caracteres
$row_r_lst_calloverhead['nameoverhead'] = substr($row_r_lst_calloverhead['nameoverhead'], 0, $max_caracteres);
// On recupere la position du dernier espace
$position_espace = strrpos($row_r_lst_calloverhead['nameoverhead'], " ");
$row_r_lst_calloverhead['nameoverhead'] = substr($row_r_lst_calloverhead['nameoverhead'], 0, $position_espace);
// On affiche les ...
$row_r_lst_calloverhead['nameoverhead'] = $row_r_lst_calloverhead['nameoverhead']."...";
}
echo $row_r_lst_calloverhead['nameoverhead'];
?>
</td>
<td><?php echo $row_r_lst_calloverhead['datestartoverhead']; ?></td>
<td><?php echo $row_r_lst_calloverhead['dateendoverhead']; ?></td>
<td> </td>
<td> </td>
<td><input type="image" src="../../images/icones/Computer.png" width="15" height="15" name="submit" id="submit" value="fiche IF" /></td>
</tr>
</form>
<?php } while ($row_r_lst_calloverhead = mysql_fetch_assoc($r_lst_calloverhead)); ?>
</table>
</div>
<div class="TabbedPanelsContent">
<table width="100%" border="0">
<tr class="res_title">
<td scope="row">X - Thématique</td>
<td>Aire d'intervention</td>
<td>Pays</td>
<td>Titre du projet</td>
<td>Date de début</td>
<td>Date de fin</td>
<td>x</td>
<td>x</td>
<td>x</td>
</tr>
<?php do { ?>
<form action="X" id="temps" name="temps" method="get">
<tr class="res_list">
<td scope="row"><input name="id" type="hidden" id="id" value="<?php echo $row_r_lst_calltime['id']; ?>" /></td>
<td><?php echo $row_r_lst_calltime['areas']; ?></td>
<td><?php echo $row_r_lst_calltime['country']; ?></td>
<td><?php
$max_caracteres=50;
// On compte le nombre de lettre grace a strlen
if (strlen($row_r_lst_calltime['calltitle'])>$max_caracteres){
// On coupe la chaine de caractere a max_caracteres
$row_r_lst_calltime['calltitle'] = substr($row_r_lst_calltime['calltitle'], 0, $max_caracteres);
// On recupere la position du dernier espace
$position_espace = strrpos($row_r_lst_calltime['calltitle'], " ");
$row_r_lst_calltime['calltitle'] = substr($row_r_lst_calltime['calltitle'], 0, $position_espace);
// On affiche les ...
$row_r_lst_calltime['calltitle'] = $row_r_lst_calltime['calltitle']."...";
}
echo $row_r_lst_calltime['calltitle'];
?>
</td>
<td><?php echo $row_r_lst_calltime['datestart']; ?></td>
<td><?php echo $row_r_lst_calltime['dateend']; ?></td>
<td> </td>
<td> </td>
<td><input type="image" src="../../images/icones/Computer.png" width="15" height="15" name="submit" id="submit" value="fiche IF" /></td>
</tr>
</form>
<?php } while ($row_r_lst_calltime = mysql_fetch_assoc($r_lst_calltime)); ?>
</table>
</div>
<div class="TabbedPanelsContent">
<table width="100%" border="0">
<tr class="res_title">
<td scope="row">X - Thématique</td>
<td>Aire d'intervention</td>
<td>Pays</td>
<td>Titre du projet</td>
<td>Date de début</td>
<td>Date de fin</td>
<td>x</td>
<td>x</td>
<td>x</td>
</tr>
<?php do { ?>
<form action="X" id="compétences" name="compétences" method="get">
<tr class="res_list">
<td scope="row"><input name="id" type="hidden" id="id" value="<?php echo $row_r_lst_callcompetences['id']; ?>" /></td>
<td><?php echo $row_r_lst_callcompetences['areas']; ?></td>
<td><?php echo $row_r_lst_callcompetences['country']; ?></td>
<td><?php
$max_caracteres=50;
// On compte le nombre de lettre grace a strlen
if (strlen($row_r_lst_callcompetences['calltitle'])>$max_caracteres){
// On coupe la chaine de caractere a max_caracteres
$row_r_lst_callcompetences['calltitle'] = substr($row_r_lst_callcompetences['calltitle'], 0, $max_caracteres);
// On recupere la position du dernier espace
$position_espace = strrpos($row_r_lst_callcompetences['calltitle'], " ");
$row_r_lst_callcompetences['calltitle'] = substr($row_r_lst_callcompetences['calltitle'], 0, $position_espace);
// On affiche les ...
$row_r_lst_callcompetences['calltitle'] = $row_r_lst_callcompetences['calltitle']."...";
}
echo $row_r_lst_callcompetences['calltitle'];
?>
</td>
<td><?php echo $row_r_lst_callcompetences['datestart']; ?></td>
<td><?php echo $row_r_lst_callcompetences['dateend']; ?></td>
<td> </td>
<td> </td>
<td><input type="image" src="../../images/icones/Computer.png" width="15" height="15" name="submit" id="submit" value="fiche IF" /></td>
</tr>
</form>
<?php } while ($row_r_lst_callcompetences = mysql_fetch_assoc($r_lst_callcompetences)); ?>
</table>
</div>
<div class="TabbedPanelsContent">
<table width="100%" border="0">
<tr class="res_title">
<td scope="row">X - Thématique</td>
<td>Aire d'intervention</td>
<td>Pays</td>
<td>Titre du projet</td>
<td>Date de début</td>
<td>Date de fin</td>
<td>x</td>
<td>x</td>
<td>x</td>
</tr>
<?php do { ?>
<form action="X" id="compétences" name="compétences" method="get">
<tr class="res_list">
<td scope="row"><input name="id" type="hidden" id="id" value="<?php echo $row_r_lst_callidas['id']; ?>" /></td>
<td><?php echo $row_r_lst_callidas['areas']; ?></td>
<td><?php echo $row_r_lst_callidas['country']; ?></td>
<td><?php
$max_caracteres=50;
// On compte le nombre de lettre grace a strlen
if (strlen($row_r_lst_callidas['calltitle'])>$max_caracteres){
// On coupe la chaine de caractere a max_caracteres
$row_r_lst_callidas['calltitle'] = substr($row_r_lst_callidas['calltitle'], 0, $max_caracteres);
// On recupere la position du dernier espace
$position_espace = strrpos($row_r_lst_callidas['calltitle'], " ");
$row_r_lst_callidas['calltitle'] = substr($row_r_lst_callidas['calltitle'], 0, $position_espace);
// On affiche les ...
$row_r_lst_callidas['calltitle'] = $row_r_lst_callidas['calltitle']."...";
}
echo $row_r_lst_callidas['calltitle'];
?>
</td>
<td><?php echo $row_r_lst_callidas['datestart']; ?></td>
<td><?php echo $row_r_lst_callidas['dateend']; ?></td>
<td> </td>
<td> </td>
<td><input type="image" src="../../images/icones/Computer.png" width="15" height="15" name="submit" id="submit" value="fiche IF" /></td>
</tr>
</form>
<?php } while ($row_r_lst_callidas = mysql_fetch_assoc($r_lst_callidas)); ?>
</table>
</div>
</div>
</div>
<script type="text/javascript">
<!--
var TabbedPanels1 = new Spry.Widget.TabbedPanels("TabbedPanels1");
//-->
</script>
</body>
</html>
<?php
mysql_free_result($r_lst_callprog);
mysql_free_result($r_lst_callaction);
mysql_free_result($r_lst_calloverhead);
mysql_free_result($r_lst_calltime);
mysql_free_result($r_lst_callcompetences);
mysql_free_result($r_lst_callideas);
?>
Bonjour,
Merci pour votre feedback, ci-après le code dans son intégralité :
Merci d'avance pour vos suggestions.
Marc
1ère page
[code]
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
if (PHP_VERSION < 6) {
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
}
$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
}
// REQUETES
mysql_select_db($database_donatoo, $donatoo);
$query_r_lst_interventionthematics = "SELECT * FROM lst_interventionthematics";
$r_lst_interventionthematics = mysql_query($query_r_lst_interventionthematics, $donatoo) or die(mysql_error());
$row_r_lst_interventionthematics = mysql_fetch_assoc($r_lst_interventionthematics);
$totalRows_r_lst_interventionthematics = mysql_num_rows($r_lst_interventionthematics);
mysql_select_db($database_donatoo, $donatoo);
$query_r_lst_interventionareas = "SELECT * FROM lst_interventionareas";
$r_lst_interventionareas = mysql_query($query_r_lst_interventionareas, $donatoo) or die(mysql_error());
$row_r_lst_interventionareas = mysql_fetch_assoc($r_lst_interventionareas);
$totalRows_r_lst_interventionareas = mysql_num_rows($r_lst_interventionareas);
mysql_select_db($database_donatoo, $donatoo);
$query_r_lst_countries = "SELECT * FROM lst_countries ORDER BY id ASC";
$r_lst_countries = mysql_query($query_r_lst_countries, $donatoo) or die(mysql_error());
$row_r_lst_countries = mysql_fetch_assoc($r_lst_countries);
$totalRows_r_lst_countries = mysql_num_rows($r_lst_countries);
?>
<!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>Rechercher une source de financement</title>
<link href="searchcall.css" rel="stylesheet" type="text/css" title="forms" />
<link href="../../templates/donatoopublicfr/css/template.css" rel="stylesheet" type="text/css" title="forms" />
</head>
<body>
<div class="art-blockheader">
<div class="l"></div>
<div class="r"></div>
<h3 class="t">Chercher un cause à soutenir !</h3>
</div>
<div class="art-blockcontent-body"">
<form action="searchresults.php" method="get" name="search" id="search">
<table width="100%" border="1">
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td>Pays d'intervention</td>
<td> </td>
<td>
<select name="country" id="country">
<?php
do {
?>
<option value="<?php echo $row_r_lst_countries['id']?>"><?php echo $row_r_lst_countries['countryfr']?></option>
<?php
} while ($row_r_lst_countries = mysql_fetch_assoc($r_lst_countries));
$rows = mysql_num_rows($r_lst_countries);
if($rows > 0) {
mysql_data_seek($r_lst_countries, 0);
$row_r_lst_countries = mysql_fetch_assoc($r_lst_countries);
}
?>
</select>
</td>
<td> </td>
</tr>
<tr>
<td> </td>
<td>Thématique d'intervention</td>
<td> </td>
<td>
<select name="issues" id="issues">
<?php
do {
?>
<option value="<?php echo $row_r_lst_interventionthematics['id']?>"><?php echo $row_r_lst_interventionthematics['thematicfr']?></option>
<?php
} while ($row_r_lst_interventionthematics = mysql_fetch_assoc($r_lst_interventionthematics));
$rows = mysql_num_rows($r_lst_interventionthematics);
if($rows > 0) {
mysql_data_seek($r_lst_interventionthematics, 0);
$row_r_lst_interventionthematics = mysql_fetch_assoc($r_lst_interventionthematics);
}
?>
</select>
</td>
<td> </td>
</tr>
<tr>
<td> </td>
<td>Aire d'intervention</td>
<td> </td>
<td>
<select name="areas" id="areas">
<option value=""""></option>
<?php
do {
?>
<option value="<?php echo $row_r_lst_interventionareas['id']?>"><?php echo $row_r_lst_interventionareas['areafr']?></option>
<?php
} while ($row_r_lst_interventionareas = mysql_fetch_assoc($r_lst_interventionareas));
$rows = mysql_num_rows($r_lst_interventionareas);
if($rows > 0) {
mysql_data_seek($r_lst_interventionareas, 0);
$row_r_lst_interventionareas = mysql_fetch_assoc($r_lst_interventionareas);
}
?>
</select>
</td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td><input class="button" type="submit" name="submit" id="submit" value="Rechercher"></td>
<td> </td>
</tr>
</table>
</form>
</div>
</div>
</body>
</html>
<?php
mysql_free_result($r_lst_interventionthematics);
mysql_free_result($r_lst_interventionareas);
mysql_free_result($r_lst_countries);
?>
[/code]
Seconde page
[code]
<?php
// VERIFIER QUE LES VARIABLES GET PASSENT BIEN
echo "<pre>";
print_r($_GET);
echo "</pre>";
?>
<?php
// DANS $WHERE ON INSERE LA CLAUSE WHERE DE LA REQUETE,
// CETTE CLAUSE DEPEND DES VARIABLES RENVOYEES PAR LE
// FORMULAIRE
$where = "";
// if(isset($_GET['TypeEnregistrement']) && $_GET['TypeEnregistrement']=='nounou')
// SI L'UTILISATEUR A SPECIFIE UN PAYS, ON CREE LA CLAUSE
// WHERE AVEC COUNTRY
$country = $_GET['country'];
if(isset($country) and $country != null)
$where = "WHERE country = $country";
// SI L'UTILISATEUR A SPECIFIE LA THEMATIQUE D'INTERVENTION, ON CREE LA CLAUSE
// WHERE AVEC ISSUES
$issues = $_GET['issues'];
if(isset($issues) and $issues != null and $where != "")
{
$where .= " AND issues = '$issues'";
}
// SI L'UTILISATEUR A SPECIFIE LA ZONE D'INTERVENTION, ON CREE LA CLAUSE
// WHERE AVEC AREAS
$areas = $_GET['areas'];
if(isset($areas) and $areas != null and $where != "")
{
$where .= " AND areas = '$areas'";
}
?>
<?php
echo $where;
?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
if (PHP_VERSION < 6) {
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
}
$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
}
mysql_select_db($database_donatoo, $donatoo);
$query_r_lst_callprog = "SELECT * FROM doo_call_prog $where";
$r_lst_callprog = mysql_query($query_r_lst_callprog, $donatoo) or die(mysql_error());
$row_r_lst_callprog = mysql_fetch_assoc($r_lst_callprog);
$totalRows_r_lst_callprog = mysql_num_rows($r_lst_callprog);
mysql_select_db($database_donatoo, $donatoo);
$query_r_lst_callaction = "SELECT doo_call_action $where";
$r_lst_callaction = mysql_query($query_r_lst_callaction, $donatoo) or die(mysql_error());
$row_r_lst_callaction = mysql_fetch_assoc($r_lst_callaction);
$totalRows_r_lst_callaction = mysql_num_rows($r_lst_callaction);
mysql_select_db($database_donatoo, $donatoo);
$query_r_lst_calloverhead = "SELECT doo_call_overhead $where";
$r_lst_calloverhead = mysql_query($query_r_lst_calloverhead, $donatoo) or die(mysql_error());
$row_r_lst_calloverhead = mysql_fetch_assoc($r_lst_calloverhead);
$totalRows_r_lst_calloverhead = mysql_num_rows($r_lst_calloverhead);
mysql_select_db($database_donatoo, $donatoo);
$query_r_lst_calltime = "SELECT doo_call_time $where";
$r_lst_calltime = mysql_query($query_r_lst_calltime, $donatoo) or die(mysql_error());
$row_r_lst_calltime = mysql_fetch_assoc($r_lst_calltime);
$totalRows_r_lst_calltime = mysql_num_rows($r_lst_calltime);
mysql_select_db($database_donatoo, $donatoo);
$query_r_lst_callcompetences = "SELECT doo_call_competences $where";
$r_lst_callcompetences = mysql_query($query_r_lst_callcompetences, $donatoo) or die(mysql_error());
$row_r_lst_callcompetences = mysql_fetch_assoc($r_lst_callcompetences);
$totalRows_r_lst_callcompetences = mysql_num_rows($r_lst_callcompetences);
mysql_select_db($database_donatoo, $donatoo);
$query_r_lst_callideas = "SELECT * FROM doo_call_ideas $where";
$r_lst_callideas = mysql_query($query_r_lst_ideas, $donatoo) or die(mysql_error());
$row_r_lst_callideas = mysql_fetch_assoc($r_lst_callideas);
$totalRows_r_lst_callideas = mysql_num_rows($r_lst_callideas);
?>
<!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>Chercher une cause à soutenir</title>
<link href="fds_assearch.css" rel="stylesheet" type="text/css" />
<script src="SpryAssets/SpryTabbedPanels.js" type="text/javascript"></script>
<link href="spryAssets/SpryTabbedPanels.css" rel="stylesheet" type="text/css" />
<link href="css/bd_if_search.css" rel="stylesheet" type="text/css" />
</head>
<body class="twoColFixLtHdr">
<div id="Results">
<div id="TabbedPanels1" class="TabbedPanels">
<ul class="TabbedPanelsTabGroup">
<li class="TabbedPanelsTab" tabindex="0" style="font-family:'Trebuchet MS'; font-size:11px">Projets
<?php
$resultat = mysql_num_rows($r_lst_callprog);
echo "[$resultat résultats\n]";
?>
</li>
<li class="TabbedPanelsTab" tabindex="0" style="font-family:'Trebuchet MS'; font-size:11px">Actions
<?php
$resultat = mysql_num_rows($r_lst_callaction);
echo "[$resultat résultats\n]";
?>
</li>
<li class="TabbedPanelsTab" tabindex="0" style="font-family:'Trebuchet MS'; font-size:11px">Frais de structure
<?php
$resultat = mysql_num_rows($r_lst_overhead);
echo "[$resultat résultats\n]";
?>
</li>
<li class="TabbedPanelsTab" tabindex="0" style="font-family:'Trebuchet MS'; font-size:11px">Temps
<?php
$resultat = mysql_num_rows($r_lst_calltime);
echo "[$resultat résultats\n]";
?>
</li>
<li class="TabbedPanelsTab" tabindex="0" style="font-family:'Trebuchet MS'; font-size:11px">Compétences
<?php
$resultat = mysql_num_rows($r_lst_callcompetences);
echo "[$resultat résultats\n]";
?>
</li>
<li class="TabbedPanelsTab" tabindex="0" style="font-family:'Trebuchet MS'; font-size:11px">Idées
<?php
$resultat = mysql_num_rows($r_lst_callideas);
echo "[$resultat résultats\n]";
?>
</li>
</ul>
<div class="TabbedPanelsContentGroup">
<div class="TabbedPanelsContent">
<table width="100%" border="0">
<tr class="res_title">
<td scope="row">Thématique</td>
<td>Aire d'intervention</td>
<td>Pays</td>
<td>Titre du projet</td>
<td>Date de début</td>
<td>Date de fin</td>
<td>x</td>
<td>x</td>
<td>x</td>
</tr>
<?php do { ?>
<form action="X" id="projet" name="projet" method="get">
<tr class="res_list">
<td scope="row">
<input name="id" type="hidden" id="id" value="<?php echo $row_r_lst_callprog['id']; ?>" />
<?php echo $row_r_lst_callprog['issues']; ?></td>
<td><?php echo $row_r_lst_callprog['areas']; ?></td>
<td><?php echo $row_r_lst_callprog['country']; ?></td>
<td><?php
$max_caracteres=50;
// On compte le nombre de lettre grace a strlen
if (strlen($row_r_lst_callprog['nameprog'])>$max_caracteres){
// On coupe la chaine de caractere a max_caracteres
$row_r_lst_callprog['nameprog'] = substr($row_r_lst_callprog['nameprog'], 0, $max_caracteres);
// On recupere la position du dernier espace
$position_espace = strrpos($row_r_lst_callprog['nameprog'], " ");
$row_r_lst_callprog['nameprog'] = substr($row_r_lst_callprog['nameprog'], 0, $position_espace);
// On affiche les ...
$row_r_lst_callprog['nameprog'] = $row_r_lst_callprog['nameprog']."...";
}
echo $row_r_lst_callprog['nameprog'];
?>
</td>
<td><?php echo $row_r_lst_callprog['datestartprog']; ?></td>
<td><?php echo $row_r_lst_callprog['dateendprog']; ?></td>
<td> </td>
<td> </td>
<td><input type="image" src="../../images/icones/Computer.png" width="15" height="15" name="submit" id="submit" value="fiche IF" /></td>
</tr>
</form>
<?php } while ($row_r_lst_callprog = mysql_fetch_assoc($r_lst_callprog)); ?>
</table>
</div>
<div class="TabbedPanelsContent">
<table width="100%" border="0">
<tr class="res_title">
<td scope="row">Thématique</td>
<td>Aire d'intervention</td>
<td>Pays</td>
<td>Titre du projet</td>
<td>Date de début</td>
<td>Date de fin</td>
<td>x</td>
<td>x</td>
<td>x</td>
</tr>
<?php do { ?>
<form action="X" id="action" name="action" method="get">
<tr class="res_list">
<td scope="row">
<input name="id" type="hidden" id="id" value="<?php echo $row_r_lst_callaction['id']; ?>" />
<?php echo $row_r_lst_callaction['issues']; ?></td>
<td><?php echo $row_r_lst_callaction['areas']; ?></td>
<td><?php echo $row_r_lst_callaction['country']; ?></td>
<td><?php
$max_caracteres=50;
// On compte le nombre de lettre grace a strlen
if (strlen($row_r_lst_callaction['nameaction'])>$max_caracteres){
// On coupe la chaine de caractere a max_caracteres
$row_r_lst_callaction['nameaction'] = substr($row_r_lst_callaction['nameaction'], 0, $max_caracteres);
// On recupere la position du dernier espace
$position_espace = strrpos($row_r_lst_callaction['nameaction'], " ");
$row_r_lst_callaction['nameaction'] = substr($row_r_lst_callaction['nameaction'], 0, $position_espace);
// On affiche les ...
$row_r_lst_callaction['nameaction'] = $row_r_lst_callaction['nameaction']."...";
}
echo $row_r_lst_callaction['nameaction'];
?>
</td>
<td><?php echo $row_r_lst_callaction['datestartaction']; ?></td>
<td><?php echo $row_r_lst_callaction['dateendaction']; ?></td>
<td> </td>
<td> </td>
<td><input type="image" src="../../images/icones/Computer.png" width="15" height="15" name="submit" id="submit" value="fiche IF" /></td>
</tr>
</form>
<?php } while ($row_r_lst_callaction = mysql_fetch_assoc($r_lst_callaction)); ?>
</table>
</div>
<div class="TabbedPanelsContent">
<table width="100%" border="0">
<tr class="res_title">
<td scope="row">X - Thématique</td>
<td>Aire d'intervention</td>
<td>Pays</td>
<td>Titre du projet</td>
<td>Date de début</td>
<td>Date de fin</td>
<td>x</td>
<td>x</td>
<td>x</td>
</tr>
<?php do { ?>
<form action="X" id="fraisstructure" name="fraisstructure" method="get">
<tr class="res_list">
<td scope="row"><input name="id" type="hidden" id="id" value="<?php echo $row_r_lst_calloverhead['id']; ?>" /></td>
<td><?php echo $row_r_lst_calloverhead['areas']; ?></td>
<td><?php echo $row_r_lst_calloverhead['country']; ?></td>
<td><?php
$max_caracteres=50;
// On compte le nombre de lettre grace a strlen
if (strlen($row_r_lst_calloverhead['nameoverhead'])>$max_caracteres){
// On coupe la chaine de caractere a max_caracteres
$row_r_lst_calloverhead['nameoverhead'] = substr($row_r_lst_calloverhead['nameoverhead'], 0, $max_caracteres);
// On recupere la position du dernier espace
$position_espace = strrpos($row_r_lst_calloverhead['nameoverhead'], " ");
$row_r_lst_calloverhead['nameoverhead'] = substr($row_r_lst_calloverhead['nameoverhead'], 0, $position_espace);
// On affiche les ...
$row_r_lst_calloverhead['nameoverhead'] = $row_r_lst_calloverhead['nameoverhead']."...";
}
echo $row_r_lst_calloverhead['nameoverhead'];
?>
</td>
<td><?php echo $row_r_lst_calloverhead['datestartoverhead']; ?></td>
<td><?php echo $row_r_lst_calloverhead['dateendoverhead']; ?></td>
<td> </td>
<td> </td>
<td><input type="image" src="../../images/icones/Computer.png" width="15" height="15" name="submit" id="submit" value="fiche IF" /></td>
</tr>
</form>
<?php } while ($row_r_lst_calloverhead = mysql_fetch_assoc($r_lst_calloverhead)); ?>
</table>
</div>
<div class="TabbedPanelsContent">
<table width="100%" border="0">
<tr class="res_title">
<td scope="row">X - Thématique</td>
<td>Aire d'intervention</td>
<td>Pays</td>
<td>Titre du projet</td>
<td>Date de début</td>
<td>Date de fin</td>
<td>x</td>
<td>x</td>
<td>x</td>
</tr>
<?php do { ?>
<form action="X" id="temps" name="temps" method="get">
<tr class="res_list">
<td scope="row"><input name="id" type="hidden" id="id" value="<?php echo $row_r_lst_calltime['id']; ?>" /></td>
<td><?php echo $row_r_lst_calltime['areas']; ?></td>
<td><?php echo $row_r_lst_calltime['country']; ?></td>
<td><?php
$max_caracteres=50;
// On compte le nombre de lettre grace a strlen
if (strlen($row_r_lst_calltime['calltitle'])>$max_caracteres){
// On coupe la chaine de caractere a max_caracteres
$row_r_lst_calltime['calltitle'] = substr($row_r_lst_calltime['calltitle'], 0, $max_caracteres);
// On recupere la position du dernier espace
$position_espace = strrpos($row_r_lst_calltime['calltitle'], " ");
$row_r_lst_calltime['calltitle'] = substr($row_r_lst_calltime['calltitle'], 0, $position_espace);
// On affiche les ...
$row_r_lst_calltime['calltitle'] = $row_r_lst_calltime['calltitle']."...";
}
echo $row_r_lst_calltime['calltitle'];
?>
</td>
<td><?php echo $row_r_lst_calltime['datestart']; ?></td>
<td><?php echo $row_r_lst_calltime['dateend']; ?></td>
<td> </td>
<td> </td>
<td><input type="image" src="../../images/icones/Computer.png" width="15" height="15" name="submit" id="submit" value="fiche IF" /></td>
</tr>
</form>
<?php } while ($row_r_lst_calltime = mysql_fetch_assoc($r_lst_calltime)); ?>
</table>
</div>
<div class="TabbedPanelsContent">
<table width="100%" border="0">
<tr class="res_title">
<td scope="row">X - Thématique</td>
<td>Aire d'intervention</td>
<td>Pays</td>
<td>Titre du projet</td>
<td>Date de début</td>
<td>Date de fin</td>
<td>x</td>
<td>x</td>
<td>x</td>
</tr>
<?php do { ?>
<form action="X" id="compétences" name="compétences" method="get">
<tr class="res_list">
<td scope="row"><input name="id" type="hidden" id="id" value="<?php echo $row_r_lst_callcompetences['id']; ?>" /></td>
<td><?php echo $row_r_lst_callcompetences['areas']; ?></td>
<td><?php echo $row_r_lst_callcompetences['country']; ?></td>
<td><?php
$max_caracteres=50;
// On compte le nombre de lettre grace a strlen
if (strlen($row_r_lst_callcompetences['calltitle'])>$max_caracteres){
// On coupe la chaine de caractere a max_caracteres
$row_r_lst_callcompetences['calltitle'] = substr($row_r_lst_callcompetences['calltitle'], 0, $max_caracteres);
// On recupere la position du dernier espace
$position_espace = strrpos($row_r_lst_callcompetences['calltitle'], " ");
$row_r_lst_callcompetences['calltitle'] = substr($row_r_lst_callcompetences['calltitle'], 0, $position_espace);
// On affiche les ...
$row_r_lst_callcompetences['calltitle'] = $row_r_lst_callcompetences['calltitle']."...";
}
echo $row_r_lst_callcompetences['calltitle'];
?>
</td>
<td><?php echo $row_r_lst_callcompetences['datestart']; ?></td>
<td><?php echo $row_r_lst_callcompetences['dateend']; ?></td>
<td> </td>
<td> </td>
<td><input type="image" src="../../images/icones/Computer.png" width="15" height="15" name="submit" id="submit" value="fiche IF" /></td>
</tr>
</form>
<?php } while ($row_r_lst_callcompetences = mysql_fetch_assoc($r_lst_callcompetences)); ?>
</table>
</div>
<div class="TabbedPanelsContent">
<table width="100%" border="0">
<tr class="res_title">
<td scope="row">X - Thématique</td>
<td>Aire d'intervention</td>
<td>Pays</td>
<td>Titre du projet</td>
<td>Date de début</td>
<td>Date de fin</td>
<td>x</td>
<td>x</td>
<td>x</td>
</tr>
<?php do { ?>
<form action="X" id="compétences" name="compétences" method="get">
<tr class="res_list">
<td scope="row"><input name="id" type="hidden" id="id" value="<?php echo $row_r_lst_callidas['id']; ?>" /></td>
<td><?php echo $row_r_lst_callidas['areas']; ?></td>
<td><?php echo $row_r_lst_callidas['country']; ?></td>
<td><?php
$max_caracteres=50;
// On compte le nombre de lettre grace a strlen
if (strlen($row_r_lst_callidas['calltitle'])>$max_caracteres){
// On coupe la chaine de caractere a max_caracteres
$row_r_lst_callidas['calltitle'] = substr($row_r_lst_callidas['calltitle'], 0, $max_caracteres);
// On recupere la position du dernier espace
$position_espace = strrpos($row_r_lst_callidas['calltitle'], " ");
$row_r_lst_callidas['calltitle'] = substr($row_r_lst_callidas['calltitle'], 0, $position_espace);
// On affiche les ...
$row_r_lst_callidas['calltitle'] = $row_r_lst_callidas['calltitle']."...";
}
echo $row_r_lst_callidas['calltitle'];
?>
</td>
<td><?php echo $row_r_lst_callidas['datestart']; ?></td>
<td><?php echo $row_r_lst_callidas['dateend']; ?></td>
<td> </td>
<td> </td>
<td><input type="image" src="../../images/icones/Computer.png" width="15" height="15" name="submit" id="submit" value="fiche IF" /></td>
</tr>
</form>
<?php } while ($row_r_lst_callidas = mysql_fetch_assoc($r_lst_callidas)); ?>
</table>
</div>
</div>
</div>
<script type="text/javascript">
<!--
var TabbedPanels1 = new Spry.Widget.TabbedPanels("TabbedPanels1");
//-->
</script>
</body>
</html>
<?php
mysql_free_result($r_lst_callprog);
mysql_free_result($r_lst_callaction);
mysql_free_result($r_lst_calloverhead);
mysql_free_result($r_lst_calltime);
mysql_free_result($r_lst_callcompetences);
mysql_free_result($r_lst_callideas);
?>
[/code]