[feladat @ 76]
Changed some of the functions that are used for the listing of (all)
zones. Instead of getting all zones from the database, it now only
requests exactlty what it needs. Considerable perfomance improvement.
<?phprequire_once("inc/i18n.inc.php");require_once("inc/toolkit.inc.php");include_once("inc/header.inc.php");$num_all_domains=zone_count(0);$doms=zone_count(0,LETTERSTART);?><h2><?echo_('List zones');?></h2><?echo"<div class=\"showmax\">";show_pages($doms,ROWAMOUNT);echo"</div>";if($num_all_domains>ROWAMOUNT){echo"<div class=\"showmax\">";show_letters(LETTERSTART);echo"</div>";}?><table><tr><th> </th><th><?echo_('Name');?></th><th><?echo_('Type');?></th><th><?echo_('Records');?></th><th><?echo_('Owner');?></th></tr><tr><?if($num_all_domains<ROWAMOUNT){$doms=get_domains(0,"all",ROWSTART,ROWAMOUNT);}else{$doms=get_domains(0,LETTERSTART,ROWSTART,ROWAMOUNT);$num_show_domains=count($doms);}// If the user doesnt have any domains print a message saying soif($doms<0){?><tr><td> </td><tdcolspan="4"><?echo_('There are no zones.');?></td></tr><?}// If he has domains, dump them (duh)else{foreach($domsas$c){?><tr><?if(level(5)){?><td><ahref="edit.php?id=<?echo$c["id"]?>"><imgsrc="images/edit.gif"title="<?echo_('Edit zone')." ".$c['name'];?>"alt="[ <?echo_('Edit zone')." ".$c['name'];?> ]"></a><ahref="delete_domain.php?id=<?echo$c["id"]?>"><imgsrc="images/delete.gif"title="<?print_('Delete zone')." ".$c['name'];?>"alt="[<?echo_('Delete zone')." ".$c['name'];?>]"></a></td><?}else{?><tdclass="n"> </td><?}?><tdclass="y"><?echo$c["name"]?></td><tdclass="y"><?echostrtolower(get_domain_type($c["id"]))?></td><tdclass="y"><?echo$c["numrec"]?></td><tdclass="y"><?echoget_owners_from_domainid($c["id"])?></td></tr><?print"\n";}}?></table><?if($num_all_domains<ROWAMOUNT){?><p><?printf(_('This lists shows all %s zones(s) you have access to.'),$num_all_domains);?></p><?}else{?><p><?printf(_('This lists shows %s out of %s zones you have access to.'),$num_show_domains,$num_all_domains);?></p><?}?><?// RZ TODO Check next, does it work? // <small> echo _('You only administer some records of domains marked with an (*).'); </small>?><?include_once("inc/footer.inc.php");?>