-
Notifications
You must be signed in to change notification settings - Fork 3
/
index.php
58 lines (39 loc) · 1.45 KB
/
index.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
<?php
//setta la variabile per prevenire intrusioni esterne
define( '_VALID_SESSION', 1 );
include_once(dirname(__FILE__).'/conf.php');
include_once(dirname(__FILE__).'/includes/database.php');
include_once(dirname(__FILE__).'/includes/funzioni.php');
include_once(dirname(__FILE__).'/includes/paginazione.php');
include_once(dirname(__FILE__).'/includes/moduli.php');
include_once(dirname(__FILE__).'/includes/pagina.php');
include_once(dirname(__FILE__).'/includes/sessione-new.php');
include_once(dirname(__FILE__).'/includes/utente-new.php');
$debug = array();
$conf = new Config();
$database = new database($conf->db_host, $conf->db_user, $conf->db_password, $conf->db_nomedb, $conf->db_pref);
$utente = new utente();
$sessione = new sessione();
$pagina = new pagina();
if($act = getParametri($_GET,'action',0)){
if($act == 'login') {$sessione->login(); header("Location: $conf->urlSito/");}
if($act == 'logout') {
$sessione->logout();
header("Location: http://logout:logout@".str_replace("http://","",$conf->urlSito)."/", TRUE, 301);
}
}
/*
//$utente = new utente();
//$sessione = new sessione();
if(getParametri($_POST,'sublogin',0)){
if($sessione->login(getParametri($_POST,'username',0),getParametri($_POST,'pass',0),getParametri($_POST,'remember',0))) {}
//echo "vero";
}
*/
ob_start();
mostraContenuto();
$contenuto = ob_get_contents();
ob_end_clean();
initModuli();
include_once($pagina->getTemplatePath()."/index.php");
?>