<?php ########################################################################### # Copyright Jamit Software 2012, http://www.jamit.com # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this file, # You can obtain one at http://mozilla.org/MPL/2.0/. ########################################################################### require "../config.php"; require_once '../include/posts.inc.php'; require_once "../include/category.inc.php"; include 'login_functions.php'; JB_process_login(); JB_template_employers_header(); require_once '../include/resumes.inc.php'; $ALM = JB_get_AppListMarkupObject(); $PForm =& JB_get_DynamicFormObject(1); $ALM->set_list_mode('EMPLOYER'); $post_id = (int) $_REQUEST['post_id']; $action = $_REQUEST['action']; $apps = $_REQUEST['apps']; if ($_REQUEST['delete']) { $employer_id = (int) $_SESSION['JB_ID']; for ($i = 0; $i < sizeof($apps); $i++) { $sql = "DELETE FROM `applications` WHERE `app_id`='" . jb_escape_sql($apps[$i]) . "' AND `employer_id`='" . jb_escape_sql($employer_id) . "'"; $result = JB_mysql_query($sql) or die(mysql_error()); } if (sizeof($apps) > 0) { $JBMarkup->ok_msg($label['emp_app_deleted']); } else { $JBMarkup->error_msg($label['emp_app_no_select']);
function &JB_get_ListMarkupObject($arg = 'JBListMarkup') { static $ListMarkup; if (is_numeric($arg)) { // $arg is a form_id switch ($arg) { case 1: $class_name = 'JBPostListMarkup'; break; case 2: $class_name = 'JBResumeListMarkup'; break; default: $class_name = 'JBListMarkup'; break; } } else { $class_name = $arg; } JBPLUG_do_callback('set_ListMarkup_class_name', $class_name); // plugin authors can change the name of the class, and have their plugin subclass JBListMarkup and then set the $class_name to their sub class. if (isset($ListMarkup[$class_name])) { return $ListMarkup[$class_name]; } if (file_exists(JB_THEME_PATH . "JBListMarkup.php")) { include_once JB_THEME_PATH . "JBListMarkup.php"; } else { include_once JB_DEFAULT_THEME_PATH . "JBListMarkup.php"; } switch ($class_name) { case 'JBPostListMarkup': $ListMarkup[$class_name] = JB_get_PostListMarkupObject(); break; case 'JBResumeListMarkup': $ListMarkup[$class_name] = JB_get_ResumeListMarkupObject(); break; case 'JBAppListMarkup': $ListMarkup[$class_name] = JB_get_AppListMarkupObject(); break; case 'JBIframeListMarkup': $ListMarkup[$class_name] = JB_get_IframeListMarkupObject(); break; case 'JBListMarkup': $ListMarkup[$class_name] = new JBListMarkup(); break; case 'JBRequestListMarkup': $ListMarkup[$class_name] = new JBRequestListMarkup(); break; case 'JBProductListMarkup': $ListMarkup[$class_name] = new JBProductListMarkup(); break; case 'JBOrdersListMarkup': $ListMarkup[$class_name] = new JBOrdersListMarkup(); break; case 'JBMembershipStatusMarkup': $ListMarkup[$class_name] = new JBMembershipStatusMarkup(); break; case 'JBSubscriptionStatusMarkup': $ListMarkup[$class_name] = new JBSubscriptionStatusMarkup(); break; case 'JBPaymentOptionListMarkup': $ListMarkup[$class_name] = new JBPaymentOptionListMarkup(); default: JBPLUG_do_callback('get_ListMarkupObject', $ListMarkup, $class_name); if (!isset($ListMarkup[$class_name])) { $ListMarkup[$class_name] = new JBListMarkup(); } break; } return $ListMarkup[$class_name]; }