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
|
<?php if(id_sub_permission($id_sub)!=1){ permission_fail(); }
$navig['link']=$data_name_menu_sub[name]; $navig['addlink_form_topic']="เพิ่มหัวข้อหลัก"; navigator($navig); echo "<br>"; bar_header("เพิ่มหัวข้อหลัก"); // Bar_Header fieldset_top("ลิงค์");
import_request_variables('pG', 'p_'); if($p_add!="") { $add=trim($p_add); } if($p_name_group!="") { $name_group=trim($p_name_group); }
echo "<br>"; // add topic link if ($add == "1" and $name_group != "") { $sql = "INSERT INTO cms_link_group (id_group,id_sub,name_group,status) values(Null,'$_SESSION[id_sub]','$name_group','1')"; $result = mysql_query($sql) or die(mysql_error());
msg_insert_data(); // ข้อความแก้ไขแล้ว refresh_data("index.php?mod=link&path=link", "2"); // refresh หน้าจอ }else{ ?> <form name="add" action="index.php?mod=addlink_form_topic&add=1&path=link" method="post" onSubmit="return checkadd()"> <table width="450" border="0" align="center" cellpadding="1" cellspacing="3"> <tr> <td width=5%></td> <td width=25%><img src='coremain/images/marker.gif'> <b>หัวข้อหลัก</b></td> <td width=65%><input name="name_group" type="text" size="40"></td> </tr> <?php text_button_insert(3) ?> <!-- <tr> <td></td> <td></td> <td><input type="submit" name="Submit" value="เพิ่มข้อมูล" onmouseover=this.style.cursor='hand'> </td> </tr>--> </table> </form> <?php } fieldset_down(); ?> <script language="javascript"> function checkadd() { if(document.add.name_group.value=="") { alert("กรุณาป้อน หัวข้อหลัก!") ; document.add.name_group.focus() ; return false ; }else return true ; } </script>
|