/home/banprang/domains/plai.go.th/public_html/coremain/module/home/home_add_page_output.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
<?php
$navig
['home']="ข้อมูลหน้าแรก";
$navig['home_add_page']="เพิ่มข้อมูล";
navigator($navig);
echo
"<br>";
bar_header("เพิ่มข้อมูล"); // Bar_Header
fieldset_top("ข้อมูลหน้าแรก");

if(
$p_topic!="")            {  $topic=trim($p_topic);                }
if(
$p_evar!="")                {  $fulltexts=trim($p_evar);            }
if(
$p_home_type != '')      {  $home_type trim($p_home_type);     }

$sql="SELECT max(position+1) FROM cms_home";
$r=mysql_query($sql);
$d=mysql_fetch_array($r);
if(
$d[0]==or $d[0]==""$d[0]=1;
//#########เพิ่มข้อมูลลงในฐาน

if($home_type == 'egp'){
  
$element '';
  
$element .= $p_deptId != '' '&deptId='.$p_deptId '';
  
$element .= $p_deptsubId != '' '&deptsubId='.$p_deptsubId '';
  
$element .= $p_anounceType != '' '&anounceType='.$p_anounceType '';
  
$element .= $p_methodId != '' '&methodId='.$p_methodId '';
  
$_element $element != '' '?'.substr($element1) : '';
  
$fulltexts 'http://process3.gprocurement.go.th/EPROCRssFeedWeb/egpannouncerss.xml'.$_element;
}else if(
$home_type != ''){
  
$fulltexts 'dla.go.th';
}
$sql="INSERT INTO `cms_home` (`id_home` ,`bar` ,`fulltexts` ,`position` ,`status`) VALUES (NULL , '$topic', '$fulltexts', '$d[0]', '1')";
mysql_query($sql) or die(mysql_error());

echo 
"<br><br><center><b>ข้อมูลได้ถูกเพิ่มแล้ว<b></center><br>";
refresh_data("index.php","1");    // refresh หน้าจอ
//include('coremain/footer.php');
fieldset_down();
?>