-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
56 lines (53 loc) · 1.57 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
<?
if($_POST["dbLogin"]=="ВОЙТИ"){
$pass=md5($_POST["pass"]);
}
$title="Доступ к складу | TYLER Storage: Sk";
$path="";
require_once($path."library.php");
require_once($path."head.php");
if($_POST["dbLogin"]=="ВОЙТИ"){
cook("user",$pass);
}
?>
<div class="container">
<h1>TYLER Storage: Sk</h1>
<?
if($pass=="" || $access==0){
if($_POST["dbLogin"]=="ВОЙТИ" && $access===0){
echo '<p style="color:red">Введён неправильный код</p>';
}
?>
<p>Пожалуйста введите свой код доступа</p>
<form action="" method="post">
<br /><input type="password" name="pass" placeholder="*****" />
<br /><br /><input type="submit" value="ВОЙТИ" class="btnSubmit" name="dbLogin" />
</form>
<?
}
if($access==1){
echo '<p>Вам открыт доступ к складу. Ваши права: '.$userAccess.'</p><br />';
if($accessView===1){
echo '<p><a href="view">Просмотреть состояние склада</a></p>';
}else{
echo '<p>Просмотреть состояние склада</p>';
}
if($accessEdit===1){
echo '<p><a href="edit">Обновить склад</a></p>';
}else{
echo '<p>Обновить склад</p>';
}
if($accessApi===1){
echo '<p><a href="api">Доступ к API</a></p>';
}else{
echo '<p>Доступ к API</p>';
}
if($accessHistory===1){
echo '<p><a href="history">История склада</a></p>';
}else{
echo '<p>История склада</p>';
}
}
?>
</div>
</body></html>