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

<?
@session_start();
ob_start();
$useradmin = $_SESSION["useradmin"];
if(empty($useradmin)) 
{
echo "<script>alert('หน้านี้จำกัดเฉพาะ Admin เท่านั้น');history.back();</script>";
exit();
}
require_once "../include/tdate.php";
require_once "../include/connect.php";
require_once "../include/connectdb.php";

						  $sql="select * from useradmin where useradmin='$useradmin'";
						  $db_query=mysql_db_query($db,$sql);
						  $result=mysql_fetch_array($db_query);
						  $id=$result[id];
						  $adminname=$result[name];
						  $user_admin=$result[useradmin];
						  $pass_admin=$result[passadmin];
?>
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<!-- Fireworks MX Dreamweaver MX target.  Created Sat Apr 02 10:29:23 GMT+0700 (SE Asia Standard Time) 2011-->
<link href="../css/instyle.css" rel="stylesheet" type="text/css">
<script type="text/javascript">
function showAndHide(idShow, this_checked)
{
if(this_checked==true){
document.getElementById(idShow).style.display = '';
}else{
document.getElementById(idShow).style.display = 'none';
}
}
</script></head>
<body bgcolor="#ffffff">
<table width="1000" border="0" align="center" cellpadding="0" cellspacing="0">
  <!-- fwtable fwsrc="Untitled" fwbase="de_inx.jpg" fwstyle="Dreamweaver" fwdocid = "742308039" fwnested="0" -->
  <tr> 
    <td><img src="../images/spacer.gif" width="145" height="1" border="0" alt=""></td>
    <td><img src="../images/spacer.gif" width="98" height="1" border="0" alt=""></td>
    <td><img src="../images/spacer.gif" width="110" height="1" border="0" alt=""></td>
    <td><img src="../images/spacer.gif" width="109" height="1" border="0" alt=""></td>
    <td><img src="../images/spacer.gif" width="103" height="1" border="0" alt=""></td>
    <td><img src="../images/spacer.gif" width="127" height="1" border="0" alt=""></td>
    <td><img src="../images/spacer.gif" width="129" height="1" border="0" alt=""></td>
    <td><img src="../images/spacer.gif" width="97" height="1" border="0" alt=""></td>
    <td><img src="../images/spacer.gif" width="82" height="1" border="0" alt=""></td>
    <td><img src="../images/spacer.gif" width="1" height="1" border="0" alt=""></td>
  </tr>
  <tr> 
    <td rowspan="2" colspan="4">&nbsp;</td>
    <td colspan="5" background="../images/de_inx_r2_c5.jpg"><div align="center">ยินดีต้อนรับคุณ 
        <? echo "<u>$adminname</u>"; ?> เข้าใช้งานในระบบ 
        <br>
        [ <a href="ChangePass.php">เปลี่ยนรหัสผ่าน</a> 
        ] [ <a href="logout.php">ออกจากระบบ</a> 
        ] </div></td>
    <td><img src="../images/spacer.gif" width="1" height="43" border="0" alt=""></td>
  </tr>
  <tr> 
    <td colspan="5"><img name="de_inx_r3_c5" src="../images/de_inx_r3_c5-1.jpg" width="538" height="5" border="0" alt=""></td>
    <td><img src="../images/spacer.gif" width="1" height="5" border="0" alt=""></td>
  </tr>
  <tr> 
    <td colspan="9"> <div align="center">
        <table width="91%" border="0" align="center" cellpadding="1" cellspacing="1">
          <tr> 
            <td><div align="center"> 
                <table width="100%" border="0" cellspacing="1" cellpadding="1">
                  <tr> 
                    <td height="20" bgcolor=<? echo "$bgcolor"; ?>> <div align="left"> 
                        <input type="checkbox" id=check_type1 value="1" onClick="showAndHide('target1',this.checked)" name=check_type1 />
                        คลิกเพื่อแสดงเมนู  </div></td>
                  </tr>
                  <tr> 
                    <td height="5" bgcolor=<? echo "$bgcolor"; ?>> <div align="left" id=target1 style="display: none;"> 
                          
                        <? require_once "Menu.php";	  ?>
                      </div>
                      <div align="left"> </div>
                      <div id="target1" style="display: none;"></div>
                      <div align="left"> 
                        <div align="center"> </div>
                        </div></td>
                  </tr>
                </table>
              </div></td>
          </tr>
          <tr> 
            <td><table width="100%" border="0" cellspacing="1" cellpadding="1">
                <tr> 
                  <td><strong>:: 
                    รายการ ::</strong></td>
                </tr>
                <tr> 
                  <td><table width="100%" border="0" cellspacing="1" cellpadding="1">
                      <tr> 
                        <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"><div align="center"><strong>เลขที่</strong></div></td>
                                    <td width="249"><div align="center"><strong>ชื่อลูกค้า</strong></div></td>
                                    <td width="130"><div align="center"><strong>เรื่องที่ติดต่อ</strong></div></td>
                                    <td width="137"><div align="center"><strong>เมื่อวันที่</strong></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  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="SearchNow.php">
                                          <tr> 
                                            <td><input type="hidden" name="refid" value=<? echo "$refid"; ?>> 
                                              <input name="submit" type="submit" class="submitxx" 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></td>
                </tr>
              </table></td>
          </tr>
          <tr>
            <td>&nbsp;</td>
          </tr>
        </table>
        
      </div></td>
    <td><img src="../images/spacer.gif" width="1" height="13" border="0" alt=""></td>
  </tr>
  <tr> 
    <td colspan="9" background="../images/de_inx_r6_c1.jpg"><div align="center"><? echo "$buttomweb"; ?></div></td>
    <td><img src="../images/spacer.gif" width="1" height="19" border="0" alt=""></td>
  </tr>
</table>
</body>
</html>

T1KUS90T
  root-grov@210.1.60.28:~$