-
Notifications
You must be signed in to change notification settings - Fork 0
/
catalog.php
73 lines (63 loc) · 1.52 KB
/
catalog.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
<?php
require_once "php/allow_entry.php";
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<link rel="stylesheet" type="text/css" href="css/catalog.css">
<title>Text Annotation Project</title>
</head>
<body>
<div id="wrapper">
<div id="header">
<div id="header_content">
<div id="logo">
<a id="link_logo" href="index.php">Text Annotation</a>
</div>
<div id="user_menu">
<p id="username"><?php echo $_SESSION['username']; ?></p>
<a id="exit_button" href="php/exit.php"><img src="css/img/exit_button.png"></a>
</div>
<div id="tools">
<a id="add_button" href="new_document.php">Добавить</a>
</div>
</div>
</div>
<div id="content">
<div id="page">
<table id="catalog">
<?php
$page = 0;
if (!$_GET['page'])
{
$page = 1;
}
else
{
$page = strip_tags($_GET['page']);
}
require_once "php/fill_catalog.php";
?>
</table>
<div id="pagination">
<?php
if ($page > 1)
{
echo "<a id='previous' href='catalog.php?page=".($page-1)."'>←</a>";
}
if ($page != 1) echo "<span id='current_page'>".$page."</span>";
if ($page*20 < $limit)
{
echo "<a id='next' href='catalog.php?page=".($page+1)."'>→</a>";
}
?>
</div>
</div>
</div>
<div id="footer">
<p id="project_name">KFU ITIS. 2013 (c)</p>
</div>
</div>
</body>
</html>