|
Server : Apache/2.2.2 (Fedora) System : Linux App1.pathumtani.go.th 2.6.20-1.2320.fc5smp #1 SMP Tue Jun 12 19:40:16 EDT 2007 i686 User : apache ( 48) PHP Version : 5.2.9 Disable Function : NONE Directory : /var/www/html/pathumthani_eoffice/application/bin/document_new/ |
Upload File : |
<?php
session_start();
include("../../config/config.inc.php");
header("Content-Type: text/html; charset=TIS-620");
function ascii_unicode_thai($text_input) {
$text_output = "";
for ($i=0;$i<126;$i++){
if (ord($text_input[$i])<=126)
$text_output .= $text_input[$i];
else
$text_output .= "&#".(ord($text_input[$i])-161+3585).";";
}
return $text_output;
}
//Get our database abstraction file
//require('database.php');
///Make sure that a value was sent.
if (isset($_GET['search']) && $_GET['search'] != '') {
//Add slashes to any quotes to avoid SQL problems.
$search2 = addslashes(urlencode($_GET['search']));
$search1 = (urldecode($_GET['search']));
$search = ($_GET['search']);
// echo $search."-".$search1."\n";
//Get every page title for the site.
$sql_code="
SELECT distinct
($table_staffgroup.gid) as gid,
($table_staffgroup.groupname) as suggest
FROM
$table_staffgroup
WHERE
$table_staffgroup .org_id = '2'
AND
$table_staffgroup.groupname like('%$search%')
ORDER BY
trim($table_staffgroup.groupname) ASC
";
$suggest_query = mysql_query($sql_code);
while($suggest = mysql_fetch_array($suggest_query)) {
//Return each page title seperated by a newline.
//echo $suggest['gid']."®".$suggest['suggest'] . "\n";
echo "<INPUT type=radio name=checkbox value=".nl2br($suggest[gid])."> ".nl2br($suggest[suggest]). " \n";
}
}
?>