-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathadmin.php
More file actions
92 lines (90 loc) · 3.04 KB
/
Copy pathadmin.php
File metadata and controls
92 lines (90 loc) · 3.04 KB
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
<?php
include_once "config.php";
include_once "errorlist.php";
include_once "check.php";
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>PhotoVote</title>
<link rel="stylesheet" type="text/css" href="css/style.css"/>
<script type="text/javascript" src="js/function.js"></script>
</head>
<body>
<?php
if ($online == 1) {
include_once "auth2.html";
}
else {
include_once "auth1.html";
}
?>
<?php
if ($online == 1) {
echo "<div id=\"hint\" align=\"center\">Не загрузайте изображения с одинаковыми именами. Изображения должны быть в формате jpg.</div>";
}
?>
<div id="error_div"><?=$error?></div>
<?php
if ($online == 1) {
echo "
<div id=\"load\" align=\"center\">
<form method=\"post\" action=\"editor.php\" enctype=\"multipart/form-data\">
<table width=\"600\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">
<tr>
<td>Ф.И.<input name=\"NS\" type=\"text\"></td>
<td>Фото<input name=\"photo\" type=\"file\"></td>
<td><input name=\"send\" type=\"submit\" value=\"Добавить\"></td>
</tr>
</table>
</form>
</div> ";
}
?>
<div id="content" align="center">
<div id="menu_2">
<ul id="hmenu">
<li><a href="index.php">На главную</a></li>
<li><a href="admin.php">Смотреть рейтинги</a></li>
<li><a href="admin.php?act=rate">10 самых</a></li>
<li><a href="help.php">Помощь</a></li>
</ul>
</div>
<table width="800" id="admin_cp" border="0" cellspacing="2" cellpadding="0">
<tr align="center">
<th>№</th>
<th>Ф.И.</th>
<th>Фото</th>
<th>Суммарный рейтинг</th>
<?php if ($online == 1) {
echo "<th>Редактировать</th>";
}
?>
</tr>
<?php
include_once "modules/pagination.php";
?>
</table>
<div id="pagination">
<?php
if ($_GET["act"] != rate) {
// Проверяем нужны ли стрелки назад
if ($page != 1) $pervpage = '<a href=?page=1><<</a>
<a href=?page='. ($page - 1) .'><</a> ';
// Проверяем нужны ли стрелки вперед
if ($page != $total) $nextpage = ' <a href=?page='. ($page + 1) .'>></a>
<a href=?page=' .$total. '>>></a>';
// Находим две ближайшие станицы с обоих краев, если они есть
if($page - 2 > 0) $page2left = ' <a href=?page='. ($page - 2) .'>'. ($page - 2) .'</a> | ';
if($page - 1 > 0) $page1left = '<a href=?page='. ($page - 1) .'>'. ($page - 1) .'</a> | ';
if($page + 2 <= $total) $page2right = ' | <a href=?page='. ($page + 2) .'>'. ($page + 2) .'</a>';
if($page + 1 <= $total) $page1right = ' | <a href=?page='. ($page + 1) .'>'. ($page + 1) .'</a>';
// Вывод меню
echo $pervpage.$page2left.$page1left.'<b>'.$page.'</b>'.$page1right.$page2right.$nextpage;
}
?>
</div>
</div>
</body>
</html>