13
|
1 |
<?php |
|
2 |
require_once("inc/i18n.inc.php"); |
|
3 |
require_once("inc/toolkit.inc.php"); |
|
4 |
include_once("inc/header.inc.php"); |
|
5 |
|
29
|
6 |
$num_all_domains = zone_count(0); |
|
7 |
$doms = zone_count(0, LETTERSTART); |
13
|
8 |
?> |
44
|
9 |
<h2><? echo _('List all zones'); ?></h2> |
13
|
10 |
<? |
29
|
11 |
echo "<div class=\"showmax\">"; |
|
12 |
show_pages($doms,ROWAMOUNT); |
|
13 |
echo "</div>"; |
20
|
14 |
|
29
|
15 |
if ($num_all_domains > ROWAMOUNT) |
13
|
16 |
{ |
29
|
17 |
echo "<div class=\"showmax\">"; |
|
18 |
show_letters(LETTERSTART); |
|
19 |
echo "</div>"; |
13
|
20 |
} |
|
21 |
?> |
|
22 |
<table> |
|
23 |
<tr> |
|
24 |
<th> </th> |
|
25 |
<th><? echo _('Name'); ?></th> |
|
26 |
<th><? echo _('Type'); ?></th> |
|
27 |
<th><? echo _('Records'); ?></th> |
|
28 |
<th><? echo _('Owner'); ?></th> |
|
29 |
</tr> |
|
30 |
<tr> |
|
31 |
|
|
32 |
<? |
|
33 |
if ($num_all_domains < ROWAMOUNT) { |
|
34 |
$doms = get_domains(0,"all",ROWSTART,ROWAMOUNT); |
|
35 |
} else { |
|
36 |
$doms = get_domains(0,LETTERSTART,ROWSTART,ROWAMOUNT); |
34
|
37 |
$num_show_domains = ($doms == -1) ? 0 : count($doms); |
13
|
38 |
} |
|
39 |
|
|
40 |
// If the user doesnt have any domains print a message saying so |
|
41 |
if ($doms < 0) |
|
42 |
{ |
|
43 |
?> |
|
44 |
<tr> |
|
45 |
<td> </td> |
|
46 |
<td colspan="4"><? echo _('There are no zones.'); ?></td> |
|
47 |
</tr> |
|
48 |
<? |
|
49 |
} |
|
50 |
|
|
51 |
// If he has domains, dump them (duh) |
|
52 |
else |
|
53 |
{ |
|
54 |
foreach ($doms as $c) |
|
55 |
{ |
|
56 |
?> |
|
57 |
|
|
58 |
<tr> |
37
|
59 |
<td> |
|
60 |
<a href="edit.php?id=<? echo $c["id"] ?>"><img src="images/edit.gif" title="<? echo _('Edit zone') . " " . $c['name']; ?>" alt="[ <? echo _('Edit zone') . " " . $c['name']; ?> ]"></a> |
13
|
61 |
<? |
36
|
62 |
if (level(5)) |
|
63 |
{ |
13
|
64 |
?> |
|
65 |
<a href="delete_domain.php?id=<? echo $c["id"] ?>"><img src="images/delete.gif" title="<? print _('Delete zone') . " " . $c['name']; ?>" alt="[<? echo _('Delete zone') . " " . $c['name']; ?>]"></a> |
|
66 |
<? |
36
|
67 |
} |
13
|
68 |
?> |
37
|
69 |
</td> |
13
|
70 |
<td class="y"><? echo $c["name"] ?></td> |
26
|
71 |
<td class="y"><? echo strtolower(get_domain_type($c["id"])) ?></td> |
13
|
72 |
<td class="y"><? echo $c["numrec"] ?></td> |
36
|
73 |
|
|
74 |
<? |
|
75 |
$zone_owners = get_owners_from_domainid($c["id"]); |
|
76 |
if ($zone_owners == "") |
|
77 |
{ |
|
78 |
echo "<td class=\"n\"></td>"; |
|
79 |
} |
|
80 |
else |
|
81 |
{ |
|
82 |
print "<td class=\"y\">".$zone_owners."</td>"; |
|
83 |
} |
|
84 |
print "<tr>\n"; |
13
|
85 |
} |
|
86 |
} |
|
87 |
|
|
88 |
?> |
|
89 |
</table> |
|
90 |
|
|
91 |
<? |
|
92 |
if ($num_all_domains < ROWAMOUNT) { |
|
93 |
?> |
|
94 |
<p><? printf(_('This lists shows all %s zones(s) you have access to.'), $num_all_domains); ?></p> |
|
95 |
<? |
|
96 |
} |
|
97 |
else |
|
98 |
{ |
|
99 |
?> |
|
100 |
<p><? printf(_('This lists shows %s out of %s zones you have access to.'), $num_show_domains, $num_all_domains); ?></p> |
|
101 |
<? |
|
102 |
} |
|
103 |
?> |
|
104 |
|
|
105 |
|
|
106 |
<? // RZ TODO Check next, does it work? |
|
107 |
// <small> echo _('You only administer some records of domains marked with an (*).'); </small> |
|
108 |
?> |
|
109 |
|
|
110 |
<? |
|
111 |
include_once("inc/footer.inc.php"); |
|
112 |
?> |