コード例 #1
0
ファイル: resume_xml.php プロジェクト: pamalite/yel
$resume = new Resume(0, $_GET['id']);
$cover = $resume->get();
if (!is_null($cover[0]['file_name'])) {
    $file = $resume->get_file();
    header('Content-length: ' . $file['size']);
    header('Content-type: ' . $file['type']);
    header('Content-Disposition: attachment; filename="' . $file['name'] . '"');
    readfile($GLOBALS['resume_dir'] . "/" . $_GET['id'] . "." . $file['hash']);
    exit;
}
$xml_dom = new XMLDOM();
$member = new Member($cover[0]['member']);
$contacts = $member->get();
$experiences = $resume->get_work_experiences();
$educations = $resume->get_educations();
$skills = $resume->get_skills();
$technical_skills = $resume->get_technical_skills();
$resume_data = array();
$resume_data['resume']['_ATTRS'] = array('candidate' => $member->get_name());
$resume_data['resume']['DISCLAIMER_NOTE'] = 'Generated from YellowElevator.com. Resume Terms of Use subjected.';
$resume_data['resume']['contacts']['telephone_number'] = $contacts[0]['phone_num'];
$resume_data['resume']['contacts']['email_address'] = $contacts[0]['email_addr'];
$resume_data['resume']['contacts']['address'] = $contacts[0]['address'];
$resume_data['resume']['contacts']['state'] = $contacts[0]['state'];
$resume_data['resume']['contacts']['country'] = Country::getCountryFrom($contacts[0]['country']);
$resume_data['resume']['work_experiences'] = array();
if (count($experiences) > 0) {
    $i = 0;
    foreach ($experiences as $experience) {
        $industry = Industry::get($experience['industry']);
        $resume_data['resume']['work_experiences']['work_experience'][$i]['industry'] = $industry[0]['industry'];
コード例 #2
0
ファイル: resume_action.php プロジェクト: pamalite/yel
        if (!$resume->create_education($data)) {
            echo "ko";
            exit;
        }
    } else {
        if (!$resume->update_education($data)) {
            echo "ko";
            exit;
        }
    }
    echo "ok";
    exit;
}
if ($_POST['action'] == 'get_skills') {
    $resume = new Resume($_POST['member'], $_POST['id']);
    $educations = $resume->get_skills();
    $response = array('resume' => array('educations' => $educations));
    header('Content-type: text/xml');
    echo $xml_dom->get_xml_from_array($response);
    exit;
}
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") {