| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201 |
- <?php
- include $_SERVER['DOCUMENT_ROOT'].'/common/lib/comm.php';
- include $_SERVER['DOCUMENT_ROOT'].ADMIN_PATH.'common/auth_chk.php';
- $mp = "00"; //set top nav
- $PageNo =$_REQUEST['pageno'];
- $PageSize =$_REQUEST['PageSize'];
- if (empty($PageNo)) {$PageNo=1;}else{$PageNo=$PageNo;}
- if (empty($PageSize)) {
- $PageSize=10; //목록개수설정
- }else{$PageSize=$PageSize;}
- $pagestartpoint=($PageNo-1)*$PageSize;
- $sql = "where ds_delind='N'";
- if($searchword != ""){
- if($searchtype=="" || $searchtype==null){
- $sql = $sql. " and (nm_name like '$searchword%' or cd_userid like '$searchword%') ";
- }else{
- $sql = $sql. " and $searchtype like '$searchword%'";
- }
- }
- $totalrows = @mysql_result(mysql_query("select count(*) from admin_info $sql"),0,0);
- // $nm_price = 3100;
- // $sale_col['ds_tradein'] = 'B0';
- // // $sale_col['ds_tradein'] = 'B0';
- // $sale_col['nm_brand'] = 'AUDI';
- // // $sale_col['nm_brand'] = 'ETC';
- // $sale_col['is_staff'] = 'Y';
- // // $commission = get_sa_aap_commission($nm_price, $sale_col['ds_tradein'], $sale_col['nm_brand'], $sale_col['is_staff']);
- // $commission = get_sa_user_commission($nm_price, $sale_col['ds_tradein'], $sale_col['nm_brand'], $sale_col['is_staff']);
- ?>
- <? include("../inc/inc_top.php") ?>
- <? include("../inc/inc_header.php") ?>
- <section id="contents">
- <h2>관리자 관리</h2>
- <h3><em>▶</em> 관리자검색</h3>
- <table class="tbl_search">
- <colgroup>
- <col width="10%">
- <col width="35%">
- <col width="10%">
- <col width="*">
- </colgroup>
- <form id="frmSearch" name="frmSearch" method="get">
- <input type="hidden" id="PageSize" name="PageSize">
- <input type="hidden" id="searchtype" name="searchtype">
- <tr>
- <th>검색어</th>
- <td>
- <span class="select2" style="margin-right:5px;width:100px;" id="sel_searchtype">
- <select>
- <option value="">전체</option>
- <option value="nm_name"<? if($searchtype =="nm_name"){?> selected<?}?>>이름</option>
- <option value="nm_info1"<? if($searchtype =="nm_info1"){?> selected<?}?>>연락처</option>
- </select>
- </span>
- <input type="text" class="inp_txt" style="width:60%;" id="searchword" name="searchword" value="<?=$searchword?>">
- <input type="submit" class="rnd_btn ty3 gray" value="검색" title="검색">
- </td>
- <!-- <th>회원가입일</th>
- <td>
- <input type="text" class="inp_txt" style="width:34%;" id="dt_start" name="dt_start" value="<?=$dt_start?>">
- <span class="btn_cal" id="btn_cal1">달력보기</span>
- ~
- <input type="text" class="inp_txt" style="width:34%;" id="dt_end" name="dt_end" value="<?=$dt_end?>">
- <span class="btn_cal" id="btn_cal2">달력보기</span>
- <input type="submit" class="rnd_btn ty3 gray" value="검색" title="검색">
- </td> -->
- </tr>
- </form>
- </table>
- <div class="select_view_type">
- <span class="select" style="width:160px;" id="selBox">
- <select id="page_size">
- <option value="10"<? if($PageSize==10){ ?> selected<? } ?>>10개 보기</option>
- <option value="20"<? if($PageSize==20){ ?> selected<? } ?>>20개 보기</option>
- <option value="30"<? if($PageSize==30){ ?> selected<? } ?>>30개 보기</option>
- </select>
- </span>
- </div>
- <!--form id="frmSearch" name="frmSearch" method="post" action="<?=ADMIN_PATH?>admin/admin_list.php">
- <p class="search">검색조건 <span>
- <select name="" style="width:100px">
- <option value="">전체</option>
- <option value="cd_userid" <? if($searchtype =="cd_userid"){?>selected<?}?>>아이디</option>
- <option value="nm_name" <? if($searchtype =="nm_name"){?>selected<?}?>>이름</option>
- </select>
- <input id="searchword" name="searchword" type="text" style="width:250px" value="<?=$searchword?>">
- <span class="btn_search" onclick="fnSearch();">검색</span> </span> </p>
- </form-->
- <!-- <div class="area_title">
- <h2>관리자 관리</h2>
- <span class="select">
- <select onchange="location.href='./admin_list.php?PageSize='+this.value;">
- <option value="10"<? if($PageSize==10){ ?> selected<? } ?>>10개 보기</option>
- <option value="20"<? if($PageSize==20){ ?> selected<? } ?>>20개 보기</option>
- <option value="30"<? if($PageSize==30){ ?> selected<? } ?>>30개 보기</option>
- </select>
- </span>
- </div> -->
- <div class="tbl_wrap">
- <table class="tbl_list">
- <colgroup>
- <col width="7%">
- <col width="20%">
- <col width="14%">
- <col width="*">
- <col width="18%">
- <col width="15%">
- </colgroup>
- <thead>
- <tr>
- <th>번호</th>
- <th>아이디</th>
- <th>이름</th>
- <th>연락처</th>
- <th>등록일</th>
- <th>정보수정</th>
- </tr>
- </thead>
- <?
- if($totalrows>0) {
- $r = mysql_query("SELECT * FROM admin_info $sql ORDER BY cd_seq desc LIMIT $pagestartpoint,$PageSize");
- $i=1;
- while($col = mysql_fetch_array($r)) {
- ?>
- <tr onclick="location.href='./admin_view.php?cd_userid=<?=$col[cd_userid]?>&PageNo=<?=$PageNo?>';" style="cursor: pointer; cursor: hand;">
- <td><?=$i?></td>
- <td><?=$col['cd_userid']?></td>
- <td><?=$col['nm_name']?></td>
- <td><?=$col['nm_info1']?></td>
- <td><?=$col['dt_insert']?></td>
- <td><a href="./admin_view.php?cd_userid=<?=$col['cd_userid']?>&PageNo=<?=$PageNo?>" class="rnd_s_btn">수정</a></td>
- </tr>
- <?
- $i++;
- }
- }else{
- ?>
- <tr>
- <td colspan="6">데이터가 존재 하지 않습니다.</td>
- </tr>
- <?
- }
- ?>
- </table>
- </div>
- <div class="paging">
- <?
- $url = "./admin_list.php?searchtype=$searchtype&searchword=$searchword";
- ListPg1($url ,$PageNo,$PageSize,10,$totalrows,$leftboard[1],$rootpath);
- ?>
- </div>
- <div class="btn_right">
- <a href="javascript:location.replace('./admin_write.php');" class="rnd_btn gray">+ 관리자 등록</a>
- </div>
- </section>
- <script language="javascript" type="text/javascript">
- function fnSearch(){
- if($("#searchtype").val()!="" && $("#searchword").val()==""){
- alert("검색어를 입력하세요");
- return false;
- }
- $("#frmSearch").submit();
- }
- $(function() {
- $("#selBox div.jq_sel ul li a").bind("click",function(){
- $("#PageSize").val($("#selBox option:selected").val());
- $("#frmSearch").submit();
- });
- $("#sel_searchtype div.jq_sel ul li a").bind("click",function(){
- $("#searchtype").val($("#sel_searchtype option:selected").val());
- });
- });
- </script>
- <? include("../inc/inc_footer.php") ?>
- <? include("../inc/inc_bottom.php") ?>
- <?
- mysql_close($connect);
- ?>
|