From: Neil S. <sir...@us...> - 2005-01-09 04:42:01
|
Committer : sirvulcan CVSROOT : /cvsroot/publicdnsadmin Module : publicdnsadmin Commit time: 2005-01-09 04:41:51 UTC Modified files: create_zone.php index.php language/lang-english.php Log message: lets make use of this class, display the puny code if its a internation domain (on the my domains page). Fixed a missing language define Fixed a small error with create_zone.php that i had caused earlier. ---------------------- diff included ---------------------- Index: publicdnsadmin/create_zone.php diff -u publicdnsadmin/create_zone.php:1.3 publicdnsadmin/create_zone.php:1.4 --- publicdnsadmin/create_zone.php:1.3 Fri Jan 7 17:51:39 2005 +++ publicdnsadmin/create_zone.php Sat Jan 8 20:41:40 2005 @@ -111,7 +111,7 @@ if (!$domain) echo "<p class=\"error\">"._MISSINGINVDOM."</p>\n"; - } else { + else { $dbh = db_connect(); $result = $dbh->query("SELECT * FROM templates WHERE id = '$template'"); if (!$dbh->isError($result) && $result->numRows()) { Index: publicdnsadmin/index.php diff -u publicdnsadmin/index.php:1.11 publicdnsadmin/index.php:1.12 --- publicdnsadmin/index.php:1.11 Wed Aug 13 05:14:13 2003 +++ publicdnsadmin/index.php Sat Jan 8 20:41:40 2005 @@ -9,9 +9,14 @@ $Id: */ +header('Content-Type: text/html; charset=UTF-8'); + require("lib/prepend.php"); require("lib/header.php"); +require("lib/classes/idna_convert.class.php"); + + if (!extension_loaded("gd")) { // checking if LibGD is present in apache/php $SHOW_GFXUSRCHK = 0; } else { @@ -41,7 +46,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>"._CURRENTSERIAL."</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>"._PCODE."</th><th>"._CURRENTSERIAL."</th><th>"._OWNER."</th><th>"._RECORDS."</th><th> </th></tr>\n"; foreach ($zones as $zone) { $row_id++; @@ -69,6 +74,16 @@ $owner = htmlentities($tmprow["username"]); } + $IDN = new Net_IDNA(); + + $edomain = utf8_encode($zone["name"]); + $pcode = $IDN->encode($edomain, 'utf8'); + + if ($pcode == $zone["name"]) + $pcode = ""; + + $IDN = ``; + if (($row_count >= $offsetmin) && ($row_count <= $offsetmax)) { 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');\">"; @@ -77,6 +92,7 @@ } echo "<td bgcolor=\"$bgcolor\"><a href=\"edit_zone.php?id=".$zone["id"]."\">".htmlentities($zone["name"])."</a></td>\n"; + echo "<td bgcolor=\"$bgcolor\" align=\"right\">$pcode</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"; Index: publicdnsadmin/language/lang-english.php diff -u publicdnsadmin/language/lang-english.php:1.3 publicdnsadmin/language/lang-english.php:1.4 --- publicdnsadmin/language/lang-english.php:1.3 Wed Aug 13 16:19:00 2003 +++ publicdnsadmin/language/lang-english.php Sat Jan 8 20:41:40 2005 @@ -260,5 +260,7 @@ define("_DOMAINPERLINE","Domain Per Line"); define("_DOMAINOWNEREXIST","A domain with the same name already exists"); define("_TEMPLATENAME","Template name"); +define("_PCODE","Puny Code"); +define("_DELDOMAIN","Delete Domain"); ?> ----------------------- End of diff ----------------------- |