| Server IP : 210.245.233.93 / Your IP : 216.73.216.226 Web Server : Apache/2.2.15 (CentOS) System : Linux webserver2.onesolution.com.hk 2.6.32-754.35.1.el6.x86_64 #1 SMP Sat Nov 7 12:42:14 UTC 2020 x86_64 User : apache ( 48) PHP Version : 5.3.3 Disable Function : exec, shell_exec, system, passthru, popen, proc_open, pcntl_exec MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /var/www/globavet.com/tc/ |
Upload File : |
<?php require_once('../webadmin/configure.php');
// Set up our error check and result check array
$error = array();
$results = array();
// Since this is a search we will use $_GET
$searchTerms = trim($_GET['s']);
if (isset($_GET['s']) && $searchTerms) {
//echo "searching $searchTerms <br/>";
$searchTerms = mysql_real_escape_string(strip_tags($searchTerms)); // remove any html/javascript.
$searchSQL = "SELECT
aboutus.aboutusid,
aboutus.title_en as TitleEN,
aboutus.desc_en as DescEN,
aboutus.title_tc as TitleTC,
aboutus.desc_tc as DescTC,
aboutus.sort,
aboutus.lastupdate,
CONCAT('aboutus.php?aboutusid=',aboutusid) as Href
FROM aboutus
WHERE title_en LIKE '%$searchTerms%' OR desc_en LIKE '%$searchTerms%'
OR title_tc LIKE '%{$searchTerms}%' OR desc_tc LIKE '%{$searchTerms}%'
UNION SELECT
services.servicesid,
services.title_en,
services.desc_en,
services.title_tc,
services.desc_tc,
services.sort,
services.lastupdate,
CONCAT('services.php?servicesid=',servicesid) as Href
FROM
services
WHERE title_en LIKE '%{$searchTerms}%' OR desc_en LIKE '%{$searchTerms}%'
OR title_tc LIKE '%{$searchTerms}%' OR desc_tc LIKE '%{$searchTerms}%'
UNION SELECT
clinic_spec.clinic_specid,
clinic_spec.title_en,
clinic_spec.desc_en,
clinic_spec.title_tc,
clinic_spec.desc_tc,
clinic_spec.sort,
clinic_spec.lastupdate,
CONCAT('clinic_spec.php?clinic_specid=',clinic_specid) AS Href
FROM
clinic_spec
WHERE title_en LIKE '%{$searchTerms}%' OR desc_en LIKE '%{$searchTerms}%'
OR title_tc LIKE '%{$searchTerms}%' OR desc_tc LIKE '%{$searchTerms}%'
UNION SELECT
cinfo.cinfoid,
cinfo.title_en,
cinfo.desc_en,
cinfo.title_tc,
cinfo.desc_tc,
cinfo.sort,
cinfo.lastupdate,
CONCAT('info.php?infoid=',cinfoid) AS Href
FROM
cinfo
WHERE title_en LIKE '%{$searchTerms}%' OR desc_en LIKE '%{$searchTerms}%'
OR title_tc LIKE '%{$searchTerms}%' OR desc_tc LIKE '%{$searchTerms}%'
UNION SELECT
News.NewsId,
News.TitleEN,
News.DescEN,
News.TitleTC,
News.DescTC,
News.Sort,
News.Timestamp,
News.Href
FROM News
WHERE TitleEN LIKE '%{$searchTerms}%' OR DescEN LIKE '%{$searchTerms}%'
OR TitleTC LIKE '%{$searchTerms}%' OR DescTC LIKE '%{$searchTerms}%'
ORDER BY lastupdate DESC";
//echo "SQL $searchSQL <br/>";
$searchResult = mysql_query($searchSQL) or trigger_error("錯誤<br/>" . mysql_error() . "<br />SQL Was: {$searchSQL}");
if (mysql_num_rows($searchResult) < 1) {
$error[] = "找不到和您的查詢 {$searchTerms} 相符的資料";
}else {
$results = array(); // the result array
$i = 1;
while ($row = mysql_fetch_assoc($searchResult)) {
$tempResult = "{$i}: <strong>{$row['TitleEN']} {$row['TitleTC']}</strong><br />";
$strTitleEN = stristr($row['TitleEN'], $searchTerms);
$strTitleTC = stristr($row['TitleTC'], $searchTerms);
$strDescEN = stristr($row['DescEN'], $searchTerms);
$strDescEN = mb_substr ($strDescEN, 0, 500);
$strDescTC = stristr($row['DescTC'], $searchTerms);
$strDescTC = mb_substr ($strDescTC, 0, 500);
if ($strDescEN) {
$tempResult .= $strDescEN. "<br />";
}
elseif ($strDescTC) {
$tempResult .= $strDescTC. "<br />";
}
$tempResult .= "<a href='{$row['Href']}'>更多... </a><br /><hr /><br />";
$results[] = $tempResult;
$i++;
}
}
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Victory Animal Hospital</title>
<meta name="keywords" content="Victory Animal Hospital,獸醫,獸醫診所,動物醫院,veterinary,animal hospital,veterinary clinic,Vet,動物診所,Animal hospitals,Veterinarian,Vet clinic,Vet specialist,Vet Hospital">
<meta name="description" content="Victory Animal Hospital " />
<link rel="stylesheet" type="text/css" href="../css/style.css" />
<link rel="stylesheet" type="text/css" href="../css/jqueryslidemenu.css" />
<!--[if lte IE 7]>
<style type="text/css">
html .jqueryslidemenu{height: 1%;} /*Holly Hack for IE7 and below*/
</style>
<![endif]-->
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js"></script>
<script type="text/javascript" src="../js/jqueryslidemenu.js"></script>
</head>
<body>
<table width="1000" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="400" align="left" valign="top" style="background-image:url(../images/banner.jpg)">
<div id="headerlogo"><a href="home.php"><img src="../images/blank.png" width="330" height="100" /></a></div>
<table border="0" cellpadding="0" cellspacing="0" class="headerlang" id="headerlangtable">
<tr>
<td><a href="../en/<?=basename($_SERVER['PHP_SELF'])."?".$_SERVER['QUERY_STRING'];?>">ENGLISH</a> <a href="../tc/<?=basename($_SERVER['PHP_SELF'])."?".$_SERVER['QUERY_STRING'];?>">中文</a> </td>
</tr>
</table>
<div id="mapsearch-codesearch">
<form action="search.php">
<input type="text" class="codesearchbox" name="s" value="" />
<input name="image" type="image" class="codesearchbox_submit" value="" src="../images/blank.png" />
</form>
</div></td>
</tr>
<tr>
<td align="left" valign="top"><div id="myslidemenu" class="jqueryslidemenu">
<ul>
<li><a href="home.php">主頁</a></li>
<li><a href="news.php">最新消息</a></li>
<li><a href="aboutus.php">關於我們</a></li>
<li><a href="services.php">我們的服務</a></li>
<li><a href="clinic_spec.php">專科醫生服務</a></li>
<li><a href="info.php">客戶與寵物資訊</a></li>
<li><a href="https://eshop.victoryanimalhospital.com" target="_blank">寵物食品送貨服務</a></li>
<li><a href="contactus.php">聯絡我們</a></li>
</ul>
<br style="clear: left" />
</div></td>
</tr>
<tr>
<td width="235" align="left" valign="top" class="pagetitlebg"><table width="970" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="235" class="pagetitle1">搜尋</td>
<td width="22" class="pagetitle1"><img src="../images/icon_title.jpg" width="22" height="24" /></td>
<td width="713" class="pagetitle2"><?="搜尋 '{$searchTerms}' 結果:"?></td>
</tr>
</table></td>
</tr>
<tr>
<td align="left" valign="top" bgcolor="#FFFFFF" class="pagecontentbg"><table width="700" border="0" cellpadding="0" cellspacing="0"id="pagecontent">
<tr>
<td align="left" valign="top" class="pagecontenttxt">
<?php echo (count($error) > 0)?"錯誤:<br /><span id=\"error\">" . implode("<br />", $error) . "</span><br /><br />":""; ?>
<?php echo (count($results) > 0)?"" . implode("", $results):""; ?>
<!-- End Page Content --></td>
</tr>
</table>
<table width="210" border="0" cellpadding="0" cellspacing="0" id="submenu">
</table></td>
</tr>
<tr>
<td align="center" valign="middle" class="footer">Copyright © 2017 Globavet Limited. All rights reserved. | Powered by <a href="http://www.onesolution.com.hk" target="_blank">One Solution Limited</a>. </td>
</tr>
</table>
</body>
</html>