-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.php
57 lines (33 loc) · 1.27 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
<?php
// Start the session
session_start();
require('conf.php');
// Expire session in so-and-so-many minutes:
// From http://stackoverflow.com/questions/520237/how-do-i-expire-a-php-session-after-30-minutes
if (isset($_SESSION['LAST_ACTIVITY']) && (time() - $_SESSION['LAST_ACTIVITY'] > $conf['session_expiration_time'])) {
// last request was more than 30 minutes ago
session_unset(); // unset $_SESSION variable for the run-time
session_destroy(); // destroy session data in storage
}
$_SESSION['LAST_ACTIVITY'] = time(); // update last activity time stamp
require('php/get_messages.php');
// auth.php checks password and gives the $name variable
require('php/auth.php');
// Headers ie. styles etc:
// require('php/header.php');
//echo '<body>'.PHP_EOL;
$pageTitle=get_message("Speech corpus collector -- ") . $conf['pagetitle'];
if (isset($name)) {
/*require('php/help_bar.php');*/
// echo "<div id=loginmessage>$login_message</div>";
require('php/recording_html.php');
}
else {
$teacherlogin="<a href=teacher.php>".get_message('Login for teachers')."</a>";
/* authentication has not been performed */
/* so let's do it here */
// require('php/auth_form.php');
}
//require('php/footer.php');
require('./templates/index.jade.php');
?>