Subversion Repositories Applications.papyrus

Rev

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

Rev 2010 Rev 2016
Line 1... Line 1...
1
<?php
1
<?php
Line 2... Line -...
2
 
-
 
3
 /**
-
 
4
  * On appelle le fichier des fonctions d'initialisation de code igniter
-
 
5
  */
2
 
6
 require_once GEN_CHEMIN_BIBLIO.'ci_initialisation.fonct.php' ;
3
require_once('autoload.inc.php');
7
 
4
 
8
 /**
5
 /**
9
  * Fonction d'affichage de Papyrus, pour le corps de page
6
  * Fonction d'affichage de Papyrus, pour le corps de page
10
  */
7
  */
Line 11... Line 8...
11
 function afficherContenuCorps() {
8
 function afficherContenuCorps() {
12
 	
9
 	
13
 	// si l'utilisateur est authentifié
10
 	// si l'utilisateur est authentifié
-
 
11
 	if(VAR_IDENT) { 
-
 
12
 		// on renvoie la vue principale de l'application
-
 
13
 		$methode = '' ;
-
 
14
 		if(isset($_GET['m'])) {
14
 	if($GLOBALS['_GEN_commun']['pear_auth']->getAuth()) { 
15
 			 $methode = $_GET['m'] ;
-
 
16
 		}
-
 
17
 		$controlleur = new AdminAdministrateur();	
-
 
18
 		
-
 
19
 		switch($methode) {
-
 
20
 			
-
 
21
 			case 'ajout_admin':
-
 
22
 				return $controlleur->ajoutAdmin();
-
 
23
 			break;	
-
 
24
 				
-
 
25
 			case 'ajout_admin_va':
-
 
26
 				$nom = $_POST['admin_nom'] ;
-
 
27
				$prenom = $_POST['admin_prenom'] ;
-
 
28
				$mail = $_POST['admin_mail'] ;
-
 
29
				$lang = $_POST['admin_lang'] ;
-
 
30
				$pass = $_POST['admin_pass'] ;
-
 
31
				$pass_conf = $_POST['admin_pass_confirm'] ;
-
 
32
 				return $controlleur->ajoutAdminVa($nom,$prenom,$mail,$lang,$pass,$pass_conf);
-
 
33
 			break;		
-
 
34
 			
-
 
35
 			case 'modif_admin':
-
 
36
 				$id = $_GET['id_admin']; 
-
 
37
 				return $controlleur->modifAdmin($id);
-
 
38
 			break;
-
 
39
 			
-
 
40
 			case 'modif_admin_va':
-
 
41
 				$id = $_GET['id_admin'];
-
 
42
				$nom = $_POST['admin_nom'];
-
 
43
				$prenom = $_POST['admin_prenom'];
-
 
44
				$mail = $_POST['admin_mail'];
-
 
45
				$lang = $_POST['admin_lang'];
-
 
46
				$pass = $_POST['admin_pass'];
-
 
47
				$pass_conf = $_POST['admin_pass_confirm']; 
-
 
48
				
-
 
49
 				return $controlleur->modifAdminVa($id,$nom,$prenom,$mail,$lang,$pass,$pass_conf);
-
 
50
 			break;
-
 
51
 			
-
 
52
 			case 'suppr_admin':
-
 
53
 				$id = $_GET['id_admin'];
-
 
54
 				return $controlleur->supprAdmin($id);
-
 
55
 			break;
-
 
56
 					
-
 
57
 			default:
-
 
58
 				return $controlleur->chargerAdmin();
15
 		// on renvoie la vue principale de l'application
59
 			break;
16
 		return executerCodeIgniter('admin_administrateur') ;
60
 		}
-
 
61
 	} else {
17
 	} else {
62
 		// sinon on lui demande de s'identifier
18
 		// sinon on lui demande de s'identifier
63
 		$controlleur = new AdminAdministrateur() ;
Line 19... Line 64...
19
 		return executerCodeIgniter('admin_administrateur','demander_ident') ;
64
 		return $controlleur->demanderIdent() ;
-
 
65
 	}
-
 
66
 		
-
 
67
}
-
 
68
 
-
 
69
function afficherContenuTete() {
-
 
70
	$controlleur = new AdminAdministrateur();
-
 
71
	return $controlleur->adminTete();
-
 
72
}
-
 
73
 
-
 
74
function afficherContenuPied() {
-
 
75
	$controlleur = new AdminAdministrateur();
-
 
76
	return $controlleur->adminPied();
-
 
77
}
-
 
78
 
-
 
79
 
-
 
80
	if(!defined('PAP_VERSION')) {
-
 
81
		echo afficherContenuTete();
-
 
82
		echo afficherContenuCorps();
20
 	}
83
		echo afficherContenuPied(); 
21
 		
84
			
22
}
85
	}
23
 /*
86
 /*
24
  * afficherContenuTete()
87
  * afficherContenuTete()
25
  * afficherContenuNavigation()
88
  * afficherContenuNavigation()
26
  * afficherContenuMenu()
89
  * afficherContenuMenu()
Line 27... Line 90...
27
  * afficherContenuPied()
90
  * afficherContenuPied()
28
  * 
91
  *