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 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: 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: 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: 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: 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 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 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: 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: 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-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-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-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 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-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: Alexander M. <key...@us...> - 2003-08-06 13:17:51
|
CVSROOT : /cvsroot/publicdnsadmin Module : publicdnsadmin Commit time: 2003-08-06 13:17:50 UTC Modified files: create_record.php create_template_record.php gfx_code.php update_record.php update_template_record.php docs/CHANGELOG docs/TODO lib/footer.php lib/header.php Log message: Author: Alexander Maassen <out...@ke...> Log message: Lotsa updates, now it finally works perfect on postgres too. Some Cosmetics and bumped version. ---------------------- diff included ---------------------- Index: publicdnsadmin/create_record.php diff -u publicdnsadmin/create_record.php:1.4 publicdnsadmin/create_record.php:1.5 --- publicdnsadmin/create_record.php:1.4 Thu Jul 17 05:02:27 2003 +++ publicdnsadmin/create_record.php Wed Aug 6 06:17:40 2003 @@ -45,7 +45,7 @@ if (!$prio or !is_numeric($prio)) { $prio = 10; } - } elseif ($prio) { + } elseif ($prio or !$prio or !is_numeric($prio)) { $prio = 0; } Index: publicdnsadmin/create_template_record.php diff -u publicdnsadmin/create_template_record.php:1.5 publicdnsadmin/create_template_record.php:1.6 --- publicdnsadmin/create_template_record.php:1.5 Thu Jul 17 05:02:27 2003 +++ publicdnsadmin/create_template_record.php Wed Aug 6 06:17:40 2003 @@ -43,7 +43,7 @@ if (!$prio or !is_numeric($prio)) { $prio = 10; } - } elseif (!$prio) { + } elseif (!$prio or !$prio or !is_numeric($prio)) { $prio = 0; } Index: publicdnsadmin/docs/CHANGELOG diff -u publicdnsadmin/docs/CHANGELOG:1.27 publicdnsadmin/docs/CHANGELOG:1.28 --- publicdnsadmin/docs/CHANGELOG:1.27 Wed Jul 23 01:57:10 2003 +++ publicdnsadmin/docs/CHANGELOG Wed Aug 6 06:17:40 2003 @@ -1,19 +1,12 @@ $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. -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. - - 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. +SiRVulcaN <sir...@si...> - 23/07/2003 - SQL Tweak. + - Released 1.2. +OUTsider <out...@ke...> - 03/08/2003 - Using ISO standard dates in CHANGELOG + (Let's agree that when a version gets release, we start with a fresh CHANGELOG) + - Bumped DEV version to 1.3 + - Made suport links open in new window. +OUTsider <out...@ke...> - 06/08/2003 - mysql does not support now()::abstime::int4, + thus gfxcheck was likely to fail. + - Fixed problem that some records/templates could not be updated + or created using postgres. This was coz prio was empty. Index: publicdnsadmin/docs/TODO diff -u publicdnsadmin/docs/TODO:1.13 publicdnsadmin/docs/TODO:1.14 --- publicdnsadmin/docs/TODO:1.13 Sat Jul 19 00:26:48 2003 +++ publicdnsadmin/docs/TODO Wed Aug 6 06:17:40 2003 @@ -1,2 +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. +- Make the mouseoverthingie mozilla proof as well. (sucky on Firebird) Index: publicdnsadmin/gfx_code.php diff -u publicdnsadmin/gfx_code.php:1.2 publicdnsadmin/gfx_code.php:1.3 --- publicdnsadmin/gfx_code.php:1.2 Wed Jun 18 03:26:58 2003 +++ publicdnsadmin/gfx_code.php Wed Aug 6 06:17:40 2003 @@ -31,7 +31,7 @@ $fontList = get_font_face_list(); unset($dFID); $dFID = rand(0,(count($fontList)-1)); // random available font face - $dbh->query("DELETE FROM gfxcodes WHERE expire<now()::abstime::int4"); + $dbh->query("DELETE FROM gfxcodes WHERE expire<".time()); $r = $dbh->query("SELECT code FROM gfxcodes WHERE crc='" . $_GET["crc"] . "'"); if ($o = $r->fetchRow()) { $code_gen = $o["code"]; Index: publicdnsadmin/lib/footer.php diff -u publicdnsadmin/lib/footer.php:1.6 publicdnsadmin/lib/footer.php:1.7 --- publicdnsadmin/lib/footer.php:1.6 Wed Jul 16 05:38:20 2003 +++ publicdnsadmin/lib/footer.php Wed Aug 6 06:17:40 2003 @@ -7,7 +7,7 @@ Distributed under the GPL license, see LICENSE for more information - $Id: footer.php,v 1.6 2003/07/16 12:38:20 sirvulcan Exp $ + $Id: footer.php,v 1.7 2003/08/06 13:17:40 key2peace 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="http://sourceforge.net/tracker/?func=add&group_id=78804&atid=554506">PublicDNSAdmin Bug Tracker</a>. + <a href="http://sourceforge.net/tracker/?func=add&group_id=78804&atid=554506" target="_new">PublicDNSAdmin Bug Tracker</a>. </td> </tr> </table> Index: publicdnsadmin/lib/header.php diff -u publicdnsadmin/lib/header.php:1.15 publicdnsadmin/lib/header.php:1.16 --- publicdnsadmin/lib/header.php:1.15 Wed Jul 23 01:57:10 2003 +++ publicdnsadmin/lib/header.php Wed Aug 6 06:17:40 2003 @@ -7,7 +7,7 @@ Distributed under the GPL license, see LICENSE for more information - $Id: header.php,v 1.15 2003/07/23 08:57:10 sirvulcan Exp $ + $Id: header.php,v 1.16 2003/08/06 13:17:40 key2peace Exp $ */ ?> @@ -66,12 +66,12 @@ 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>"; + echo "<a href=\"http://httpd.apache.org\" target=\"_new\"><img src=\"images/apache.gif\" border=0></a><br><br>"; + echo "<a href=\"http://www.php.net\" target=\"_new\"><img src=\"images/php.gif\" border=0></a><br><br>"; if (db_type() == "mysql") { - echo "<a href=\"http://www.mysql.com\"><img src=\"images/mysql.gif\" border=0></a><br>"; + echo "<a href=\"http://www.mysql.com\" target=\"_new\"><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 "<a href=\"http://www.postgresql.org\" target=\"_new\"><img src=\"images/pgsql.gif\" border=0></a><br>"; } echo "</center>"; ?> @@ -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.2</font> + <font face="verdana" size=1>Public DNS Administrator v1.3</font> </td></tr></table> Index: publicdnsadmin/update_record.php diff -u publicdnsadmin/update_record.php:1.4 publicdnsadmin/update_record.php:1.5 --- publicdnsadmin/update_record.php:1.4 Thu Jul 17 05:02:28 2003 +++ publicdnsadmin/update_record.php Wed Aug 6 06:17:40 2003 @@ -46,7 +46,7 @@ if (!$prio or !is_numeric($prio)) { $prio = 10; } - } elseif ($prio) { + } elseif ($prio or !$prio or !is_numeric($prio)) { $prio = 0; } Index: publicdnsadmin/update_template_record.php diff -u publicdnsadmin/update_template_record.php:1.4 publicdnsadmin/update_template_record.php:1.5 --- publicdnsadmin/update_template_record.php:1.4 Thu Jul 17 05:02:28 2003 +++ publicdnsadmin/update_template_record.php Wed Aug 6 06:17:40 2003 @@ -43,7 +43,7 @@ if (!$prio or !is_numeric($prio)) { $prio = 10; } - } elseif ($prio) { + } elseif ($prio or !$prio or !is_numeric($prio)) { $prio = 0; } ----------------------- End of diff ----------------------- |
From: Neil S. <sir...@us...> - 2003-08-12 09:20:55
|
CVSROOT : /cvsroot/publicdnsadmin Module : publicdnsadmin Commit time: 2003-08-12 09:07:02 UTC Modified files: edit_record.php edit_template_record.php functions.jss new_record.php new_template_record.php docs/CHANGELOG docs/TODO lib/header.php Log message: Author: SiRVulcaN <sir...@si...> Log message: - Disable prio field if a record type isnt MX. - deny loading publicdnsadmin index.php if config and term files are missing or permissions arnt correct. - added some things to TODO i had in a txt file. ---------------------- diff included ---------------------- Index: publicdnsadmin/docs/CHANGELOG diff -u publicdnsadmin/docs/CHANGELOG:1.28 publicdnsadmin/docs/CHANGELOG:1.29 --- publicdnsadmin/docs/CHANGELOG:1.28 Wed Aug 6 06:17:40 2003 +++ publicdnsadmin/docs/CHANGELOG Tue Aug 12 02:06:52 2003 @@ -10,3 +10,5 @@ thus gfxcheck was likely to fail. - Fixed problem that some records/templates could not be updated or created using postgres. This was coz prio was empty. +SiRVulcaN <sir...@si...> - 12/08/2003 - Disable prio field if a record type isnt MX. + - deny loading publicdnsadmin index.php if config and term files are missing Index: publicdnsadmin/docs/TODO diff -u publicdnsadmin/docs/TODO:1.14 publicdnsadmin/docs/TODO:1.15 --- publicdnsadmin/docs/TODO:1.14 Wed Aug 6 06:17:40 2003 +++ publicdnsadmin/docs/TODO Tue Aug 12 02:06:52 2003 @@ -1,3 +1,12 @@ - Some sort of maintenence news system (displayed on the main login page). - Syntax check records for validity to make it more fool proof. -- Make the mouseoverthingie mozilla proof as well. (sucky on Firebird) +- Make the mouseoverthingie mozilla proof as well. (sucky on Firebird) (working fine still for me -sirv) +- poweradmin record validation dns.inc.php +- use a error code system + -- client_message(CODE, TYPE); + - ERR_TYPE, ie ERR_INVPASS (invalid pass) + - TYPE as in "general", "error", "critical" etc, each type has diff types of output styles +- multilanguage, use a code based system like the error codes which read off a file, lang.XX.php, then combine errors into the language file + -- language table (language codes) "1" "English", users choose the code in config for default lang + - users can choose to use another lang when opening the main page +- install.php - databases + configuration Index: publicdnsadmin/edit_record.php diff -u publicdnsadmin/edit_record.php:1.6 publicdnsadmin/edit_record.php:1.7 --- publicdnsadmin/edit_record.php:1.6 Sat Jul 19 06:46:31 2003 +++ publicdnsadmin/edit_record.php Tue Aug 12 02:06:51 2003 @@ -38,7 +38,7 @@ } ?> -<form action="update_record.php?id=<?php echo $recordid; ?>" method="post"> +<form action="update_record.php?id=<?php echo $recordid; ?>" method="post" name="recform"> <table border="0" cellspacing="0" cellpadding="2"> <tr> <td><b>Record:</b></td> @@ -80,7 +80,11 @@ </tr> <tr> <td><b>Prio:</b></td> + <? if ($row["type"] != "MX") { ?> + <td><input type="text" name="prio" disabled="true" size="5" maxlength="11" value="<?php if ($row["prio"]) { echo htmlentities($row["prio"]); } ?>"></td> + <? } else { ?> <td><input type="text" name="prio" size="5" maxlength="11" value="<?php if ($row["prio"]) { echo htmlentities($row["prio"]); } ?>"></td> + <? } ?> </tr> <tr> <td><b>Content:</b></td> Index: publicdnsadmin/edit_template_record.php diff -u publicdnsadmin/edit_template_record.php:1.4 publicdnsadmin/edit_template_record.php:1.5 --- publicdnsadmin/edit_template_record.php:1.4 Fri Jul 18 08:14:23 2003 +++ publicdnsadmin/edit_template_record.php Tue Aug 12 02:06:52 2003 @@ -33,7 +33,7 @@ $record_name = preg_replace("/\.+$/", "", $record_name); ?> -<form action="update_template_record.php?id=<?php echo $recordid; ?>" method="post"> +<form action="update_template_record.php?id=<?php echo $recordid; ?>" method="post" name="recform"> <table border="0" cellspacing="0" cellpadding="2"> <tr> <td><b>Record:</b></td> @@ -63,7 +63,11 @@ </tr> <tr> <td><b>Prio:</b></td> + <? if ($row["type"] != "MX") { ?> + <td><input type="text" name="prio" disabled="true" size="5" maxlength="11" value="<?php if ($row["prio"]) { echo htmlentities($row["prio"]); } ?>"></td> + <? } else { ?> <td><input type="text" name="prio" size="5" maxlength="11" value="<?php if ($row["prio"]) { echo htmlentities($row["prio"]); } ?>"></td> + <? } ?> </tr> <tr> <td><b>Content:</b></td> Index: publicdnsadmin/functions.jss diff -u publicdnsadmin/functions.jss:1.3 publicdnsadmin/functions.jss:1.4 --- publicdnsadmin/functions.jss:1.3 Sat Jul 19 06:46:31 2003 +++ publicdnsadmin/functions.jss Tue Aug 12 02:06:52 2003 @@ -10,6 +10,16 @@ } else { textObj.data = "@"; } + + for(var e=0;e<document.recform.elements.length;e++) { + currentField = document.recform.elements[e]; + if ((currentField.name == "prio") && (objchange == "MX")) { + document.recform.elements["prio"].disabled = false; + } else if ((currentField.name == "prio") && (objchange != "MX")) { + document.recform.elements["prio"].disabled = true; + document.recform.elements["prio"].value = "0"; + } + } } function checkCount() Index: publicdnsadmin/lib/header.php diff -u publicdnsadmin/lib/header.php:1.16 publicdnsadmin/lib/header.php:1.17 --- publicdnsadmin/lib/header.php:1.16 Wed Aug 6 06:17:40 2003 +++ publicdnsadmin/lib/header.php Tue Aug 12 02:06:52 2003 @@ -7,7 +7,7 @@ Distributed under the GPL license, see LICENSE for more information - $Id: header.php,v 1.16 2003/08/06 13:17:40 key2peace Exp $ + $Id: header.php,v 1.17 2003/08/12 09:06:52 sirvulcan Exp $ */ ?> @@ -83,3 +83,33 @@ </td></tr><tr><td align="right"> <font face="verdana" size=1>Public DNS Administrator v1.3</font> </td></tr></table> + + <? + + $config_check = 1; + $terms_check = 1; + $path = realpath("."); + + if (file_exists("$path/lib/config.php")) { + if (!is_readable("$path/lib/config.php")) { + $config_check = 0; + } + } else { + $config_check = 0; + } + + if (file_exists("$path/lib/terms.php")) { + if (!is_readable("$path/lib/terms.php")) { + $config_check = 0; + } + } else { + $config_check = 0; + } + + if (($config_check == 0) || ($terms_check = 0)) { + echo "<p class=\"error\">config.php and/or terms.php cannot be accessed, please make sure they exist and are readable by the webserver"; + require("lib/footer.php"); + die(); + } + + ?> Index: publicdnsadmin/new_record.php diff -u publicdnsadmin/new_record.php:1.5 publicdnsadmin/new_record.php:1.6 --- publicdnsadmin/new_record.php:1.5 Fri Jul 18 08:14:23 2003 +++ publicdnsadmin/new_record.php Tue Aug 12 02:06:52 2003 @@ -31,7 +31,7 @@ global $default_ttl; ?> -<form action="create_record.php?zone=<?php echo $zoneid; ?>" method="post"> +<form action="create_record.php?zone=<?php echo $zoneid; ?>" method="post" name="recform"> <table border="0" cellspacing="0" cellpadding="2"> <tr> <td><b>Record:</b></td> @@ -57,7 +57,11 @@ </tr> <tr> <td><b>Prio:</b></td> + <? if ($row["type"] != "MX") { ?> + <td><input type="text" name="prio" disabled="true" size="5" maxlength="11" value=""></td> + <? } else { ?> <td><input type="text" name="prio" size="5" maxlength="11" value=""></td> + <? } ?> </tr> <tr> <td><b>Content:</b></td> Index: publicdnsadmin/new_template_record.php diff -u publicdnsadmin/new_template_record.php:1.4 publicdnsadmin/new_template_record.php:1.5 --- publicdnsadmin/new_template_record.php:1.4 Fri Jul 18 08:14:23 2003 +++ publicdnsadmin/new_template_record.php Tue Aug 12 02:06:52 2003 @@ -29,7 +29,7 @@ global $default_ttl; ?> -<form action="create_template_record.php?zone=<?php echo $zoneid; ?>" method="post"> +<form action="create_template_record.php?zone=<?php echo $zoneid; ?>" method="post" name="recform"> <table border="0" cellspacing="0" cellpadding="2"> <tr> <td><b>Record:</b></td> @@ -55,7 +55,11 @@ </tr> <tr> <td><b>Prio:</b></td> + <? if ($row["type"] != "MX") { ?> + <td><input type="text" name="prio" disabled="true" size="5" maxlength="11" value=""></td> + <? } else { ?> <td><input type="text" name="prio" size="5" maxlength="11" value=""></td> + <? } ?> </tr> <tr> <td><b>Content:</b></td> ----------------------- End of diff ----------------------- |
From: Neil S. <sir...@us...> - 2003-08-12 09:34:14
|
CVSROOT : /cvsroot/publicdnsadmin Module : publicdnsadmin Commit time: 2003-08-12 09:11:41 UTC Modified files: docs/CHANGELOG Added files: data/index.html Log message: Author: SiRVulcaN <sir...@si...> Log message: - Added index.html into the data dir to prevent the public from seeing the backups. ---------------------- diff included ---------------------- Index: publicdnsadmin/data/index.html diff -u /dev/null publicdnsadmin/data/index.html:1.1 --- /dev/null Tue Aug 12 02:11:41 2003 +++ publicdnsadmin/data/index.html Tue Aug 12 02:11:30 2003 @@ -0,0 +1 @@ +you shouldnt be here :) Index: publicdnsadmin/docs/CHANGELOG diff -u publicdnsadmin/docs/CHANGELOG:1.29 publicdnsadmin/docs/CHANGELOG:1.30 --- publicdnsadmin/docs/CHANGELOG:1.29 Tue Aug 12 02:06:52 2003 +++ publicdnsadmin/docs/CHANGELOG Tue Aug 12 02:11:30 2003 @@ -11,4 +11,5 @@ - Fixed problem that some records/templates could not be updated or created using postgres. This was coz prio was empty. SiRVulcaN <sir...@si...> - 12/08/2003 - Disable prio field if a record type isnt MX. - - deny loading publicdnsadmin index.php if config and term files are missing + - Deny loading publicdnsadmin index.php if config and term files are missing. + - Added index.html into the data dir to prevent the public from seeing the backups. ----------------------- End of diff ----------------------- |
From: Alexander M. <key...@us...> - 2003-08-12 12:27:25
|
CVSROOT : /cvsroot/publicdnsadmin Module : publicdnsadmin Commit time: 2003-08-12 12:27:24 UTC Modified files: data/index.html docs/CHANGELOG Added files: data/index.php docs/index.html docs/index.php images/index.html images/index.php lib/index.html lib/index.php Log message: Author: Alexander Maassen <out...@ke...> Log message: Modified index.html to use proper html code and redirecting Made copy of that file as index.php Copied index.(html|php) into docs/images/lib ---------------------- diff included ---------------------- Index: publicdnsadmin/data/index.html diff -u publicdnsadmin/data/index.html:1.1 publicdnsadmin/data/index.html:1.2 --- publicdnsadmin/data/index.html:1.1 Tue Aug 12 02:11:30 2003 +++ publicdnsadmin/data/index.html Tue Aug 12 05:27:13 2003 @@ -1 +1,9 @@ -you shouldnt be here :) +<html> + <head> + <title>Access Denied</title> + <meta http-equiv="REFRESH" content="0; url=../index.php"> + </head> + <body> + you shouldnt be here :) + </body> +</html> Index: publicdnsadmin/data/index.php diff -u /dev/null publicdnsadmin/data/index.php:1.1 --- /dev/null Tue Aug 12 05:27:24 2003 +++ publicdnsadmin/data/index.php Tue Aug 12 05:27:13 2003 @@ -0,0 +1,9 @@ +<html> + <head> + <title>Access Denied</title> + <meta http-equiv="REFRESH" content="0; url=../index.php"> + </head> + <body> + you shouldnt be here :) + </body> +</html> Index: publicdnsadmin/docs/CHANGELOG diff -u publicdnsadmin/docs/CHANGELOG:1.30 publicdnsadmin/docs/CHANGELOG:1.31 --- publicdnsadmin/docs/CHANGELOG:1.30 Tue Aug 12 02:11:30 2003 +++ publicdnsadmin/docs/CHANGELOG Tue Aug 12 05:27:13 2003 @@ -13,3 +13,6 @@ SiRVulcaN <sir...@si...> - 12/08/2003 - Disable prio field if a record type isnt MX. - Deny loading publicdnsadmin index.php if config and term files are missing. - Added index.html into the data dir to prevent the public from seeing the backups. +OUTsider <out...@ke...> - 12/08/2003 - Modified index.html to redirect clients to mainpage + - Copied index.html as index.php just in case. + - Added index.(html|php) in images/docs/lib Index: publicdnsadmin/docs/index.html diff -u /dev/null publicdnsadmin/docs/index.html:1.1 --- /dev/null Tue Aug 12 05:27:24 2003 +++ publicdnsadmin/docs/index.html Tue Aug 12 05:27:13 2003 @@ -0,0 +1,9 @@ +<html> + <head> + <title>Access Denied</title> + <meta http-equiv="REFRESH" content="0; url=../index.php"> + </head> + <body> + you shouldnt be here :) + </body> +</html> Index: publicdnsadmin/docs/index.php diff -u /dev/null publicdnsadmin/docs/index.php:1.1 --- /dev/null Tue Aug 12 05:27:24 2003 +++ publicdnsadmin/docs/index.php Tue Aug 12 05:27:13 2003 @@ -0,0 +1,9 @@ +<html> + <head> + <title>Access Denied</title> + <meta http-equiv="REFRESH" content="0; url=../index.php"> + </head> + <body> + you shouldnt be here :) + </body> +</html> Index: publicdnsadmin/images/index.html diff -u /dev/null publicdnsadmin/images/index.html:1.1 --- /dev/null Tue Aug 12 05:27:24 2003 +++ publicdnsadmin/images/index.html Tue Aug 12 05:27:13 2003 @@ -0,0 +1,9 @@ +<html> + <head> + <title>Access Denied</title> + <meta http-equiv="REFRESH" content="0; url=../index.php"> + </head> + <body> + you shouldnt be here :) + </body> +</html> Index: publicdnsadmin/images/index.php diff -u /dev/null publicdnsadmin/images/index.php:1.1 --- /dev/null Tue Aug 12 05:27:24 2003 +++ publicdnsadmin/images/index.php Tue Aug 12 05:27:13 2003 @@ -0,0 +1,9 @@ +<html> + <head> + <title>Access Denied</title> + <meta http-equiv="REFRESH" content="0; url=../index.php"> + </head> + <body> + you shouldnt be here :) + </body> +</html> Index: publicdnsadmin/lib/index.html diff -u /dev/null publicdnsadmin/lib/index.html:1.1 --- /dev/null Tue Aug 12 05:27:24 2003 +++ publicdnsadmin/lib/index.html Tue Aug 12 05:27:14 2003 @@ -0,0 +1,9 @@ +<html> + <head> + <title>Access Denied</title> + <meta http-equiv="REFRESH" content="0; url=../index.php"> + </head> + <body> + you shouldnt be here :) + </body> +</html> Index: publicdnsadmin/lib/index.php diff -u /dev/null publicdnsadmin/lib/index.php:1.1 --- /dev/null Tue Aug 12 05:27:24 2003 +++ publicdnsadmin/lib/index.php Tue Aug 12 05:27:14 2003 @@ -0,0 +1,9 @@ +<html> + <head> + <title>Access Denied</title> + <meta http-equiv="REFRESH" content="0; url=../index.php"> + </head> + <body> + you shouldnt be here :) + </body> +</html> ----------------------- End of diff ----------------------- |
From: Neil S. <sir...@us...> - 2003-08-12 23:19:34
|
CVSROOT : /cvsroot/publicdnsadmin Module : publicdnsadmin Commit time: 2003-08-12 22:44:35 UTC Modified files: forgotten_pass.php signup.php docs/CHANGELOG Log message: Author: SiRVulcaN <sir...@si...> Log message: - Fixed up some hardcoded addresses in signup.php and forgotten_pass.php ---------------------- diff included ---------------------- Index: publicdnsadmin/docs/CHANGELOG diff -u publicdnsadmin/docs/CHANGELOG:1.31 publicdnsadmin/docs/CHANGELOG:1.32 --- publicdnsadmin/docs/CHANGELOG:1.31 Tue Aug 12 05:27:13 2003 +++ publicdnsadmin/docs/CHANGELOG Tue Aug 12 15:44:25 2003 @@ -16,3 +16,4 @@ OUTsider <out...@ke...> - 12/08/2003 - Modified index.html to redirect clients to mainpage - Copied index.html as index.php just in case. - Added index.(html|php) in images/docs/lib +SiRVulcaN <sir...@si...> - 13/08/2003 - Fixed up some hardcoded addresses in signup.php and forgotten_pass.php Index: publicdnsadmin/forgotten_pass.php diff -u publicdnsadmin/forgotten_pass.php:1.1.1.1 publicdnsadmin/forgotten_pass.php:1.2 --- publicdnsadmin/forgotten_pass.php:1.1.1.1 Wed Apr 16 00:19:04 2003 +++ publicdnsadmin/forgotten_pass.php Tue Aug 12 15:44:24 2003 @@ -26,9 +26,9 @@ $newpass = time() * rand(0,100); $md5_pass = md5($newpass); - $fromaddy = "dns...@li..."; - $subject = "Requested Linux-Boxen DNS Admin Password"; - $content = "Your password for http://dnsadmin.linux-boxen.org is: $newpass. Please login and change it ASAP.<Br><br>Linux-Boxen DNS Admin"; + $fromaddy = $contact_addy; + $subject = "Requested PublicDNSAdmin Password"; + $content = "Your password for $site_address is: $newpass. Please login and change it ASAP.<br><br>DNS Administrator"; $headers .= "MIME-Version: 1.0\r\n"; $headers .= "Content-type: text/html; charset=iso-8859-1\r\n"; @@ -36,7 +36,7 @@ $headers .= "Reply-To: ".$fromaddy." <".$fromaddy.">\r\n"; $headers .= "X-Priority: 1\r\n"; $headers .= "X-MSMail-Priority: High\r\n"; - $headers .= "X-Mailer: Linux-Boxen Networks HTML-Mailer v1.0"; + $headers .= "X-Mailer: PublicDNSAdmin Mailer v1.0"; mail($dbemail, $subject, $content, $headers); $dbh->query("UPDATE users SET password = '$md5_pass' WHERE username='$dbuser'"); Index: publicdnsadmin/signup.php diff -u publicdnsadmin/signup.php:1.4 publicdnsadmin/signup.php:1.5 --- publicdnsadmin/signup.php:1.4 Thu Jun 19 02:43:50 2003 +++ publicdnsadmin/signup.php Tue Aug 12 15:44:24 2003 @@ -154,7 +154,7 @@ $exprecord = explode("\t", $nameservdata[$u]); $nserv = substr("$exprecord[5]", 0, -2); if (sizeof($exprecord) == 6) { - if ((!strcasecmp($nserv,"ns1.linux-boxen.org")) ||(!strcasecmp($nserv[5],"ns2.linux-boxen.org"))) { + if ((!strcasecmp($nserv,$ns1addy)) ||(!strcasecmp($nserv[5],$ns2addy))) { $nameservchk = 1; } } @@ -162,7 +162,7 @@ $u++; } while ($u < sizeof($nameservdata)); if ($nameservchk == 0) { - echo "<p class=\"error\">$domain's Nameservers Do Not Point To ns1.linux-boxen.org or ns2.linux-boxen.org</p>"; + echo "<p class=\"error\">$domain's Nameservers Do Not Point To $ns1addy or $ns2addy</p>"; } } } @@ -238,9 +238,13 @@ echo "</p>\n"; // send email - $fromaddy = "dns...@li..."; - $subject = "New Linux-Boxen DNS Admin Account Created"; - $content = "You are now registered with Linux-Boxen DNSAdmin (http://dnsadmin.linux-boxen.org)<br><br>Username: $username<Br>Password: $password"; + + $accsubject = "New PublicDNSAdmin Account Created"; + $acccontent = "You are now registered with PublicDNSAdmin ($site_address)<br><br>Username: $username<Br>Password: $password"; + + $secondaddy = $contact_addy; + $secondsubject = "$username DNS Signup Complete"; + $secondcontent = "$username ($name) - ($company) has successfully signed up for DNS hosting."; $headers .= "MIME-Version: 1.0\r\n"; $headers .= "Content-type: text/html; charset=iso-8859-1\r\n"; @@ -248,13 +252,9 @@ $headers .= "Reply-To: ".$fromaddy." <".$fromaddy.">\r\n"; $headers .= "X-Priority: 1\r\n"; $headers .= "X-MSMail-Priority: High\r\n"; - $headers .= "X-Mailer: Linux-Boxen Networks HTML-Mailer v1.0"; + $headers .= "X-Mailer: PublicDNSAdmin Mailer v1.0"; - mail($dbemail, $subject, $content, $headers); - - $secondaddy = "ma...@li..."; - $secondcontent = "$username ($name) - ($company) has successfully signed up for DNS hosting. Client password is $password. DO NOT GIVE OUT"; - $secondsubject = "$username DNS Signup Complete"; + mail($dbemail, $accsubject, $acccontent, $headers); mail($secondaddy, $secondsubject, $secondcontent, $headers); } else { @@ -269,7 +269,7 @@ <tr><td>Real Name:</td><td><input type="text" name="realname" size="40" maxlength="40"></td><td>40 Chars Max</td></tr> <tr><td>Company:</td><td><input type="text" name="company" size="40" maxlength="40"></td><td>40 Chars Max</td></tr> <tr><td>Domains:</td><Td><textarea rows="5" cols="40" name="ldomains"></textarea></td><td>1 Domain Per Line</td></tr> - <tr><td></td><td colspan="2">NOTE: Each Domain must use ns1.linux-boxen.org and ns2.linux-boxen.org for its nameservers, signup will be denied if the domains dont match to ns1.linux-boxen.org and ns2.linux-boxen.org</td></tr> + <? echo "<tr><td></td><td colspan=\"2\">NOTE: Each Domain must use $ns1addy and $ns2addy for its nameservers, signup will be denied if the domains dont match to $ns1addy and $ns2addy</td></tr>"; ?> <? if ($SHOW_GFXUSRCHK && $NEWUSERS_GFXCHECK) { ----------------------- End of diff ----------------------- |
From: Neil S. <sir...@us...> - 2003-08-13 02:53:02
|
CVSROOT : /cvsroot/publicdnsadmin Module : publicdnsadmin Commit time: 2003-08-13 02:47:23 UTC Modified files: index.php login.php docs/CHANGELOG docs/TODO lib/config.php-dist lib/header.php Added files: language/index.html language/index.php language/lang-english.php Log message: Author: SiRVulcaN <sir...@si...> Log message: - Added in first stage of multilanguage support. ---------------------- diff included ---------------------- Index: publicdnsadmin/docs/CHANGELOG diff -u publicdnsadmin/docs/CHANGELOG:1.32 publicdnsadmin/docs/CHANGELOG:1.33 --- publicdnsadmin/docs/CHANGELOG:1.32 Tue Aug 12 15:44:25 2003 +++ publicdnsadmin/docs/CHANGELOG Tue Aug 12 19:47:13 2003 @@ -17,3 +17,4 @@ - Copied index.html as index.php just in case. - Added index.(html|php) in images/docs/lib SiRVulcaN <sir...@si...> - 13/08/2003 - Fixed up some hardcoded addresses in signup.php and forgotten_pass.php + - Added in first stage of multilanguage support. Index: publicdnsadmin/docs/TODO diff -u publicdnsadmin/docs/TODO:1.15 publicdnsadmin/docs/TODO:1.16 --- publicdnsadmin/docs/TODO:1.15 Tue Aug 12 02:06:52 2003 +++ publicdnsadmin/docs/TODO Tue Aug 12 19:47:13 2003 @@ -7,6 +7,6 @@ - ERR_TYPE, ie ERR_INVPASS (invalid pass) - TYPE as in "general", "error", "critical" etc, each type has diff types of output styles - multilanguage, use a code based system like the error codes which read off a file, lang.XX.php, then combine errors into the language file - -- language table (language codes) "1" "English", users choose the code in config for default lang - - users can choose to use another lang when opening the main page + > First Stage Complete. + - Adjust all files to use _VARS from the language files instead of the sentences/words. - install.php - databases + configuration Index: publicdnsadmin/index.php diff -u publicdnsadmin/index.php:1.8 publicdnsadmin/index.php:1.9 --- publicdnsadmin/index.php:1.8 Sat Jul 19 06:46:31 2003 +++ publicdnsadmin/index.php Tue Aug 12 19:47:13 2003 @@ -154,6 +154,29 @@ <td><b>Password:</b></td> <td><input type="password" name="password" size="25" maxlength="15" value=""></td> </tr> +<tr><td> +<? +echo "<b>Language:</b></td><td><select name='language'>"; +$handle=opendir('language'); +while ($file = readdir($handle)) { + if (ereg("^lang\-(.+)\.php", $file, $matches)) { + $langFound = $matches[1]; + $languageslist .= "$langFound "; + } +} +closedir($handle); +$languageslist = explode(" ", $languageslist); +sort($languageslist); +for ($i=0; $i < sizeof($languageslist); $i++) { + if($languageslist[$i]!="") { + echo "<option name='language' value='$languageslist[$i]' "; + if($languageslist[$i]==$language) echo "selected"; + echo ">".ucfirst($languageslist[$i])."\n"; + } +} +echo "</select></td>" +?> +</tr> <? if ($SHOW_GFXUSRCHK && $LOGIN_GFXCHECK) { ?> Index: publicdnsadmin/language/index.html diff -u /dev/null publicdnsadmin/language/index.html:1.1 --- /dev/null Tue Aug 12 19:47:23 2003 +++ publicdnsadmin/language/index.html Tue Aug 12 19:47:13 2003 @@ -0,0 +1,9 @@ +<html> + <head> + <title>Access Denied</title> + <meta http-equiv="REFRESH" content="0; url=../index.php"> + </head> + <body> + you shouldnt be here :) + </body> +</html> Index: publicdnsadmin/language/index.php diff -u /dev/null publicdnsadmin/language/index.php:1.1 --- /dev/null Tue Aug 12 19:47:23 2003 +++ publicdnsadmin/language/index.php Tue Aug 12 19:47:13 2003 @@ -0,0 +1,9 @@ +<html> + <head> + <title>Access Denied</title> + <meta http-equiv="REFRESH" content="0; url=../index.php"> + </head> + <body> + you shouldnt be here :) + </body> +</html> Index: publicdnsadmin/language/lang-english.php diff -u /dev/null publicdnsadmin/language/lang-english.php:1.1 --- /dev/null Tue Aug 12 19:47:23 2003 +++ publicdnsadmin/language/lang-english.php Tue Aug 12 19:47:13 2003 @@ -0,0 +1,237 @@ +<? + +/***************************************************************************/ +/* Public DNS Administator (English Language File) */ +/* Translator: PublicDNSAdmin Team <http://publicdnsadmin.sourceforge.net> */ +/* */ +/* Distributed under the GPL license, see LICENSE for */ +/* more information */ +/* */ +/* ======================================================================= */ +/* */ +/* If you made a translation, please send it to sir...@si... */ +/* */ +/* You need to change the second quoted phrase, not the capital one! */ +/* */ +/* If you need to use double quotes (") remember to add a backslash (\), */ +/* so your entry will look like: This is \"double quoted\" text. */ +/* And, if you use HTML code, please double check it. */ +/* */ +/***************************************************************************/ + + +define("_OCCURANCES","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"); +define("_REGGEDAS","You are now registered as"); +define("_EMAILDETAILS","a email has been sent containing your details"); +define("_REGGEDWITH","You are now registered with PublicDNSAdmin"); +define("_BRUSERNAME","<br><br>Username:"); +define("_BRPASSWORD","<Br>Password:"); +define("_PASSWORDFOR","Your password for"); +define("_IS","is"); +define("_LOGINANDCHANGE","Please login and change it ASAP.<br><br>DNS Administrator"); +define("_EACHDOMAIN","NOTE: Each Domain must use "); +define("_AND","and"); +define("_FORITSNS","its nameservers, signup will be denied if the domains dont match to"); +define("_MYDOMAINS","My domains"); +define("_CRITERIA","Criteria"); +define("_SEARCH","Search"); +define("_UNKNOWN","Unknown"); +define("_DELZONE","Delete zone"); +define("_WHOISDOM","WHOIS Domain"); +define("_NOZONES","No zones available"); +define("_INVLOGINGFX","Login failed: invalid username/password/gfx code"); +define("_INVLOGIN","Login failed: invalid username/password"); +define("_LOGGEDOUT","You have been logged out"); +define("_USERNAME","Username"); +define("_PASSWORD","Password"); +define("_SECCHECK","Security Check"); +define("_RESET","Reset"); +define("_LOGIN","Login"); +define("_RECORD","Record"); +define("_TYPE","Type"); +define("_PRIO","Prio"); +define("_CONTENT","Content"); +define("_TTL","TTL"); +define("_TEMPLATENOTFND","Template not found"); +define("_DELTEMPLATE","Delete template"); +define("_ALLRECDEL","and all records was successfully deleted"); +define("_WISHTODELTEMPLATE","Are you sure you wish to delete the template"); +define("_YES","Yes"); +define("_NO","No"); +define("_EDITTEMPLATE","Edit template"); +define("_NEWRECORD","new record"); +define("_DELMULTIRECORDS","delete multiple records"); +define("_DELRECORD","delete record"); +define("_EDITRECORD","edit record"); +define("_EDITDOMAIN","Edit domain"); +define("_USERADMIN","User administration"); +define("_USERLIST","user list"); +define("_NEWUSER","new user"); +define("_EDITUSER","edit user"); +define("_DELETEDOM","Delete domain"); +define("_THEDOMAIN","The domain"); +define("_ANDALLRECSDEL","and all records was successfully deleted"); +define("_WISHTODELTHEDOM","Are you sure you wish to delete the domain"); +define("_NOPERMSDOMAIN","You don't have permission to delete this domain"); +define("_DELETEUSER","Delete user"); +define("_FTUSERDONTEXIST","Fatal Error, User Does Not Exist Most Likely"); +define("_ANDALLDOMRECDEL","and all their domains/records were successfully deleted"); +define("_WISHTODEL","Are you sure you wish to delete"); +define("_EDITSETTINGS","Edit Settings"); +define("_RECSUCESDEL","The record was successfully deleted"); +define("_PROCEED","Proceed"); +define("_NEWTEMPLATE","New template"); +define("_NEWRECORD","New record"); +define("_NAME","Name"); +define("_CREATE","Create"); +define("_FORGOTTENPASS","Forgotten Pass"); +define("_INVUSEROREMAIL","Invalid username or email address"); +define("_EMAILADDRESS","Email Address"); +define("_ONEINRECORDS","The one we have in records"); +define("_EMAILSENT","Email Has Been Sent"); +define("_WISHTODELTHISREC","Are you sure you wish to delete the record"); +define("_NOPERMSDELREC","You don't have permission to delete this record"); +define("_NOPERMSEDITDOM","You don't have permission to edit this domain"); +define("_ZONEUSERS","Zone users"); +define("_NOUSERSACCDOM","No users have access to this domain"); +define("_ZONENOTFND","Zone not found"); +define("_STATISTICS","Statistics"); +define("_DOMAINSHOSTED","Domains Hosted"); +define("_TOTALRECORDS","Total Records"); +define("_TOTALUSERS","Total Users"); +define("_EDITDOMAIN","Edit domain"); +define("_SHOWZONE","Show zone users"); +define("_GRANTUSERACC","Grant user access"); +define("_PRIORITY","Priority"); +define("_TTL","TTL"); +define("_DEL","Del"); +define("_TEMPRECNOTFND","Template/record not found"); +define("_ALLRECNOTDEL","Some records could not be deleted, please check make sure you have permission to access/delete them"); +define("_SOME","Some"); +define("_ALL","All"); +define("_SELECTTEMPDEL","selected template records were successfully deleted"); +define("_TOPLEVELDOMNOTSUP","Sorry but this top level domain is not \(yet\) supported"); +define("_CONNECTINGTO","Connecting to "); +define("_TIMEDOUT","Timed-out connecting to"); +define("_PORT","port"); +define("_WHOISSERVER","Whois Server"); +define("_NOMATCH","NOT FOUND: No match for"); +define("_AMBIGUOUS","Ambiguous query, multiple matches for"); +define("_DEFERRED","Deferred to specific whois server"); +define("_DOMIDNOTFND","Domain id not found"); +define("_ALREADYHASUSERNAME","You Already Have A Username"); +define("_SIGNUPSDISABLED","New user signups are disabled, see an Administrator for further info"); +define("_DIDNTAGREETERMS","You Didnt Agree To The Terms and Conditions"); +define("_PASSWORDSDONTMATCH","The Passwords Entered Dont Match"); +define("_INVPASSWORD","Invalid password. May only contain characters a to z, dash, and numbers"); +define("_INVUSERNAME","Invalid username. Can only contain characters a to z and dash"); +define("_INVEMAILADDY","Invalid Email Address"); +define("_INVGFXCODE","Invalid GFX Code"); +define("_USERNAMEXISTS","Username Already Exists"); +define("_NAMESERVERSDONTPOINT","Nameservers Do Not Point To"); +define("_OR","or"); +define("_DOMAINEXISTS","The following domains already exists"); +define("_NEWACCOUNTCREATED","New PublicDNSAdmin Account Created"); +define("_DOMAINSADDEDIN","The following domains have been added in your account"); +define("_SOMEDOMAINSINVALID","One or more of the domains were invalid"); +define("_REQUESTEDPASS","Requested PublicDNSAdmin Password"); +define("_CONFIRM","Confirm"); +define("_CONFIRMPASSWORD","Confirm password"); +define("_REALNAME","Real Name"); +define("_COMPANY","Company"); +define("_DOMAINS","Domains"); +define("_DOMAIN","Domain"); +define("_TEMPLATE","Template"); +define("_CREATE","Create"); +define("_PERMISSIONS","Permissions"); +define("_SUPERUSER","Superuser"); +define("_NEWDOMAINS","New domains"); +define("_NEWTEMPLAYES","New templates"); +define("_EDITOWNDOMS","Edit own domains"); +define("_EDITOTHERDOMS","Edit other domains"); +define("_EDITTEMPS","Edit templates"); +define("_DELOWNDOMS","Delete own domains"); +define("_DELOTHERDOMS","Delete other domains"); +define("_DELTEMPS","Delete templates"); +define("_SIGNUPCOMPLETE","PublicDNSAdmin Signup Complete"); +define("_SUCESSSIGNEDUP","has successfully signed up for DNS hosting"); +define("_DOYOUAGREE","Do You Agree To The"); +define("_TERMSANDCOND","Terms And Conditions"); +define("_DELETEUSER","Delete User"); +define("_NOUSERSFND","No users found"); +define("_GRANTZONEACCESS","Grant zone access"); +define("_THEUSER","The user"); +define("_GRANTEDACCESS","was granted access to the domain"); +define("_USERNOTFND","User not found"); +define("_NOTEMPNAMEDEFINED","No template name defined"); +define("_TEMPLATEEXISTS","Another template with the same name already exists"); +define("_TEMPLATEUPDATED","The template was updated"); +define("_MYTEMPLATES","My templates"); +define("_DELTEMPLATE","Delete template"); +define("_NOTEMPLATESAVAL","No templates available"); +define("_INVALIDPOINTTYPE","Invalid pointer type"); +define("_INVALIDPOINTCONT","Invalid content for pointer type"); +define("_INVALIDPOINTREC","Invalid record data for pointer type"); +define("_NOPERMSEDITDOM","You don't have permission to edit this domain"); +define("_ZONERECNOTFND","Zone/record not found"); +define("_BULKREG","Bulk registration"); +define("_ONEDOMPERLINE","Type in one domain on each line"); +define("_NOTEMPSAVAIL","No templates are available. Please create a template"); +define("_BACKUPCREATED","The backup was successfully created. Click here to download"); +define("_TEMPRECNOTFND","Template/record not found"); +define("_DOMAINSEARCH","Domain search"); +define("_REVOKEZONEACC","Revoke zone access"); +define("_ACCTODOM","Access to the domain"); +define("_WASREMOVED","was removed from"); +define("_SUREYOUWANTTOREV","Are you sure you want to revoke access to"); +define("_FROM","from"); +define("_SELECTUSERNODOMACC","The selected user does not have access to this domain"); +define("_USERNOTFND","User not found"); +define("_PAGEDISABLED","Page is disabled"); +define("_GDLIBUNAVAIL","GD Library not present"); +define("_GRANTZONEACC","Grant zone access"); +define("_GRANT","Grant"); +define("_ZONE","Zone"); +define("_USER","User"); +define("_CANTEDITASUPERUSER","You don't have the permission to edit a superuser"); +define("_PASSESDONTMATCH","The passwords did not match"); +define("_FIELDSMISSING","Some fields were missing. You must enter both name and e-mail"); +define("_SETTINGSUPDATED","Settings Successfully Updated"); +define("_IDSDONTMATCH","ID's do not match, dont try and cheat the system"); +define("_DOMAINSINVALID","One or more of the domains were invalid"); +define("_DOMAINSEXIST","The following domains already exists"); +define("_DOMAINSADDED","The following domains was added"); +define("_TEMPLATEUNAVAIL","The specified template does not exist"); +define("_NODOMAINS","No domain names entered"); +define("_MISSINGINVDOM","Missing or invalid domain name"); +define("_ZONECREATED","The zone was successfully created. Click"); +define("_HERE","here"); +define("_TOEDIT","to edit"); +define("_FIELDSMISSINGFILL","Some fields were missing. You must fill out the username, name, email and password-fields"); +define("_USERCREATED","The user was successfully created"); +define("_TEMPLATECREATED","The template was successfully created"); +define("_DOSNOTRESOLVE","does not resolve to"); +define("_LICENSEDUNDER","Licensed Under"); +define("_REPORTBUGS","Report Bugs To"); +define("_DBUNAVAIL","Unable to connect to database"); +define("_ACCESSDENIED","Access denied"); +define("_NOPERMSFORTASK","You don't have permission to perform the chosen task"); +define("_MYDOMAINS","My domains"); +define("_MYTEMPLATES","My templates"); +define("_NEWDOMAIN","New domain"); +define("_NEWTEMPLATE","New template"); +define("_DBBACKUP","DB backup"); +define("_SETTINGS","Settings"); +define("_NS1STATS","NS1 stats"); +define("_NS2STATS","NS2 stats"); +define("_LOGOUT","Log out"); +define("_LOGIN","Login"); +define("_SIGNUP","Signup"); +define("_FORGOTPASS","Forgotten Pass"); +define("_STATISTICS","Statistics"); +define("_TERMS","Terms"); +define("_CONTACT","Contact"); +define("_CONFIGTERMSAVAIL","config.php and/or terms.php cannot be accessed, please make sure they exist and are readable by the webserver"); +define("_LANGUAGE","Language"); + +?> Index: publicdnsadmin/lib/config.php-dist diff -u publicdnsadmin/lib/config.php-dist:1.11 publicdnsadmin/lib/config.php-dist:1.12 --- publicdnsadmin/lib/config.php-dist:1.11 Sat Jul 19 06:46:31 2003 +++ publicdnsadmin/lib/config.php-dist Tue Aug 12 19:47:13 2003 @@ -7,7 +7,7 @@ Distributed under the GPL license, see LICENSE for more information - $Id: config.php-dist,v 1.11 2003/07/19 13:46:31 sirvulcan Exp $ + $Id: config.php-dist,v 1.12 2003/08/13 02:47:13 sirvulcan Exp $ */ /* @@ -50,6 +50,9 @@ /* Restrict new user signups, admins can still add users via the interface when logged in */ $allow_newusers = 1; + +/* Default interface language (must exist in language/ dir, lang-NAME.php */ +$default_lang = "english"; /* 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.17 publicdnsadmin/lib/header.php:1.18 --- publicdnsadmin/lib/header.php:1.17 Tue Aug 12 02:06:52 2003 +++ publicdnsadmin/lib/header.php Tue Aug 12 19:47:13 2003 @@ -7,7 +7,7 @@ Distributed under the GPL license, see LICENSE for more information - $Id: header.php,v 1.17 2003/08/12 09:06:52 sirvulcan Exp $ + $Id: header.php,v 1.18 2003/08/13 02:47:13 sirvulcan Exp $ */ ?> @@ -26,6 +26,28 @@ <script language="javascript" src="functions.jss"></script> </head> <body> + +<? +$language = $_SESSION[_LANGUAGE]; +if ($language == NULL) { + $language = $default_lang; +} + +$curpath = realpath("."); +require("$curpath/lib/config.php"); +if ((file_exists("$curpath/language/lang-" . $language . ".php")) && (is_readable("$curpath/language/lang-" . $language . ".php"))) { + require("$curpath/language/lang-" . $language . ".php"); +} else { + /* Default to the default lang if the choosen lang doesnt exist */ + $language = $default_lang; + if ((file_exists("$curpath/language/lang-" . $language . ".php")) && (is_readable("$curpath/language/lang-" . $language . ".php"))) { + require("$curpath/language/lang-" . $default_lang . ".php"); + } else { + die("Default Language File Choosen Doesnt Exist Or Is Unreadable By The Webserver"); + } +} + +?> <table border="0" cellspacing="1" cellpadding="5" width="100%" height="95%"> <tr> Index: publicdnsadmin/login.php diff -u publicdnsadmin/login.php:1.3 publicdnsadmin/login.php:1.4 --- publicdnsadmin/login.php:1.3 Wed Jun 18 03:26:58 2003 +++ publicdnsadmin/login.php Tue Aug 12 19:47:13 2003 @@ -35,6 +35,7 @@ if (!$dbh->isError($result) && $result->numRows()) { $row = $result->fetchRow(); $_SESSION["_UID"] = $row["id"]; + $_SESSION["_LANGUAGE"] = $language; $login_ok = 1; } } @@ -44,6 +45,7 @@ if (!$dbh->isError($result) && $result->numRows()) { $row = $result->fetchRow(); $_SESSION["_UID"] = $row["id"]; + $_SESSION["_LANGUAGE"] = $language; $login_ok = 1; } } ----------------------- End of diff ----------------------- |
From: Neil S. <sir...@us...> - 2003-08-13 03:28:57
|
CVSROOT : /cvsroot/publicdnsadmin Module : publicdnsadmin Commit time: 2003-08-13 02:57:07 UTC Modified files: index.php docs/CHANGELOG Log message: Author: SiRVulcaN <sir...@si...> Log message: - Default selected language on the main login page is now $language. ---------------------- diff included ---------------------- Index: publicdnsadmin/docs/CHANGELOG diff -u publicdnsadmin/docs/CHANGELOG:1.33 publicdnsadmin/docs/CHANGELOG:1.34 --- publicdnsadmin/docs/CHANGELOG:1.33 Tue Aug 12 19:47:13 2003 +++ publicdnsadmin/docs/CHANGELOG Tue Aug 12 19:56:57 2003 @@ -18,3 +18,4 @@ - Added index.(html|php) in images/docs/lib SiRVulcaN <sir...@si...> - 13/08/2003 - Fixed up some hardcoded addresses in signup.php and forgotten_pass.php - Added in first stage of multilanguage support. + - Default selected language on the main login page is now $language. Index: publicdnsadmin/index.php diff -u publicdnsadmin/index.php:1.9 publicdnsadmin/index.php:1.10 --- publicdnsadmin/index.php:1.9 Tue Aug 12 19:47:13 2003 +++ publicdnsadmin/index.php Tue Aug 12 19:56:57 2003 @@ -161,17 +161,18 @@ while ($file = readdir($handle)) { if (ereg("^lang\-(.+)\.php", $file, $matches)) { $langFound = $matches[1]; - $languageslist .= "$langFound "; + if ($langFound != $language) { + $languageslist .= "$langFound "; + } } } closedir($handle); $languageslist = explode(" ", $languageslist); sort($languageslist); +echo "<option name='language' value='$language' selected>".ucfirst($language)."\n"; for ($i=0; $i < sizeof($languageslist); $i++) { if($languageslist[$i]!="") { - echo "<option name='language' value='$languageslist[$i]' "; - if($languageslist[$i]==$language) echo "selected"; - echo ">".ucfirst($languageslist[$i])."\n"; + echo "<option name='language' value='$languageslist[$i]'>".ucfirst($languageslist[$i])."\n"; } } echo "</select></td>" ----------------------- End of diff ----------------------- |
From: Neil S. <sir...@us...> - 2003-08-13 12:15:34
|
CVSROOT : /cvsroot/publicdnsadmin Module : publicdnsadmin Commit time: 2003-08-13 12:14:24 UTC Modified files: create_record.php create_template.php create_template_record.php create_user.php create_zone.php dbbackup.php delete_multi_records.php delete_multi_t_records.php delete_record.php delete_template.php delete_template_record.php delete_user.php delete_zone.php edit_record.php edit_self.php edit_template.php edit_template_record.php edit_user.php edit_zone.php forgotten_pass.php gfx_code.php grant_access.php index.php new_record.php new_template.php new_template_record.php new_user.php new_zone.php revoke_user.php search.php set_access.php signup.php stats.php templates.php terms.php update_record.php update_self.php update_template.php update_template_record.php update_user.php users.php whois.php zone_access.php docs/CHANGELOG docs/TODO language/lang-english.php lib/db.inc.php lib/footer.php lib/header.php lib/permission.inc.php Log message: Author: SiRVulcaN <sir...@si...> Log message: - Multilanguage support completly finished, finally after 10hrs of work. ---------------------- diff included ---------------------- Index: publicdnsadmin/create_record.php diff -u publicdnsadmin/create_record.php:1.5 publicdnsadmin/create_record.php:1.6 --- publicdnsadmin/create_record.php:1.5 Wed Aug 6 06:17:40 2003 +++ publicdnsadmin/create_record.php Wed Aug 13 05:14:13 2003 @@ -18,7 +18,7 @@ $zoneid = trim(addslashes($_GET["zone"])); ?> -<h3>Edit domain » new record</h3> +<h3><? echo _EDITDOMAIN; ?> » <? echo _NEWRECORD; ?></h3> <?php $dbh = db_connect(); @@ -38,7 +38,7 @@ $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" and $type != "MBOXFW" and $type != "URL" and $type != "RP" and $type != "HWINFO") { - echo "<p class=\"error\">· Invalid pointer type: \"$type\"</p>\n"; + echo "<p class=\"error\">· ". _INVALIDPOINTTYPE .": \"$type\"</p>\n"; } else { if ($type == "MX") { @@ -59,16 +59,16 @@ $expaddy = explode(".", $record); $record = $expaddy[3].".".$expaddy[2].".".$expaddy[1].".".$expaddy[0].".in-addr.arpa"; } else { - echo "<p class=\"error\">· $content does not resolve to $record</p>\n"; + echo "<p class=\"error\">· $content ". _DOESNOTRESOLVE ." $record</p>\n"; $dbh->disconnect(); die(); } } if (!validateRecordContent($type, $content)) { - echo "<p class=\"error\">· Invalid content for pointer type</p>\n"; + echo "<p class=\"error\">· ". _INVALIDPOINTCONT ."</p>\n"; } elseif (!validateRecordData($type, $record)) { - echo "<p class=\"error\">· Invalid record data for pointer type</p>\n"; + echo "<p class=\"error\">· ". _INVALIDPOINTREC ."</p>\n"; } else { if ($type == "PTR") { @@ -83,7 +83,7 @@ $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"; + echo "<p>". _RECWASADDED ."<br><a href=\"edit_zone.php?id=$zoneid\">". _PROCEED ." »</a></p>\n"; echo "<script language=\"JavaScript\">\n"; echo "document.location.href='edit_zone.php?id=$zoneid';\n"; echo "</script>\n"; @@ -93,11 +93,11 @@ } } else { - echo "<p class=\"error\">· You don't have permission to edit this domain</p>\n"; + echo "<p class=\"error\">· ". _NOPERMSEDITDOM ."</p>\n"; } } else { - echo "<p class=\"error\">· Zone not found</p>\n"; + echo "<p class=\"error\">· ". _ZONENOTFND ."</p>\n"; } $dbh->disconnect(); Index: publicdnsadmin/create_template.php diff -u publicdnsadmin/create_template.php:1.1.1.1 publicdnsadmin/create_template.php:1.2 --- publicdnsadmin/create_template.php:1.1.1.1 Wed Apr 16 00:19:03 2003 +++ publicdnsadmin/create_template.php Wed Aug 13 05:14:13 2003 @@ -14,23 +14,21 @@ if (userHasAccess($_SESSION["_UID"], "new_template")) { -?> -<h3>New template</h3> -<?php + echo "<h3>"._NEWTEMPLATE."</h3>"; $name = trim(addslashes($_POST["name"])); if ($name) { $dbh = db_connect(); $result = $dbh->query("SELECT * FROM templates WHERE name = '$name'"); if (!$dbh->isError($result) && $result->numRows()) { - echo "<p class=\"error\">· Another template with the same name already exists</p>\n"; + echo "<p class=\"error\">· "._TEMPLATEEXISTS."</p>\n"; } else { $templateid = createTemplate($name, $_SESSION["_UID"]); - echo "<p>The template was successfully created. Click <a href=\"edit_template.php?id=$templateid\">here</a> to edit.</p>\n"; + echo "<p>"._TEMPLATECREATED.". "._CLICK." <a href=\"edit_template.php?id=$templateid\">"._HERE."</a> "._TOEDIT.".</p>\n"; } $dbh->disconnect(); } else { - echo "<p class=\"error\">· No template name defined</p>\n"; + echo "<p class=\"error\">· "._NOTEMPNAMEDEFINED."</p>\n"; } } else { Index: publicdnsadmin/create_template_record.php diff -u publicdnsadmin/create_template_record.php:1.6 publicdnsadmin/create_template_record.php:1.7 --- publicdnsadmin/create_template_record.php:1.6 Wed Aug 6 06:17:40 2003 +++ publicdnsadmin/create_template_record.php Wed Aug 13 05:14:13 2003 @@ -18,7 +18,7 @@ $zoneid = trim(addslashes($_GET["zone"])); ?> -<h3>Edit template » new record</h3> +<h3><? echo _EDITTEMPLATE; ?> » <? echo _NEWRECORD; ?></h3> <?php $dbh = db_connect(); @@ -36,7 +36,7 @@ $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" and $type != "MBOXFW" and $type != "URL" and $type != "RP" and $type != "HWINFO") { - echo "<p class=\"error\">· Invalid pointer type: \"$type\"</p>\n"; + echo "<p class=\"error\">· "._INVALIDPOINTTYPE.": \"$type\"</p>\n"; } else { if ($type == "MX") { @@ -52,9 +52,9 @@ } if (!validateTemRecordContent($type, $content, true)) { - echo "<p class=\"error\">· Invalid content for pointer type</p>\n"; + echo "<p class=\"error\">· "._INVALIDPOINTCONT."</p>\n"; } elseif (!validateRecordData($type, $record, true)) { - echo "<p class=\"error\">· Invalid record data for pointer type</p>\n"; + echo "<p class=\"error\">· "._INVALIDPOINTREC."</p>\n"; } else { if ($type == "MBOXFW") { @@ -64,7 +64,7 @@ } $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 "<p>"._RECWASADDED."<br><a href=\"edit_template.php?id=$zoneid\">"._PROCEED." »</a></p>\n"; echo "<script language=\"JavaScript\">\n"; echo "document.location.href='edit_template.php?id=$zoneid';\n"; echo "</script>\n"; @@ -74,7 +74,7 @@ } } else { - echo "<p class=\"error\">· Template not found</p>\n"; + echo "<p class=\"error\">· "._TEMPLATENOTFND."</p>\n"; } $dbh->disconnect(); Index: publicdnsadmin/create_user.php diff -u publicdnsadmin/create_user.php:1.1.1.1 publicdnsadmin/create_user.php:1.2 --- publicdnsadmin/create_user.php:1.1.1.1 Wed Apr 16 00:19:03 2003 +++ publicdnsadmin/create_user.php Wed Aug 13 05:14:13 2003 @@ -15,7 +15,7 @@ if (userHasAccess($_SESSION["_UID"], "users")) { ?> -<h3>User administration » new user</h3> +<h3><? echo _USERADMIN; ?> » <? echo _NEWUSER; ?></h3> <?php $dbh = db_connect(); @@ -27,15 +27,15 @@ $pass_confirm = trim(addslashes($_POST["confirm_password"])); if (!$username or !$name or !$email or !$pass) { - echo "<p class=\"error\">· Some fields were missing. You must fill out the username, name, email and password-fields.</p>\n"; + echo "<p class=\"error\">· "._FIELDSMISSINGFILL.".</p>\n"; } else { if (!preg_match("/^[a-zA-Z\-]+$/", $username)) { - echo "<p class=\"error\">· Invalid username. Can only contain characters a to z and dash</p>\n"; + echo "<p class=\"error\">· "._INVUSERNAME."</p>\n"; } elseif (!preg_match("/^[a-zA-Z0-9\-_]+$/", $pass)) { - echo "<p class=\"error\">· Invalid password. May only contain characters a to z, dash, and numbers.</p>\n"; + echo "<p class=\"error\">· "._INVPASSWORD.".</p>\n"; } elseif ($pass != $pass_confirm) { - echo "<p class=\"error\">· The passwords did not match.</p>\n"; + echo "<p class=\"error\">· "._PASSWORDSDONTMATCH.".</p>\n"; } else { $dbh = db_connect(); @@ -46,7 +46,7 @@ } if (!$dbh->isError($result) && $result->numRows()) { - echo "<p class=\"error\">· Username already exists</p>\n"; + echo "<p class=\"error\">· "._USERNAMEXISTS."</p>\n"; } else { $tmpres = $dbh->query("SELECT permission FROM users WHERE id = '".$_SESSION["_UID"]."'"); @@ -92,7 +92,7 @@ $md5_pass = md5($pass); $dbh->query("INSERT INTO users (username, password, name, email, company, permission) VALUES('$username', '$md5_pass', '$name', '$email', '$company', '$permission_string')"); - echo "<p>The user was successfully created</p>\n"; + echo "<p>"._USERCREATED."</p>\n"; } Index: publicdnsadmin/create_zone.php diff -u publicdnsadmin/create_zone.php:1.1.1.1 publicdnsadmin/create_zone.php:1.2 --- publicdnsadmin/create_zone.php:1.1.1.1 Wed Apr 16 00:19:03 2003 +++ publicdnsadmin/create_zone.php Wed Aug 13 05:14:13 2003 @@ -14,9 +14,7 @@ if (userHasAccess($_SESSION["_UID"], "new")) { -?> -<h3>New domain</h3> -<?php + echo "<h3>"._NEWDOMAIN."</h3>"; if ($_GET["bulk"]) { @@ -41,7 +39,7 @@ if (count($errors)) { - echo "<p>One or more of the domains were invalid:<br>\n"; + echo "<p>"._SOMEDOMAINSINVALID.":<br>\n"; foreach ($errors as $error) { echo " · " . htmlspecialchars($error) . "<br>\n"; @@ -68,7 +66,7 @@ if (count($errors)) { - echo "<p>The following domains already exists:<br>\n"; + echo "<p>"._DOMAINEXISTS.":<br>\n"; foreach ($errors as $error) { echo " ·" . htmlspecialchars($error) . "<br>\n"; @@ -78,7 +76,7 @@ } else { - echo "<p>The following domains was added:<br>\n"; + echo "<p>"._DOMAINSADDED.":<br>\n"; foreach ($domains as $domain) { $domain = preg_replace("/(\r\n|\r|\n)$/", "", $domain); @@ -92,7 +90,7 @@ } else { - echo "<p class=\"error\">The specified template does not exist</p>\n"; + echo "<p class=\"error\">"._TEMPLATEUNAVAIL."</p>\n"; } @@ -100,7 +98,7 @@ } else { - echo "<p>No domain names entered</p>\n"; + echo "<p>"._NODOMAINS."</p>\n"; } @@ -110,7 +108,7 @@ $template = trim(addslashes($_POST["template"])); if (!$domain or (!preg_match("/^[a-zA-Z0-9-_]+\.[a-zA-Z0-9-_\.]{2,6}$/", $domain) and !preg_match("/^[0-9\.]+\.in-addr\.arpa$/", $domain) and !preg_match("/^[0-9\.]+\.ip6\.arpa$/", $domain) and !preg_match("/^[0-9\.]+\.ip6\.int$/", $domain))) { - echo "<p class=\"error\">Missing or invalid domain name</p>\n"; + echo "<p class=\"error\">"._MISSINGINVDOM."</p>\n"; } else { $dbh = db_connect(); $result = $dbh->query("SELECT * FROM templates WHERE id = '$template'"); @@ -118,13 +116,13 @@ $result = $dbh->query("SELECT * FROM domains WHERE name = '$domain'"); if (!$dbh->isError($result) && $result->numRows()) { - echo "<p class=\"error\">· A domain with the same name already exists</p>\n"; + echo "<p class=\"error\">· ".DOMAINOWNEREXIST."</p>\n"; } else { $zoneid = createZone($domain, $template, $_SESSION["_UID"]); - echo "<p>The zone was successfully created. Click <a href=\"edit_zone.php?id=$zoneid\">here</a> to edit.</p>\n"; + echo "<p>"._ZONECREATED." <a href=\"edit_zone.php?id=$zoneid\">"._HERE."</a> "._TOEDIT.".</p>\n"; } } else { - echo "<p class=\"error\">The specified template does not exist</p>\n"; + echo "<p class=\"error\">"._TEMPLATEUNAVAIL."</p>\n"; } } Index: publicdnsadmin/dbbackup.php diff -u publicdnsadmin/dbbackup.php:1.6 publicdnsadmin/dbbackup.php:1.7 --- publicdnsadmin/dbbackup.php:1.6 Wed Jul 16 05:32:44 2003 +++ publicdnsadmin/dbbackup.php Wed Aug 13 05:14:13 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>". _BACKUPCREATED ." <a href=\"".$site_address."/data/".$filesmall."\">". _BACKUPDOWNLOAD .".</a></p>\n"; } include("lib/footer.php"); ?> Index: publicdnsadmin/delete_multi_records.php diff -u publicdnsadmin/delete_multi_records.php:1.2 publicdnsadmin/delete_multi_records.php:1.3 --- publicdnsadmin/delete_multi_records.php:1.2 Fri Jul 18 22:45:30 2003 +++ publicdnsadmin/delete_multi_records.php Wed Aug 13 05:14:13 2003 @@ -18,7 +18,7 @@ if (userHasAccess($_SESSION["_UID"], "edit")) { ?> -<h3>Edit domain » delete multple records</h3> +<h3><? echo _EDITDOMAIN; ?> » <? echo _DELMULTIRECORDS; ?></h3> <?php if ($recdel) { @@ -33,22 +33,22 @@ $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"; + echo "<p class=\"error\">· "._NOPERMSDELREC."- ($recordid)</p>\n"; $error_occur = 1; } // 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"; + echo "<p class=\"error\">· "._ZONERECNOTFND." ($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 "; + echo "<p>"._ALLRECNOTDEL."</p>"; + echo "<p>".Some." "; } else { - echo "<p>All "; + echo "<p>".All." "; } - echo "selected records were successfully deleted<br><a href=\"edit_zone.php?id=".$row["domain_id"]."\">Proceed»</a></p>\n"; + echo ""._SELECTTEMPDEL."<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"; Index: publicdnsadmin/delete_multi_t_records.php diff -u publicdnsadmin/delete_multi_t_records.php:1.1 publicdnsadmin/delete_multi_t_records.php:1.2 --- publicdnsadmin/delete_multi_t_records.php:1.1 Fri Jul 18 22:45:30 2003 +++ publicdnsadmin/delete_multi_t_records.php Wed Aug 13 05:14:13 2003 @@ -18,7 +18,7 @@ if (userHasAccess($_SESSION["_UID"], "edit_template")) { ?> -<h3>Edit template » delete multiple record</h3> +<h3><? echo _EDITTEMPLATE; ?> » <? echo _DELMULTIRECORDS; ?></h3> <?php if ($recdel) { @@ -31,17 +31,17 @@ $row = $result->fetchRow(); $dbh->query("DELETE FROM template_records WHERE id = '$recordid'"); } else { - echo "<p class=\"error\">· Template/record not found- ($recordid)</p>\n"; + echo "<p class=\"error\">· "._TEMPRECNOTFND."- ($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 "; + echo "<p>"._ALLRECNOTDEL."</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"; + echo ""._SELECTTEMPDEL."<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"; Index: publicdnsadmin/delete_record.php diff -u publicdnsadmin/delete_record.php:1.1.1.1 publicdnsadmin/delete_record.php:1.2 --- publicdnsadmin/delete_record.php:1.1.1.1 Wed Apr 16 00:19:03 2003 +++ publicdnsadmin/delete_record.php Wed Aug 13 05:14:13 2003 @@ -18,7 +18,7 @@ $recordid = trim(addslashes($_GET["id"])); ?> -<h3>Edit domain » delete record</h3> +<h3><? echo _EDITDOMAIN; ?> » <? echo _DELRECORD; ?></h3> <?php $dbh = db_connect(); @@ -32,7 +32,7 @@ $dbh->query("DELETE FROM records WHERE id = '$recordid'"); updateZoneSerial($row["domain_id"]); - echo "<p>The record was successfully deleted<br><a href=\"edit_zone.php?id=".$row["domain_id"]."\">Proceed »</a></p>\n"; + echo "<p>"._RECSUCESDEL."<br><a href=\"edit_zone.php?id=".$row["domain_id"]."\">"._PROCEED." »</a></p>\n"; echo "<script language=\"JavaScript\">\n"; echo "document.location.href='edit_zone.php?id=".$row["domain_id"]."';\n"; echo "</script>\n"; @@ -44,17 +44,17 @@ $record_data .= htmlentities($row["prio"] . " "); } $record_data .= htmlentities($row["content"]); - echo "<p>Are you sure you wish to delete the record \"$record_data\"?</p>\n"; - echo "<p><input type=\"button\" value=\"Yes\" onClick=\"javascript:document.location.href='delete_record.php?id=$recordid&confirm=1';\"> <input type=\"button\" value=\"No\" onClick=\"javascript:history.go(-1);\"></p>\n"; + echo "<p>"._WISHTODELTHISREC." \"$record_data\"?</p>\n"; + echo "<p><input type=\"button\" value=\""._YES."\" onClick=\"javascript:document.location.href='delete_record.php?id=$recordid&confirm=1';\"> <input type=\"button\" value=\""._NO."\" onClick=\"javascript:history.go(-1);\"></p>\n"; } } else { - echo "<p class=\"error\">· You don't have permission to delete this record</p>\n"; + echo "<p class=\"error\">· "._NOPERMSDELREC."</p>\n"; } } else { - echo "<p class=\"error\">· Zone/record not found</p>\n"; + echo "<p class=\"error\">· "._ZONERECNOTFND."</p>\n"; } $dbh->disconnect(); Index: publicdnsadmin/delete_template.php diff -u publicdnsadmin/delete_template.php:1.1.1.1 publicdnsadmin/delete_template.php:1.2 --- publicdnsadmin/delete_template.php:1.1.1.1 Wed Apr 16 00:19:03 2003 +++ publicdnsadmin/delete_template.php Wed Aug 13 05:14:13 2003 @@ -17,9 +17,7 @@ $perms = getUserPermissions($_SESSION["_UID"]); $zoneid = trim(addslashes($_GET["id"])); -?> -<h3>Delete template</h3> -<?php + echo "<h3>". _DELTEMPLATE ."</h3>"; $dbh = db_connect(); $result = $dbh->query("SELECT * FROM templates WHERE id = '$zoneid'"); @@ -31,15 +29,15 @@ $dbh->query("DELETE FROM templates WHERE id = '$zoneid'"); $dbh->query("DELETE FROM template_records WHERE template_id = '$zoneid'"); - echo "<p>The template \"".htmlentities($row["name"])."\" and all records was successfully deleted</p>\n"; + echo "<p>". _THETEMPLATE ." \"".htmlentities($row["name"])."\" ". _ALLRECDEL ."</p>\n"; } else { - echo "<p>Are you sure you wish to delete the template \"".htmlentities($row["name"])."\"?</p>\n"; - echo "<p><input type=\"button\" value=\"Yes\" onClick=\"javascript:document.location.href='delete_template.php?id=$zoneid&confirm=1';\"> <input type=\"button\" value=\"No\" onClick=\"javascript:history.go(-1);\"></p>\n"; + echo "<p>". _WISHTODELTEMPLATE ." \"".htmlentities($row["name"])."\"?</p>\n"; + echo "<p><input type=\"button\" value=\"". _YES ."\" onClick=\"javascript:document.location.href='delete_template.php?id=$zoneid&confirm=1';\"> <input type=\"button\" value=\"". _NO ."\" onClick=\"javascript:history.go(-1);\"></p>\n"; } } else { - echo "<p class=\"error\">· Template not found</p>\n"; + echo "<p class=\"error\">· ". _TEMPLATENOTFND ."</p>\n"; } $dbh->disconnect(); Index: publicdnsadmin/delete_template_record.php diff -u publicdnsadmin/delete_template_record.php:1.1.1.1 publicdnsadmin/delete_template_record.php:1.2 --- publicdnsadmin/delete_template_record.php:1.1.1.1 Wed Apr 16 00:19:04 2003 +++ publicdnsadmin/delete_template_record.php Wed Aug 13 05:14:13 2003 @@ -18,7 +18,7 @@ $recordid = trim(addslashes($_GET["id"])); ?> -<h3>Edit template » delete record</h3> +<h3><? echo _EDITTEMPLATE; ?> » <? echo _DELRECORD; ?></h3> <?php $dbh = db_connect(); @@ -29,7 +29,7 @@ if ($_GET["confirm"]) { $dbh->query("DELETE FROM template_records WHERE id = '$recordid'"); - echo "<p>The record was successfully deleted<br><a href=\"edit_template.php?id=".$row["id"]."\">Proceed »</a></p>\n"; + echo "<p>". _RECSUCESDEL ."<br><a href=\"edit_template.php?id=".$row["id"]."\">". _PROCEED ." »</a></p>\n"; echo "<script language=\"JavaScript\">\n"; echo "document.location.href='edit_template.php?id=".$row["id"]."';\n"; echo "</script>\n"; @@ -41,13 +41,13 @@ $record_data .= htmlentities($row["prio"] . " "); } $record_data .= htmlentities($row["content"]); - echo "<p>Are you sure you wish to delete the record \"$record_data\"?</p>\n"; - echo "<p><input type=\"button\" value=\"Yes\" onClick=\"javascript:document.location.href='delete_template_record.php?id=$recordid&confirm=1';\"> <input type=\"button\" value=\"No\" onClick=\"javascript:history.go(-1);\"></p>\n"; + echo "<p>". _WISHTODELTHISREC ." \"$record_data\"?</p>\n"; + echo "<p><input type=\"button\" value=\"". _YES ."\" onClick=\"javascript:document.location.href='delete_template_record.php?id=$recordid&confirm=1';\"> <input type=\"button\" value=\"". _NO ."\" onClick=\"javascript:history.go(-1);\"></p>\n"; } } else { - echo "<p class=\"error\">· Template/record not found</p>\n"; + echo "<p class=\"error\">· ". _TEMPRECNOTFND ."</p>\n"; } $dbh->disconnect(); Index: publicdnsadmin/delete_user.php diff -u publicdnsadmin/delete_user.php:1.1 publicdnsadmin/delete_user.php:1.2 --- publicdnsadmin/delete_user.php:1.1 Fri Jun 13 08:19:11 2003 +++ publicdnsadmin/delete_user.php Wed Aug 13 05:14:13 2003 @@ -23,16 +23,15 @@ $urow = $getuser->fetchRow(); $username = $urow["username"]; } else { - echo "<h3>Delete user</h3>"; - echo "<p>Fatal Error, User Does Not Exist Most Likely</p>"; + echo "<h3>"._DELETEUSER."</h3>"; + echo "<p>"._FTUSERDONTEXIST."</p>"; $dbh->disconnect(); require("lib/footer.php"); die(); } -?> -<h3>Delete user</h3> -<?php + echo "<h3>"._DELETEUSER."</h3>"; + if ($_GET["confirm"]) { $result = $dbh->query("SELECT user_id, domain_id FROM domain_owners WHERE user_id = '$id'"); @@ -53,10 +52,10 @@ } $dbh->query("DELETE FROM users WHERE id = '$id'"); - echo "<p>$username and all their domains/records were successfully deleted</p>\n"; + echo "<p>$username "._ANDALLDOMRECDEL."</p>\n"; } else { - echo "<p>Are you sure you wish to delete $username?</p>\n"; - echo "<p><input type=\"button\" value=\"Yes\" onClick=\"javascript:document.location.href='delete_user.php?id=$userid&confirm=1';\"> <input type=\"button\" value=\"No\" onClick=\"javascript:history.go(-1);\"></p>\n"; + echo "<p>"._WISHTODEL." $username?</p>\n"; + echo "<p><input type=\"button\" value=\""._YES."\" onClick=\"javascript:document.location.href='delete_user.php?id=$userid&confirm=1';\"> <input type=\"button\" value=\""._NO."\" onClick=\"javascript:history.go(-1);\"></p>\n"; } Index: publicdnsadmin/delete_zone.php diff -u publicdnsadmin/delete_zone.php:1.1.1.1 publicdnsadmin/delete_zone.php:1.2 --- publicdnsadmin/delete_zone.php:1.1.1.1 Wed Apr 16 00:19:04 2003 +++ publicdnsadmin/delete_zone.php Wed Aug 13 05:14:13 2003 @@ -17,9 +17,7 @@ $perms = getUserPermissions($_SESSION["_UID"]); $zoneid = trim(addslashes($_GET["id"])); -?> -<h3>Delete domain</h3> -<?php + echo "<h3>"._DELDOMAIN."</h3>"; $dbh = db_connect(); $result = $dbh->query("SELECT domain_owners.user_id, domains.name FROM domains, domain_owners WHERE domain_owners.domain_id = '$zoneid' AND domains.id = domain_owners.domain_id"); @@ -33,19 +31,19 @@ $dbh->query("DELETE FROM domains WHERE id = '$zoneid'"); $dbh->query("DELETE FROM domain_owners WHERE domain_id = '$zoneid'"); $dbh->query("DELETE FROM records WHERE domain_id = '$zoneid'"); - echo "<p>The domain \"".htmlentities($row["name"])."\" and all records was successfully deleted</p>\n"; + echo "<p>"._THEDOMAIN." \"".htmlentities($row["name"])."\" "._ANDALLRECSDEL."</p>\n"; } else { - echo "<p>Are you sure you wish to delete the domain \"".htmlentities($row["name"])."\"?</p>\n"; - echo "<p><input type=\"button\" value=\"Yes\" onClick=\"javascript:document.location.href='delete_zone.php?id=$zoneid&confirm=1';\"> <input type=\"button\" value=\"No\" onClick=\"javascript:history.go(-1);\"></p>\n"; + echo "<p>"._WISHTODELTHEDOM." \"".htmlentities($row["name"])."\"?</p>\n"; + echo "<p><input type=\"button\" value=\""._YES."\" onClick=\"javascript:document.location.href='delete_zone.php?id=$zoneid&confirm=1';\"> <input type=\"button\" value=\""._NO."\" onClick=\"javascript:history.go(-1);\"></p>\n"; } } else { - echo "<p class=\"error\">· You don't have permission to delete this domain</p>\n"; + echo "<p class=\"error\">· "._NOPERMSDOMAIN."</p>\n"; } } else { - echo "<p class=\"error\">· Zone not found</p>\n"; + echo "<p class=\"error\">· "._ZONENOTFND."</p>\n"; } $dbh->disconnect(); Index: publicdnsadmin/docs/CHANGELOG diff -u publicdnsadmin/docs/CHANGELOG:1.34 publicdnsadmin/docs/CHANGELOG:1.35 --- publicdnsadmin/docs/CHANGELOG:1.34 Tue Aug 12 19:56:57 2003 +++ publicdnsadmin/docs/CHANGELOG Wed Aug 13 05:14:13 2003 @@ -19,3 +19,4 @@ SiRVulcaN <sir...@si...> - 13/08/2003 - Fixed up some hardcoded addresses in signup.php and forgotten_pass.php - Added in first stage of multilanguage support. - Default selected language on the main login page is now $language. +SiRVulcaN <sir...@si...> - 14/08/2003 - Second stage of multilanguage support added, fully works now. Index: publicdnsadmin/docs/TODO diff -u publicdnsadmin/docs/TODO:1.16 publicdnsadmin/docs/TODO:1.17 --- publicdnsadmin/docs/TODO:1.16 Tue Aug 12 19:47:13 2003 +++ publicdnsadmin/docs/TODO Wed Aug 13 05:14:13 2003 @@ -6,7 +6,4 @@ -- client_message(CODE, TYPE); - ERR_TYPE, ie ERR_INVPASS (invalid pass) - TYPE as in "general", "error", "critical" etc, each type has diff types of output styles -- multilanguage, use a code based system like the error codes which read off a file, lang.XX.php, then combine errors into the language file - > First Stage Complete. - - Adjust all files to use _VARS from the language files instead of the sentences/words. - install.php - databases + configuration Index: publicdnsadmin/edit_record.php diff -u publicdnsadmin/edit_record.php:1.7 publicdnsadmin/edit_record.php:1.8 --- publicdnsadmin/edit_record.php:1.7 Tue Aug 12 02:06:51 2003 +++ publicdnsadmin/edit_record.php Wed Aug 13 05:14:13 2003 @@ -19,7 +19,7 @@ $zoneid = getZoneFromRecord($recordid); ?> -<h3>Edit domain » edit record</h3> +<h3><? echo _EDITDOMAIN; ?> » <? echo _EDITRECORD; ?></h3> <?php $dbh = db_connect(); @@ -41,7 +41,7 @@ <form action="update_record.php?id=<?php echo $recordid; ?>" method="post" name="recform"> <table border="0" cellspacing="0" cellpadding="2"> <tr> - <td><b>Record:</b></td> + <? echo "<td><b>"._RECORD.":</b></td>"; ?> <? if ($row["type"] != "PTR") { if ($row["type"] == "MBOXFW") { @@ -61,7 +61,7 @@ ?> </tr> <tr> - <td><b>Type:</b></td> + <? echo "<td><b>"._TYPE.":</b></td>"; ?> <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> @@ -79,7 +79,7 @@ </select></td> </tr> <tr> - <td><b>Prio:</b></td> + <? echo "<td><b>"._PRIO.":</b></td>"; ?> <? if ($row["type"] != "MX") { ?> <td><input type="text" name="prio" disabled="true" size="5" maxlength="11" value="<?php if ($row["prio"]) { echo htmlentities($row["prio"]); } ?>"></td> <? } else { ?> @@ -87,26 +87,26 @@ <? } ?> </tr> <tr> - <td><b>Content:</b></td> + <? echo "<td><b>"._CONTENT.":</b></td>"; ?> <td><input type="text" name="content" size="15" maxlength="255" value="<?php echo htmlentities($row["content"]); ?>"></td> </tr> <tr> - <td><b>TTL:</b></td> + <? echo "<td><b>"._TTL.":</b></td>"; ?> <td><input type="text" name="ttl" size="5" maxlength="11" value="<?php echo $row["ttl"]; ?>"></td> </tr> <tr> - <td colspan="2" align="right"><input type="submit" value="Update"></td> + <td colspan="2" align="right"><input type="submit" value="<? echo _UPDATE; ?>"></td> </tr> </table> </form> <?php } else { - echo "<p class=\"error\">· You don't have permission to edit this domain</p>\n"; + echo "<p class=\"error\">· "._NOPERMSEDITDOM."</p>\n"; } } else { - echo "<p class=\"error\">· Zone/record not found</p>\n"; + echo "<p class=\"error\">· "._ZONERECNOTFND."</p>\n"; } $dbh->disconnect(); Index: publicdnsadmin/edit_self.php diff -u publicdnsadmin/edit_self.php:1.1.1.1 publicdnsadmin/edit_self.php:1.2 --- publicdnsadmin/edit_self.php:1.1.1.1 Wed Apr 16 00:19:04 2003 +++ publicdnsadmin/edit_self.php Wed Aug 13 05:14:13 2003 @@ -13,9 +13,7 @@ require("lib/header.php"); -?> -<h3>Edit Settings</h3> -<?php + echo "<h3>"._EDITSETTINGS."</h3>"; $dbh = db_connect(); $userid = trim(addslashes($_SESSION["_UID"])); @@ -28,40 +26,40 @@ <table border="0" cellspacing="0" cellpadding="2"> <tr> - <td><b>Username:</b></td> + <? echo "<td><b>"._USERNAME.":</b></td>"; ?> <td><?php echo htmlentities($row["username"]);?></rd> </tr> <tr> <td colspan="2" height="15"> </td> </tr> <tr> - <td><b>Name:</b></td> + <? echo "<td><b>"._NAME.":</b></td>"; ?> <td><input type="text" name="name" size="20" maxlength="255" value="<?php echo htmlentities($row["name"]); ?>"></td> </tr> <tr> - <td><b>E-mail:</b></td> + <? echo "<td><b>"._EMAIL.":</b></td>"; ?> <td><input type="text" name="email" size="20" maxlength="255" value="<?php echo htmlentities($row["email"]); ?>"></td> </tr> <tr> - <td><b>Company:</b></td> + <? echo "<td><b>"._COMPANY.":</b></td>"; ?> <td><input type="text" name="company" size="20" maxlength="255" value="<?php echo htmlentities($row["company"]); ?>"></td> </tr> <tr> <td colspan="2" height="15"> </td> </tr> <tr> - <td colspan="2">Only type anything here if you want to<br>change password</td> + <? echo "<td colspan=\"2\">"._TYPEIFNEED."<br>"._CHGPASS."</td>"; ?> </tr> <tr> - <td><b>Password:</b></td> + <? echo "<td><b>"._PASSWORD.":</b></td>"; ?> <td><input type="password" name="password" size="20" maxlength="25" value=""></td> </tr> <tr> - <td nowrap><b>Confirm password:</b></td> + <? echo "<td nowrap><b>"._CONFIRMPASSWORD.":</b></td>"; ?> <td><input type="password" name="confirm_password" size="20" maxlength="25" value=""></td> </tr> <tr> - <td colspan="2" align="right"><input type="submit" value="Update"></td> + <td colspan="2" align="right"><input type="submit" value="<? echo _UPDATE; ?>"></td> </tr> </table> </form> Index: publicdnsadmin/edit_template.php diff -u publicdnsadmin/edit_template.php:1.5 publicdnsadmin/edit_template.php:1.6 --- publicdnsadmin/edit_template.php:1.5 Sat Jul 19 06:46:31 2003 +++ publicdnsadmin/edit_template.php Wed Aug 13 05:14:13 2003 @@ -17,9 +17,7 @@ $perms = getUserPermissions($_SESSION["_UID"]); $zoneid = trim(addslashes($_GET["id"])); -?> -<h3>Edit template</h3> -<?php + echo "<h3>"._EDITTEMPLATE."</h3>"; $dbh = db_connect(); $result = $dbh->query("SELECT * FROM templates WHERE id = '$zoneid'"); @@ -29,17 +27,17 @@ echo "<form action=\"update_template.php?id=$zoneid\" method=\"post\">\n"; echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"2\">\n"; echo "<tr>\n"; - echo "<td><b>Template name:</b></td>\n"; + echo "<td><b>"._TEMPLATENAME.":</b></td>\n"; echo "<td><input type=\"text\" name=\"name\" size=\"15\" maxlength=\"255\" value=\"".htmlentities($row["name"])."\"></td>\n"; echo "</tr>\n"; echo "<tr>\n"; - echo "<td colspan=\"2\" align=\"right\"><input type=\"submit\" value=\"Update\"></td>\n"; + echo "<td colspan=\"2\" align=\"right\"><input type=\"submit\" value=\""._UPDATE."\"></td>\n"; echo "</tr>\n"; echo "</table>\n"; echo "</form>\n"; - echo "<p>· <a href=\"new_template_record.php?zone=$zoneid\">New record</a></p>\n"; + echo "<p>· <a href=\"new_template_record.php?zone=$zoneid\">"._NEWRECORDUP."</a></p>\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"; + 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; @@ -76,7 +74,7 @@ echo "<td bgcolor=\"$bgcolor\" align=\"right\">$priority</td>\n"; echo "<td bgcolor=\"$bgcolor\" align=\"right\">".htmlentities($rec_row["ttl"])."</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 "<td bgcolor=\"$bgcolor\"><a href=\"edit_template_record.php?id=".$rec_row["id"]."\"><img src=\"images/edit.png\" alt=\""._EDITRECORD."\" border=\"0\"></a> <a href=\"delete_template_record.php?id=".$rec_row["id"]."\"><img src=\"images/trash.png\" alt=\""._DELRECORD."\" border=\"0\"></a></td>\n"; echo "</tr>\n"; if ($row_id == 2) { $row_id = 0; } @@ -87,7 +85,7 @@ echo "</table></td></tr></table></form>\n"; } else { - echo "<p class=\"error\">· Template not found</p>\n"; + echo "<p class=\"error\">· "._TEMPLATENOTFND."</p>\n"; } $dbh->disconnect(); Index: publicdnsadmin/edit_template_record.php diff -u publicdnsadmin/edit_template_record.php:1.5 publicdnsadmin/edit_template_record.php:1.6 --- publicdnsadmin/edit_template_record.php:1.5 Tue Aug 12 02:06:52 2003 +++ publicdnsadmin/edit_template_record.php Wed Aug 13 05:14:13 2003 @@ -18,7 +18,7 @@ $recordid = trim(addslashes($_GET["id"])); ?> -<h3>Edit template » edit record</h3> +<h3><? echo _EDITTEMPLATE; ?> » <? echo _EDITRECORD; ?></h3> <?php $dbh = db_connect(); @@ -36,7 +36,7 @@ <form action="update_template_record.php?id=<?php echo $recordid; ?>" method="post" name="recform"> <table border="0" cellspacing="0" cellpadding="2"> <tr> - <td><b>Record:</b></td> +<? echo "<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); ?>"><DIV ID="seperator"><div class="seperator">@</div></div><div class="domain">$DOMAIN</div></td> <? } else { ?> @@ -44,7 +44,7 @@ <? } ?> </tr> <tr> - <td><b>Type:</b></td> + <? echo "<td><b>"._TYPE.":</b></td>"; ?> <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> @@ -62,7 +62,7 @@ </select></td> </tr> <tr> - <td><b>Prio:</b></td> + <? echo "<td><b>"._PRIO.":</b></td>"; ?> <? if ($row["type"] != "MX") { ?> <td><input type="text" name="prio" disabled="true" size="5" maxlength="11" value="<?php if ($row["prio"]) { echo htmlentities($row["prio"]); } ?>"></td> <? } else { ?> @@ -70,22 +70,22 @@ <? } ?> </tr> <tr> - <td><b>Content:</b></td> + <? echo "<td><b>"._CONTENT.":</b></td>"; ?> <td><input type="text" name="content" size="15" maxlength="255" value="<?php echo htmlentities($row["content"]); ?>"></td> </tr> <tr> - <td><b>TTL:</b></td> + <? echo "<td><b>"._TTL.":</b></td>"; ?> <td><input type="text" name="ttl" size="5" maxlength="11" value="<?php echo $row["ttl"]; ?>"></td> </tr> <tr> - <td colspan="2" align="right"><input type="submit" value="Update"></td> + <td colspan="2" align="right"><input type="submit" value="<? echo _UPDATE; ?>"></td> </tr> </table> </form> <?php } else { - echo "<p class=\"error\">· Template/record not found</p>\n"; + echo "<p class=\"error\">· "._TEMPRECNOTFND."</p>\n"; } $dbh->disconnect(); Index: publicdnsadmin/edit_user.php diff -u publicdnsadmin/edit_user.php:1.1.1.1 publicdnsadmin/edit_user.php:1.2 --- publicdnsadmin/edit_user.php:1.1.1.1 Wed Apr 16 00:19:04 2003 +++ publicdnsadmin/edit_user.php Wed Aug 13 05:14:13 2003 @@ -15,7 +15,7 @@ if (userHasAccess($_SESSION["_UID"], "users")) { ?> -<h3>User administration » edit user</h3> +<h3><? echo _USERADMIN; ?> » <? echo _EDITUSER; ?></h3> <?php $dbh = db_connect(); @@ -33,7 +33,7 @@ } if ($row["permission"] == 2 and $permission != 2) { - echo "<p class=\"error\">· You don't have the permission to edit a superuser</p>\n"; + echo "<p class=\"error\">· "._CANTEDITASUPERUSER."</p>\n"; } else { $perm = getUserPermissions($userid); @@ -43,53 +43,55 @@ <p><b>Username:</b> <?php echo htmlentities($row["username"]); ?></p> <table border="0" cellspacing="0" cellpadding="2"> <tr> - <td><b>Name:</b></td> + <? echo "<td><b>"._NAME.":</b></td>"; ?> <td><input type="text" name="name" size="20" maxlength="255" value="<?php echo htmlentities($row["name"]); ?>"></td> </tr> <tr> - <td><b>E-mail:</b></td> + <? echo "<td><b>"._EMAIL.":</b></td>"; ?> <td><input type="text" name="email" size="20" maxlength="255" value="<?php echo htmlentities($row["email"]); ?>"></td> </tr> <tr> - <td><b>Company:</b></td> + <? echo "<td><b>"._COMPANY.":</b></td>"; ?> <td><input type="text" name="company" size="20" maxlength="255" value="<?php echo htmlentities($row["company"]); ?>"></td> </tr> <tr> <td colspan="2" height="15"> </td> </tr> <tr> - <td colspan="2"><b>Permissions</b></td> + <? echo "<td colspan=\"2\"><b>"._PERMISSIONS."</b></td>"; ?> </tr> <tr> <td colspan="2"> - <?php if ($permission == 2) { ?><input type="checkbox" name="perm_superuser" value="1"<?php if ($perm["raw"] == 2) { ?> checked<?php } ?>> Superuser<br> - <input type="checkbox" name="perm_users" value="1"<?php if ($perm["users"]) { ?> checked<?php } ?>> User administration<br><br><?php } ?> - <input type="checkbox" name="perm_new" value="1"<?php if ($perm["new"]) { ?> checked<?php } ?>> New domains<br> - <input type="checkbox" name="perm_new_template" value="1"<?php if ($perm["new_template"]) { ?> checked<?php } ?>> New templates<br> - <input type="checkbox" name="perm_edit_own" value="1"<?php if ($perm["edit_own"]) { ?> checked<?php } ?>> Edit own domains<br> - <input type="checkbox" name="perm_edit_other" value="1"<?php if ($perm["edit_other"]) { ?> checked<?php } ?>> Edit other domains<br> - <input type="checkbox" name="perm_edit_template" value="1"<?php if ($perm["edit_template"]) { ?> checked<?php } ?>> Edit templates<br> - <input type="checkbox" name="perm_delete_own" value="1"<?php if ($perm["delete_own"]) { ?> checked<?php } ?>> Delete own domains<br> - <input type="checkbox" name="perm_delete_other" value="1"<?php if ($perm["delete_other"]) { ?> checked<?php } ?>> Delete other domains<br> - <input type="checkbox" name="perm_delete_template" value="1"<?php if ($perm["delete_template"]) { ?> checked<?php } ?>> Delete templates + <?php if ($permission == 2) { ?> + <input type="checkbox" name="perm_superuser" value="1"<?php if ($perm["raw"] == 2) { ?> checked<?php } ?>> <? echo _SUPERUSER; ?><br> + <input type="checkbox" name="perm_users" value="1"<?php if ($perm["users"]) { ?> checked<?php } ?>> <? echo _USERADMIN; ?><br><br> + <?php } ?> + <input type="checkbox" name="perm_new" value="1"<?php if ($perm["new"]) { ?> checked<?php } ?>> <? echo _NEWDOMAINS; ?><br> + <input type="checkbox" name="perm_new_template" value="1"<?php if ($perm["new_template"]) { ?> checked<?php } ?>> <? echo _NEWTEMPLATES; ?><br> + <input type="checkbox" name="perm_edit_own" value="1"<?php if ($perm["edit_own"]) { ?> checked<?php } ?>> <? echo _EDITOWNDOMS; ?><br> + <input type="checkbox" name="perm_edit_other" value="1"<?php if ($perm["edit_other"]) { ?> checked<?php } ?>> <? echo _EDITOTHERDOMS; ?><br> + <input type="checkbox" name="perm_edit_template" value="1"<?php if ($perm["edit_template"]) { ?> checked<?php } ?>> <? echo _EDITTEMPS; ?><br> + <input type="checkbox" name="perm_delete_own" value="1"<?php if ($perm["delete_own"]) { ?> checked<?php } ?>> <? echo _DELOWNDOMS; ?><br> + <input type="checkbox" name="perm_delete_other" value="1"<?php if ($perm["delete_other"]) { ?> checked<?php } ?>> <? echo _DELOTHERDOMS; ?><br> + <input type="checkbox" name="perm_delete_template" value="1"<?php if ($perm["delete_template"]) { ?> checked<?php } ?>> <? echo _DELTEMPS; ?> </td> </tr> <tr> <td colspan="2" height="15"> </td> </tr> <tr> - <td colspan="2">Only type anything here if you want to<br>change password</td> + <td colspan="2"><? echo _TYPEIFNEED; ?><br><? echo _CHGPASS; ?></td> </tr> <tr> - <td><b>Password:</b></td> + <? echo "<td><b>"._PASSWORD.":</b></td>"; ?> <td><input type="password" name="password" size="20" maxlength="25" value=""></td> </tr> <tr> - <td nowrap><b>Confirm password:</b></td> + <? echo "<td nowrap><b>"._CONFIRMPASSWORD.":</b></td>"; ?> <td><input type="password" name="confirm_password" size="20" maxlength="25" value=""></td> </tr> <tr> - <td colspan="2" align="right"><input type="submit" value="Update"></td> + <td colspan="2" align="right"><input type="submit" value="<? echo _UPDATE; ?>"></td> </tr> </table> </form> @@ -98,7 +100,7 @@ } } else { - echo "<p class=\"error\">· User not found</p>\n"; + echo "<p class=\"error\">· "._USERNOTFND."</p>\n"; } $dbh->disconnect(); Index: publicdnsadmin/edit_zone.php diff -u publicdnsadmin/edit_zone.php:1.5 publicdnsadmin/edit_zone.php:1.6 --- publicdnsadmin/edit_zone.php:1.5 Sat Jul 19 06:46:31 2003 +++ publicdnsadmin/edit_zone.php Wed Aug 13 05:14:13 2003 @@ -17,12 +17,10 @@ $perms = getUserPermissions($_SESSION["_UID"]); $zoneid = trim(addslashes($_GET["id"])); -?> -<h3>Edit domain</h3> -<?php +echo "<h3>"._EDITDOMAIN."</h3>"; if ($perms["raw"] == 2) { ?> -<p><a href="zone_access.php?id=<?php echo $zoneid; ?>">Show zone users</a> - <a href="grant_access.php?id=<?php echo $zoneid; ?>">Grant user access</a></p> +<p><a href="zone_access.php?id=<?php echo $zoneid; ?>"><? echo _SHOWZONE; ?></a> - <a href="grant_access.php?id=<?php echo $zoneid; ?>"><? echo _GRANTUSERACC; ?></a></p> <?php } @@ -34,10 +32,10 @@ if ($perms["edit_other"] or userHasZoneAccess($_SESSION["_UID"], $zoneid) or ($perms["edit_own"] and $row["user_id"] == $_SESSION["_UID"])) { $records = getRecords($zoneid); - echo "<p>· <a href=\"new_record.php?zone=$zoneid\">New record</a></p>\n"; + echo "<p>· <a href=\"new_record.php?zone=$zoneid\">"._NEWRECORDUP."</a></p>\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"; + 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; @@ -96,7 +94,7 @@ 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>"; + 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=\""._DELRECORD."\" border=\"0\"></a>"; } else { echo " "; } @@ -109,11 +107,11 @@ echo "</table></td></tr></table></form>\n"; } else { - echo "<p class=\"error\">· You don't have permission to edit this domain</p>\n"; + echo "<p class=\"error\">· "._NOPERMSEDITDOM."</p>\n"; } } else { - echo "<p class=\"error\">· Zone not found</p>\n"; + echo "<p class=\"error\">· "._ZONENOTFND."</p>\n"; } $dbh->disconnect(); Index: publicdnsadmin/forgotten_pass.php diff -u publicdnsadmin/forgotten_pass.php:1.2 publicdnsadmin/forgotten_pass.php:1.3 --- publicdnsadmin/forgotten_pass.php:1.2 Tue Aug 12 15:44:24 2003 +++ publicdnsadmin/forgotten_pass.php Wed Aug 13 05:14:13 2003 @@ -11,9 +11,8 @@ */ require("lib/prepend.php"); require("lib/header.php"); -?> -<h3>Forgotten Pass</h3> -<? + +echo "<h3>". _FORGOTTENPASS ."</h3>"; if ($fetchpass == "1") { $dbh = db_connect(); @@ -27,8 +26,8 @@ $md5_pass = md5($newpass); $fromaddy = $contact_addy; - $subject = "Requested PublicDNSAdmin Password"; - $content = "Your password for $site_address is: $newpass. Please login and change it ASAP.<br><br>DNS Administrator"; + $subject = _REQUESTEDPASS; + $content = "". _PASSWORDFOR ." $site_address ". _IS .": $newpass. ". _LOGINANDCHANGE .""; $headers .= "MIME-Version: 1.0\r\n"; $headers .= "Content-type: text/html; charset=iso-8859-1\r\n"; @@ -42,18 +41,18 @@ $dbh->query("UPDATE users SET password = '$md5_pass' WHERE username='$dbuser'"); echo "Email Has Been Sent"; } else { - echo "<p class=\"error\">Invalid username or email address."; + echo "<p class=\"error\">". _INVUSEROREMAIL ."."; } $dbh->disconnect(); } else { ?> <table> <form name="forgotpass" method="post"> - <tr><td>Username:</td><td><input type="text" name="username"></td></tr> - <tr><td>Email Address:</td><td><input type="text" name="emailaddy"></td><td>(The one we have in records)</td></tr> + <tr><td><? echo _USERNAME; ?>:</td><td><input type="text" name="username"></td></tr> + <tr><td><? echo _EMAIL; ?>:</td><td><input type="text" name="emailaddy"></td><td>(<? echo _ONEINRECORDS; ?>)</td></tr> <input type="hidden" name="fetchpass" value="1"> - <tr><td></td><td align="right"><input type="reset" value="Reset"> - <input type="submit" value="Submit"></td></tr> + <tr><td></td><td align="right"><input type="reset" value="<? echo _RESET; ?>"> + <input type="submit" value="<? echo _SUBMIT; ?>"></td></tr> </form> </table> <? Index: publicdnsadmin/gfx_code.php diff -u publicdnsadmin/gfx_code.php:1.3 publicdnsadmin/gfx_code.php:1.4 --- publicdnsadmin/gfx_code.php:1.3 Wed Aug 6 06:17:40 2003 +++ publicdnsadmin/gfx_code.php Wed Aug 13 05:14:13 2003 @@ -25,7 +25,7 @@ if ($SHOW_GFXUSRCHK && ($NEWUSERS_GFXCHECK || $LOGIN_GFXCHECK)) { $dbh = db_connect(); - if (!extension_loaded("gd")) { die("GD Library not present !"); } + if (!extension_loaded("gd")) { die("". _GDLIBUNAVAIL ." !"); } $ENABLE_COOKIE_TABLE = 1; $fontList = get_font_face_list(); @@ -42,9 +42,9 @@ img_label2($code_gen,$SPECIFIC_FONT2); } } else { - img_label("INVALID CRC !!!",$SPECIFIC_FONT,24,"#ff1111","#ffffff"); + img_label(_INVALIDCRC,$SPECIFIC_FONT,24,"#ff1111","#ffffff"); } } else { - die("Page is disabled."); + die("". _PAGEDISABLED ."."); } ?> Index: publicdnsadmin/grant_access.php diff -u publicdnsadmin/grant_access.php:1.1.1.1 publicdnsadmin/grant_access.php:1.2 --- publicdnsadmin/grant_access.php:1.1.1.1 Wed Apr 16 00:19:04 2003 +++ publicdnsadmin/grant_access.php Wed Aug 13 05:14:13 2003 @@ -17,9 +17,7 @@ if ($perms["raw"] == 2) { -?> -<h3>Grant zone access</h3> -<?php + echo "<h3>". _GRANTUSERACC ."</h3>"; $dbh = db_connect(); $result = $dbh->query("SELECT * FROM domains WHERE id = '$zoneid'"); @@ -30,11 +28,11 @@ <form action="set_access.php?id=<?php echo $zoneid; ?>" method="post"> <table border="0" cellspacing="0" cellpadding="2"> <tr> - <td><b>Zone:</b></td> + <? echo "<td><b>"._ZONE.":</b></td>"; ?> <td><?php echo htmlentities($zone_row["name"]); ?></td> </tr> <tr> - <td><b>User:</b></td> + <? echo "<td><b>"._USER.":</b></td>"; ?> <td><select name="user"> <?php $result = $dbh->query("SELECT id, username FROM users ORDER BY username"); @@ -47,14 +45,14 @@ </select></td> </tr> <tr> - <td colspan="2" align="right"><input type="submit" value="Grant"></td> + <td colspan="2" align="right"><input type="submit" value="<? echo _GRANT; ?>"></td> </tr> </table> </form> <?php } else { - echo "<p class=\"error\">· Zone not found</p>\n"; + echo "<p class=\"error\">· ". _ZONENOTFND ."</p>\n"; } $dbh->disconnect(); Index: publicdnsadmin/index.php diff -u publicdnsadmin/index.php:1.10 publicdnsadmin/index.php:1.11 --- publicdnsadmin/index.php:1.10 Tue Aug 12 19:56:57 2003 +++ publicdnsadmin/index.php Wed Aug 13 05:14:13 2003 @@ -20,13 +20,13 @@ if ($_SESSION["_UID"]) { +echo "<h3>"._MYDOMAINS."</h3>"; ?> -<h3>My domains</h3> -<p style="margin-bottom: 0px;"><b>Search:</b></p> +<p style="margin-bottom: 0px;"><b><? echo _SEARCH; ?>:</b></p> <form action="search.php" method="post" style="margin-top: 0px;"> <table border="0" cellspacing="0" cellpadding="6" class="row1" style="border: 1px solid #000000;"> <tr> - <td align="right"><b>Criteria:</b> <input type="text" name="query" size="10" value=""><br><input type="submit" value="Search"></td> + <td align="right"><b><? echo _CRITERIA; ?>:</b> <input type="text" name="query" size="10" value=""><br><input type="submit" value=<? echo _SEARCH; ?>></td> </tr> </table> </form> @@ -41,7 +41,7 @@ $offsetmin = $offset; $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"; + 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>"._CURRENTSERIAL."</th><th>"._OWNER."</th><th>"._RECORDS."</th><th> </th></tr>\n"; foreach ($zones as $zone) { $row_id++; @@ -83,10 +83,10 @@ 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> "; - echo " <a href=\"whois.php?id=".$zone["id"]."\"><img src=\"images/whois.gif\" height=20 width=20 alt=\"WHOIS Domain\" border=\"0\"></a> "; + echo " <a href=\"delete_zone.php?id=".$zone["id"]."\"><img src=\"images/trash.png\" alt=\""._DELZONE."\" border=\"0\"></a> "; + echo " <a href=\"whois.php?id=".$zone["id"]."\"><img src=\"images/whois.gif\" height=20 width=20 alt=\""._WHOISDOM."\" 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 " <a href=\"whois.php?id=".$zone["id"]."\"><img src=\"images/whois.gif\" height=20 width=20 alt=\""._WHOISDOM."\" border=\"0\"></a> "; } echo "</td>\n"; @@ -125,38 +125,35 @@ echo "</table></td></tr></table>\n"; $dbh->disconnect(); } else { - echo "<p>No zones available</p>\n"; + echo "<p>"._NOZONES."</p>\n"; } } else { -?> - -<h3>Login</h3> -<?php +echo "<h3>"._LOGIN."</h3>"; if ($_GET["error"] == 1) { if ($LOGIN_GFXCHECK) { - echo "<p class=\"error\">Login failed: invalid username/password/gfx code</p>"; + echo "<p class=\"error\">"._INVLOGINGFX."</p>"; } else { - echo "<p class=\"error\">Login failed: invalid username/password</p>"; + echo "<p class=\"error\">"._INVLOGIN."</p>"; } } elseif ($_GET["logout"] == 1) { - echo "<p>You have been logged out</p>"; + echo "<p>"._LOGGEDOUT."</p>"; } ?> <form action="login.php" method="post"> <table border="0" cellspacing="0" cellpadding="2"> <tr> - <td><b>Username:</b></td> + <? echo "<td><b>"._USERNAME.":</b></td>"; ?> <td><input type="text" name="username" size="25" maxlength="15" value=""></td> </tr> <tr> - <td><b>Password:</b></td> + <? echo "<td><b>"._PASSWORD.":</b></td>"; ?> <td><input type="password" name="password" size="25" maxlength="15" value=""></td> </tr> <tr><td> <? -echo "<b>Language:</b></td><td><select name='language'>"; +echo "<b>"._LANGUAGE.":</b></td><td><select name='language'>"; $handle=opendir('language'); while ($file = readdir($handle)) { if (ereg("^lang\-(.+)\.php", $file, $matches)) { @@ -182,7 +179,7 @@ if ($SHOW_GFXUSRCHK && $LOGIN_GFXCHECK) { ?> <tr> - <td><b>Security Check:</b></td> + <? echo "<td><b>"._SECCHECK.":</b></td>"; ?> <td> <? $dbh = db_connect(); @@ -204,7 +201,7 @@ ?> </tr> <tr> - <td colspan="2" align="right"><input type="reset" value="Reset"> <input type="submit" value="Login"></td> + <td colspan="2" align="right"><input type="reset" value="<? echo _RESET; ?>"> <input type="submit" value="<? echo _LOGIN; ?>"></td> </tr> </table> </form> Index: publicdnsadmin/language/lang-english.php diff -u publicdnsadmin/language/lang-english.php:1.1 publicdnsadmin/language/lang-english.php:1.2 --- publicdnsadmin/language/lang-english.php:1.1 Tue Aug 12 19:47:13 2003 +++ publicdnsadmin/language/lang-english.php Wed Aug 13 05:14:14 2003 @@ -46,6 +46,7 @@ define("_PASSWORD","Password"); define("_SECCHECK","Security Check"); define("_RESET","Reset"); +define("_SUBMIT","Submit"); define("_LOGIN","Login"); define("_RECORD","Record"); define("_TYPE","Type"); @@ -54,7 +55,8 @@ define("_TTL","TTL"); define("_TEMPLATENOTFND","Template not found"); define("_DELTEMPLATE","Delete template"); -define("_ALLRECDEL","and all records was successfully deleted"); +define("_THETEMPLATE","The template"); +define("_ALLRECDEL","and all records were successfully deleted"); define("_WISHTODELTEMPLATE","Are you sure you wish to delete the template"); define("_YES","Yes"); define("_NO","No"); @@ -81,7 +83,7 @@ define("_RECSUCESDEL","The record was successfully deleted"); define("_PROCEED","Proceed"); define("_NEWTEMPLATE","New template"); -define("_NEWRECORD","New record"); +define("_NEWRECORDUP","New record"); define("_NAME","Name"); define("_CREATE","Create"); define("_FORGOTTENPASS","Forgotten Pass"); @@ -146,7 +148,7 @@ define("_PERMISSIONS","Permissions"); define("_SUPERUSER","Superuser"); define("_NEWDOMAINS","New domains"); -define("_NEWTEMPLAYES","New templates"); +define("_NEWTEMPLATES","New templates"); define("_EDITOWNDOMS","Edit own domains"); define("_EDITOTHERDOMS","Edit other domains"); define("_EDITTEMPS","Edit templates"); @@ -176,8 +178,11 @@ define("_ZONERECNOTFND","Zone/record not found"); define("_BULKREG","Bulk registration"); define("_ONEDOMPERLINE","Type in one domain on each line"); -define("_NOTEMPSAVAIL","No templates are available. Please create a template"); -define("_BACKUPCREATED","The backup was successfully created. Click here to download"); +define("_NOTEMPSAVAIL","No templates are available. Please"); +define("_CREATEATEMP","create a template"); +define("_BEFORENEWDOM","before attempting to create a new domain"); +define("_BACKUPCREATED","The backup was successfully created."); +define("_BACKUPDOWNLOAD","Click here to download"); define("_TEMPRECNOTFND","Template/record not found"); define("_DOMAINSEARCH","Domain search"); define("_REVOKEZONEACC","Revoke zone access"); @@ -205,12 +210,13 @@ define("_NODOMAINS","No domain names entered"); define("_MISSINGINVDOM","Missing or invalid domain name"); define("_ZONECREATED","The zone was successfully created. Click"); +define("_CLICK","Click"); define("_HERE","here"); define("_TOEDIT","to edit"); define("_FIELDSMISSINGFILL","Some fields were missing. You must fill out the username, name, email and password-fields"); define("_USERCREATED","The user was successfully created"); define("_TEMPLATECREATED","The template was successfully created"); -define("_DOSNOTRESOLVE","does not resolve to"); +define("_DOESNOTRESOLVE","does not resolve to"); define("_LICENSEDUNDER","Licensed Under"); define("_REPORTBUGS","Report Bugs To"); define("_DBUNAVAIL","Unable to connect to database"); @@ -233,5 +239,25 @@ define("_CONTACT","Contact"); define("_CONFIGTERMSAVAIL","config.php and/or terms.php cannot be accessed, please make sure they exist and are readable by the webserver"); define("_LANGUAGE","Language"); +define("_ADD","Add"); +define("_RECWASADDED","The record was added"); +define("_INVALIDCRC","INVALID CRC !!!"); +define("_EMAIL","E-mail"); +define("_RECORDS","Records"); +define("_DOMAIN","Domain"); +define("_REVOKEUSER","Revoke user"); +define("_RECWASUPDATED","The record was updated"); +define("_QUERY","Query"); +define("_OWNER","... [truncated message content] |
From: Neil S. <sir...@us...> - 2003-08-13 23:43:03
|
CVSROOT : /cvsroot/publicdnsadmin Module : publicdnsadmin Commit time: 2003-08-13 23:19:10 UTC Modified files: edit_user.php users.php docs/CHANGELOG language/lang-english.php lib/footer.php Log message: Author: SiRVulcaN <sir...@si...> Log message: - Fixed a couple of missed translations. ---------------------- diff included ---------------------- Index: publicdnsadmin/docs/CHANGELOG diff -u publicdnsadmin/docs/CHANGELOG:1.35 publicdnsadmin/docs/CHANGELOG:1.36 --- publicdnsadmin/docs/CHANGELOG:1.35 Wed Aug 13 05:14:13 2003 +++ publicdnsadmin/docs/CHANGELOG Wed Aug 13 16:19:00 2003 @@ -20,3 +20,4 @@ - Added in first stage of multilanguage support. - Default selected language on the main login page is now $language. SiRVulcaN <sir...@si...> - 14/08/2003 - Second stage of multilanguage support added, fully works now. + - Fixed a couple of missed translations. Index: publicdnsadmin/edit_user.php diff -u publicdnsadmin/edit_user.php:1.2 publicdnsadmin/edit_user.php:1.3 --- publicdnsadmin/edit_user.php:1.2 Wed Aug 13 05:14:13 2003 +++ publicdnsadmin/edit_user.php Wed Aug 13 16:19:00 2003 @@ -40,7 +40,7 @@ ?> <form action="update_user.php?id=<?php echo $userid; ?>" method="post"> -<p><b>Username:</b> <?php echo htmlentities($row["username"]); ?></p> +<p><b><? echo _USERNAME; ?>:</b> <?php echo htmlentities($row["username"]); ?></p> <table border="0" cellspacing="0" cellpadding="2"> <tr> <? echo "<td><b>"._NAME.":</b></td>"; ?> Index: publicdnsadmin/language/lang-english.php diff -u publicdnsadmin/language/lang-english.php:1.2 publicdnsadmin/language/lang-english.php:1.3 --- publicdnsadmin/language/lang-english.php:1.2 Wed Aug 13 05:14:14 2003 +++ publicdnsadmin/language/lang-english.php Wed Aug 13 16:19:00 2003 @@ -217,6 +217,7 @@ define("_USERCREATED","The user was successfully created"); define("_TEMPLATECREATED","The template was successfully created"); define("_DOESNOTRESOLVE","does not resolve to"); +define("_POWEREDBY","Powered By"); define("_LICENSEDUNDER","Licensed Under"); define("_REPORTBUGS","Report Bugs To"); define("_DBUNAVAIL","Unable to connect to database"); Index: publicdnsadmin/lib/footer.php diff -u publicdnsadmin/lib/footer.php:1.8 publicdnsadmin/lib/footer.php:1.9 --- publicdnsadmin/lib/footer.php:1.8 Wed Aug 13 05:14:14 2003 +++ publicdnsadmin/lib/footer.php Wed Aug 13 16:19:00 2003 @@ -7,7 +7,7 @@ Distributed under the GPL license, see LICENSE for more information - $Id: footer.php,v 1.8 2003/08/13 12:14:14 sirvulcan Exp $ + $Id: footer.php,v 1.9 2003/08/13 23:19:00 sirvulcan 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>, <? echo _LICENSEDUNDER; ?> <a href="http://www.gnu.org" target="_new">GNU/GPL.</a> <? echo _REPORTBUGS; ?>: + <? echo _POWEREDBY; ?> <a href="http://www.sirvulcan.org/" target="_new">Public DNS Administrator</a>, <? echo _LICENSEDUNDER; ?> <a href="http://www.gnu.org" target="_new">GNU/GPL.</a> <? echo _REPORTBUGS; ?>: <a href="http://sourceforge.net/tracker/?func=add&group_id=78804&atid=554506" target="_new">PublicDNSAdmin Bug Tracker</a>. </td> </tr> Index: publicdnsadmin/users.php diff -u publicdnsadmin/users.php:1.3 publicdnsadmin/users.php:1.4 --- publicdnsadmin/users.php:1.3 Wed Aug 13 05:14:13 2003 +++ publicdnsadmin/users.php Wed Aug 13 16:19:00 2003 @@ -23,7 +23,7 @@ $result = $dbh->query("SELECT * FROM users ORDER BY username"); if (!$dbh->isError($result) && $result->numRows()) { - echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><tr><td style=\"background: #000000;\"><table border=\"0\" cellspacing=\"1\" cellpadding=\"2\"><tr><th>". _USERNAME ."</th><th>Name</th><th>". _EMAIL ."</th><th>". _COMPANY ."</th><th>". _DOMAINS ."</th><th></th></tr>\n"; + echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><tr><td style=\"background: #000000;\"><table border=\"0\" cellspacing=\"1\" cellpadding=\"2\"><tr><th>". _USERNAME ."</th><th>". _NAME ."</th><th>". _EMAIL ."</th><th>". _COMPANY ."</th><th>". _DOMAINS ."</th><th></th></tr>\n"; $row_id = 0; while ($row = $result->fetchRow()) { ----------------------- End of diff ----------------------- |
From: Neil S. <sir...@us...> - 2003-09-20 14:39:57
|
CVSROOT : /cvsroot/publicdnsadmin Module : publicdnsadmin Commit time: 2003-09-20 14:39:22 UTC Modified files: edit_zone.php docs/CHANGELOG docs/TODO lib/header.php Log message: Author: SiRVulcaN <sir...@si...> Log message: - Fixed a issue with 2 lines around the wrong way, caused ip addresses not to display with PTR records. - Changed version to 1.4-dev. ---------------------- diff included ---------------------- Index: publicdnsadmin/docs/CHANGELOG diff -u publicdnsadmin/docs/CHANGELOG:1.36 publicdnsadmin/docs/CHANGELOG:1.37 --- publicdnsadmin/docs/CHANGELOG:1.36 Wed Aug 13 16:19:00 2003 +++ publicdnsadmin/docs/CHANGELOG Sat Sep 20 07:39:12 2003 @@ -1,23 +1,5 @@ $Id: -SiRVulcaN <sir...@si...> - 23/07/2003 - SQL Tweak. - - Released 1.2. -OUTsider <out...@ke...> - 03/08/2003 - Using ISO standard dates in CHANGELOG - (Let's agree that when a version gets release, we start with a fresh CHANGELOG) - - Bumped DEV version to 1.3 - - Made suport links open in new window. -OUTsider <out...@ke...> - 06/08/2003 - mysql does not support now()::abstime::int4, - thus gfxcheck was likely to fail. - - Fixed problem that some records/templates could not be updated - or created using postgres. This was coz prio was empty. -SiRVulcaN <sir...@si...> - 12/08/2003 - Disable prio field if a record type isnt MX. - - Deny loading publicdnsadmin index.php if config and term files are missing. - - Added index.html into the data dir to prevent the public from seeing the backups. -OUTsider <out...@ke...> - 12/08/2003 - Modified index.html to redirect clients to mainpage - - Copied index.html as index.php just in case. - - Added index.(html|php) in images/docs/lib -SiRVulcaN <sir...@si...> - 13/08/2003 - Fixed up some hardcoded addresses in signup.php and forgotten_pass.php - - Added in first stage of multilanguage support. - - Default selected language on the main login page is now $language. -SiRVulcaN <sir...@si...> - 14/08/2003 - Second stage of multilanguage support added, fully works now. - - Fixed a couple of missed translations. +SiRVulcaN <sir...@si...> - 21/09/2003 - Fixed a issue with 2 lines around the wrong way, caused ip + addresses not to display with PTR records. + - Changed version to 1.4-dev. Index: publicdnsadmin/docs/TODO diff -u publicdnsadmin/docs/TODO:1.17 publicdnsadmin/docs/TODO:1.18 --- publicdnsadmin/docs/TODO:1.17 Wed Aug 13 05:14:13 2003 +++ publicdnsadmin/docs/TODO Sat Sep 20 07:39:12 2003 @@ -1,6 +1,5 @@ - Some sort of maintenence news system (displayed on the main login page). - Syntax check records for validity to make it more fool proof. -- Make the mouseoverthingie mozilla proof as well. (sucky on Firebird) (working fine still for me -sirv) - poweradmin record validation dns.inc.php - use a error code system -- client_message(CODE, TYPE); Index: publicdnsadmin/edit_zone.php diff -u publicdnsadmin/edit_zone.php:1.6 publicdnsadmin/edit_zone.php:1.7 --- publicdnsadmin/edit_zone.php:1.6 Wed Aug 13 05:14:13 2003 +++ publicdnsadmin/edit_zone.php Sat Sep 20 07:39:12 2003 @@ -79,8 +79,8 @@ echo "<td bgcolor=\"$bgcolor\">".htmlentities($record["name"])."</td>\n"; } } else { - $dispaddy = $expaddy[3].".".$expaddy[2].".".$expaddy[1].".".$expaddy[0]; $expaddy = explode(".", htmlentities($record["name"])); + $dispaddy = $expaddy[3].".".$expaddy[2].".".$expaddy[1].".".$expaddy[0]; if ($record["type"] != "SOA") { echo "<td bgcolor=\"$bgcolor\"><a href=\"edit_record.php?id=".$record["id"]."\">".$dispaddy."</a></td>\n"; } else { Index: publicdnsadmin/lib/header.php diff -u publicdnsadmin/lib/header.php:1.19 publicdnsadmin/lib/header.php:1.20 --- publicdnsadmin/lib/header.php:1.19 Wed Aug 13 05:14:14 2003 +++ publicdnsadmin/lib/header.php Sat Sep 20 07:39:12 2003 @@ -7,7 +7,7 @@ Distributed under the GPL license, see LICENSE for more information - $Id: header.php,v 1.19 2003/08/13 12:14:14 sirvulcan Exp $ + $Id: header.php,v 1.20 2003/09/20 14:39:12 sirvulcan Exp $ */ ?> @@ -103,7 +103,7 @@ <table><tr><td> <img src="images/logo.gif"><br> </td></tr><tr><td align="right"> - <font face="verdana" size=1>Public DNS Administrator v1.3</font> + <font face="verdana" size=1>Public DNS Administrator v1.4-dev</font> </td></tr></table> <? ----------------------- End of diff ----------------------- |