[feladat @ 156]
Made a lot of small changes to allow PHP to run with error_reporting E_ALL without giving notices.
Most functions have been checked but some situations might give a notice.
<?php/* PowerAdmin, a friendly web-based admin tool for PowerDNS. * See <https://rejo.zenger.nl/poweradmin> for more details. * * Copyright 2007, 2008 Rejo Zenger <rejo@zenger.nl> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */require_once("inc/toolkit.inc.php");include_once("inc/header.inc.php");if(!level(5)){?><h3><?phpecho_('Oops!');?></h3><p><?phpecho_('You are not allowed to add supermasters with your current access level!');?></p><?php}else{$supermasters=get_supermasters(0);$num_supermasters=($supermasters==-1)?0:count($supermasters);?><h3><?phpprintf(_('List all %s supermasters'),$num_supermasters);?></h3><table><tr><th> </td><th><?phpecho_('IP address of supermaster');?></td><th><?phpecho_('Hostname in NS record');?></td><th><?phpecho_('Account');?></td></tr><?phpif($num_supermasters==0){?><tr><tdclass="n"> </td><tdclass="n"colspan="3"><?phpecho_('No supermasters in this listing, sorry.');?></td></tr><?php}else{foreach($supermastersas$c){?><tr><tdclass="n"><ahref="delete_supermaster.php?master_ip=<?phpecho$c["master_ip"]?>"><imgsrc="images/delete.gif"title="<?phpprint_('Delete supermaster').' '.$c["master_ip"];?>"alt="[ <?phpecho_('Delete supermaster');?> ]"></a></td><tdclass="y"><?phpecho$c["master_ip"]?></td><tdclass="y"><?phpecho$c["ns_name"]?></td><tdclass="y"><?phpecho$c["account"]?></td></tr><?php}}?></table><?php}include_once("inc/footer.inc.php");?>