Server IP : 119.59.102.212 / Your IP : 216.73.216.144 Web Server : Apache/2 System : Linux narin 2.6.32-042stab142.1 #1 SMP Tue Jan 28 23:44:17 MSK 2020 x86_64 User : yangkam ( 1022) PHP Version : 5.6.40 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 MySQL : ON | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /home/yangkam/domains/yangkam.go.th/private_html/coremain/module/move/ |
Upload File : |
<?php $navig['move']="ข้อมูลการโอนย้าย อปท."; $navig['move_update']="แก้ไขข้อมูล"; navigator($navig); echo "<br>"; bar_header("ข้อมูลการโอนย้าย อปท."); // Bar_Header fieldset_top("แก้ไขข้อมูล"); include('coremain/connec_out.php'); if($p_who!="") { $who=trim($p_who); } if($p_topic!="") { $topic=trim($p_topic); } if($p_startrow!="") { $startrow=trim($p_startrow); } if($p_position_pic1!="") { $position_pic1=trim($p_position_pic1); } if($p_position_pic2!="") { $position_pic2=trim($p_position_pic2); } if($p_position_pic3!="") { $position_pic3=trim($p_position_pic3); } if($p_position_pic4!="") { $position_pic4=trim($p_position_pic4); } if($p_explain1!="") { $explain1=trim($p_explain1); } if($p_explain2!="") { $explain2=trim($p_explain2); } if($p_explain3!="") { $explain3=trim($p_explain3); } if($p_explain4!="") { $explain4=trim($p_explain4); } $userfile5_name=trim($_FILES['userfile5']['name']); if($p_date!="") { $date=trim($p_date); } if($p_month!="") { $month=trim($p_month); } if($p_year!="") { $year=trim($p_year); } if($p_date1!="") { $date1=trim($p_date1); } if($p_month1!="") { $month1=trim($p_month1); } if($p_year1!="") { $year1=trim($p_year1); } $date_post=$year.$month.$date; $date_line=$year1.$month1.$date1; if($p_news_out!="") { $news_out=trim($p_news_out); } if($p_id_update!="") { $id_update=trim($p_id_update); } if($p_check_files!="") { $check_files=trim($p_check_files); } if($p_cus_province!="") { $cus_province=trim($p_cus_province); } $sql="select pic1,pic2,pic3,pic4,files from cms_move where id='$id_update' and id_tumbon='$_SESSION[id_tumbon]'"; $result=mysql_query($sql); $data=mysql_fetch_row($result); // ให้ชื่อไฟล์เหมือนเดิม if($userfile5_name=="") { $name5=$data[4]; } // เอาชื่อไฟล์ออกจากระบบ if($check_files=="1" and $userfile5_name==""){ $sql="select files from cms_move where id='$id_update'"; $result=mysql_query($sql); $data=mysql_fetch_row($result); if($data[0]!="") { $pieces = explode("go.th/", $data[0]); unlink("$pieces[1]"); } $name5=""; } // ทับชื่อไฟล์เข้าไปใหม่ if($userfile5_name!="") { $name5=create_filename($userfile5_name); $dlink="$_SESSION[web_name]/mainfile/".$name5; $sql="select files from cms_move where id='$id_update'"; $result=mysql_query($sql); $data=mysql_fetch_row($result); if($data[0]!="") { $pieces = explode("go.th/", $data[0]); unlink("$pieces[1]"); } upload_file_to_server($dlink,$_FILES['userfile5']); $name5="http://$_SERVER[HTTP_HOST]/$_SESSION[web_name]/mainfile/$name5"; } $s="SELECT name FROM `th_province` WHERE id='$cus_province'"; $r=mysql_query($s); $d=mysql_fetch_array($r); $sql="UPDATE `cms_move` SET `topic` = '$topic', `fulltexts` = '$fulltexts', `date_post` = '$date_post', `date_line` = '$date_line', `who` = '$main_data[name_web]',`pic1` = '$d[0]', `position_pic1` = '$position_pic1',`explain1` = '$explain1',`pic2` = '$name2', `position_pic2` = '$position_pic2',`explain2` = '$explain2',`pic3` = '$name3', `position_pic3` = '$position_pic3',`explain3` = '$explain3',`pic4` = '$name4', `position_pic4` = '$position_pic4',`explain4` = '$explain4',`files` = '$name5' ,`province` = '$_SESSION[name_province]',`show_on_off` = '$news_out' WHERE id='$id_update' and id_tumbon='$_SESSION[id_tumbon]'"; $result = mysql_query($sql) or die(mysql_error()); msg_update_data(); // ข้อความแก้ไขแล้ว refresh_data("index.php?mod=move&path=move",1); // refresh หน้าจอ fieldset_down(); mysql_close($handle_out); include("$_SESSION[web_name]/connect.php"); ?>