<? require_once('../connect/connect.php'); require_once('../connect/function.php'); mysql_query("SET NAMES UTF8"); //=========== กรณีมีการแก้ไขรายการ if($_GET["Action"]=="Save") { //=========== บันทึกข้อมูล $sql_up = "update system set SystemName='$_POST[txtSystemName]',Description='$_POST[txtDescription]' where SystemID='$_GET[SystemID]'"; $dbquery_up = mysql_query($sql_up); //echo $sql_up; // exit(); //=========== แก้ไขไฟล์เล็ก if(!empty($file)) { $path="../picture"; //=========== อัพโหลตไฟลืเล็ก @copy( $file ,"$path/$file_name"); $sql_up = "update system set Picture='$file_name' where SystemID='$_GET[SystemID]'"; $dbquery_up = mysql_query($sql_up); } if(!empty($filUpload)) { $path="../picture"; //=========== อัพโหลตไฟลืเล็กรูปภาพ @copy( $filUpload ,"$path/$filUpload_name"); $sql_up = "update system set FilesName='$filUpload_name' where SystemID='$_GET[SystemID]'"; $dbquery_up = mysql_query($sql_up); } echo"<script language='JavaScript'>"; echo"alert('แก้ไขข้อมูลเรียบร้อยแล้ว');"; echo"window.location='editsystem.php?SystemID=$_GET[SystemID]';"; echo"</script>"; } ?> <html> <title>..:: ระบบจัดการฐานข้อมูล ::</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" href="../css/styles.css" type="text/css"> <script language="JavaScript" src="editor.js"></script> <style type="text/css"> <!-- .style1 { font-family: "TH SarabunPSK"; font-size: 18; } .style2 {background-color: #FFFFFF; font-family: "Microsoft Sans Serif, "MS Sans Serif", sans-serif";} .style3 {font-family: "Microsoft Sans Serif, "MS Sans Serif", sans-serif"} .style4 {color: #000000; cursor: hand; font-weight: normal; font-family: "Microsoft Sans Serif, "MS Sans Serif", sans-serif";} .style5 {font-size: 18} --> </style> <div align="center" class="style1 style5"><br> <? //=========== อ่านว่าคือสินค้าชนิดใด $result=select("system","where 1=1 and SystemID='".$_GET["SystemID"]."'"); if(!$result) { } ?> <table cellspacing=1 cellpadding=4 width="68%" bgcolor=#CCCCCC border=0 align="center" height="10"> <tbody> <tr bgcolor=#e5e5e5> <td width="100%" bgcolor="#FFFFFF"> <div align="center"></div> <table cellspacing=1 cellpadding=4 width="100%" border=0 align="center" height="10"> <tbody> <tr bgcolor=#e5e5e5> <td width="35%" bgcolor="#FFFFFF"> <div align="left"><b><img src="../image/allrowto.gif" width="11" height="11" align="absbottom"> แก้ไขรายละเอียดต่างๆ</b></div></td> <td width="22%" align=middle bgcolor="#FFFFFF"> <div align="left"> </div></td> <td width="43%" bgcolor="#FFFFFF"> <div align="right"><a href="system.php?CatID=<?=$result["CatID"];?>">กลับไป</a></div></td> </tr> </tbody> </table></td> </tr> </tbody> </table> </div> <form action="<?=$_SERVER['PHP_SELF'];?>?SystemID=<?=$_GET["SystemID"];?>&Action=Save" method="post" enctype="multipart/form-data" name="frm<?=$i;?>" class="style1" onSubmit="return checkvalue()"> <table cellspacing=1 cellpadding=3 width="68%" bgcolor=#CCCCCC border=0 align="center" height="10"> <tbody> <tr bgcolor=#e5e5e5> <td width="31" bgcolor="#FFFFFF"> <script language="Javascript1.2"><!-- // load htmlarea _editor_url = ""; // URL to htmlarea files var win_ie_ver = parseFloat(navigator.appVersion.split("MSIE")[1]); if (navigator.userAgent.indexOf('Mac') >= 0) { win_ie_ver = 0; } if (navigator.userAgent.indexOf('Windows CE') >= 0) { win_ie_ver = 0; } if (navigator.userAgent.indexOf('Opera') >= 0) { win_ie_ver = 0; } if (win_ie_ver >= 5.5) { document.write('<scr' + 'ipt src="' +_editor_url+ 'editor.js"'); document.write(' language="Javascript1.2"></scr' + 'ipt>'); } else { document.write('<scr'+'ipt>function editor_generate() { return false; }</scr'+'ipt>'); } // --></script> <script language="JavaScript"> function checkvalue() </script> <table width="100%" border="0" cellspacing="2" cellpadding="2"> <tr> <td width="18%">ไฟล์ PDF</td> <td width="82%"><input name="filUpload" type="file" class="style2" id="filUpload"><br></td><br> </tr> <tr> <td valign="top">ชื่อโครงการ <font color="#FF0000">** </font></td> <td><input name="txtSystemName" type="text" class="style3" id="txtSystemName" style="width:550; background-color: #FFFFFF;" value="<?=$result["SystemName"];?>" maxlength="100"></td> </tr> <tr> <td valign="top">รูปภาพ <font color="#FF0000">** </font></td> <td><img src="../picture/<?=$result["Picture"];?>" /></td> </tr> <tr> <td valign="top"> </td> <td><input name="file" type="file" class="style2" id="file"></td> </tr> <tr> <td valign="top">รายละเอียด <font color="#FF0000">** </font></td> <td><textarea name="txtDescription" cols="40" rows="10" class="style3" id="txtDescription" style="width:550; height:450; background-color: #FFFFFF;"><?=$result["Description"];?></textarea> <script language="javascript1.2"> editor_generate('txtDescription'); </script> </td> </tr> <tr> <td> </td> <td><input name="Submit" type="submit" class="style4" value="บันทึก"> <input name="Cancel" type="button" class="style4" id="Cancel" onClick="window.location='system.php?CatID=<?=$result["CatID"];?>';" value="ยกเลิก"></td> </tr> <tr> <td> </td> <td> </td> </tr> <tr> <td> </td> <td> </td> </tr> </table></td> </tr> </tbody> </table> <table cellspacing=0 cellpadding=4 width="68%" bgcolor=#CCCCCC border=0 align="center" height="10"> <tbody> <tr bgcolor=#e5e5e5> <td width="100%" bgcolor="#FFFFFF"> <div align="center"></div> <table cellspacing=1 cellpadding=4 width="100%" border=0 align="center" height="10"> <tbody> <tr bgcolor=#e5e5e5> <td width="35%" bgcolor="#FFFFFF"> <div align="left"></div></td> <td width="22%" align=middle bgcolor="#FFFFFF"> <div align="left"> </div></td> <td width="43%" bgcolor="#FFFFFF"> <div align="right"><a href="system.php?CatID=<?=$result["CatID"];?>">กลับไป</a></div></td> </tr> </tbody> </table></td> </tr> </tbody> </table> </form>
เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง