%PDF-1.5 % ºaâÚÎΞ-ÌE1�ØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµù Õ5sLOšuY
| Server IP : 122.155.177.87 / Your IP : 122.155.177.87 Web Server : Apache/2 System : Linux cat177-87.static.lnwhostname.com 3.10.0-1160.62.1.el7.x86_64 #1 SMP Tue Apr 5 16:57:59 UTC 2022 x86_64 User : apache ( 994) PHP Version : 5.3.29 Disable Function : dl,eval,exec,mail,passthru,popen,posix_getpwuid,posix_kill,posix_mkfifo,posix_setegid,posix_seteuid,posix_setgid,posix_setpgid,posix_setsid,posix_setuid,posix_uname,proc_close,proc_open,putenv,shell_exec,show_source,system MySQL : ON | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /home/toongkwaik/domains/toongkwaikin.go.th/public_html/itas/ |
Upload File : |
<?php
if (isset( $_FILES )) {
//$HTTP_POST_FILES = $_FILES;
}
session_start();
if($_SESSION[user]==""){
session_destroy();
$message = "¡ÃØ³Ò Login ¡è͹.";
$url = "../admin/index.php";
include("../admin/alert.php");
exit;
}
require_once('../admin/Connections/conndb.php');
mysql_select_db($database_conndb, $conndb);
$query_rsNews = "SELECT * FROM ita_category ORDER BY cat_id";
$rsNews = mysql_query($query_rsNews, $conndb) or die(mysql_error());
$row_rsNews = mysql_fetch_assoc($rsNews);
$totalRows_rsNews = mysql_num_rows($rsNews);
$editFormAction = $_SERVER['PHP_SELF'];
if (isset($_SERVER['QUERY_STRING'])) {
$editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
}
$now=time();
if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "fnews")) {
foreach($_POST as $key => $value){
$$key=$value;
}
$dPath = "doc_download/";
$cPath = "photo/";
$d_date=$years."-".$month."-".$dated;
/******************************** Check file Up5 *********************************************/
if(trim($_FILES["ufile"]["tmp_name"]) != "")
{
/****************àÃÔèÁÀÒ¾ãËè*********************/
if($_FILES["ufile"]["type"]=="image/gif"){ $ftype="gif"; }
if($_FILES["ufile"]["type"]=="image/pjpeg" || $_FILES["ufile"]["type"]=="image/jpeg" ){ $ftype="jpg"; }
$images = $_FILES["ufile"]["tmp_name"];
$sur = strrchr($_FILES['ufile']['name'], "."); //µÑ´¹ÒÁÊ¡ØÅä¿Åìà¡çºäÇ
$pic = "std".(Date("dmy_His").$sur);
$width=700; //*** Fix Width & Heigh (Autu caculate) ***//
$size=GetimageSize($images);
$height=round($width*$size[1]/$size[0]);
if($ftype=="jpg"){
$images_orig = ImageCreateFromJPEG($images);
}elseif($ftype=="gif"){
$images_orig = ImageCreateFromGIF($images);}
$photoX = ImagesX($images_orig);
$photoY = ImagesY($images_orig);
$images_fin = ImageCreateTrueColor($width, $height);
ImageCopyResampled($images_fin, $images_orig, 0, 0, 0, 0, $width+1, $height+1, $photoX, $photoY);
if($ftype=="jpg"){
ImageJPEG($images_fin,$cPath.$pic);}
elseif($ftype=="gif"){
ImageGIF($images_fin,$cPath.$pic);}
ImageDestroy($images_orig);
ImageDestroy($images_fin);
if($_FILES['file_d']['name']<>"")
{
$sur_num_text = strrchr($_FILES['file_d']['name'][$i], ".");
$sur_num = strlen($sur_num_text);
$file_name_sur = htmlspecialchars($_FILES['file_d']['name']);
$file_name = substr($file_name_sur,0,strlen($file_name_sur) - $sur_num);
if(strlen($file_name)>230){
$file_name = substr($file_name,0,230);
}
$sur1 = strrchr($_FILES['file_d']['name'], "."); //µÑ´¹ÒÁÊ¡ØÅä¿Åìà¡çºäÇ
$filename = $file_name."_".(Date("dmy_His").$sur1);
//$filename = "a_".$i.(Date("dmy_His").$sur1);
$path = $dPath.$filename;
if(is_uploaded_file($_FILES['file_d']['tmp_name']))
{
if(move_uploaded_file($_FILES["file_d"]["tmp_name"], $path))
{
//chmod(($path), 0777);
} // close if move file
}
}// close if ufile not empty
}
if(trim($_FILES["ufile2"]["tmp_name"]) != "")
{
/****************àÃÔèÁÀÒ¾ãËè*********************/
if($_FILES["ufile2"]["type"]=="image/gif"){ $ftype="gif"; }
if($_FILES["ufile2"]["type"]=="image/pjpeg" || $_FILES["ufile2"]["type"]=="image/jpeg" ){ $ftype="jpg"; }
$images = $_FILES["ufile2"]["tmp_name"];
$sur = strrchr($_FILES['ufile2']['name'], "."); //µÑ´¹ÒÁÊ¡ØÅä¿Åìà¡çºäÇ
$pic2 = "std2".(Date("dmy_His").$sur);
$width=700; //*** Fix Width & Heigh (Autu caculate) ***//
$size=GetimageSize($images);
$height=round($width*$size[1]/$size[0]);
if($ftype=="jpg"){
$images_orig = ImageCreateFromJPEG($images);
}elseif($ftype=="gif"){
$images_orig = ImageCreateFromGIF($images);}
$photoX = ImagesX($images_orig);
$photoY = ImagesY($images_orig);
$images_fin = ImageCreateTrueColor($width, $height);
ImageCopyResampled($images_fin, $images_orig, 0, 0, 0, 0, $width+1, $height+1, $photoX, $photoY);
if($ftype=="jpg"){
ImageJPEG($images_fin,$cPath.$pic2);}
elseif($ftype=="gif"){
ImageGIF($images_fin,$cPath.$pic2);}
ImageDestroy($images_orig);
ImageDestroy($images_fin);
}
if(trim($_FILES["ufile3"]["tmp_name"]) != "")
{
/****************àÃÔèÁÀÒ¾ãËè*********************/
if($_FILES["ufile3"]["type"]=="image/gif"){ $ftype="gif"; }
if($_FILES["ufile3"]["type"]=="image/pjpeg" || $_FILES["ufile3"]["type"]=="image/jpeg" ){ $ftype="jpg"; }
$images = $_FILES["ufile3"]["tmp_name"];
$sur = strrchr($_FILES['ufile3']['name'], "."); //µÑ´¹ÒÁÊ¡ØÅä¿Åìà¡çºäÇ
$pic3 = "std3".(Date("dmy_His").$sur);
$width=700; //*** Fix Width & Heigh (Autu caculate) ***//
$size=GetimageSize($images);
$height=round($width*$size[1]/$size[0]);
if($ftype=="jpg"){
$images_orig = ImageCreateFromJPEG($images);
}elseif($ftype=="gif"){
$images_orig = ImageCreateFromGIF($images);}
$photoX = ImagesX($images_orig);
$photoY = ImagesY($images_orig);
$images_fin = ImageCreateTrueColor($width, $height);
ImageCopyResampled($images_fin, $images_orig, 0, 0, 0, 0, $width+1, $height+1, $photoX, $photoY);
if($ftype=="jpg"){
ImageJPEG($images_fin,$cPath.$pic3);}
elseif($ftype=="gif"){
ImageGIF($images_fin,$cPath.$pic3);}
ImageDestroy($images_orig);
ImageDestroy($images_fin);
}
if(trim($_FILES["ufile4"]["tmp_name"]) != "")
{
/****************àÃÔèÁÀÒ¾ãËè*********************/
if($_FILES["ufile4"]["type"]=="image/gif"){ $ftype="gif"; }
if($_FILES["ufile4"]["type"]=="image/pjpeg" || $_FILES["ufile4"]["type"]=="image/jpeg" ){ $ftype="jpg"; }
$images = $_FILES["ufile4"]["tmp_name"];
$sur = strrchr($_FILES['ufile4']['name'], "."); //µÑ´¹ÒÁÊ¡ØÅä¿Åìà¡çºäÇ
$pic4 = "std4".(Date("dmy_His").$sur);
$width=700; //*** Fix Width & Heigh (Autu caculate) ***//
$size=GetimageSize($images);
$height=round($width*$size[1]/$size[0]);
if($ftype=="jpg"){
$images_orig = ImageCreateFromJPEG($images);
}elseif($ftype=="gif"){
$images_orig = ImageCreateFromGIF($images);}
$photoX = ImagesX($images_orig);
$photoY = ImagesY($images_orig);
$images_fin = ImageCreateTrueColor($width, $height);
ImageCopyResampled($images_fin, $images_orig, 0, 0, 0, 0, $width+1, $height+1, $photoX, $photoY);
if($ftype=="jpg"){
ImageJPEG($images_fin,$cPath.$pic4);}
elseif($ftype=="gif"){
ImageGIF($images_fin,$cPath.$pic4);}
ImageDestroy($images_orig);
ImageDestroy($images_fin);
}
if(trim($_FILES["ufile5"]["tmp_name"]) != "")
{
/****************àÃÔèÁÀÒ¾ãËè*********************/
if($_FILES["ufile5"]["type"]=="image/gif"){ $ftype="gif"; }
if($_FILES["ufile5"]["type"]=="image/pjpeg" || $_FILES["ufile5"]["type"]=="image/jpeg" ){ $ftype="jpg"; }
$images = $_FILES["ufile5"]["tmp_name"];
$sur = strrchr($_FILES['ufile5']['name'], "."); //µÑ´¹ÒÁÊ¡ØÅä¿Åìà¡çºäÇ
$pic5 = "std5".(Date("dmy_His").$sur);
$width=700; //*** Fix Width & Heigh (Autu caculate) ***//
$size=GetimageSize($images);
$height=round($width*$size[1]/$size[0]);
if($ftype=="jpg"){
$images_orig = ImageCreateFromJPEG($images);
}elseif($ftype=="gif"){
$images_orig = ImageCreateFromGIF($images);}
$photoX = ImagesX($images_orig);
$photoY = ImagesY($images_orig);
$images_fin = ImageCreateTrueColor($width, $height);
ImageCopyResampled($images_fin, $images_orig, 0, 0, 0, 0, $width+1, $height+1, $photoX, $photoY);
if($ftype=="jpg"){
ImageJPEG($images_fin,$cPath.$pic5);}
elseif($ftype=="gif"){
ImageGIF($images_fin,$cPath.$pic5);}
ImageDestroy($images_orig);
ImageDestroy($images_fin);
}
if(trim($_FILES["ufile6"]["tmp_name"]) != "")
{
/****************àÃÔèÁÀÒ¾ãËè*********************/
if($_FILES["ufile6"]["type"]=="image/gif"){ $ftype="gif"; }
if($_FILES["ufile6"]["type"]=="image/pjpeg" || $_FILES["ufile6"]["type"]=="image/jpeg" ){ $ftype="jpg"; }
$images = $_FILES["ufile6"]["tmp_name"];
$sur = strrchr($_FILES['ufile6']['name'], "."); //µÑ´¹ÒÁÊ¡ØÅä¿Åìà¡çºäÇ
$pic6 = "std6".(Date("dmy_His").$sur);
$width=700; //*** Fix Width & Heigh (Autu caculate) ***//
$size=GetimageSize($images);
$height=round($width*$size[1]/$size[0]);
if($ftype=="jpg"){
$images_orig = ImageCreateFromJPEG($images);
}elseif($ftype=="gif"){
$images_orig = ImageCreateFromGIF($images);}
$photoX = ImagesX($images_orig);
$photoY = ImagesY($images_orig);
$images_fin = ImageCreateTrueColor($width, $height);
ImageCopyResampled($images_fin, $images_orig, 0, 0, 0, 0, $width+1, $height+1, $photoX, $photoY);
if($ftype=="jpg"){
ImageJPEG($images_fin,$cPath.$pic6);}
elseif($ftype=="gif"){
ImageGIF($images_fin,$cPath.$pic6);}
ImageDestroy($images_orig);
ImageDestroy($images_fin);
}
if(trim($_FILES["ufile7"]["tmp_name"]) != "")
{
/****************àÃÔèÁÀÒ¾ãËè*********************/
if($_FILES["ufile7"]["type"]=="image/gif"){ $ftype="gif"; }
if($_FILES["ufile7"]["type"]=="image/pjpeg" || $_FILES["ufile7"]["type"]=="image/jpeg" ){ $ftype="jpg"; }
$images = $_FILES["ufile7"]["tmp_name"];
$sur = strrchr($_FILES['ufile7']['name'], "."); //µÑ´¹ÒÁÊ¡ØÅä¿Åìà¡çºäÇ
$pic7 = "std7".(Date("dmy_His").$sur);
$width=700; //*** Fix Width & Heigh (Autu caculate) ***//
$size=GetimageSize($images);
$height=round($width*$size[1]/$size[0]);
if($ftype=="jpg"){
$images_orig = ImageCreateFromJPEG($images);
}elseif($ftype=="gif"){
$images_orig = ImageCreateFromGIF($images);}
$photoX = ImagesX($images_orig);
$photoY = ImagesY($images_orig);
$images_fin = ImageCreateTrueColor($width, $height);
ImageCopyResampled($images_fin, $images_orig, 0, 0, 0, 0, $width+1, $height+1, $photoX, $photoY);
if($ftype=="jpg"){
ImageJPEG($images_fin,$cPath.$pic7);}
elseif($ftype=="gif"){
ImageGIF($images_fin,$cPath.$pic7);}
ImageDestroy($images_orig);
ImageDestroy($images_fin);
}
if(trim($_FILES["ufile8"]["tmp_name"]) != "")
{
/****************àÃÔèÁÀÒ¾ãËè*********************/
if($_FILES["ufile8"]["type"]=="image/gif"){ $ftype="gif"; }
if($_FILES["ufile8"]["type"]=="image/pjpeg" || $_FILES["ufile8"]["type"]=="image/jpeg" ){ $ftype="jpg"; }
$images = $_FILES["ufile8"]["tmp_name"];
$sur = strrchr($_FILES['ufile8']['name'], "."); //µÑ´¹ÒÁÊ¡ØÅä¿Åìà¡çºäÇ
$pic8 = "std8".(Date("dmy_His").$sur);
$width=700; //*** Fix Width & Heigh (Autu caculate) ***//
$size=GetimageSize($images);
$height=round($width*$size[1]/$size[0]);
if($ftype=="jpg"){
$images_orig = ImageCreateFromJPEG($images);
}elseif($ftype=="gif"){
$images_orig = ImageCreateFromGIF($images);}
$photoX = ImagesX($images_orig);
$photoY = ImagesY($images_orig);
$images_fin = ImageCreateTrueColor($width, $height);
ImageCopyResampled($images_fin, $images_orig, 0, 0, 0, 0, $width+1, $height+1, $photoX, $photoY);
if($ftype=="jpg"){
ImageJPEG($images_fin,$cPath.$pic8);}
elseif($ftype=="gif"){
ImageGIF($images_fin,$cPath.$pic8);}
ImageDestroy($images_orig);
ImageDestroy($images_fin);
}
if($_FILES['file_d']['name']<>"")
{
$sur_num_text = strrchr($_FILES['file_d']['name'][$i], ".");
$sur_num = strlen($sur_num_text);
$file_name_sur = htmlspecialchars($_FILES['file_d']['name']);
$file_name = substr($file_name_sur,0,strlen($file_name_sur) - $sur_num);
if(strlen($file_name)>230){
$file_name = substr($file_name,0,230);
}
$sur1 = strrchr($_FILES['file_d']['name'], "."); //µÑ´¹ÒÁÊ¡ØÅä¿Åìà¡çºäÇ
$filename = $file_name."_".(Date("dmy_His").$sur1);
$filename_upload = iconv("tis-620","utf-8",$filename);
//$filename = "a_".$i.(Date("dmy_His").$sur1);
$path = $dPath.$filename_upload;
if(is_uploaded_file($_FILES['file_d']['tmp_name']))
{
if(move_uploaded_file($_FILES["file_d"]["tmp_name"], $path))
{
} // close if move file
}
}// close if ufile not empty
$insertSQL = "INSERT INTO ita_detail (cat_id,name,detail,pic,filename,d_date,created,pic2,pic3,pic4,pic5,pic6,pic7,pic8) VALUES ('$cat_id','$name','".mysql_real_escape_string($storytext)."','$pic','$filename','$d_date','".$now."','$pic2','$pic3','$pic4','$pic5','$pic6','$pic7','$pic8')";
$Result1 = mysql_query($insertSQL, $conndb) or die(mysql_error());
$get_id="SELECT id FROM ita_detail WHERE created='".$now."' ";
$result_id=mysql_query($get_id,$conndb) or die(mysql_error());
$dat_id=mysql_fetch_array($result_id);
$new_id=$dat_id[id];
//echo '<br> new_id = '.$new_id;
if($new_id!=""){
//echo ' <br> other file ';
for($i=0;$i<count($_FILES["files"]["name"]);$i++)
{
if($_FILES["files"]["name"][$i] != "")
{
$sur_num_text = strrchr($_FILES['files']['name'][$i], ".");
$sur_num = strlen($sur_num_text);
$file_name_sur = htmlspecialchars($_FILES['files']['name'][$i]);
$file_name = substr($file_name_sur,0,strlen($file_name_sur) - $sur_num);
if(strlen($file_name)>230){
$file_name = substr($file_name,0,230);
}
$sur1 = strrchr($_FILES['files']['name'][$i], "."); //µÑ´¹ÒÁÊ¡ØÅä¿Åìà¡çºäÇ
$name = $file_name."_".$i."_".(Date("dmy_His").$sur1);
$filename_upload = iconv("tis-620","utf-8",$name);
//$name=date("YmdHis")."_".$_FILES["files"]["name"][$i];
//echo '<br> name = '.$name;
//chmod($dPath,0777);
if(move_uploaded_file($_FILES["files"]["tmp_name"][$i],"doc_download/".$filename_upload))
{
echo "<br>Copy/Upload Complete<br>";
$sql_file="INSERT INTO ita_detail_file (id,path,created) VALUES ('".$new_id."','".$name."','".time()."')";
//echo '<br> sql_file = '.$sql_file;
mysql_query($sql_file,$conndb) or die(mysql_error());
}
}
}
}
if($Result1<>"")
{
?>
<SCRIPT LANGUAGE="JavaScript">
alert("ºÑ¹·Ö¡¢éÍÁÙÅàÃÕºÃéÍÂáÅéÇ !!.");
// history.back();
</script>
<?
echo "<meta http-equiv='refresh' content='0;URL=admin.php?cat_id=".$cat_id."'>";
}else{
?>
<SCRIPT LANGUAGE="JavaScript">
alert("äÁèÊÒÁÒöºÑ¹·Ö¡¢éÍÁÙÅä´é !!.");
// history.back();
</script>
<?
echo "<meta http-equiv='refresh' content='0;URL=add_detail.php?cat_id=".$cat_id."'>";
}
}// close if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "fnews")) {
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><!-- InstanceBegin template="/Templates/template_a.dwt.php" codeOutsideHTMLIsLocked="false" -->
<head>
<!-- InstanceBeginEditable name="doctitle" -->
<!-- InstanceEndEditable -->
<?php
require_once('../admin/Connections/conndb.php');
mysql_select_db($database_conndb, $conndb);
?>
<title>ͧ¤ì¡ÒúÃÔËÒÃÊèǹµÓºÅ·Øè§¤ÇÒ¡Թ àÅ¢·Õè 1 ËÁÙè·Õè 2 µÓºÅ·Øè§¤ÇÒ¡Թ ÍÓàÀÍá¡Å§ ¨Ñ§ËÇÑ´ÃÐÂͧ 21110 : www.toongkwaikin.go.th </title>
<meta http-equiv="Content-Type" content="text/html; charset=windows-874">
<link href="../styles.css" rel="stylesheet" type="text/css">
<!-- InstanceBeginEditable name="head" -->
<style type="text/css">
<!--
.style3 {color: #FF0000}
.style4 {color: #FFFFFF}
-->
</style>
<!-- InstanceEndEditable -->
<style type="text/css">
<!--
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
background-color: #3CFFFF;
}
-->
</style>
<!--styles -->
<link href="../styles.css" rel="stylesheet" type="text/css" />
<!--styles -->
<style type="text/css">
<!--
a:link {
text-decoration: none;
}
a:visited {
text-decoration: none;
}
a:hover {
text-decoration: none;
}
a:active {
text-decoration: none;
}
.style5 {color: #000000; font-weight: bold; }
-->
</style></head>
<body background="../images/0bg1.png" style="background-repeat:no-repeat; background-position:top">
<!-- content -->
<div align="center">
<table width="980" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td align="center" valign="top"><tr>
<td align="center" valign="top"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="980" height="649">
<param name="movie" value="../images/head.swf">
<param name="quality" value="high">
<embed src="../images/head.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="980" height="649"></embed>
</object></td>
</tr></td>
</tr>
<tr>
<td align="center" valign="top"><table width="980" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td align="center" valign="top"> </td>
</tr>
<tr>
<td align="center" valign="top"> </td>
</tr>
<tr>
<td align="center" valign="top"><!-- InstanceBeginEditable name="EditRegion3" -->
<table width="98%" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="21" class="under"><div align="center" class="title2"><span class="head">
<?
if ($cat_id!=""){
$query_CatS = "SELECT * FROM ita_category where cat_id =$cat_id";
$CatS = mysql_query($query_CatS, $conndb) or die(mysql_error());
$row_CatS = mysql_fetch_assoc($CatS);
echo $row_CatS['cat_name'];
}else{
echo "¢éÍÁÙÅ¢èÒÇÊÒÃ";
}
?>
</span></div></td>
</tr>
<tr>
<td height="21"> </td>
</tr>
<tr>
<td class="styles1"><div align="right"><a href="../admin/main.php" class="styles2">˹éÒ Admin </a>|
<? if($cat_id!=""){?>
<a href="admin.php?cat_id=<? echo $cat_id; ?>" class="styles2">
<? echo $row_CatS['cat_name']; ?>
</a>
<?} else{?>
<a href="admin.php" class="styles2"> ËÑÇ¢éÍ¢èÒÇ·Ñé§ËÁ´</a>
<? }?>
| <a href="add_category.php" class="styles2">à¾ÔèÁËÁÇ´ËÁÙè </a>| à¾ÔèÁ¢éÍÁÙÅ | <a href="../admin/signout.php" class="styles2">ÍÍ¡¨Ò¡Ãкº</a></div></td>
</tr>
<tr>
<td align="center" valign="top"> </td>
</tr>
<tr>
<td align="center" valign="top"> <?
if($row_rsNews == "0"){ ?>
<SCRIPT LANGUAGE="JavaScript">
alert("ÂѧäÁèä´éà¾ÔèÁ»ÃÐàÀ·Ê¶ÔµÔ !!");
// history.back();
</script>
<?
echo "<meta http-equiv='refresh' content='0;URL=add_category.php'>";
}else{
?>
<script type="text/javascript" src="../admin/fckeditor.js"></script>
<script type="text/javascript">
window.onload = function()
{
// Automatically calculates the editor base path based on the _samples directory.
// This is usefull only for these samples. A real application should use something like this:
// oFCKeditor.BasePath = '/fckeditor/' ; // '/fckeditor/' is the default value.
var sBasePath = document.location.href.substring(0,document.location.href.lastIndexOf('../admin/')) ;
var oFCKeditor = new FCKeditor( 'storytext' ) ;
oFCKeditor.BasePath = '../admin/' ;
oFCKeditor.Width='600';
oFCKeditor.Height='350';
oFCKeditor.ReplaceTextarea() ;
}
</script>
<form method="POST" name="fnews" enctype="multipart/form-data" action="<?php echo $editFormAction; ?>">
<table width="750" border="0" cellpadding="2" cellspacing="1" class="box-center">
<tr align="center">
<td height="25" colspan="2" background="../images/bg4.gif" class="styles">à¾ÔèÁ¢éÍÁÙÅ</td>
</tr>
<tr>
<td width="120" align="right" class="styles1"><div align="right">ËÑÇ¢éÍ : </div></td>
<td width="617" align="left" class="red"><input name="name" type="text" class="styles4" size="70">
**</td>
</tr>
<tr>
<td width="120" align="right" valign="top" class="styles1">ËÁÇ´ËÁÙè : </td>
<td width="617" align="left" class="red"><div align="left">
<select name="cat_id" id="cat_id">
<option value="" class="styles4"> ---- ¡ÃسÒàÅ×Í¡ËÁÇ´ËÁÙè --- </option>
<?php do { ?>
<option value="<? echo $row_rsNews['cat_id']; ?>" class="styles4" <? if($cat_id==$row_rsNews['cat_id']) echo "selected"?> > - <? echo $row_rsNews['cat_name']; ?></option>
<?php } while ($row_rsNews = mysql_fetch_assoc($rsNews)); ?>
</select>
</div></td>
</tr>
<tr>
<td width="120" align="right" valign="top" class="styles1"><div align="right">ÃÒÂÅÐàÍÕ´ </div></td>
<td width="617" align="left" class="red"><div align="left">
<?php
//$sw = new SPAW_Wysiwyg('storytext' /*name*/,stripslashes($HTTP_POST_VARS['storytext']) /*value*/,
// 'en' /*language*/, 'full' /*toolbar mode*/, 'classic' /*theme*/,
// '250px' /*width*/, '200px' /*height*/);
//$sw->show();
?>
</div></td>
</tr>
<tr>
<td colspan="2" align="center" class="styles1"><textarea name="storytext"></textarea></td>
</tr>
<tr>
<td width="120" align="right" class="styles1"><div align="right">ÀÒ¾»ÃСͺ 1 : </div></td>
<td width="617" align="left" class="styles1"><input name="ufile" type="file" class="styles4" id="ufile" size="45" />
<span class="style3"> ¢¹Ò´ä¿ÅìäÁèà¡Ô¹ 25 MB</span></td>
</tr>
<tr>
<td width="120" align="right" class="styles1"><div align="right">ÀÒ¾»ÃСͺ 2 : </div></td>
<td width="617" align="left" class="styles1"><input name="ufile2" type="file" class="styles4" id="ufile2" size="45" /></td>
</tr>
<tr>
<td width="120" align="right" class="styles1"><div align="right">ÀÒ¾»ÃСͺ 3 : </div></td>
<td width="617" align="left" class="styles1"><input name="ufile3" type="file" class="styles4" id="ufile3" size="45" /></td>
</tr>
<tr>
<td width="120" align="right" class="styles1"><div align="right">ÀÒ¾»ÃСͺ 4 : </div></td>
<td width="617" align="left" class="styles1"><input name="ufile4" type="file" class="styles4" id="ufile4" size="45" /></td>
</tr>
<tr>
<td width="120" align="right" class="styles1"><div align="right">ÀÒ¾»ÃСͺ 5 : </div></td>
<td width="617" align="left" class="styles1"><input name="ufile5" type="file" class="styles4" id="ufile5" size="45" /></td>
</tr>
<tr>
<td width="120" align="right" class="styles1"><div align="right">ÀÒ¾»ÃСͺ 6 : </div></td>
<td width="617" align="left" class="styles1"><input name="ufile6" type="file" class="styles4" id="ufile6" size="45" /></td>
</tr>
<tr>
<td width="120" align="right" class="styles1"><div align="right">ÀÒ¾»ÃСͺ 7 : </div></td>
<td width="617" align="left" class="styles1"><input name="ufile7" type="file" class="styles4" id="ufile7" size="45" /></td>
</tr>
<tr>
<td width="120" align="right" class="styles1"><div align="right">ÀÒ¾»ÃСͺ 8 : </div></td>
<td width="617" align="left" class="styles1"><input name="ufile8" type="file" class="styles4" id="ufile8" size="45" /></td>
</tr>
<tr bordercolor="#0000FF">
<td height="10" align="right" bgcolor="#F0F0F0" class="styles1 style4"> </td>
<td height="10" align="left" bgcolor="#F0F0F0" class="styles1 style4"> </td>
</tr>
<tr bordercolor="#0000FF">
<td colspan="2"> <font style="color:#ff0000;">àÍ¡ÊÒûÃСͺ ¡Ã³Õãªéª×èÍä¿ÅìÀÒÉÒä·Â ª×èÍä¿ÅìÃÇÁÊÃÐáÅЪèͧÇèÒ§äÁèà¡Ô¹ 80 µÑÇÍÑ¡ÉÃ</font></td>
</tr>
<tr class="box1">
<td align="right" class="styles1">àÍ¡ÊÒûÃСͺ : </td>
<td align="left"><input name="file_d" type="file" class="styles1" id="file" size="45" /></td>
</tr>
<tr class="box1">
<td align="right" class="styles1" >àÍ¡ÊÒûÃСͺ :</td>
<td class="red"><input name="files[]" type="file" class="styles1" id="file2" size="40" /></td>
</tr>
<tr class="box1">
<td align="right" class="styles1" >àÍ¡ÊÒûÃСͺ :</td>
<td class="red"><input name="files[]" type="file" class="styles1" id="file3" size="40" /></td>
</tr>
<tr class="box1">
<td align="right" class="styles1" >àÍ¡ÊÒûÃСͺ :</td>
<td class="red"><input name="files[]" type="file" class="styles1" id="file4" size="40" /></td>
</tr>
<tr class="box1">
<td align="right" class="styles1" >àÍ¡ÊÒûÃСͺ :</td>
<td class="red"><input name="files[]" type="file" class="styles1" id="file5" size="40" /></td>
</tr>
<tr class="box1">
<td align="right" class="styles1" >àÍ¡ÊÒûÃСͺ :</td>
<td class="red"><input name="files[]" type="file" class="styles1" id="file6" size="40" /></td>
</tr>
<tr class="box1">
<td align="right" class="styles1" >àÍ¡ÊÒûÃСͺ :</td>
<td class="red"><input name="files[]" type="file" class="styles1" id="file7" size="40" /></td>
</tr>
<tr class="box1">
<td align="right" class="styles1" >àÍ¡ÊÒûÃСͺ :</td>
<td class="red"><input name="files[]" type="file" class="styles1" id="file8" size="40" /></td>
</tr>
<tr class="box1">
<td align="right" class="styles1" >àÍ¡ÊÒûÃСͺ :</td>
<td class="red"><input name="files[]" type="file" class="styles1" id="file9" size="40" /></td>
</tr>
<tr class="box1">
<td align="right" class="styles1" >àÍ¡ÊÒûÃСͺ :</td>
<td class="red"><input name="files[]" type="file" class="styles1" id="file10" size="40" /></td>
</tr>
<tr>
<td class="styles1" ><div align="right">Çѹ à´×͹ »Õ ·Õè»ÃСÒÈ : </div></td>
<td bgcolor="#FFFFFF" class="red"><div align="left">
<select name="dated" class="styles1">
<option value="0">Çѹ·Õè</option>
<? $select_date = date("d");
for($i=1;$i<=31;$i++){
if($select_date==$i) $selected="selected='selected'";
else $selected="";
?>
<option value="<?=$i;?>" <?=$selected; ?>><?=$i;?></option>
<?
}
?>
</select>
<select name="month" class="styles1">
<option value="0" >à´×͹</option>
<option value="1" <? if(date("m")==1)echo "selected='selected'";?> >Á¡ÃÒ¤Á</option>
<option value="2" <? if(date("m")==2)echo "selected='selected'";?>>¡ØÁÀҾѹ¸ì</option>
<option value="3" <? if(date("m")==3)echo "selected='selected'";?>>ÁÕ¹Ò¤Á</option>
<option value="4" <? if(date("m")==4)echo "selected='selected'";?>>àÁÉÒ¹</option>
<option value="5" <? if(date("m")==5)echo "selected='selected'";?>>¾ÄÉÀÒ¤Á</option>
<option value="6" <? if(date("m")==6)echo "selected='selected'";?>>ÁԶعÒ¹</option>
<option value="7" <? if(date("m")==7)echo "selected='selected'";?>>¡Ã¡®Ò¤Á</option>
<option value="8" <? if(date("m")==8)echo "selected='selected'";?>>ÊÔ§ËÒ¤Á</option>
<option value="9" <? if(date("m")==9)echo "selected='selected'";?>>¡Ñ¹ÂÒ¹</option>
<option value="10" <? if(date("m")==10)echo "selected='selected'";?>>µØÅÒ¤Á</option>
<option value="11" <? if(date("m")==11)echo "selected='selected'";?>>¾ÄȨԡÒ¹</option>
<option value="12" <? if(date("m")==12)echo "selected='selected'";?>>¸Ñ¹ÇÒ¤Á</option>
</select>
<select name="years" class="styles1">
<option value="0">»Õ</option>
<?
$start_y=(date("Y")-7);
$end_y=(date("Y")+3);
$select_year = date("Y");
for($yy=$start_y; $yy<=$end_y; $yy++){
if($select_year==$yy) $selected_y="selected='selected'";
else $selected_y="";
?>
<option value="<?=$yy;?>" <?=$selected_y;?>><?=$yy+543;?></option>
<?
}
?>
</select>
**
</div></td>
</tr>
<tr>
<td height="25" colspan="2" background="../images/bg4.gif" ><div align="center">
<input name="okbutton" type="submit" class="btn" onMouseOver="check();" value="ºÑ¹·Ö¡" />
<input name="clear" type="reset" class="btn" id="reset" onClick="cc();" value="ÅéÒ§¢éͤÇÒÁ" />
<!--<input name="d_date" type="hidden" id="d_date" value="<?php echo date('Y-m-d h:i:s');?>" />-->
</div></td>
</tr>
<input type="hidden" name="MM_insert" value="fnews">
</table>
</form>
<script language="javascript">
function cc() {
fnews.name.value="";
fnews.detail.value="";
}
function check() {
if(fnews.name.value==""){
alert ("¡ÃسÒãÊèËÑÇ¢éÍ´éǤèÐ");
fnews.name.focus();
}
else if (fnews.cat_id.value==""){
alert ("¡ÃسÒàÅ×Í¡ËÁÇ´");
fnews.cat_id.focus();
}
/*else if (fnews.ufile.value==""){
alert ("¡ÃسÒṺä¿ÅÃÙ»ÀÒ¾´éǤèÐ");
fnews.ufile.focus();
}*/
else if (fnews.dated.value==""){
alert ("¡ÃسÒàÅ×Í¡Çѹ·Õè·Õè»ÃСÒÈ");
fnews.dated.focus();
}
else if (fnews.month.value==""){
alert ("¡ÃسÒàÅ×Í¡à´×͹·Õè»ÃСÒÈ");
fnews.month.focus();
}
else if (fnews.years.value==""){
alert ("¡ÃسÒàÅ×Í¡»Õ ¾.È. ·Õè»ÃСÒÈ");
fnews.years.focus();
}
}
</script>
<? } ?></td>
</tr>
<tr>
<td align="center" valign="top"> </td>
</tr>
<tr>
<td height="30"> </td>
</tr>
</table>
<!-- InstanceEndEditable --></td>
</tr>
</table></td>
</tr>
<tr>
<td align="center" valign="top"> </td>
</tr>
<tr>
<td align="center" valign="top"><table width="980" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="170" align="center" valign="top"><div align="right"><img src="../images/logo601.png" width="142" height="142"></div></td>
<td width="789" align="center" valign="top"><div align="left"><span class="style11"><br>
</span>ͧ¤ì¡ÒúÃÔËÒÃÊèǹµÓºÅ·Øè§¤ÇÒ¡Թ <br>
àÅ¢·Õè 1 ËÁÙè·Õè 2 µÓºÅ·Øè§¤ÇÒ¡Թ ÍÓàÀÍá¡Å§ ¨Ñ§ËÇÑ´ÃÐÂͧ 21110<br>
â·ÃÈÑ·¾ì/â·ÃÊÒà : 038-668991,038-669004<br>
www.toongkwaikin.go.th<span class="style11"><br>
</span></div></td>
<td width="19" align="center" valign="top"> </td>
</tr>
</table></td>
</tr>
</table>
</div>
<!-- end_content -->
<tr><td><a style="display:scroll;position:fixed;bottom:5px;right:5px;" class="backtotop" href="#top" rel="nofollow" title="Back to Top"><img src="../images/up.png" border="0" /></a></td>
</tr>
<map name="Map6" id="Map6"><area shape="rect" coords="210,1,302,41" href="http://www.tratlocal.go.th/index.php" target="_blank" />
</map>
</body>
<!-- InstanceEnd --></html>
<?php
if($conndb)
{
mysql_close($conndb);
unset($conndb);
}
?>