<?phprequire_once("inc/i18n.inc.php");require_once('inc/toolkit.inc.php');if(isset($_POST['s_submit'])||isset($_POST['q'])){$submitted=true;$search_result=search_record($_POST['q']);}// we will continue after the search form ... include_once('inc/header.inc.php');?><h2><?echo_('Search zones or records');?></h2><h3>Query</h3><table><formmethod="post"action="<?echo$_SERVER['PHP_SELF']?>"><tr><tdclass="n"><?echo_('Enter a hostname or IP address');?></td><tdclass="n"><inputtype="text"class="input"name="q"></td></tr><tr><tdclass="n"> </td><tdclass="n"><inputtype="submit"class="button"name="s_submit"value="<?echo_('Search');?>"></td></tr></form></table><?php// resultsif($submitted){echo'<br><br>';// let's check if we found any domains ...if(count($search_result)==2&&count($search_result['domains'])){?><h4><?echo_('Zones found');?>:</h4><table><tr><th> </th><th><?echo_('Name');?></th><th><?echo_('Records');?></th><th><?echo_('Owner');?></th></tr><?phpforeach($search_result['domains']as$d){?><tr><?if(level(5)){?><tdclass="n"><ahref="edit.php?id=<?echo$d["id"]?>"><imgsrc="images/edit.gif"title="<?echo_('Edit zone')." ".$d['name'];?>"alt="[ <?echo_('Edit zone')." ".$d['name'];?> ]"></a><ahref="delete_domain.php?id=<?echo$d["id"]?>"><imgsrc="images/delete.gif"title="<?print_('Delete zone')." ".$d['name'];?>"alt="[<?echo_('Delete zone')." ".$d['name'];?>]"></a></td><?}else{?><tdclass="n"> </td><?}?><tdclass="y"><?echo$d['name']?></td><tdclass="y"><?echo$d['numrec']?></td><tdclass="y"><?echoget_owner_from_id($d['owner'])?></td></tr><?php}// end foreach ...?></table><br><br><?php}// end if// any records ?!if(count($search_result['records'])){?><b><?echo_('Records found');?>:</b><p><table><tr><tdclass="n"> </td><tdclass="n"><?echo_('Name');?></td><tdclass="n"><?echo_('Type');?></td><tdclass="n"><?echo_('Content');?></td><tdclass="n"><?echo_('Priority');?></td><tdclass="n"><?echo_('TTL');?></td></tr><?phpforeach($search_result['records']as$r){?><tr><tdclass="n"><?phpif(($r["type"]!="SOA"&&$r["type"]!="NS")||($GLOBALS["ALLOW_SOA_EDIT"]&&$r["type"]=="SOA")||($GLOBALS["ALLOW_NS_EDIT"]&&$r["type"]=="NS")||($r["type"]=="NS"&&get_name_from_record_id($r["id"])!=get_domain_name_from_id(recid_to_domid($r["id"]))&&$GLOBALS["ALLOW_NS_EDIT"]!=1)){?><ahref="edit_record.php?id=<?echo$r['id']?>&domain=<?echo$r['domain_id']?>"><imgsrc="images/edit.gif"alt="[ <?echo_('Edit record');?> ]"border="0"></a><ahref="delete_record.php?id=<?echo$r['id']?>&domain=<?echo$r['domain_id']?>"><imgsrc="images/delete.gif"alt="[ <?echo_('Delete record');?> ]"border="0"></a><?php}// big if ;-)?></td><tdclass="y"><?echo$r['name']?></td><tdclass="y"><?echo$r['type']?></td><tdclass="y"><?echo$r['content']?></td><?phpif($r['prio']!=0){?><tdclass="y"><?echo$r['prio']?></td><?php}else{?><tdclass="n"></td><?php}// else?><tdclass="y"><?echo$r['ttl']?></td></tr><?php}// foreach?></table><?php}// ifif(count($search_result['domains'])==0&&count($search_result['records'])==0){?><tableborder="0"cellspacing="4"><tr><tdwidth="510"class="n"><?echo_('Nothing found for query');?>"<?echo$_POST['q']?>"</td></tr></table><?}}include_once('inc/footer.inc.php');?>