- Timestamp:
- 11/09/09 18:02:24 (15 years ago)
- Location:
- trunk
- Files:
-
- 1 deleted
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/dns.cgi
r30 r31 530 530 531 531 $page->param(qfor => $webvar{qfor}) if $webvar{qfor}; 532 fill_rectypes($webvar{type} ? $webvar{type} : '' );533 $page->param( trace => $webvar{trace}) if $webvar{trace};532 fill_rectypes($webvar{type} ? $webvar{type} : '', 1); 533 $page->param(nrecurse => $webvar{nrecurse}) if $webvar{nrecurse}; 534 534 $page->param(resolver => $webvar{resolver}) if $webvar{resolver}; 535 535 536 536 if ($webvar{qfor}) { 537 537 my $resolv = Net::DNS::Resolver->new; 538 $resolv->tcp_timeout(5); # make me adjustable! 539 $resolv->udp_timeout(5); # make me adjustable! 540 $resolv->recurse(0) if $webvar{nrecurse}; 541 $resolv->nameservers($webvar{resolver}) if $webvar{resolver}; 538 542 my $query = $resolv->query($webvar{qfor}, $typemap{$webvar{type}}); 539 543 if ($query) { … … 546 550 my %row; 547 551 my ($host,$ttl,$class,$type,$data) = 548 ($rr->string =~ /^([0-9a-zA-Z_.-]+)\s+(\d+)\s+([A-Za-z]+)\s+([A-Za-z]+)\s+(.+)$/ );552 ($rr->string =~ /^([0-9a-zA-Z_.-]+)\s+(\d+)\s+([A-Za-z]+)\s+([A-Za-z]+)\s+(.+)$/s); 549 553 $row{host} = $host; 550 554 $row{ftype} = $type; 551 $row{rdata} = $data;555 $row{rdata} = ($type eq 'SOA' ? "<pre>$data</pre>" : $data); 552 556 push @answer, \%row; 553 557 } … … 589 593 ## done DNS query 590 594 595 } elsif ($webvar{page} eq 'axfr') { 596 597 # don't need this while we've got the dropdown in the menu. hmm. 598 #fill_grouplist; 599 600 $page->param(ifrom => $webvar{ifrom}) if $webvar{ifrom}; 601 $page->param(rwsoa => $webvar{rwsoa}) if $webvar{rwsoa}; 602 $page->param(rwns => $webvar{rwns}) if $webvar{rwns}; 603 $page->param(importdoms => $webvar{importdoms}) if $webvar{importdoms}; 604 ##work 605 push @debugbits, "<pre>$webvar{importdoms}</pre>"; 591 606 } 592 607 … … 756 771 sub fill_rectypes { 757 772 my $type = shift || $reverse_typemap{A}; 773 my $soaflag = shift || 0; 758 774 759 775 my $sth = $dbh->prepare("SELECT val,name FROM rectypes WHERE stdflag=1 ORDER BY listorder"); … … 765 781 push @typelist, \%row; 766 782 } 783 if ($soaflag) { 784 my %row = ( recval => $reverse_typemap{SOA}, recname => 'SOA' ); 785 $row{tselect} = 1 if $reverse_typemap{SOA} == $type; 786 push @typelist, \%row; 787 } 767 788 $page->param(typelist => \@typelist); 768 } 789 } # fill_rectypes 769 790 770 791 sub fill_recdata { -
trunk/templates/axfr.tmpl
r2 r31 1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 2 <HTML> 3 <HEAD> 4 <meta http-equiv="content-type" content="text/html; charset=iso-8859-1"> 5 <TITLE>VegaDNS Administration</TITLE> 6 <link rel="STYLESHEET" type="text/css" href="templates/core-style.css"> 7 <!--[if gte IE 5.5000]> 8 <script type="text/javascript" src="templates/pngfix.js"></script> 9 <![endif]--> 10 </HEAD> 11 <body onload="focus()"> 12 <table border="0" height="100%" width="100%"> 1 <!-- <TMPL_VAR NAME=sid> --> 2 <table class="wholepage"><tr> 3 <TMPL_INCLUDE NAME="menu.tmpl"> 13 4 14 <tr valign="top">5 <td align="center"> 15 6 16 <td class="border" width="20%" align="left"> 17 <b>test@test.com</b> logged in<br> 18  <a href="/index.php?VDNSSessid=65d033c4ff10d2e73c9ca1050c7746f1&state=end">log out</a> 19 <hr> 20 <table border="0" cellpadding="0" cellspacing="0"> 7 <TMPL_IF errmsg><div class="errmsg">Query error: <TMPL_VARNAME=errmsg></div></TMPL_IF> 21 8 22 <tr><td><table cellpadding="0" cellspacing="0" border="0"><tr><td><img border="0" alt="home" 23 src="images/home.png"></td><td><a 24 href="/index.php?VDNSSessid=65d033c4ff10d2e73c9ca1050c7746f1&state=logged_in&mode=groups&group=1">VegaDNS</a></td></tr></table> 25 <table cellpadding="0" cellspacing="0" border="0"><tr><td><img border="0" src="images/dirtree_tee.gif"><td><img 26 border="0" src="images/newfolder.png"></td><td class="white"><a 27 href="/index.php?VDNSSessid=65d033c4ff10d2e73c9ca1050c7746f1&state=logged_in&mode=domains&group=1">Domains</a></td></tr></table> 28 <table cellpadding="0" cellspacing="0" border="0"><tr><td><img border="0" 29 src="images/dirtree_tee.gif"></td><td><img border="0" src="images/user_folder.png"></td><td><a 30 href="/index.php?VDNSSessid=65d033c4ff10d2e73c9ca1050c7746f1&state=logged_in&mode=users&group=1">Users</a></td></tr></table> 31 <table cellpadding="0" cellspacing="0" border="0"><tr><td><img border="0" 32 src="images/dirtree_tee.gif"></td><td><img border="0" src="images/newfolder.png"></td><td><a 33 href="/index.php?VDNSSessid=65d033c4ff10d2e73c9ca1050c7746f1&state=logged_in&mode=log&group=1">Log</a></td></tr></table> 34 <!-- COUNTER: 1 COUNT: 2 --> 35 <table cellpadding="0" cellspacing="0" border="0"><tr><td><a 36 href="/index.php?VDNSSessid=65d033c4ff10d2e73c9ca1050c7746f1&state=logged_in&expanded=2&group=1&mode=domains&domain_mode=import_domains"><img 37 border="0" alt="home" src="images/dirtree_plus_tee.gif"><td><a 38 href="/index.php?VDNSSessid=65d033c4ff10d2e73c9ca1050c7746f1&state=logged_in&mode=groups&group=2"><img border="0" 39 alt="home" src="images/group.gif"></a></td><td><a 40 href="/index.php?VDNSSessid=65d033c4ff10d2e73c9ca1050c7746f1&state=logged_in&mode=groups&group=2">domain 41 owners</a></td></tr></table> 42 <!-- COUNTER: 2 COUNT: 2 --> 43 <table cellpadding="0" cellspacing="0" border="0"><tr><td><a 44 href="/index.php?VDNSSessid=65d033c4ff10d2e73c9ca1050c7746f1&state=logged_in&expanded=3&group=1&mode=domains&domain_mode=import_domains"><img 45 border="0" alt="home" src="images/dirtree_plus_elbow.gif"><td><a 46 href="/index.php?VDNSSessid=65d033c4ff10d2e73c9ca1050c7746f1&state=logged_in&mode=groups&group=3"><img border="0" 47 alt="home" src="images/group.gif"></a></td><td><a 48 href="/index.php?VDNSSessid=65d033c4ff10d2e73c9ca1050c7746f1&state=logged_in&mode=groups&group=3">bulk 49 hosters</a></td></tr></table> 50 </td></tr> 9 <form action="dns.cgi" method="POST"> 10 <input type=hidden name="sid" value="<TMPL_VAR NAME=sid>"> 11 <input type=hidden name="page" value="axfr"> 12 13 <table> 14 <tr class="tableheader"><td align="center" colspan=2>Import domains via AXFR</td></tr> 15 <tr class="datalinelight"> 16 <td>Import from host:</td> 17 <td><input name="ifrom"<TMPL_IF ifrom> value="<TMPL_VAR NAME=ifrom>"</TMPL_IF>></td> 18 </tr> 19 <tr class="datalinelight"> 20 <td>Import to group:</td> 21 <td> 22 <select name="group"> 23 <TMPL_LOOP NAME=grouplist><option value="<TMPL_VAR NAME=groupval>"<TMPL_IF NAME=groupactive> selected</TMPL_IF>><TMPL_VAR NAME=groupname></option> 24 </TMPL_LOOP></select> 25 </td> 26 </tr> 27 <tr class="datalinelight"> 28 <td>Rewrite SOA to group default?</td> 29 <td><input type=checkbox name="rwsoa"<TMPL_IF rwsoa> checked</TMPL_IF>></td> 30 </tr> 31 <tr class="datalinelight"> 32 <td>Rewrite NS to group default?</td> 33 <td><input type=checkbox name="rwns"<TMPL_IF rwns> checked</TMPL_IF>></td> 34 </tr> 35 <tr class="datalinelight"> 36 <td valign="top">Domains to import:<br />(one per line)</td> 37 <td><textarea name="importdoms" rows=10><TMPL_IF importdoms><TMPL_VAR NAME=importdoms></TMPL_IF></textarea></td> 38 </tr> 39 <tr class="datalinelight"> 40 <td colspan=2 align="center"><input type=submit value=" Import domains "></td> 41 </tr> 51 42 </table> 52 43 44 </form> 53 45 54 55 <hr> 56 <a 57 href="/index.php?VDNSSessid=65d033c4ff10d2e73c9ca1050c7746f1&state=logged_in&mode=default_records">Default 58 Records</a><br> 59 <a 60 href="/index.php?VDNSSessid=65d033c4ff10d2e73c9ca1050c7746f1&state=logged_in&mode=domains&domain_mode=import_domains">AXFR 61 Import</a><br> 62 <a href="/index.php?VDNSSessid=65d033c4ff10d2e73c9ca1050c7746f1&state=logged_in&mode=dnsquery">DNS 63 Query</a><br> 64 <a href="/index.php?VDNSSessid=65d033c4ff10d2e73c9ca1050c7746f1&state=logged_in&mode=whoisquery">Whois 65 Query</a> </td> 66 67 <td align="center"> 68 <img src="images/vegadns-small.png" alt="VegaDNS"><p> 69 <br></b><br> 70 <p><form action="/index.php"> 71 <input type="hidden" name="state" value="logged_in"> 72 <input type="hidden" name="mode" value="domains"> 73 <input type="hidden" name="domain_mode" value="import_domains_now"> 74 <input type="hidden" name="VDNSSessid" value="65d033c4ff10d2e73c9ca1050c7746f1"> 75 76 77 <table border=0 bgcolor="white"> 78 <tr><td> 79 <table border=0 width="100%"> 80 81 <tr bgcolor="#cccccc"><td align="center">Import Domains via AXFR</td></tr> 82 </table> 83 84 <table border=0 width="100%"> 85 <tr bgcolor="#eeeeee"> 86 <td>Hostname or IP address:</td> 87 <td><input type="text" name="hostname" value=""></td> 88 </tr> 89 90 <tr valign="top" bgcolor="#eeeeee"> 91 <td>List of Domains:<br>(one per line)</td> 92 <td><textarea name="domains" rows=10></textarea></td> 93 </tr> 94 </table> 95 </td></tr> 96 </table> 97 Rewrite SOA to default value?<input type="checkbox" name="default_soa"> 98 99 <br>Rewrite NS servers to defalt values?<input type="checkbox" name="default_ns"> 100 <br><br><input type="submit" value="get domains"> 101 </form> 46 </td> 102 47 </tr> 103 48 </table> 104 </center>105 execution time: 0.06 seconds106 </body>107 </html> -
trunk/templates/dnsq.tmpl
r30 r31 28 28 </tr> 29 29 <tr class="datalinelight"> 30 <td> Bypass resolver cache:</td>31 <td><input type=checkbox name=" trace"<TMPL_IF trace> checked</TMPL_IF>></td>30 <td>Non-recursive query:</td> 31 <td><input type=checkbox name="nrecurse"<TMPL_IF nrecurse> checked</TMPL_IF>></td> 32 32 </tr> 33 33 <tr class="datalinelight"> 34 <td> Resolver (optional):</td>34 <td>Use this server:</td> 35 35 <td><input name="resolver" value="<TMPL_VAR NAME=resolver>"></td> 36 36 </tr> … … 40 40 </form> 41 41 42 <br /> 42 43 <TMPL_IF NAME=showresults> 43 44 <table width="350px">
Note:
See TracChangeset
for help on using the changeset viewer.