| Current Path : /var/www/html/mmishra/indem/old/indem/icdp/ |
| Current File : /var/www/html/mmishra/indem/old/indem/icdp/search.php |
<html>
<head>
<link href="css/style.css" media="screen" rel="stylesheet" type="text/css" />
</head>
<body>
<?php
require("functions.php");
$q = $_REQUEST["q"];
echo "<b>Search result on [ $q ]</b><br>";
mysql_connect("localhost", "root", "mysql");
mysql_select_db("icdp");
$tbl = 'webpages';
$rs = mysql_query("select * from $tbl where visibility<>'disable' and CONCAT(pagecontent, keyword) like '%$q%'");
while ($o = mysql_fetch_object($rs)) {
echo "<br><a href='inner.php?conf=$o->pageid'>$o->hypertext</a>
<span class='datetime'>[ dated $o->datecreation, $o->counter times ]</span>
<div class='description'>".strip_tags(substr($o->pagecontent,0,200)) . "...</div>";
$find = TRUE;
}
if (!$find) echo "<br>None<br>";
?>
</body>
</html>