load_file($template_filename, "main"); include ("../content/header.php"); $fldref_produit = get_param('ref_produit'); switch($fldref_produit){ case 2: $tplheader->set_var("activ_btn_0",""); $tplheader->set_var("activ_btn_1",""); $tplheader->set_var("activ_btn_2","0"); $tplheader->set_var("activ_btn_3",""); $tplheader->set_var("activ_btn_4",""); break; case 3: $tplheader->set_var("activ_btn_0",""); $tplheader->set_var("activ_btn_1",""); $tplheader->set_var("activ_btn_2",""); $tplheader->set_var("activ_btn_3","0"); $tplheader->set_var("activ_btn_4",""); break; default: $tplheader->set_var("activ_btn_0",""); $tplheader->set_var("activ_btn_1","0"); $tplheader->set_var("activ_btn_2",""); $tplheader->set_var("activ_btn_3",""); $tplheader->set_var("activ_btn_4",""); } $sheader = $tplheader->parse("header",false); $sheader = $tplheader->return_var("header"); include ("../content/right.php"); $sright = $tplright->return_var("right"); $tpl->set_var("right",$sright); include ("../content/footer.php"); $sfooter = $tplheader->return_var("footer"); $tpl->set_var("header",$sheader); $tpl->set_var("footer",$sfooter); projet_show($refProjet); $tpl->pparse("main", false); function projet_show($refProjet) { global $tpl; global $db; global $slistArticleErr; global $lang; $sWhere = ""; $sOrder = ""; $sSQL = ""; $HasParam = false; $iRecordsPerPage = 20; $iCounter = 0; $iPage = 0; $bEof = false; $iSort = ""; $iSorted = ""; $sDirection = ""; $sSortParams = ""; $fldref_produit = get_param('ref_produit'); $sSQL = " select libelle, description from prd_categorie_details "; $sSQL .= " where ref_categorie=".tosql($fldref_produit,"Number"); $sSQL .= " AND ref_lang=".tosql($lang,"Text"); $db->query($sSQL); $next_record = $db->next_record(); $fldlibelle = $db->f('libelle'); $flddescription = $db->f('description'); $tpl->set_var('libelle',$fldlibelle); $tpl->set_var('description',$flddescription); $sSQL = " select pd.id as pd_id, "; $sSQL .= " ppd.titre as ppd_titre, "; $sSQL .= " ppd.accroche as ppd_accroche, "; $sSQL .= " pd.picto as pd_picto "; $sSQL .= " FROM prd_produit pd "; $sSQL .= " LEFT JOIN prd_produit_details ppd on ppd.ref_produit = pd.id "; $sSQL .= " WHERE pd.ref_categorie = ".tosql($fldref_produit, "Number"); $sSQL .= " AND ref_lang='". $lang ."'"; $db->query($sSQL); $next_record = $db->next_record(); if(!$next_record){ $tpl->parse("NoProjetDetail", false); $tpl->set_var("ProjetDetail", ''); }else{ $tpl->set_var("NoProjetDetail", ''); do{ $fldtitre = $db->f("ppd_titre"); $fldid = $db->f("pd_id"); $fldtaccroche = $db->f("ppd_accroche"); $fldpicto = $db->f("pd_picto"); $tpl->set_var("id", $fldid); $tpl->set_var("titre", $fldtitre); $tpl->set_var("accroche", $fldtaccroche); $tpl->set_var("picto", $fldpicto); $tpl->set_var("lang", $lang); $tpl->set_var("ref_produit", $fldref_produit); $tpl->parse("ProjetDetail", true); }while($next_record = $db->next_record()); } $tpl->parse("ListPorjets", false); $fldid = $db->f("ppd_id"); $fldtitre = $db->f("ppd_titre"); $fldaccroche = $db->f("ppd_accroche"); $flddescription1 = $db->f("ppd_description1"); $flddescription2 = $db->f("ppd_description2"); $flddoc1 = $db->f("ppd_doc1"); $flddoc2 = $db->f("ppd_doc2"); $tpl->set_var("titre", $fldtitre); } ?>