conectar(); // instanciar los 0bjetos $tabla_museo=new Tabla_Museo($dataBase->getEnlaceHost()); $museo=new Museo(); $museo=$tabla_museo->obtener($Nmuseo); $plantillas = array("plantillas/museos/mapa.htm"); $plantilla = plantillas($plantillas,"museos"); $txtMtelefon = str_replace("\r", "\n",$museo->getMtelefon()); $txtMtelefon = str_replace("\n\n", "\n", $txtMtelefon); $txtMdirecci = str_replace("\r", "\n",$museo->getMdirecci()); $txtMdirecci = str_replace("\n\n", "\n", $txtMdirecci); $error=array('TAG_Nmuseo'=>array (1,$museo->getNmuseo(),""), 'TAG_Tmuse_es'=>array (1,$museo->getTmuse_es(),""), 'TAG_Tmuse_eu'=>array (1,$museo->getTmuse_eu(),""), 'TAG_Tmuse_en'=>array (1,$museo->getTmuse_en(),""), 'TAG_Tmuse_fr'=>array (1,$museo->getTmuse_fr(),""), 'TAG_Ntipo'=>array (1,obtener("Ntipo",$museo->getNtipo()),""), 'TAG_Mdirecci'=>array (1,str_replace("\n","
",$txtMdirecci),""), 'TAG_Tlocalid'=>array (1,$museo->getTlocalid(),""), 'TAG_Mtelefon'=>array (1,str_replace("\n","
",$txtMtelefon),""), 'TAG_Tlongitu'=>array (1,$museo->getTlongitu(),""), 'TAG_Tlatitud'=>array (1,$museo->getTlatitud(),""), 'TAG_Mpre_es'=>array (1,$museo->getMpre_es(),""), 'TAG_Mpre_eu'=>array (1,$museo->getMpre_eu(),""), 'TAG_Mpre_en'=>array (1,$museo->getMpre_en(),""), 'TAG_Mpre_fr'=>array (1,$museo->getMpre_fr(),""), 'TAG_Mdes_es'=>array (1,$museo->getMdes_es(),""), 'TAG_Mdes_eu'=>array (1,$museo->getMdes_eu(),""), 'TAG_Mdes_en'=>array (1,$museo->getMdes_en(),""), 'TAG_Mdes_fr'=>array (1,$museo->getMdes_fr(),""), 'TAG_Temail'=>array (1,$museo->getTemail(),""), 'TAG_Tweb'=>array (1,$museo->getTweb(),""), 'TAG_Nestado'=>array (1,$txtNestado,""), 'TAG_Nactivo'=>array (1,$txtNactivo,""), 'TAG_Nportada'=>array (1,$txtNportada,""), 'TAG_Ndestaca'=>array (1,$txtNdestaca,""), 'TAG_Norden'=>array (1,$museo->getNorden(),""), 'TAG_Falta'=>array (1,$museo->getFalta(),""), 'TAG_Fmodific'=>array (1,$museo->getFmodific(),""), 'TAG_Ttitu_es'=>array (1,$museo->getTtitu_es(),""), 'TAG_Ttitu_eu'=>array (1,$museo->getTtitu_eu(),""), 'TAG_Ttitu_en'=>array (1,$museo->getTtitu_en(),""), 'TAG_Ttitu_fr'=>array (1,$museo->getTtitu_fr(),""), 'TAG_Trss'=>array (1,$museo->getTrss(),""), 'TAG_Taviso'=>array (1,$museo->getTaviso(),""), 'TAG_Textra07'=>array (1,$museo->getTextra07(),""), 'TAG_Textra08'=>array (1,$museo->getTextra08(),""), 'TAG_Textra09'=>array (1,$museo->getTextra09(),""), 'TAG_Textra10'=>array (1,$museo->getTextra10(),""), 'TAG_Ncomarca'=>array (1,obtener("Ncomarca",$museo->getNcomarca()),""), 'TAG_Nextra12'=>array (1,$txtNextra12,""), 'TAG_Nextra13'=>array (1,$txtNextra13,""), 'TAG_Nextra14'=>array (1,$txtNextra14,""), 'TAG_Nextra15'=>array (1,$txtNextra15,""), 'TAG_Mextra16'=>array (1,str_replace("\n","
",$museo->getMextra16()),""), 'TAG_Mextra17'=>array (1,str_replace("\n","
",$museo->getMextra17()),""), 'TAG_Mextra18'=>array (1,str_replace("\n","
",$museo->getMextra18()),""), 'TAG_Mextra19'=>array (1,str_replace("\n","
",$museo->getMextra19()),""), 'TAG_Mextra20'=>array (1,str_replace("\n","
",$museo->getMextra20()),"") ); while (list($key,$value)=each($error)){ $plantilla=str_replace($key."_CHECKED".$value[1],"checked=\"checked\"",$plantilla); $plantilla=str_replace($key."_VALUE",$value[1],$plantilla); if (!$value[0]) $plantilla=str_replace($key,"error",$plantilla); else $plantilla=str_replace($key,"ok",$plantilla); } if (strlen($museo->getMdirecci())==0) $plantilla = preg_replace("/([\s\S]*)/","",$plantilla); if (strlen($museo->getMtelefon())==0) $plantilla = preg_replace("/([\s\S]*)/","",$plantilla); if (strlen($museo->getTlongitu())==0) $plantilla = preg_replace("/([\s\S]*)/","",$plantilla); if (strlen($museo->getTlatitud())==0) $plantilla = preg_replace("/([\s\S]*)/","",$plantilla); if (strlen($museo->getMpre_es())==0) $plantilla = preg_replace("/([\s\S]*)/","",$plantilla); if (strlen($museo->getMpre_eu())==0) $plantilla = preg_replace("/([\s\S]*)/","",$plantilla); if (strlen($museo->getMdes_es())==0) $plantilla = preg_replace("/([\s\S]*)/","",$plantilla); if (strlen($museo->getMdes_eu())==0) $plantilla = preg_replace("/([\s\S]*)/","",$plantilla); if (strlen($museo->getTemail())==0) $plantilla = preg_replace("/([\s\S]*)/","",$plantilla); if (strlen($museo->getTweb())==0) $plantilla = preg_replace("/([\s\S]*)/","",$plantilla); echo $plantilla; ?>