Server IP : 119.59.102.212 / Your IP : 3.135.190.81 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/gallery/ |
Upload File : |
<?php session_start(); include('../../../'.$_SESSION['web_name'].'/connect.php'); include('../../function_msg.php'); check_user_permission($_SESSION['admin_web']); $arrayData = setArrayToAdd($_POST['formData']); $arrayFile = $_POST['fileData']; $gallery_add = isset($arrayData['id_topic']) ? $arrayData['id_topic'] : ''; $gallery_update = isset($arrayData['id_update']) ? $arrayData['id_update'] : ''; $result = ''; if(isset($arrayFile)){ $sqlmax = "select max(id_record + 1) nomax from port_gallery_record"; $resultmax = mysql_query($sqlmax); $datamax = mysql_fetch_assoc($resultmax); $nomax = $datamax['nomax'] == '' ? 1 : $datamax['nomax']; $id_topic = $gallery_add > 0 ? $gallery_add : $gallery_update; foreach($arrayFile as $k => $data){ $arr_value[$k] = "('$nomax', '$id_topic', '$data[file_name]', '$data[explain]', '', '1')"; ++$nomax; } if(isset($arr_value)){ $str_value = implode(',', $arr_value); $insert = "INSERT INTO port_gallery_record VALUES $str_value"; if(mysql_query($insert)){ $result = $gallery_add > 0 ? 'index.php?mod=gallery_update&path=gallery&id_update='.$gallery_add : #'index.php?mod=gallery_output&path=gallery&id_topic='.$gallery_add : 'index.php?mod=gallery_update&path=gallery&id_update='.$gallery_update.'&block='.$arrayData['block']; } } } echo $result; ?>