1) $numPage = $_SESSION["realisation"]['page']; else $numPage = 1; } $_SESSION["realisation"]['page'] = $numPage; $Nmax = 6; $rCount = mysql_query("SELECT COUNT(*) AS total FROM realisations WHERE afficher = '1'"); $vCount = mysql_fetch_assoc($rCount); $nbTotal = $vCount['total']; $nbPage = ceil($nbTotal/$Nmax); if($nbPage<1) $nbPage = 1; if($numPage>$nbPage) { $numPage = 1; $_SESSION["realisation"]['page'] = $numPage; } if($numPage == 0 || $numPage == '0') $numPage = 1; $Ndeb = ($numPage*$Nmax)-$Nmax; $rList = mysql_query("SELECT R.id, R.titre, R.texte, P.nom FROM realisations R LEFT OUTER JOIN realisations_photos P ON R.id = P.id AND P.ordre = '1' WHERE R.afficher = '1' GROUP BY R.id ORDER BY R.dateadd DESC, R.id DESC LIMIT ".$Ndeb.",".$Nmax); $nbList = mysql_num_rows($rList); $tab_real = array(); $tab_real_ligne = array(); $cpt = 0; $cpt_all = 0; $tabjava = ""; $tabhtml = array(); $tabtmp = array(); $nbph = 0; $cpt_ph = 0; if(!empty($nbList)) { while($vList = mysql_fetch_assoc($rList)) { $id = $vList['id']; $titre = $vList['titre']; $texte = $vList['texte']; $nomphoto = $vList['nom']; $tabtmp = array("id"=>$id, "titre"=>$titre, "texte"=>$texte, "nomphoto"=>$nomphoto); array_push($tab_real_ligne, $tabtmp); $cpt++; $cpt_all++; if($cpt == 3 || $cpt_all == $nbList) { array_push($tab_real, $tab_real_ligne); $tab_real_ligne = array(); $cpt = 0; } $rPhoto = mysql_query("SELECT nom FROM realisations_photos WHERE id = '".$id."' ORDER BY ordre ASC"); $nbPhoto = mysql_num_rows($rPhoto); if(!empty($nbPhoto)) { while($vPhoto = mysql_fetch_assoc($rPhoto)) { $nom = $vPhoto['nom']; $pathphotohtml_M = "images/realisations/m/".$nom; $pathphotohtml_XL = "images/realisations/xl/".$nom; if(file_exists($pathphotohtml_M) && file_exists($pathphotohtml_XL)) { $taille_XL = getimagesize($pathphotohtml_XL); $w_XL = $taille_XL[0]; $h_XL = $taille_XL[1]; if(!$w) $w = 0; if(!$h) $h = 0; if($cpt_ph == 0) { $tabtmp = array("num"=>$cpt_ph, "path"=>$pathphotohtml_L); $tabhtml[$id] = array(); array_push($tabhtml[$id],$tabtmp); $tabjava .= "diaporama_tabphoto_list[".$id."] = new Array();\n"; } $tabjava .= "diaporama_tabphoto_list[".$id."][".$cpt_ph."] = new Array(\"".$pathphotohtml_XL."\",\"".$nom."\",".$w_XL.",".$h_XL.");\n"; $cpt_ph++; } } $nbph = $cpt_ph; $tabjava .= "diaporama_nbphoto_list[".$id."] = ".$nbph."\n"; $nbph = $cpt_ph = 0; } } } ?> Arhictecte d'intérieur et extérieur sur la Rochelle (17), en Charente Maritime

NOS RÉALISATIONS

1) { ?>
$ligne) { ?>
$col) { if($key != 0) $style = 57; else $style = 0; $id = $col['id']; $titre = $col['titre']; $texte = $col['texte']; $nomphoto = $col['nomphoto']; if($nomphoto) $pathphoto = "images/realisations/m/".$nomphoto; ?>
Retrouvez bientôt nos réalisations