-
Notifications
You must be signed in to change notification settings - Fork 2
/
datasets.php
53 lines (49 loc) · 1.59 KB
/
datasets.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
<?php
require_once "config.php";
// Initialize the session
session_start();
// Generate User if User does not exists
if(!isset($_COOKIE['user'])){
$id = getGUID();
setcookie('user', $id, time()+315400000,"/");
$_COOKIE['user'] = $id;
}
// Generates GUID for username
function getGUID(){
mt_srand((double)microtime()*10000);//optional for php 4.2.0 and up.
$charid = strtoupper(md5(uniqid(rand(), true)));
$hyphen = chr(45);
$uuid = substr($charid, 0, 8).$hyphen
.substr($charid, 8, 4).$hyphen
.substr($charid,12, 4).$hyphen
.substr($charid,16, 4).$hyphen
.substr($charid,20,12);
return $uuid;
}
$title = 'Platform for Affective Game ANnotation';
include("header.php");
?>
<div id="subheader">
<h2>[Platform for Audiovisual General-purpose ANotation]</h2>
<div class="subheader-buttons">
<?php
if(isset($_SESSION["loggedin"]) && $_SESSION["loggedin"] === true){
echo '<a class="button" href="./logout.php">log out</a>';
} else {
echo '<a class="button" href="./register.php">register</a><a class="button" href="./login.php">log in</a>';
}
?>
</div>
</div>
<div class="page-header">
<div>
<p>Under construction. No official datasets have been released yet...</p>
</div>
</div>
<div>
</div>
<?php
include("scripts.php");
$tooltip = '';
include("footer.php");
?>