Exemple #1
0
<?php

require_once dirname(__FILE__) . "/../private/lib/utilities.php";
session_start();
if ($GLOBALS['protocol'] == 'https') {
    if (empty($_SERVER['HTTPS']) || $_SERVER['HTTPS'] == 'off') {
        redirect_to('https://' . $GLOBALS['root'] . '/members/resume_xml.php?id=' . $_GET['id']);
        exit;
    }
}
if (!isset($_SESSION['yel']['member']) || empty($_SESSION['yel']['member']['id']) || empty($_SESSION['yel']['member']['sid']) || empty($_SESSION['yel']['member']['hash'])) {
    echo "An illegal attempt to view resume has been detected.";
    exit;
}
$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();
Exemple #2
0
<?php

require_once dirname(__FILE__) . "/../private/lib/utilities.php";
session_start();
if (!isset($_POST['id'])) {
    echo "ko";
    exit;
    //redirect_to('login.php');
}
$xml_dom = new XMLDOM();
if (!isset($_POST['action'])) {
    $resume = new Resume($_POST['member'], $_POST['id']);
    $response = array('resume' => $resume->get());
    header('Content-type: text/xml');
    echo $xml_dom->get_xml_from_array($response);
    exit;
}
// if ($_POST['action'] == 'privatize') {
//     $resume = new Resume($_POST['member'], $_POST['id']);
//     $data = array();
//     $data['private'] = 'Y';
//
//     if ($resume->update($data) == false) {
//         echo "ko";
//         exit();
//     }
//
//     echo "ok";
//     exit();
// }
//