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
?>
+ − 9
<h2> <? echo _ ( 'List zones' ); ?> </h2>
+ − 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>
+ − 59
<?
36
+ − 60
if ( level ( 5 ))
+ − 61
{
13
+ − 62
?>
+ − 63
<td>
+ − 64
<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>
+ − 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
</td>
+ − 67
<?
36
+ − 68
}
+ − 69
else
+ − 70
{
13
+ − 71
?>
+ − 72
<td class= "n" >
+ − 73
+ − 74
</td>
+ − 75
<?
36
+ − 76
}
13
+ − 77
?>
+ − 78
<td class= "y" > <? echo $c [ "name" ] ?> </td>
26
+ − 79
<td class= "y" > <? echo strtolower ( get_domain_type ( $c [ "id" ])) ?> </td>
13
+ − 80
<td class= "y" > <? echo $c [ "numrec" ] ?> </td>
36
+ − 81
+ − 82
<?
+ − 83
$zone_owners = get_owners_from_domainid ( $c [ "id" ]);
+ − 84
if ( $zone_owners == "" )
+ − 85
{
+ − 86
echo "<td class= \" n \" ></td>" ;
+ − 87
}
+ − 88
else
+ − 89
{
+ − 90
print "<td class= \" y \" >" . $zone_owners . "</td>" ;
+ − 91
}
+ − 92
print "<tr> \n " ;
13
+ − 93
}
+ − 94
}
+ − 95
+ − 96
?>
+ − 97
</table>
+ − 98
+ − 99
<?
+ − 100
if ( $num_all_domains < ROWAMOUNT ) {
+ − 101
?>
+ − 102
<p> <? printf ( _ ( 'This lists shows all %s zones(s) you have access to.' ), $num_all_domains ); ?> </p>
+ − 103
<?
+ − 104
}
+ − 105
else
+ − 106
{
+ − 107
?>
+ − 108
<p> <? printf ( _ ( 'This lists shows %s out of %s zones you have access to.' ), $num_show_domains , $num_all_domains ); ?> </p>
+ − 109
<?
+ − 110
}
+ − 111
?>
+ − 112
+ − 113
+ − 114
<? // RZ TODO Check next, does it work?
+ − 115
// <small> echo _('You only administer some records of domains marked with an (*).'); </small>
+ − 116
?>
+ − 117
+ − 118
<?
+ − 119
include_once ( "inc/footer.inc.php" );
+ − 120
?>