<?php

switch ($resume->post_status) {
    case 'publish':
        if (resume_manager_user_can_view_resume($resume->ID)) {
            printf('<p class="resume-submitted">' . __('Your resume has been submitted successfully. To view your resume <a href="%s">click here</a>.', 'wp-job-manager-resumes') . '</p>', get_permalink($resume->ID));
        } else {
            print '<p class="resume-submitted">' . __('Your resume has been submitted successfully.', 'wp-job-manager-resumes') . '</p>';
        }
        break;
    case 'pending':
        //print( '<p class="resume-submitted">' . __( 'Your resume has been submitted successfully and is pending approval.', 'wp-job-manager-resumes' ) . '</p>' );
        print '<p class="resume-submitted">' . __('Thank you for submitting your CV. One of our consultants will be in touch.', 'wp-job-manager-resumes') . '</p>';
        break;
    default:
        do_action('resume_manager_resume_submitted_content_' . str_replace('-', '_', sanitize_title($resume->post_status)), $resume);
        break;
}
 public function download_resume_handler()
 {
     global $post, $is_IE;
     if (is_single() && !empty($_GET['download-resume']) && resume_manager_user_can_view_resume($post->ID) && apply_filters('resume_manager_user_can_download_resume_file', true, $post->ID)) {
         $file_paths = get_resume_files();
         $file_id = !empty($_GET['file-id']) ? absint($_GET['file-id']) : 0;
         $file_path = $file_paths[$file_id];
         if (!is_multisite()) {
             /*
              * Download file may be either http or https.
              * site_url() depends on whether the page containing the download (ie; My Account) is served via SSL because WC
              * modifies site_url() via a filter to force_ssl.
              * So blindly doing a str_replace is incorrect because it will fail when schemes are mismatched. This code
              * handles the various permutations.
              */
             $scheme = parse_url($file_path, PHP_URL_SCHEME);
             if ($scheme) {
                 $site_url = set_url_scheme(site_url(''), $scheme);
             } else {
                 $site_url = is_ssl() ? str_replace('https:', 'http:', site_url()) : site_url();
             }
             $file_path = str_replace(trailingslashit($site_url), ABSPATH, $file_path);
         } else {
             $network_url = is_ssl() ? str_replace('https:', 'http:', network_admin_url()) : network_admin_url();
             $upload_dir = wp_upload_dir();
             // Try to replace network url
             $file_path = str_replace(trailingslashit($network_url), ABSPATH, $file_path);
             // Now try to replace upload URL
             $file_path = str_replace($upload_dir['baseurl'], $upload_dir['basedir'], $file_path);
         }
         $file_path = realpath($file_path);
         $file_extension = strtolower(substr(strrchr($file_path, "."), 1));
         $ctype = "application/force-download";
         foreach (get_allowed_mime_types() as $mime => $type) {
             $mimes = explode('|', $mime);
             if (in_array($file_extension, $mimes)) {
                 $ctype = $type;
                 break;
             }
         }
         // Start setting headers
         if (!ini_get('safe_mode')) {
             @set_time_limit(0);
         }
         if (function_exists('get_magic_quotes_runtime') && get_magic_quotes_runtime()) {
             @set_magic_quotes_runtime(0);
         }
         if (function_exists('apache_setenv')) {
             @apache_setenv('no-gzip', 1);
         }
         @session_write_close();
         @ini_set('zlib.output_compression', 'Off');
         /**
          * Prevents errors, for example: transfer closed with 3 bytes remaining to read
          */
         @ob_end_clean();
         // Clear the output buffer
         if (ob_get_level()) {
             $levels = ob_get_level();
             for ($i = 0; $i < $levels; $i++) {
                 @ob_end_clean();
                 // Zip corruption fix
             }
         }
         if ($is_IE && is_ssl()) {
             // IE bug prevents download via SSL when Cache Control and Pragma no-cache headers set.
             header('Expires: Wed, 11 Jan 1984 05:00:00 GMT');
             header('Cache-Control: private');
         } else {
             nocache_headers();
         }
         $filename = basename($file_path);
         if (strstr($filename, '?')) {
             $filename = current(explode('?', $filename));
         }
         header("X-Robots-Tag: noindex, nofollow", true);
         header("Content-Type: " . $ctype);
         header("Content-Description: File Transfer");
         header("Content-Disposition: attachment; filename=\"" . $filename . "\";");
         header("Content-Transfer-Encoding: binary");
         if ($size = @filesize($file_path)) {
             header("Content-Length: " . $size);
         }
         $this->readfile_chunked($file_path) or wp_die(__('File not found', 'wp-job-manager-resumes') . ' <a href="' . esc_url(home_url()) . '" class="wc-forward">' . __('Go to homepage', 'wp-job-manager-resumes') . '</a>');
         exit;
     }
 }
 *
 */
global $post;
$skills = wp_get_object_terms($post->ID, 'resume_skill', array('fields' => 'names'));
$education = get_post_meta($post->ID, '_candidate_education', true);
$experience = get_post_meta($post->ID, '_candidate_experience', true);
$info = jobify_theme_mod('jobify_listings', 'jobify_listings_display_area');
$has_local_info = is_array($skills) || $education || $experience;
$col_description = 'top' == $info ? '12' : ($has_local_info ? '6' : '10');
$col_info = 'top' == $info ? '12' : ('side' == $info ? '4' : '6');
?>

<div class="single-resume-content row">

	<?php 
if (resume_manager_user_can_view_resume($post->ID)) {
    ?>

		<?php 
    do_action('single_resume_start');
    ?>

		<?php 
    locate_template(array('sidebar-single-resume-top.php'), true, false);
    ?>

		<div class="resume_description col-md-<?php 
    echo $col_description;
    ?>
 col-sm-12">
			<h2 class="job-overview-title"><?php