brand.php 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  1. <?php
  2. include $_SERVER['DOCUMENT_ROOT'].'/common/lib/comm.php';
  3. include $_SERVER['DOCUMENT_ROOT'].ADMIN_PATH.'common/auth_chk.php';
  4. $list_url = "brand.php";
  5. $mp = "10"; //set top nav
  6. $PageNo =$_REQUEST['pageno'];
  7. if (empty($PageNo)) {$PageNo=1;}else{$PageNo=$PageNo;}
  8. $PageSize=10; //목록개수설정
  9. $pagestartpoint=($PageNo-1)*$PageSize;
  10. $sql = "where ds_delind='N'";
  11. $orderby = "order by cd_model desc";
  12. /*
  13. $ds_cate = $_REQUEST[ds_cate];
  14. if($ds_cate){
  15. $sql = $sql. " and ds_cate = '$ds_cate'";
  16. }
  17. */
  18. $cd_category = $_REQUEST['cd_category'];
  19. if($cd_category){
  20. $sql = $sql. " and cd_category = '$cd_category'";
  21. }
  22. if($searchword != ""){
  23. if($searchtype=="" || $searchtype==null){
  24. $sql = $sql. " and (nm_category like '$searchword%')";
  25. }else{
  26. $sql = $sql. " and $searchtype like '$searchword%'";
  27. }
  28. }
  29. $totalrows = @mysql_result(mysql_query("select count(*) from car_brand $sql"),0,0);
  30. ?>
  31. <? include("../inc/inc_top.php") ?>
  32. <? include("../inc/inc_header.php") ?>
  33. <section id="contents">
  34. <div class="area_title">
  35. <h2>제조사</h2>
  36. <div class="area_select">
  37. <span class="select" style="width:200px;" id="sel_cd_category">
  38. <select id="cd_category" name="cd_category" onchange="location.href='./brand.php?cd_category='+this.value;"></select>
  39. </span>
  40. </div>
  41. </div>
  42. <div class="tbl_wrap">
  43. <table class="tbl_list ty2">
  44. <colgroup>
  45. <col width="7%">
  46. <col width="*">
  47. <col width="13%">
  48. </colgroup>
  49. <thead>
  50. <tr>
  51. <th>번호</th>
  52. <th>제조사</th>
  53. <th>정보수정</th>
  54. </tr>
  55. </thead>
  56. <?
  57. if($totalrows>0) {
  58. $r = mysql_query("SELECT *
  59. ,(select nm_category from car_category where car_category.cd_category = mst.cd_category) nm_category
  60. FROM car_brand mst $sql order by cd_brand desc LIMIT $pagestartpoint,$PageSize ");
  61. $i=1;
  62. while($col = mysql_fetch_array($r)) {
  63. $tmpNum =$totalrows-($PageSize*($PageNo-1));
  64. $no = ($tmpNum - $i)+1;
  65. ?>
  66. <tr>
  67. <td><?=$no?></td>
  68. <td><?=$col['nm_brand']?></td>
  69. <td><a href="./brand_form.php?cd_brand=<?=$col['cd_brand']?>&PageNo=<?=$PageNo?>" class="rnd_s_btn">수정</a></td>
  70. </tr>
  71. <?
  72. $i++;
  73. }
  74. }else{
  75. ?>
  76. <tr>
  77. <td align="center" colspan="3">등록된 정보가 없습니다.</td>
  78. </tr>
  79. <?
  80. }
  81. ?>
  82. </table>
  83. </div>
  84. <!-- layer popup -->
  85. <div class="layer_popup modify_popup">
  86. <div class="close">팝업닫기</div>
  87. <div class="cont2">
  88. <table class="tbl_list2" style="width:460px;">
  89. <colgroup>
  90. <col width="20%">
  91. <col width="*">
  92. </colgroup>
  93. <tr>
  94. <th>구분</th>
  95. <td>
  96. <div class="radio_chk">
  97. <span class="check_wrap"><input type="radio" name="radiobutton" id="domestic"><i></i><label for="domestic">국내</label></span>
  98. <span class="check_wrap"><input type="radio" name="radiobutton" id="overseas"><i></i><label for="overseas">해외</label></span>
  99. </div>
  100. </td>
  101. </tr>
  102. <tr>
  103. <th>제조사</th>
  104. <td><input type="text" class="inp_txt" style="width:320px;" value="현대"></td>
  105. </tr>
  106. </table>
  107. <div class="btn_center">
  108. <a href="#" class="rnd_btn ty2 gray">수정</a>
  109. <a href="#" class="rnd_btn ty2 black">삭제</a>
  110. </div>
  111. </div>
  112. </div>
  113. <!-- // layer popup -->
  114. <div class="paging">
  115. <?
  116. $url = "./$list_url?searchtype=$searchtype&searchword=$searchword";
  117. ListPg1($url ,$PageNo,$PageSize,10,$totalrows,$leftboard[1],$rootpath);
  118. ?>
  119. </div>
  120. <div class="btn_right">
  121. <a href="#" class="rnd_btn gray" onclick="location.replace('./brand_form.php');">+ 제조사 등록</a>
  122. </div>
  123. </section>
  124. <script language="javascript" type="text/javascript">
  125. $(document).ready(function() {
  126. setCodeSelectJqTransForm("listcategory","cd_category","car_category","cd_category","<?=$cd_category?>","선택하세요","");
  127. });
  128. </script>
  129. <? include("../inc/inc_footer.php") ?>
  130. <? include("../inc/inc_bottom.php") ?>
  131. <?
  132. mysql_close($connect);
  133. ?>