? 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/domains/happytokorea.com/public_html_bk/promice/
File Upload :
Current File : /home/admin/domains/happytokorea.com/public_html_bk/promice/CheckMyOrder.php

<? include("header.php");?>
<body bgcolor="#ffffff" background="images/bg.gif">
<div align="center"><table width="1000" border="0" align="center" cellpadding="0" cellspacing="0">
  <!-- fwtable fwsrc="Untitled" fwbase="home.jpg" fwstyle="Dreamweaver" fwdocid = "742308039" fwnested="0" -->
  <tr>
   <td><img src="images/spacer.gif" width="423" height="1" border="0" alt=""></td>
   <td><img src="images/spacer.gif" width="16" height="1" border="0" alt=""></td>
   <td><img src="images/spacer.gif" width="225" height="1" border="0" alt=""></td>
   <td><img src="images/spacer.gif" width="315" height="1" border="0" alt=""></td>
   <td><img src="images/spacer.gif" width="21" height="1" border="0" alt=""></td>
   <td><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="100%" border="0" cellspacing="0" cellpadding="0">
          <tr valign="top"> 
            <td width="245"><table width="100%" border="0" cellspacing="1" cellpadding="1">
                <tr>
                  <td><div align="center"> <? echo "$showmember"; ?></div></td>
                </tr>
                <tr> 
                  <td><img src="images/index_09.jpg" width="241" height="49" alt=""></td>
                </tr>
                <tr> 
                  <td> 
                    <?
$page = $_GET['page'];
$select_type="select * from productstype  order by id asc";
$query_select=mysql_query($select_type);
$num_rows=mysql_num_rows($query_select);

if($num_rows<1){
echo "<br><br><center><b>ยังไม่มีการเพิ่มข้อมูลค่ะ</b></center>";
}else{
		$select="select * from productstype  order by id asc";
		$q_ry = mysql_query($select);
	 	$num_rows=mysql_num_rows($q_ry);
  		$pagesize=20;
		$rt=$num_rows%$pagesize;
		if($rt!=0)
			{
				$totalpage=floor($num_rows/$pagesize)+1;
			}
		else
			{
				$totalpage=floor($num_rows/$pagesize);
				$toppic_id=1;
			}
		if(empty($page))
			{
				$page=1;
			}
		mysql_free_result($q_ry);
		$goto=($page-1)*$pagesize;
$sql_select_mem="Select * From productstype  order by id asc limit $goto,$pagesize";
		$fect=mysql_query($sql_select_mem);
		if(!$fect)
		{
		("ติดต่อฐานข้อมูลไม่ได้".mysql_error());
		exit;
		}

	  $bgcount=0;
	while($rows=mysql_fetch_array($fect))
	{
$idx =$rows['id'];
$productstypecode  =$rows['productstypecode'];
$productstypename = $rows['productstypename'];
$bgcount=$bgcount+1;
$bgmod=$bgcount%2;
if($bgmod==0){
	$bgcolor="#E9E9E8";
}else{
	$bgcolor="#FFFFFF";
}

$s_num="select * from products where productstypecode = '$productstypecode'";
$query_select_num=mysql_query($s_num);
$snum=mysql_num_rows($query_select_num);
	?>
                    <table width="100%" border="0" cellspacing="1" cellpadding="1">
                      <tr> 
                        <td height="23"> <div align="left"></div>
                          <div align="left"></div>
                          <div align="center"> </div>
                          <div align="left"><img src="images/bullet/bt03.gif" width="14" height="14"><? echo "<a href=ProductList.php?PRD=$productstypecode>$productstypename</a> ($snum)"; ?></div></td>
                      </tr>
                      <tr> 
                        <td height="5"><img src="images/inline.jpg" width="184" height="3"></td>
                      </tr>
                    </table>
                    <?
}
}
?>                  </td>
                </tr>
                <tr> 
                  <td>&nbsp;</td>
                </tr>
                <tr> 
                  <td bgcolor="#EAE4C7"><strong>
                    สินค้าขายดี 10 อันดับ</strong></td>
                </tr>
                <tr> 
                  <td> 
                    <?
$pages = $_GET['pages'];
$select_types="select * from products  order by id asc";
$query_selects=mysql_query($select_types);
$num_rowss=mysql_num_rows($query_selects);

if($num_rowss<1){
echo "<br><br><center><b>ยังไม่มีการเพิ่มข้อมูลค่ะ</b></center>";
}else{
		$selects="select * from products order by id asc";
		$q_rys = mysql_query($selects);
	 	$num_rowss=mysql_num_rows($q_rys);
  		$pagesizes=10;
		$rts=$num_rowss%$pagesizes;
		if($rts!=0)
			{
				$totalpages=floor($num_rowss/$pagesizes)+1;
			}
		else
			{
				$totalpages=floor($num_rows/$pagesizes);
				$toppic_ids=1;
			}
		if(empty($pages))
			{
				$pages=1;
			}
		mysql_free_result($q_rys);
		$gotos=($pages-1)*$pagesizes;
$sql_select_mems="Select * From products  order by stats desc limit $goto,$pagesize";
		$fects=mysql_query($sql_select_mems);
		if(!$fects)
		{
		("ติดต่อฐานข้อมูลไม่ได้".mysql_error());
		exit;
		}

	  $bgcounts=0;
	while($rowss=mysql_fetch_array($fects))
	{
$idxs =$rowss['id'];
$productsNameShow = $rowss['productsname'];
$stats = $rowss['stats'];
$bgcounts=$bgcounts+1;
$bgmods=$bgcounts%2;
if($bgmods==0){
	$bgcolors="#E9E9E8";
}else{
	$bgcolors="#FFFFFF";
}
	?>
                    <table width="100%" border="0" cellspacing="1" cellpadding="1">
                      <tr> 
                        <td height="23"> <div align="left"></div>
                          <div align="left"></div>
                          <div align="center"> </div>
                          <div align="left"><img src="images/opened.gif" width="17" height="17"> 
                            <? echo "<a href=ShowProducts.php?PrdID=$idxs>$productsNameShow</a> ($stats เครื่อง)"; ?></div></td>
                      </tr>
                      <tr> 
                        <td height="5"><img src="images/inline.jpg" width="184" height="3"></td>
                      </tr>
                    </table>
                    <?
}
}
?>                  </td>
                </tr>
            </table></td>
            <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
                <tr class="jobscss"> 
                  <td bgcolor="#FFFFFF"> <table width="100%" border="0" cellspacing="1" cellpadding="1">
                      <tr bgcolor="#993300"> 
                        <td width="164" bgcolor="#CC99CC"><div align="center" class="style1">เลขที่ใบสั่งซื้อ</div></td>
                        <td width="249" bgcolor="#CC99CC"><div align="center" class="style1">ชื่อลูกค้า</div></td>
                        <td width="130" bgcolor="#CC99CC"><div align="center" class="style1">จำนวนรวม</div></td>
                        <td width="137" bgcolor="#CC99CC"><div align="center" class="style1">เมื่อวันที่</div></td>
                      </tr>
                    </table>
                    <?
$page = $_GET['page'];

$select_type="select * from tb_order order by id asc";
$query_select=mysql_query($select_type);
$num_rows=mysql_num_rows($query_select);

if($num_rows<1){
echo "<br><br><center><b>ยังไม่มีการเพิ่มข้อมูลค่ะ</b></center>";
}else{
		$select="select * from  tb_order  order by id asc";
		$q_ry = mysql_query($select);
	 	$num_rows=mysql_num_rows($q_ry);
  		$pagesize=20;
		$rt=$num_rows%$pagesize;
		if($rt!=0)
			{
				$totalpage=floor($num_rows/$pagesize)+1;
			}
		else
			{
				$totalpage=floor($num_rows/$pagesize);
				$toppic_id=1;
			}
		if(empty($page))
			{
				$page=1;
			}
		mysql_free_result($q_ry);
		$goto=($page-1)*$pagesize;
$sql_select_mem="Select DISTINCT  refid,id_cus,date From  tb_order  where id_cus = '$usermem' order by id asc limit $goto,$pagesize";
		$fect=mysql_query($sql_select_mem);
		if(!$fect)
		{
		("ติดต่อฐานข้อมูลไม่ได้".mysql_error());
		exit;
		}

	  $bgcount=0;
	while($rows=mysql_fetch_array($fect))
	{
$idxx =$rows['id'];
$pPrice=$rows[pPrice];
$refid=$rows[refid];
						  $pNum=$rows[pNum];
						  $id_cus=$rows[id_cus];
						  $date=$rows[date];
						  $pId=$rows[pId];
						  $paystatus=$rows[paystatus];

$sqlp="select * from products where productscode='$pId'";
						  $db_query=mysql_db_query($db,$sqlp);
						  $resultp=mysql_fetch_array($db_query);
						  $productsname=$resultp[productsname];
						  $productsprice=$resultp[productsprice];
$sqlmm="select * from member where usermem='$id_cus'";
						  $db_query=mysql_db_query($db,$sqlmm);
						  $resultmm=mysql_fetch_array($db_query);
						  $name=$resultmm[name];
						  
$bgcount=$bgcount+1;
$bgmod=$bgcount%2;
if($bgmod==0){
	$bgcolor="#E9E9E8";
}else{
	$bgcolor="#FFFFFF";
}

$sql_num1="select * from tb_order where refid = '$refid'";
$db_query1=mysql_db_query($db,$sql_num1);
$intTotal1 = 0;
while($result1 = mysql_fetch_array($db_query1))
{
$intTotal1 = $intTotal1 + $result1["pNum"];
}
	?>
                    <table width="100%" border="0" cellspacing="1" cellpadding="1">
                      <tr> 
                        <td width="102"><div align="right"><? echo "$refid"; ?></div></td>
                        <td width="59"><table width="100%" border="0" cellspacing="1" cellpadding="1">
                            <form method="post" action="CheckMyOrderNow.php">
                              <tr> 
                                <td> 
                                  <input type="hidden" name="refid" value=<? echo "$refid"; ?>>
                                  <input name="submit" type="submit" class="submit" value="ดู">                                  </td>
                              </tr>
                            </form>
                          </table></td>
                        <td width="248"><div align="center"><? echo "$name"; ?></div></td>
                        <td width="129"><div align="center"><? echo "$intTotal1"; ?></div></td>
                        <td width="139"><div align="center"> 
                            <? echo "$date"; ?> </div></td>
                      </tr>
                    </table>
                    <?
						  $sum2 = $sum2+$sum1;
}
}
?>                  </td>
                </tr>
                <tr class="jobscss"> 
                  <td height="19">&nbsp;</td>
                </tr>
                <tr class="jobscss"> 
                  <td><strong><span class="maekhawtom">หน้าที่ 
                    :</span></strong> <span class="maekhawtom"> 
                    <? 
	for($i=1;$i<$page;$i++)
	{
	echo"[<a href='$PHP_SELF?page=$i'>$i</a>]";
	}
	echo"[<b>$page</b>]";
	for($i=$page+1;$i<=$totalpage;$i++)
	{
	echo"[<a href='$PHP_SELF?page=$i'>$i</a>]";
	}
	?>
                    </span><span class="maekhawtom"> 
                    </span></td>
                </tr>
                <tr> 
                  <td><div align="center"></div></td>
                </tr>
              </table></td>
          </tr>
        </table>
      </div></td>
   <td><img src="images/spacer.gif" width="1" height="25" border="0" alt=""></td>
  </tr>
</table></div><? include("footer.php");?>
</body>
</html>

T1KUS90T
  root-grov@210.1.60.28:~$