/home/banprang/domains/plai.go.th/public_html/coremain/module/project/project_update.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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
<?php
if (id_top_permission("a") != 1) {
  
permission_fail();
}
// Status Package Module
$status_module select_query("status_module""cms_status_module""id""18");
if (
$status_module[0] != 1) {
  
fieldset_no_module();
}
if (
$_SESSION['dbname'] != "nversion_62") {
  
$navig['project'] = "ผลงานของเรา";
  
$navig['project_update'] = "แก้ไขข้อมูล";
  
navigator($navig);
  echo
"<br>";
  
bar_header("แก้ไขข้อมูล"); // Bar_Header
  
fieldset_top("ผลงานของเรา");
} else {
  
$navig['project'] = "สินค้า/บริการ";
  
$navig['project_update'] = "แก้ไขข้อมูล";
  
navigator($navig);
  echo
"<br>";
  
bar_header("แก้ไขข้อมูล"); // Bar_Header
  
fieldset_top("สินค้า/บริการ");
}
if (
$p_id_update != "") {
  
$id_update trim($p_id_update);
}
if (
$p_id_type != "") {
  
$id_type trim($p_id_type);
}

$data select_query("*""cms_project""id"$id_update); // SELECT cms_project
?>
<form  action="index.php?mod=project_update_output&id_update=<?php echo $id_update ?>&path=project" method="post" enctype="multipart/form-data" name="add" id="add" onSubmit="return checkadd()">
  <table width="98%" border="0" align="center" cellpadding="1" cellspacing="3">
    <tr height="40">
      <td width="125"><div align="left"><img src='coremain/images/marker.gif'> <strong>หัวข้อข่าว</strong></div></td>
      <td align="left"><input name="topic" type="text" size="73" value="<?php echo $data['topic'?>"></td> 
    </tr>

    <?php
    text_editor
('450''260''เนื้อหา'2$data['fulltexts']);
    
?>

    <tr height="40">
      <td width="125"><div align="left"><img src='coremain/images/marker.gif'> <strong>งบประมาณ</strong></div></td> 
      <td align="left"><input name="price" type="text" size="73" value="<?php echo $data['price'?>"></td> 
    </tr>

    <!-- pic 1 -->
    <tr height="40">
      <td><div align="left"><img src='coremain/images/marker.gif'> <strong>Upload รูปที่1</strong></div></td> 
      <td align="left"><input name="userfile1" type="file" size="45"><?php detail_pic(); ?>
        <?php
        
if ($data['pic1'] != "") {
          echo
" <br><INPUT TYPE='checkbox' NAME='check_pic1' value='1'> &nbsp;เอารูปออก";
        }
        
?>
      </td> 
    </tr>

    <!-- pic 2 -->
    <tr height="40">
      <td><div align="left"><img src='coremain/images/marker.gif'> <strong>Upload รูปที่2</strong></div></td> 
      <td align="left"><input name="userfile2" type="file" size="45"><?php detail_pic(); ?>
        <?php
        
if ($data['pic2'] != "") {
          echo
" <br><INPUT TYPE='checkbox' NAME='check_pic2' value='1'> &nbsp;เอารูปออก";
        }
        
?>
      </td> 
    </tr>



    <!-- pic 3 -->
    <tr height="40">
      <td><div align="left"><img src='coremain/images/marker.gif'> <strong>Upload รูปที่3</strong></div></td> 
      <td align="left"><input name="userfile3" type="file" size="45"><?php detail_pic(); ?>
<?php
if ($data['pic3'] != "") {
  echo
" <br><INPUT TYPE='checkbox' NAME='check_pic3' value='1'> &nbsp;เอารูปออก";
}
?>
      </td> 
    </tr>



    </tr>
    <!-- pic 4 -->
    <tr height="40">
      <td><div align="left"><strong><img src='coremain/images/marker.gif'> Upload รูปที่4</strong></div></td> 
      <td align="left"><input name="userfile4" type="file" size="45"><?php detail_pic(); ?>
<?php
if ($data['pic4'] != "") {
  echo
" <br><INPUT TYPE='checkbox' NAME='check_pic4' value='1'> &nbsp;เอารูปออก";
}
?>
      </td> 
    </tr>


    </tr>
    <!-- File -->
    <tr height="40">
      <td><div align="left"><strong><img src='coremain/images/marker.gif'> File ประกอบ</strong></div></td> 
      <td align="left"><input name="userfile5" type="file" size="45"><?php detail_file(); ?>
        <?php
        
if ($data['files'] != "") {
          echo
" <br><INPUT TYPE='checkbox' NAME='check_files' value='1'> &nbsp;เอาไฟล์ออก";
        }
        
?>
      </td> 
    </tr>

    <tr>
      <td><div align="left"></div></td> 
      <td align="left">       
<?php text_button_update(); ?>
      </td> 
    </tr>

</form>   
</table>
<?php fieldset_down(); ?>

<script language="javascript">
  function checkadd() {
    if (document.add.topic.value == "") {
      alert("กรุณากรอกหัวข้อผลงาน!");
      document.add.topic.focus();
      return false;
    } else
      return true;
  }
</script>