/home/banprang/domains/plai.go.th/public_html/coremain/module/e_service1/e_service1_report.php


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
<?php
$navig
['e_service1']="E-Services";
$navig['e_service1_report']="รายงาน";
navigator($navig);
echo
"<br>";
bar_header("E-Services"); // Bar_Header
fieldset_top("รายงาน E-Services");

import_request_variables('pG''p_');

$array_title = array();
$sel_title "select * from cms_service_title1 where title_status = '1'";
$que_title mysql_query($sel_title);
while(
$obj_title mysql_fetch_assoc($que_title)){
  
$array_title[$obj_title['title_id']] = $obj_title;
}

$eservice = array();
$sel_esv "select * from cms_eservice1";
$que_esv mysql_query($sel_esv);
while(
$obj_esv mysql_fetch_assoc($que_esv)){
  
$eservice[$obj_esv['type_id']][$obj_esv['id']] = $obj_esv;
}

?>
<table width="80%" border="0" cellpadding="0" cellspacing="0" align="center">
  <tr>
    <td>
      <table width="100%" border="0" cellpadding="3" cellspacing="0" style="border-collapse: collapse;" id="tb_title">
        <?php
          
foreach($array_title as $id => $data){
            
$num count($eservice[$id]);
            
$link_start $num '<a href="index.php?mod=e_service1_detail&path=e_service1&type='.$id.'">' '';
            
$link_end $num '</a>' '';
        
?>
        <tr bgcolor="#f0e8d0" height="30">
          <td>&nbsp;<img src="coremain/images/bot1.gif" />&nbsp;<?= $link_start.$data['title_name'].$link_end ?></td>
          <td>จำนวน <?= $num ?> รายการ</td>
        </tr>
        <?php ?>
      </table>
    </td>
  </tr>
</table>

<script language="javascript">
  
  function check_new(){
    if(document.fm_title_new.title_name.value == ''){
      alert('กรุณากรอกชื่อหัวข้อ !')
      document.fm_title_new.title_name.focus();
      return false;
    }else{
      return true;
    }
  }
  
  $('.title_update').on('click', function(){
    $('form[name="fm_title_edit"]').submit();
  });
  function check_edit(){
    if(document.fm_title_edit.title_edit.value == ''){
      alert('กรุณากรอกชื่อหัวข้อ !')
      document.fm_title_edit.title_edit.focus();
      return false;
    }else{
      return true;
    }
  }
  
  $('.del_data').on('click', function(){
    if(confirm("คุณต้องการลบหัวข้อนี้ ?")){
      var id = $(this).attr('id');
      window.location.href = "index.php?mod=e_service1_update&path=e_service1&del_id="+ id;
    }
  });
  
</script>

<?php 

echo fieldset_down();
?>