/home/banprang/domains/plai.go.th/public_html/coremain/module/load/adddownload_form_topic.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
<?php
// Status Package Module
$status_module=select_query("status_module","cms_status_module","id","28");
if(
$status_module[0]!=1)    {    
    
fieldset_no_module();
}
if(
id_sub_permission(7)!=1){    
    
permission_fail();            
}

$navig['download']="ดาวน์โหลด";
$navig['adddownload_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);            }

// add topic download
if($add=="1" and $name_group!="")
{
    
$sql "INSERT INTO `cms_download_group` ( `id_group` , `name_group` , `status` ) VALUES (NULL, '$name_group', '1')";
    
$result mysql_query($sql) or die(mysql_error());

    echo
"<br><br><center>ข้อมูลได้ถูกเพิ่มแล้ว</enter><br><br>";
    echo 
"<meta http-equiv='refresh' content='2; url=index.php?mod=download&path=download'>" ;
//    include('coremain/footer.php');
    
exit;
}

?>

<br>
<table width="500" border="0" align="center" cellpadding="1" cellspacing="3">
<form  name="add" action="index.php?mod=adddownload_form_topic&add=1&path=download" method="post" onSubmit="return checkadd()">

  <tr>
     <td width=5%></td>     
     <td width=25%><div align="left"><img src='coremain/images/marker.gif'> <b>หัวข้อดาวน์โหลด</b></div></td> 
     <td width=65%><div align="left"><input name="name_group" type="text" size="40"></td> 
  </tr>

    <tr height="45">
     <td width=5%></td>     
     <td width=15%></td> 
     <td width=80%><div align="left">       
            <input type="submit" name="Submit" value="เพิ่มข้อมูล" onmouseover=this.style.cursor='hand'>
</td> 
  </tr>

</form> 
</table>
<?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>