Subversion Repositories eFlore/Applications.del

Compare Revisions

Ignore whitespace Rev 2170 → Rev 2171

/branches/v1.11-magnesium/war/commun.php
New file
0,0 → 1,27
<?php
/**
* Contient les fonctions PHP communes à PictoFlora et IdentiPlante.
*
*/
 
$cheminConfig = 'config/config.php';
$configOk = file_exists($cheminConfig);
if ($configOk) {
require $cheminConfig;
}
 
function getUrlPageCourante() {
$cheminUrl = $_SERVER['REQUEST_URI'];
$positionIntero = strpos($_SERVER['REQUEST_URI'], '?');
if ($positionIntero !== false) {
$cheminUrl = substr($_SERVER['REQUEST_URI'], 0, $positionIntero);
}
 
// ATTENTION : gwt.codesvr est transformé par PHP en gwt_codesvr
if (array_key_exists('gwt_codesvr', $_GET)) {
$cheminUrl .= '?gwt.codesvr='.$_GET['gwt_codesvr'];
}
$url = 'http://'.$_SERVER['SERVER_NAME'].$cheminUrl;
return $url;
}
?>