1
|
<?php
|
2
|
/* $Id$ */
|
3
|
/*
|
4
|
Copyright (C) 2008 Ermal Lu?i
|
5
|
All rights reserved.
|
6
|
|
7
|
Redistribution and use in source and binary forms, with or without
|
8
|
modification, are permitted provided that the following conditions are met:
|
9
|
|
10
|
1. Redistributions of source code must retain the above copyright notice,
|
11
|
this list of conditions and the following disclaimer.
|
12
|
|
13
|
2. Redistributions in binary form must reproduce the above copyright
|
14
|
notice, this list of conditions and the following disclaimer in the
|
15
|
documentation and/or other materials provided with the distribution.
|
16
|
|
17
|
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
|
18
|
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
|
19
|
AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
20
|
AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
|
21
|
OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
22
|
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
23
|
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
24
|
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
25
|
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
26
|
POSSIBILITY OF SUCH DAMAGE.
|
27
|
*/
|
28
|
|
29
|
##|+PRIV
|
30
|
##|*IDENT=page-services-dynamicdnsclients
|
31
|
##|*NAME=Services: Dynamic DNS clients page
|
32
|
##|*DESCR=Allow access to the 'Services: Dynamic DNS clients' page.
|
33
|
##|*MATCH=services_dyndns.php*
|
34
|
##|-PRIV
|
35
|
|
36
|
|
37
|
require("guiconfig.inc");
|
38
|
|
39
|
if (!is_array($config['dyndnses']['dyndns']))
|
40
|
$config['dyndnses']['dyndns'] = array();
|
41
|
|
42
|
$a_dyndns = &$config['dyndnses']['dyndns'];
|
43
|
|
44
|
if ($_GET['act'] == "del") {
|
45
|
unset($a_dyndns[$_GET['id']]);
|
46
|
|
47
|
write_config();
|
48
|
|
49
|
header("Location: services_dyndns.php");
|
50
|
exit;
|
51
|
}
|
52
|
|
53
|
$pgtitle = array("Services", "Dynamic DNS clients");
|
54
|
include("head.inc");
|
55
|
|
56
|
?>
|
57
|
|
58
|
<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
|
59
|
<?php include("fbegin.inc"); ?>
|
60
|
<form action="services_dyndns.php" method="post" name="iform" id="iform">
|
61
|
<?php if ($input_errors) print_input_errors($input_errors); ?>
|
62
|
<table width="100%" border="0" cellpadding="0" cellspacing="0">
|
63
|
<tr><td>
|
64
|
<?php
|
65
|
$tab_array = array();
|
66
|
$tab_array[] = array("DynDns", true, "services_dyndns.php");
|
67
|
$tab_array[] = array("RFC 2136", false, "services_rfc2136.php");
|
68
|
display_top_tabs($tab_array);
|
69
|
?>
|
70
|
</td></tr>
|
71
|
<tr>
|
72
|
<td>
|
73
|
<div id="mainarea">
|
74
|
<table class="tabcont" width="100%" border="0" cellpadding="0" cellspacing="0">
|
75
|
<tr>
|
76
|
<td width="5%" class="listhdrr"></td>
|
77
|
<td width="15%" class="listhdrr">Service</td>
|
78
|
<td width="20%" class="listhdrr">Hostname</td>
|
79
|
<td width="50%" class="listhdr">Description</td>
|
80
|
<td width="10%" class="list"></td>
|
81
|
</tr>
|
82
|
<?php $i = 0; foreach ($a_dyndns as $dyndns): ?>
|
83
|
<tr>
|
84
|
<td class="listlr">
|
85
|
<?php $iflist = get_configured_interface_with_descr();
|
86
|
foreach ($iflist as $if => $ifdesc):
|
87
|
if ($dyndns['interface'] == $if): ?>
|
88
|
<?=$ifdesc; break;?>
|
89
|
<?php endif; endforeach; ?>
|
90
|
</td>
|
91
|
<td class="listlr">
|
92
|
<?php
|
93
|
$types = explode(",", "DNS-O-Matic, DynDNS (dynamic),DynDNS (static),DynDNS (custom),DHS,DyNS,easyDNS,No-IP,ODS.org,ZoneEdit,Loopia,freeDNS, DNSexit, OpenDNS");
|
94
|
$vals = explode(" ", "dnsomatic dyndns dyndns-static dyndns-custom dhs dyns easydns noip ods zoneedit loopia freedns dnsexit opendns");
|
95
|
$j = 0; for ($j = 0; $j < count($vals); $j++)
|
96
|
if ($vals[$j] == $dyndns['type']) {
|
97
|
echo htmlspecialchars($types[$j]);
|
98
|
break;
|
99
|
}
|
100
|
?>
|
101
|
</td>
|
102
|
<td class="listr">
|
103
|
<?=htmlspecialchars($dyndns['host']);?>
|
104
|
</td>
|
105
|
<td class="listbg">
|
106
|
<?=htmlspecialchars($dyndns['descr']);?>
|
107
|
</td>
|
108
|
<td valign="middle" nowrap class="list"> <a href="services_dyndns_edit.php?id=<?=$i;?>"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" width="17" height="17" border="0"></a>
|
109
|
<a href="services_dyndns.php?act=del&id=<?=$i;?>" onclick="return confirm('Do you really want to delete this VLAN?')"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" border="0"></a></td>
|
110
|
</tr>
|
111
|
<?php $i++; endforeach; ?>
|
112
|
<tr>
|
113
|
<td class="list" colspan="4"></td>
|
114
|
<td class="list"> <a href="services_dyndns_edit.php"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" width="17" height="17" border="0"></a></td>
|
115
|
</tr>
|
116
|
<tr>
|
117
|
<td colspan="3" class="list"><p class="vexpl"><span class="red"><strong>
|
118
|
Note:<br>
|
119
|
</strong></span>
|
120
|
Add something meaningful here.
|
121
|
</td>
|
122
|
<td class="list"> </td>
|
123
|
</tr>
|
124
|
</table>
|
125
|
</div>
|
126
|
</td>
|
127
|
</tr>
|
128
|
</table>
|
129
|
</form>
|
130
|
<?php include("fend.inc"); ?>
|
131
|
</body>
|
132
|
</html>
|