-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
149 lines (124 loc) · 6.13 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
<?php require_once 'users/init.php' ?>
<?php require_once 'php/version.php' ?>
<?php if (!securePage($_SERVER['PHP_SELF'])) { die(); } ?>
<?php include 'php/evaluations.php' ?>
<?php
$eval = new SMART_EVALUATION(array(
'username' => $user->data()->username,
'company' => $user->data()->company,
'shared' => $user->data()->shared,
'license' => $user->data()->license,
'id' => isset($_POST['id']) ? $_POST['id'] : 0
));
$eval->check_license();
?>
<!DOCTYPE html>
<html lang="en" prefix="dcterms: http://purl.org/dc/terms/ schema: http://schema.org/" typeof="schema:WebPage">
<head>
<meta charset="utf-8"/>
<title>Ace SMART</title>
<link rel="stylesheet" href="https://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" />
<link rel="stylesheet" href="https://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css"/>
<link rel="stylesheet" type="text/css" href="css/a11y.css<?= '?v=' . $smart_version ?>"/>
<link rel="stylesheet" type="text/css" href="css/tabs.css<?= '?v=' . $smart_version ?>"/>
<link rel="stylesheet" type="text/css" href="css/drag-drop.css<?= '?v=' . $smart_version ?>"/>
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.12.1/css/jquery.dataTables.min.css"/>
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/responsive/2.3.0/css/responsive.dataTables.min.css"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<!-- DC metadata -->
<meta property="dcterms:created" content="2017-03-02"/>
<meta property="dcterms:description" content="The Ace SMART tool aids in the evaluation of EPUB publications for conformance to the EPUB Accessibility specification."/>
<meta property="dcterms:language" content="en"/>
<!-- schema.org a11y metadata -->
<meta property="schema:accessibilityFeature" content="structuralNavigation"/>
<meta property="schema:accessibilityFeature" content="displayTransformability"/>
<meta property="schema:accessMode" content="textual"/>
<meta property="schema:accessModeSufficient" content="textual"/>
<meta property="schema:accessibilityHazard" content="none"/>
<link rel="icon" type="image/x-icon" href="https://smart.daisy.org/favicon.ico" sizes="any"/>
<script async src="https://www.googletagmanager.com/gtag/js?id=G-MPVGJVDGL8"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-MPVGJVDGL8');
</script>
<script>
var smart_lang = 'en';
var smart_locale = 'en-us';
</script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
<!-- DataTables -->
<script type="text/javascript" src="https://cdn.datatables.net/1.12.1/js/jquery.dataTables.min.js"></script>
<script type="text/javascript" src="https://cdn.datatables.net/responsive/2.3.0/js/dataTables.responsive.min.js"></script>
<script type="text/javascript" src="js/init-datatables.js<?= '?v=' . $smart_version ?>"></script>
<script type="text/javascript" src="js/js.cookie.js<?= '?v=' . $smart_version ?>"></script>
<!-- messages -->
<script src="js/config/messages.js<?= '?v=' . $smart_version ?>"></script>
<?php
if (isset($_POST['action'])) {
if ($_POST['action'] == 'delete') {
if (!$eval->delete_evaluation()) {
echo '<script>alert(smart_errors.en.delfail);</script>';
}
}
else if ($_POST['action'] == 'fulldelete') {
if (!$eval->delete_record()) {
echo '<script>alert(smart_errors.en.recfail);</script>';
}
}
}
?>
<script src="js/drag-drop.js<?= '?v=' . $smart_version ?>" defer></script>
<script src="js/init-index.js<?= '?v=' . $smart_version ?>" defer></script>
</head>
<body>
<header>
<div class="id"><span class="super">You are logged in as <code><a target="_blank" href="users/account.php"><?php echo $user->data()->username; ?></a></code></span> <a class="logout" href="users/logout.php"><img src="images/logout.png" alt="log out" title="Log out" onmouseover="this.src='images/logout_hover.png'" onmouseout="this.src='images/logout.png'"></a></div>
<h1><img src="images/daisy_high.jpg" class="logo" alt="DAISY"/> <span property="dcterms:title">Ace <span class="smart_hd">SMART</span></span></h1>
<div class="menubar"></div>
</header>
<main class="start">
<section id="load">
<h2 class="welcome">Start an Evaluation</h2>
<?php $eval->add_evaluation_form() ?>
</section>
<section id="history"<?php if ($user->data()->shared) { echo ' hidden=""'; } ?>>
<h2 class="welcome">Evaluation History</h2>
<table id="evaluations" class="table responsive table-striped table-bordered">
<thead>
<tr>
<th data-priority="1">Title</th>
<th>Started</th>
<th data-priority="4">Last Saved</th>
<th data-priority="3">Status</th>
<th data-priority="2">Options</th>
</tr>
</thead>
<tbody>
<?php $eval->list_evaluations(); ?>
</tbody>
</table>
<?php $eval->allow_full_delete(); ?>
<p><small>All times are in UTC.</small><p>
</section>
</main>
<div id="import" aria-label="Resume from locally saved file" title="Resume from locally saved file">
<input type="file" name="local-eval" id="local-eval"/>
</div>
<div id="error" aria-label="Error" title="Error">
<p id="error-msg"></p>
</div>
<footer>
<p><a target="_blank" href="http://www.github.com/daisy/ace-smart/issues">Report a problem</a> |
<a target="_blank" href="http://www.daisy.org/terms-use">Terms of Use</a> |
<a target="_blank" href="attribution.html">Attribution</a> |
<a href="user-guide/" target="_blank">User Guide</a> |
<a href="faq.html" target="_blank">FAQ</a> |
<a href="new.html" target="_blank">What's New</a> |
<a href="https://daisy.org/KBSponsor" target="_blank">Support</a></p>
<p>Copyright © <span property="dcterms:dateCopyrighted">2022</span> <a target="_blank" href="http://daisy.org"><span property="dcterms:publisher">DAISY</span> Consortium</a>. All Rights Reserved.</p>
</footer>
</body>
</html>