Subversion Repositories Applications.papyrus

Rev

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

Rev 898 Rev 920
Line 19... Line 19...
19
// |                                                                                                      |
19
// |                                                                                                      |
20
// | You should have received a copy of the GNU General Public License                                    |
20
// | You should have received a copy of the GNU General Public License                                    |
21
// | along with Foobar; if not, write to the Free Software                                                |
21
// | along with Foobar; if not, write to the Free Software                                                |
22
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                            |
22
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                            |
23
// +------------------------------------------------------------------------------------------------------+
23
// +------------------------------------------------------------------------------------------------------+
24
// CVS : $Id: iw_integrateur.fonct.php,v 1.17 2006-07-04 09:40:49 alexandre_tb Exp $
24
// CVS : $Id: iw_integrateur.fonct.php,v 1.18 2006-08-29 20:01:33 ddelon Exp $
25
/**
25
/**
26
* Fonctions de l'integrateur de page Wikini
26
* Fonctions de l'integrateur de page Wikini
27
*
27
*
28
* Application permettant d'intégrer des pages wikini dans Papyrus.
28
* Application permettant d'intégrer des pages wikini dans Papyrus.
29
*
29
*
Line 31... Line 31...
31
//Auteur original :
31
//Auteur original :
32
*@author        David Delon <david.delon@clapas.net>
32
*@author        David Delon <david.delon@clapas.net>
33
//Autres auteurs :
33
//Autres auteurs :
34
*@author        Aucun
34
*@author        Aucun
35
*@copyright     Tela-Botanica 2000-2004
35
*@copyright     Tela-Botanica 2000-2004
36
*@version       $Revision: 1.17 $ $Date: 2006-07-04 09:40:49 $
36
*@version       $Revision: 1.18 $ $Date: 2006-08-29 20:01:33 $
37
*
37
*
38
// +------------------------------------------------------------------------------------------------------+
38
// +------------------------------------------------------------------------------------------------------+
39
// |                                            ENTETE du PROGRAMME                                       |
39
// |                                            ENTETE du PROGRAMME                                       |
40
// +------------------------------------------------------------------------------------------------------+
40
// +------------------------------------------------------------------------------------------------------+
Line 197... Line 197...
197
			return;
197
			return;
198
		}
198
		}
Line 199... Line 199...
199
 
199
 
Line -... Line 200...
-
 
200
		if ($method=="edit") {
-
 
201
			
200
		if ($method=="edit") {
202
			if ($this->HasAccess("write") && $this->HasAccess("read")) {
Line 201... Line 203...
201
 
203
		
202
			$result='';
204
				$result='';
203
 
205
		
Line 278... Line 280...
278
				return $result;
280
					return $result;
279
			}
281
				}
Line 280... Line 282...
280
 
282
		
281
		}
283
			}
-
 
284
			else {
-
 
285
				echo "<i>Vous n'avez pas acc&egrave;s en &eacute;criture &agrave; cette page !</i>\n";
-
 
286
				
-
 
287
			}
-
 
288
		}
282
		else {
289
		else {
283
			return parent::Method($method);
290
			return parent::Method($method);
284
		}
291
		}
Line 294... Line 301...
294
 
301
 
Line 295... Line 302...
295
	// Identification
302
	// Identification
296
 
303
 
297
	function SetUser($user, $remember) {
304
	function SetUser($user, $remember) {
298
			// Appel à partir de Papyrus
305
			// Appel à partir de Papyrus
299
				if ($user=='') {
306
				if ($user=='initwiki') {
300
					$remember=1;
307
					$remember=1;
301
					$wiki_prenom=$this->versChatMot($GLOBALS['_GEN_commun']['pear_auth']->getAuthData($GLOBALS['_GEN_commun']['info_auth_bdd']->chp_personne_prenom));
-
 
302
					$wiki_nom=$this->versChatMot($GLOBALS['_GEN_commun']['pear_auth']->getAuthData($GLOBALS['_GEN_commun']['info_auth_bdd']->chp_personne_nom));
308
					$wiki_prenom=$this->versChatMot($GLOBALS['_GEN_commun']['pear_auth']->getAuthData($GLOBALS['_GEN_commun']['info_auth_bdd']->chp_personne_prenom));
303
 
-
 
304
					$_SESSION["user"]["name"] = $wiki_prenom.$wiki_nom;
-
 
305
					$_SESSION["user"]["password"] = "wikini";
309
					$wiki_nom=$this->versChatMot($GLOBALS['_GEN_commun']['pear_auth']->getAuthData($GLOBALS['_GEN_commun']['info_auth_bdd']->chp_personne_nom));
306
					$_SESSION["user"]["changescount"] = 100;
310
					$_SESSION["user"]=array("name"=>$wiki_prenom.$wiki_nom,"password"=>"wikini","changescount"=> 100);
307
					$this->SetPersistentCookie("name", $user["name"], $remember);
311
					$this->SetPersistentCookie("name", $user["name"], $remember);
308
					$this->SetPersistentCookie("password", $user["password"], $remember);
312
					$this->SetPersistentCookie("password", $user["password"], $remember);
309
					$this->SetPersistentCookie("remember", $remember, $remember);
313
					$this->SetPersistentCookie("remember", $remember, $remember);
Line 408... Line 412...
408
* @return  string  du code XHTML correspondant au contenu renvoyé par l'application.
412
* @return  string  du code XHTML correspondant au contenu renvoyé par l'application.
409
*/
413
*/
410
function afficherPageWikini()
414
function afficherPageWikini()
411
{
415
{
Line -... Line 416...
-
 
416
	
412
 
417
 
Line 413... Line 418...
413
	$GLOBALS['_PAPYRUS_']['erreur']->setActive(0);
418
	$GLOBALS['_PAPYRUS_']['erreur']->setActive(0);
414
 
419
 
Line 422... Line 427...
422
    if (!class_exists ('Wiki_Papyrus')) return ; 
427
    if (!class_exists ('Wiki_Papyrus')) return ; 
423
    $wiki  = new Wiki_Papyrus($wakkaConfig);
428
    $wiki  = new Wiki_Papyrus($wakkaConfig);
Line 424... Line 429...
424
 
429
 
425
	if  ($GLOBALS['_GEN_commun']['pear_auth']->checkAuth()) {
430
	if  ($GLOBALS['_GEN_commun']['pear_auth']->checkAuth()) {
426
		if (!isset($_SESSION["user"]) || ($_SESSION["user"]=="")) {
431
		if (!isset($_SESSION["user"]) || ($_SESSION["user"]=="")) {
427
			$wiki->SetUser('');
432
			$wiki->SetUser('initwiki');
428
		}
433
		}
429
	}
434
	}
430
	else {
435
	else {
431
		$wiki->LogoutUser();
436
		$wiki->LogoutUser();