Project

General

Profile

Download (4.56 KB) Statistics
| Branch: | Tag: | Revision:
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
	pfSense_MODULE:	dnsupdate
30
*/
31

    
32
##|+PRIV
33
##|*IDENT=page-services-rfc2136clients
34
##|*NAME=Services: RFC 2136 clients page
35
##|*DESCR=Allow access to the 'Services: RFC 2136 clients' page.
36
##|*MATCH=services_rfc2136.php*
37
##|-PRIV
38

    
39
require("guiconfig.inc");
40

    
41
if (!is_array($config['dnsupdates']['dnsupdate']))
42
	$config['dnsupdates']['dnsupdate'] = array();
43

    
44
$a_rfc2136 = &$config['dnsupdates']['dnsupdate'];
45

    
46
if ($_GET['act'] == "del") {
47
	unset($a_rfc2136[$_GET['id']]);
48

    
49
	write_config();
50

    
51
	header("Location: services_rfc2136.php");
52
	exit;
53
}
54

    
55
$pgtitle = array(gettext("Services"), gettext("RFC 2136 clients"));
56
include("head.inc");
57
?>
58

    
59
<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
60
<?php include("fbegin.inc"); ?>
61
<form action="services_rfc2136.php" method="post" name="iform" id="iform">
62
<?php if ($input_errors) print_input_errors($input_errors); ?>
63
<table width="100%" border="0" cellpadding="0" cellspacing="0">
64
  <tr>
65
	<td>
66
<?php
67
	$tab_array = array();
68
	$tab_array[] = array(gettext("DynDns"), false, "services_dyndns.php");
69
	$tab_array[] = array(gettext("RFC 2136"), true, "services_rfc2136.php");
70
	display_top_tabs($tab_array);
71
?>
72
	</td>
73
  </tr>
74
  <tr>
75
	<td>
76
	  <div id="mainarea">
77
	  <table class="tabcont" width="100%" border="0" cellpadding="0" cellspacing="0">
78
		<tr>
79
		  <td width="5%"  class="listhdrr"></td>
80
		  <td width="25%" class="listhdrr"><?=gettext("Hostname");?></td>
81
		  <td width="60%" class="listhdr"><?=gettext("Description");?></td>
82
		  <td width="10%" class="list"></td>
83
		</tr>
84
		<?php $i = 0; foreach ($a_rfc2136 as $rfc2136): ?>
85
		<tr ondblclick="document.location='services_rfc2136_edit.php?id=<?=$i;?>'">
86
		  <td class="listlr">
87
		  <?php
88
			$iflist = get_configured_interface_with_descr();
89
			foreach ($iflist as $if => $ifdesc) {
90
				if ($rfc2136['interface'] == $if) {
91
					if (!isset($rfc2136['enable']))
92
						echo "<span class=\"gray\">{$ifdesc}</span>";
93
					else
94
						echo "{$ifdesc}";
95
					break;
96
				}
97
			}
98
		  ?>
99
		  </td>
100
		  <td class="listr">
101
		  <?php
102
			if (!isset($rfc2136['enable']))
103
				echo "<span class=\"gray\">".htmlspecialchars($rfc2136['host'])."</span>";
104
			else
105
				echo htmlspecialchars($rfc2136['host']);
106
		  ?>
107
		  </td>
108
		  <td class="listbg">
109
		  <?php
110
			if (!isset($rfc2136['enable']))
111
				echo "<span class=\"gray\">".htmlspecialchars($rfc2136['descr'])."</span>";
112
			else
113
				echo htmlspecialchars($rfc2136['descr']);
114
		  ?>
115
		  </td>
116
		  <td valign="middle" nowrap class="list">
117
			<a href="services_rfc2136_edit.php?id=<?=$i;?>"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" width="17" height="17" border="0"></a>
118
			&nbsp;<a href="services_rfc2136.php?act=del&amp;id=<?=$i;?>" onclick="return confirm('<?=gettext("Do you really want to delete this client?");?>')"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" border="0"></a>
119
		  </td>
120
		</tr>
121
		<?php $i++; endforeach; ?>
122
		<tr>
123
		  <td class="list" colspan="3">&nbsp;</td>
124
		  <td class="list"> <a href="services_rfc2136_edit.php"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" width="17" height="17" border="0"></a></td>
125
		</tr>
126
		<tr>
127
		  <td colspan="3" class="list">
128
			<p class="vexpl"><span class="red"><strong><br></strong></span></p>
129
		  </td>
130
		  <td class="list">&nbsp;</td>
131
		</tr>
132
	  </table>
133
	  </div>
134
	</td>
135
	</tr>
136
</table>
137
</form>
138
<?php include("fend.inc"); ?>
139
</body>
140
</html>
(162-162/246)