Subversion Repositories eFlore/Applications.del

Rev

Rev 1554 | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

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