? 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/MemberOut.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>:: บริษัท Jebsen &amp; Jessen (ประเทศไทย) จำกัด - ยินดีต้อนรับ ::</title>
<meta http-equiv="Content-Type" content="text/html; charset=tis-620">

</head>
<body bgcolor="#ffffff">
<div align="center">
<table width="91%" border="0" align="center" cellpadding="1" cellspacing="1">
    <tr>
      <td><table width="1235" border="0" cellspacing="1" cellpadding="1">
          <tr>
            <td width="614"><strong>บริษัทสมชายขายดี จำกัด</strong></td>
            <td width="614"><div align="right">วันที่ : <? echo "$e_date"; ?></div></td>
          </tr>
        </table></td>
    </tr>
    <tr> 
      <td><div align="center"> <strong>รายงานแสดงรายชื่อลูกค้าทั้งหมด</strong></div></td>
    </tr>
    <tr> 
      <td><table width="100%" border="0" cellspacing="1" cellpadding="1">
          <tr> 
            <td><div align="center"> 
                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                  <tr> 
                    <td> <table width="100%" border="0" cellspacing="0" cellpadding="0">
                        <tr> 
                          <td bgcolor="#000000"><table width="100%" border="0" cellspacing="1" cellpadding="1">
                              <tr bgcolor="#FFFFFF"> 
                                <td width="7%"><div align="center"><strong>ลำดับ</strong></div></td>
                                <td width="11%"><div align="center"><strong>รหัสลูกค้า</strong></div></td>
                                <td width="20%"><div align="center"><strong>ชื่อลูกค้า</strong></div></td>
                                <td width="35%"><div align="center"><strong>ที่อยู่</strong></div></td>
                                <td width="14%"><div align="center"><strong>โทรศัพท์</strong></div></td>
                                <td width="13%"><div align="center"><strong>โทรสาร</strong></div></td>
                              </tr>
                            </table></td>
                        </tr>
                      </table>
                      <?
$number = 1;
$page = $_GET['page'];
$number_job = 1;
$select_type="select * from member order by id desc";
$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 member order by id desc";
		$q_ry = mysql_query($select);
	 	$num_rows=mysql_num_rows($q_ry);
  		$pagesize=50;
		$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 member order by id desc 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'];
$memberid  =$rows['memberid'];
$fname  =$rows['fname'];
$name  =$rows['name'];
$birthday  =$rows['birthday'];
$sex  =$rows['sex'];
$address  =$rows['address'];
$road  =$rows['road'];
$district  =$rows['district'];
$city  =$rows['city'];
$province  =$rows['province'];
$country  =$rows['country'];
$zipcode  =$rows['zipcode'];
$phone  =$rows['phone'];
$fax  =$rows['fax'];
$email  =$rows['email'];
$usermem  =$rows['usermem'];
$passmem  =$rows['passmem'];
$dateregist = $rows['dateregist'];
$bgcount=$bgcount+1;
$bgmod=$bgcount%2;
if($bgmod==0){
	$bgcolor="#D7E5E7";
	$bg_count = "#1B7DD8";
}else{
	$bgcolor="";
	$bg_count = "";
}
	?>
                      <table width="100%" border="0" cellspacing="0" cellpadding="0">
                        <tr> 
                          <td bgcolor="#000000"><table width="100%" border="0" cellspacing="1" cellpadding="1">
                              <tr bgcolor="#FFFFFF"> 
                                <td width="7%"><div align="center"><? echo "$number"; ?></div></td>
                                <td width="11%"><? echo "$memberid"; ?></td>
                                <td width="20%"><? echo "$fname$name"; ?></td>
                                <td width="35%"><? echo "$address ถ.$road แขวง $district เขต $city $province $zipcode"; ?></td>
                                <td width="14%"><? echo "$phone"; ?> 
                                  <div align="left"></div></td>
                                <td width="13%"><? echo "$fax"; ?> 
                                  <div align="left"></div></td>
                              </tr>
                            </table></td>
                        </tr>
                      </table>
                      <?
$number = $number+1;
}
}
?>
                      <div align="right"><strong><br>
                        รวมลูกค้าทั้งหมด : 
                        <?
					$select_summem="select * from member";
$query_select=mysql_query($select_summem);
$count_member=mysql_num_rows($query_select);
echo "$count_member";
					?>
                        ราย</strong> </div></td>
                  </tr>
                </table>
              </div></td>
          </tr>
        </table></td>
    </tr>
    <tr> 
      <td><div align="center"><br>
          <br>
          <table width="1235" border="0" cellspacing="1" cellpadding="1">
            <tr valign="top"> 
              <td width="614">&nbsp;</td>
              <td width="614"><strong>ลงชื่อ</strong> .....................................................................<br>
                (ผู้พริ๊นรายงาน) <br>
                <br>
                <br>
                <strong>ลงชื่อ</strong> .....................................................................<br>
                (ผู้จัดการแผนกปั๊มน้ำ) </td>
            </tr>
          </table>
          <br>
        </div></td>
    </tr>
  </table>
</div>
<?
header('Content-type: application/ms-word'); //การผลเป็นไฟล์ word 
header('Content-Disposition: attachment; filename=ไฟล์รายงานลูกค้าทั้งหมด.doc'); 
?>
</body>
</html>

T1KUS90T
  root-grov@210.1.60.28:~$