?
Path : /home/admin/domains/happytokorea.com/public_html_bk/promice/Admin/ |
Current File : /home/admin/domains/happytokorea.com/public_html_bk/promice/Admin/Member.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><? echo "$headtxt"; ?></title> <meta http-equiv="Content-Type" content="text/html; charset=tis-620"> <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> <link href="../css/style.css" rel="stylesheet" type="text/css"> </head> <body bgcolor="#ffffff"> <div align="center"><strong> </strong> <table width="89%" border="0" align="center" cellpadding="1" cellspacing="1"> <tr valign="top"> <td width="60%"><? echo "$headtxt | $e_date $etime"; ?><br> <div align="left">หน้าปัจจุบันของคุณ : <a href="Main.php">หน้าหลัก</a> --> <strong>รายการสมาชิก</strong></div></td> <td width="40%"> <div align="right">ยินดีต้อนรับคุณ <? echo "<u>$adminname</u>"; ?> เข้าใช้งานในระบบ<br> [ <a href="ChangePass.php">เปลี่ยนรหัสผ่าน</a> ] <a href="logout.php">ออกจากระบบ</a> </div></td> </tr> <tr> <td colspan="2"><table width="100%" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#E9E9E6"> <tr> <td><div align="center"> <table width="100%" border="0" cellspacing="1" cellpadding="1"> <tr> <td><div align="center"><br> <br> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td height="16"><table width="100%" border="0" cellspacing="1" cellpadding="1"> <tr> <td width="70" bgcolor="#990000"> <div align="center"><strong>#</strong></div></td> <td width="293" bgcolor="#990000"> <div align="center"><strong>ชื่อ-นามสกุล</strong></div></td> <td width="175" bgcolor="#990000"> <div align="center"><strong>โทรศัพท์</strong></div></td> <td width="232" bgcolor="#990000"> <div align="center"><strong>อีเมล์</strong></div></td> <td width="109"> <div align="center"><strong></strong></div> <div align="center"><strong> </strong></div></td> </tr> </table></td> </tr> <tr> <td> <? $num = 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']; $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="1" cellpadding="1"> <tr> <td width="70" height="20" bgcolor=<? echo "$bgcolor"; ?>> <div align="center"><? echo "$number_job"; ?></div></td> <td width="293" bgcolor=<? echo "$bgcolor"; ?>> <div align="left"><img src="../images/zoom.gif" width="16" height="16" border="0"> <? echo "$fname$name $surname"; ?> </div></td> <td width="178" bgcolor=<? echo "$bgcolor"; ?>><? echo "$phone"; ?></td> <td width="229" bgcolor=<? echo "$bgcolor"; ?>><? echo "$email"; ?></td> <td width="109" bgcolor=<? echo "$bgcolor"; ?>> <div align="center"><a href="DelMember.php?MemberID=<? echo "$idxx"; ?>"><img src="../images/delete.gif" alt="ลบข้อมูล" width="52" height="17" border="0"></a></div></td> </tr> </table> <? $num = $num+1; $number_job = $number_job+1; } } ?> <br> <br> <span class="maekhawtom">หน้าที่ :</span> <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> </table> <br> <br> </div></td> </tr> </table> </div></td> </tr> </table></td> </tr> <tr> <td colspan="2"><div align="center"><br> <? echo "$buttomtxt"; ?> </div></td> </tr> </table> </div> </body> </html>