Project

General

Profile

Download (4.93 KB) Statistics
| Branch: | Tag: | Revision:
1 d03efa9c Scott Ullrich
<?php
2 b46bfcf5 Bill Marquette
/* $Id$ */
3 5b237745 Scott Ullrich
/*
4 f1f60c92 Ermal Luçi
	Copyright (C) 2008 Ermal Lu?i
5 5b237745 Scott Ullrich
	All rights reserved.
6 d03efa9c Scott Ullrich
7 5b237745 Scott Ullrich
	Redistribution and use in source and binary forms, with or without
8
	modification, are permitted provided that the following conditions are met:
9 d03efa9c Scott Ullrich
10 5b237745 Scott Ullrich
	1. Redistributions of source code must retain the above copyright notice,
11
	   this list of conditions and the following disclaimer.
12 d03efa9c Scott Ullrich
13 5b237745 Scott Ullrich
	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 d03efa9c Scott Ullrich
17 5b237745 Scott Ullrich
	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 6b07c15a Matthew Grooms
##|+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 5b237745 Scott Ullrich
require("guiconfig.inc");
38
39 f1f60c92 Ermal Luçi
if (!is_array($config['dyndnses']['dyndns']))
40
	$config['dyndnses']['dyndns'] = array();
41 5b237745 Scott Ullrich
42 f1f60c92 Ermal Luçi
$a_dyndns = &$config['dyndnses']['dyndns'];
43 d03efa9c Scott Ullrich
44 f1f60c92 Ermal Luçi
if ($_GET['act'] == "del") {
45
		unset($a_dyndns[$_GET['id']]);
46 d03efa9c Scott Ullrich
47 5b237745 Scott Ullrich
		write_config();
48 d03efa9c Scott Ullrich
49 f1f60c92 Ermal Luçi
		header("Location: services_dyndns.php");
50
		exit;
51 5b237745 Scott Ullrich
}
52 4df96eff Scott Ullrich
53 f1f60c92 Ermal Luçi
$pgtitle = array("Services", "Dynamic DNS clients");
54 4df96eff Scott Ullrich
include("head.inc");
55
56 5b237745 Scott Ullrich
?>
57 4df96eff Scott Ullrich
58 5b237745 Scott Ullrich
<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
59
<?php include("fbegin.inc"); ?>
60 f1f60c92 Ermal Luçi
<form action="services_dyndns.php" method="post" name="iform" id="iform">
61 5b237745 Scott Ullrich
<?php if ($input_errors) print_input_errors($input_errors); ?>
62 f1f60c92 Ermal Luçi
<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 9b8dc821 Scott Ullrich
				</tr>
82 f1f60c92 Ermal Luçi
			  <?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 7d9dca1c Ermal Luçi
						$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 f1f60c92 Ermal Luçi
						$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 5b237745 Scott Ullrich
                  </td>
102 f1f60c92 Ermal Luçi
                  <td class="listr">
103
					<?=htmlspecialchars($dyndns['host']);?>
104 5b237745 Scott Ullrich
                  </td>
105 f1f60c92 Ermal Luçi
                  <td class="listbg">
106
                    <?=htmlspecialchars($dyndns['descr']);?>&nbsp;
107 07bd3f83 Scott Ullrich
                  </td>
108 f1f60c92 Ermal Luçi
                  <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
                     &nbsp;<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 07bd3f83 Scott Ullrich
				</tr>
111 f1f60c92 Ermal Luçi
			  <?php $i++; endforeach; ?>
112 07bd3f83 Scott Ullrich
                <tr>
113 f1f60c92 Ermal Luçi
                  <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 07bd3f83 Scott Ullrich
				</tr>
116 f1f60c92 Ermal Luçi
				<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">&nbsp;</td>
123 07bd3f83 Scott Ullrich
				</tr>
124 5b237745 Scott Ullrich
              </table>
125 f1f60c92 Ermal Luçi
	      </div>
126
	</td>
127
	</tr>
128
</table>
129 5b237745 Scott Ullrich
</form>
130
<?php include("fend.inc"); ?>
131
</body>
132
</html>