$cat = preg_replace("/[^a-zA-Z]/","",$url[1]) or $cat = "all";
$aff = preg_replace("/[^0-9]/","",$url[2]) or $aff = "0";
if ($aff!=0)
{
$aff=$aff*2;
$aff=$aff+1;
}
$count = $con->selectQuery("SELECT count(real_id) FROM realisation");
$count = ceil($count["real_id"]/2);
#libelle='site' and
$contenu = $con->assocQuery("
SELECT
real_nom,
real_url,
real_type_code,
real_date,
real_description,
staff_pseudo ,
real_preview
FROM societe,realisation,libelle_real,arealiser,staff
WHERE
societe_id=real_societe_id and
libelle_real_id = real_libelle_real_id and
real_id = areal_real_id and
staff_id = areal_staff_id
ORDER BY real_nom
") or print $con->error;
$nom = " ";
for($i=1;$i< count($contenu); $i++)
{
if ($contenu[$i][real_nom] == $contenu[$i-1][real_nom])
{
$contenu[$i-1][staff_pseudo] .= " & ".$contenu[$i][staff_pseudo];
unset($contenu[$i]);
}
}
$start = 0;
$compteur=0;
while($start<=count($contenu) && $compteur <2)
{
if (isset($contenu[$start]) and $start>=$aff)
{
echo "
- Client :
- ".$contenu[$start][real_nom]."
- Date :
- ".htmlentities($contenu[$start][real_date])."
- Réalisation :
- ".$contenu[$start][staff_pseudo]."
". text2html($contenu[$start][real_description])."
- Code :
- ".htmlentities($contenu[$start][real_type_code])."
Visiter le site
";
$compteur++;
}
$start++;
}
$start-=3;
$romain = array("I","II","III","IV","V","VI","VII","VIII","IX","X","XI","XII","XIII","XIV","XV",
"XVI","XVII","XVIII","XIX","XX","XXI","XXII","XXIII","XXIV","XXV");
echo "
";
if ($start>0)
{
echo "<<";
}
for ($i=0;$i<(count($contenu)/2)-1;$i++)
{
echo "$romain[$i] ";
}
if ($start<$count)
{
echo ">>";
}
echo "
";
?>