function jobman_interviews() { $options = get_option('jobman_options'); $display_type = $options['interview_default_view']; $filter = ''; if (array_key_exists('display', $_REQUEST)) { $display_type = $_REQUEST['display']; } if (array_key_exists('filter', $_REQUEST) && !empty($_REQUEST['filter'])) { $filter = $_REQUEST['filter']; } if (array_key_exists('new-interview', $_REQUEST)) { jobman_interview_new(); } if (array_key_exists('comment', $_REQUEST)) { jobman_store_comment(); } switch ($display_type) { case 'year': if (empty($filter)) { $filter = date('Y'); } jobman_interview_year($filter); break; case 'day': if (empty($filter)) { $filter = date('Y-m-d'); } jobman_interview_day($filter); break; case 'interview': jobman_interview_details($filter); break; case 'job': jobman_interview_job($filter); break; case 'application': jobman_interview_application($filter); break; case 'month': default: if (empty($filter)) { $filter = date('Y-m'); } jobman_interview_month($filter); break; } }
function jobman_application_details_layout($appid) { $options = get_option('jobman_options'); if (array_key_exists('jobman-email', $_REQUEST)) { check_admin_referer('jobman-reemail-application'); jobman_email_application($appid, $_REQUEST['jobman-email']); } if (array_key_exists('new-interview', $_REQUEST)) { jobman_interview_new(); } if (array_key_exists('comment', $_REQUEST)) { jobman_store_comment(); } ?> <div id="jobman-application" class="wrap"> <h2><?php _e('Job Manager: Application Details', 'jobman'); ?> </h2> <div class="printicon"><a href="javascript:window.print()"><img src="<?php echo JOBMAN_URL; ?> /images/print-icon.png" /></a></div> <a href="?page=jobman-list-applications" class="backlink">←<?php _e('Back to Application List', 'jobman'); ?> </a> <?php $widths = array('59%', '39%'); $functions = array(array('jobman_application_display_details'), array('jobman_comments', 'jobman_application_email_form')); $titles = array(array(__('Application', 'jobman')), array(__('Application Comments', 'jobman'), __('Share Application', 'jobman'))); $params = array(array(array($appid)), array(array($appid, true), array())); if ($options['interviews']) { $functions[1] = array_insert($functions[1], 1, 'jobman_interview_application'); $titles[1] = array_insert($titles[1], 1, __('Interviews', 'jobman')); $params[1] = array_insert($params[1], 1, array($appid, 'summary')); } jobman_create_dashboard($widths, $functions, $titles, $params); ?> <a href="?page=jobman-list-applications" class="backlink">←<?php _e('Back to Application List', 'jobman'); ?> </a> </div> <?php }