} } else { $resume = new Resume($member->getId(), $_POST['id']); $is_update = true; if (!$resume->update($data)) { redirect_to('member.php?member_email_addr=' . $member->getId() . '&page=resumes&error=2'); exit; } } $data = array(); $data['FILE'] = array(); $data['FILE']['type'] = $_FILES['my_file']['type']; $data['FILE']['size'] = $_FILES['my_file']['size']; $data['FILE']['name'] = str_replace(array('\'', '"', '\\'), '', basename($_FILES['my_file']['name'])); $data['FILE']['tmp_name'] = $_FILES['my_file']['tmp_name']; if ($resume->uploadFile($data, $is_update) === false) { $query = "DELETE FROM resume_index WHERE resume = " . $resume->getId() . ";\n DELETE FROM resumes WHERE id = " . $resume->getId(); $mysqli = Database::connect(); $mysqli->transact($query); redirect_to('member.php?member_email_addr=' . $member->getId() . '&page=resumes&error=3'); exit; } redirect_to('member.php?member_email_addr=' . $member->getId() . '&page=resumes'); exit; } if ($_POST['action'] == 'get_jobs') { $employer = new Employer($_POST['id']); $result = $employer->getJobs($_POST['order']); if (is_null($result) || empty($result)) { echo '0'; exit;