This repository has been archived by the owner on Jun 10, 2020. It is now read-only.
/
session-index.php
66 lines (58 loc) · 2.06 KB
/
session-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
59
60
61
62
63
64
65
<?php
# Perform database initialization
require_once("config.php");
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Slide Atlas</title>
<script src="libs/jquery/jquery-1.7.2.min.js"></script>
<script src="libs/jquery.mobile/jquery.mobile-1.1.0.min.js"></script>
<link rel="stylesheet" href="libs/jquery.mobile/jquery.mobile-1.1.0.min.css">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<link rel="apple-touch-icon" href="favicon.ico">
<link rel="stylesheet" href="css/common.css" type="text/css">
</head>
<body>
<!-- Index pages -->
<div data-role="page">
<div data-role="header" data-position="fixed" data-tap-toggle="false">
<div class="ui-btn-left">
<a data-role="button" data-icon="arrow-u" data-iconpos="right" data-ajax="false" href="index.php">Return</a>
</div>
<h1>Slide Atlas</h1>
<div class="ui-btn-right">
<a href="" data-role="button" data-icon="gear" class='ui-btn-right' data-theme="<?php echo(($_SESSION['auth'] == 'admin') ? "b" : "a"); ?>">Options</a>
</div>
</div><!-- /header -->
<div data-role="content">
<div id="banner">
<h2>Session Index</h2>
</div>
<p>This website is supported on multiple devices including iPad, iPhone and latest desktop browsers</p>
<ul data-role="listview" data-inset="true">
<?php
# Loop through sessions
$conn = new Mongo('mongodb://' . $server);
$sessColl = $conn->selectDB($database)->selectCollection('sessions');
foreach ($sessColl->find()->sort(array('name' => 1)) as $sessDoc)
{
if (array_key_exists('label', $sessDoc))
{
$sessTitle = $sessDoc['label'];
}
else
{
$sessTitle = $sessDoc['name'];
}
echo '<li><a data-ajax="false" rel="external" href="session.php?sess=' , $sessDoc['_id'] , '">' , $sessTitle , '</a></li>' , "\n";
}
?>
</ul>
</div><!-- /content -->
</div><!-- /page -->
</body>
</html>