%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 : phunphin ( 1164) PHP Version : 5.3.29 Disable Function : exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname,putenv,eval MySQL : ON | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /home/phunphin/domains/phunphin.go.th/public_html/news/ |
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');
if(isset($_GET[id])){
$id=$_GET[id];
}
else{
$id=$_POST[id];
}
if(isset($_GET["cat_id"])){$cat_id = $_GET["cat_id"];} else {$cat_id = $_POST["cat_id"];}
$editFormAction = $_SERVER['PHP_SELF'];
if (isset($_SERVER['QUERY_STRING'])) {
$editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
}
$editFormAction = $_SERVER['PHP_SELF'];
if (isset($_SERVER['QUERY_STRING'])) {
$editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
}
if ((isset($_POST["MM_update"])) && ($_POST["MM_update"] == "updatenews")) {
foreach($_POST as $key => $value){
$$key=$value;
}
$dPath = "doc_download/";
$cPath = "photo/";
$d_date=$years."-".$month."-".$dated;
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(move_uploaded_file($_FILES["file_d"]["tmp_name"], "photo/".$pic)){
}
*/
} // if u_file
else{
$pic=$_POST['pic1'];
}
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(move_uploaded_file($_FILES["file_d"]["tmp_name"], "photo/".$pic2)){
}
*/
} // if u_file
else{
$pic2=$_POST['pic2'];
}
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(move_uploaded_file($_FILES["file_d"]["tmp_name"], "photo/".$pic3)){
}
*/
} // if u_file
else{
$pic3=$_POST['pic3'];
}
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(move_uploaded_file($_FILES["file_d"]["tmp_name"], "photo/".$pic4)){
}
*/
} // if u_file
else{
$pic4=$_POST['pic4'];
}
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(move_uploaded_file($_FILES["file_d"]["tmp_name"], "photo/".$pic5)){
}
*/
} // if u_file
else{
$pic5=$_POST['pic5'];
}
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(move_uploaded_file($_FILES["file_d"]["tmp_name"], "photo/".$pic6)){
}
*/
} // if u_file
else{
$pic6=$_POST['pic6'];
}
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(move_uploaded_file($_FILES["file_d"]["tmp_name"], "photo/".$pic7)){
}
*/
} // if u_file
else{
$pic7=$_POST['pic7'];
}
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(move_uploaded_file($_FILES["file_d"]["tmp_name"], "photo/".$pic8)){
}
*/
} // if u_file
else{
$pic8=$_POST['pic8'];
}
if($_FILES['file_d']['name']<>"")
{
$sur_num_text = strrchr($_FILES['file_d']['name'], ".");
$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))
{
//chmod(($path), 0777);
//$updateSQL = "UPDATE news_detail SET cat_id='$cat_id',name='$name',detail='$storytext',filename='$filename', d_date='$d_date' WHERE id='$id'";
//$Result1 = mysql_query($updateSQL, $conndb) or die(mysql_error());
if($file_2<>""){
$QFile=$file_2;
$fileQFile="doc_download/$QFile";
if(file_exists("$fileQFile")) unlink("$fileQFile");
} // if $file_2
} // if copy
} // if is_uploaded_file
} // if have file
else{
$filename=$_POST[file2];
}
$name = $_POST["name"];
$storytext = $_POST["storytext"];
$update_time = $_POST["utime"];
$update_name = $_SESSION[user];
$updateSQL = "UPDATE news_detail SET cat_id='$cat_id',name='$name',detail='$storytext',pic='$pic',filename='$filename', d_date='$d_date',pic2='$pic2',pic3='$pic3',pic4='$pic4',pic5='$pic5',pic6='$pic6',pic7='$pic7',pic8='$pic8',update_time='$update_time',update_name='$update_name' WHERE id='$id' ";
$Result1 = mysql_query($updateSQL, $conndb) or die(mysql_error());
//echo '<br> update = '.$updateSQL;
/*** start more file ***/
if($id!=""){
$del=$_POST[del];
for($k=0;$k<=count($del);$k++){
if($del[$k]!=""){
$sqlp="select path from news_detail_file where id_file=".$del[$k];
$resp=mysql_query($sqlp,$conndb) or die(mysql_error());
$datp=mysql_fetch_array($resp);
if(file_exists("doc_download/".$datp[path])){
unlink("doc_download/".$datp[path]);
}
$delete="delete from news_detail_file where id_file=".$del[$k];
//echo '<br> del = '.$delete;
mysql_query($delete,$conndb) or die(mysql_error());
}
}
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];
if(move_uploaded_file($_FILES["files"]["tmp_name"][$i],"doc_download/".$filename_upload))
{
//chmod(("doc_download/".$name), 0777);
echo "Copy/Upload Complete<br>";
$sql_file="INSERT INTO news_detail_file (id,path,created) VALUES ('".$id."','".$name."','".time()."')";
//echo '<br> sql_file = '.$sql_file;
mysql_query($sql_file,$conndb) or die(mysql_error());
}
}
else{
//echo '<br> Not upload new file ';
}
}
}
if($Result1<>"")
{
?>
<SCRIPT LANGUAGE="JavaScript">
alert("á¡é䢢éÍÁÙÅàÃÕºÃéÍÂáÅéÇ !!.");
// history.back();
</script>
<?
echo "<meta http-equiv='refresh' content='0;URL=admin.php?cat_id=".$cat_id."'>";
}
}
$colname_rsShownews = "-1";
if (isset($_GET['id'])) {
$colname_rsShownews = (get_magic_quotes_gpc()) ? $_GET['id'] : addslashes($_GET['id']);
}
mysql_select_db($database_conndb, $conndb);
$query_rsShownews = sprintf("SELECT * FROM news_detail WHERE id = %s", $colname_rsShownews);
$rsShownews = mysql_query($query_rsShownews, $conndb) or die(mysql_error());
$row_rsShownews = mysql_fetch_assoc($rsShownews);
$totalRows_rsShownews = mysql_num_rows($rsShownews);
$query_rsNews = "SELECT * FROM news_category ORDER BY cat_id";
$rsNews = mysql_query($query_rsNews, $conndb) or die(mysql_error());
$row_rsNews = mysql_fetch_assoc($rsNews);
$cat_id=$row_rsShownews["cat_id"];
?>
<!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>ͧ¤ì¡ÒúÃÔËÒÃÊèǹµÓºÅ¾Ø¹¾Ô¹ µÓºÅ¾Ø¹¾Ô¹ ÍÓàÀ;ع¾Ô¹ ¨Ñ§ËÇÑ´ÊØÃÒÉ®Ãì¸Ò¹Õ : http://www.phunphin.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" --><!-- InstanceEndEditable -->
<!-- You can use Open Graph tags to customize link previews.
Learn more: https://developers.facebook.com/docs/sharing/webmasters -->
<meta property="og:url" content="https://www.your-domain.com/your-page.html" />
<meta property="og:type" content="website" />
<meta property="og:title" content="Your Website Title" />
<meta property="og:description" content="Your description" />
<meta property="og:image" content="https://www.your-domain.com/path/image.jpg" />
<style type="text/css">
<!--
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
background-color:#006cd8;
}
-->
</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;
}
.style1 {color: #000000}
-->
</style>
<!--font-->
<link href="https://fonts.googleapis.com/css?family=Chakra+Petch|Kanit|Pridi&display=swap" rel="stylesheet">
<!--font-->
<style type="text/css">
<!--
.style4 {font-family: 'Chakra Petch', sans-serif}
-->
</style>
</head>
<body background="../images/0bg1_edit01.png" style="background-repeat:no-repeat; background-position:top">
<!-- content -->
<div align="center">
<table width="1000" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="605" align="center" valign="top"> </td>
</tr>
<tr>
<td height="55" align="center" valign="top"><table width="1000" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td align="center" valign="top"><a href="http://www.phunphin.go.th/index.php"><img src="../images/1menutop_01.png" alt=""/></a></td>
</tr>
</table></td>
</tr>
<tr>
<td align="center"> </td>
</tr>
<tr>
<td align="center" valign="top"> </td>
</tr>
<tr>
<td align="center" valign="top">
<table width="1000" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td align="center" valign="top">
<table width="1000" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td align="center" valign="top"><img src="../images/bg_con2_01.png" width="100"></td>
</tr>
<tr>
<td align="center" valign="top" background="../images/bg_con2_02.png" style="background-repeat:repeat; background-position:top"><table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td align="center" valign="top"><!-- InstanceBeginEditable name="EditRegion3" -->
<table width="99%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td class="title2"><div align="center" class="head">
<?
if ($cat_id!=""){
$query_CatS = "SELECT * FROM news_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 "¢éÍÁÙÅ¢èÒÇÊÒÃ";
}
?>
</div></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td class="styles1"><div align="right">
<div align="right"><a href="../admin/main.php" class="styles2">˹éÒ Admin </a>| <a href="admin.php?cat_id=<? echo $cat_id; ?>" class="styles2">
<? echo $row_CatS['cat_name']; ?>
</a> | <a href="add_category.php" class="styles2">à¾ÔèÁËÁÇ´ËÁÙè </a> | <a href="add_detail.php?cat_id=<? echo $cat_id; ?>" class="styles2">à¾ÔèÁ¢éÍÁÙÅ</a> <a href="add_detail.php" class="styles2"></a> | á¡é䢢éÍÁÙÅ | <a href="../admin/signout.php" class="styles2">ÍÍ¡¨Ò¡Ãкº </a></div>
</div></td>
</tr>
<tr>
<td colspan="3" align="center" valign="top"> </td>
</tr>
<tr>
<td colspan="3" align="center" valign="top">
<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 action="<?php echo $editFormAction; ?>" method="POST" name="updatenews" enctype="multipart/form-data">
<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="121" align="right" class="styles1"><div align="right">ËÑÇ¢éÍ: </div></td>
<td width="616" align="left" class="red"><input name="name" type="text" class="styles4" id="name" value="<?php echo $row_rsShownews['name']; ?>" size="70" />
**</td>
</tr>
<tr>
<td width="121" align="right" valign="top" class="styles1">ËÁÇ´ËÁÙè : </td>
<td width="616" 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']; ?>" <? if($cat_id==$row_rsNews['cat_id']) echo "selected"?> class="styles4"><? echo $row_rsNews['cat_name']; ?></option>
<?
}while($row_rsNews = mysql_fetch_assoc($rsNews));
?>
</select>
</div></td>
</tr>
<tr>
<td width="121" align="right" valign="top" class="styles1"><div align="right">ÃÒÂÅÐàÍÕ´Í×è¹ æ </div></td>
<td width="616" align="left" class="red"><div align="left">
</div></td>
</tr>
<tr>
<td colspan="2" align="center" class="styles1"><textarea name="storytext"><?php echo stripslashes($row_rsShownews['detail']);?></textarea></td>
</tr>
<tr>
<td width="121" align="right" class="styles1" valign="top"><div align="right">ÀÒ¾»ÃСͺ 1 : </div></td>
<td width="616" align="left" class="styles1">
<a href="photo/<?php echo stripslashes($row_rsShownews['pic']);?>" target="_blank"><?php echo stripslashes($row_rsShownews['pic']);?></a><br>
<input name="ufile" type="file" class="styles4" id="ufile" size="45" />
<input type="hidden" name="pic1" value="<?php echo stripslashes($row_rsShownews['pic']);?>" />
¢¹Ò´ä¿ÅìäÁèà¡Ô¹ 8 MB </td>
</tr>
<tr>
<td width="121" align="right" class="styles1" valign="top"><div align="right">ÀÒ¾»ÃСͺ 2 : </div></td>
<td width="616" align="left" class="styles1">
<a href="photo/<?php echo stripslashes($row_rsShownews['pic2']);?>" target="_blank"><?php echo stripslashes($row_rsShownews['pic2']);?></a><br>
<input name="ufile2" type="file" class="styles4" id="ufile2" size="45" />
<input type="hidden" name="pic2" value="<?php echo stripslashes($row_rsShownews['pic2']);?>" />
¢¹Ò´ä¿ÅìäÁèà¡Ô¹ 8 MB </td>
</tr>
<tr>
<td width="121" align="right" class="styles1" valign="top"><div align="right">ÀÒ¾»ÃСͺ 3 : </div></td>
<td width="616" align="left" class="styles1">
<a href="photo/<?php echo stripslashes($row_rsShownews['pic3']);?>" target="_blank"><?php echo stripslashes($row_rsShownews['pic3']);?></a><br>
<input name="ufile3" type="file" class="styles4" id="ufile3" size="45" />
<input type="hidden" name="pic3" value="<?php echo stripslashes($row_rsShownews['pic3']);?>" />
¢¹Ò´ä¿ÅìäÁèà¡Ô¹ 8 MB </td>
</tr>
<tr>
<td width="121" align="right" class="styles1" valign="top"><div align="right">ÀÒ¾»ÃСͺ 4 : </div></td>
<td width="616" align="left" class="styles1">
<a href="photo/<?php echo stripslashes($row_rsShownews['pic4']);?>" target="_blank"><?php echo stripslashes($row_rsShownews['pic4']);?></a><br>
<input name="ufile4" type="file" class="styles4" id="ufile4" size="45" />
<input type="hidden" name="pic4" value="<?php echo stripslashes($row_rsShownews['pic4']);?>" />
¢¹Ò´ä¿ÅìäÁèà¡Ô¹ 8 MB </td>
</tr>
<tr>
<td width="121" align="right" class="styles1" valign="top"><div align="right">ÀÒ¾»ÃСͺ 5 : </div></td>
<td width="616" align="left" class="styles1">
<a href="photo/<?php echo stripslashes($row_rsShownews['pic5']);?>" target="_blank"><?php echo stripslashes($row_rsShownews['pic5']);?></a><br>
<input name="ufile5" type="file" class="styles4" id="ufile5" size="45" />
<input type="hidden" name="pic5" value="<?php echo stripslashes($row_rsShownews['pic5']);?>" />
¢¹Ò´ä¿ÅìäÁèà¡Ô¹ 8 MB </td>
</tr>
<tr>
<td width="121" align="right" class="styles1" valign="top"><div align="right">ÀÒ¾»ÃСͺ 6 : </div></td>
<td width="616" align="left" class="styles1">
<a href="photo/<?php echo stripslashes($row_rsShownews['pic6']);?>" target="_blank"><?php echo stripslashes($row_rsShownews['pic6']);?></a><br>
<input name="ufile6" type="file" class="styles4" id="ufile6" size="45" />
<input type="hidden" name="pic6" value="<?php echo stripslashes($row_rsShownews['pic6']);?>" />
¢¹Ò´ä¿ÅìäÁèà¡Ô¹ 8 MB </td>
</tr>
<tr>
<td width="121" align="right" class="styles1" valign="top"><div align="right">ÀÒ¾»ÃСͺ 7 : </div></td>
<td width="616" align="left" class="styles1">
<a href="photo/<?php echo stripslashes($row_rsShownews['pic7']);?>" target="_blank"><?php echo stripslashes($row_rsShownews['pic7']);?></a><br>
<input name="ufile7" type="file" class="styles4" id="ufile7" size="45" />
<input type="hidden" name="pic7" value="<?php echo stripslashes($row_rsShownews['pic7']);?>" />
¢¹Ò´ä¿ÅìäÁèà¡Ô¹ 8 MB </td>
</tr>
<tr>
<td width="121" align="right" class="styles1" valign="top"><div align="right">ÀÒ¾»ÃСͺ 8 : </div></td>
<td width="616" align="left" class="styles1">
<a href="photo/<?php echo stripslashes($row_rsShownews['pic8']);?>" target="_blank"><?php echo stripslashes($row_rsShownews['pic8']);?></a><br>
<input name="ufile8" type="file" class="styles4" id="ufile8" size="45" />
<input type="hidden" name="pic8" value="<?php echo stripslashes($row_rsShownews['pic8']);?>" />
¢¹Ò´ä¿ÅìäÁèà¡Ô¹ 8 MB </td>
</tr>
<tr class="box1">
<td align="right" class="styles1" colspan=2><hr width="90%" /></div></td>
</tr>
<tr class="box1">
<td align="right" class="styles1" valign="top"><div align="right">àÍ¡ÊÒûÃСͺ : </div></td>
<td align="left" class="styles1">
<a href="doc_download/<?php echo $row_rsShownews['filename'];?>" target="_blank"><?php echo $row_rsShownews['filename'];?></a><br>
<input type="hidden" name="file2" value="<?php echo $row_rsShownews['filename'];?>" />
<input name="file_d" type="file" class="styles1" id="file_d" size="45" />
¢¹Ò´ä¿ÅìäÁèà¡Ô¹ 8 MB </td>
</tr>
<?php
$get_f="SELECT * FROM news_detail_file WHERE id=".$id;
$res_f=mysql_query($get_f,$conndb) or die(mysql_error());
$g=1;
while($f=mysql_fetch_object($res_f)){
?>
<tr class="box1">
<td align="right" valign="top" class="styles1" >àÍ¡ÊÒûÃСͺ :</td>
<td class="red">
<a href="doc_download/<?php echo $f->path;?>" target="_blank"><?php echo $f->path;?></a>
<input type="checkbox" name="del[<?php echo $g;?>]" value="<?php echo $f->id_file;?>"> ź <br>
<input type="hidden" name="pb[<?php echo $g;?>]" value="<?php echo $f->path;?>">
<input name="files[]" type="file" class="styles1" id="file2" size="40" /> </td>
</tr>
<?php
$g++;
}
if($g<20){
for($j=$g;$j<=20;$j++){
?>
<tr>
<td width="160" height="30" align="right" class="styles1">àÍ¡ÊÒûÃСͺ : </td>
<td width="609" height="30" align="left" class="red"><input name="files[]" type="file" class="styles1" id="file" size="40" /></td>
</tr>
<?php
}
}
?>
<tr>
<td class="styles1" ><div align="right">Çѹ à´×͹ »Õ ·Õè»ÃСÒÈ : </div></td>
<td bgcolor="#FFFFFF"><div align="left"><? $w=explode("-",$row_rsShownews['d_date']); ?>
<select name="dated">
<option value="0">Çѹ·Õè</option>
<?
for($i=1;$i<32;$i++){
?>
<option value="<?=$i;?>" <? if($w[2]==$i) echo "selected"; ?>><?=$i;?></option>
<?
}
?>
</select>
<select name="month">
<option value="0">à´×͹</option>
<option value="1" <? if($w[1]==1) echo "selected"; ?>>Á¡ÃÒ¤Á</option>
<option value="2" <? if($w[1]==2) echo "selected"; ?>>¡ØÁÀҾѹ¸ì</option>
<option value="3" <? if($w[1]==3) echo "selected"; ?>>ÁÕ¹Ò¤Á</option>
<option value="4" <? if($w[1]==4) echo "selected"; ?>>àÁÉÒ¹</option>
<option value="5" <? if($w[1]==5) echo "selected"; ?>>¾ÄÉÀÒ¤Á</option>
<option value="6" <? if($w[1]==6) echo "selected"; ?>>ÁԶعÒ¹</option>
<option value="7" <? if($w[1]==7) echo "selected"; ?>>¡Ã¡®Ò¤Á</option>
<option value="8" <? if($w[1]==8) echo "selected"; ?>>ÊÔ§ËÒ¤Á</option>
<option value="9" <? if($w[1]==9) echo "selected"; ?>>¡Ñ¹ÂÒ¹</option>
<option value="10" <? if($w[1]==10) echo "selected"; ?>>µØÅÒ¤Á</option>
<option value="11" <? if($w[1]==11) echo "selected"; ?>>¾ÄȨԡÒ¹</option>
<option value="12" <? if($w[1]==12) echo "selected"; ?>>¸Ñ¹ÇÒ¤Á</option>
</select>
<select name="years">
<option value="0">»Õ</option>
<?
$start_y=(date("Y")-7);
$end_y=(date("Y")+3);
for($y=$start_y;$y<$end_y;$y++){
?>
<option value="<?=$y;?>" <? if($w[0]==$y) echo "selected"; ?>><?=$y+543;?></option>
<?
}
?>
</select>
</div></td>
</tr>
<tr>
<td class="styles1" ><div align="right">àÇÅÒ : </div></td>
<td class="red"><input name="utime" type="text" class="styles4" size="5" maxlength="15" value="<?php echo $row_rsShownews['update_time']; ?>"></td>
</tr>
<tr>
<td colspan="2" align="right" class="red"><div align="center"></div></td>
</tr>
<tr>
<td height="25" colspan="2" align="right"><div align="center">
<input name="okbutton" type="submit" class="btn" value="á¡éä¢"/>
<input name="file_1" type="hidden" value="<?php echo $row_rsShownews['pic']; ?>" />
<input name="id" type="hidden" id="id" value="<?php echo $row_rsShownews['id']; ?>" />
<input type="hidden" name="MM_update" value="updatenews">
</div></td>
</tr>
</table>
</form>
</td>
</tr>
<tr>
<td height="30" colspan="3"> </td>
</tr>
</table>
<!-- InstanceEndEditable --></td>
</tr>
<tr>
<td align="center" valign="top"> </td>
</tr>
</table></td>
</tr>
<tr>
<td align="center" valign="top"><img src="../images/bg_con2_04.png" width="1000"></td>
</tr>
</table> </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>
</body>
<!-- InstanceEnd --></html>
<?
if($conndb)
{
mysql_close($conndb);
unset($conndb);
}
?>