You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
(23) |
Jul
(16) |
Aug
(10) |
Sep
(1) |
Oct
|
Nov
|
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
|
Feb
|
Mar
|
Apr
(2) |
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2005 |
Jan
(10) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
From: Neil S. <sir...@us...> - 2003-07-23 08:57:22
|
CVSROOT : /cvsroot/publicdnsadmin Module : publicdnsadmin Commit time: 2003-07-23 08:57:20 UTC Modified files: docs/CHANGELOG docs/postgresql.sql lib/header.php Log message: Author: SiRVulcaN <sir...@si...> Log message: - SQL Tweak. - Released 1.2. ---------------------- diff included ---------------------- Index: publicdnsadmin/docs/CHANGELOG diff -u publicdnsadmin/docs/CHANGELOG:1.26 publicdnsadmin/docs/CHANGELOG:1.27 --- publicdnsadmin/docs/CHANGELOG:1.26 Sat Jul 19 06:46:31 2003 +++ publicdnsadmin/docs/CHANGELOG Wed Jul 23 01:57:10 2003 @@ -15,3 +15,5 @@ - Allow template admins to delete multiple records at once in templates. - Disable "Del" button if no checkboxes checked on record lists. SiRVulcaN <sir...@si...> - 20/7/2003 - Mouseover coloring added for tables (from PHPMyAdmin). +SiRVulcaN <sir...@si...> - 23/7/2003 - SQL Tweak. + - Released 1.2. Index: publicdnsadmin/docs/postgresql.sql diff -u publicdnsadmin/docs/postgresql.sql:1.6 publicdnsadmin/docs/postgresql.sql:1.7 --- publicdnsadmin/docs/postgresql.sql:1.6 Wed Jul 16 07:36:51 2003 +++ publicdnsadmin/docs/postgresql.sql Wed Jul 23 01:57:10 2003 @@ -53,4 +53,4 @@ CREATE INDEX gfxcodes_idx ON gfxcodes(code,crc,expire); -INSERT INTO "users" ("username", "password", "name", "email", "company", "permission") VALUES('outsider', '21232f297a57a5a743894a0e4a801fc3', 'DNS Administrator', 'out...@ke...', 'Key2Peace BotServices', 2); +INSERT INTO "users" ("username", "password", "name", "email", "company", "permission") VALUES('administrator', '21232f297a57a5a743894a0e4a801fc3', 'DNS Administrator', 'dns...@ho...', 'PublicDNSAdmin', 2); Index: publicdnsadmin/lib/header.php diff -u publicdnsadmin/lib/header.php:1.14 publicdnsadmin/lib/header.php:1.15 --- publicdnsadmin/lib/header.php:1.14 Fri Jul 18 08:14:23 2003 +++ publicdnsadmin/lib/header.php Wed Jul 23 01:57:10 2003 @@ -7,7 +7,7 @@ Distributed under the GPL license, see LICENSE for more information - $Id: header.php,v 1.14 2003/07/18 15:14:23 sirvulcan Exp $ + $Id: header.php,v 1.15 2003/07/23 08:57:10 sirvulcan Exp $ */ ?> @@ -81,5 +81,5 @@ <table><tr><td> <img src="images/logo.gif"><br> </td></tr><tr><td align="right"> - <font face="verdana" size=1>Public DNS Administrator v1.1</font> + <font face="verdana" size=1>Public DNS Administrator v1.2</font> </td></tr></table> ----------------------- End of diff ----------------------- |
From: Neil S. <sir...@us...> - 2003-07-19 13:46:43
|
CVSROOT : /cvsroot/publicdnsadmin Module : publicdnsadmin Commit time: 2003-07-19 13:46:41 UTC Modified files: edit_record.php edit_template.php edit_zone.php functions.jss index.php styleie.css styleother.css templates.php docs/CHANGELOG lib/config.php-dist Log message: Author: SiRVulcaN <sir...@si...> Log message: - Fixed small bug with ./@ formatting in edit_record.php - Added mouseover/downeffects for records/domains (from PHPMyAdmin) ---------------------- diff included ---------------------- Index: publicdnsadmin/docs/CHANGELOG diff -u publicdnsadmin/docs/CHANGELOG:1.25 publicdnsadmin/docs/CHANGELOG:1.26 --- publicdnsadmin/docs/CHANGELOG:1.25 Sat Jul 19 00:26:48 2003 +++ publicdnsadmin/docs/CHANGELOG Sat Jul 19 06:46:31 2003 @@ -14,3 +14,4 @@ - Split CSS into 2 files, one for IE and the other for other browsers. - Allow template admins to delete multiple records at once in templates. - Disable "Del" button if no checkboxes checked on record lists. +SiRVulcaN <sir...@si...> - 20/7/2003 - Mouseover coloring added for tables (from PHPMyAdmin). Index: publicdnsadmin/edit_record.php diff -u publicdnsadmin/edit_record.php:1.5 publicdnsadmin/edit_record.php:1.6 --- publicdnsadmin/edit_record.php:1.5 Fri Jul 18 08:14:23 2003 +++ publicdnsadmin/edit_record.php Sat Jul 19 06:46:31 2003 @@ -48,7 +48,7 @@ echo "<td><input type=\"text\" name=\"record\" size=\"15\" maxlength=\"200\" value=\"" . htmlentities($record_name) . "\"><DIV ID=\"seperator\"><div class=\"seperator\">@</font></div></DIV><div class=\"domain\">" . htmlentities($row["domain_name"]) . "</div></td>"; } else { ?> - <td><input type="text" name="record" size="15" maxlength="200" value="<?php echo htmlentities($record_name); ?>"><DIV ID=\"seperator\"><div class=\"seperator\">.</div></DIV><div class=\"domain\"><?php echo htmlentities($row["domain_name"]); ?></div></td> + <td><input type="text" name="record" size="15" maxlength="200" value="<?php echo htmlentities($record_name); ?>"><DIV ID="seperator"><div class="seperator">.</div></DIV><div class="domain"><?php echo htmlentities($row["domain_name"]); ?></div></td> <? } } else { Index: publicdnsadmin/edit_template.php diff -u publicdnsadmin/edit_template.php:1.4 publicdnsadmin/edit_template.php:1.5 --- publicdnsadmin/edit_template.php:1.4 Sat Jul 19 00:26:47 2003 +++ publicdnsadmin/edit_template.php Sat Jul 19 06:46:31 2003 @@ -42,12 +42,20 @@ echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><tr><td style=\"background: #000000;\"><table border=\"0\" cellspacing=\"1\" cellpadding=\"2\"><tr><th><input type=\"submit\" value=\"Del\" disabled=\"true\" name=\"delbut\"></th><th>Record</th><th>Type</th><th>Content</th><th>Priority</th><th>TTL</th><th> </th></tr>\n"; $row_id = 0; + $row_c = -1; $rec_res = $dbh->query("SELECT * FROM template_records WHERE template_id = '$zoneid'"); if (!$dbh->isError($rec_res) && $rec_res->numRows()) { while ($rec_row = $rec_res->fetchRow()) { $row_id++; + $row_c++; + + if ($row_id == 1) { + $bgcolor=$row1; + } else { + $bgcolor=$row2; + } if ($rec_row["prio"]) { $priority = htmlentities($rec_row["prio"]); @@ -55,15 +63,20 @@ $priority = " "; } - echo "<tr>\n"; - echo "<td class=\"row$row_id\"><input type=\"checkbox\" name=\"recdel[]\" onClick=\"checkCount()\" value=\"". $rec_row["id"] ."\"></td>\n"; - echo "<td class=\"row$row_id\"><a href=\"edit_template_record.php?id=".$rec_row["id"]."\">".htmlentities($rec_row["name"])."</a></td>\n"; - echo "<td class=\"row$row_id\" align=\"center\">".htmlentities($rec_row["type"])."</td>\n"; - echo "<td class=\"row$row_id\">".htmlentities($rec_row["content"])."</td>\n"; - echo "<td class=\"row$row_id\" align=\"right\">$priority</td>\n"; - echo "<td class=\"row$row_id\" align=\"right\">".htmlentities($rec_row["ttl"])."</td>\n"; + if ($row_id == 1) { + echo "<tr onmouseover=\"setPointer(this, $row_c, 'over', '$row1', '#CCFFCC', '#FFCC99');\" onmouseout=\"setPointer(this, $row_c, 'out', '$row1', '#CCFFCC', '#FFCC99');\" onmousedown=\"setPointer(this, $row_c, 'click', '$row1', '#CCFFCC', '#FFCC99');\">"; + } else { + echo "<tr onmouseover=\"setPointer(this, $row_c, 'over', '$row2', '#CCFFCC', '#FFCC99');\" onmouseout=\"setPointer(this, $row_c, 'out', '$row2', '#CCFFCC', '#FFCC99');\" onmousedown=\"setPointer(this, $row_c, 'click', '$row2', '#CCFFCC', '#FFCC99');\">"; + } + + echo "<td bgcolor=\"$bgcolor\"><input type=\"checkbox\" name=\"recdel[]\" onClick=\"checkCount()\" value=\"". $rec_row["id"] ."\"></td>\n"; + echo "<td bgcolor=\"$bgcolor\"><a href=\"edit_template_record.php?id=".$rec_row["id"]."\">".htmlentities($rec_row["name"])."</a></td>\n"; + echo "<td bgcolor=\"$bgcolor\" align=\"center\">".htmlentities($rec_row["type"])."</td>\n"; + echo "<td bgcolor=\"$bgcolor\">".htmlentities($rec_row["content"])."</td>\n"; + echo "<td bgcolor=\"$bgcolor\" align=\"right\">$priority</td>\n"; + echo "<td bgcolor=\"$bgcolor\" align=\"right\">".htmlentities($rec_row["ttl"])."</td>\n"; - echo "<td class=\"row$row_id\"><a href=\"edit_template_record.php?id=".$rec_row["id"]."\"><img src=\"images/edit.png\" alt=\"Edit record\" border=\"0\"></a> <a href=\"delete_template_record.php?id=".$rec_row["id"]."\"><img src=\"images/trash.png\" alt=\"Delete record\" border=\"0\"></a></td>\n"; + echo "<td bgcolor=\"$bgcolor\"><a href=\"edit_template_record.php?id=".$rec_row["id"]."\"><img src=\"images/edit.png\" alt=\"Edit record\" border=\"0\"></a> <a href=\"delete_template_record.php?id=".$rec_row["id"]."\"><img src=\"images/trash.png\" alt=\"Delete record\" border=\"0\"></a></td>\n"; echo "</tr>\n"; if ($row_id == 2) { $row_id = 0; } Index: publicdnsadmin/edit_zone.php diff -u publicdnsadmin/edit_zone.php:1.4 publicdnsadmin/edit_zone.php:1.5 --- publicdnsadmin/edit_zone.php:1.4 Sat Jul 19 00:26:47 2003 +++ publicdnsadmin/edit_zone.php Sat Jul 19 06:46:31 2003 @@ -40,9 +40,17 @@ echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><tr><td style=\"background: #000000;\"><table border=\"0\" cellspacing=\"1\" cellpadding=\"2\"><tr><th><input type=\"submit\" name=\"delbut\" disabled=\"true\" value=\"Del\"></th><th>Record</th><th>Type</th><th>Content</th><th>Priority</th><th>TTL</th><th> </th></tr>\n"; $row_id = 0; + $row_c = -1; foreach ($records as $record) { $row_id++; + $row_c++; + + if ($row_id == 1) { + $bgcolor=$row1; + } else { + $bgcolor=$row2; + } if ($record["prio"]) { $priority = htmlentities($record["prio"]); @@ -50,7 +58,13 @@ $priority = " "; } - echo "<tr><td class=\"row$row_id\">"; + if ($row_id == 1) { + echo "<tr onmouseover=\"setPointer(this, $row_c, 'over', '$row1', '#CCFFCC', '#FFCC99');\" onmouseout=\"setPointer(this, $row_c, 'out', '$row1', '#CCFFCC', '#FFCC99');\" onmousedown=\"setPointer(this, $row_c, 'click', '$row1', '#CCFFCC', '#FFCC99');\">"; + echo "<td bgcolor=\"#e6ebef\">"; + } else { + echo "<tr onmouseover=\"setPointer(this, $row_c, 'over', '$row2', '#CCFFCC', '#FFCC99');\" onmouseout=\"setPointer(this, $row_c, 'out', '$row2', '#CCFFCC', '#FFCC99');\" onmousedown=\"setPointer(this, $row_c, 'click', '$row2', '#CCFFCC', '#FFCC99');\">"; + echo "<td bgcolor=\"#efeae6\">"; + } if ($record["type"] != "SOA") { echo "<input type=\"checkbox\" name=\"recdel[]\" onClick=\"checkCount()\" value=\"". $record["id"] ."\">"; } @@ -59,28 +73,28 @@ if (htmlentities($record["type"]) != "PTR") { if ($record["type"] != "SOA") { if ($record["type"] == "MBOXFW") { - echo "<td class=\"row$row_id\"><a href=\"edit_record.php?id=".$record["id"]."\">". $record["name"] ."</a></td>\n"; + echo "<td bgcolor=\"$bgcolor\"><a href=\"edit_record.php?id=".$record["id"]."\">". $record["name"] ."</a></td>\n"; } else { - echo "<td class=\"row$row_id\"><a href=\"edit_record.php?id=".$record["id"]."\">".htmlentities($record["name"])."</a></td>\n"; + echo "<td bgcolor=\"$bgcolor\"><a href=\"edit_record.php?id=".$record["id"]."\">".htmlentities($record["name"])."</a></td>\n"; } } else { - echo "<td class=\"row$row_id\">".htmlentities($record["name"])."</td>\n"; + echo "<td bgcolor=\"$bgcolor\">".htmlentities($record["name"])."</td>\n"; } } else { $dispaddy = $expaddy[3].".".$expaddy[2].".".$expaddy[1].".".$expaddy[0]; $expaddy = explode(".", htmlentities($record["name"])); if ($record["type"] != "SOA") { - echo "<td class=\"row$row_id\"><a href=\"edit_record.php?id=".$record["id"]."\">".$dispaddy."</a></td>\n"; + echo "<td bgcolor=\"$bgcolor\"><a href=\"edit_record.php?id=".$record["id"]."\">".$dispaddy."</a></td>\n"; } else { - echo "<td class=\"row$row_id\">".$dispaddy."</td>\n"; + echo "<td bgcolor=\"$bgcolor\">".$dispaddy."</td>\n"; } } - echo "<td class=\"row$row_id\" align=\"center\">".htmlentities($record["type"])."</td>\n"; - echo "<td class=\"row$row_id\">".htmlentities($record["content"])."</td>\n"; - echo "<td class=\"row$row_id\" align=\"center\">$priority</td>\n"; - echo "<td class=\"row$row_id\" align=\"right\">".htmlentities($record["ttl"])."</td>\n"; + echo "<td bgcolor=\"$bgcolor\" align=\"center\">".htmlentities($record["type"])."</td>\n"; + echo "<td bgcolor=\"$bgcolor\">".htmlentities($record["content"])."</td>\n"; + echo "<td bgcolor=\"$bgcolor\" align=\"center\">$priority</td>\n"; + echo "<td bgcolor=\"$bgcolor\" align=\"right\">".htmlentities($record["ttl"])."</td>\n"; - echo "<td class=\"row$row_id\" height=\"20\">"; + echo "<td bgcolor=\"$bgcolor\" height=\"20\">"; if ($record["type"] != "SOA") { echo "<a href=\"edit_record.php?id=".$record["id"]."\"><img src=\"images/edit.png\" alt=\"Edit record\" border=\"0\"></a> <a href=\"delete_record.php?id=".$record["id"]."\"><img src=\"images/trash.png\" alt=\"Delete record\" border=\"0\"></a>"; } else { Index: publicdnsadmin/functions.jss diff -u publicdnsadmin/functions.jss:1.2 publicdnsadmin/functions.jss:1.3 --- publicdnsadmin/functions.jss:1.2 Sat Jul 19 00:26:48 2003 +++ publicdnsadmin/functions.jss Sat Jul 19 06:46:31 2003 @@ -34,3 +34,87 @@ } } + +var marked_row = new Array; + +function setPointer(theRow, theRowNum, theAction, theDefaultColor, thePointerColor, theMarkColor) +{ + var theCells = null; + + if ((thePointerColor == '' && theMarkColor == '') + || typeof(theRow.style) == 'undefined') { + return false; + } + + if (typeof(document.getElementsByTagName) != 'undefined') { + theCells = theRow.getElementsByTagName('td'); + } + else if (typeof(theRow.cells) != 'undefined') { + theCells = theRow.cells; + } + else { + return false; + } + + var rowCellsCnt = theCells.length; + var domDetect = null; + var currentColor = null; + var newColor = null; + if (typeof(window.opera) == 'undefined' + && typeof(theCells[0].getAttribute) != 'undefined') { + currentColor = theCells[0].getAttribute('bgcolor'); + domDetect = true; + } + else { + currentColor = theCells[0].style.backgroundColor; + domDetect = false; + } + + if (currentColor == '' + || currentColor.toLowerCase() == theDefaultColor.toLowerCase()) { + if (theAction == 'over' && thePointerColor != '') { + newColor = thePointerColor; + } + else if (theAction == 'click' && theMarkColor != '') { + newColor = theMarkColor; + marked_row[theRowNum] = true; + } + } + else if (currentColor.toLowerCase() == thePointerColor.toLowerCase() + && (typeof(marked_row[theRowNum]) == 'undefined' || !marked_row[theRowNum])) { + if (theAction == 'out') { + newColor = theDefaultColor; + } + else if (theAction == 'click' && theMarkColor != '') { + newColor = theMarkColor; + marked_row[theRowNum] = true; + } + } + else if (currentColor.toLowerCase() == theMarkColor.toLowerCase()) { + if (theAction == 'click') { + newColor = (thePointerColor != '') + ? thePointerColor + : theDefaultColor; + marked_row[theRowNum] = (typeof(marked_row[theRowNum]) == 'undefined' || !marked_row[theRowNum]) + ? true + : null; + } + } + + if (newColor) { + var c = null; + if (domDetect) { + for (c = 0; c < rowCellsCnt; c++) { + theCells[c].setAttribute('bgcolor', newColor, 0); + } + } + else { + for (c = 0; c < rowCellsCnt; c++) { + theCells[c].style.backgroundColor = newColor; + } + } + } + + return true; +} + Index: publicdnsadmin/index.php diff -u publicdnsadmin/index.php:1.7 publicdnsadmin/index.php:1.8 --- publicdnsadmin/index.php:1.7 Thu Jun 19 06:47:48 2003 +++ publicdnsadmin/index.php Sat Jul 19 06:46:31 2003 @@ -46,6 +46,13 @@ $row_id++; $row_count++; + $row_c = $row_count - 1; + + if ($row_id == 1) { + $bgcolor=$row1; + } else { + $bgcolor=$row2; + } $serial = getZoneSerial($zone["id"]); $records = 0; @@ -63,12 +70,17 @@ } if (($row_count >= $offsetmin) && ($row_count <= $offsetmax)) { - echo "<tr>\n"; - echo "<td class=\"row$row_id\"><a href=\"edit_zone.php?id=".$zone["id"]."\">".htmlentities($zone["name"])."</a></td>\n"; - echo "<td class=\"row$row_id\" align=\"right\">$serial</td>\n"; - echo "<td class=\"row$row_id\" align=\"right\">$owner</td>\n"; - echo "<td class=\"row$row_id\" align=\"right\">$records</td>\n"; - echo "<td class=\"row$row_id\" align=\"center\">"; + if ($row_id == 1) { + echo "<tr onmouseover=\"setPointer(this, $row_c, 'over', '$row1', '#CCFFCC', '#FFCC99');\" onmouseout=\"setPointer(this, $row_c, 'out', '$row1', '#CCFFCC', '#FFCC99');\" onmousedown=\"setPointer(this, $row_c, 'click', '$row1', '#CCFFCC', '#FFCC99');\">"; + } else { + echo "<tr onmouseover=\"setPointer(this, $row_c, 'over', '$row2', '#CCFFCC', '#FFCC99');\" onmouseout=\"setPointer(this, $row_c, 'out', '$row2', '#CCFFCC', '#FFCC99');\" onmousedown=\"setPointer(this, $row_c, 'click', '$row2', '#CCFFCC', '#FFCC99');\">"; + } + + echo "<td bgcolor=\"$bgcolor\"><a href=\"edit_zone.php?id=".$zone["id"]."\">".htmlentities($zone["name"])."</a></td>\n"; + echo "<td bgcolor=\"$bgcolor\" align=\"right\">$serial</td>\n"; + echo "<td bgcolor=\"$bgcolor\" align=\"right\">$owner</td>\n"; + echo "<td bgcolor=\"$bgcolor\" align=\"right\">$records</td>\n"; + echo "<td bgcolor=\"$bgcolor\" align=\"center\">"; if ($zone["delete"]) { echo " <a href=\"delete_zone.php?id=".$zone["id"]."\"><img src=\"images/trash.png\" alt=\"Delete zone\" border=\"0\"></a> "; Index: publicdnsadmin/lib/config.php-dist diff -u publicdnsadmin/lib/config.php-dist:1.10 publicdnsadmin/lib/config.php-dist:1.11 --- publicdnsadmin/lib/config.php-dist:1.10 Wed Jul 16 04:51:30 2003 +++ publicdnsadmin/lib/config.php-dist Sat Jul 19 06:46:31 2003 @@ -7,7 +7,7 @@ Distributed under the GPL license, see LICENSE for more information - $Id: config.php-dist,v 1.10 2003/07/16 11:51:30 key2peace Exp $ + $Id: config.php-dist,v 1.11 2003/07/19 13:46:31 sirvulcan Exp $ */ /* @@ -61,6 +61,10 @@ $ns2port = "8081"; $ns2user = "admin"; $ns2pass = "password"; + +/* row1 and row2 colors are the background colors for the domain/record tables (was in css) */ +$row1 = "#e6ebef"; +$row2 = "#efeae6"; /* Graphical code check options, You need libgd enabled in your PHP */ $NEWUSERS_GFXCHECK = 0; Index: publicdnsadmin/styleie.css diff -u publicdnsadmin/styleie.css:1.1 publicdnsadmin/styleie.css:1.2 --- publicdnsadmin/styleie.css:1.1 Fri Jul 18 08:14:23 2003 +++ publicdnsadmin/styleie.css Sat Jul 19 06:46:31 2003 @@ -93,14 +93,6 @@ font-size: 11px; } -.row1 { - background: #e6ebef; -} - -.row2 { - background: #efeae6; -} - .menu { background: #C7DDF4; color: #666666; @@ -280,4 +272,14 @@ background: #ffffff; font-family: Tahoma, Arial, sans-serif; font-size: 11px; +} + +.row1 +{ + background: #e6ebef; +} + +.row2 +{ + background: #efeae6; } Index: publicdnsadmin/styleother.css diff -u publicdnsadmin/styleother.css:1.1 publicdnsadmin/styleother.css:1.2 --- publicdnsadmin/styleother.css:1.1 Fri Jul 18 08:14:23 2003 +++ publicdnsadmin/styleother.css Sat Jul 19 06:46:31 2003 @@ -93,14 +93,6 @@ font-size: 11px; } -.row1 { - background: #e6ebef; -} - -.row2 { - background: #efeae6; -} - .menu { background: #C7DDF4; color: #666666; @@ -279,5 +271,15 @@ background: #ffffff; font-family: Tahoma, Arial, sans-serif; font-size: 11px; +} + +.row1 +{ + background: #e6ebef; +} + +.row2 +{ + background: #efeae6; } Index: publicdnsadmin/templates.php diff -u publicdnsadmin/templates.php:1.1.1.1 publicdnsadmin/templates.php:1.2 --- publicdnsadmin/templates.php:1.1.1.1 Wed Apr 16 00:19:06 2003 +++ publicdnsadmin/templates.php Sat Jul 19 06:46:31 2003 @@ -23,9 +23,17 @@ echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><tr><td style=\"background: #000000;\"><table border=\"0\" cellspacing=\"1\" cellpadding=\"2\"><tr><th>Name</th><th>Records</th><th> </th></tr>\n"; $row_id = 0; + $row_c = -1; foreach ($templates as $template) { $row_id++; + $row_c++; + + if ($row_id == 1) { + $bgcolor=$row1; + } else { + $bgcolor=$row2; + } $records = 0; $tmpres = $dbh->query("SELECT COUNT(id) AS rec_count FROM template_records WHERE template_id = ".$template["id"]); @@ -34,10 +42,15 @@ $records = $tmprow["rec_count"]; } - echo "<tr>\n"; - echo "<td class=\"row$row_id\"><a href=\"edit_template.php?id=".$template["id"]."\">".htmlentities($template["name"])."</a></td>\n"; - echo "<td class=\"row$row_id\" align=\"right\">$records</td>\n"; - echo "<td class=\"row$row_id\" align=\"center\"> <a href=\"delete_template.php?id=".$template["id"]."\"><img src=\"images/trash.png\" alt=\"Delete template\" border=\"0\"></a> </td>\n"; + if ($row_id == 1) { + echo "<tr onmouseover=\"setPointer(this, $row_c, 'over', '$row1', '#CCFFCC', '#FFCC99');\" onmouseout=\"setPointer(this, $row_c, 'out', '$row1', '#CCFFCC', '#FFCC99');\" onmousedown=\"setPointer(this, $row_c, 'click', '$row1', '#CCFFCC', '#FFCC99');\">"; + } else { + echo "<tr onmouseover=\"setPointer(this, $row_c, 'over', '$row2', '#CCFFCC', '#FFCC99');\" onmouseout=\"setPointer(this, $row_c, 'out', '$row2', '#CCFFCC', '#FFCC99');\" onmousedown=\"setPointer(this, $row_c, 'click', '$row2', '#CCFFCC', '#FFCC99');\">"; + } + + echo "<td bgcolor=\"$bgcolor\"><a href=\"edit_template.php?id=".$template["id"]."\">".htmlentities($template["name"])."</a></td>\n"; + echo "<td bgcolor=\"$bgcolor\" align=\"right\">$records</td>\n"; + echo "<td bgcolor=\"$bgcolor\" align=\"center\"> <a href=\"delete_template.php?id=".$template["id"]."\"><img src=\"images/trash.png\" alt=\"Delete template\" border=\"0\"></a> </td>\n"; echo "</tr>\n"; if ($row_id == 2) { $row_id = 0; } ----------------------- End of diff ----------------------- |
From: Neil S. <sir...@us...> - 2003-07-19 07:26:59
|
CVSROOT : /cvsroot/publicdnsadmin Module : publicdnsadmin Commit time: 2003-07-19 07:26:58 UTC Modified files: edit_template.php edit_zone.php functions.jss docs/CHANGELOG docs/TODO Log message: Author: SiRVulcaN <sir...@si...> Log message: - Disable "Del" button if no checkboxes checked on record lists. ---------------------- diff included ---------------------- Index: publicdnsadmin/docs/CHANGELOG diff -u publicdnsadmin/docs/CHANGELOG:1.24 publicdnsadmin/docs/CHANGELOG:1.25 --- publicdnsadmin/docs/CHANGELOG:1.24 Fri Jul 18 22:45:30 2003 +++ publicdnsadmin/docs/CHANGELOG Sat Jul 19 00:26:48 2003 @@ -13,3 +13,4 @@ - Made it so when you click on a template record you go into edit. - Split CSS into 2 files, one for IE and the other for other browsers. - Allow template admins to delete multiple records at once in templates. + - Disable "Del" button if no checkboxes checked on record lists. Index: publicdnsadmin/docs/TODO diff -u publicdnsadmin/docs/TODO:1.12 publicdnsadmin/docs/TODO:1.13 --- publicdnsadmin/docs/TODO:1.12 Fri Jul 18 22:45:30 2003 +++ publicdnsadmin/docs/TODO Sat Jul 19 00:26:48 2003 @@ -1,3 +1,2 @@ - Some sort of maintenence news system (displayed on the main login page). - Syntax check records for validity to make it more fool proof. -- Disable "Del" button if no checkboxes checked on record lists. Index: publicdnsadmin/edit_template.php diff -u publicdnsadmin/edit_template.php:1.3 publicdnsadmin/edit_template.php:1.4 --- publicdnsadmin/edit_template.php:1.3 Fri Jul 18 22:45:30 2003 +++ publicdnsadmin/edit_template.php Sat Jul 19 00:26:47 2003 @@ -38,8 +38,8 @@ echo "</table>\n"; echo "</form>\n"; echo "<p>· <a href=\"new_template_record.php?zone=$zoneid\">New record</a></p>\n"; - echo "<form action=\"delete_multi_t_records.php\" method=\"post\">\n"; - echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><tr><td style=\"background: #000000;\"><table border=\"0\" cellspacing=\"1\" cellpadding=\"2\"><tr><th><input type=\"submit\" value=\"Del\"></th><th>Record</th><th>Type</th><th>Content</th><th>Priority</th><th>TTL</th><th> </th></tr>\n"; + echo "<form action=\"delete_multi_t_records.php\" name=\"recdelform\" method=\"post\">\n"; + echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><tr><td style=\"background: #000000;\"><table border=\"0\" cellspacing=\"1\" cellpadding=\"2\"><tr><th><input type=\"submit\" value=\"Del\" disabled=\"true\" name=\"delbut\"></th><th>Record</th><th>Type</th><th>Content</th><th>Priority</th><th>TTL</th><th> </th></tr>\n"; $row_id = 0; $rec_res = $dbh->query("SELECT * FROM template_records WHERE template_id = '$zoneid'"); @@ -56,7 +56,7 @@ } echo "<tr>\n"; - echo "<td class=\"row$row_id\"><input type=\"checkbox\" name=\"recdel[]\" value=\"". $rec_row["id"] ."\"></td>\n"; + echo "<td class=\"row$row_id\"><input type=\"checkbox\" name=\"recdel[]\" onClick=\"checkCount()\" value=\"". $rec_row["id"] ."\"></td>\n"; echo "<td class=\"row$row_id\"><a href=\"edit_template_record.php?id=".$rec_row["id"]."\">".htmlentities($rec_row["name"])."</a></td>\n"; echo "<td class=\"row$row_id\" align=\"center\">".htmlentities($rec_row["type"])."</td>\n"; echo "<td class=\"row$row_id\">".htmlentities($rec_row["content"])."</td>\n"; Index: publicdnsadmin/edit_zone.php diff -u publicdnsadmin/edit_zone.php:1.3 publicdnsadmin/edit_zone.php:1.4 --- publicdnsadmin/edit_zone.php:1.3 Thu Jul 17 05:02:28 2003 +++ publicdnsadmin/edit_zone.php Sat Jul 19 00:26:47 2003 @@ -36,13 +36,9 @@ $records = getRecords($zoneid); echo "<p>· <a href=\"new_record.php?zone=$zoneid\">New record</a></p>\n"; - echo "<form action=\"delete_multi_records.php\" method=\"post\">\n"; + echo "<form action=\"delete_multi_records.php\" name=\"recdelform\" method=\"post\">\n"; + echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><tr><td style=\"background: #000000;\"><table border=\"0\" cellspacing=\"1\" cellpadding=\"2\"><tr><th><input type=\"submit\" name=\"delbut\" disabled=\"true\" value=\"Del\"></th><th>Record</th><th>Type</th><th>Content</th><th>Priority</th><th>TTL</th><th> </th></tr>\n"; - if (count($records) > 1) { - echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><tr><td style=\"background: #000000;\"><table border=\"0\" cellspacing=\"1\" cellpadding=\"2\"><tr><th><input type=\"submit\" value=\"Del\"></th><th>Record</th><th>Type</th><th>Content</th><th>Priority</th><th>TTL</th><th> </th></tr>\n"; - } else { - echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><tr><td style=\"background: #000000;\"><table border=\"0\" cellspacing=\"1\" cellpadding=\"2\"><tr><th><input type=\"submit\" disabled=\"true\" value=\"Del\"></th><th>Record</th><th>Type</th><th>Content</th><th>Priority</th><th>TTL</th><th> </th></tr>\n"; - } $row_id = 0; foreach ($records as $record) { @@ -56,7 +52,7 @@ echo "<tr><td class=\"row$row_id\">"; if ($record["type"] != "SOA") { - echo "<input type=\"checkbox\" name=\"recdel[]\" value=\"". $record["id"] ."\">"; + echo "<input type=\"checkbox\" name=\"recdel[]\" onClick=\"checkCount()\" value=\"". $record["id"] ."\">"; } echo "</td>"; Index: publicdnsadmin/functions.jss diff -u publicdnsadmin/functions.jss:1.1 publicdnsadmin/functions.jss:1.2 --- publicdnsadmin/functions.jss:1.1 Fri Jul 18 08:14:23 2003 +++ publicdnsadmin/functions.jss Sat Jul 19 00:26:48 2003 @@ -11,3 +11,26 @@ textObj.data = "@"; } } + +function checkCount() +{ + var opton = 0; + for(var i=0;i<document.recdelform.elements.length;i++) { + currentField = document.recdelform.elements[i]; + if (currentField.type == "checkbox") { + if (currentField.checked == true) { + opton = 1; + } + } + } + + if ((opton == 1) && (document.recdelform.elements["delbut"].disabled == true)) { + document.recdelform.elements["delbut"].disabled = false; + } + + + if ((opton == 0) && (document.recdelform.elements["delbut"].disabled == false)) { + document.recdelform.elements["delbut"].disabled = true; + } + +} ----------------------- End of diff ----------------------- |
From: Neil S. <sir...@us...> - 2003-07-19 05:45:44
|
CVSROOT : /cvsroot/publicdnsadmin Module : publicdnsadmin Commit time: 2003-07-19 05:45:40 UTC Modified files: delete_multi_records.php edit_template.php docs/CHANGELOG docs/TODO Added files: delete_multi_t_records.php Log message: Author: SiRVulcaN <sir...@si...> Log message: - Allow template admins to delete multiple records at once in templates. ---------------------- diff included ---------------------- Index: publicdnsadmin/delete_multi_records.php diff -u publicdnsadmin/delete_multi_records.php:1.1 publicdnsadmin/delete_multi_records.php:1.2 --- publicdnsadmin/delete_multi_records.php:1.1 Thu Jul 17 05:02:28 2003 +++ publicdnsadmin/delete_multi_records.php Fri Jul 18 22:45:30 2003 @@ -36,7 +36,7 @@ echo "<p class=\"error\">· You don't have permission to delete this record- ($recordid)</p>\n"; $error_occur = 1; } - // Technically the above and below errors should happen, if they do it will be a very rare occasion. -sirvulcan + // Technically the above and below errors shouldnt happen, if they do it will be a very rare occasion. -sirvulcan } else { echo "<p class=\"error\">· Zone/record not found ($recordid)</p>\n"; $error_occur = 1; Index: publicdnsadmin/delete_multi_t_records.php diff -u /dev/null publicdnsadmin/delete_multi_t_records.php:1.1 --- /dev/null Fri Jul 18 22:45:40 2003 +++ publicdnsadmin/delete_multi_t_records.php Fri Jul 18 22:45:30 2003 @@ -0,0 +1,58 @@ +<?php +/* + Public DNS Administator + Originally Written by Trond Arve Nordheim <tr...@no...> + Modified By Neil Spierling <sir...@si...> + + Distributed under the GPL license, see LICENSE for + more information + + $Id: +*/ + +require("lib/prepend.php"); +require("lib/header.php"); + +$perms = getUserPermissions($_SESSION["_UID"]); + +if (userHasAccess($_SESSION["_UID"], "edit_template")) { + +?> +<h3>Edit template » delete multiple record</h3> +<?php + + if ($recdel) { + $del_count_max = count($recdel); + + $dbh = db_connect(); + foreach($recdel as $rcount=>$recordid) { + $result = $dbh->query("SELECT templates.id, templates.name AS template_name, template_records.name, template_records.type,template_records.prio, template_records.content FROM templates, template_records WHERE template_records.id = '$recordid' AND templates.id = template_records.template_id"); + if (!$dbh->isError($result) && $result->numRows()) { + $row = $result->fetchRow(); + $dbh->query("DELETE FROM template_records WHERE id = '$recordid'"); + } else { + echo "<p class=\"error\">· Template/record not found- ($recordid)</p>\n"; + $error_occur = 1; + } + } + if ($error_occur == 1) { + echo "<p>Some records could not be deleted, please check make sure you have permission to access/delete them</p>"; + echo "<p>Some "; + } else { + echo "<p>All "; + } + echo "selected tempplate records were successfully deleted<br><a href=\"edit_template.php?id=".$row["id"]."\">Proceed»</a></p>\n"; + if ($error_occur != 1) { + echo "<script language=\"JavaScript\">\n"; + echo "document.location.href='edit_template.php?id=".$row["id"]."';\n"; + echo "</script>\n"; + } + $dbh->disconnect(); + } +} else { + displayNoAccess(); +} + +require("lib/footer.php"); + +?> Index: publicdnsadmin/docs/CHANGELOG diff -u publicdnsadmin/docs/CHANGELOG:1.23 publicdnsadmin/docs/CHANGELOG:1.24 --- publicdnsadmin/docs/CHANGELOG:1.23 Fri Jul 18 08:14:23 2003 +++ publicdnsadmin/docs/CHANGELOG Fri Jul 18 22:45:30 2003 @@ -12,3 +12,4 @@ another record type. - Made it so when you click on a template record you go into edit. - Split CSS into 2 files, one for IE and the other for other browsers. + - Allow template admins to delete multiple records at once in templates. Index: publicdnsadmin/docs/TODO diff -u publicdnsadmin/docs/TODO:1.11 publicdnsadmin/docs/TODO:1.12 --- publicdnsadmin/docs/TODO:1.11 Fri Jul 18 08:18:35 2003 +++ publicdnsadmin/docs/TODO Fri Jul 18 22:45:30 2003 @@ -1,4 +1,3 @@ - Some sort of maintenence news system (displayed on the main login page). - Syntax check records for validity to make it more fool proof. -- Multiple template record deletion - Disable "Del" button if no checkboxes checked on record lists. Index: publicdnsadmin/edit_template.php diff -u publicdnsadmin/edit_template.php:1.2 publicdnsadmin/edit_template.php:1.3 --- publicdnsadmin/edit_template.php:1.2 Fri Jul 18 08:14:23 2003 +++ publicdnsadmin/edit_template.php Fri Jul 18 22:45:30 2003 @@ -38,10 +38,12 @@ echo "</table>\n"; echo "</form>\n"; echo "<p>· <a href=\"new_template_record.php?zone=$zoneid\">New record</a></p>\n"; - echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><tr><td style=\"background: #000000;\"><table border=\"0\" cellspacing=\"1\" cellpadding=\"2\"><tr><th>Record</th><th>Type</th><th>Content</th><th>Priority</th><th>TTL</th><th> </th></tr>\n"; - $row_id = 0; + echo "<form action=\"delete_multi_t_records.php\" method=\"post\">\n"; + echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><tr><td style=\"background: #000000;\"><table border=\"0\" cellspacing=\"1\" cellpadding=\"2\"><tr><th><input type=\"submit\" value=\"Del\"></th><th>Record</th><th>Type</th><th>Content</th><th>Priority</th><th>TTL</th><th> </th></tr>\n"; + $row_id = 0; $rec_res = $dbh->query("SELECT * FROM template_records WHERE template_id = '$zoneid'"); + if (!$dbh->isError($rec_res) && $rec_res->numRows()) { while ($rec_row = $rec_res->fetchRow()) { @@ -54,6 +56,7 @@ } echo "<tr>\n"; + echo "<td class=\"row$row_id\"><input type=\"checkbox\" name=\"recdel[]\" value=\"". $rec_row["id"] ."\"></td>\n"; echo "<td class=\"row$row_id\"><a href=\"edit_template_record.php?id=".$rec_row["id"]."\">".htmlentities($rec_row["name"])."</a></td>\n"; echo "<td class=\"row$row_id\" align=\"center\">".htmlentities($rec_row["type"])."</td>\n"; echo "<td class=\"row$row_id\">".htmlentities($rec_row["content"])."</td>\n"; @@ -68,7 +71,7 @@ } } - echo "</table></td></tr></table>\n"; + echo "</table></td></tr></table></form>\n"; } else { echo "<p class=\"error\">· Template not found</p>\n"; ----------------------- End of diff ----------------------- |
From: Neil S. <sir...@us...> - 2003-07-18 15:18:46
|
CVSROOT : /cvsroot/publicdnsadmin Module : publicdnsadmin Commit time: 2003-07-18 15:18:45 UTC Modified files: docs/TODO Log message: Author: SiRVulcaN <sir...@si...> Log message: added couple of things so i dont forget, will get onto them this weekend ---------------------- diff included ---------------------- Index: publicdnsadmin/docs/TODO diff -u publicdnsadmin/docs/TODO:1.10 publicdnsadmin/docs/TODO:1.11 --- publicdnsadmin/docs/TODO:1.10 Thu Jul 17 05:02:28 2003 +++ publicdnsadmin/docs/TODO Fri Jul 18 08:18:35 2003 @@ -1,3 +1,4 @@ - Some sort of maintenence news system (displayed on the main login page). - Syntax check records for validity to make it more fool proof. - +- Multiple template record deletion +- Disable "Del" button if no checkboxes checked on record lists. ----------------------- End of diff ----------------------- |
From: Neil S. <sir...@us...> - 2003-07-18 15:14:35
|
CVSROOT : /cvsroot/publicdnsadmin Module : publicdnsadmin Commit time: 2003-07-18 15:14:33 UTC Modified files: edit_record.php edit_template.php edit_template_record.php new_record.php new_template_record.php docs/CHANGELOG lib/header.php Added files: functions.jss styleie.css styleother.css Removed files: style.css Log message: Author: SiRVulcaN <sir...@si...> Log message: - Change between '.' and '@' auto when changing from MBOXFW to another record type. - Made it so when you click on a template record you go into edit. - Split CSS into 2 files, one for IE and the other for other browsers. ---------------------- diff included ---------------------- Index: publicdnsadmin/docs/CHANGELOG diff -u publicdnsadmin/docs/CHANGELOG:1.22 publicdnsadmin/docs/CHANGELOG:1.23 --- publicdnsadmin/docs/CHANGELOG:1.22 Thu Jul 17 05:02:28 2003 +++ publicdnsadmin/docs/CHANGELOG Fri Jul 18 08:14:23 2003 @@ -8,3 +8,7 @@ - Full HWINFO support added. - Full A6 support completed. - Full NS6 support completed. +SiRVulcaN <sir...@si...> - 19/7/2003 - Change between '.' and '@' auto when changing from MBOXFW to + another record type. + - Made it so when you click on a template record you go into edit. + - Split CSS into 2 files, one for IE and the other for other browsers. Index: publicdnsadmin/edit_record.php diff -u publicdnsadmin/edit_record.php:1.4 publicdnsadmin/edit_record.php:1.5 --- publicdnsadmin/edit_record.php:1.4 Thu Jul 17 05:02:28 2003 +++ publicdnsadmin/edit_record.php Fri Jul 18 08:14:23 2003 @@ -45,10 +45,10 @@ <? if ($row["type"] != "PTR") { if ($row["type"] == "MBOXFW") { - echo "<td><input type=\"text\" name=\"record\" size=\"15\" maxlength=\"200\" value=\"" . htmlentities($record_name) . "\">@" . htmlentities($row["domain_name"]) . "</td>"; + echo "<td><input type=\"text\" name=\"record\" size=\"15\" maxlength=\"200\" value=\"" . htmlentities($record_name) . "\"><DIV ID=\"seperator\"><div class=\"seperator\">@</font></div></DIV><div class=\"domain\">" . htmlentities($row["domain_name"]) . "</div></td>"; } else { ?> - <td><input type="text" name="record" size="15" maxlength="200" value="<?php echo htmlentities($record_name); ?>">.<?php echo htmlentities($row["domain_name"]); ?></td> + <td><input type="text" name="record" size="15" maxlength="200" value="<?php echo htmlentities($record_name); ?>"><DIV ID=\"seperator\"><div class=\"seperator\">.</div></DIV><div class=\"domain\"><?php echo htmlentities($row["domain_name"]); ?></div></td> <? } } else { @@ -62,7 +62,7 @@ </tr> <tr> <td><b>Type:</b></td> - <td><select name="type"> + <td><select name="type" onChange="changeText(this.form.type)"> <option value="NS"<?php if ($row["type"] == "NS") { ?> selected<?php } ?>>NS</option> <option value="NS6"<?php if ($row["type"] == "NS6") { ?> selected<?php } ?>>NS6</option> <option value="MX"<?php if ($row["type"] == "MX") { ?> selected<?php } ?>>MX</option> Index: publicdnsadmin/edit_template.php diff -u publicdnsadmin/edit_template.php:1.1.1.1 publicdnsadmin/edit_template.php:1.2 --- publicdnsadmin/edit_template.php:1.1.1.1 Wed Apr 16 00:19:04 2003 +++ publicdnsadmin/edit_template.php Fri Jul 18 08:14:23 2003 @@ -54,7 +54,7 @@ } echo "<tr>\n"; - echo "<td class=\"row$row_id\">".htmlentities($rec_row["name"])."</td>\n"; + echo "<td class=\"row$row_id\"><a href=\"edit_template_record.php?id=".$rec_row["id"]."\">".htmlentities($rec_row["name"])."</a></td>\n"; echo "<td class=\"row$row_id\" align=\"center\">".htmlentities($rec_row["type"])."</td>\n"; echo "<td class=\"row$row_id\">".htmlentities($rec_row["content"])."</td>\n"; echo "<td class=\"row$row_id\" align=\"right\">$priority</td>\n"; Index: publicdnsadmin/edit_template_record.php diff -u publicdnsadmin/edit_template_record.php:1.3 publicdnsadmin/edit_template_record.php:1.4 --- publicdnsadmin/edit_template_record.php:1.3 Thu Jul 17 05:02:28 2003 +++ publicdnsadmin/edit_template_record.php Fri Jul 18 08:14:23 2003 @@ -38,14 +38,14 @@ <tr> <td><b>Record:</b></td> <? if ($row["type"] == "MBOXFW") { ?> - <td><input type="text" name="record" size="15" maxlength="200" value="<?php echo htmlentities($record_name); ?>">@$DOMAIN</td> + <td><input type="text" name="record" size="15" maxlength="200" value="<?php echo htmlentities($record_name); ?>"><DIV ID="seperator"><div class="seperator">@</div></div><div class="domain">$DOMAIN</div></td> <? } else { ?> - <td><input type="text" name="record" size="15" maxlength="200" value="<?php echo htmlentities($record_name); ?>">.$DOMAIN</td> + <td><input type="text" name="record" size="15" maxlength="200" value="<?php echo htmlentities($record_name); ?>"><DIV ID="seperator"><div class="seperator">.</div></div><div class="domain">$DOMAIN</div></td> <? } ?> </tr> <tr> <td><b>Type:</b></td> - <td><select name="type"> + <td><select name="type" onChange="changeText(this.form.type)"> <option value="NS"<?php if ($row["type"] == "NS") { ?> selected<?php } ?>>NS</option> <option value="NS6"<?php if ($row["type"] == "NS6") { ?> selected<?php } ?>>NS6</option> <option value="MX"<?php if ($row["type"] == "MX") { ?> selected<?php } ?>>MX</option> Index: publicdnsadmin/functions.jss diff -u /dev/null publicdnsadmin/functions.jss:1.1 --- /dev/null Fri Jul 18 08:14:33 2003 +++ publicdnsadmin/functions.jss Fri Jul 18 08:14:23 2003 @@ -0,0 +1,13 @@ +function changeText(newsep) +{ + var fontObj = document.getElementById("seperator").childNodes[0]; + var textObj = fontObj.childNodes[0]; + + var objchange = newsep.options[newsep.selectedIndex].value; + + if (objchange != "MBOXFW") { + textObj.data = "."; + } else { + textObj.data = "@"; + } +} Index: publicdnsadmin/lib/header.php diff -u publicdnsadmin/lib/header.php:1.13 publicdnsadmin/lib/header.php:1.14 --- publicdnsadmin/lib/header.php:1.13 Wed Jul 16 09:03:08 2003 +++ publicdnsadmin/lib/header.php Fri Jul 18 08:14:23 2003 @@ -7,7 +7,7 @@ Distributed under the GPL license, see LICENSE for more information - $Id: header.php,v 1.13 2003/07/16 16:03:08 key2peace Exp $ + $Id: header.php,v 1.14 2003/07/18 15:14:23 sirvulcan Exp $ */ ?> @@ -16,7 +16,14 @@ <head> <title>[ Public DNS Administrator ]</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> -<link rel="stylesheet" type="text/css" href="style.css"> +<? +if (strstr(getenv('HTTP_USER_AGENT'), 'MSIE')) { + echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"styleie.css\">"; +} else { + echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"styleother.css\">"; +} +?> +<script language="javascript" src="functions.jss"></script> </head> <body> Index: publicdnsadmin/new_record.php diff -u publicdnsadmin/new_record.php:1.4 publicdnsadmin/new_record.php:1.5 --- publicdnsadmin/new_record.php:1.4 Thu Jul 17 05:02:28 2003 +++ publicdnsadmin/new_record.php Fri Jul 18 08:14:23 2003 @@ -35,11 +35,11 @@ <table border="0" cellspacing="0" cellpadding="2"> <tr> <td><b>Record:</b></td> - <td><input type="text" name="record" size="15" maxlength="200" value="">.<?php echo htmlentities($row["name"]); ?></td> + <td><input type="text" name="record" size="15" maxlength="200" value=""><DIV ID="seperator"><div class="seperator">.</div></DIV><div class="domain"><?php echo htmlentities($row["name"]); ?></div></td> </tr> <tr> <td><b>Type:</b></td> - <td><select name="type"> + <td><select name="type" onChange="changeText(this.form.type)"> <option value="NS">NS</option> <option value="NS6">NS6</option> <option value="MX">MX</option> Index: publicdnsadmin/new_template_record.php diff -u publicdnsadmin/new_template_record.php:1.3 publicdnsadmin/new_template_record.php:1.4 --- publicdnsadmin/new_template_record.php:1.3 Thu Jul 17 05:02:28 2003 +++ publicdnsadmin/new_template_record.php Fri Jul 18 08:14:23 2003 @@ -29,16 +29,15 @@ global $default_ttl; ?> -<p>Any occurences of $DOMAIN in the fields below will be replaced with the actual domain name when the template is used on a new domain</p> <form action="create_template_record.php?zone=<?php echo $zoneid; ?>" method="post"> <table border="0" cellspacing="0" cellpadding="2"> <tr> <td><b>Record:</b></td> - <td><input type="text" name="record" size="15" maxlength="200" value="">.$DOMAIN</td> + <td><input type="text" name="record" size="15" maxlength="200" value=""><DIV ID="seperator"><div class="seperator">.</div></DIV><div class="domain">$DOMAIN</div></td> </tr> <tr> <td><b>Type:</b></td> - <td><select name="type"> + <td><select name="type" onChange="changeText(this.form.type)"> <option value="NS">NS</option> <option value="NS6">NS6</option> <option value="MX">MX</option> @@ -71,6 +70,8 @@ </tr> </table> </form> +<p>Any occurences of $DOMAIN in the fields below will be replaced with the actual domain name when the template is used on a new domain</p> + <?php } else { Index: publicdnsadmin/style.css diff -u publicdnsadmin/style.css:1.4 publicdnsadmin/style.css:removed --- publicdnsadmin/style.css:1.4 Thu Jun 19 00:45:20 2003 +++ publicdnsadmin/style.css Fri Jul 18 08:14:33 2003 @@ -1,264 +0,0 @@ -body { - margin: 0px; - background: #ffffff; - font-family: Tahoma, Arial, sans-serif; - font-size: 11px; -} - -h1 { - color: #C6D3FF; - font-family: Tahoma, Arial, sans-serif; - font-size: 17px; - font-weight: bold; - text-decoration: none; - padding-left: 5px; -} - -h3 { - color: #AEAEAE; - font-family: Tahoma, Arial, sans-serif; - font-size: 13px; - font-weight: bold; - text-decoration: none; -} - -th { - background: #C7DDF4; - font-family: Tahoma, Arial, sans-serif; - font-size: 13px; - color: #ffffff; - text-align: left; - font-weight: bold; -} - -td { - font-family: Tahoma, Arial, sans-serif; - font-size: 11px; - color: #AEAEAE; -} - -input { - font-family: Tahoma, Arial, sans-serif; - font-size: 11px; - background: #E5EFF9; - color: #000000; -} - -textarea { - font-family: Tahoma, Arial, sans-serif; - font-size: 11px; - background: #E5EFF9; - color: #000000; -} - -select { - font-family: Tahoma, Arial, sans-serif; - font-size: 11px; - background: #E5EFF9; - color: #000000; -} - -a:link { - font-family: Tahoma, Arial, sans-serif; - font-size: 11px; - color: #AEAEAE; - text-decoration: underline; -} - -a:visited { - font-family: Tahoma, Arial, sans-serif; - font-size: 11px; - color: #AEAEAE; - text-decoration: underline; -} - -a:active { - font-family: Tahoma, Arial, sans-serif; - font-size: 11px; - color: #AEAEAE; - text-decoration: underline; -} - -a:hover { - font-family: Tahoma, Arial, sans-serif; - font-size: 11px; - color: #AEAEAE; - text-decoration: underline; -} - -.rowsearch { - background: #C7DDF4; - color: #AEAEAE; - font-family: Tahoma, Arial, sans-serif; - font-size: 11px; -} - -.row1 { - background: #e6ebef; -} - -.row2 { - background: #efeae6; -} - -.menu { - background: #C7DDF4; - color: #666666; - font-family: Tahoma, Arial, sans-serif; - font-size: 12px; -} - -a.menu:link { - color: #666666; - font-family: Tahoma, Arial, sans-serif; - font-size: 12px; - font-weight: bold; - text-decoration: none; -} - -a.menu:active { - color: #666666; - font-family: Tahoma, Arial, sans-serif; - font-size: 12px; - font-weight: bold; - text-decoration: none; -} - -a.menu:visited { - color: #666666; - font-family: Tahoma, Arial, sans-serif; - font-size: 12px; - font-weight: bold; - text-decoration: none; -} - -a.menu:hover { - color: #666666; - font-family: Tahoma, Arial, sans-serif; - font-size: 12px; - font-weight: bold; - text-decoration: none; -} - -.misc { - font-family: Tahoma, Arial, sans-serif; - font-size: 10px; -} - -body -{ - background-color: #ffffff; /*white*/ - font-size: 8pt; - font-family: Arial, Helvetica, sans-serif; - -} - -.PAGE -{ - height: 600px; - width: 800px; -} - -.contentie -{ - position: absolute; - background-color: #FFFFFF; /*white*/ - color: #999999; - left: 300px; - top: 190px; - width: 603px; - height:379px; - overflow: auto; - padding: 5px 5px 5px 5px; - - scrollbar-track-color:white; - scrollbar-3dlight-color:white; - scrollbar-arrow-color:white; - scrollbar-base-color:white; - scrollbar-darkshadow-color:white; - scrollbar-face-color:#C6D3FF; - scrollbar-highlight-color:white; - scrollbar-shadow-color:white; -} - -.contentall -{ - position: absolute; - background-color: #FFFFFF; /*white*/ - color: #999999; - left: 300px; - top: 190px; - width: 590px; - height:379px; - overflow: auto; - padding: 5px 5px 5px 5px; - - scrollbar-track-color:white; - scrollbar-3dlight-color:white; - scrollbar-arrow-color:white; - scrollbar-base-color:white; - scrollbar-darkshadow-color:white; - scrollbar-face-color:#C6D3FF; - scrollbar-highlight-color:white; - scrollbar-shadow-color:white; -} - -.SIDEBAR -{ - position: absolute; - left: 0px; - top: 170px; - width: 300px; -} - -.TOPBAR -{ - position: absolute; - top: 1px; - left: 0px; - width: 1010px; - height: 168px; - -} - -.TITLE -{ - font-size: 12pt; - font-weight: bold; - color: #333333; -} - -.SUBTITLE -{ - - font-weight: bold; - line-height: 1.5; - color: #666666; -} - -.BOTTOMBAR -{ - position: absolute; - top: 580px; -} - -.navall -{ - position: absolute; - left: 755px; - top: 160px; -} - -.navie -{ - position: absolute; - left: 755px; - top: 170px; -} - -.fineprint -{ - font-size: 7pt; -} - - Index: publicdnsadmin/styleie.css diff -u /dev/null publicdnsadmin/styleie.css:1.1 --- /dev/null Fri Jul 18 08:14:33 2003 +++ publicdnsadmin/styleie.css Fri Jul 18 08:14:23 2003 @@ -0,0 +1,283 @@ +body { + margin: 0px; + background: #ffffff; + font-family: Tahoma, Arial, sans-serif; + font-size: 11px; +} + +h1 { + color: #C6D3FF; + font-family: Tahoma, Arial, sans-serif; + font-size: 17px; + font-weight: bold; + text-decoration: none; + padding-left: 5px; +} + +h3 { + color: #AEAEAE; + font-family: Tahoma, Arial, sans-serif; + font-size: 13px; + font-weight: bold; + text-decoration: none; +} + +th { + background: #C7DDF4; + font-family: Tahoma, Arial, sans-serif; + font-size: 13px; + color: #ffffff; + text-align: left; + font-weight: bold; +} + +td { + font-family: Tahoma, Arial, sans-serif; + font-size: 11px; + color: #AEAEAE; +} + +input { + font-family: Tahoma, Arial, sans-serif; + font-size: 11px; + background: #E5EFF9; + color: #000000; +} + +textarea { + font-family: Tahoma, Arial, sans-serif; + font-size: 11px; + background: #E5EFF9; + color: #000000; +} + +select { + font-family: Tahoma, Arial, sans-serif; + font-size: 11px; + background: #E5EFF9; + color: #000000; +} + +a:link { + font-family: Tahoma, Arial, sans-serif; + font-size: 11px; + color: #AEAEAE; + text-decoration: underline; +} + +a:visited { + font-family: Tahoma, Arial, sans-serif; + font-size: 11px; + color: #AEAEAE; + text-decoration: underline; +} + +a:active { + font-family: Tahoma, Arial, sans-serif; + font-size: 11px; + color: #AEAEAE; + text-decoration: underline; +} + +a:hover { + font-family: Tahoma, Arial, sans-serif; + font-size: 11px; + color: #AEAEAE; + text-decoration: underline; +} + +.rowsearch { + background: #C7DDF4; + color: #AEAEAE; + font-family: Tahoma, Arial, sans-serif; + font-size: 11px; +} + +.row1 { + background: #e6ebef; +} + +.row2 { + background: #efeae6; +} + +.menu { + background: #C7DDF4; + color: #666666; + font-family: Tahoma, Arial, sans-serif; + font-size: 12px; +} + +a.menu:link { + color: #666666; + font-family: Tahoma, Arial, sans-serif; + font-size: 12px; + font-weight: bold; + text-decoration: none; +} + +a.menu:active { + color: #666666; + font-family: Tahoma, Arial, sans-serif; + font-size: 12px; + font-weight: bold; + text-decoration: none; +} + +a.menu:visited { + color: #666666; + font-family: Tahoma, Arial, sans-serif; + font-size: 12px; + font-weight: bold; + text-decoration: none; +} + +a.menu:hover { + color: #666666; + font-family: Tahoma, Arial, sans-serif; + font-size: 12px; + font-weight: bold; + text-decoration: none; +} + +.misc { + font-family: Tahoma, Arial, sans-serif; + font-size: 10px; +} + +body +{ + background-color: #ffffff; /*white*/ + font-size: 8pt; + font-family: Arial, Helvetica, sans-serif; + +} + +.PAGE +{ + height: 600px; + width: 800px; +} + +.contentie +{ + position: absolute; + background-color: #FFFFFF; /*white*/ + color: #999999; + left: 300px; + top: 190px; + width: 603px; + height:379px; + overflow: auto; + padding: 5px 5px 5px 5px; + + scrollbar-track-color:white; + scrollbar-3dlight-color:white; + scrollbar-arrow-color:white; + scrollbar-base-color:white; + scrollbar-darkshadow-color:white; + scrollbar-face-color:#C6D3FF; + scrollbar-highlight-color:white; + scrollbar-shadow-color:white; +} + +.contentall +{ + position: absolute; + background-color: #FFFFFF; /*white*/ + color: #999999; + left: 300px; + top: 190px; + width: 590px; + height:379px; + overflow: auto; + padding: 5px 5px 5px 5px; + + scrollbar-track-color:white; + scrollbar-3dlight-color:white; + scrollbar-arrow-color:white; + scrollbar-base-color:white; + scrollbar-darkshadow-color:white; + scrollbar-face-color:#C6D3FF; + scrollbar-highlight-color:white; + scrollbar-shadow-color:white; +} + +.SIDEBAR +{ + position: absolute; + left: 0px; + top: 170px; + width: 300px; +} + +.TOPBAR +{ + position: absolute; + top: 1px; + left: 0px; + width: 1010px; + height: 168px; + +} + +.TITLE +{ + font-size: 12pt; + font-weight: bold; + color: #333333; +} + +.SUBTITLE +{ + + font-weight: bold; + line-height: 1.5; + color: #666666; +} + +.BOTTOMBAR +{ + position: absolute; + top: 580px; +} + +.navall +{ + position: absolute; + left: 755px; + top: 160px; +} + +.navie +{ + position: absolute; + left: 755px; + top: 170px; +} + +.fineprint +{ + font-size: 7pt; +} + + +.seperator +{ + position: absolute; + left: 320px; + top: 133px; + background: #ffffff; + font-family: Tahoma, Arial, sans-serif; + font-size: 11px; +} + +.domain +{ + position: absolute; + left: 332 px; + top: 133px; + background: #ffffff; + font-family: Tahoma, Arial, sans-serif; + font-size: 11px; +} Index: publicdnsadmin/styleother.css diff -u /dev/null publicdnsadmin/styleother.css:1.1 --- /dev/null Fri Jul 18 08:14:33 2003 +++ publicdnsadmin/styleother.css Fri Jul 18 08:14:23 2003 @@ -0,0 +1,283 @@ +body { + margin: 0px; + background: #ffffff; + font-family: Tahoma, Arial, sans-serif; + font-size: 11px; +} + +h1 { + color: #C6D3FF; + font-family: Tahoma, Arial, sans-serif; + font-size: 17px; + font-weight: bold; + text-decoration: none; + padding-left: 5px; +} + +h3 { + color: #AEAEAE; + font-family: Tahoma, Arial, sans-serif; + font-size: 13px; + font-weight: bold; + text-decoration: none; +} + +th { + background: #C7DDF4; + font-family: Tahoma, Arial, sans-serif; + font-size: 13px; + color: #ffffff; + text-align: left; + font-weight: bold; +} + +td { + font-family: Tahoma, Arial, sans-serif; + font-size: 11px; + color: #AEAEAE; +} + +input { + font-family: Tahoma, Arial, sans-serif; + font-size: 11px; + background: #E5EFF9; + color: #000000; +} + +textarea { + font-family: Tahoma, Arial, sans-serif; + font-size: 11px; + background: #E5EFF9; + color: #000000; +} + +select { + font-family: Tahoma, Arial, sans-serif; + font-size: 11px; + background: #E5EFF9; + color: #000000; +} + +a:link { + font-family: Tahoma, Arial, sans-serif; + font-size: 11px; + color: #AEAEAE; + text-decoration: underline; +} + +a:visited { + font-family: Tahoma, Arial, sans-serif; + font-size: 11px; + color: #AEAEAE; + text-decoration: underline; +} + +a:active { + font-family: Tahoma, Arial, sans-serif; + font-size: 11px; + color: #AEAEAE; + text-decoration: underline; +} + +a:hover { + font-family: Tahoma, Arial, sans-serif; + font-size: 11px; + color: #AEAEAE; + text-decoration: underline; +} + +.rowsearch { + background: #C7DDF4; + color: #AEAEAE; + font-family: Tahoma, Arial, sans-serif; + font-size: 11px; +} + +.row1 { + background: #e6ebef; +} + +.row2 { + background: #efeae6; +} + +.menu { + background: #C7DDF4; + color: #666666; + font-family: Tahoma, Arial, sans-serif; + font-size: 12px; +} + +a.menu:link { + color: #666666; + font-family: Tahoma, Arial, sans-serif; + font-size: 12px; + font-weight: bold; + text-decoration: none; +} + +a.menu:active { + color: #666666; + font-family: Tahoma, Arial, sans-serif; + font-size: 12px; + font-weight: bold; + text-decoration: none; +} + +a.menu:visited { + color: #666666; + font-family: Tahoma, Arial, sans-serif; + font-size: 12px; + font-weight: bold; + text-decoration: none; +} + +a.menu:hover { + color: #666666; + font-family: Tahoma, Arial, sans-serif; + font-size: 12px; + font-weight: bold; + text-decoration: none; +} + +.misc { + font-family: Tahoma, Arial, sans-serif; + font-size: 10px; +} + +body +{ + background-color: #ffffff; /*white*/ + font-size: 8pt; + font-family: Arial, Helvetica, sans-serif; + +} + +.PAGE +{ + height: 600px; + width: 800px; +} + +.contentie +{ + position: absolute; + background-color: #FFFFFF; /*white*/ + color: #999999; + left: 300px; + top: 190px; + width: 603px; + height:379px; + overflow: auto; + padding: 5px 5px 5px 5px; + + scrollbar-track-color:white; + scrollbar-3dlight-color:white; + scrollbar-arrow-color:white; + scrollbar-base-color:white; + scrollbar-darkshadow-color:white; + scrollbar-face-color:#C6D3FF; + scrollbar-highlight-color:white; + scrollbar-shadow-color:white; +} + +.contentall +{ + position: absolute; + background-color: #FFFFFF; /*white*/ + color: #999999; + left: 300px; + top: 190px; + width: 590px; + height:379px; + overflow: auto; + padding: 5px 5px 5px 5px; + + scrollbar-track-color:white; + scrollbar-3dlight-color:white; + scrollbar-arrow-color:white; + scrollbar-base-color:white; + scrollbar-darkshadow-color:white; + scrollbar-face-color:#C6D3FF; + scrollbar-highlight-color:white; + scrollbar-shadow-color:white; +} + +.SIDEBAR +{ + position: absolute; + left: 0px; + top: 170px; + width: 300px; +} + +.TOPBAR +{ + position: absolute; + top: 1px; + left: 0px; + width: 1010px; + height: 168px; + +} + +.TITLE +{ + font-size: 12pt; + font-weight: bold; + color: #333333; +} + +.SUBTITLE +{ + + font-weight: bold; + line-height: 1.5; + color: #666666; +} + +.BOTTOMBAR +{ + position: absolute; + top: 580px; +} + +.navall +{ + position: absolute; + left: 755px; + top: 160px; +} + +.navie +{ + position: absolute; + left: 755px; + top: 170px; +} + +.fineprint +{ + font-size: 7pt; +} + +.seperator +{ + position: absolute; + left: 320px; + top: 120px; + background: #ffffff; + font-family: Tahoma, Arial, sans-serif; + font-size: 11px; +} + +.domain +{ + position: absolute; + left: 332px; + top: 120px; + background: #ffffff; + font-family: Tahoma, Arial, sans-serif; + font-size: 11px; +} + ----------------------- End of diff ----------------------- |
From: Neil S. <sir...@us...> - 2003-07-17 13:09:34
|
CVSROOT : /cvsroot/publicdnsadmin Module : publicdnsadmin Commit time: 2003-07-17 12:02:38 UTC Modified files: create_record.php create_template_record.php edit_record.php edit_template_record.php edit_zone.php new_record.php new_template_record.php update_record.php update_template_record.php docs/CHANGELOG docs/TODO lib/records.inc.php Added files: delete_multi_records.php Log message: Author: SiRVulcaN <sir...@si...> Log message: - Allow users to delete multiple records at once. - Full MBOXFW support added. - Full URL support added. - Full RP support added. - Full HWINFO support added. - Full A6 support completed. - Full NS6 support completed. ---------------------- diff included ---------------------- Index: publicdnsadmin/create_record.php diff -u publicdnsadmin/create_record.php:1.3 publicdnsadmin/create_record.php:1.4 --- publicdnsadmin/create_record.php:1.3 Tue Jul 15 19:33:08 2003 +++ publicdnsadmin/create_record.php Thu Jul 17 05:02:27 2003 @@ -37,7 +37,7 @@ $domain = addslashes($row["name"]); $record = preg_replace("/\.+$/", "", $record); /* Remove trailing .'s */ - if ($type != "NS" and $type != "MX" and $type != "A" and $type != "AAAA" and $type != "PTR" and $type != "CNAME" and $type != "TXT" and $type != "A6" and $type != "NS6" ) { + if ($type != "NS" and $type != "MX" and $type != "A" and $type != "AAAA" and $type != "PTR" and $type != "CNAME" and $type != "TXT" and $type != "A6" and $type != "NS6" and $type != "MBOXFW" and $type != "URL" and $type != "RP" and $type != "HWINFO") { echo "<p class=\"error\">· Invalid pointer type: \"$type\"</p>\n"; } else { @@ -74,8 +74,13 @@ if ($type == "PTR") { $record_name = preg_replace("/^\.+/", "", "$record"); } else { - $record_name = preg_replace("/^\.+/", "", "$record.$domain"); + if ($type == "MBOXFW") { + $record_name = "$record@$domain"; + } else { + $record_name = preg_replace("/^\.+/", "", "$record.$domain"); + } } + $dbh->query("INSERT INTO records (domain_id, name, type, content, ttl, prio, change_date) VALUES($zoneid, '$record_name', '$type', '$content', '$ttl', '$prio', '".time()."')"); updateZoneSerial($zoneid); echo "<p>The record was added<br><a href=\"edit_zone.php?id=$zoneid\">Proceed »</a></p>\n"; Index: publicdnsadmin/create_template_record.php diff -u publicdnsadmin/create_template_record.php:1.4 publicdnsadmin/create_template_record.php:1.5 --- publicdnsadmin/create_template_record.php:1.4 Tue Jul 15 19:33:08 2003 +++ publicdnsadmin/create_template_record.php Thu Jul 17 05:02:27 2003 @@ -35,7 +35,7 @@ $domain = '$DOMAIN'; $record = preg_replace("/\.+$/", "", $record); /* Remove trailing .'s */ - if ($type != "NS" and $type != "MX" and $type != "A" and $type != "AAAA" and $type != "PTR" and $type != "CNAME" and $type != "TXT" and $type != "A6" and $type != "NS6" ) { + if ($type != "NS" and $type != "MX" and $type != "A" and $type != "AAAA" and $type != "PTR" and $type != "CNAME" and $type != "TXT" and $type != "A6" and $type != "NS6" and $type != "MBOXFW" and $type != "URL" and $type != "RP" and $type != "HWINFO") { echo "<p class=\"error\">· Invalid pointer type: \"$type\"</p>\n"; } else { @@ -57,7 +57,12 @@ echo "<p class=\"error\">· Invalid record data for pointer type</p>\n"; } else { - $record_name = preg_replace("/^\.+/", "", "$record.$domain"); + if ($type == "MBOXFW") { + $record_name = "$record@$domain"; + } else { + $record_name = preg_replace("/^\.+/", "", "$record.$domain"); + } + $dbh->query("INSERT INTO template_records (template_id, name, type, content, ttl, prio) VALUES('$zoneid', '$record_name', '$type', '$content', '$ttl', '$prio')"); echo "<p>The record was added<br><a href=\"edit_template.php?id=$zoneid\">Proceed »</a></p>\n"; echo "<script language=\"JavaScript\">\n"; Index: publicdnsadmin/delete_multi_records.php diff -u /dev/null publicdnsadmin/delete_multi_records.php:1.1 --- /dev/null Thu Jul 17 05:02:38 2003 +++ publicdnsadmin/delete_multi_records.php Thu Jul 17 05:02:28 2003 @@ -0,0 +1,65 @@ +<?php +/* + Public DNS Administator + Originally Written by Trond Arve Nordheim <tr...@no...> + Modified By Neil Spierling <sir...@si...> + + Distributed under the GPL license, see LICENSE for + more information + + $Id: +*/ + +require("lib/prepend.php"); +require("lib/header.php"); + +$perms = getUserPermissions($_SESSION["_UID"]); + +if (userHasAccess($_SESSION["_UID"], "edit")) { + +?> +<h3>Edit domain » delete multple records</h3> +<?php + + if ($recdel) { + $del_count_max = count($recdel); + + $dbh = db_connect(); + foreach($recdel as $rcount=>$recordid) { + $result = $dbh->query("SELECT domain_owners.user_id, domains.name AS domain_name, records.* FROM domains, domain_owners, records WHERE records.id = '$recordid' AND domain_owners.domain_id = records.domain_id AND domains.id = domain_owners.domain_id AND records.type <> 'SOA'"); + if (!$dbh->isError($result) && $result->numRows()) { + $row = $result->fetchRow(); + if ($perms["edit_other"] or ($perms["edit_own"] and $row["user_id"] == $_SESSION["_UID"])) { + $dbh->query("DELETE FROM records WHERE id = '$recordid'"); + updateZoneSerial($row["domain_id"]); + } else { + echo "<p class=\"error\">· You don't have permission to delete this record- ($recordid)</p>\n"; + $error_occur = 1; + } + // Technically the above and below errors should happen, if they do it will be a very rare occasion. -sirvulcan + } else { + echo "<p class=\"error\">· Zone/record not found ($recordid)</p>\n"; + $error_occur = 1; + } + } + if ($error_occur == 1) { + echo "<p>Some records could not be deleted, please check make sure you have permission to access/delete them</p>"; + echo "<p>Some "; + } else { + echo "<p>All "; + } + echo "selected records were successfully deleted<br><a href=\"edit_zone.php?id=".$row["domain_id"]."\">Proceed»</a></p>\n"; + if ($error_occur != 1) { + echo "<script language=\"JavaScript\">\n"; + echo "document.location.href='edit_zone.php?id=".$row["domain_id"]."';\n"; + echo "</script>\n"; + } + $dbh->disconnect(); + } +} else { + displayNoAccess(); +} + +require("lib/footer.php"); + +?> Index: publicdnsadmin/docs/CHANGELOG diff -u publicdnsadmin/docs/CHANGELOG:1.21 publicdnsadmin/docs/CHANGELOG:1.22 --- publicdnsadmin/docs/CHANGELOG:1.21 Wed Jul 16 09:03:08 2003 +++ publicdnsadmin/docs/CHANGELOG Thu Jul 17 05:02:28 2003 @@ -1,3 +1,10 @@ $Id: OUTsider <out...@ke...> - 16/7/2003 - Released 1.1 +SiRVulcaN <sir...@si...> - 17/7/2003 - Allow users to delete multiple records at once. + - Full MBOXFW support added. + - Full URL support added. + - Full RP support added. + - Full HWINFO support added. + - Full A6 support completed. + - Full NS6 support completed. Index: publicdnsadmin/docs/TODO diff -u publicdnsadmin/docs/TODO:1.9 publicdnsadmin/docs/TODO:1.10 --- publicdnsadmin/docs/TODO:1.9 Wed Jul 16 08:04:18 2003 +++ publicdnsadmin/docs/TODO Thu Jul 17 05:02:28 2003 @@ -1,4 +1,3 @@ - Some sort of maintenence news system (displayed on the main login page). -- Add URL/HWINFO/MBOXFW/RP record type support. - Syntax check records for validity to make it more fool proof. Index: publicdnsadmin/edit_record.php diff -u publicdnsadmin/edit_record.php:1.3 publicdnsadmin/edit_record.php:1.4 --- publicdnsadmin/edit_record.php:1.3 Tue Jul 15 19:33:08 2003 +++ publicdnsadmin/edit_record.php Thu Jul 17 05:02:28 2003 @@ -32,6 +32,10 @@ $record_name = preg_replace("/^(.*)$preg_dom$/", '\1', $row["name"]); $record_name = preg_replace("/^\.+/", "", $record_name); $record_name = preg_replace("/\.+$/", "", $record_name); + if ($row["type"] == "MBOXFW") { + $record_split = split("@", $record_name); + $record_name = $record_split[0]; + } ?> <form action="update_record.php?id=<?php echo $recordid; ?>" method="post"> @@ -40,9 +44,13 @@ <td><b>Record:</b></td> <? if ($row["type"] != "PTR") { + if ($row["type"] == "MBOXFW") { + echo "<td><input type=\"text\" name=\"record\" size=\"15\" maxlength=\"200\" value=\"" . htmlentities($record_name) . "\">@" . htmlentities($row["domain_name"]) . "</td>"; + } else { ?> <td><input type="text" name="record" size="15" maxlength="200" value="<?php echo htmlentities($record_name); ?>">.<?php echo htmlentities($row["domain_name"]); ?></td> <? + } } else { $expaddy = explode(".", htmlentities($record_name)); $dispaddy = $expaddy[3].".".$expaddy[2].".".$expaddy[1].".".$expaddy[0]; @@ -64,6 +72,10 @@ <option value="PTR"<?php if ($row["type"] == "PTR") { ?> selected<?php } ?>>PTR</option> <option value="CNAME"<?php if ($row["type"] == "CNAME") { ?> selected<?php } ?>>CNAME</option> <option value="TXT"<?php if ($row["type"] == "TXT") { ?> selected<?php } ?>>TXT</option> + <option value="MBOXFW"<?php if ($row["type"] == "MBOXFW") { ?> selected<?php } ?>>MBOXFW</option> + <option value="URL"<?php if ($row["type"] == "URL") { ?> selected<?php } ?>>URL</option> + <option value="RP"<?php if ($row["type"] == "RP") { ?> selected<?php } ?>>RP</option> + <option value="HWINFO"<?php if ($row["type"] == "HWINFO") { ?> selected<?php } ?>>HWINFO</option> </select></td> </tr> <tr> Index: publicdnsadmin/edit_template_record.php diff -u publicdnsadmin/edit_template_record.php:1.2 publicdnsadmin/edit_template_record.php:1.3 --- publicdnsadmin/edit_template_record.php:1.2 Tue Jul 15 19:33:08 2003 +++ publicdnsadmin/edit_template_record.php Thu Jul 17 05:02:28 2003 @@ -37,7 +37,11 @@ <table border="0" cellspacing="0" cellpadding="2"> <tr> <td><b>Record:</b></td> +<? if ($row["type"] == "MBOXFW") { ?> + <td><input type="text" name="record" size="15" maxlength="200" value="<?php echo htmlentities($record_name); ?>">@$DOMAIN</td> +<? } else { ?> <td><input type="text" name="record" size="15" maxlength="200" value="<?php echo htmlentities($record_name); ?>">.$DOMAIN</td> +<? } ?> </tr> <tr> <td><b>Type:</b></td> @@ -51,6 +55,10 @@ <option value="PTR"<?php if ($row["type"] == "PTR") { ?> selected<?php } ?>>PTR</option> <option value="CNAME"<?php if ($row["type"] == "CNAME") { ?> selected<?php } ?>>CNAME</option> <option value="TXT"<?php if ($row["type"] == "TXT") { ?> selected<?php } ?>>TXT</option> + <option value="MBOXFW"<?php if ($row["type"] == "MBOXFW") { ?> selected<?php } ?>>MBOXFW</option> + <option value="URL"<?php if ($row["type"] == "URL") { ?> selected<?php } ?>>URL</option> + <option value="RP"<?php if ($row["type"] == "RP") { ?> selected<?php } ?>>RP</option> + <option value="HWINFO"<?php if ($row["type"] == "HWINFO") { ?> selected<?php } ?>>HWINFO</option> </select></td> </tr> <tr> Index: publicdnsadmin/edit_zone.php diff -u publicdnsadmin/edit_zone.php:1.2 publicdnsadmin/edit_zone.php:1.3 --- publicdnsadmin/edit_zone.php:1.2 Fri Jun 13 06:28:58 2003 +++ publicdnsadmin/edit_zone.php Thu Jul 17 05:02:28 2003 @@ -35,7 +35,14 @@ $records = getRecords($zoneid); echo "<p>· <a href=\"new_record.php?zone=$zoneid\">New record</a></p>\n"; - echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><tr><td style=\"background: #000000;\"><table border=\"0\" cellspacing=\"1\" cellpadding=\"2\"><tr><th>Record</th><th>Type</th><th>Content</th><th>Priority</th><th>TTL</th><th> </th></tr>\n"; + + echo "<form action=\"delete_multi_records.php\" method=\"post\">\n"; + + if (count($records) > 1) { + echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><tr><td style=\"background: #000000;\"><table border=\"0\" cellspacing=\"1\" cellpadding=\"2\"><tr><th><input type=\"submit\" value=\"Del\"></th><th>Record</th><th>Type</th><th>Content</th><th>Priority</th><th>TTL</th><th> </th></tr>\n"; + } else { + echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><tr><td style=\"background: #000000;\"><table border=\"0\" cellspacing=\"1\" cellpadding=\"2\"><tr><th><input type=\"submit\" disabled=\"true\" value=\"Del\"></th><th>Record</th><th>Type</th><th>Content</th><th>Priority</th><th>TTL</th><th> </th></tr>\n"; + } $row_id = 0; foreach ($records as $record) { @@ -47,10 +54,19 @@ $priority = " "; } - echo "<tr>\n"; + echo "<tr><td class=\"row$row_id\">"; + if ($record["type"] != "SOA") { + echo "<input type=\"checkbox\" name=\"recdel[]\" value=\"". $record["id"] ."\">"; + } + echo "</td>"; + if (htmlentities($record["type"]) != "PTR") { if ($record["type"] != "SOA") { - echo "<td class=\"row$row_id\"><a href=\"edit_record.php?id=".$record["id"]."\">".htmlentities($record["name"])."</a></td>\n"; + if ($record["type"] == "MBOXFW") { + echo "<td class=\"row$row_id\"><a href=\"edit_record.php?id=".$record["id"]."\">". $record["name"] ."</a></td>\n"; + } else { + echo "<td class=\"row$row_id\"><a href=\"edit_record.php?id=".$record["id"]."\">".htmlentities($record["name"])."</a></td>\n"; + } } else { echo "<td class=\"row$row_id\">".htmlentities($record["name"])."</td>\n"; } @@ -80,7 +96,7 @@ if ($row_id == 2) { $row_id = 0; } } - echo "</table></td></tr></table>\n"; + echo "</table></td></tr></table></form>\n"; } else { echo "<p class=\"error\">· You don't have permission to edit this domain</p>\n"; Index: publicdnsadmin/lib/records.inc.php diff -u publicdnsadmin/lib/records.inc.php:1.2 publicdnsadmin/lib/records.inc.php:1.3 --- publicdnsadmin/lib/records.inc.php:1.2 Fri Jun 13 06:29:00 2003 +++ publicdnsadmin/lib/records.inc.php Thu Jul 17 05:02:28 2003 @@ -7,7 +7,7 @@ Distributed under the GPL license, see LICENSE for more information - $Id: records.inc.php,v 1.2 2003/06/13 13:29:00 sirvulcan Exp $ + $Id: records.inc.php,v 1.3 2003/07/17 12:02:28 sirvulcan Exp $ */ function getRecords($zoneid) { @@ -72,10 +72,58 @@ } } + /* Fetch MBOXFW */ + $rec = getRecordsByType($zoneid, "MBOXFW"); + if (count($rec)) { + foreach ($rec as $r) { + array_push($records, $r); + } + } + + /* Fetch URL */ + $rec = getRecordsByType($zoneid, "URL"); + if (count($rec)) { + foreach ($rec as $r) { + array_push($records, $r); + } + } + + /* Fetch RP */ + $rec = getRecordsByType($zoneid, "RP"); + if (count($rec)) { + foreach ($rec as $r) { + array_push($records, $r); + } + } + + /* Fetch HWINFO */ + $rec = getRecordsByType($zoneid, "HWINFO"); + if (count($rec)) { + foreach ($rec as $r) { + array_push($records, $r); + } + } + + /* Fetch A6 */ + $rec = getRecordsByType($zoneid, "A6"); + if (count($rec)) { + foreach ($rec as $r) { + array_push($records, $r); + } + } + + /* Fetch NS6 */ + $rec = getRecordsByType($zoneid, "NS6"); + if (count($rec)) { + foreach ($rec as $r) { + array_push($records, $r); + } + } + /* Fetch everything else */ $dbh = db_connect(); - $result = $dbh->query("SELECT * FROM records WHERE domain_id = '$zoneid' AND (type <> 'SOA' AND type <> 'NS' AND type <> 'MX' AND type <> 'A' AND type <> 'AAAA' AND type <> 'PTR' AND type <> 'CNAME')"); + $result = $dbh->query("SELECT * FROM records WHERE domain_id = '$zoneid' AND (type <> 'SOA' AND type <> 'NS' AND type <> 'MX' AND type <> 'A' AND type <> 'AAAA' AND type <> 'PTR' AND type <> 'CNAME' AND type <> 'MBOXFW' AND type <> 'URL' AND type <> 'RP' AND type <> 'HWINFO' AND type <> 'A6' AND type <> 'NS6')"); if (!$dbh->isError($result) && $result->numRows()) { while ($row = $result->fetchRow()) { @@ -156,8 +204,31 @@ if (!$content) { $ok = 0; } - } + } elseif ($type == "MBOXFW") { + if (!eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@([0-9a-z](-?[0-9a-z])*\.)+[a-z]{2}([zmuvtg]|fo|me)?$",$content)) { + $ok = 0; + } + } elseif ($type == "URL") { + if (!preg_match('#^http[s]?:\/\/#i', $content)) { + $content = 'http://' . $content; + } + if (!preg_match('#^http[s]?\\:\\/\\/[a-z0-9\-]+\.([a-z0-9\-]+\.)?[a-z]+#i', $content)) { + $ok = 0; + } + } elseif ($type == "HWINFO") { + if (!$content) { + $ok = 0; + } + } elseif ($type == "A6") { + if (!preg_match("/^[0-9a-f\:]+$/", $content)) { + $ok = 0; + } + } elseif ($type == "NS6") { + if (!preg_match("/^[0-9a-f\:]+$/", $content)) { + $ok = 0; + } + } return $ok; } @@ -207,6 +278,30 @@ if (!$content) { $ok = 0; } + } elseif ($type == "MBOXFW") { + if (!eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@([0-9a-z](-?[0-9a-z])*\.)+[a-z]{2}([zmuvtg]|fo|me)?$",$content)) { + $ok = 0; + } + } elseif ($type == "URL") { + if (!preg_match('#^http[s]?:\/\/#i', $content)) { + $content = 'http://' . $content; + } + + if (!preg_match('#^http[s]?\\:\\/\\/[a-z0-9\-]+\.([a-z0-9\-]+\.)?[a-z]+#i', $content)) { + $ok = 0; + } + } elseif ($type == "HWINFO") { + if (!$content) { + $ok = 0; + } + } elseif ($type == "A6") { + if (!preg_match("/^[0-9a-f\:]+/", $content)) { + $ok = 0; + } + } elseif ($type == "NS6") { + if (!preg_match("/^[0-9a-f\:]+/", $content)) { + $ok = 0; + } } return $ok; @@ -254,6 +349,26 @@ $ok = 0; } } elseif ($type == "CNAME") { + if ($record and !preg_match("/^[a-zA-Z0-9-_\.\*]+$/", $record)) { + if ($template and preg_match("/\\\$CONTENT/", $record)) { + $ok = 1; + } else { + $ok = 0; + } + } + } elseif ($type == "MBOXFW") { + if (eregi("^[a-z0-9]+([_\\.-][a-z0-9]+)*". "@([a-z0-9]+([\.-][a-z0-9]+))*$",$record)) { + $ok = 0; + } + } elseif ($type == "A6") { + if ($record and !preg_match("/^[a-zA-Z0-9-_\.\*]+$/", $record)) { + if ($template and preg_match("/\\\$CONTENT/", $record)) { + $ok = 1; + } else { + $ok = 0; + } + } + } elseif ($type == "NS6") { if ($record and !preg_match("/^[a-zA-Z0-9-_\.\*]+$/", $record)) { if ($template and preg_match("/\\\$CONTENT/", $record)) { $ok = 1; Index: publicdnsadmin/new_record.php diff -u publicdnsadmin/new_record.php:1.3 publicdnsadmin/new_record.php:1.4 --- publicdnsadmin/new_record.php:1.3 Tue Jul 15 19:33:08 2003 +++ publicdnsadmin/new_record.php Thu Jul 17 05:02:28 2003 @@ -49,6 +49,10 @@ <option value="PTR">PTR</option> <option value="CNAME">CNAME</option> <option value="TXT">TXT</option> + <option value="MBOXFW">MBOXFW</option> + <option value="URL">URL</option> + <option value="RP">RP</option> + <option value="HWINFO">HWINFO</option> </select></td> </tr> <tr> Index: publicdnsadmin/new_template_record.php diff -u publicdnsadmin/new_template_record.php:1.2 publicdnsadmin/new_template_record.php:1.3 --- publicdnsadmin/new_template_record.php:1.2 Tue Jul 15 19:33:08 2003 +++ publicdnsadmin/new_template_record.php Thu Jul 17 05:02:28 2003 @@ -48,6 +48,10 @@ <option value="PTR">PTR</option> <option value="CNAME">CNAME</option> <option value="TXT">TXT</option> + <option value="MBOXFW">MBOXFW</option> + <option value="URL">URL</option> + <option value="RP">RP</option> + <option value="HWINFO">HWINFO</option> </select></td> </tr> <tr> Index: publicdnsadmin/update_record.php diff -u publicdnsadmin/update_record.php:1.3 publicdnsadmin/update_record.php:1.4 --- publicdnsadmin/update_record.php:1.3 Tue Jul 15 19:33:08 2003 +++ publicdnsadmin/update_record.php Thu Jul 17 05:02:28 2003 @@ -38,7 +38,7 @@ $domain = addslashes($row["name"]); $record = preg_replace("/\.+$/", "", $record); /* Remove trailing .'s */ - if ($type != "NS" and $type != "MX" and $type != "A" and $type != "AAAA" and $type != "PTR" and $type != "CNAME" and $type != "TXT" and $type != "A6" and $type != "NS6" ) { + if ($type != "NS" and $type != "MX" and $type != "A" and $type != "AAAA" and $type != "PTR" and $type != "CNAME" and $type != "TXT" and $type != "A6" and $type != "NS6" and $type != "MBOXFW" and $type != "URL" and $type != "RP" and $type != "HWINFO") { echo "<p class=\"error\">· Invalid pointer type: \"$type\"</p>\n"; } else { @@ -75,7 +75,11 @@ if ($type == "PTR") { $record_name = preg_replace("/^\.+/", "", "$record"); } else { - $record_name = preg_replace("/^\.+/", "", "$record.$domain"); + if ($type == "MBOXFW") { + $record_name = "$record@$domain"; + } else { + $record_name = preg_replace("/^\.+/", "", "$record.$domain"); + } } $dbh->query("UPDATE records SET name = '$record_name', type = '$type', content = '$content', ttl = '$ttl', prio = '$prio', change_date = '".time()."' WHERE id = '$recordid'"); updateZoneSerial($row["id"]); Index: publicdnsadmin/update_template_record.php diff -u publicdnsadmin/update_template_record.php:1.3 publicdnsadmin/update_template_record.php:1.4 --- publicdnsadmin/update_template_record.php:1.3 Tue Jul 15 19:33:08 2003 +++ publicdnsadmin/update_template_record.php Thu Jul 17 05:02:28 2003 @@ -35,7 +35,7 @@ $domain = '$DOMAIN'; $record = preg_replace("/\.+$/", "", $record); /* Remove trailing .'s */ - if ($type != "NS" and $type != "MX" and $type != "A" and $type != "AAAA" and $type != "PTR" and $type != "CNAME" and $type != "TXT"and $type != "A6" and $type != "NS6" ) { + if ($type != "NS" and $type != "MX" and $type != "A" and $type != "AAAA" and $type != "PTR" and $type != "CNAME" and $type != "TXT" and $type != "A6" and $type != "NS6" and $type != "MBOXFW" and $type != "URL" and $type != "RP" and $type != "HWINFO") { echo "<p class=\"error\">· Invalid pointer type: \"$type\"</p>\n"; } else { @@ -59,7 +59,12 @@ echo "<p class=\"error\">· Invalid record data for pointer type</p>\n"; } else { - $record_name = preg_replace("/^\.+/", "", "$record.$domain"); + if ($type == "MBOXFW") { + $record_name = "$record@$domain"; + } else { + $record_name = preg_replace("/^\.+/", "", "$record.$domain"); + } + $dbh->query("UPDATE template_records SET name = '$record_name', type = '$type', content = '$content', ttl = '$ttl', prio = '$prio' WHERE id = '$recordid'"); echo "<p>The record was updated<br><a href=\"edit_template.php?id=".$row["id"]."\">Proceed »</a></p>\n"; echo "<script language=\"JavaScript\">\n"; ----------------------- End of diff ----------------------- |
From: Alexander M. <key...@us...> - 2003-07-16 16:03:20
|
CVSROOT : /cvsroot/publicdnsadmin Module : publicdnsadmin Commit time: 2003-07-16 16:03:18 UTC Modified files: docs/CHANGELOG lib/header.php Log message: Author: Alexander Maassen <out...@ke...> Log message: Released 1.1 ---------------------- diff included ---------------------- Index: publicdnsadmin/docs/CHANGELOG diff -u publicdnsadmin/docs/CHANGELOG:1.20 publicdnsadmin/docs/CHANGELOG:1.21 --- publicdnsadmin/docs/CHANGELOG:1.20 Wed Jul 16 08:04:18 2003 +++ publicdnsadmin/docs/CHANGELOG Wed Jul 16 09:03:08 2003 @@ -1,43 +1,3 @@ $Id: -SiRVu|caN <sir...@si...> - 4/16/2003 - initial project release. -SiRVu|caN <sir...@si...> - 24/5/2003 - Fixed PRIO-bug. -SiRVu|caN <sir...@si...> - 13/6/2003 - CSS HTML link color fix. -SiRVu|caN <sir...@si...> - 13/6/2003 - Allow the use of $DOMAIN in content field of template records. - - Users with granted access of other domains can now create/edit - records in them. -SiRVu|caN <sir...@si...> - 14/6/2003 - Fixed formatting issue on dbbackup page. - - Added documentation for the dbbackup setup into INSTALL, i - will improve the way it works later. - - Fixed path for .gz backup download link. -SiRVu|caN <sir...@si...> - 14/6/2003 - Added delete_user.php for deleting users. -SiRVu|caN <sir...@si...> - 14/6/2003 - Layout change. -SiRVu|caN <sir...@si...> - 14/6/2003 - Added TODO file in docs. -SiRVu|caN <sir...@si...> - 18/6/2003 - Added in a graphical check for signup and/or login. -SiRVu|caN <sir...@si...> - 18/6/2003 - Made the Contact email address changable in config.php. -SiRVu|caN <sir...@si...> - 19/6/2003 - Added a small image to fill up some of the white space. -SiRVu|caN <sir...@si...> - 19/6/2003 - Improved dbbackup.php, now doesnt require seperate conf. -SiRVu|caN <sir...@si...> - 19/6/2003 - Added a offset system, 10 domains displayed per page. -SiRVu|caN <sir...@si...> - 19/6/2003 - Version number added below the logo. -SiRVu|caN <sir...@si...> - 19/6/2003 - Admins can now restrict signups. -SiRVu|caN <sir...@si...> - 19/6/2003 - Added powered by images. -OUTsider <out...@ke...> - 16/7/2003 - Fixed several HTML missings - - Fixed double occurance of ns2port in config, one should have - been ns1port - - Added A6/NS6 records support - - Added support for postgres backup and changed the layout of it - - Updated postgres.sql to use the types as they are designed for. - - Did some work on db_types. - - Fixed hostmaster setting in config. Should use "." instead of "@" . -SiRVu|caN <sir...@si...> - 16/7/2003 - Threw in a / in front of "data" in the dbbackup.php link to - the gziped sql file the user downloads. - - Bug reporting address is now a link to submitting a bug in the - sourceforge project interface. -OUTsider <out...@ke...> - 16/7/2003 - Updated TODO and docs again to reflect new changes - - Moved whois to use SQL instead as source for whois servers - - Added a list of all required whois servers you might need. - Import docs/whoissrv.<dbtype>.sql into your database. - (NOTE: Upgraders first import docs/whois.update.<dbtype>.sql !!) - - Updated ns stats, splitted them into two files (ns1stats/ns2stats). - This was needed to make the changes to support subpages in the stats - Remaining problem is the 'Return to Main Page' link. +OUTsider <out...@ke...> - 16/7/2003 - Released 1.1 Index: publicdnsadmin/lib/header.php diff -u publicdnsadmin/lib/header.php:1.12 publicdnsadmin/lib/header.php:1.13 --- publicdnsadmin/lib/header.php:1.12 Wed Jul 16 08:04:18 2003 +++ publicdnsadmin/lib/header.php Wed Jul 16 09:03:08 2003 @@ -7,7 +7,7 @@ Distributed under the GPL license, see LICENSE for more information - $Id: header.php,v 1.12 2003/07/16 15:04:18 key2peace Exp $ + $Id: header.php,v 1.13 2003/07/16 16:03:08 key2peace Exp $ */ ?> @@ -74,5 +74,5 @@ <table><tr><td> <img src="images/logo.gif"><br> </td></tr><tr><td align="right"> - <font face="verdana" size=1>Public DNS Administrator v1.0</font> + <font face="verdana" size=1>Public DNS Administrator v1.1</font> </td></tr></table> ----------------------- End of diff ----------------------- |
From: Alexander M. <key...@us...> - 2003-07-16 15:04:28
|
CVSROOT : /cvsroot/publicdnsadmin Module : publicdnsadmin Commit time: 2003-07-16 15:04:28 UTC Modified files: docs/CHANGELOG docs/TODO lib/header.php Added files: ns1stats.php ns2stats.php Removed files: nsstats.php Log message: Author: Alexander Maassen <out...@ke...> Log message: Updated ns statistics ---------------------- diff included ---------------------- Index: publicdnsadmin/docs/CHANGELOG diff -u publicdnsadmin/docs/CHANGELOG:1.19 publicdnsadmin/docs/CHANGELOG:1.20 --- publicdnsadmin/docs/CHANGELOG:1.19 Wed Jul 16 07:36:51 2003 +++ publicdnsadmin/docs/CHANGELOG Wed Jul 16 08:04:18 2003 @@ -38,3 +38,6 @@ - Added a list of all required whois servers you might need. Import docs/whoissrv.<dbtype>.sql into your database. (NOTE: Upgraders first import docs/whois.update.<dbtype>.sql !!) + - Updated ns stats, splitted them into two files (ns1stats/ns2stats). + This was needed to make the changes to support subpages in the stats + Remaining problem is the 'Return to Main Page' link. Index: publicdnsadmin/docs/TODO diff -u publicdnsadmin/docs/TODO:1.8 publicdnsadmin/docs/TODO:1.9 --- publicdnsadmin/docs/TODO:1.8 Wed Jul 16 07:36:51 2003 +++ publicdnsadmin/docs/TODO Wed Jul 16 08:04:18 2003 @@ -1,5 +1,4 @@ - Some sort of maintenence news system (displayed on the main login page). -- Improve nsstats.php. - Add URL/HWINFO/MBOXFW/RP record type support. - Syntax check records for validity to make it more fool proof. Index: publicdnsadmin/lib/header.php diff -u publicdnsadmin/lib/header.php:1.11 publicdnsadmin/lib/header.php:1.12 --- publicdnsadmin/lib/header.php:1.11 Wed Jul 16 04:51:30 2003 +++ publicdnsadmin/lib/header.php Wed Jul 16 08:04:18 2003 @@ -7,7 +7,7 @@ Distributed under the GPL license, see LICENSE for more information - $Id: header.php,v 1.11 2003/07/16 11:51:30 key2peace Exp $ + $Id: header.php,v 1.12 2003/07/16 15:04:18 key2peace Exp $ */ ?> @@ -37,8 +37,8 @@ <?php if ($_SESSION["_UID"]) { ?><br>· <a href="edit_self.php" class="menu">Settings</a><br><?php } ?> - <?php if (userHasAccess($_SESSION["_UID"], "users")) { ?><br>· <a href="nsstats.php?serv=1" class="menu">NS1 stats</a><br><?php } ?> - <?php if (userHasAccess($_SESSION["_UID"], "users")) { ?>· <a href="nsstats.php?serv=2" class="menu">NS2 stats</a><br><?php } ?> + <?php if (userHasAccess($_SESSION["_UID"], "users")) { ?><br>· <a href="ns1stats.php" class="menu">NS1 stats</a><br><?php } ?> + <?php if (userHasAccess($_SESSION["_UID"], "users")) { ?>· <a href="ns2stats.php" class="menu">NS2 stats</a><br><?php } ?> <br>· <a href="logout.php" class="menu">Log out</a><br> <?php } else { ?> Index: publicdnsadmin/ns1stats.php diff -u /dev/null publicdnsadmin/ns1stats.php:1.1 --- /dev/null Wed Jul 16 08:04:28 2003 +++ publicdnsadmin/ns1stats.php Wed Jul 16 08:04:17 2003 @@ -0,0 +1,23 @@ +<? +/* + Public DNS Administator + Originally Written by Trond Arve Nordheim <tr...@no...> + Modified By Neil Spierling <sir...@si...> + + Distributed under the GPL license, see LICENSE for + more information + + $Id: +*/ +require("lib/prepend.php"); +include("lib/header.php"); + +if (userHasAccess($_SESSION["_UID"], "users")) { + $query = $_SERVER["QUERY_STRING"]; + include("http://$ns1user:$ns1pass@$ns1addy:$ns1port/?$query"); +} else { + displayNoAccess(); +} +echo "</table>"; +include("lib/footer.php"); +?> Index: publicdnsadmin/ns2stats.php diff -u /dev/null publicdnsadmin/ns2stats.php:1.1 --- /dev/null Wed Jul 16 08:04:28 2003 +++ publicdnsadmin/ns2stats.php Wed Jul 16 08:04:17 2003 @@ -0,0 +1,23 @@ +<? +/* + Public DNS Administator + Originally Written by Trond Arve Nordheim <tr...@no...> + Modified By Neil Spierling <sir...@si...> + + Distributed under the GPL license, see LICENSE for + more information + + $Id: +*/ +require("lib/prepend.php"); +include("lib/header.php"); + +if (userHasAccess($_SESSION["_UID"], "users")) { + $query = $_SERVER["QUERY_STRING"]; + include("http://$ns2user:$ns2pass@$ns2addy:$ns2port/?$query"); +} else { + displayNoAccess(); +} +echo "</table>"; +include("lib/footer.php"); +?> Index: publicdnsadmin/nsstats.php diff -u publicdnsadmin/nsstats.php:1.1.1.1 publicdnsadmin/nsstats.php:removed --- publicdnsadmin/nsstats.php:1.1.1.1 Wed Apr 16 00:19:05 2003 +++ publicdnsadmin/nsstats.php Wed Jul 16 08:04:28 2003 @@ -1,26 +0,0 @@ -<? -/* - Public DNS Administator - Originally Written by Trond Arve Nordheim <tr...@no...> - Modified By Neil Spierling <sir...@si...> - - Distributed under the GPL license, see LICENSE for - more information - - $Id: -*/ -require("lib/prepend.php"); -include("lib/header.php"); - -if (userHasAccess($_SESSION["_UID"], "users")) { - if ($serv == 1) { - include("http://$ns1user:$ns1pass@$ns1addy:$ns1port/"); - } else { - include("http://$ns2user:$ns2pass@$ns2addy:$ns2port/"); - } -} else { - displayNoAccess(); -} -echo "</table>"; -include("lib/footer.php"); -?> ----------------------- End of diff ----------------------- |
From: Alexander M. <key...@us...> - 2003-07-16 14:37:04
|
CVSROOT : /cvsroot/publicdnsadmin Module : publicdnsadmin Commit time: 2003-07-16 14:37:02 UTC Modified files: docs/CHANGELOG docs/TODO docs/mysql.sql docs/postgresql.sql docs/whois.update.mysql.sql docs/whois.update.postgres.sql Added files: docs/whoissrv.mysql.sql docs/whoissrv.postgres.sql Log message: Author: Alexander Maassen <out...@ke...> Log message: - Added all needed whois servers one might need ---------------------- diff included ---------------------- Index: publicdnsadmin/docs/CHANGELOG diff -u publicdnsadmin/docs/CHANGELOG:1.18 publicdnsadmin/docs/CHANGELOG:1.19 --- publicdnsadmin/docs/CHANGELOG:1.18 Wed Jul 16 06:53:57 2003 +++ publicdnsadmin/docs/CHANGELOG Wed Jul 16 07:36:51 2003 @@ -35,3 +35,6 @@ sourceforge project interface. OUTsider <out...@ke...> - 16/7/2003 - Updated TODO and docs again to reflect new changes - Moved whois to use SQL instead as source for whois servers + - Added a list of all required whois servers you might need. + Import docs/whoissrv.<dbtype>.sql into your database. + (NOTE: Upgraders first import docs/whois.update.<dbtype>.sql !!) Index: publicdnsadmin/docs/TODO diff -u publicdnsadmin/docs/TODO:1.7 publicdnsadmin/docs/TODO:1.8 --- publicdnsadmin/docs/TODO:1.7 Wed Jul 16 06:53:57 2003 +++ publicdnsadmin/docs/TODO Wed Jul 16 07:36:51 2003 @@ -1,6 +1,5 @@ - Some sort of maintenence news system (displayed on the main login page). - Improve nsstats.php. - Add URL/HWINFO/MBOXFW/RP record type support. -- Create an interface to manage domain registries whois servers. - Syntax check records for validity to make it more fool proof. Index: publicdnsadmin/docs/mysql.sql diff -u publicdnsadmin/docs/mysql.sql:1.3 publicdnsadmin/docs/mysql.sql:1.4 --- publicdnsadmin/docs/mysql.sql:1.3 Wed Jul 16 06:53:57 2003 +++ publicdnsadmin/docs/mysql.sql Wed Jul 16 07:36:51 2003 @@ -54,15 +54,3 @@ ); CREATE INDEX gfxcodes_idx ON gfxcodes(code,crc,expire); - -INSERT INTO users VALUES (1, 'admin', '21232f297a57a5a743894a0e4a801fc3', 'DNS Administrator', 'hos...@ex...', '', '2'); -INSERT INTO whoisservers VALUES (1,'com','whois.crsnic.net'); -INSERT INTO whoisservers VALUES (2,'net','whois.crsnic.net'); -INSERT INTO whoisservers VALUES (3,'edu','whois.crsnic.net'); -INSERT INTO whoisservers VALUES (4,'info','whois.afilias.net'); -INSERT INTO whoisservers VALUES (5,'name','whois.nic.name'); -INSERT INTO whoisservers VALUES (6,'biz','whois.nic.biz'); -INSERT INTO whoisservers VALUES (7,'us','whois.nic.us'); -INSERT INTO whoisservers VALUES (8,'cc','whois.enicregistrar.com'); -INSERT INTO whoisservers VALUES (9,'org','whois.enom.com'); -INSERT INTO whoisservers VALUES (10,'ws','whois.nic.ws'); Index: publicdnsadmin/docs/postgresql.sql diff -u publicdnsadmin/docs/postgresql.sql:1.5 publicdnsadmin/docs/postgresql.sql:1.6 --- publicdnsadmin/docs/postgresql.sql:1.5 Wed Jul 16 06:53:57 2003 +++ publicdnsadmin/docs/postgresql.sql Wed Jul 16 07:36:51 2003 @@ -54,14 +54,3 @@ CREATE INDEX gfxcodes_idx ON gfxcodes(code,crc,expire); INSERT INTO "users" ("username", "password", "name", "email", "company", "permission") VALUES('outsider', '21232f297a57a5a743894a0e4a801fc3', 'DNS Administrator', 'out...@ke...', 'Key2Peace BotServices', 2); -INSERT INTO "whoisservers" ("tld", "server") VALUES ('com','whois.crsnic.net'); -INSERT INTO "whoisservers" ("tld", "server") VALUES ('net','whois.crsnic.net'); -INSERT INTO "whoisservers" ("tld", "server") VALUES ('edu','whois.crsnic.net'); -INSERT INTO "whoisservers" ("tld", "server") VALUES ('info','whois.afilias.net'); -INSERT INTO "whoisservers" ("tld", "server") VALUES ('name','whois.nic.name'); -INSERT INTO "whoisservers" ("tld", "server") VALUES ('biz','whois.nic.biz'); -INSERT INTO "whoisservers" ("tld", "server") VALUES ('us','whois.nic.us'); -INSERT INTO "whoisservers" ("tld", "server") VALUES ('cc','whois.enicregistrar.com'); -INSERT INTO "whoisservers" ("tld", "server") VALUES ('org','whois.enom.com'); -INSERT INTO "whoisservers" ("tld", "server") VALUES ('ws','whois.nic.ws'); - Index: publicdnsadmin/docs/whois.update.mysql.sql diff -u publicdnsadmin/docs/whois.update.mysql.sql:1.1 publicdnsadmin/docs/whois.update.mysql.sql:1.2 --- publicdnsadmin/docs/whois.update.mysql.sql:1.1 Wed Jul 16 06:53:57 2003 +++ publicdnsadmin/docs/whois.update.mysql.sql Wed Jul 16 07:36:51 2003 @@ -5,13 +5,3 @@ PRIMARY KEY (id) ); -INSERT INTO whoisservers VALUES (1,'com','whois.crsnic.net'); -INSERT INTO whoisservers VALUES (2,'net','whois.crsnic.net'); -INSERT INTO whoisservers VALUES (3,'edu','whois.crsnic.net'); -INSERT INTO whoisservers VALUES (4,'info','whois.afilias.net'); -INSERT INTO whoisservers VALUES (5,'name','whois.nic.name'); -INSERT INTO whoisservers VALUES (6,'biz','whois.nic.biz'); -INSERT INTO whoisservers VALUES (7,'us','whois.nic.us'); -INSERT INTO whoisservers VALUES (8,'cc','whois.enicregistrar.com'); -INSERT INTO whoisservers VALUES (9,'org','whois.enom.com'); -INSERT INTO whoisservers VALUES (10,'ws','whois.nic.ws'); Index: publicdnsadmin/docs/whois.update.postgres.sql diff -u publicdnsadmin/docs/whois.update.postgres.sql:1.1 publicdnsadmin/docs/whois.update.postgres.sql:1.2 --- publicdnsadmin/docs/whois.update.postgres.sql:1.1 Wed Jul 16 06:53:57 2003 +++ publicdnsadmin/docs/whois.update.postgres.sql Wed Jul 16 07:36:52 2003 @@ -4,16 +4,3 @@ server varchar(128) NOT NULL default '', PRIMARY KEY (id) ); -DELETE FROM whoisservers; - -INSERT INTO "whoisservers" ("tld", "server") VALUES ('com','whois.crsnic.net'); -INSERT INTO "whoisservers" ("tld", "server") VALUES ('net','whois.crsnic.net'); -INSERT INTO "whoisservers" ("tld", "server") VALUES ('edu','whois.crsnic.net'); -INSERT INTO "whoisservers" ("tld", "server") VALUES ('info','whois.afilias.net'); -INSERT INTO "whoisservers" ("tld", "server") VALUES ('name','whois.nic.name'); -INSERT INTO "whoisservers" ("tld", "server") VALUES ('biz','whois.nic.biz'); -INSERT INTO "whoisservers" ("tld", "server") VALUES ('us','whois.nic.us'); -INSERT INTO "whoisservers" ("tld", "server") VALUES ('cc','whois.enicregistrar.com'); -INSERT INTO "whoisservers" ("tld", "server") VALUES ('org','whois.enom.com'); -INSERT INTO "whoisservers" ("tld", "server") VALUES ('ws','whois.nic.ws'); - Index: publicdnsadmin/docs/whoissrv.mysql.sql diff -u /dev/null publicdnsadmin/docs/whoissrv.mysql.sql:1.1 --- /dev/null Wed Jul 16 07:37:02 2003 +++ publicdnsadmin/docs/whoissrv.mysql.sql Wed Jul 16 07:36:52 2003 @@ -0,0 +1,86 @@ +DELETE FROM whoisservers; +INSERT INTO whoisservers VALUES (1, 'ac','whois.nic.ac'); +INSERT INTO whoisservers VALUES (2, 'ad','whois.ripe.net'); +INSERT INTO whoisservers VALUES (3, 'aero','whois.information.aero'); +INSERT INTO whoisservers VALUES (4, 'af','whois.netnames.net'); +INSERT INTO whoisservers VALUES (5, 'ag','whois.nic.ag'); +INSERT INTO whoisservers VALUES (6, 'am','whois.nic.am'); +INSERT INTO whoisservers VALUES (7, 'as','whois.nic.as'); +INSERT INTO whoisservers VALUES (8, 'at','whois.nic.at'); +INSERT INTO whoisservers VALUES (9, 'au','whois.apnic.net'); +INSERT INTO whoisservers VALUES (10, 'biz','whois.nic.biz'); +INSERT INTO whoisservers VALUES (11, 'br','whois.nic.br'); +INSERT INTO whoisservers VALUES (12, 'by','whois.ripe.net'); +INSERT INTO whoisservers VALUES (13, 'bz','mhpwhois1.verisign-grs.net'); +INSERT INTO whoisservers VALUES (14, 'ca','whois.cira.ca'); +INSERT INTO whoisservers VALUES (15, 'cc','whois.nic.cc'); +INSERT INTO whoisservers VALUES (16, 'cd','whois.cd'); +INSERT INTO whoisservers VALUES (17, 'ch','whois.nic.ch'); +INSERT INTO whoisservers VALUES (18, 'cl','whois.nic.cl'); +INSERT INTO whoisservers VALUES (19, 'cn','whois.cnnic.net.cn'); +INSERT INTO whoisservers VALUES (20, 'com','whois.crsnic.net'); +INSERT INTO whoisservers VALUES (21, 'cx','whois.nic.cx'); +INSERT INTO whoisservers VALUES (22, 'cz','whois.nic.cz'); +INSERT INTO whoisservers VALUES (23, 'de','whois.nic.de'); +INSERT INTO whoisservers VALUES (24, 'dk','whois.dk-hostmaster.dk'); +INSERT INTO whoisservers VALUES (25, 'ec','whois.lac.net'); +INSERT INTO whoisservers VALUES (26, 'edu','whois.crsnic.net'); +INSERT INTO whoisservers VALUES (27, 'es','whois.ripe.net'); +INSERT INTO whoisservers VALUES (28, 'fo','whois.ripe.net'); +INSERT INTO whoisservers VALUES (29, 'fr','whois.nic.fr'); +INSERT INTO whoisservers VALUES (30, 'gf','whois.nplus.gf'); +INSERT INTO whoisservers VALUES (31, 'gov','whois.nic.gov'); +INSERT INTO whoisservers VALUES (32, 'gr','whois.ripe.net'); +INSERT INTO whoisservers VALUES (33, 'gs','whois.adamsnames.tc'); +INSERT INTO whoisservers VALUES (34, 'hk','whois.hkdnr.net.hk'); +INSERT INTO whoisservers VALUES (35, 'ie','whois.domainregistry.ie'); +INSERT INTO whoisservers VALUES (36, 'il','whois.isoc.org.il'); +INSERT INTO whoisservers VALUES (37, 'in','whois.iisc.ernet.in'); +INSERT INTO whoisservers VALUES (38, 'info','whois.afilias.net'); +INSERT INTO whoisservers VALUES (39, 'is','whois.isnic.is'); +INSERT INTO whoisservers VALUES (40, 'it','whois.nic.it'); +INSERT INTO whoisservers VALUES (41, 'jp','whois.nic.ad.jp'); +INSERT INTO whoisservers VALUES (42, 'kr','whois.nic.or.kr'); +INSERT INTO whoisservers VALUES (43, 'kz','whois.domain.kz'); +INSERT INTO whoisservers VALUES (44, 'li','whois.nic.il'); +INSERT INTO whoisservers VALUES (45, 'lt','whois.ripe.net'); +INSERT INTO whoisservers VALUES (46, 'lu','whois.dns.lu'); +INSERT INTO whoisservers VALUES (47, 'lv','whois.ripe.net'); +INSERT INTO whoisservers VALUES (48, 'mc','whois.ripe.net'); +INSERT INTO whoisservers VALUES (49, 'mil','whois.internic.net'); +INSERT INTO whoisservers VALUES (50, 'mm','whois.nic.mm'); +INSERT INTO whoisservers VALUES (51, 'ms','whois.adamsnames.tc'); +INSERT INTO whoisservers VALUES (52, 'mx','whois.nic.mx'); +INSERT INTO whoisservers VALUES (53, 'name','whois.nic.name'); +INSERT INTO whoisservers VALUES (54, 'net','whois.crsnic.net'); +INSERT INTO whoisservers VALUES (55, 'nl','whois.domain-registry.nl'); +INSERT INTO whoisservers VALUES (56, 'no','whois.norid.no'); +INSERT INTO whoisservers VALUES (57, 'nu','whois.nic.nu'); +INSERT INTO whoisservers VALUES (58, 'nz','whois.domainz.net.nz'); +INSERT INTO whoisservers VALUES (59, 'org','whois.enom.com'); +INSERT INTO whoisservers VALUES (60, 'pl','whois.dns.pl'); +INSERT INTO whoisservers VALUES (61, 'pro','whois.internic.net'); +INSERT INTO whoisservers VALUES (62, 'pt','whois.ripe.net'); +INSERT INTO whoisservers VALUES (63, 'ro','whois.rotld.ro'); +INSERT INTO whoisservers VALUES (64, 'ru','whois'); +INSERT INTO whoisservers VALUES (65, 'se','whois.nic-se.se'); +INSERT INTO whoisservers VALUES (66, 'sg','whois.nic.net.sg'); +INSERT INTO whoisservers VALUES (67, 'sh','whois.nic.sh'); +INSERT INTO whoisservers VALUES (68, 'si','whois.arnes.si'); +INSERT INTO whoisservers VALUES (69, 'sk','whois.ripe.net'); +INSERT INTO whoisservers VALUES (70, 'st','whois.nic.st'); +INSERT INTO whoisservers VALUES (71, 'tc','whois.adamsnames.tc'); +INSERT INTO whoisservers VALUES (72, 'tf','whois.adamsnames.tc'); +INSERT INTO whoisservers VALUES (73, 'th','whois.thnic.net'); +INSERT INTO whoisservers VALUES (74, 'tj','whois.nic.tj'); +INSERT INTO whoisservers VALUES (75, 'tk','whois.dot.tk'); +INSERT INTO whoisservers VALUES (76, 'tm','whois.nic.tm'); +INSERT INTO whoisservers VALUES (77, 'to','monarch.tonic.to'); +INSERT INTO whoisservers VALUES (78, 'tr','whois.metu.edu.tr'); +INSERT INTO whoisservers VALUES (79, 'tv','whois.internic.net'); +INSERT INTO whoisservers VALUES (80, 'tw','whois.twnic.net'); +INSERT INTO whoisservers VALUES (81, 'ua','whois.net.ua'); +INSERT INTO whoisservers VALUES (82, 'uk','whois.nic.uk'); +INSERT INTO whoisservers VALUES (83, 'us','whois.nic.us'); +INSERT INTO whoisservers VALUES (84, 'vg','whois.adamsnames.tc'); +INSERT INTO whoisservers VALUES (85, 'ws','whois.nic.ws'); Index: publicdnsadmin/docs/whoissrv.postgres.sql diff -u /dev/null publicdnsadmin/docs/whoissrv.postgres.sql:1.1 --- /dev/null Wed Jul 16 07:37:02 2003 +++ publicdnsadmin/docs/whoissrv.postgres.sql Wed Jul 16 07:36:52 2003 @@ -0,0 +1,86 @@ +DELETE FROM whoisservers; +INSERT INTO whoisservers (tld,server) VALUES ('ac','whois.nic.ac'); +INSERT INTO whoisservers (tld,server) VALUES ('ad','whois.ripe.net'); +INSERT INTO whoisservers (tld,server) VALUES ('aero','whois.information.aero'); +INSERT INTO whoisservers (tld,server) VALUES ('af','whois.netnames.net'); +INSERT INTO whoisservers (tld,server) VALUES ('ag','whois.nic.ag'); +INSERT INTO whoisservers (tld,server) VALUES ('am','whois.nic.am'); +INSERT INTO whoisservers (tld,server) VALUES ('as','whois.nic.as'); +INSERT INTO whoisservers (tld,server) VALUES ('at','whois.nic.at'); +INSERT INTO whoisservers (tld,server) VALUES ('au','whois.apnic.net'); +INSERT INTO whoisservers (tld,server) VALUES ('biz','whois.nic.biz'); +INSERT INTO whoisservers (tld,server) VALUES ('br','whois.nic.br'); +INSERT INTO whoisservers (tld,server) VALUES ('by','whois.ripe.net'); +INSERT INTO whoisservers (tld,server) VALUES ('bz','mhpwhois1.verisign-grs.net'); +INSERT INTO whoisservers (tld,server) VALUES ('ca','whois.cira.ca'); +INSERT INTO whoisservers (tld,server) VALUES ('cc','whois.nic.cc'); +INSERT INTO whoisservers (tld,server) VALUES ('cd','whois.cd'); +INSERT INTO whoisservers (tld,server) VALUES ('ch','whois.nic.ch'); +INSERT INTO whoisservers (tld,server) VALUES ('cl','whois.nic.cl'); +INSERT INTO whoisservers (tld,server) VALUES ('cn','whois.cnnic.net.cn'); +INSERT INTO whoisservers (tld,server) VALUES ('com','whois.crsnic.net'); +INSERT INTO whoisservers (tld,server) VALUES ('cx','whois.nic.cx'); +INSERT INTO whoisservers (tld,server) VALUES ('cz','whois.nic.cz'); +INSERT INTO whoisservers (tld,server) VALUES ('de','whois.nic.de'); +INSERT INTO whoisservers (tld,server) VALUES ('dk','whois.dk-hostmaster.dk'); +INSERT INTO whoisservers (tld,server) VALUES ('ec','whois.lac.net'); +INSERT INTO whoisservers (tld,server) VALUES ('edu','whois.crsnic.net'); +INSERT INTO whoisservers (tld,server) VALUES ('es','whois.ripe.net'); +INSERT INTO whoisservers (tld,server) VALUES ('fo','whois.ripe.net'); +INSERT INTO whoisservers (tld,server) VALUES ('fr','whois.nic.fr'); +INSERT INTO whoisservers (tld,server) VALUES ('gf','whois.nplus.gf'); +INSERT INTO whoisservers (tld,server) VALUES ('gov','whois.nic.gov'); +INSERT INTO whoisservers (tld,server) VALUES ('gr','whois.ripe.net'); +INSERT INTO whoisservers (tld,server) VALUES ('gs','whois.adamsnames.tc'); +INSERT INTO whoisservers (tld,server) VALUES ('hk','whois.hkdnr.net.hk'); +INSERT INTO whoisservers (tld,server) VALUES ('ie','whois.domainregistry.ie'); +INSERT INTO whoisservers (tld,server) VALUES ('il','whois.isoc.org.il'); +INSERT INTO whoisservers (tld,server) VALUES ('in','whois.iisc.ernet.in'); +INSERT INTO whoisservers (tld,server) VALUES ('info','whois.afilias.net'); +INSERT INTO whoisservers (tld,server) VALUES ('is','whois.isnic.is'); +INSERT INTO whoisservers (tld,server) VALUES ('it','whois.nic.it'); +INSERT INTO whoisservers (tld,server) VALUES ('jp','whois.nic.ad.jp'); +INSERT INTO whoisservers (tld,server) VALUES ('kr','whois.nic.or.kr'); +INSERT INTO whoisservers (tld,server) VALUES ('kz','whois.domain.kz'); +INSERT INTO whoisservers (tld,server) VALUES ('li','whois.nic.il'); +INSERT INTO whoisservers (tld,server) VALUES ('lt','whois.ripe.net'); +INSERT INTO whoisservers (tld,server) VALUES ('lu','whois.dns.lu'); +INSERT INTO whoisservers (tld,server) VALUES ('lv','whois.ripe.net'); +INSERT INTO whoisservers (tld,server) VALUES ('mc','whois.ripe.net'); +INSERT INTO whoisservers (tld,server) VALUES ('mil','whois.internic.net'); +INSERT INTO whoisservers (tld,server) VALUES ('mm','whois.nic.mm'); +INSERT INTO whoisservers (tld,server) VALUES ('ms','whois.adamsnames.tc'); +INSERT INTO whoisservers (tld,server) VALUES ('mx','whois.nic.mx'); +INSERT INTO whoisservers (tld,server) VALUES ('name','whois.nic.name'); +INSERT INTO whoisservers (tld,server) VALUES ('net','whois.crsnic.net'); +INSERT INTO whoisservers (tld,server) VALUES ('nl','whois.domain-registry.nl'); +INSERT INTO whoisservers (tld,server) VALUES ('no','whois.norid.no'); +INSERT INTO whoisservers (tld,server) VALUES ('nu','whois.nic.nu'); +INSERT INTO whoisservers (tld,server) VALUES ('nz','whois.domainz.net.nz'); +INSERT INTO whoisservers (tld,server) VALUES ('org','whois.enom.com'); +INSERT INTO whoisservers (tld,server) VALUES ('pl','whois.dns.pl'); +INSERT INTO whoisservers (tld,server) VALUES ('pro','whois.internic.net'); +INSERT INTO whoisservers (tld,server) VALUES ('pt','whois.ripe.net'); +INSERT INTO whoisservers (tld,server) VALUES ('ro','whois.rotld.ro'); +INSERT INTO whoisservers (tld,server) VALUES ('ru','whois'); +INSERT INTO whoisservers (tld,server) VALUES ('se','whois.nic-se.se'); +INSERT INTO whoisservers (tld,server) VALUES ('sg','whois.nic.net.sg'); +INSERT INTO whoisservers (tld,server) VALUES ('sh','whois.nic.sh'); +INSERT INTO whoisservers (tld,server) VALUES ('si','whois.arnes.si'); +INSERT INTO whoisservers (tld,server) VALUES ('sk','whois.ripe.net'); +INSERT INTO whoisservers (tld,server) VALUES ('st','whois.nic.st'); +INSERT INTO whoisservers (tld,server) VALUES ('tc','whois.adamsnames.tc'); +INSERT INTO whoisservers (tld,server) VALUES ('tf','whois.adamsnames.tc'); +INSERT INTO whoisservers (tld,server) VALUES ('th','whois.thnic.net'); +INSERT INTO whoisservers (tld,server) VALUES ('tj','whois.nic.tj'); +INSERT INTO whoisservers (tld,server) VALUES ('tk','whois.dot.tk'); +INSERT INTO whoisservers (tld,server) VALUES ('tm','whois.nic.tm'); +INSERT INTO whoisservers (tld,server) VALUES ('to','monarch.tonic.to'); +INSERT INTO whoisservers (tld,server) VALUES ('tr','whois.metu.edu.tr'); +INSERT INTO whoisservers (tld,server) VALUES ('tv','whois.internic.net'); +INSERT INTO whoisservers (tld,server) VALUES ('tw','whois.twnic.net'); +INSERT INTO whoisservers (tld,server) VALUES ('ua','whois.net.ua'); +INSERT INTO whoisservers (tld,server) VALUES ('uk','whois.nic.uk'); +INSERT INTO whoisservers (tld,server) VALUES ('us','whois.nic.us'); +INSERT INTO whoisservers (tld,server) VALUES ('vg','whois.adamsnames.tc'); +INSERT INTO whoisservers (tld,server) VALUES ('ws','whois.nic.ws'); ----------------------- End of diff ----------------------- |
From: Alexander M. <key...@us...> - 2003-07-16 13:54:09
|
CVSROOT : /cvsroot/publicdnsadmin Module : publicdnsadmin Commit time: 2003-07-16 13:54:07 UTC Modified files: whois.php docs/CHANGELOG docs/INSTALL docs/TODO docs/mysql.sql docs/postgresql.sql Added files: docs/whois.update.mysql.sql docs/whois.update.postgres.sql Log message: Author: Alexander Maassen <out...@ke...> Log message: - whois now uses SQL as source for whois servers. If you upgrade, import docs/whois.update.<dbtype>.sql - Various documentation updates regarding new changes ---------------------- diff included ---------------------- Index: publicdnsadmin/docs/CHANGELOG diff -u publicdnsadmin/docs/CHANGELOG:1.17 publicdnsadmin/docs/CHANGELOG:1.18 --- publicdnsadmin/docs/CHANGELOG:1.17 Wed Jul 16 05:38:20 2003 +++ publicdnsadmin/docs/CHANGELOG Wed Jul 16 06:53:57 2003 @@ -33,3 +33,5 @@ the gziped sql file the user downloads. - Bug reporting address is now a link to submitting a bug in the sourceforge project interface. +OUTsider <out...@ke...> - 16/7/2003 - Updated TODO and docs again to reflect new changes + - Moved whois to use SQL instead as source for whois servers Index: publicdnsadmin/docs/INSTALL diff -u publicdnsadmin/docs/INSTALL:1.5 publicdnsadmin/docs/INSTALL:1.6 --- publicdnsadmin/docs/INSTALL:1.5 Thu Jun 19 22:57:39 2003 +++ publicdnsadmin/docs/INSTALL Wed Jul 16 06:53:57 2003 @@ -24,4 +24,5 @@ can be written there. If you are upgrading from a CVS version, make sure you run the *.update.sql - scripts. + scripts. (In some cases the update.sql files are specified for your type of + sql backend, so don't simply use *update*sql !!! (Do NOT complain afterwards) Index: publicdnsadmin/docs/TODO diff -u publicdnsadmin/docs/TODO:1.6 publicdnsadmin/docs/TODO:1.7 --- publicdnsadmin/docs/TODO:1.6 Wed Jul 16 04:51:30 2003 +++ publicdnsadmin/docs/TODO Wed Jul 16 06:53:57 2003 @@ -1,5 +1,6 @@ - Some sort of maintenence news system (displayed on the main login page). -- Graphical code check upon signup (and possibly login). -DONE -- Improve dbbackup.php. -DONE - Improve nsstats.php. -- Add URL/HWINFO/MBOXFW/RP support +- Add URL/HWINFO/MBOXFW/RP record type support. +- Create an interface to manage domain registries whois servers. +- Syntax check records for validity to make it more fool proof. + Index: publicdnsadmin/docs/mysql.sql diff -u publicdnsadmin/docs/mysql.sql:1.2 publicdnsadmin/docs/mysql.sql:1.3 --- publicdnsadmin/docs/mysql.sql:1.2 Wed Jun 18 01:05:47 2003 +++ publicdnsadmin/docs/mysql.sql Wed Jul 16 06:53:57 2003 @@ -38,7 +38,16 @@ KEY username (username,password) ) TYPE=MyISAM; +CREATE TABLE whoisservers ( + id int(11) NOT NULL auto_increment, + tld varchar(8) NOT NULL default '', + server varchar(128) NOT NULL default '', + PRIMARY KEY (id) +) TYPE=MyISAM; + CREATE TABLE gfxcodes ( + x + x code VARCHAR(25) NOT NULL, crc VARCHAR(128) NOT NULL, expire INT NOT NULL @@ -47,3 +56,13 @@ CREATE INDEX gfxcodes_idx ON gfxcodes(code,crc,expire); INSERT INTO users VALUES (1, 'admin', '21232f297a57a5a743894a0e4a801fc3', 'DNS Administrator', 'hos...@ex...', '', '2'); +INSERT INTO whoisservers VALUES (1,'com','whois.crsnic.net'); +INSERT INTO whoisservers VALUES (2,'net','whois.crsnic.net'); +INSERT INTO whoisservers VALUES (3,'edu','whois.crsnic.net'); +INSERT INTO whoisservers VALUES (4,'info','whois.afilias.net'); +INSERT INTO whoisservers VALUES (5,'name','whois.nic.name'); +INSERT INTO whoisservers VALUES (6,'biz','whois.nic.biz'); +INSERT INTO whoisservers VALUES (7,'us','whois.nic.us'); +INSERT INTO whoisservers VALUES (8,'cc','whois.enicregistrar.com'); +INSERT INTO whoisservers VALUES (9,'org','whois.enom.com'); +INSERT INTO whoisservers VALUES (10,'ws','whois.nic.ws'); Index: publicdnsadmin/docs/postgresql.sql diff -u publicdnsadmin/docs/postgresql.sql:1.4 publicdnsadmin/docs/postgresql.sql:1.5 --- publicdnsadmin/docs/postgresql.sql:1.4 Tue Jul 15 19:33:08 2003 +++ publicdnsadmin/docs/postgresql.sql Wed Jul 16 06:53:57 2003 @@ -38,6 +38,13 @@ CREATE INDEX "users_password_key" ON "users" ("password"); CREATE INDEX "users_username_key" ON "users" ("username"); +CREATE TABLE whoisservers ( + id SERIAL, + tld varchar(8) NOT NULL default '', + server varchar(128) NOT NULL default '', + PRIMARY KEY (id) +); + CREATE TABLE gfxcodes ( code VARCHAR(25) NOT NULL, crc VARCHAR(128) NOT NULL, @@ -47,3 +54,14 @@ CREATE INDEX gfxcodes_idx ON gfxcodes(code,crc,expire); INSERT INTO "users" ("username", "password", "name", "email", "company", "permission") VALUES('outsider', '21232f297a57a5a743894a0e4a801fc3', 'DNS Administrator', 'out...@ke...', 'Key2Peace BotServices', 2); +INSERT INTO "whoisservers" ("tld", "server") VALUES ('com','whois.crsnic.net'); +INSERT INTO "whoisservers" ("tld", "server") VALUES ('net','whois.crsnic.net'); +INSERT INTO "whoisservers" ("tld", "server") VALUES ('edu','whois.crsnic.net'); +INSERT INTO "whoisservers" ("tld", "server") VALUES ('info','whois.afilias.net'); +INSERT INTO "whoisservers" ("tld", "server") VALUES ('name','whois.nic.name'); +INSERT INTO "whoisservers" ("tld", "server") VALUES ('biz','whois.nic.biz'); +INSERT INTO "whoisservers" ("tld", "server") VALUES ('us','whois.nic.us'); +INSERT INTO "whoisservers" ("tld", "server") VALUES ('cc','whois.enicregistrar.com'); +INSERT INTO "whoisservers" ("tld", "server") VALUES ('org','whois.enom.com'); +INSERT INTO "whoisservers" ("tld", "server") VALUES ('ws','whois.nic.ws'); + Index: publicdnsadmin/docs/whois.update.mysql.sql diff -u /dev/null publicdnsadmin/docs/whois.update.mysql.sql:1.1 --- /dev/null Wed Jul 16 06:54:08 2003 +++ publicdnsadmin/docs/whois.update.mysql.sql Wed Jul 16 06:53:57 2003 @@ -0,0 +1,17 @@ +CREATE TABLE whoisservers ( + id int(11) NOT NULL auto_increment, + tld varchar(8) NOT NULL default '', + server varchar(128) NOT NULL default '', + PRIMARY KEY (id) +); + +INSERT INTO whoisservers VALUES (1,'com','whois.crsnic.net'); +INSERT INTO whoisservers VALUES (2,'net','whois.crsnic.net'); +INSERT INTO whoisservers VALUES (3,'edu','whois.crsnic.net'); +INSERT INTO whoisservers VALUES (4,'info','whois.afilias.net'); +INSERT INTO whoisservers VALUES (5,'name','whois.nic.name'); +INSERT INTO whoisservers VALUES (6,'biz','whois.nic.biz'); +INSERT INTO whoisservers VALUES (7,'us','whois.nic.us'); +INSERT INTO whoisservers VALUES (8,'cc','whois.enicregistrar.com'); +INSERT INTO whoisservers VALUES (9,'org','whois.enom.com'); +INSERT INTO whoisservers VALUES (10,'ws','whois.nic.ws'); Index: publicdnsadmin/docs/whois.update.postgres.sql diff -u /dev/null publicdnsadmin/docs/whois.update.postgres.sql:1.1 --- /dev/null Wed Jul 16 06:54:08 2003 +++ publicdnsadmin/docs/whois.update.postgres.sql Wed Jul 16 06:53:57 2003 @@ -0,0 +1,19 @@ +CREATE TABLE whoisservers ( + id SERIAL, + tld varchar(8) NOT NULL default '', + server varchar(128) NOT NULL default '', + PRIMARY KEY (id) +); +DELETE FROM whoisservers; + +INSERT INTO "whoisservers" ("tld", "server") VALUES ('com','whois.crsnic.net'); +INSERT INTO "whoisservers" ("tld", "server") VALUES ('net','whois.crsnic.net'); +INSERT INTO "whoisservers" ("tld", "server") VALUES ('edu','whois.crsnic.net'); +INSERT INTO "whoisservers" ("tld", "server") VALUES ('info','whois.afilias.net'); +INSERT INTO "whoisservers" ("tld", "server") VALUES ('name','whois.nic.name'); +INSERT INTO "whoisservers" ("tld", "server") VALUES ('biz','whois.nic.biz'); +INSERT INTO "whoisservers" ("tld", "server") VALUES ('us','whois.nic.us'); +INSERT INTO "whoisservers" ("tld", "server") VALUES ('cc','whois.enicregistrar.com'); +INSERT INTO "whoisservers" ("tld", "server") VALUES ('org','whois.enom.com'); +INSERT INTO "whoisservers" ("tld", "server") VALUES ('ws','whois.nic.ws'); + Index: publicdnsadmin/whois.php diff -u publicdnsadmin/whois.php:1.1.1.1 publicdnsadmin/whois.php:1.2 --- publicdnsadmin/whois.php:1.1.1.1 Wed Apr 16 00:19:07 2003 +++ publicdnsadmin/whois.php Wed Jul 16 06:53:57 2003 @@ -12,83 +12,68 @@ require("lib/prepend.php"); include("lib/header.php"); -$dbh = db_connect(); +function wwwhois($target){ + global $ntarget; + $dbh = db_connect(); + $tld = end(explode(".", $target)); + $result = $dbh->query("SELECT server FROM whoisservers WHERE tld = '$tld'"); + + if (!$dbh->isError($result) && $result->numRows()) { + $row = $result->fetchRow(); + $server = $row["server"]; + } else { + $msg .= "Sorry but this top level domain is not \(yet\) supported.</blockquote>"; + message($msg); + return; + } + $dbh->disconnect(); -function wwwhois($target){ -global $ntarget; -$server = "whois.crsnic.net"; -message("<p><b>Whois Results:</b><blockquote>"); -#Determine which WHOIS server to use for the supplied TLD -if((eregi("\.com\$|\.net\$|\.edu\$", $target)) || (eregi("\.com\$|\.net\$|\.edu\$", $ntarget))) - $server = "whois.crsnic.net"; -else if((eregi("\.info\$", $target)) || (eregi("\.info\$", $ntarget))) - $server = "whois.afilias.net"; -else if((eregi("\.name\$", $target)) || (eregi("\.name\$", $ntarget))) - $server = "whois.nic.name"; -else if((eregi("\.biz\$", $target)) || (eregi("\.biz\$", $ntarget))) - $server = "whois.nic.biz"; -else if((eregi("\.us\$", $target)) || (eregi("\.us\$", $ntarget))) - $server = "whois.nic.us"; -else if((eregi("\.cc\$", $target)) || (eregi("\.cc\$", $ntarget))) - $server = "whois.enicregistrar.com"; -else if((eregi("\.org\$", $target)) || (eregi("\.org\$", $ntarget))) - $server = "whois.enom.com"; -else if((eregi("\.ws\$", $target)) || (eregi("\.ws\$", $ntarget))) - $server = "whois.nic.ws"; -else{ - $msg .= "I only support .com, .net, .org, .edu, .info, .name, .us, .cc, .ws, and .biz.</blockquote>"; + message("Connecting to $server.. <br><br>"); + if (! $sock = fsockopen($server, 43, $num, $error, 10)){ + unset($sock); + $msg .= "Timed-out connecting to $server (port 43)"; + } else { + fputs($sock, "$target\n"); + while (!feof($sock)) + $buffer .= fgets($sock, 10240); + } + fclose($sock); + if(! eregi("Whois Server:", $buffer)){ + if(eregi("no match", $buffer)) + message("NOT FOUND: No match for $target<br>"); + else + message("Ambiguous query, multiple matches for $target:<br>"); + } else { + $buffer = split("\n", $buffer); + for ($i=0; $i<sizeof($buffer); $i++){ + if (eregi("Whois Server:", $buffer[$i])) + $buffer = $buffer[$i]; + } + $nextServer = substr($buffer, 17, (strlen($buffer)-17)); + $buffer = ""; + message("Deferred to specific whois server: $nextServer...<br><br>"); + if(! $sock = fsockopen($nextServer, 43, $num, $error, 10)){ + unset($sock); + $msg .= "Timed-out connecting to $nextServer (port 43)"; + } else { + fputs($sock, "$target\n"); + while (!feof($sock)) + $buffer .= fgets($sock, 10240); + fclose($sock); + } + } + $msg .= nl2br($buffer); + $msg .= "</blockquote></p>"; message($msg); - return; -} - -message("Connecting to $server...<br><br>"); -if (! $sock = fsockopen($server, 43, $num, $error, 10)){ - unset($sock); - $msg .= "Timed-out connecting to $server (port 43)"; -} -else{ - fputs($sock, "$target\n"); - while (!feof($sock)) - $buffer .= fgets($sock, 10240); -} - fclose($sock); - if(! eregi("Whois Server:", $buffer)){ - if(eregi("no match", $buffer)) - message("NOT FOUND: No match for $target<br>"); - else - message("Ambiguous query, multiple matches for $target:<br>"); - } - else{ - $buffer = split("\n", $buffer); - for ($i=0; $i<sizeof($buffer); $i++){ - if (eregi("Whois Server:", $buffer[$i])) - $buffer = $buffer[$i]; - } - $nextServer = substr($buffer, 17, (strlen($buffer)-17)); - $buffer = ""; - message("Deferred to specific whois server: $nextServer...<br><br>"); - if(! $sock = fsockopen($nextServer, 43, $num, $error, 10)){ - unset($sock); - $msg .= "Timed-out connecting to $nextServer (port 43)"; - } - else{ - fputs($sock, "$target\n"); - while (!feof($sock)) - $buffer .= fgets($sock, 10240); - fclose($sock); - } -} -$msg .= nl2br($buffer); -$msg .= "</blockquote></p>"; -message($msg); } function message($msg){ -echo $msg; -flush(); + echo $msg; + flush(); } +$dbh = db_connect(); $zoneid = $_GET["id"]; $result = $dbh->query("SELECT name FROM domains WHERE id = '$zoneid'"); @@ -104,5 +89,6 @@ } $dbh->disconnect(); include("lib/footer.php"); + ?> ----------------------- End of diff ----------------------- |
From: Neil S. <sir...@us...> - 2003-07-16 12:38:32
|
CVSROOT : /cvsroot/publicdnsadmin Module : publicdnsadmin Commit time: 2003-07-16 12:38:30 UTC Modified files: docs/CHANGELOG lib/footer.php Log message: Author: SiRVu|caN <sir...@si...> Log message: Bug reporting address is now a link to submitting a bug in the sourceforge project interface. ---------------------- diff included ---------------------- Index: publicdnsadmin/docs/CHANGELOG diff -u publicdnsadmin/docs/CHANGELOG:1.16 publicdnsadmin/docs/CHANGELOG:1.17 --- publicdnsadmin/docs/CHANGELOG:1.16 Wed Jul 16 05:32:44 2003 +++ publicdnsadmin/docs/CHANGELOG Wed Jul 16 05:38:20 2003 @@ -31,3 +31,5 @@ - Fixed hostmaster setting in config. Should use "." instead of "@" . SiRVu|caN <sir...@si...> - 16/7/2003 - Threw in a / in front of "data" in the dbbackup.php link to the gziped sql file the user downloads. + - Bug reporting address is now a link to submitting a bug in the + sourceforge project interface. Index: publicdnsadmin/lib/footer.php diff -u publicdnsadmin/lib/footer.php:1.5 publicdnsadmin/lib/footer.php:1.6 --- publicdnsadmin/lib/footer.php:1.5 Tue Jul 15 19:33:08 2003 +++ publicdnsadmin/lib/footer.php Wed Jul 16 05:38:20 2003 @@ -7,7 +7,7 @@ Distributed under the GPL license, see LICENSE for more information - $Id: footer.php,v 1.5 2003/07/16 02:33:08 key2peace Exp $ + $Id: footer.php,v 1.6 2003/07/16 12:38:20 sirvulcan Exp $ */ ?> </td> @@ -22,7 +22,7 @@ <tr> <td valign="top" class="menu" nowrap style="border-top: 1px solid #000000; border-left: 1px solid #000000;border-right: 1px solid #000000; border-bottom: 1px solid #000000;"> Powered By <a href="http://www.sirvulcan.org/" target="_new">Public DNS Administrator</a>, Licensed Under <a href="http://www.gnu.org" target="_new">GNU/GPL.</a> Report Bugs To: - <a href="mailto:sir...@si...">sir...@si...</a>. + <a href="http://sourceforge.net/tracker/?func=add&group_id=78804&atid=554506">PublicDNSAdmin Bug Tracker</a>. </td> </tr> </table> ----------------------- End of diff ----------------------- |
From: Neil S. <sir...@us...> - 2003-07-16 12:32:56
|
CVSROOT : /cvsroot/publicdnsadmin Module : publicdnsadmin Commit time: 2003-07-16 12:32:55 UTC Modified files: dbbackup.php docs/CHANGELOG Log message: Author: SiRVu|caN <sir...@si...> Log message: Threw in a / in front of "data" in the dbbackup.php link to the gziped sql file the user downloads. ---------------------- diff included ---------------------- Index: publicdnsadmin/dbbackup.php diff -u publicdnsadmin/dbbackup.php:1.5 publicdnsadmin/dbbackup.php:1.6 --- publicdnsadmin/dbbackup.php:1.5 Wed Jul 16 04:51:29 2003 +++ publicdnsadmin/dbbackup.php Wed Jul 16 05:32:44 2003 @@ -26,7 +26,7 @@ passthru("pg_dump -v -Z9 -h".$database_host." -U".$database_user." -f".$filename.".gz ".$database_name); } - echo "<p>The backup was successfully created. Click <a href=\"".$site_address."data/".$filesmall."\">here</a> to download.</p>\n"; + echo "<p>The backup was successfully created. Click <a href=\"".$site_address."/data/".$filesmall."\">here</a> to download.</p>\n"; } include("lib/footer.php"); ?> Index: publicdnsadmin/docs/CHANGELOG diff -u publicdnsadmin/docs/CHANGELOG:1.15 publicdnsadmin/docs/CHANGELOG:1.16 --- publicdnsadmin/docs/CHANGELOG:1.15 Wed Jul 16 04:51:30 2003 +++ publicdnsadmin/docs/CHANGELOG Wed Jul 16 05:32:44 2003 @@ -29,3 +29,5 @@ - Updated postgres.sql to use the types as they are designed for. - Did some work on db_types. - Fixed hostmaster setting in config. Should use "." instead of "@" . +SiRVu|caN <sir...@si...> - 16/7/2003 - Threw in a / in front of "data" in the dbbackup.php link to + the gziped sql file the user downloads. ----------------------- End of diff ----------------------- |
From: Alexander M. <key...@us...> - 2003-07-16 11:51:44
|
CVSROOT : /cvsroot/publicdnsadmin Module : publicdnsadmin Commit time: 2003-07-16 11:51:40 UTC Modified files: dbbackup.php docs/CHANGELOG docs/TODO lib/config.php-dist lib/header.php Log message: Author: Alexander Maassen <out...@ke...> Log message: Updated TODO and CHANGELOG Fixed hostmaster entry in config More db_type fixes in dbbackup and header.inc ---------------------- diff included ---------------------- Index: publicdnsadmin/dbbackup.php diff -u publicdnsadmin/dbbackup.php:1.4 publicdnsadmin/dbbackup.php:1.5 --- publicdnsadmin/dbbackup.php:1.4 Tue Jul 15 19:33:08 2003 +++ publicdnsadmin/dbbackup.php Wed Jul 16 04:51:29 2003 @@ -18,7 +18,7 @@ $filename = "$path/data/lbdns-".$date.".sql"; $filesmall = "lbdns-".$date.".sql.gz"; - if ($database_type == mysql) { + if (db_type() == "mysql") { passthru("mysqldump --opt -h".$database_host." -u".$database_user." -r".$filename." ".$database_name); $zipline = "gzip -9 ".$filename.""; shell_exec($zipline); Index: publicdnsadmin/docs/CHANGELOG diff -u publicdnsadmin/docs/CHANGELOG:1.14 publicdnsadmin/docs/CHANGELOG:1.15 --- publicdnsadmin/docs/CHANGELOG:1.14 Thu Jun 19 06:47:48 2003 +++ publicdnsadmin/docs/CHANGELOG Wed Jul 16 04:51:30 2003 @@ -21,3 +21,11 @@ SiRVu|caN <sir...@si...> - 19/6/2003 - Version number added below the logo. SiRVu|caN <sir...@si...> - 19/6/2003 - Admins can now restrict signups. SiRVu|caN <sir...@si...> - 19/6/2003 - Added powered by images. +OUTsider <out...@ke...> - 16/7/2003 - Fixed several HTML missings + - Fixed double occurance of ns2port in config, one should have + been ns1port + - Added A6/NS6 records support + - Added support for postgres backup and changed the layout of it + - Updated postgres.sql to use the types as they are designed for. + - Did some work on db_types. + - Fixed hostmaster setting in config. Should use "." instead of "@" . Index: publicdnsadmin/docs/TODO diff -u publicdnsadmin/docs/TODO:1.5 publicdnsadmin/docs/TODO:1.6 --- publicdnsadmin/docs/TODO:1.5 Wed Jun 18 23:04:38 2003 +++ publicdnsadmin/docs/TODO Wed Jul 16 04:51:30 2003 @@ -2,3 +2,4 @@ - Graphical code check upon signup (and possibly login). -DONE - Improve dbbackup.php. -DONE - Improve nsstats.php. +- Add URL/HWINFO/MBOXFW/RP support Index: publicdnsadmin/lib/config.php-dist diff -u publicdnsadmin/lib/config.php-dist:1.9 publicdnsadmin/lib/config.php-dist:1.10 --- publicdnsadmin/lib/config.php-dist:1.9 Wed Jul 16 04:36:28 2003 +++ publicdnsadmin/lib/config.php-dist Wed Jul 16 04:51:30 2003 @@ -7,7 +7,7 @@ Distributed under the GPL license, see LICENSE for more information - $Id: config.php-dist,v 1.9 2003/07/16 11:36:28 key2peace Exp $ + $Id: config.php-dist,v 1.10 2003/07/16 11:51:30 key2peace Exp $ */ /* @@ -30,8 +30,8 @@ /* The primary nameserver in use. Used in the SOA-record, default nameservers for domains must be set in a predefined domain template */ $primary_ns = "ns1.server.org"; -/* Zone hostmaster - used in SOA record */ -$zone_hostmaster = "hos...@se..."; +/* Zone hostmaster - used in SOA record. Note: instead of a @ you *should* use a dot (.) */ +$zone_hostmaster = "hostmaster.server.org"; /* Default TTL for domains/pointers */ $default_ttl = 86400; Index: publicdnsadmin/lib/header.php diff -u publicdnsadmin/lib/header.php:1.10 publicdnsadmin/lib/header.php:1.11 --- publicdnsadmin/lib/header.php:1.10 Thu Jun 19 22:57:40 2003 +++ publicdnsadmin/lib/header.php Wed Jul 16 04:51:30 2003 @@ -7,7 +7,7 @@ Distributed under the GPL license, see LICENSE for more information - $Id: header.php,v 1.10 2003/06/20 05:57:40 sirvulcan Exp $ + $Id: header.php,v 1.11 2003/07/16 11:51:30 key2peace Exp $ */ ?> @@ -61,7 +61,7 @@ echo "<br><br><center>"; echo "<a href=\"http://httpd.apache.org\"><img src=\"images/apache.gif\" border=0></a><br><br>"; echo "<a href=\"http://www.php.net\"><img src=\"images/php.gif\" border=0></a><br><br>"; - if ($database_type == mysql) { + if (db_type() == "mysql") { echo "<a href=\"http://www.mysql.com\"><img src=\"images/mysql.gif\" border=0></a><br>"; } else { echo "<a href=\"http://www.postgresql.org\"><img src=\"images/pgsql.gif\" border=0></a><br>"; ----------------------- End of diff ----------------------- |
From: Alexander M. <key...@us...> - 2003-07-16 11:36:39
|
CVSROOT : /cvsroot/publicdnsadmin Module : publicdnsadmin Commit time: 2003-07-16 11:36:38 UTC Modified files: lib/config.php-dist Log message: Author: Alexander Maassen <out...@ke...> Log message: ns2port was defined twice. First occurance should have been ns1port ---------------------- diff included ---------------------- Index: publicdnsadmin/lib/config.php-dist diff -u publicdnsadmin/lib/config.php-dist:1.8 publicdnsadmin/lib/config.php-dist:1.9 --- publicdnsadmin/lib/config.php-dist:1.8 Thu Jun 19 02:43:50 2003 +++ publicdnsadmin/lib/config.php-dist Wed Jul 16 04:36:28 2003 @@ -7,7 +7,7 @@ Distributed under the GPL license, see LICENSE for more information - $Id: config.php-dist,v 1.8 2003/06/19 09:43:50 sirvulcan Exp $ + $Id: config.php-dist,v 1.9 2003/07/16 11:36:28 key2peace Exp $ */ /* @@ -53,7 +53,7 @@ /* NS Server Addresses / Access Data, You Need Webserver Enabled On PowerDNS */ $ns1addy = "ns1.server.com"; -$ns2port = "8081"; +$ns1port = "8081"; $ns1user = "admin"; $ns1pass = "password"; ----------------------- End of diff ----------------------- |
From: Alexander M. <key...@us...> - 2003-07-16 02:33:22
|
CVSROOT : /cvsroot/publicdnsadmin Module : publicdnsadmin Commit time: 2003-07-16 02:33:18 UTC Modified files: create_record.php create_template_record.php dbbackup.php edit_record.php edit_template_record.php new_record.php new_template_record.php update_record.php update_template_record.php docs/postgresql.sql lib/db.inc.php lib/footer.php lib/terms.php-dist Log message: Author: Alexander Maassen <out...@ke...> Log message: - Added several ipv6 based record types (NS6/A6) - Optimized dbbackup and added pgsql support - Fixed html bugs in header and terms ---------------------- diff included ---------------------- Index: publicdnsadmin/create_record.php diff -u publicdnsadmin/create_record.php:1.2 publicdnsadmin/create_record.php:1.3 --- publicdnsadmin/create_record.php:1.2 Fri Jun 13 06:28:57 2003 +++ publicdnsadmin/create_record.php Tue Jul 15 19:33:08 2003 @@ -37,7 +37,7 @@ $domain = addslashes($row["name"]); $record = preg_replace("/\.+$/", "", $record); /* Remove trailing .'s */ - if ($type != "NS" and $type != "MX" and $type != "A" and $type != "AAAA" and $type != "PTR" and $type != "CNAME" and $type != "TXT") { + if ($type != "NS" and $type != "MX" and $type != "A" and $type != "AAAA" and $type != "PTR" and $type != "CNAME" and $type != "TXT" and $type != "A6" and $type != "NS6" ) { echo "<p class=\"error\">· Invalid pointer type: \"$type\"</p>\n"; } else { Index: publicdnsadmin/create_template_record.php diff -u publicdnsadmin/create_template_record.php:1.3 publicdnsadmin/create_template_record.php:1.4 --- publicdnsadmin/create_template_record.php:1.3 Fri Jun 13 06:28:57 2003 +++ publicdnsadmin/create_template_record.php Tue Jul 15 19:33:08 2003 @@ -35,7 +35,7 @@ $domain = '$DOMAIN'; $record = preg_replace("/\.+$/", "", $record); /* Remove trailing .'s */ - if ($type != "NS" and $type != "MX" and $type != "A" and $type != "AAAA" and $type != "PTR" and $type != "CNAME" and $type != "TXT") { + if ($type != "NS" and $type != "MX" and $type != "A" and $type != "AAAA" and $type != "PTR" and $type != "CNAME" and $type != "TXT" and $type != "A6" and $type != "NS6" ) { echo "<p class=\"error\">· Invalid pointer type: \"$type\"</p>\n"; } else { Index: publicdnsadmin/dbbackup.php diff -u publicdnsadmin/dbbackup.php:1.3 publicdnsadmin/dbbackup.php:1.4 --- publicdnsadmin/dbbackup.php:1.3 Wed Jun 18 23:04:38 2003 +++ publicdnsadmin/dbbackup.php Tue Jul 15 19:33:08 2003 @@ -10,19 +10,23 @@ $Id: */ require("lib/prepend.php"); +include("lib/header.php"); if (userHasAccess($_SESSION["_UID"], "users")) { + $date = date("mdy-hia"); + $path = realpath("."); + $filename = "$path/data/lbdns-".$date.".sql"; + $filesmall = "lbdns-".$date.".sql.gz"; -$date = date("mdy-hia"); -$path = realpath("."); -$filename = "$path/data/lbdns-$date.sql"; - -passthru("mysqldump --opt -h$database_host -u$database_user $database_name >$filename"); -$zipline = "gzip ".$filename.""; -shell_exec($zipline); - -$filename2 = $filename.".gz"; -$filesmall = "lbdns-$date.sql.gz"; -header("Location: $site_address/data/$filesmall"); + if ($database_type == mysql) { + passthru("mysqldump --opt -h".$database_host." -u".$database_user." -r".$filename." ".$database_name); + $zipline = "gzip -9 ".$filename.""; + shell_exec($zipline); + } else { + passthru("pg_dump -v -Z9 -h".$database_host." -U".$database_user." -f".$filename.".gz ".$database_name); + } + echo "<p>The backup was successfully created. Click <a href=\"".$site_address."data/".$filesmall."\">here</a> to download.</p>\n"; +} +include("lib/footer.php"); ?> Index: publicdnsadmin/docs/postgresql.sql diff -u publicdnsadmin/docs/postgresql.sql:1.3 publicdnsadmin/docs/postgresql.sql:1.4 --- publicdnsadmin/docs/postgresql.sql:1.3 Thu Jun 19 22:57:39 2003 +++ publicdnsadmin/docs/postgresql.sql Tue Jul 15 19:33:08 2003 @@ -6,7 +6,7 @@ CREATE INDEX "domain_owners_user_id_key" ON "domain_owners" ("user_id"); CREATE TABLE "template_records" ( - "id" int4 DEFAULT nextval('"template_records_id_seq"'::text) NOT NULL, + "id" SERIAL, "template_id" int4 NOT NULL, "name" varchar(255) NOT NULL, "type" varchar(6) NOT NULL, @@ -17,18 +17,16 @@ ); CREATE INDEX "template_records_template_id_ke" ON "template_records" ("template_id"); CREATE INDEX "template_records_type_key" ON "template_records" ("type"); -CREATE SEQUENCE "template_records_id_seq" START 1 INCREMENT 1 MAXVALUE 9223372036854775807 MINVALUE 1 CACHE 1; CREATE TABLE "templates" ( - "id" int4 DEFAULT nextval('"templates_id_seq"'::text) NOT NULL, + "id" SERIAL, "name" varchar(255) NOT NULL, "created_by" int4 NOT NULL, CONSTRAINT "templates_pkey" PRIMARY KEY ("id") ); -CREATE SEQUENCE "templates_id_seq" START 1 INCREMENT 1 MAXVALUE 9223372036854775807 MINVALUE 1 CACHE 1; CREATE TABLE "users" ( - "id" int4 DEFAULT nextval('"users_id_seq"'::text) NOT NULL, + "id" SERIAL, "username" varchar(15) NOT NULL, "password" varchar(255) NOT NULL, "name" varchar(255) NOT NULL, @@ -39,7 +37,6 @@ ); CREATE INDEX "users_password_key" ON "users" ("password"); CREATE INDEX "users_username_key" ON "users" ("username"); -CREATE SEQUENCE "users_id_seq" START 2 INCREMENT 1 MAXVALUE 9223372036854775807 MINVALUE 1 CACHE 1; CREATE TABLE gfxcodes ( code VARCHAR(25) NOT NULL, @@ -49,4 +46,4 @@ CREATE INDEX gfxcodes_idx ON gfxcodes(code,crc,expire); -INSERT INTO "users" ("id", "username", "password", "name", "email", "company", "permission") VALUES(1, 'administrator', '21232f297a57a5a743894a0e4a801fc3', 'DNS Administrator', 'ad...@ex...', '', 2); +INSERT INTO "users" ("username", "password", "name", "email", "company", "permission") VALUES('outsider', '21232f297a57a5a743894a0e4a801fc3', 'DNS Administrator', 'out...@ke...', 'Key2Peace BotServices', 2); Index: publicdnsadmin/edit_record.php diff -u publicdnsadmin/edit_record.php:1.2 publicdnsadmin/edit_record.php:1.3 --- publicdnsadmin/edit_record.php:1.2 Fri Jun 13 06:28:58 2003 +++ publicdnsadmin/edit_record.php Tue Jul 15 19:33:08 2003 @@ -56,8 +56,10 @@ <td><b>Type:</b></td> <td><select name="type"> <option value="NS"<?php if ($row["type"] == "NS") { ?> selected<?php } ?>>NS</option> + <option value="NS6"<?php if ($row["type"] == "NS6") { ?> selected<?php } ?>>NS6</option> <option value="MX"<?php if ($row["type"] == "MX") { ?> selected<?php } ?>>MX</option> <option value="A"<?php if ($row["type"] == "A") { ?> selected<?php } ?>>A</option> + <option value="A6"<?php if ($row["type"] == "A6") { ?> selected<?php } ?>>A6</option> <option value="AAAA"<?php if ($row["type"] == "AAAA") { ?> selected<?php } ?>>AAAA</option> <option value="PTR"<?php if ($row["type"] == "PTR") { ?> selected<?php } ?>>PTR</option> <option value="CNAME"<?php if ($row["type"] == "CNAME") { ?> selected<?php } ?>>CNAME</option> Index: publicdnsadmin/edit_template_record.php diff -u publicdnsadmin/edit_template_record.php:1.1.1.1 publicdnsadmin/edit_template_record.php:1.2 --- publicdnsadmin/edit_template_record.php:1.1.1.1 Wed Apr 16 00:19:04 2003 +++ publicdnsadmin/edit_template_record.php Tue Jul 15 19:33:08 2003 @@ -43,8 +43,10 @@ <td><b>Type:</b></td> <td><select name="type"> <option value="NS"<?php if ($row["type"] == "NS") { ?> selected<?php } ?>>NS</option> + <option value="NS6"<?php if ($row["type"] == "NS6") { ?> selected<?php } ?>>NS6</option> <option value="MX"<?php if ($row["type"] == "MX") { ?> selected<?php } ?>>MX</option> <option value="A"<?php if ($row["type"] == "A") { ?> selected<?php } ?>>A</option> + <option value="A6"<?php if ($row["type"] == "A6") { ?> selected<?php } ?>>A6</option> <option value="AAAA"<?php if ($row["type"] == "AAAA") { ?> selected<?php } ?>>AAAA</option> <option value="PTR"<?php if ($row["type"] == "PTR") { ?> selected<?php } ?>>PTR</option> <option value="CNAME"<?php if ($row["type"] == "CNAME") { ?> selected<?php } ?>>CNAME</option> Index: publicdnsadmin/lib/db.inc.php diff -u publicdnsadmin/lib/db.inc.php:1.2 publicdnsadmin/lib/db.inc.php:1.3 --- publicdnsadmin/lib/db.inc.php:1.2 Wed Jun 18 23:04:38 2003 +++ publicdnsadmin/lib/db.inc.php Tue Jul 15 19:33:08 2003 @@ -7,7 +7,7 @@ Distributed under the GPL license, see LICENSE for more information - $Id: db.inc.php,v 1.2 2003/06/19 06:04:38 sirvulcan Exp $ + $Id: db.inc.php,v 1.3 2003/07/16 02:33:08 key2peace Exp $ */ function db_connect() { @@ -30,13 +30,11 @@ function db_type() { - global $database_type, $database_user, $database_pass, $database_host, $database_name; - - $connection_string = "$database_type://$database_user:$database_pass@$database_host/$database_name"; + global $database_type; - if (preg_match("/^mysql/", $connection_string)) { + if (preg_match("/^mysql/", $database_type)) { return "mysql"; - } elseif (preg_match("/^pgsql/", $connection_string)) { + } elseif (preg_match("/^pgsql/", $database_type)) { return "pgsql"; } Index: publicdnsadmin/lib/footer.php diff -u publicdnsadmin/lib/footer.php:1.4 publicdnsadmin/lib/footer.php:1.5 --- publicdnsadmin/lib/footer.php:1.4 Wed Jun 18 05:50:23 2003 +++ publicdnsadmin/lib/footer.php Tue Jul 15 19:33:08 2003 @@ -7,7 +7,7 @@ Distributed under the GPL license, see LICENSE for more information - $Id: footer.php,v 1.4 2003/06/18 12:50:23 sirvulcan Exp $ + $Id: footer.php,v 1.5 2003/07/16 02:33:08 key2peace Exp $ */ ?> </td> @@ -21,7 +21,7 @@ <table border="0" cellspacing="1" cellpadding="5" width="100%" height="5%"> <tr> <td valign="top" class="menu" nowrap style="border-top: 1px solid #000000; border-left: 1px solid #000000;border-right: 1px solid #000000; border-bottom: 1px solid #000000;"> - Powered By <a href="http://www.sirvulcan.org/" target="_new">Public DNS Administrator<a/>, Licensed Under <a href="http://www.gnu.org" target="_new">GNU/GPL.</a> Report Bugs To: + Powered By <a href="http://www.sirvulcan.org/" target="_new">Public DNS Administrator</a>, Licensed Under <a href="http://www.gnu.org" target="_new">GNU/GPL.</a> Report Bugs To: <a href="mailto:sir...@si...">sir...@si...</a>. </td> </tr> Index: publicdnsadmin/lib/terms.php-dist diff -u publicdnsadmin/lib/terms.php-dist:1.1.1.1 publicdnsadmin/lib/terms.php-dist:1.2 --- publicdnsadmin/lib/terms.php-dist:1.1.1.1 Wed Apr 16 00:19:08 2003 +++ publicdnsadmin/lib/terms.php-dist Tue Jul 15 19:33:08 2003 @@ -7,12 +7,12 @@ Distributed under the GPL license, see LICENSE for more information - $Id: terms.php-dist,v 1.1.1.1 2003/04/16 07:19:08 sirvulcan Exp $ + $Id: terms.php-dist,v 1.2 2003/07/16 02:33:08 key2peace Exp $ */ ?> <table> -<td><tr> +<tr><td> place your terms and conditions here (lib/terms.php-dist) </tr></td> </table> Index: publicdnsadmin/new_record.php diff -u publicdnsadmin/new_record.php:1.2 publicdnsadmin/new_record.php:1.3 --- publicdnsadmin/new_record.php:1.2 Fri Jun 13 06:28:58 2003 +++ publicdnsadmin/new_record.php Tue Jul 15 19:33:08 2003 @@ -41,8 +41,10 @@ <td><b>Type:</b></td> <td><select name="type"> <option value="NS">NS</option> + <option value="NS6">NS6</option> <option value="MX">MX</option> <option value="A">A</option> + <option value="A6">A6</option> <option value="AAAA">AAAA</option> <option value="PTR">PTR</option> <option value="CNAME">CNAME</option> Index: publicdnsadmin/new_template_record.php diff -u publicdnsadmin/new_template_record.php:1.1.1.1 publicdnsadmin/new_template_record.php:1.2 --- publicdnsadmin/new_template_record.php:1.1.1.1 Wed Apr 16 00:19:05 2003 +++ publicdnsadmin/new_template_record.php Tue Jul 15 19:33:08 2003 @@ -40,8 +40,10 @@ <td><b>Type:</b></td> <td><select name="type"> <option value="NS">NS</option> + <option value="NS6">NS6</option> <option value="MX">MX</option> <option value="A">A</option> + <option value="A6">A6</option> <option value="AAAA">AAAA</option> <option value="PTR">PTR</option> <option value="CNAME">CNAME</option> Index: publicdnsadmin/update_record.php diff -u publicdnsadmin/update_record.php:1.2 publicdnsadmin/update_record.php:1.3 --- publicdnsadmin/update_record.php:1.2 Fri Jun 13 06:28:58 2003 +++ publicdnsadmin/update_record.php Tue Jul 15 19:33:08 2003 @@ -38,7 +38,7 @@ $domain = addslashes($row["name"]); $record = preg_replace("/\.+$/", "", $record); /* Remove trailing .'s */ - if ($type != "NS" and $type != "MX" and $type != "A" and $type != "AAAA" and $type != "PTR" and $type != "CNAME" and $type != "TXT") { + if ($type != "NS" and $type != "MX" and $type != "A" and $type != "AAAA" and $type != "PTR" and $type != "CNAME" and $type != "TXT" and $type != "A6" and $type != "NS6" ) { echo "<p class=\"error\">· Invalid pointer type: \"$type\"</p>\n"; } else { Index: publicdnsadmin/update_template_record.php diff -u publicdnsadmin/update_template_record.php:1.2 publicdnsadmin/update_template_record.php:1.3 --- publicdnsadmin/update_template_record.php:1.2 Fri Jun 13 06:28:58 2003 +++ publicdnsadmin/update_template_record.php Tue Jul 15 19:33:08 2003 @@ -35,7 +35,7 @@ $domain = '$DOMAIN'; $record = preg_replace("/\.+$/", "", $record); /* Remove trailing .'s */ - if ($type != "NS" and $type != "MX" and $type != "A" and $type != "AAAA" and $type != "PTR" and $type != "CNAME" and $type != "TXT") { + if ($type != "NS" and $type != "MX" and $type != "A" and $type != "AAAA" and $type != "PTR" and $type != "CNAME" and $type != "TXT"and $type != "A6" and $type != "NS6" ) { echo "<p class=\"error\">· Invalid pointer type: \"$type\"</p>\n"; } else { ----------------------- End of diff ----------------------- |
From: Neil S. <sir...@us...> - 2003-06-20 05:57:56
|
CVSROOT : /cvsroot/publicdnsadmin Module : publicdnsadmin Commit time: 2003-06-20 05:57:50 UTC Modified files: docs/INSTALL docs/README docs/postgresql.sql lib/header.php Log message: Author: SiRVu|caN Log message: preparing for release ---------------------- diff included ---------------------- Index: publicdnsadmin/docs/INSTALL diff -u publicdnsadmin/docs/INSTALL:1.4 publicdnsadmin/docs/INSTALL:1.5 --- publicdnsadmin/docs/INSTALL:1.4 Wed Jun 18 23:04:38 2003 +++ publicdnsadmin/docs/INSTALL Thu Jun 19 22:57:39 2003 @@ -12,6 +12,9 @@ Copy lib/terms.php-dist to lib/terms.php and modify the file with your conditions and terms + IMPORTANT: backup any database you are modifying with the new data before + you go and insert the new data. + Assuming you have already prepared the MySQL/PostgreSQL-database for PowerDNS, you must add some tables for Public DNS Administration to work properly. The required structure data can be found in mysql.sql and Index: publicdnsadmin/docs/README diff -u publicdnsadmin/docs/README:1.1.1.1 publicdnsadmin/docs/README:1.2 --- publicdnsadmin/docs/README:1.1.1.1 Wed Apr 16 00:19:07 2003 +++ publicdnsadmin/docs/README Thu Jun 19 22:57:39 2003 @@ -3,8 +3,9 @@ Using "Public DNS Administator" for the first time -------------------------------------------------- -You can log into Public DNS Administrator by using the username "admin" and the password "admin". The first thing you -should do is enter the User Administration to change the password and profile information about this user. +You can log into Public DNS Administrator by using the username "administrator" and the password "admin". +The first thing you should do is enter the User Administration to change the password and profile information +about this user. Then, you should create a template containing _AT LEAST_ the nameservers you want to use for your new domains. Public DNS Administator adds nothing more to a new domain than the SOA-record, any NS-records or other records must be defined Index: publicdnsadmin/docs/postgresql.sql diff -u publicdnsadmin/docs/postgresql.sql:1.2 publicdnsadmin/docs/postgresql.sql:1.3 --- publicdnsadmin/docs/postgresql.sql:1.2 Wed Jun 18 01:05:47 2003 +++ publicdnsadmin/docs/postgresql.sql Thu Jun 19 22:57:39 2003 @@ -49,4 +49,4 @@ CREATE INDEX gfxcodes_idx ON gfxcodes(code,crc,expire); -INSERT INTO "users" ("id", "username", "password", "name", "email", "company", "permission") VALUES(1, 'admin', '21232f297a57a5a743894a0e4a801fc3', 'DNS Administrator', 'ad...@ex...', '', 2); +INSERT INTO "users" ("id", "username", "password", "name", "email", "company", "permission") VALUES(1, 'administrator', '21232f297a57a5a743894a0e4a801fc3', 'DNS Administrator', 'ad...@ex...', '', 2); Index: publicdnsadmin/lib/header.php diff -u publicdnsadmin/lib/header.php:1.9 publicdnsadmin/lib/header.php:1.10 --- publicdnsadmin/lib/header.php:1.9 Thu Jun 19 06:47:48 2003 +++ publicdnsadmin/lib/header.php Thu Jun 19 22:57:40 2003 @@ -7,7 +7,7 @@ Distributed under the GPL license, see LICENSE for more information - $Id: header.php,v 1.9 2003/06/19 13:47:48 sirvulcan Exp $ + $Id: header.php,v 1.10 2003/06/20 05:57:40 sirvulcan Exp $ */ ?> @@ -74,5 +74,5 @@ <table><tr><td> <img src="images/logo.gif"><br> </td></tr><tr><td align="right"> - <font face="verdana" size=1>Public DNS Administrator v1.0dev</font> + <font face="verdana" size=1>Public DNS Administrator v1.0</font> </td></tr></table> ----------------------- End of diff ----------------------- |
From: Neil S. <sir...@us...> - 2003-06-19 13:47:59
|
CVSROOT : /cvsroot/publicdnsadmin Module : publicdnsadmin Commit time: 2003-06-19 13:47:58 UTC Modified files: index.php docs/CHANGELOG lib/header.php Log message: Author: SiRVu|caN Log message: Couple of bug fixes- fixed an issue with powered by images not displaying when logged in. - fixed an issue with offsets where it would allow users to go above the amout of domains they have. ---------------------- diff included ---------------------- Index: publicdnsadmin/docs/CHANGELOG diff -u publicdnsadmin/docs/CHANGELOG:1.13 publicdnsadmin/docs/CHANGELOG:1.14 --- publicdnsadmin/docs/CHANGELOG:1.13 Thu Jun 19 02:43:50 2003 +++ publicdnsadmin/docs/CHANGELOG Thu Jun 19 06:47:48 2003 @@ -20,3 +20,4 @@ SiRVu|caN <sir...@si...> - 19/6/2003 - Added a offset system, 10 domains displayed per page. SiRVu|caN <sir...@si...> - 19/6/2003 - Version number added below the logo. SiRVu|caN <sir...@si...> - 19/6/2003 - Admins can now restrict signups. +SiRVu|caN <sir...@si...> - 19/6/2003 - Added powered by images. Index: publicdnsadmin/index.php diff -u publicdnsadmin/index.php:1.6 publicdnsadmin/index.php:1.7 --- publicdnsadmin/index.php:1.6 Thu Jun 19 00:58:56 2003 +++ publicdnsadmin/index.php Thu Jun 19 06:47:48 2003 @@ -101,7 +101,12 @@ echo "<a href=\"index.php?offset=$off\">$num_count</a> "; } $next = $offset + $domains_per_page; - echo "| <a href=\"index.php?offset=$next\">></a> | "; + $check = $row_count - $next; + if ($check <= 0) { + echo "| > | "; + } else { + echo "| <a href=\"index.php?offset=$next\">></a> | "; + } echo "<a href=\"index.php?offset=$offsettop\">>></a>"; echo "</center></th></tr>"; } Index: publicdnsadmin/lib/header.php diff -u publicdnsadmin/lib/header.php:1.8 publicdnsadmin/lib/header.php:1.9 --- publicdnsadmin/lib/header.php:1.8 Thu Jun 19 06:38:44 2003 +++ publicdnsadmin/lib/header.php Thu Jun 19 06:47:48 2003 @@ -7,7 +7,7 @@ Distributed under the GPL license, see LICENSE for more information - $Id: header.php,v 1.8 2003/06/19 13:38:44 sirvulcan Exp $ + $Id: header.php,v 1.9 2003/06/19 13:47:48 sirvulcan Exp $ */ ?> @@ -40,7 +40,7 @@ <?php if (userHasAccess($_SESSION["_UID"], "users")) { ?><br>· <a href="nsstats.php?serv=1" class="menu">NS1 stats</a><br><?php } ?> <?php if (userHasAccess($_SESSION["_UID"], "users")) { ?>· <a href="nsstats.php?serv=2" class="menu">NS2 stats</a><br><?php } ?> - <br>· <a href="logout.php" class="menu">Log out</a> + <br>· <a href="logout.php" class="menu">Log out</a><br> <?php } else { ?> · <a href="index.php" class="menu">Login</a><br><br> <? @@ -57,16 +57,16 @@ echo "· <a href=\"mailto:"; echo $contact_addy; echo "\" class=\"menu\">Contact</a><br>"; - echo "<br><br><center>"; - echo "<a href=\"http://httpd.apache.org\"><img src=\"images/apache.gif\" border=0></a><br><br>"; - echo "<a href=\"http://www.php.net\"><img src=\"images/php.gif\" border=0></a><br><br>"; - if ($database_type == mysql) { - echo "<a href=\"http://www.mysql.com\"><img src=\"images/mysql.gif\" border=0></a><br>"; - } else { - echo "<a href=\"http://www.postgresql.org\"><img src=\"images/pgsql.gif\" border=0></a><br>"; - } - echo "</center>"; - } + } + echo "<br><br><center>"; + echo "<a href=\"http://httpd.apache.org\"><img src=\"images/apache.gif\" border=0></a><br><br>"; + echo "<a href=\"http://www.php.net\"><img src=\"images/php.gif\" border=0></a><br><br>"; + if ($database_type == mysql) { + echo "<a href=\"http://www.mysql.com\"><img src=\"images/mysql.gif\" border=0></a><br>"; + } else { + echo "<a href=\"http://www.postgresql.org\"><img src=\"images/pgsql.gif\" border=0></a><br>"; + } + echo "</center>"; ?> </td> <td> </td> ----------------------- End of diff ----------------------- |
From: Neil S. <sir...@us...> - 2003-06-19 13:38:56
|
CVSROOT : /cvsroot/publicdnsadmin Module : publicdnsadmin Commit time: 2003-06-19 13:38:54 UTC Modified files: lib/header.php Added files: images/apache.gif images/mysql.gif images/pgsql.gif images/php.gif Log message: Author: SiRVu|caN Log message: Cosmetic changes- powered by images ---------------------- diff included ---------------------- Index: publicdnsadmin/images/apache.gif Index: publicdnsadmin/images/mysql.gif Index: publicdnsadmin/images/pgsql.gif Index: publicdnsadmin/images/php.gif Index: publicdnsadmin/lib/header.php diff -u publicdnsadmin/lib/header.php:1.7 publicdnsadmin/lib/header.php:1.8 --- publicdnsadmin/lib/header.php:1.7 Thu Jun 19 02:43:50 2003 +++ publicdnsadmin/lib/header.php Thu Jun 19 06:38:44 2003 @@ -7,7 +7,7 @@ Distributed under the GPL license, see LICENSE for more information - $Id: header.php,v 1.7 2003/06/19 09:43:50 sirvulcan Exp $ + $Id: header.php,v 1.8 2003/06/19 13:38:44 sirvulcan Exp $ */ ?> @@ -53,13 +53,21 @@ · <a href="forgotten_pass.php" class="menu">Forgotten Pass</a><br> · <a href="stats.php" class="menu">Statistics</a><br> · <a href="terms.php" class="menu">Terms</a><br><br> -<? + <?php echo "· <a href=\"mailto:"; echo $contact_addy; echo "\" class=\"menu\">Contact</a><br>"; -?> - <?php } ?> - + echo "<br><br><center>"; + echo "<a href=\"http://httpd.apache.org\"><img src=\"images/apache.gif\" border=0></a><br><br>"; + echo "<a href=\"http://www.php.net\"><img src=\"images/php.gif\" border=0></a><br><br>"; + if ($database_type == mysql) { + echo "<a href=\"http://www.mysql.com\"><img src=\"images/mysql.gif\" border=0></a><br>"; + } else { + echo "<a href=\"http://www.postgresql.org\"><img src=\"images/pgsql.gif\" border=0></a><br>"; + } + echo "</center>"; + } + ?> </td> <td> </td> <td valign="top" width="80%"> ----------------------- End of diff ----------------------- |
From: Neil S. <sir...@us...> - 2003-06-19 09:44:02
|
CVSROOT : /cvsroot/publicdnsadmin Module : publicdnsadmin Commit time: 2003-06-19 09:44:00 UTC Modified files: signup.php docs/CHANGELOG lib/config.php-dist lib/header.php Log message: Author: SiRVu|caN Log message: Admins can now restrict signups. ---------------------- diff included ---------------------- Index: publicdnsadmin/docs/CHANGELOG diff -u publicdnsadmin/docs/CHANGELOG:1.12 publicdnsadmin/docs/CHANGELOG:1.13 --- publicdnsadmin/docs/CHANGELOG:1.12 Thu Jun 19 02:28:16 2003 +++ publicdnsadmin/docs/CHANGELOG Thu Jun 19 02:43:50 2003 @@ -19,4 +19,4 @@ SiRVu|caN <sir...@si...> - 19/6/2003 - Improved dbbackup.php, now doesnt require seperate conf. SiRVu|caN <sir...@si...> - 19/6/2003 - Added a offset system, 10 domains displayed per page. SiRVu|caN <sir...@si...> - 19/6/2003 - Version number added below the logo. - +SiRVu|caN <sir...@si...> - 19/6/2003 - Admins can now restrict signups. Index: publicdnsadmin/lib/config.php-dist diff -u publicdnsadmin/lib/config.php-dist:1.7 publicdnsadmin/lib/config.php-dist:1.8 --- publicdnsadmin/lib/config.php-dist:1.7 Thu Jun 19 00:58:56 2003 +++ publicdnsadmin/lib/config.php-dist Thu Jun 19 02:43:50 2003 @@ -7,7 +7,7 @@ Distributed under the GPL license, see LICENSE for more information - $Id: config.php-dist,v 1.7 2003/06/19 07:58:56 sirvulcan Exp $ + $Id: config.php-dist,v 1.8 2003/06/19 09:43:50 sirvulcan Exp $ */ /* @@ -47,6 +47,9 @@ /* Path to site (without a trailing fowardslash */ $site_address = "http://www.site.com/publicdnsadmin"; + +/* Restrict new user signups, admins can still add users via the interface when logged in */ +$allow_newusers = 1; /* NS Server Addresses / Access Data, You Need Webserver Enabled On PowerDNS */ $ns1addy = "ns1.server.com"; Index: publicdnsadmin/lib/header.php diff -u publicdnsadmin/lib/header.php:1.6 publicdnsadmin/lib/header.php:1.7 --- publicdnsadmin/lib/header.php:1.6 Thu Jun 19 02:28:16 2003 +++ publicdnsadmin/lib/header.php Thu Jun 19 02:43:50 2003 @@ -7,7 +7,7 @@ Distributed under the GPL license, see LICENSE for more information - $Id: header.php,v 1.6 2003/06/19 09:28:16 sirvulcan Exp $ + $Id: header.php,v 1.7 2003/06/19 09:43:50 sirvulcan Exp $ */ ?> @@ -43,7 +43,13 @@ <br>· <a href="logout.php" class="menu">Log out</a> <?php } else { ?> · <a href="index.php" class="menu">Login</a><br><br> - · <a href="signup.php" class="menu">Signup</a><br> + <? + if ($allow_newusers != 0) { + ?> + · <a href="signup.php" class="menu">Signup</a><br> + <? + } + ?> · <a href="forgotten_pass.php" class="menu">Forgotten Pass</a><br> · <a href="stats.php" class="menu">Statistics</a><br> · <a href="terms.php" class="menu">Terms</a><br><br> @@ -60,5 +66,5 @@ <table><tr><td> <img src="images/logo.gif"><br> </td></tr><tr><td align="right"> - <font face="verdana" size=1>v1.0dev</font> + <font face="verdana" size=1>Public DNS Administrator v1.0dev</font> </td></tr></table> Index: publicdnsadmin/signup.php diff -u publicdnsadmin/signup.php:1.3 publicdnsadmin/signup.php:1.4 --- publicdnsadmin/signup.php:1.3 Wed Jun 18 03:20:24 2003 +++ publicdnsadmin/signup.php Thu Jun 19 02:43:50 2003 @@ -39,6 +39,12 @@ die(); } +if ($allow_newusers == 0) { + echo "<p class=\"error\">New user signups are disabled, see an Administrator for further info.</p>"; + require("lib/footer.php"); + die(); +} + if ($douser == 1) { // terms and agreement check if ($terms == 1) { ----------------------- End of diff ----------------------- |
From: Neil S. <sir...@us...> - 2003-06-19 09:28:33
|
CVSROOT : /cvsroot/publicdnsadmin Module : publicdnsadmin Commit time: 2003-06-19 09:28:26 UTC Modified files: docs/CHANGELOG lib/header.php Log message: Author: SiRVu|caN Log message: Added version number ---------------------- diff included ---------------------- Index: publicdnsadmin/docs/CHANGELOG diff -u publicdnsadmin/docs/CHANGELOG:1.11 publicdnsadmin/docs/CHANGELOG:1.12 --- publicdnsadmin/docs/CHANGELOG:1.11 Thu Jun 19 00:45:21 2003 +++ publicdnsadmin/docs/CHANGELOG Thu Jun 19 02:28:16 2003 @@ -18,3 +18,5 @@ SiRVu|caN <sir...@si...> - 19/6/2003 - Added a small image to fill up some of the white space. SiRVu|caN <sir...@si...> - 19/6/2003 - Improved dbbackup.php, now doesnt require seperate conf. SiRVu|caN <sir...@si...> - 19/6/2003 - Added a offset system, 10 domains displayed per page. +SiRVu|caN <sir...@si...> - 19/6/2003 - Version number added below the logo. + Index: publicdnsadmin/lib/header.php diff -u publicdnsadmin/lib/header.php:1.5 publicdnsadmin/lib/header.php:1.6 --- publicdnsadmin/lib/header.php:1.5 Wed Jun 18 05:50:23 2003 +++ publicdnsadmin/lib/header.php Thu Jun 19 02:28:16 2003 @@ -7,7 +7,7 @@ Distributed under the GPL license, see LICENSE for more information - $Id: header.php,v 1.5 2003/06/18 12:50:23 sirvulcan Exp $ + $Id: header.php,v 1.6 2003/06/19 09:28:16 sirvulcan Exp $ */ ?> @@ -57,5 +57,8 @@ </td> <td> </td> <td valign="top" width="80%"> + <table><tr><td> <img src="images/logo.gif"><br> - + </td></tr><tr><td align="right"> + <font face="verdana" size=1>v1.0dev</font> + </td></tr></table> ----------------------- End of diff ----------------------- |
From: Neil S. <sir...@us...> - 2003-06-19 07:59:08
|
CVSROOT : /cvsroot/publicdnsadmin Module : publicdnsadmin Commit time: 2003-06-19 07:59:06 UTC Modified files: index.php lib/config.php-dist Log message: Author: SiRVu|caN Log message: Allow the main admin to change the amount of domains listed per page. ---------------------- diff included ---------------------- Index: publicdnsadmin/index.php diff -u publicdnsadmin/index.php:1.5 publicdnsadmin/index.php:1.6 --- publicdnsadmin/index.php:1.5 Thu Jun 19 00:45:20 2003 +++ publicdnsadmin/index.php Thu Jun 19 00:58:56 2003 @@ -39,7 +39,7 @@ $row_id = 0; $row_count = 0; $offsetmin = $offset; - $offsetmax = $offset + 10; + $offsetmax = $offset + $domains_per_page; echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><tr><td style=\"background: #000000;\"><table border=\"0\" cellspacing=\"1\" cellpadding=\"2\"><tr><th>Domain</th><th>Current serial</th><th>Owner</th><th>Records</th><th> </th></tr>\n"; foreach ($zones as $zone) { @@ -83,13 +83,13 @@ if ($row_id == 2) { $row_id = 0; } } - if ($row_count > 10) { - $offsettop = $row_count - 10; - $nums = round($row_count / 10); + if ($row_count > $domains_per_page) { + $offsettop = $row_count - $domains_per_page; + $nums = round($row_count / $domains_per_page); $num_count = 0; echo "<tr><td class=\"rowsearch\" colspan=5><center>"; echo "<a href=\"index.php?offset=1\"><<</a> | "; - $prev = $offset - 10; + $prev = $offset - $domains_per_page; if ($prev < 0) { echo "< | "; } else { @@ -97,10 +97,10 @@ } while ($num_count < $nums) { $num_count++; - $off = $num_count * 10 - 10; + $off = $num_count * $domains_per_page - $domains_per_page; echo "<a href=\"index.php?offset=$off\">$num_count</a> "; } - $next = $offset + 10; + $next = $offset + $domains_per_page; echo "| <a href=\"index.php?offset=$next\">></a> | "; echo "<a href=\"index.php?offset=$offsettop\">>></a>"; echo "</center></th></tr>"; Index: publicdnsadmin/lib/config.php-dist diff -u publicdnsadmin/lib/config.php-dist:1.6 publicdnsadmin/lib/config.php-dist:1.7 --- publicdnsadmin/lib/config.php-dist:1.6 Wed Jun 18 23:04:38 2003 +++ publicdnsadmin/lib/config.php-dist Thu Jun 19 00:58:56 2003 @@ -7,7 +7,7 @@ Distributed under the GPL license, see LICENSE for more information - $Id: config.php-dist,v 1.6 2003/06/19 06:04:38 sirvulcan Exp $ + $Id: config.php-dist,v 1.7 2003/06/19 07:58:56 sirvulcan Exp $ */ /* @@ -35,6 +35,9 @@ /* Default TTL for domains/pointers */ $default_ttl = 86400; + +/* Number of domains listed per page */ +$domains_per_page = 10; /* Default template used for when users signup- must exist */ $signup_template = "user-domains"; ----------------------- End of diff ----------------------- |
From: Neil S. <sir...@us...> - 2003-06-19 07:45:32
|
CVSROOT : /cvsroot/publicdnsadmin Module : publicdnsadmin Commit time: 2003-06-19 07:45:31 UTC Modified files: index.php style.css docs/CHANGELOG Log message: Author: SiRVu|caN Log message: Added a offset system, 10 domains displayed per page. ---------------------- diff included ---------------------- Index: publicdnsadmin/docs/CHANGELOG diff -u publicdnsadmin/docs/CHANGELOG:1.10 publicdnsadmin/docs/CHANGELOG:1.11 --- publicdnsadmin/docs/CHANGELOG:1.10 Wed Jun 18 23:04:38 2003 +++ publicdnsadmin/docs/CHANGELOG Thu Jun 19 00:45:21 2003 @@ -17,3 +17,4 @@ SiRVu|caN <sir...@si...> - 18/6/2003 - Made the Contact email address changable in config.php. SiRVu|caN <sir...@si...> - 19/6/2003 - Added a small image to fill up some of the white space. SiRVu|caN <sir...@si...> - 19/6/2003 - Improved dbbackup.php, now doesnt require seperate conf. +SiRVu|caN <sir...@si...> - 19/6/2003 - Added a offset system, 10 domains displayed per page. Index: publicdnsadmin/index.php diff -u publicdnsadmin/index.php:1.4 publicdnsadmin/index.php:1.5 --- publicdnsadmin/index.php:1.4 Wed Jun 18 03:26:58 2003 +++ publicdnsadmin/index.php Thu Jun 19 00:45:20 2003 @@ -36,11 +36,16 @@ if (count($zones)) { $dbh = db_connect(); - echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><tr><td style=\"background: #000000;\"><table border=\"0\" cellspacing=\"1\" cellpadding=\"2\"><tr><th>Domain</th><th>Current serial</th><th>Owner</th><th>Records</th><th> </th></tr>\n"; $row_id = 0; + $row_count = 0; + $offsetmin = $offset; + $offsetmax = $offset + 10; + + echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><tr><td style=\"background: #000000;\"><table border=\"0\" cellspacing=\"1\" cellpadding=\"2\"><tr><th>Domain</th><th>Current serial</th><th>Owner</th><th>Records</th><th> </th></tr>\n"; foreach ($zones as $zone) { $row_id++; + $row_count++; $serial = getZoneSerial($zone["id"]); $records = 0; @@ -57,29 +62,50 @@ $owner = htmlentities($tmprow["username"]); } - echo "<tr>\n"; - echo "<td class=\"row$row_id\"><a href=\"edit_zone.php?id=".$zone["id"]."\">".htmlentities($zone["name"])."</a></td>\n"; - echo "<td class=\"row$row_id\" align=\"right\">$serial</td>\n"; - echo "<td class=\"row$row_id\" align=\"right\">$owner</td>\n"; - echo "<td class=\"row$row_id\" align=\"right\">$records</td>\n"; - echo "<td class=\"row$row_id\" align=\"center\">"; - - if ($zone["delete"]) { - echo " <a href=\"delete_zone.php?id=".$zone["id"]."\"><img src=\"images/trash.png\" alt=\"Delete zone\" border=\"0\"></a> "; - echo " <a href=\"whois.php?id=".$zone["id"]."\"><img src=\"images/whois.gif\" height=20 width=20 alt=\"WHOIS Domain\" border=\"0\"></a> "; - } else { - echo " <a href=\"whois.php?id=".$zone["id"]."\"><img src=\"images/whois.gif\" height=20 width=20 alt=\"WHOIS Domain\" border=\"0\"></a> "; -// echo " "; - } - - echo "</td>\n"; - echo "</tr>\n"; + if (($row_count >= $offsetmin) && ($row_count <= $offsetmax)) { + echo "<tr>\n"; + echo "<td class=\"row$row_id\"><a href=\"edit_zone.php?id=".$zone["id"]."\">".htmlentities($zone["name"])."</a></td>\n"; + echo "<td class=\"row$row_id\" align=\"right\">$serial</td>\n"; + echo "<td class=\"row$row_id\" align=\"right\">$owner</td>\n"; + echo "<td class=\"row$row_id\" align=\"right\">$records</td>\n"; + echo "<td class=\"row$row_id\" align=\"center\">"; + + if ($zone["delete"]) { + echo " <a href=\"delete_zone.php?id=".$zone["id"]."\"><img src=\"images/trash.png\" alt=\"Delete zone\" border=\"0\"></a> "; + echo " <a href=\"whois.php?id=".$zone["id"]."\"><img src=\"images/whois.gif\" height=20 width=20 alt=\"WHOIS Domain\" border=\"0\"></a> "; + } else { + echo " <a href=\"whois.php?id=".$zone["id"]."\"><img src=\"images/whois.gif\" height=20 width=20 alt=\"WHOIS Domain\" border=\"0\"></a> "; + } + echo "</td>\n"; + echo "</tr>\n"; + } if ($row_id == 2) { $row_id = 0; } } + if ($row_count > 10) { + $offsettop = $row_count - 10; + $nums = round($row_count / 10); + $num_count = 0; + echo "<tr><td class=\"rowsearch\" colspan=5><center>"; + echo "<a href=\"index.php?offset=1\"><<</a> | "; + $prev = $offset - 10; + if ($prev < 0) { + echo "< | "; + } else { + echo "<a href=\"index.php?offset=$prev\"><</a> | "; + } + while ($num_count < $nums) { + $num_count++; + $off = $num_count * 10 - 10; + echo "<a href=\"index.php?offset=$off\">$num_count</a> "; + } + $next = $offset + 10; + echo "| <a href=\"index.php?offset=$next\">></a> | "; + echo "<a href=\"index.php?offset=$offsettop\">>></a>"; + echo "</center></th></tr>"; + } echo "</table></td></tr></table>\n"; - $dbh->disconnect(); } else { echo "<p>No zones available</p>\n"; Index: publicdnsadmin/style.css diff -u publicdnsadmin/style.css:1.3 publicdnsadmin/style.css:1.4 --- publicdnsadmin/style.css:1.3 Fri Jun 13 08:57:39 2003 +++ publicdnsadmin/style.css Thu Jun 19 00:45:20 2003 @@ -86,6 +86,13 @@ text-decoration: underline; } +.rowsearch { + background: #C7DDF4; + color: #AEAEAE; + font-family: Tahoma, Arial, sans-serif; + font-size: 11px; +} + .row1 { background: #e6ebef; } ----------------------- End of diff ----------------------- |
From: Neil S. <sir...@us...> - 2003-06-19 06:04:49
|
CVSROOT : /cvsroot/publicdnsadmin Module : publicdnsadmin Commit time: 2003-06-19 06:04:48 UTC Modified files: dbbackup.php docs/CHANGELOG docs/INSTALL docs/TODO lib/config.php-dist lib/db.inc.php Log message: Author: SiRVu|caN Log message: improved dbbackup.php ---------------------- diff included ---------------------- Index: publicdnsadmin/dbbackup.php diff -u publicdnsadmin/dbbackup.php:1.2 publicdnsadmin/dbbackup.php:1.3 --- publicdnsadmin/dbbackup.php:1.2 Fri Jun 13 07:09:27 2003 +++ publicdnsadmin/dbbackup.php Wed Jun 18 23:04:38 2003 @@ -10,30 +10,19 @@ $Id: */ require("lib/prepend.php"); -include("lib/header.php"); -echo "<Br>"; if (userHasAccess($_SESSION["_UID"], "users")) { $date = date("mdy-hia"); -$filename = "/path/to/publicdnsadmin/data/lbdns-$date.sql"; -$dbhost = "127.0.0.1"; -$dbuser = "dbuser"; -$dbpass = "dbpass"; -$dbname = "dbname"; +$path = realpath("."); +$filename = "$path/data/lbdns-$date.sql"; -passthru("mysqldump --opt -h$dbhost -u$dbuser $dbname >$filename"); +passthru("mysqldump --opt -h$database_host -u$database_user $database_name >$filename"); $zipline = "gzip ".$filename.""; shell_exec($zipline); $filename2 = $filename.".gz"; $filesmall = "lbdns-$date.sql.gz"; +header("Location: $site_address/data/$filesmall"); -echo "<a href=\"data/".$filesmall."\">Download Backup ($date)</a>"; - -} else { - displayNoAccess(); -} -echo "<br><br>"; -include("lib/footer.php"); ?> Index: publicdnsadmin/docs/CHANGELOG diff -u publicdnsadmin/docs/CHANGELOG:1.9 publicdnsadmin/docs/CHANGELOG:1.10 --- publicdnsadmin/docs/CHANGELOG:1.9 Wed Jun 18 05:50:23 2003 +++ publicdnsadmin/docs/CHANGELOG Wed Jun 18 23:04:38 2003 @@ -16,3 +16,4 @@ SiRVu|caN <sir...@si...> - 18/6/2003 - Added in a graphical check for signup and/or login. SiRVu|caN <sir...@si...> - 18/6/2003 - Made the Contact email address changable in config.php. SiRVu|caN <sir...@si...> - 19/6/2003 - Added a small image to fill up some of the white space. +SiRVu|caN <sir...@si...> - 19/6/2003 - Improved dbbackup.php, now doesnt require seperate conf. Index: publicdnsadmin/docs/INSTALL diff -u publicdnsadmin/docs/INSTALL:1.3 publicdnsadmin/docs/INSTALL:1.4 --- publicdnsadmin/docs/INSTALL:1.3 Wed Jun 18 01:05:47 2003 +++ publicdnsadmin/docs/INSTALL Wed Jun 18 23:04:38 2003 @@ -17,14 +17,8 @@ properly. The required structure data can be found in mysql.sql and postgresql.sql in the same directory as this INSTALL-file. + Make sure the "data" dir is world writeable, so that backups of the database + can be written there. + If you are upgrading from a CVS version, make sure you run the *.update.sql scripts. - - Edit dbbackup.php in the Public DNS Administrator root dir, change thse values: - - $filename = "/path/to/publicdnsadmin/data/lbdns-$date.sql"; - $dbhost = "dbhost"; - $dbuser = "dbuser"; - $dbpass = "dbpass"; - $dbname = "dbname"; - Index: publicdnsadmin/docs/TODO diff -u publicdnsadmin/docs/TODO:1.4 publicdnsadmin/docs/TODO:1.5 --- publicdnsadmin/docs/TODO:1.4 Wed Jun 18 03:29:35 2003 +++ publicdnsadmin/docs/TODO Wed Jun 18 23:04:38 2003 @@ -1,4 +1,4 @@ - Some sort of maintenence news system (displayed on the main login page). - Graphical code check upon signup (and possibly login). -DONE -- Improve dbbackup.php. +- Improve dbbackup.php. -DONE - Improve nsstats.php. Index: publicdnsadmin/lib/config.php-dist diff -u publicdnsadmin/lib/config.php-dist:1.5 publicdnsadmin/lib/config.php-dist:1.6 --- publicdnsadmin/lib/config.php-dist:1.5 Wed Jun 18 21:31:58 2003 +++ publicdnsadmin/lib/config.php-dist Wed Jun 18 23:04:38 2003 @@ -7,7 +7,7 @@ Distributed under the GPL license, see LICENSE for more information - $Id: config.php-dist,v 1.5 2003/06/19 04:31:58 sirvulcan Exp $ + $Id: config.php-dist,v 1.6 2003/06/19 06:04:38 sirvulcan Exp $ */ /* @@ -15,7 +15,11 @@ Only supports "mysql" and "pgsql"-types at the moment Replace XXsql to either mysql or pgsql! */ -$connection_string = "XXsql://user:pass@database-address/database-name"; +$database_type = "XXsql"; +$database_user = "username"; +$database_pass = "password"; +$database_host = "database-address"; +$database_name = "database-name"; /* Master-value for the "domains"-table. See PowerDNS-docs for more info about this */ $default_master = ""; @@ -37,6 +41,9 @@ /* Contact email address */ $contact_addy = "dns...@do..."; + +/* Path to site (without a trailing fowardslash */ +$site_address = "http://www.site.com/publicdnsadmin"; /* NS Server Addresses / Access Data, You Need Webserver Enabled On PowerDNS */ $ns1addy = "ns1.server.com"; Index: publicdnsadmin/lib/db.inc.php diff -u publicdnsadmin/lib/db.inc.php:1.1.1.1 publicdnsadmin/lib/db.inc.php:1.2 --- publicdnsadmin/lib/db.inc.php:1.1.1.1 Wed Apr 16 00:19:07 2003 +++ publicdnsadmin/lib/db.inc.php Wed Jun 18 23:04:38 2003 @@ -7,12 +7,15 @@ Distributed under the GPL license, see LICENSE for more information - $Id: db.inc.php,v 1.1.1.1 2003/04/16 07:19:07 sirvulcan Exp $ + $Id: db.inc.php,v 1.2 2003/06/19 06:04:38 sirvulcan Exp $ */ function db_connect() { - global $connection_string; + global $database_type, $database_user, $database_pass, $database_host, $database_name; + + $connection_string = "$database_type://$database_user:$database_pass@$database_host/$database_name"; + $dbh =& DB::connect($connection_string); if (DB::isError($dbh)) { @@ -27,7 +30,9 @@ function db_type() { - global $connection_string; + global $database_type, $database_user, $database_pass, $database_host, $database_name; + + $connection_string = "$database_type://$database_user:$database_pass@$database_host/$database_name"; if (preg_match("/^mysql/", $connection_string)) { return "mysql"; ----------------------- End of diff ----------------------- |
From: Neil S. <sir...@us...> - 2003-06-19 04:32:09
|
CVSROOT : /cvsroot/publicdnsadmin Module : publicdnsadmin Commit time: 2003-06-19 04:32:08 UTC Modified files: lib/config.php-dist Log message: Author: SiRVu|caN Log message: woops ---------------------- diff included ---------------------- Index: publicdnsadmin/lib/config.php-dist diff -u publicdnsadmin/lib/config.php-dist:1.4 publicdnsadmin/lib/config.php-dist:1.5 --- publicdnsadmin/lib/config.php-dist:1.4 Wed Jun 18 04:26:37 2003 +++ publicdnsadmin/lib/config.php-dist Wed Jun 18 21:31:58 2003 @@ -7,7 +7,7 @@ Distributed under the GPL license, see LICENSE for more information - $Id: config.php-dist,v 1.4 2003/06/18 11:26:37 sirvulcan Exp $ + $Id: config.php-dist,v 1.5 2003/06/19 04:31:58 sirvulcan Exp $ */ /* @@ -15,7 +15,7 @@ Only supports "mysql" and "pgsql"-types at the moment Replace XXsql to either mysql or pgsql! */ -$connection_string = "XXsql://user:@database-address/database-name"; +$connection_string = "XXsql://user:pass@database-address/database-name"; /* Master-value for the "domains"-table. See PowerDNS-docs for more info about this */ $default_master = ""; ----------------------- End of diff ----------------------- |