예제 #1
0
if ($_POST['action'] == 'save_skills') {
    if (!isset($_POST['skill']) || !isset($_POST['skill'])) {
        echo "ko";
        exit;
    }
    $resume = new Resume($_POST['member'], $_POST['id']);
    $data = array();
    $data['id'] = $_POST['skill'];
    $data['skill'] = sanitize($_POST['skills']);
    if ($_POST['skill'] == "0") {
        if (!$resume->create_skill($data)) {
            echo "ko";
            exit;
        }
    } else {
        if (!$resume->update_skill($data)) {
            echo "ko";
            exit;
        }
    }
    echo "ok";
    exit;
}
if ($_POST['action'] == 'delete_technical_skill') {
    if (!isset($_POST['technical_skill']) || is_null($_POST['technical_skill']) || empty($_POST['technical_skill'])) {
        echo "ko";
        exit;
    }
    $resume = new Resume($_POST['member'], $_POST['id']);
    if (!$resume->delete_technical_skill($_POST['technical_skill'])) {
        echo "ko";