/home/bjcompany/domains/benjabhorn.com/public_html/BJconcrete/control/memberList.php


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
<?php 
    $rowPerPage
=30;
            if((!
$_GET['page'])||($_GET['page']==1)){
                        
$_GET['page']=1;
                        
$startRow=0;
            }else{
                    
$startRow=($_GET['page']-1)*$rowPerPage;
            }    
            
####################################################            
        
if($_POST['action']=='HistoryThis')    {
                    
$query="DELETE FROM  tbl_member_data  WHERE id='".$_POST['ID']."' ";    
                    
                    
mysql_query($query);
            }
    
####################################################
    
$query="SELECT * FROM tbl_member_data ORDER BY id DESC  ";
    
$queryLimit$query." LIMIT $startRow , $rowPerPage "    ;            
                
$result=mysql_query($queryLimit);
                
//echo $query;
                
                
$resultBrowse2=mysql_query($query);        
                
$xrow=mysql_num_rows($resultBrowse2);
                
$totalPage=ceil($xrow/$rowPerPage);        

            

?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<link href="style.css" rel="stylesheet" type="text/css" />
<script language="javascript">
            function historyThis(ids){
                    if(confirm('ต้องการลบ? ')){
                                document.form1.action.value='HistoryThis';
                                document.form1.ID.value=ids;
                                document.form1.submit();
                        }else{
                                    return false;
                            }
                
                }
</script>
</head>

<body><form action="<?php $_SERVER['PHP_SELF']?>" method="post" name="form1" enctype="multipart/form-data">
<table width="99%" border="0" align="center" cellpadding="2" cellspacing="2">
  <tr class="red">
    <td width="4%" height="25" align="center" bgcolor="#D9D9B3"><img src="images/black_icon/16x16/app_window.png" width="16" height="16" /></td>
    <td width="96%" bgcolor="#D9D9B3">รายชื่อสมาชิก

    
      <input type="hidden" name="action" id="action" />
      <input type="hidden" name="ID" id="ID" /></td>
  </tr>
  <tr>
    <td colspan="2"><table width="100%" border="0" cellspacing="2" cellpadding="2">
      <tr class="txt10-black">
        <td width="22%" height="25" align="center" nowrap="nowrap" bgcolor="#DBDBDB"><span class="L20">ชื่อ-นามสกุล</span></td>
        <td width="12%" align="center" nowrap="nowrap" bgcolor="#DBDBDB"><span class="L20">Email</span></td>
        <td width="12%" align="center" nowrap="nowrap" bgcolor="#DBDBDB">โทรศัพท์</td>
        <td width="22%" align="center" nowrap="nowrap" bgcolor="#DBDBDB"><span class="L20">บริการที่ต้องการ</span></td>
        <td width="12%" align="center" nowrap="nowrap" bgcolor="#DBDBDB">รายละเอียดเพิ่มเติม</td>
        <td width="13%" align="center" nowrap="nowrap" bgcolor="#DBDBDB">วันที่สมัคร</td>
        <td width="7%" align="center" nowrap="nowrap" bgcolor="#DBDBDB">ลบ</td>
      </tr>
      <?php while($data=mysql_fetch_assoc($result)){ ?>
      <tr class="txt10-black">
        <td nowrap="nowrap" bgcolor="#EFEFEF">&nbsp;<?php echo $data['name_sname']?> </td>
        <td nowrap="nowrap" bgcolor="#EFEFEF"><?php echo $data['user_email'];?></td>
        <td nowrap="nowrap" bgcolor="#EFEFEF"><?php echo $data['user_phone']?></td>
        <td nowrap="nowrap" bgcolor="#EFEFEF">&nbsp;<?php echo $data['user_service']?></td>
        <td align="center" nowrap="nowrap" bgcolor="#EFEFEF">
        <a href="#" onclick="windowOpener('600', '750', 'windowName', 'member_detail.php?Mid=<?php echo $data['id']?>')">
        <img src="images/black_icon/16x16/zoom.png" width="16" height="16" style="border:none"/></a></td>
        <td nowrap="nowrap" bgcolor="#EFEFEF">&nbsp;<?php GetThaiDateTime($data['date_register'])?></td>
        <td align="center" nowrap="nowrap" bgcolor="#EFEFEF"><a href="#" onclick="historyThis('<?php echo $data['id']?>')">
        <img src="images/black_icon/16x16/round_delete.png" width="16" height="16" style="border:none"/></a></td>
      </tr>
      <?php ?>
    </table></td>
  </tr>
  <tr>
    <td colspan="2" class="txt10-black">&nbsp;
      หน้า :
      <?php $thisFile"main.php?work=".$_GET['work']; PageDisplay($query,$rowPerPage,$_GET['page'],$thisFile)?></td>
  </tr>
  <tr>
    <td colspan="2">&nbsp;</td>
  </tr>
</table>
</form>
</body>
</html>