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] |