コード例 #1
0
ファイル: resume.php プロジェクト: pamalite/yel
require_once dirname(__FILE__) . "/../private/lib/utilities.php";
session_start();
// if (!isset($_GET['ie_suck'])) {
//     if ($GLOBALS['protocol'] == 'https') {
//         if (empty($_SERVER['HTTPS']) || $_SERVER['HTTPS'] == 'off') {
//             redirect_to('https://'. $GLOBALS['root']. '/employers/resume.php?id='. $_GET['id']);
//             exit();
//         }
//     }
// }
if (!isset($_SESSION['yel']['employer']) || empty($_SESSION['yel']['employer']['id']) || empty($_SESSION['yel']['employer']['sid']) || empty($_SESSION['yel']['employer']['hash'])) {
    echo "An illegal attempt to view resume has been detected.";
    exit;
}
$resume = new Resume('', $_GET['id']);
$resume_file = $resume->getFileInfo();
$member = new Member($resume_file['member']);
$has_photo = $member->hasPhoto();
$file = $GLOBALS['resume_dir'] . "/" . $_GET['id'] . "." . $resume_file['file_hash'];
if ($has_photo) {
    ?>
        <html>
        </body>
        <div style="text-align: center;">
            <?php 
    if (file_exists($file)) {
        ?>
            <a href="http://<?php 
        echo $GLOBALS['root'] . '/employers/resume_download.php?id=' . $_GET['id'];
        ?>
">