Old stuff/old_sites/ids/data/portfolio.php
(Deskargatu)
<div class="portfolio">
<h3>Our Works: Have a look</h3>
<div class="gauche">
<ol>
<li class="webdesign">Webdesign</li>
<li class="print">Print</li>
<li class="identity">Identity</li>
<li class="multimedia">Multimedia</li>
</ol>
</div>
<div>
<?
$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 "
<div class=\"element\">
<div class=\"image\">
<p><img src=\"".$base."preview/".$contenu[$start][real_preview]."\" alt=\"image\" /></p>
<p><a href=\"".$base."preview/".$contenu[$start][real_preview]."\">Voir</a></p>
</div>
<div class=\"desc\">
<dl>
<dt>Client : </dt><dd class=\"important\"><a href=\"".$contenu[$start][real_url]."\" title=\"".htmlentities($contenu[$start][nom])."\">".$contenu[$start][real_nom]."</a></dd>
<dt>Date : </dt><dd class=\"important\"> ".htmlentities($contenu[$start][real_date])."</dd>
<dt>Réalisation : </dt><dd> ".$contenu[$start][staff_pseudo]."</dd>
</dl>
". text2html($contenu[$start][real_description])."
<dl>
<dt class=\"important\">Code : </dt><dd> ".htmlentities($contenu[$start][real_type_code])."</dd>
</dl>
<p class=\"visit\"><a href=\"".$contenu[$start][real_url]."\" title=\"".htmlentities($contenu[$start][nom])."\">Visiter le site</a></p>
</div>
</div>
";
$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 "<p class=\"suite\">";
if ($start>0)
{
echo "<a href=\"".$burl."portfolio/q/".abs($start-3)."\"><<</a>";
}
for ($i=0;$i<(count($contenu)/2)-1;$i++)
{
echo "<a href=\"".$burl."portfolio/q/$i\">$romain[$i]</a> ";
}
if ($start<$count)
{
echo "<a href=\"".$burl."portfolio/q/".abs($start-1)."\">>></a>";
}
echo "</p>";
?>
</div>
</div>