From: Neil S. <sir...@us...> - 2005-01-09 05:30:38
|
Committer : sirvulcan CVSROOT : /cvsroot/publicdnsadmin Module : publicdnsadmin Commit time: 2005-01-09 05:30:29 UTC Modified files: index.php search.php lib/header.php Log message: use utf-8 but decode it when querying the database. Mysql appears to handle unicode fine under its default character set but we cant query it with a unicode string, it has to be formatted back. In the future there could be option for what character set the sql db uses. ---------------------- diff included ---------------------- Index: publicdnsadmin/index.php diff -u publicdnsadmin/index.php:1.12 publicdnsadmin/index.php:1.13 --- publicdnsadmin/index.php:1.12 Sat Jan 8 20:41:40 2005 +++ publicdnsadmin/index.php Sat Jan 8 21:30:18 2005 @@ -9,7 +9,6 @@ $Id: */ -header('Content-Type: text/html; charset=UTF-8'); require("lib/prepend.php"); require("lib/header.php"); Index: publicdnsadmin/lib/header.php diff -u publicdnsadmin/lib/header.php:1.21 publicdnsadmin/lib/header.php:1.22 --- publicdnsadmin/lib/header.php:1.21 Wed Jan 5 18:27:40 2005 +++ publicdnsadmin/lib/header.php Sat Jan 8 21:30:19 2005 @@ -7,8 +7,10 @@ Distributed under the GPL license, see LICENSE for more information - $Id: header.php,v 1.21 2005/01/06 02:27:40 key2peace Exp $ + $Id: header.php,v 1.22 2005/01/09 05:30:19 sirvulcan Exp $ */ + +header('Content-Type: text/html; charset=UTF-8'); ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> Index: publicdnsadmin/search.php diff -u publicdnsadmin/search.php:1.2 publicdnsadmin/search.php:1.3 --- publicdnsadmin/search.php:1.2 Wed Aug 13 05:14:13 2003 +++ publicdnsadmin/search.php Sat Jan 8 21:30:18 2005 @@ -14,11 +14,12 @@ if ($_SESSION["_UID"]) { -$query = trim(addslashes($_POST["query"])); +$query = utf8_decode(trim(addslashes($_POST["query"]))); +$uquery = trim(addslashes($_POST["query"])); echo "<h3>"._DOMAINSEARCH."</h3>"; ?> -<p><? echo _QUERY; ?>: "<?php echo stripslashes($query); ?>"</p> +<p><? echo _QUERY; ?>: "<?php echo stripslashes($uquery); ?>"</p> <?php $zones = getUserZones($_SESSION["_UID"], $query); if (count($zones)) { ----------------------- End of diff ----------------------- |