/trunk/papyrus/configuration/pap_config_avancee.inc.php |
---|
66,7 → 66,7 |
/** Constante stockant une valeur booléen permettant de savoir si on veut déboguer le code (true) ou pas (false).*/ |
define('GEN_DEBOGAGE', true);// true ou false |
/** Constante permettant de savoir sous quelle forme le débogage va avoir lieu.*/ |
define('PAP_DEBOGAGE_TYPE', 'HTML');// HTML ou FIREBUG |
define('PAP_DEBOGAGE_TYPE', 'FIREBUG');// HTML ou FIREBUG |
/** Constante stockant une valeur correspondant au niveau d'erreur à employer pour le code PHP |
* de Papyrus et de ses applications.*/ |
define('GEN_DEBOGAGE_NIVEAU', E_ALL);// Voir le manuel de PHP pour les différents niveaux disponibles. |
/trunk/papyrus/pap_rendu.inc.php |
---|
500,6 → 500,7 |
// Une fois l'application appelé est exécuté nous affichons le contenu de l'entête qui a pu |
// être modifié par l'application. |
$GLOBALS['_PAPYRUS_']['rendu']['META_HTTP_EQUIV'] = GEN_afficherMeta('http-equiv'); |
$GLOBALS['_PAPYRUS_']['rendu']['META_PROPERTY'] = GEN_afficherMeta('property'); |
$GLOBALS['_PAPYRUS_']['rendu']['META_NAME'] = GEN_afficherMeta('name'); |
$GLOBALS['_PAPYRUS_']['rendu']['META_NAME_DC'] = GEN_afficherMeta('dc'); |
// Nous récupérons tout les styles CSS pour l'afficher dans l'entête de la page. |
/trunk/papyrus/bibliotheque/fonctions/pap_meta.fonct.php |
---|
89,6 → 89,42 |
} |
} |
/** |
* Stocke une <meta> du type <meta property="truc" content="chose"> |
* @param string $id |
* @param string $property |
* @param string $content |
*/ |
function GEN_stockerMetaProperty($id, $property, $content) |
{ |
if (empty($GLOBALS['_GEN_commun']['meta_property'][$id])) { |
$GLOBALS['_GEN_commun']['meta_property'][$id] = array($property, $content); |
} else { |
die('ERREUR Papyrus : cette balise meta à déjà été enregistrée par GEN_stockerMetaProperty(). <br />'. |
'Identifiant : '. $id .'<br />'. |
'Ligne n° : '. __LINE__ .'<br />'. |
'Fichier : '. __FILE__); |
} |
} |
/** |
* Modifie une <meta> du type <meta property="truc" content="chose"> |
* @param string $id |
* @param string $property |
* @param string $content |
*/ |
function GEN_modifierMetaProperty($id, $property, $content) |
{ |
if ($property != '' && $content != '') { |
$GLOBALS['_GEN_commun']['meta_property'][$id] = array($property, $content); |
} else { |
die('ERREUR Papyrus : cette balise ne peut avoir une propriété ou un contenu vide. <br />'. |
'Contenu : '. $content .'<br />'. |
'Ligne n° : '. __LINE__ .'<br />'. |
'Fichier : '. __FILE__); |
} |
} |
/** Fonction GEN_stockerMetaName() - Permet de stocker des informations pour la balise meta. |
* |
* Papyrus permet à une application donnée de stocker les balises meta contenant l'attribut name |
217,6 → 253,15 |
if (empty($sortie)) { |
$sortie .= '<!-- Aucune balise meta name -->'."\n"; |
} |
} else if ($type == 'property' && isset($GLOBALS['_GEN_commun']['meta_property'])) { |
while (list($cle, $valeur) = each($GLOBALS['_GEN_commun']['meta_property'])) { |
if (! empty($valeur['contenu'])) { |
$sortie .= str_repeat(' ', 8).'<meta property="'.$valeur[0].'" content="'.$valeur[1].'" />'."\n"; |
} |
} |
if (empty($sortie)) { |
$sortie .= '<!-- Aucune balise meta property -->'."\n"; |
} |
} else if ($type == 'dc' && isset($GLOBALS['_GEN_commun']['meta_name_dc'])) { |
while (list($cle, $valeur) = each($GLOBALS['_GEN_commun']['meta_name_dc'])) { |
if (! empty($valeur['contenu'])) { |
267,6 → 312,12 |
$GLOBALS['_GEN_commun']['meta'][$cle] = null; |
} |
} |
} else if ($type == 'property') { |
if (count($GLOBALS['_GEN_commun']['meta_property']) > 0) { |
foreach ($GLOBALS['_GEN_commun']['meta_property'] as $cle => $val) { |
$GLOBALS['_GEN_commun']['meta_property'][$cle] = null; |
} |
} |
} else if ($type == 'dc') { |
if (count($GLOBALS['_GEN_commun']['meta_name_dc']) > 0) { |
foreach ($GLOBALS['_GEN_commun']['meta_name_dc'] as $cle => $val) { |
/trunk/papyrus/applettes/identification/identification.php |
---|
168,7 → 168,7 |
$mot_de_passe = (! isset($_POST['password'])) ? '' : $_POST['password']; |
$login = (! isset($_POST['username'])) ? '' : $_POST['username']; |
$url_inscription_aide = $InfoAuthBdd->url_erreur; |
$url_inscription_aide = (isset($InfoAuthBdd->url_erreur) ? $InfoAuthBdd->url_erreur : 'erreur'); |
// ATTENTION : Partie à supprimer une fois les mise à jour effectué dans l'annuaire de Tela Botanica |
// Devrait être déplacer dans l'appli inscription de Tela. |
/trunk/papyrus/applettes/moteur_recherche/moteur_recherche.php |
---|
136,33 → 136,11 |
foreach ($tab_arguments as $argument) { |
if (!empty($argument)) { |
$tab_parametres = explode('=', $argument, 2); |
$options[$tab_parametres[0]] = trim($tab_parametres[1], '"'); |
$options[$tab_parametres[0]] = (isset($tab_parametres[1]) ? trim($tab_parametres[1], '"') : ''); |
} |
} |
// -------------------------------------------------------------------------------------------------------- |
// Initialisation de variable de configuration. |
$liste_type_site = '102, 103';// Les id des types des sites pouvant apparaitre dans le sélecteur |
$objet_pear_db =& $_GEN_commun['pear_db'];//objet Pear créé par DB contenant la connexion à la base de données. |
// Connexion à la BD de Papyrus |
$GLOBALS['_MOTEUR_RECHERCHE_']['bd']['papyrus'] =& $_GEN_commun['pear_db']; |
// Connexion aux BDD sur Agathis |
$GLOBALS['_MOTEUR_RECHERCHE_']['bd']['bota'] =& DB::connect(MORE_DSN_BOTA); |
if (DB::isError($GLOBALS['_MOTEUR_RECHERCHE_']['bd']['bota'])) { |
$msg_erreur_connection = 'Impossible de se connecter à la base de données botaniques.'; |
die(BOG_afficherErreurSql(__FILE__, __LINE__, $GLOBALS['_MOTEUR_RECHERCHE_']['bd']['bota']->getMessage(), 'connexion à la base de données',$msg_erreur_connection)); |
} |
$GLOBALS['_MOTEUR_RECHERCHE_']['variables'] = array(); |
$code_site = $_GEN_commun['url_site'];// identifiant du site courant. |
$url = $_GEN_commun['url']; |
$sphinx = array_key_exists('sphinx', $options) && $options['sphinx'] ? true : false; |
$url_id_type_site = GEN_URL_ID_TYPE_SITE; |
$indent_origine = 12;// Indentation de départ en nombre d'espace |
$indent_pas = 4;// Pas d'indentation en nombre d'espace |
$retour = ''; |
$retour_resultats = ''; |
// -------------------------------------------------------------------------------------------------------- |
// Lancement de la recherche si nécessaire |
$aso_squelette = array('formulaire' => MORE_FORM_SQUELETTE); |
$_SESSION['_MOTEUR_RECHERCHE_']['rechercher']['more_motif'] = ''; |
/trunk/papyrus/applettes/moteur_recherche/sphinx-min.conf |
---|
12,10 → 12,10 |
type = mysql |
sql_host = localhost |
sql_user = telabotap |
sql_pass = |
sql_user = root |
sql_pass = mat87cho |
sql_db = tela_prod_v4 |
sql_sock = /run/mysqld/mysqld.sock |
#sql_sock = /run/mysqld/mysqld.sock |
sql_query_pre = SET NAMES utf8 |
sql_query_pre = SET CHARACTER_SET_RESULTS=utf8 |
/trunk/api/formulaire/formulaire.fonct.inc.php |
---|
639,7 → 639,8 |
$formtemplate->setDefaults(array('latitude' => $defaut['latitude'], 'longitude' => $defaut['longitude'])); |
} |
GEN_stockerFichierScript('googleMapScript', $url_google_script); |
//GEN_stockerFichierScript('googleMapScript', $url_google_script); |
GEN_stockerFichierScript('googleMapScript', "http://maps.googleapis.com/maps/api/js?sensor=false&key=".BAZ_GOOGLE_KEY); |
GEN_AttributsBody('onload', 'load()'); |
$html_bouton = '<tr> |
<td style="text-align:left;padding:5px;" colspan="2"> |
/trunk/api/formulaire/formulaire.fonct.google.php |
---|
37,99 → 37,107 |
// Variables globales |
var map = null; |
var geocoder = null; |
var lat = document.getElementById("latitude"); |
var lon = document.getElementById("longitude"); |
var marker = null; |
var flat = null; |
var flon = null; |
function load() { |
if (GBrowserIsCompatible()) { |
flat = document.getElementById("latitude"); |
flon = document.getElementById("longitude"); |
map = new GMap2(document.getElementById("map"), G_HYBRID_MAP); |
var optionsGoogleMapsv3 = { |
// On centre la carte sur le languedoc roussillon |
center: new google.maps.LatLng(43.84245116699036, 3.768310546875), |
zoom: 7, |
mapTypeId: google.maps.MapTypeId.G_HYBRID_MAP, |
mapTypeControl: true, |
scaleControl: true |
}; |
map = new google.maps.Map(document.getElementById("map"), optionsGoogleMapsv3); |
map.addControl(new GSmallMapControl()); |
map.addControl(new GMapTypeControl()); |
map.addControl(new GScaleControl()); |
map.enableContinuousZoom(); |
// On centre la carte sur le languedoc roussillon |
center = new GLatLng(43.84245116699036, 3.768310546875); |
map.setCenter(center, 7);map.setMapType(G_HYBRID_MAP); |
//marker = new GMarker(center, {draggable: true}) ; |
GEvent.addListener(map, "click", function(marker, point) { |
if (marker) { |
map.removeOverlay(marker); |
var lat = document.getElementById("latitude"); |
var lon = document.getElementById("longitude"); |
lat.value = ""; |
lon.value = ""; |
} else { |
google.maps.event.addListener(map, "click", function(event) { |
if (marker != null) { |
marker.setMap(null); |
marker = null; |
} |
// On ajoute un marqueur a l endroit du clic et on place les coordonnees dans les champs latitude et longitude |
marker = new GMarker(point, {draggable: true}) ; |
GEvent.addListener(marker, "dragend", function () { |
coordMarker = marker.getPoint() ; |
var lat = document.getElementById("latitude"); |
var lon = document.getElementById("longitude"); |
lat.value = coordMarker.lat(); |
lon.value = coordMarker.lng(); |
marker = event.overlay; |
marker = new google.maps.Marker({ |
position: event.latLng, |
draggable: true, |
map: map |
}); |
map.addOverlay(marker); |
google.maps.event.addListener(marker, "dragend", function () { |
coordMarker = marker.getPosition() ; |
flat.value = coordMarker.lat(); |
flon.value = coordMarker.lng(); |
}); |
setLatLonForm(marker); |
} |
});' ; |
if ($formtemplate->getElementValue ('latitude') != '' && $formtemplate->getElementValue('longitude') != '') { |
$script .= ' |
point = new GLatLng('.$formtemplate->getElementValue('latitude').', '.$formtemplate->getElementValue('longitude').'); |
marker = new GMarker(point, {draggable: true}); |
map.addOverlay(marker);' ; |
point = new google.maps.LatLng('.$formtemplate->getElementValue('latitude').', '.$formtemplate->getElementValue('longitude').'); |
marker = new google.maps.Marker({ |
position: point, |
draggable: true, |
map: map |
}); |
google.maps.event.addListener(marker, "dragend", function () { |
coordMarker = marker.getPosition() ; |
flat.value = coordMarker.lat(); |
flon.value = coordMarker.lng(); |
}); |
map.setCenter(point); |
' ; |
} |
$script .= 'geocoder = new GClientGeocoder(); |
} |
$script .= 'geocoder = new google.maps.Geocoder(); |
}; |
function showAddress() { |
var adresse = document.getElementById("bf_adresse").value ; |
var ville = ""; |
if (document.getElementById("bf_ville")) { |
var ville = document.getElementById("bf_ville").value ; |
} else { |
var ville = ""; |
ville = document.getElementById("bf_ville").value ; |
} |
var cp = document.getElementById("bf_cp_lieu_evenement").value ; |
var pays; |
if (document.getElementById("liste30")) { |
var selectIndex = document.getElementById("liste30").selectedIndex; |
var pays = document.getElementById("liste30").options[selectIndex].text ; |
pays = document.getElementById("liste30").options[selectIndex].text ; |
} else { |
var pays = document.getElementById("bf_pays").value; |
pays = document.getElementById("bf_pays").value; |
} |
var address = adresse + \' \' + \' \' + cp + \' \' + ville + \' \' +pays ; |
if (geocoder) { |
geocoder.getLatLng( |
address, |
function(point) { |
if (!point) { |
geocoder.geocode({ |
address: address |
}, function(result, status) { |
if (status != google.maps.GeocoderStatus.OK) { |
alert(address + " not found"); |
} else { |
map.setCenter(point, 13); |
var marker = new GMarker(point, {draggable: true}); |
GEvent.addListener(marker, "dragend", function () { |
coordMarker = marker.getPoint() ; |
var lat = document.getElementById("latitude"); |
var lon = document.getElementById("longitude"); |
lat.value = coordMarker.lat(); |
lon.value = coordMarker.lng(); |
marker.setMap(null); |
marker = null; |
//map.setCenter(point, 13); |
map.fitBounds(result[0].geometry.viewport); |
marker = new google.maps.Marker({ |
position: result[0].geometry.location, |
draggable: true, |
map: map |
}); |
map.addOverlay(marker); |
setLatLonForm(marker) |
marker.openInfoWindowHtml(address+ "'.BAZ_GOOGLE_MSG.'"); |
google.maps.event.addListener(marker, "dragend", function () { |
coordMarker = marker.getPosition() ; |
flat.value = coordMarker.lat(); |
flon.value = coordMarker.lng(); |
}); |
setLatLonForm(marker); |
//marker.openInfoWindowHtml(address+ "'.BAZ_GOOGLE_MSG.'"); |
} |
}); |
} |
); |
} |
} |
function setLatLonForm(marker) { |
coordMarker = marker.getPoint() ; |
var lat = document.getElementById("latitude"); |
var lon = document.getElementById("longitude"); |
lat.value = coordMarker.lat(); |
lon.value = coordMarker.lng(); |
coordMarker = marker.getPosition() ; |
flat.value = coordMarker.lat(); |
flon.value = coordMarker.lng(); |
} |
'; |
/trunk/api/js/dojo/src/widget/GoogleMap.js |
---|
38,7 → 38,8 |
if (!gkey || gkey == "") { |
dojo.raise("dojo.widget.GoogleMap: The Google Map widget requires a proper API key in order to be used."); |
} |
var tag = "<scr" + "ipt src='http://maps.google.com/maps?file=api&v=2&key=" + gkey + "'></scri" + "pt>"; |
//var tag = "<scr" + "ipt src='http://maps.google.com/maps?file=api&v=2&key=" + gkey + "'></scri" + "pt>"; |
var tag = "<scr" + "ipt src='http://maps.googleapis.com/maps/api/js?sensor=false'></scri" + "pt>"; |
if (!dj_global["GMap2"]) { |
document.write(tag); |
} |