} } ###################################################### function JB_generate_post_id() { $query = "SELECT max(`post_id`) FROM `posts_table"; $result = JB_mysql_query($query) or die(mysql_error()); $row = mysql_fetch_row($result); $row[0]++; return $row[0]; } ################################################################ define('JB_IPD_TIMER', false); if (JB_IPD_TIMER) { $timestart = microtime(); echo "included posts.inc.php - " . JB_get_time_diff() . "sec<br>"; } function JB_insert_post_data($insert_mode = 'EMPLOYER') { if ($_REQUEST['user_id'] != '' && $insert_mode == 'ADMIN') { $user_id = (int) $_REQUEST['user_id']; } else { $user_id = (int) $_SESSION['JB_ID']; } // determine what kind of posting it is $post_mode = "free"; if ($_REQUEST['type'] != 'premium') { if (JB_POSTING_FEE_ENABLED == 'YES') { $post_mode = "normal"; if ($insert_mode != 'ADMIN') { $credits = JB_get_num_posts_remaining($user_id);
if (isset($_REQUEST['cat_name']) && $_REQUEST['cat_name'] != '') { $_REQUEST['cat'] = JB_get_cat_id_from_url($_REQUEST['cat_name']); } // process mod_rewrite for job posts if (isset($_REQUEST['post_permalink'])) { JB_process_job_post_permalink(); } // process mod_rewrite for employer profiles if (JB_PRO_MOD_REWRITE == 'YES' && isset($_REQUEST['show_emp'])) { JB_process_emp_permalink(); } // proces urls with page numbers if (isset($_REQUEST['job_page_link'])) { $_REQUEST['offset'] = JB_POSTS_PER_PAGE * $_REQUEST['job_page_link'] - JB_POSTS_PER_PAGE; } # End Mod Rewrite ##################### $JBPage = JB_page_init(); // calling this function will set the globals: //$SEARCH_PAGE, $EMPLOYER_PAGE, $CATEGORY_PAGE, $PREMIUM_LIST, //$JOB_LIST_PAGE, $JB_HOME_PAGE, $JOB_PAGE JB_template_index_header(); $JBPage->output(); JB_template_index_footer(); $timeend = microtime(); $diff = JB_get_time_diff(); //echo "<br><br><small><small>script generation took $diff s </small></small>"; //echo "<small>".JB_get_time_diff()." s </small>"; # used to analyze the scripts speed //echo "queries:".$jb_query_c; //ob_end_flush();