makeBaseData.php 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. <?php
  2. include $_SERVER['DOCUMENT_ROOT'].'/common/lib/comm.php';
  3. include $_SERVER['DOCUMENT_ROOT'].ADMIN_PATH.'common/auth_chk.php';
  4. $PageNo =$_REQUEST['pageno'];
  5. if (empty($PageNo)) {$PageNo=1;}else{$PageNo=$PageNo;}
  6. $PageSize=10; //목록개수설정
  7. $pagestartpoint=($PageNo-1)*$PageSize;
  8. $sql = "where ds_delind='N'";
  9. if($searchword != ""){
  10. if($searchtype=="" || $searchtype==null){
  11. $sql = $sql. " and (nm_name like '$searchword%' or cd_userid like '$searchword%') ";
  12. }else{
  13. $sql = $sql. " and $searchtype like '$searchword%'";
  14. }
  15. }
  16. $totalrows = @mysql_result(mysql_query("select count(*) from admin_info $sql"),0,0);
  17. ?>
  18. <? include("../header.php") ?>
  19. <? include("../top_menu.php") ?>
  20. <? include("../left_menu.php") ?>
  21. <h2>관리자 리스트</h2>
  22. <form id="frmSearch" name="frmSearch" method="post" action="<?=ADMIN_PATH?>admin/admin_list.php">
  23. <p class="search">검색조건 <span>
  24. <select name="" style="width:100px">
  25. <option value="">전체</option>
  26. <option value="cd_userid" <? if($searchtype =="cd_userid"){?>selected<?}?>>아이디</option>
  27. <option value="nm_name" <? if($searchtype =="nm_name"){?>selected<?}?>>이름</option>
  28. </select>
  29. <input id="searchword" name="searchword" type="text" style="width:250px" value="<?=$searchword?>">
  30. <span class="btn_search" onclick="fnSearch();">검색</span> </span> </p>
  31. </form>
  32. <table class="tbl_list">
  33. <tr>
  34. <th>No</th>
  35. <th>아이디</th>
  36. <th>이름</th>
  37. <th>연락처</th>
  38. <th>이메일</th>
  39. <th>등록일</th>
  40. </tr>
  41. <?
  42. if($totalrows>0) {
  43. $r = mysql_query("SELECT * FROM admin_info $sql ORDER BY cd_seq desc LIMIT $pagestartpoint,$PageSize");
  44. $i=1;
  45. while($col = mysql_fetch_array($r)) {
  46. ?>
  47. <tr onclick="location.href='./admin_view.php?cd_userid=<?=$col[cd_userid]?>&PageNo=<?=$PageNo?>';" style="cursor: pointer; cursor: hand;">
  48. <td><?=$i?></td>
  49. <td><?=$col[cd_userid]?></td>
  50. <td><?=$col[nm_name]?></td>
  51. <td><?=$col[nm_info1]?></td>
  52. <td><?=$col[nm_info3]?></td>
  53. <td><?=$col[dt_insert]?></td>
  54. </tr>
  55. <?
  56. $i++;
  57. }
  58. }else{
  59. ?>
  60. <tr>
  61. <td align="center" bgcolor="#FFFFFF" colspan="6">데이터가 존재 하지 않습니다.</td>
  62. </tr>
  63. <?
  64. }
  65. ?>
  66. </table>
  67. <table width="100%" height="45" border="0" cellpadding="0" cellspacing="0">
  68. <tr>
  69. <td align="center" valign="middle">
  70. <?
  71. $url = "./admin_list.php?searchtype=$searchtype&searchword=$searchword";
  72. ListPg1($url ,$PageNo,$PageSize,10,$totalrows,$leftboard[1],$rootpath);
  73. ?>
  74. </td>
  75. </tr>
  76. </table>
  77. <p class="btn"><span class="btn_ok" onclick="location.replace('./admin_write.php');">신규등록</span></p>
  78. <script language="javascript" type="text/javascript">
  79. function fnSearch(){
  80. if($("#searchtype").val()!="" && $("#searchword").val()==""){
  81. alert("검색어를 입력하세요");
  82. return false;
  83. }
  84. $("#frmSearch").submit();
  85. }
  86. </script>
  87. <? include("../bottom_menu.php") ?>
  88. <? include("../footer.php") ?>
  89. <?
  90. mysql_close($connect);
  91. ?>