/home/banprang/domains/plai.go.th/public_html/coremain/module/boss_message/boss_message_edit.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
<?php
import_request_variables
('pG''p_');
if(
$p_id_message!="")                        {         $id_message=trim($p_id_message);                }
if(
$p_message_name!="")                        {         $message_name=trim($p_message_name);            }
if(
$p_id_top!="")                            {          $id_top=trim($p_id_top);                        }

$navig['boss_message_edit'] = "แก้ไขข้อมูลสาสน์";
navigator($navig);
echo 
"<br>";
bar_header("แก้ไขข้อมูลสาสน์"); // Bar_Header
fieldset_top($boss_msg->topic);
$data_link select_query_object("*","cms_boss_message","id_message",$id_message);
echo 
"<br/>";

?>
<form  name="add" action="index.php?mod=boss_message_edit_output&path=boss_message&id_top=<?php echo $id_top?>&id_message=<?php echo $id_message?>" method="post" enctype="multipart/form-data" onSubmit="">
  <table width="100%" border="0" align="center" cellpadding="1" cellspacing="3">
    <tr height='35'>
      <td ></td> 
      <td><?php echo print_arr1(); ?>&nbsp;<strong>หัวข้อ</strong></td> 
      <td><INPUT TYPE="text" NAME="topic" size="50" value='<?php echo $data_link->topic?>'></td> 
    </tr>
    <tr height='35'>
      <td ></td> 
      <td><?php echo print_arr1(); ?>&nbsp;<strong>ภาพปัจจุบัน</strong></td> 
      <td colspan=>
        <img src="<?php echo $_SESSION[web_name] . "/module_boss_message/" $data_link->picture?>">
      </td>
    </tr>
    <tr height='35'>
      <td ></td> 
      <td><?php echo print_arr1(); ?>&nbsp;<strong>อัพโหลดรูปภาพ</strong></td> 
      <td><input name="picture_file" type="file" size="50"></td> 
    </tr>
    <?php    text_editor('456''250''เนื้อหา'3$data_link->message'message'); ?>
<!--    <tr height='35'>
      <td ></td> 
      <td><?php //echo print_arr1(); ?>&nbsp;<strong>เนื้อหา</strong></td> 
      <td>
        <?php
//        $oFCKeditor = new FCKeditor('message');
//        $oFCKeditor->BasePath = 'coremain/editor/';
//        $oFCKeditor->Width = '456';
//        $oFCKeditor->Height = '250';
//        $oFCKeditor->Value = $data_link->message;
//        $oFCKeditor->Create()
        
?> 
      </td> 
    </tr>  -->
    <tr height='35'>
      <td ></td> 
      <td><?php echo print_arr1(); ?>&nbsp;<strong>สาสน์จาก</strong></td> 
      <td><input name="owner" type="text" size="50" value='<?php echo $data_link->owner?>'></td> 
    </tr>
    <?php    button_text('แก้ไขข้อมูล''Submit'3); ?>
<!--    <td colspan='3' align="center">
      <input type="submit" name="submit_edit" value="แก้ไขข้อมูล" onmouseover="this.style.cursor='hand'"></td> 
    </tr> -->
  </table>
  <input type="hidden" name="id_message" value="<?php echo $data_link->id_message?>">
</form>
<br/>
<?php
  fieldset_down
();
?>
<script language="javascript">
    function checkform(){
        form = document.add;
        
        if(form.topic.value==""){
            form.topic.focus();
            alert("กรุณากรอกหัวข้อ");
            return false;
        }
        else if(form.message.value==""){
            alert("กรุณากรอกข้อความ");
            //form.message.focus();
            return false;
        }
        else if(form.owner.value==""){
            alert("กรุณากรอกผู้ประกาศ");
            form.owner.focus();
            return false;
        }
        else
            return true;
    }
</script>