コード例 #1
0
ファイル: resume_action.php プロジェクト: pamalite/yel
    $work_experiences = $resume->get_work_experiences();
    foreach ($work_experiences as $i => $row) {
        $work_experiences[$i]['description'] = desanitize($row['description']);
    }
    $response = array('resume' => array('work_experiences' => $work_experiences));
    header('Content-type: text/xml');
    echo $xml_dom->get_xml_from_array($response);
    exit;
}
if ($_POST['action'] == 'delete_work_experience') {
    if (!isset($_POST['experience']) || is_null($_POST['experience']) || empty($_POST['experience'])) {
        echo "ko";
        exit;
    }
    $resume = new Resume($_POST['member'], $_POST['id']);
    if (!$resume->delete_work_experience($_POST['experience'])) {
        echo "ko";
        exit;
    }
    echo "ok";
    exit;
}
if ($_POST['action'] == 'save_work_experience') {
    if (!isset($_POST['experience']) || !isset($_POST['industry']) || !isset($_POST['from']) || !isset($_POST['role']) || !isset($_POST['place']) || !isset($_POST['work_summary'])) {
        echo 'ko';
        exit;
    }
    $resume = new Resume($_POST['member'], $_POST['id']);
    $to = "";
    if (isset($_POST['to'])) {
        $to = $_POST['to'];