id=$id+0;
$this->fetch_datas();
} // end of member function __construct
public function get_isbd() {
return $this->isbd;
}
public function get_public() {
return $this->public;
}
public function get_data() {
return $this->map;
}
public function fetch_datas() {
global $dbh,$msg;
$this->map=array();
$this->isbd="";
$this->public="";
$this->map['echelle_num'] = '';
$this->map['projection_num'] = '';
$this->map['ref_num'] = '';
$this->map['equinoxe'] = '';
$this->map['echelle'] = '';
$this->map['projection'] = '';
$this->map['ref'] = '';
if(!$this->id) return;
$req="select map_echelle_num, map_projection_num, map_ref_num, map_equinoxe
from notices where notice_id=".$this->id;
$res=pmb_mysql_query($req);
if (pmb_mysql_num_rows($res)) {
if($r=pmb_mysql_fetch_object($res)){
$this->map['echelle_num']=$r->map_echelle_num;
$this->map['projection_num']=$r->map_projection_num;
$this->map['ref_num']=$r->map_ref_num;
$this->map['equinoxe']=$r->map_equinoxe;
if($this->map['echelle_num']){
$req_echelle = "SELECT map_echelle_name FROM map_echelles where map_echelle_id =".$this->map['echelle_num'];
$res_echelle=pmb_mysql_query($req_echelle);
if (pmb_mysql_num_rows($res_echelle)) {
$r_echelle=pmb_mysql_fetch_object($res_echelle);
$this->map['echelle']=$r_echelle->map_echelle_name;
$this->isbd.=$this->map['echelle'];
$this->public.="".$msg["map_notice_echelle"]." : ".$this->map['echelle'];
}
}
if($this->map['projection_num']){
$req_projection = "SELECT map_projection_name FROM map_projections where map_projection_id =".$this->map['projection_num'];
$res_projection=pmb_mysql_query($req_projection);
if (pmb_mysql_num_rows($res_projection)) {
$r_projection=pmb_mysql_fetch_object($res_projection);
$this->map['projection']=$r_projection->map_projection_name;
if($this->isbd) $this->isbd.=" ; ";
$this->isbd.=$this->map['projection'];
if($this->public) $this->public.="
";
$this->public.="".$msg["map_notice_projection"]." : ".$this->map['projection'];
}
}
if($this->map['ref_num']){
$req_ref = "SELECT map_ref_name FROM map_refs where map_ref_id =".$this->map['ref_num'];
$res_ref=pmb_mysql_query($req_ref);
if (pmb_mysql_num_rows($res_ref)) {
$r_ref=pmb_mysql_fetch_object($res_ref);
$this->map['ref']=$r_ref->map_ref_name;
if($this->isbd) $this->isbd.=". ";
$this->isbd.=$this->map['ref'];
if($this->public) $this->public.="
";
$this->public.="".$msg["map_notice_ref"]." : ".$this->map['ref'];
}
}
$ids[]=$this->id;
$map=new map_objects_controler(TYPE_RECORD,$ids);
$bounding_box=$map->get_bounding_box();
if($bounding_box){
if($this->isbd)$this->isbd.=" ";
$this->isbd.=$bounding_box->get_transcription();
}
if($this->map['equinoxe']) $this->isbd.=" (".$this->map['equinoxe'].") ";
if($this->public && $this->map['equinoxe']) $this->public.="
";
if($this->map['equinoxe'])$this->public.="".$msg["map_notice_equinoxe"]." : ".$this->map['equinoxe'];
if($this->isbd)$this->isbd=". - ".$this->isbd;
}
}
}
public function get_form() {
global $msg;
$form_map = "