Subversion Repositories Applications.annuaire

Rev

Rev 205 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 205 Rev 291
Line 1... Line 1...
1
<?php
1
<?php
-
 
2
// declare(encoding='UTF-8');
2
/**
3
/**
3
* PHP Version 5
4
 * Service 
4
*
5
 *
5
* @category  PHP
6
 * @category	php 5.2
6
* @package   papyrus_bp
7
 * @package		Annuaire::Services
7
* @author    aurelien <aurelien@tela-botanica.org>
8
 * @author		Aurélien PERONNET <aurelien@tela-botanica.org>
-
 
9
 * @author		Jean-Pascal MILCENT <jpm@tela-botanica.org>
8
* @copyright 2010 Tela-Botanica
10
 * @copyright	Copyright (c) 2010, Tela Botanica (accueil@tela-botanica.org)
9
* @license   http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt Licence CECILL
11
 * @license		http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt Licence CECILL
10
* @version   SVN: <svn_id>
12
 * @license		http://www.gnu.org/licenses/gpl.html Licence GNU-GPL
11
* @link      /doc/papyrus_bp/
13
 * @version		$Id$
12
*/
14
 */
13
 
-
 
14
Class ExecuteurLien extends JRestService {
15
class ExecuteurLien extends JRestService {
Line 15... Line 16...
15
 
16
 
16
	public function getElement($uid){
-
 
17
 
17
	public function getElement($uid){
18
		if(isset($uid[0])) {
18
		if (isset($uid[0])) {
19
			$lien_code = $uid[0];
19
			$lien_code = $uid[0];
20
			$lien = base64_decode(str_replace('_','/',$lien_code));
20
			$lien = base64_decode(str_replace('_', '/', $lien_code));
21
		} else {
21
		} else {
22
			return;
22
			return;
Line 23... Line 23...
23
		}
23
		}
24
 
24
 
25
	    if(!isset($uid[1])) {
25
	    if (!isset($uid[1])) {
26
	    	$retour_ajax = true;
26
	    	$retour_ajax = true;
27
	    } else {
27
	    } else {
Line 28... Line 28...
28
	    	$adresse_retour = base64_decode(str_replace('_','/',$uid[1]));
28
	    	$adresse_retour = base64_decode(str_replace('_', '/', $uid[1]));
29
	    }
29
	    }
Line 30... Line 30...
30
	    
30
	    
Line 31... Line 31...
31
	    echo $lien;
31
	    echo $lien;
32
	    exit;
32
	    exit;
33
 
33
 
34
	    $requete = file_get_contents($lien);
34
	    $requete = file_get_contents($lien);
35
 
35
 
36
		if($retour_ajax) {
36
		if ($retour_ajax) {
37
			if($requete) {
37
			if ($requete) {