/home/banprang/domains/plai.go.th/public_html/coremain/module/web/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
<?
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();
}

$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


?>
<table width="98%" border="0" align="center" cellpadding="1" cellspacing="3">
<form  action="index.php?mod=project_update_output&id_update=<?echo $id_update?>&path=project" method="post" enctype="multipart/form-data" name="add" id="add" onSubmit="return checkadd()">

<tr height="40">
     <td width="125"><div align="left"><img src='coremain/images/marker.gif'> <strong>หัวข้อข่าว</strong></div></td> 
     <td><div align="left"><input name="topic" type="text" size="73" value="<?echo $data[topic]?>"></td> 
</tr>

<?
        text_editor
("450","260",$data[fulltexts],"เนื้อหา"); // Text Editor
?>

<tr height="40">
     <td width="125"><div align="left"><img src='coremain/images/marker.gif'> <strong>งบประมาณ</strong></div></td> 
     <td><div align="left"><input name="price" type="text" size="73" value="<?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><div align="left"><input name="userfile1" type="file" size="45"><?detail_pic();?>
<?    
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><div align="left"><input name="userfile2" type="file" size="45"><?detail_pic();?>
        <?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><div align="left"><input name="userfile3" type="file" size="45"><?detail_pic();?>
<?    
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><div align="left"><input name="userfile4" type="file" size="45"><?detail_pic();?>
<?    
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><div align="left"><input name="userfile5" type="file" size="45"><?detail_file();?>
<?    
if($data[files]!=""){    echo" <br><INPUT TYPE='checkbox' NAME='check_files' value='1'> &nbsp;เอาไฟล์ออก";    } ?>
     </td> 
  </tr>

    <tr>
     <td><div align="left"></div></td> 
     <td><div 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>