ÿØÿà JFIF ` ` ÿþ
Server : Apache System : Linux ruga7-004.fmcity.com 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64 User : tkt_travelbus ( 1137) PHP Version : 7.0.0p1 Disable Function : mysql_pconnect Directory : /tkt_travelbus/www/admin/mypage/ |
Upload File : |
<? include "../include/top_proc.html"; //공통파일 인클루드 //테이블 $table = "TB_MEMBER"; $upload = "../../FileData/emp/"; if($SqlType=="member_updt"){ //수정 //필수값 체크 if( !$TK_MEMBER['mb_id'] ) error_msg(); // 회원정보 $data = member_fetch(" and mb_id='{$TK_MEMBER[mb_id]}' "); $row = $data[0]; // 삭제 if ( $del_flag != "Y" ) $del_flag="N"; // 이미지 삭제 if($emp_img_del=="Y") { @unlink($upload.$row['emp_img']); $sql = "update {$table} set emp_img='' where mb_id='{$TK_MEMBER[mb_id]}'"; db_query($sql); } if ($chg_passwd=="Y" and $mb_pwd) { $mb_pwd=md5(trim($mb_pwd)); $sql = "update {$table} set mb_pwd='{$mb_pwd}' where mb_id='{$TK_MEMBER[mb_id]}' "; db_query($sql); } // 업로드 if($_FILES['emp_img']['name']) { // 기존 이미지 삭제 @unlink($upload.$row['emp_img']); //이미지 업로드 $up_img = @FileUploadName( "", $upload, $_FILES['emp_img']['tmp_name'], $_FILES['emp_img']['name'] ,"");//파일 업로드 $sql = "update {$table} set emp_img='{$up_img}' where mb_id='{$TK_MEMBER[mb_id]}' "; db_query($sql); } //수정 $sql = "update $table set mb_birth='{$mb_birth}',mb_birth_sm='{$mb_birth_sm}', mb_email='{$mb_email}',mb_tel='{$mb_tel}' "; $sql .= " where mb_id='{$TK_MEMBER[mb_id]}' "; db_query($sql); error_msg("document.location='index.html?tmp_layer_id={$tmp_layer_id}';","script"); } // 근태 관리 추가 elseif($SqlType=="s01_ins") { if (!$mb_date) exit; $sql = "insert into {$table}_S01 set "; $sql .= " mb_id = '{$TK_MEMBER[mb_id]}' "; $sql .= " ,mb_date = '{$mb_date}' "; $sql .= " ,gubun = '{$gubun}' "; $sql .= " ,ins_dt = now() "; $sql .= " ,ins_admin = '{$TK_MEMBER[mb_id]}' "; $sql .= " ,ip='{$cf[user_ip]}' "; db_query($sql); error_msg("ajax_post('ajax_member','../mypage/member_s01_ajax.html');","script"); } // 연장근무 추가 elseif($SqlType=="s02_ins") { if (!$mb_date) exit; $start_tm = $start_tm_1.":".$start_tm_2; $end_tm = $end_tm_1.":".$end_tm_2; $sql = "insert into {$table}_S02 set "; $sql .= " mb_id = '{$TK_MEMBER[mb_id]}' "; $sql .= " ,mb_date = '{$mb_date}' "; $sql .= " ,start_tm = '{$start_tm}' "; $sql .= " ,end_tm = '{$end_tm}' "; $sql .= " ,work_minute = '{$work_minute}' "; $sql .= " ,ins_dt = now() "; $sql .= " ,ins_admin = '{$TK_MEMBER[mb_id]}' "; db_query($sql); error_msg("ajax_post('ajax_member','../mypage/member_s02_ajax.html');","script"); } // 휴가/월차 추가 elseif($SqlType=="s03_ins") { if (!$start_dt) exit; $start_tm = $start_tm_1.":".$start_tm_2; $end_tm = $end_tm_1.":".$end_tm_2; $mb_date = $start_dt; $sql = "insert into {$table}_S03 set "; $sql .= " mb_id = '{$TK_MEMBER[mb_id]}' "; $sql .= " ,mb_date = '{$mb_date}' "; $sql .= " ,gubun = '{$gubun}' "; $sql .= " ,start_dt = '{$start_dt}' "; $sql .= " ,end_dt = '{$end_dt}' "; $sql .= " ,voca_cnt = '{$voca_cnt}' "; $sql .= " ,reason = '{$reason}' "; $sql .= " ,ins_dt = now() "; $sql .= " ,ins_admin = '{$TK_MEMBER[mb_id]}' "; db_query($sql); //error_msg("ajax_post('ajax_member','../mypage/member_working.html');","script"); error_msg("alert('등록되었습니다.'); document.location='../mypage/member_working.html';","script"); } ?>