コード例 #1
0
ファイル: resume_action.php プロジェクト: pamalite/yel
}
if ($_POST['action'] == 'get_educations') {
    $resume = new Resume($_POST['member'], $_POST['id']);
    $educations = $resume->get_educations();
    $response = array('resume' => array('educations' => $educations));
    header('Content-type: text/xml');
    echo $xml_dom->get_xml_from_array($response);
    exit;
}
if ($_POST['action'] == 'delete_education') {
    if (!isset($_POST['education']) || is_null($_POST['education']) || empty($_POST['education'])) {
        echo "ko";
        exit;
    }
    $resume = new Resume($_POST['member'], $_POST['id']);
    if (!$resume->delete_education($_POST['education'])) {
        echo "ko";
        exit;
    }
    echo "ok";
    exit;
}
if ($_POST['action'] == 'save_education') {
    if (!isset($_POST['education']) || !isset($_POST['country']) || !isset($_POST['completed_on']) || !isset($_POST['qualification']) || !isset($_POST['institution'])) {
        echo "ko";
        exit;
    }
    $resume = new Resume($_POST['member'], $_POST['id']);
    $data = array();
    $data['id'] = $_POST['education'];
    $data['country'] = $_POST['country'];