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
+ − 6
$all_doms = get_domains ( 0 );
15
+ − 7
$num_all_domains = ( $all_doms == - 1 ) ? 0 : count ( $all_doms );
13
+ − 8
$doms = get_domains ( 0 , LETTERSTART );
+ − 9
?>
+ − 10
<h2> <? echo _ ( 'List zones' ); ?> </h2>
+ − 11
<?
20
+ − 12
echo "<div class= \" showmax \" >" ;
+ − 13
show_pages ( count ( $doms ), ROWAMOUNT );
+ − 14
echo "</div>" ;
+ − 15
13
+ − 16
if ( $num_all_domains > ROWAMOUNT )
+ − 17
{
+ − 18
echo "<div class= \" showmax \" >" ;
+ − 19
show_letters ( LETTERSTART , $all_doms );
+ − 20
echo "</div>" ;
+ − 21
}
+ − 22
?>
+ − 23
<table>
+ − 24
<tr>
+ − 25
<th> </th>
+ − 26
<th> <? echo _ ( 'Name' ); ?> </th>
+ − 27
<th> <? echo _ ( 'Type' ); ?> </th>
+ − 28
<th> <? echo _ ( 'Records' ); ?> </th>
+ − 29
<th> <? echo _ ( 'Owner' ); ?> </th>
+ − 30
</tr>
+ − 31
<tr>
+ − 32
+ − 33
<?
+ − 34
if ( $num_all_domains < ROWAMOUNT ) {
+ − 35
$doms = get_domains ( 0 , "all" , ROWSTART , ROWAMOUNT );
+ − 36
} else {
+ − 37
$doms = get_domains ( 0 , LETTERSTART , ROWSTART , ROWAMOUNT );
+ − 38
$num_show_domains = count ( $doms );
+ − 39
}
+ − 40
+ − 41
// If the user doesnt have any domains print a message saying so
+ − 42
if ( $doms < 0 )
+ − 43
{
+ − 44
?>
+ − 45
<tr>
+ − 46
<td> </td>
+ − 47
<td colspan= "4" > <? echo _ ( 'There are no zones.' ); ?> </td>
+ − 48
</tr>
+ − 49
<?
+ − 50
}
+ − 51
+ − 52
// If he has domains, dump them (duh)
+ − 53
else
+ − 54
{
+ − 55
foreach ( $doms as $c )
+ − 56
{
+ − 57
?>
+ − 58
+ − 59
<tr>
+ − 60
<?
+ − 61
if ( level ( 5 ))
+ − 62
{
+ − 63
?>
+ − 64
<td>
+ − 65
<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>
+ − 66
<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>
+ − 67
</td>
+ − 68
<?
+ − 69
}
+ − 70
else
+ − 71
{
+ − 72
?>
+ − 73
<td class= "n" >
+ − 74
+ − 75
</td>
+ − 76
<?
+ − 77
}
+ − 78
?>
+ − 79
<td class= "y" > <? echo $c [ "name" ] ?> </td>
+ − 80
<td class= "y" > <? echo strtolower ( get_domain_type ( $c [ "id" ])) ?> </td>
+ − 81
<td class= "y" > <? echo $c [ "numrec" ] ?> </td>
+ − 82
<td class= "y" > <? echo get_owner_from_id ( $c [ "owner" ]) ?> </td>
+ − 83
</tr> <?
+ − 84
print " \n " ;
+ − 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
?>