-
Notifications
You must be signed in to change notification settings - Fork 2
/
firewall.php
executable file
·95 lines (85 loc) · 2.77 KB
/
firewall.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
<?php
ob_start();
session_start();
$now = time(); // checking the time now when home page starts
if($now > $_SESSION['expire']){
session_destroy();
header('Location: loginSel.php?erro=3');
//echo "<script> window.location = 'loginSel.php?erro=3'; </script>" ;
}
if(isset($_SESSION['username'])){
$username=$_SESSION['username'];
require_once('header.html');
?>
<!-- MAIN -->
<div id="main" >
<!-- wrapper-main -->
<div class="wrapper">
<!-- headline -->
<div class="clear"></div>
<div id="headline">
<span class="main"><b>Liberação Firewall</b></span><br>
<span class="sub"><b> Bem-vindo, <?php echo $_SESSION['displayname']; ?></b> <a href="logout.php">Logout</a></span>
</div>
<!-- ENDS headline -->
<!-- content -->
<div id="content" >
<div id="page-content">
<form action="libera.php" method="post" name="liberafirewall" id="liberafirewall" >
<b>Faixa de IP:</b><br/>
10 <b>.</b> <input type="text" id="ip1" name="ip1" size="2" maxlength="3" /> <b>.</b> <input type="text" id="ip2" name="ip2" size="2" maxlength="3" /> <b>.</b> 0
<br />
<?php
if (isset($_REQUEST['erro'])){
$erro = strip_tags($_REQUEST['erro']);
if($erro == 1){
echo "<font color=\"red\">IP Inválido</font>";
}
if($erro == 3){
echo "<font color=\"red\">Preencha os campos do IP</font>";
}
}
?>
<br />
<b>Serviços:</b><br/>
<input type="checkbox" id="servico[]" name="servico[]" value="gaia.animaeducacao.com.br" /> GAIA
<input type="checkbox" id="servico[]" name="servico[]" value="datasulteste.anima.intranet" /> Datasul Teste
<br />
<?php
if (isset($_REQUEST['erro'])){
$erro = strip_tags($_REQUEST['erro']);
if($erro == 2){
echo "<font color=\"red\">Escolha ao menos um serviço</font>";
}
}
?>
<br /><br />
<input type="submit" value="Enviar" />
</form>
</div>
</div>
<!-- ENDS content -->
</div>
<!-- ENDS wrapper-main -->
</div>
<!-- ENDS MAIN -->
<!-- Bottom -->
<div id="bottom">
<!-- wrapper-bottom -->
<div class="wrapper">
<div id="bottom-text"></div>
</div>
<!-- ENDS wrapper-bottom -->
</div>
<!-- ENDS Bottom -->
<?php
}
else{
header('Location: loginSel.php');
}
?>
</body>
</html>
<?php
ob_flush();
?>