查看文件: member_show.php
大小: 8.95 KB
类型: application/octet-stream
<?php require('system/login.php'); ?> <?php require_once('../Connections/BE2.php'); ?> <?php if (isset($_GET['check_id'])) { // $deleteSQL = sprintf("DELETE FROM member WHERE mem_auto = %s",$_GET['check_id']); // mysql_select_db($database_BE2, $BE2); // $Result1 = mysql_query($deleteSQL, $BE2) or die(mysql_error()); } $currentPage = $_SERVER["PHP_SELF"]; $maxRows_Rt2 = 25; $pageNum_Rt2 = 0; if (isset($_GET['pageNum_Rt2'])) { $pageNum_Rt2 = $_GET['pageNum_Rt2']; } $startRow_Rt2 = $pageNum_Rt2 * $maxRows_Rt2; $colname_Rt2 = "-1"; if (isset($_GET['keyword']) && $_GET['keyword']<>'') { if($_GET['ra1']==1){ $sname= 'a.mem_mobile' ; } else { $sname= 'a.scode' ; } $colname_Rt2 = trim($_GET['keyword']); } mysql_select_db($database_BE2, $BE2); if ($colname_Rt2=='-1') { // $query_Rt2 = "SELECT a.*,b.mem_mobile,b.mem_passwd,b.m_addemo,b.m_ad2,b.m_ad2edate FROM company as a,member as b where a.mid=b.mem_auto ORDER BY mid DESC"; $query_Rt2 = "SELECT a.mem_auto,a.mem_mobile,a.mem_passwd,a.m_addemo,a.m_ad2,a.m_ad2edate,a.mem_user,a.mem_user2,b.* FROM member as a left join company as b on a.mem_auto=b.mid where 1 ORDER BY mid DESC"; } else { //$query_Rt2 = sprintf("SELECT a.*,b.mem_mobile,b.mem_passwd,b.m_addemo,b.m_ad2,b.m_ad2edate FROM company as a,member as// b WHERE a.mid=b.mem_auto AND b.mem_mobile like '%s' ORDER BY mid DESC",'%'.$colname_Rt2.'%'); $query_Rt2 = sprintf("SELECT a.mem_auto,a.mem_mobile,a.mem_passwd,a.m_addemo,a.m_ad2,a.m_ad2edate,a.mem_user,a.mem_user2,b.* FROM member as a left join company as b on a.mem_auto=b.mid where %s like '%s' ORDER BY mid DESC",$sname,'%'.$colname_Rt2.'%'); } $query_limit_Rt2 = sprintf("%s LIMIT %d, %d", $query_Rt2, $startRow_Rt2, $maxRows_Rt2); $Rt2 = mysql_query($query_limit_Rt2, $BE2) or die(mysql_error()); $row_Rt2 = mysql_fetch_assoc($Rt2); if (isset($_GET['totalRows_Rt2'])) { $totalRows_Rt2 = $_GET['totalRows_Rt2']; } else { $all_Rt2 = mysql_query($query_Rt2); $totalRows_Rt2 = mysql_num_rows($all_Rt2); } $totalPages_Rt2 = ceil($totalRows_Rt2/$maxRows_Rt2)-1; $queryString_Rt2 = ""; if (!empty($_SERVER['QUERY_STRING'])) { $params = explode("&", $_SERVER['QUERY_STRING']); $newParams = array(); foreach ($params as $param) { if (stristr($param, "pageNum_Rt2") == false && stristr($param, "totalRows_Rt2") == false) { array_push($newParams, $param); } } if (count($newParams) != 0) { $queryString_Rt2 = "&" . htmlentities(implode("&", $newParams)); } } $queryString_Rt2 = sprintf("&totalRows_Rt2=%d%s", $totalRows_Rt2, $queryString_Rt2); ?> <div class="row"> <div class="col-md-12"> <div class="panel panel-default"> <div class="panel-heading"> <h3 class="panel-title"> 會員資訊 </h3> </div> <form id="form1" name="form1" method="GET" action=""> 快速搜尋 <input name="ra1" type="radio" id="ra1" value="1" <?= isset($_GET['ra1']) && $_GET['ra1']==1?'checked="checked"':'' ?> /> <label for="ne1">帳號</label> <input type="radio" name="ra1" id="ra1" value="2" <?= isset($_GET['ra1']) && $_GET['ra1']==2?'checked="checked"':'' ?>/> <label for="ne1">會員碼</label> <input type="text" name="keyword" id="keyword" value="<?= isset($_GET['keyword'])?trim($_GET['keyword']):'' ?>" /> <input type="submit" name="Submit" value="送出" /> <input name="act" type="hidden" id="act" value="member_show" /> </form> <div style="overflow-x:scroll;"> <table class="table table-striped table-bordered bootstrap-datatable datatable" style="min-width:100%;"> <tr> <th height="28" nowrap class="font2">ID</th> <th nowrap class="font2">帳號/電話</th> <th nowrap class="font2">密碼</th> <th nowrap class="font2">雲明片,姓名</th> <th nowrap class="font2">公司電話</th> <th nowrap class="font2">公司</th> <th nowrap class="font2">雲明片</th> <th nowrap class="font2">廣告</th> <th nowrap class="font2">(開發商</th> <th nowrap class="font2">審核)</th> <th nowrap class="font2">(廣告</th> <th nowrap class="font2">廣告)</th> <th nowrap class="font2">(公司</th> <th nowrap class="font2">審核)</th> </tr> <?php $idate=date('Y-m-d'); $m_ad2edate=$row_Rt2['m_ad2edate']; do { ?> <tr onMouseOver="this.style.backgroundColor='#2172A1';" onMouseOut=this.style.backgroundColor="#fff"> <td height="27" nowrap="nowrap"><a href="main.php?act=member_id_edit&id=<?= $row_Rt2['mem_auto']; ?>"><?= $row_Rt2['mem_auto']; ?></a></td> <td height="27" nowrap="nowrap"><?= $row_Rt2['mem_mobile']; ?></td> <td nowrap="nowrap"><?= $row_Rt2['mem_passwd']; ?></td> <td nowrap="nowrap"><?= $row_Rt2['mem_user2'].','.$row_Rt2['mem_user']; ?></td> <td nowrap="nowrap"><?= $row_Rt2['company_tel']; ?> <? //$row_Rt2['co_address']; ?></td> <td nowrap="nowrap"><?= $row_Rt2['company_title']; ?></td> <td align="center" nowrap="nowrap"> <? if($row_Rt2['m_ad2']=='Y'){ if( $idate<=$row_Rt2['m_ad2edate']){ echo "Y"; }else{ echo "到期" ; } }else {" ";} ?> </td> <td align="center" nowrap="nowrap"> <a href="main.php?act=member_ad2edit&id=<?= $row_Rt2['mem_auto']; ?>"><img src="images/edit.png" alt="修改" title="edit修改" width="16" height="16" border="0" /></a> </td> <td align="center" nowrap="nowrap"><?= $row_Rt2['company_boss']; ?></td> <td nowrap="nowrap"><? if($row_Rt2['coid']>0){ ?><a href="main.php?act=member_bossedit&id=<?php echo $row_Rt2['coid']; ?>"><img src="images/edit.png" alt="修改" title="edit修改" width="16" height="16" border="0" /></a><? }?></td> <td align="center"><?= $row_Rt2['m_addemo']; ?></td> <td align="center"><? if($row_Rt2['coid']>0){ ?><a href="main.php?act=member_adedit&id=<?php echo $row_Rt2['coid']; ?>"><img src="images/edit.png" alt="修改" title="edit修改" width="16" height="16" border="0" /></a><? }?></td> <td align="center"><? if( $row_Rt2['mem_check']=='Y'){ echo '<span class="font2">Y</span>' ;} else if($row_Rt2['ck_company']==3){ echo '審核中' ;} else{ echo 'N' ;} $row_Rt2['mem_check']; ?></td> <td><? if($row_Rt2['coid']>0){ ?><a href="main.php?act=member_edit&id=<?php echo $row_Rt2['coid']; ?>"><img src="images/edit.png" alt="修改" title="edit修改" width="16" height="16" border="0" /></a><? } ?> </td> </tr> <?php } while ($row_Rt2 = mysql_fetch_assoc($Rt2)); ?> <tr> <td colspan="14"> <table width="697" border="0" align="left" cellpadding="0" cellspacing="0"> <tr> <td width="34%">總筆數:<?php echo $totalRows_Rt2 ?>筆 </td> <td width="66%"><div id="font_s"> <p> <?php if ($pageNum_Rt2 > 0) { // Show if not first page ?> <a href="<?php printf("%s?pageNum_Rt2=%d%s", $currentPage, max(0, $pageNum_Rt2 - 1), $queryString_Rt2); ?>"><img src="images/First.gif" alt="上一頁" title="上一頁" width="18" height="13" border="0" /></a> <?php } // Show if not first page ?> 第 <select name="jumpMenu" id="jumpMenu" onchange="MM_jumpMenu('self',this,0)"> <? for($i=0;$i<=$totalPages_Rt2;$i++){?> <option value="<?php printf("%s?pageNum_Rt2=%d%s", $currentPage, $i, $queryString_Rt2); ?>" <? if($pageNum_Rt2==$i){ ?>selected="selected" <? }?>><? echo $i+1 ;?></option> <? }?> </select> 頁 <?php //分頁程式 if($totalPages_Rt2<9){ $start=0; $end=$totalPages_Rt2; }else{ $start=$pageNum_Rt2-5; $end=$pageNum_Rt2+5; if ($start<0){ $start=0; $end=10; } else { $end=$start+10 ;} if ($end>$totalPages_Rt2){ $start = $end-$totalPages_Rt2-5; $end=$totalPages_Rt2; } if ($end-$start>10){ $start = $end-10; } } for($i=$start;$i<=$end;$i++){ if($i==$pageNum_Rt2){ echo "[".($i+1)."]";} else {?> <a href="<?php printf("%s?pageNum_Rt2=%d%s", $currentPage, min($totalPages_Rt2, $i), $queryString_Rt2); ?>"> <? echo $i+1 ;?></a> <? } } ?> <?php if ($pageNum_Rt2 < $totalPages_Rt2) { // Show if not last page ?> <a href="<?php printf("%s?pageNum_Rt2=%d%s", $currentPage, min($totalPages_Rt2, $pageNum_Rt2 + 1), $queryString_Rt2); ?>"><img src="images/Next.gif" alt="下一頁" title="下一頁" width="14" height="13" border="0" /></a> <?php } // Show if not last page ?> </p> </div></td> </tr> </table> </td> </tr> </table> </div> </div> </div> </div> <?php mysql_free_result($Rt2); ?>
保存
取消
返回文件列表