unzipped_files = array(); if ($id) { $requete = "SELECT explnum_id, explnum_notice, explnum_bulletin, explnum_nom, explnum_mimetype, explnum_extfichier, explnum_url, explnum_data, explnum_vignette, explnum_statut, explnum_index_sew, explnum_index_wew, explnum_repertoire, explnum_nomfichier, explnum_path, repertoire_nom, repertoire_path, group_concat(num_location SEPARATOR ',') as loc FROM explnum left join upload_repertoire on explnum_repertoire=repertoire_id left join explnum_location on num_explnum=explnum_id where explnum_id='$id' group by explnum_id"; $result = mysql_query($requete, $dbh); if(mysql_num_rows($result)) { $item = mysql_fetch_object($result); $this->explnum_id = $item->explnum_id ; $this->explnum_notice = $item->explnum_notice ; $this->explnum_bulletin = $item->explnum_bulletin ; $this->explnum_nom = $item->explnum_nom ; $this->explnum_mimetype = $item->explnum_mimetype ; $this->explnum_url = $item->explnum_url ; $this->explnum_data = $item->explnum_data ; $this->explnum_vignette = $item->explnum_vignette ; $this->explnum_statut = $item->explnum_statut ; $this->explnum_index_wew = $item->explnum_index_wew; $this->explnum_index_sew = $item->explnum_index_sew; $this->explnum_index = (($item->explnum_index_wew || $item->explnum_index_sew || $pmb_indexation_docnum_default) ? 'checked' : ''); $this->explnum_repertoire = $item->explnum_repertoire; $this->explnum_path = $item->explnum_path; $this->explnum_rep_nom = $item->repertoire_nom; $this->explnum_rep_path = $item->repertoire_path; $this->explnum_nomfichier = $item->explnum_nomfichier; $this->explnum_ext = $item->explnum_extfichier; $this->explnum_location = $item->loc ? explode(",",$item->loc) : ''; } else { // rien trouvé en base, on va faire comme pour une création $req = "select repertoire_nom, repertoire_path from upload_repertoire, users where repertoire_id=deflt_upload_repertoire and username='".SESSlogin."'"; $res = mysql_query($req,$dbh); if(mysql_num_rows($res)){ $item = mysql_fetch_object($res); $this->explnum_rep_nom = $item->repertoire_nom; $this->explnum_rep_path = $item->repertoire_path; } else { $this->explnum_rep_nom = ''; $this->explnum_rep_path = ''; } $this->explnum_id = 0; $this->explnum_notice = $id_notice; $this->explnum_bulletin = $id_bulletin; $this->explnum_nom = ''; $this->explnum_mimetype = ''; $this->explnum_url = ''; $this->explnum_data = ''; $this->explnum_vignette = '' ; $this->explnum_statut = '0'; $this->explnum_index = ($pmb_indexation_docnum_default ? 'checked' : ''); $this->explnum_repertoire = 0; $this->explnum_path = ''; $this->explnum_nomfichier = ''; $this->explnum_ext = ''; $this->explnum_location= ''; } } else { // rien de fourni apparemment : création $req = "select repertoire_id, repertoire_nom, repertoire_path from upload_repertoire, users where repertoire_id=deflt_upload_repertoire and username='".SESSlogin."'"; $res = mysql_query($req,$dbh); if(mysql_num_rows($res)){ $item = mysql_fetch_object($res); $this->explnum_rep_nom = $item->repertoire_nom; $this->explnum_rep_path = $item->repertoire_path; $this->explnum_repertoire = $item->repertoire_id; } else { $this->explnum_rep_nom = ''; $this->explnum_rep_path = ''; $this->explnum_repertoire = 0; } $this->explnum_id = $id; $this->explnum_notice = $id_notice; $this->explnum_bulletin = $id_bulletin; $this->explnum_nom = ''; $this->explnum_mimetype = ''; $this->explnum_url = ''; $this->explnum_data = ''; $this->explnum_vignette = '' ; $this->explnum_statut = '0'; $this->explnum_index = ($pmb_indexation_docnum_default ? 'checked' : '');; $this->explnum_path = ''; $this->explnum_nomfichier=''; $this->explnum_ext = ''; $this->explnum_location = ''; } } } # fin de la classe explnum } # fin de définition