-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
66 lines (55 loc) · 2.31 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
59
60
61
62
63
64
65
66
<?php
session_start();
//$_SESSION['pdf'] = "slides.pdf";
//$_SESSION['notes'] = "notes.txt";
include("tools/config.php");
// The master doesn't need any auth.
if (!((bool) strpos($_SERVER['HTTP_USER_AGENT'],'iPad')) && !isset($_GET["ipad"]))
{
require("viewer/viewer.php");
exit;
}
if (isset($_GET['submit']) && isset($_POST['passwd']))
{
if (md5($_POST['passwd']) == $authhash)
{
$_SESSION['passwd'] = md5($_POST['passwd']);
}
}
if (isset($_SESSION['passwd']) && $_SESSION['passwd'] == $authhash)
{
if (((bool) strpos($_SERVER['HTTP_USER_AGENT'],'iPad')) || isset($_GET["ipad"]))
require("ipad/ipad.php");
else
require("viewer/viewer.php");
exit;
}
$url = $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];
?>
<!DOCTYPE html>
<html>
<head>
<title>Presenter<?php
if (((bool) strpos($_SERVER['HTTP_USER_AGENT'],'iPad')) || isset($_GET["ipad"])) echo "";
else echo " - Master"; ?></title>
<meta name="apple-mobile-web-app-capable" content="yes" />
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="http://<?php echo $url; ?>touch-icon.png" />
<link rel="shortcut icon" href="http://<?php echo $url; ?>touch-icon.ico">
<meta id="viewport" name="viewport" content="initial-scale=1.0, user-scalable=no">
<link rel="stylesheet" href="index.css" type="text/css"/>
<script type="text/javascript" src="lib/jquery-min.js"></script>
<script type="text/javascript">$(function(){$(document).bind('touchmove', false);})</script>
</head>
<body>
<div id="wrapperMain">
<h1>PRESENTER</h1><br/>
<form action="?submit<?php if (isset($_GET["ipad"])) echo "&ipad";?>" method="post">
<input type="hidden" name="slideHeight" value="600">
<input type="hidden" name="slideWidth" value="800">
<input type="checkbox" name="enableDrawing" value="yes"> Enable drawing?<br>
<input name="passwd" type="password" size="12" maxlength="12"/>
<input type="submit" value="Login" />
</form>
</div>
</body>
</html>