} JB_finalize_post_updates(); $label['employer_manager_expired_posts'] = str_replace('%COUNT%', $i, $label['employer_manager_expired_posts']); $JBMarkup->ok_msg($label["employer_manager_expired_posts"]); } else { $JBMarkup->error_msg($label["employer_manager_not_selected_exp"]); } } if (isset($_REQUEST['undo_expire'])) { $post_id = (int) $_REQUEST['post_id']; $post_data = JB_load_post_data($post_id); if ($post_data['user_id'] == $_SESSION['JB_ID']) { // is it owned by the person who logged in? $sql = "UPDATE posts_table SET expired='N' where post_id='" . jb_escape_sql($post_id) . "' "; JB_mysql_query($sql) or $DB_ERROR = mysql_error(); JB_update_post_category_count($post_data); } JB_finalize_post_updates(); $JBMarkup->ok_msg($label['post_unexpire_ok']); } jbplug_do_callback('post_manager_action', $A = false); JB_render_box_top(95, $label['employer_manager_head']); // set fees flag if (JB_POSTING_FEE_ENABLED == 'YES' || JB_PREMIUM_POSTING_FEE_ENABLED == 'YES') { $_FEES_ENABLED = "YES"; } ################### JBEmployer::display_credit_status(); JB_render_box_bottom(); ?>
$message = str_replace("%POST_URL%", JB_BASE_HTTP_PATH . "index.php?post_id=" . $PForm->get_value('post_id'), $message); // Place the email on the queue! JB_queue_mail($to_address, $to_name, $from_address, $from_name, $subject, $message, '', 220); } echo "<hr>"; } if ($disapprove_post != '') { if ($reason == '') { echo "Please specify a reason<hr>"; } else { $sql = "UPDATE `posts_table` SET `approved`='N', `reason`='" . jb_escape_sql($reason) . "' WHERE `post_id`='" . jb_escape_sql($post_id) . "'"; JB_mysql_query($sql) or die(mysql_error() . $sql); $JBMarkup->ok_msg("Job Post #" . jb_escape_html($post_id) . " disapproved!"); $PForm =& JB_get_DynamicFormObject(1); $PForm->load($post_id); JB_update_post_category_count($PForm->get_values()); JB_finalize_post_updates(); if (JB_EMAIL_POST_DISAPP_SWITCH == "YES") { // send out the disapproval notification to the employer $TITLE = $PForm->get_raw_template_value("TITLE"); $DATE = JB_get_formatted_date($PForm->get_template_value("DATE")); $POSTED_BY_ID = $PForm->get_value('user_id'); // get the employer $sql = "SELECT * FROM employers WHERE ID='" . jb_escape_sql($POSTED_BY_ID) . "' "; $emp_result = jb_mysql_query($sql); $emp_row = mysql_fetch_array($emp_result); // get the email template $template_result = JB_get_email_template(230, $emp_row['lang']); $t_row = mysql_fetch_array($template_result); $to_address = $emp_row['Email']; $to_name = jb_get_formatted_name($emp_row['FirstName'], $emp_row['LastName']);
function JB_delete_post($post_id) { $old_data = JB_load_post_data($post_id); JB_delete_post_files($post_id); $sql = "DELETE FROM `posts_table` where `post_id`='" . jb_escape_sql($post_id) . "'"; JB_mysql_query($sql) or die(mysql_error()); $sql = "DELETE FROM `applications` where `post_id`='" . jb_escape_sql($post_id) . "'"; JB_mysql_query($sql) or die(mysql_error()); $sql = "DELETE FROM `saved_jobs` where `post_id`='" . jb_escape_sql($post_id) . "'"; JB_mysql_query($sql) or die(mysql_error()); JB_update_post_category_count($old_data); // category counters JBPLUG_do_callback('delete_post', $post_id); }
<?php } } if ($_REQUEST['move_to_cat'] != '') { $old_category = $_REQUEST['old_category']; $new_category = $_REQUEST['new_category']; $posts = explode(",", $_REQUEST['posts']); // find the field id for this category... if ($new_category > 0) { $PForm =& JB_get_DynamicFormObject(1); foreach ($posts as $post_id) { $old_data = $PForm->load($post_id); $sql = "UPDATE `posts_table` SET `" . jb_escape_sql($_REQUEST['field_id']) . "`='" . jb_escape_sql($new_category) . "' WHERE post_id='" . jb_escape_sql($post_id) . "' "; $result = JB_mysql_query($sql) or die(mysql_error()); $new_data = $PForm->load($post_id); JB_update_post_category_count($old_data, $new_data); } JB_finalize_post_updates(); } } ?> <div style="float: right;"><a href="get_csv.php?table=posts_table&form_id=1">Download CSV</a> | <a href="postlist.php">Edit List</a></div> <?php switch ($_REQUEST['show']) { case "WA": echo "Now Showing: Posts Waiting."; break; case "EMP": echo "Now Showing: Posts Posted by Employer."; break; case "NA":