?
Path : /home/admin/public_html/old/promice/ |
Current File : /home/admin/public_html/old/promice/search_akr.php |
<? include("header_kr.php");?> <style type="text/css"> <!-- .style4 {color: #0000FF} --> </style> <table width="1001" border="0" align="center" cellpadding="0" cellspacing="0"> <!-- fwtable fwsrc="Untitled" fwbase="home.jpg" fwstyle="Dreamweaver" fwdocid = "742308039" fwnested="0" --> <tr> <td width="423"><img src="images/spacer.gif" width="423" height="1" border="0" alt=""></td> <td width="16"><img src="images/spacer.gif" width="16" height="1" border="0" alt=""></td> <td width="225"><img src="images/spacer.gif" width="225" height="1" border="0" alt=""></td> <td width="315"><img src="images/spacer.gif" width="315" height="1" border="0" alt=""></td> <td width="21"><img src="images/spacer.gif" width="21" height="1" border="0" alt=""></td> <td width="10"><img src="images/spacer.gif" width="1" height="1" border="0" alt=""></td> </tr> <tr> <td colspan="5" bgcolor="#FFFFFF"><div align="center"> <table width="998" border="0" cellspacing="0" cellpadding="0"> <tr valign="top"> <td width="228"> </td> <td width="770"><table width="100%" border="0" cellspacing="1" cellpadding="1"> <tr> <td height="39" background="images/headtabb.jpg"> </td> </tr> <tr> <td><form id="form1" name="form1" method="post" action="search_akr.php"> <table width="897" border="0" cellpadding="00" cellspacing="0" > <tr> <td height="21" colspan="6">Search</td> </tr> <tr> <td width="60" > </td> <td width="155" > </td> <td width="149" > </td> <td >Category</td> <td > </td> <td width="151"> </td> </tr> <tr> <td > </td> <td ><input name="detail" type="text" id="detail" /></td> <td > </td> <td ><?php $sql2 = "select * From article_category_kr where id >= 8 AND id <= 60 "; $result2 = mysql_query($sql2); $Num_Rows2 = mysql_num_rows($result2); $result2 = mysql_query($sql2); echo "<select name=size id=size class=input>"; echo "<option value='Choose type article'>Choose type article"; While($row2= mysql_fetch_array($result2)){ $typecode = $row2["id"]; $typename = $row2["category_name"]; ?> <option value=<? echo "$typecode"; ?>><? echo "$typecode"; ?>-<? echo "$typename "; ?> <? } echo "</option></select>"; ?></td> <td > </td> <td> </td> </tr> <tr> <td > </td> <td > </td> <td > </td> <td width="136" > </td> <td width="116" > </td> <td rowspan="2"><input name="Submit" type="submit" class="inputxx" id="Submit" value="Search" /></td> </tr> <tr> <td > </td> <td height="20" > </td> <td > </td> <td > </td> <td > </td> </tr> </table> </form> </td> </tr> <tr> <td>News<strong> :</strong><strong> <a href="ProductList.php?PRD=<? echo "$_GET[PRD]"; ?>"> </a></strong></td> </tr> <tr> <td><? if($_POST[Submit]=="Search"){ $strSQL = "SELECT * FROM article_kr "; if($_POST["detail"] != "") { $strSQL .= " where detail LIKE '%".$_POST["detail"]."%' "; } if($_POST["size"] != "Choose type article") { $strSQL .= " and article_category_id = '".$_POST["size"]."' "; } mysql_query($strSQL); } ?><? $objConnect = mysql_connect("localhost","thebridges_mag","thebridges") or die(mysql_error()); $objDB = mysql_select_db("thebridges_mag"); $objQuery = mysql_query($strSQL); $Num_Rows = mysql_num_rows($objQuery); $Per_Page = 12; // Per Page $Page = $_GET["Page"]; if(!$_GET["Page"]) { $Page=1; } $Prev_Page = $Page-1; $Next_Page = $Page+1; $Page_Start = (($Per_Page*$Page)-$Per_Page); if($Num_Rows<=$Per_Page) { $Num_Pages =1; } else if(($Num_Rows % $Per_Page)==0) { $Num_Pages =($Num_Rows/$Per_Page) ; } else { $Num_Pages =($Num_Rows/$Per_Page)+1; $Num_Pages = (int)$Num_Pages; } $strSQL .=" "; $objQuery = mysql_query($strSQL); echo"<table border=\"0\" cellspacing=\"1\" cellpadding=\"1\"><tr>"; $intRows = 0; while($objResult = mysql_fetch_array($objQuery)) { echo "<td>"; $intRows++; $imagespicture = $objResult['images']; $idxs = $objResult['id']; ?> <center> <table width="402" height="138" border="0" cellpadding="0" cellspacing="0" background="images/images/bgmenu.jpg"> <tr> <td width="402"><div align="center"> <table width="402" border="0" cellpadding="0" cellspacing="0" bordercolor="#000099" background="images/bgtabb.jpg"> <tr> <td colspan="2" bgcolor="#FFFFFF"><div align="left" class="style4"><span style="font-size: 12pt;"> <?=substr($objResult["subject"],0,80);?> </span></div></td> </tr> <tr> <td width="165" rowspan="2" align="left" valign="top" bgcolor="#FFFFFF"><? if ($imagespicture==""){ echo " <img src='images/images_article/no_pic.jpg' WIDTH=150 HEIGHT=150 BORDER=0>"; }else { echo "<a href=contentkr.php?id=$idxs class=lightbox rel=flowers><img src='images/images_article/$imagespicture' WIDTH=150 HEIGHT=150 BORDER=0></a>" ; } ?></td> <td width="237" height="98" align="left" valign="top" bgcolor="#FFFFFF"><span style="color: #000; font-size: 12pt;"><?=substr($objResult["detail"],0,400);?> </span> <div align="right"></div></td> </tr> <tr> <td height="23" align="left" valign="top" bgcolor="#FFFFFF"><div align="right"><a href="contentkr.php?id=<? echo $objResult["id"];?>"><img src="readmore.jpg" width="82" height="18" border="0" /></a></div></td> </tr> </table> </div></td> </tr> </table> <br> <br> </center> <? echo"</td>"; if(($intRows)%2==0) { echo"</tr>"; } } echo"</tr></table>"; ?> <br> Total <?= $Num_Rows;?> Data </td> </tr> <tr> <td> </td> </tr> </table></td> </tr> </table> </div></td> <td><img src="images/spacer.gif" width="1" height="25" border="0" alt=""></td> </tr> </table><? include("footer.php");?> </body> </html>