Subversion Repositories eFlore/Applications.del

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
1554 jpm 1
<?php
2
/**
3
 * Contient les fonctions PHP communes à PictoFlora et IdentiPlante.
4
 *
5
 */
6
 
1647 mathias 7
$cheminConfig = 'config/config.php';
8
$configOk = file_exists($cheminConfig);
9
if ($configOk) {
10
	require $cheminConfig;
11
}
12
 
1554 jpm 13
function getUrlPageCourante() {
14
	$cheminUrl = $_SERVER['REQUEST_URI'];
15
	$positionIntero = strpos($_SERVER['REQUEST_URI'], '?');
16
	if ($positionIntero !== false) {
17
		$cheminUrl = substr($_SERVER['REQUEST_URI'], 0, $positionIntero);
18
	}
19
 
20
	// ATTENTION : gwt.codesvr est transformé par PHP en gwt_codesvr
21
	if (array_key_exists('gwt_codesvr', $_GET)) {
22
		$cheminUrl .= '?gwt.codesvr='.$_GET['gwt_codesvr'];
23
	}
24
	$url = 'http://'.$_SERVER['SERVER_NAME'].$cheminUrl;
25
	return $url;
26
}
27
?>