コード例 #1
0
ファイル: apps.php プロジェクト: vinothtimes/dchqtest
$records_per_page = 20;
if ($post_id) {
    $where_sql = "employer_id='" . jb_escape_sql($_SESSION['JB_ID']) . "' AND post_id='" . jb_escape_sql($post_id) . "'";
    $sql = "SELECT * FROM applications WHERE {$where_sql} ORDER BY `app_date` DESC LIMIT {$offset}, {$records_per_page}";
} else {
    $where_sql = "employer_id='" . jb_escape_sql($_SESSION['JB_ID']) . "'";
    // order by posts and date
    $sql = "SELECT * FROM applications  WHERE {$where_sql} ORDER BY post_id DESC, `app_date` DESC LIMIT {$offset}, {$records_per_page}";
}
JBPLUG_do_callback('employer_apps_sql', $sql);
$result = JB_mysql_query($sql) or die(mysql_error());
$count = array_pop(mysql_fetch_row(jb_mysql_query("SELECT count(*) FROM applications WHERE {$where_sql} ")));
if (mysql_num_rows($result) > 0) {
    if ($post_id) {
        $data = $PForm->load($post_id);
        $PLM =& JB_get_PostListMarkupObject();
        $PLM->set_values($data);
        $TITLE = $PForm->get_template_value('TITLE');
        $DATE = JB_get_formatted_date($PForm->get_template_value('DATE'));
        if ($count == 1) {
            $str = $label['emp_app_post_title_singular'];
        } else {
            $str = $label['emp_app_post_title_plural'];
        }
        $str = str_replace('%TITLE%', '<a href="" ' . $PLM->get_new_window_js() . ' >' . jb_escape_html($TITLE) . '</a>', $str);
        $str = str_replace('%DATE%', jb_escape_html($DATE), $str);
        $str = str_replace('%COUNT%', $count, $str);
        echo "<p>{$str}</p>";
        echo "<p>" . $label['emp_app_list_by_post_heading'] . "</p>";
    }
    $offset = $_REQUEST['offset'];
コード例 #2
0
ファイル: JobsFiller.php プロジェクト: vinothtimes/dchqtest
 function list_job(&$post)
 {
     static $previous_day;
     $this->current_post = $post;
     $LM =& JB_get_PostListMarkupObject();
     // load the ListMarkup Class
     $count++;
     $POST_MODE = 'normal';
     $class_name = $LM->get_item_class_name($POST_MODE);
     $class_postfix = $LM->get_item_class_postfix($POST_MODE);
     $DATE = $this->current_post['date'];
     # display day of week
     if (JB_POSTS_SHOW_DAYS_ELAPSED == "YES") {
         //echo $prams['post_date'];
         $day_and_week = JB_get_day_and_week(JB_trim_date($DATE));
         if (JB_trim_date($DATE) !== JB_trim_date($previous_day)) {
             // new day?
             if ($day_and_week != '') {
                 $LM->list_day_of_week($day_and_week, $class_postfix);
             }
         }
         $previous_day = $DATE;
     }
     ########################################
     # Open the list data items
     $LM->list_item_open($POST_MODE, $class_name);
     ########################################################################
     JB_echo_job_list_data($admin);
     // display the data cells
     ########################################################################
     # Close list data items
     $LM->list_item_close();
 }
コード例 #3
0
ファイル: posts.inc.php プロジェクト: vinothtimes/dchqtest
function JB_display_post_list(&$posts, $lm)
{
    global $JobListAttributes;
    global $list_mode;
    $list_mode = $lm;
    global $post_count;
    global $post_id;
    global $label;
    global $column_list;
    // - this is initialized in lists.inc.php using the JB_echo_list_head_data() function
    global $column_info;
    // - same as above
    $PLM =& JB_get_PostListMarkupObject();
    // load the ListMarkup Class
    $PLM->set_list_mode($lm);
    if (func_num_args() > 2) {
        // what kind of posts to show
        $show = func_get_arg(2);
        $_REQUEST['show'] = $show;
    }
    $PLM->set_show($show);
    $JobListAttributes = new JobListAttributes($list_mode, $show);
    $JobListAttributes->set_list_mode($lm);
    if ($list_mode == 'ADMIN') {
        $admin = true;
    }
    if ($list_mode == "BY_CATEGORY_ADMIN") {
        $list_mode = "ADMIN";
    }
    if ($list_mode == 'ADMIN' || $list_mode == 'SAVED' || $list_mode == 'EMPLOYER') {
        $PLM->open_form($JobListAttributes);
    }
    if ($list_mode == 'PREMIUM') {
        if (JB_PREMIUM_POSTS_LIMIT == 'YES') {
            $pp_page = JB_PREMIUM_POSTS_PER_PAGE;
        } else {
            $pp_page = 200;
        }
    } elseif ($list_mode == 'EMPLOYER') {
        if (defined('JB_MANAGER_POSTS_PER_PAGE')) {
            $pp_page = JB_MANAGER_POSTS_PER_PAGE;
        } else {
            $pp_page = 20;
        }
    } else {
        $pp_page = JB_POSTS_PER_PAGE;
    }
    if ($list_mode != 'PREMIUM') {
        JB_nav_pages($result, $q_string, $pp_page);
    }
    $css_id = $PLM->get_list_css_id();
    $PLM->list_start($css_id);
    ################
    # Generate output for the head <tr> row of the table
    # Dynamic columns are generated by Jb_echo_list_head_data() in lists.inc.php and
    # placed in the $head_data variable
    # The $head_data is cached, otherwise if conditions are used
    # to generate the output for the <td> parts
    $COLSPAN = '';
    // How many columns? (the hits column does not count here...)
    ob_start();
    // buffer the output, so that we can calculate the colspan.
    $COLSPAN = JB_echo_list_head_data(1, $admin);
    $list_head_data = ob_get_contents();
    ob_end_clean();
    JBPLUG_do_callback('job_list_set_colspan', $COLSPAN);
    // set the colspan value
    $PLM->set_colspan($COLSPAN);
    if ($list_mode == 'SAVED') {
        $PLM->saved_list_controls();
    } elseif ($list_mode == 'ADMIN') {
        $PLM->admin_list_controls();
    } elseif ($list_mode == 'EMPLOYER') {
        $PLM->employer_list_controls();
    }
    JBPLUG_do_callback('job_list_controls', $PLM);
    // plugins can render any undefined list controls
    #######################################
    # Open the list heading section
    $PLM->list_head_open();
    if ($list_mode == 'ADMIN') {
        $PLM->list_head_admin_action();
        JBPLUG_do_callback('job_list_head_admin_action', $A = false);
        // plugin for addition action column
    } elseif ($list_mode == 'EMPLOYER') {
        $PLM->list_head_employer_action();
    } elseif ($list_mode == 'SAVED') {
        $PLM->list_head_saved_action();
    }
    JBPLUG_do_callback('joblist_list_head_action', $PLM);
    ########################################################################
    echo $list_head_data;
    // output the header columns that were buffered before.
    ########################################################################
    if ($list_mode == 'EMPLOYER') {
        // Here we make sure that the 'views' and 'applications' columns
        // appear in manager.php, regardless how the list is configured.
        $PLM->list_head_employer_extras();
        JBPLUG_do_callback('job_list_head_employer_extra_col', $A = false);
        // plugin for the additional columns seen by the employer's Application manager
    }
    if ($list_mode == 'PREMIUM' && JB_SHOW_PREMIUM_HITS == 'YES') {
        $PLM->list_head_premium_extras();
    }
    ######################################
    # Close the list heading section
    $PLM->list_head_close();
    $i = 0;
    $current_day = JB_get_local_time(gmdate("r"));
    // local time form GMT
    # Output the data rows
    JBPLUG_do_callback('job_list_pre_fill', $i, $list_mode);
    //A plugin can list its own records before, and adjust the $i
    // init a week ago from first post
    while (($row = mysql_fetch_array($posts, MYSQL_ASSOC)) && $i < $pp_page) {
        $PLM->set_values($row);
        JBPLUG_do_callback('job_list_set_data', $row, $i, $list_mode);
        // A plugin can modify the prams
        $i++;
        $post_id = $row['post_id'];
        $POST_MODE = $row['post_mode'];
        $class_name = $PLM->get_item_class_name($POST_MODE);
        $class_postfix = $PLM->get_item_class_postfix($POST_MODE);
        //$DATE_TIME = JB_get_local_time($row['post_date']." GMT");
        # display day of week
        if ($list_mode == 'ALL' && JB_POSTS_SHOW_DAYS_ELAPSED == "YES" || $list_mode == 'PREMIUM' && JB_P_POSTS_SHOW_DAYS_ELAPSED == "YES") {
            $DATE_TIME = JB_get_local_time($row['post_date'] . " GMT");
            # display day of week
            if ($list_mode == 'ALL' && JB_POSTS_SHOW_DAYS_ELAPSED == "YES" || $list_mode == 'PREMIUM' && JB_P_POSTS_SHOW_DAYS_ELAPSED == "YES") {
                $day_and_week = JB_get_day_and_week($row['post_date']);
                if ($day_and_week !== $prev_day_and_week) {
                    // new day?
                    if ($day_and_week != '') {
                        $PLM->list_day_of_week($day_and_week, $class_postfix);
                    }
                }
                $prev_day_and_week = $day_and_week;
            }
        }
        ########################################
        # Open the list data items
        $PLM->list_item_open($POST_MODE, $class_name);
        # Action cells
        # Here the action buttons are displayed, eg. 'Delete', 'Approve', checkboxes to select, etc
        if ($list_mode == 'ADMIN') {
            $PLM->list_data_admin_action($class_postfix, $row['post_mode']);
            JBPLUG_do_callback('job_list_data_admin_action', $A = false);
            // plugin for the additional controls for the Admin
        } elseif ($list_mode == 'SAVED') {
            $PLM->list_data_saved_action();
        } elseif ($list_mode == 'EMPLOYER') {
            // EMPLOYER MODE ONLY!
            $PLM->list_data_employer_action($class_postfix, $row['post_mode']);
            JBPLUG_do_callback('job_list_data_employer_buttons', $A = false);
            // plugin for the additional controls for the Admin
        }
        JBPLUG_do_callback('joblist_list_data_user_action', $A = false);
        ########################################################################
        JB_echo_job_list_data($admin);
        // display the data cells
        ########################################################################
        if ($list_mode == 'EMPLOYER') {
            // displayed on manager.php
            $app_count = $row['applications'];
            // change the app_count in to a link
            if ($app_count > 0) {
                $app_count = $PLM->get_emp_app_link('app.php?post_id=' . $row['post_id'], $app_count);
            }
            $PLM->list_data_employer_extras($app_count);
            JBPLUG_do_callback('job_list_data_employer_extra_col', $A = false);
            // plugin for the additional fields seen by the employer's Application manager
        }
        if ($list_mode == 'PREMIUM' && JB_SHOW_PREMIUM_HITS == 'YES') {
            $PLM->list_data_premium_extras();
        }
        $PLM->list_item_close();
    }
    ############ end while()
    JBPLUG_do_callback('job_list_back_fill', $i, $list_mode);
    // A plugin can list its own records after
    $PLM->list_end();
    if ($list_mode == 'ADMIN' || $list_mode == 'SAVED' || $list_mode == 'EMPLOYER') {
        $PLM->close_form();
    }
    if ($list_mode == 'PREMIUM') {
        if (JB_PREMIUM_POSTS_LIMIT == 'YES') {
            JB_nav_pages($result, $q_string, $pp_page);
        }
    } else {
        JB_nav_pages($result, $q_string, $pp_page);
    }
}
コード例 #4
0
ファイル: CareerJet.php プロジェクト: vinothtimes/dchqtest
 function &JB_get_markup_obj()
 {
     if (function_exists('JB_get_PostListMarkupObject')) {
         return JB_get_PostListMarkupObject();
     } elseif (function_exists('JB_get_PostListMarkupClass')) {
         return JB_get_PostListMarkupClass();
     } else {
         echo "Warning: The CareerJet.com back-fill plugin needs Jamit Job Board 3.5.0 or higher. Please disable the plugin and upgrade your software. 202";
     }
 }
コード例 #5
0
ファイル: IndeedXML.php プロジェクト: vinothtimes/dchqtest
 function &JB_get_markup_obj()
 {
     if (function_exists('JB_get_secret_hash')) {
         // since 3.7
         $List =& JBDynamicList::factory('JBPostListMarkup');
         $a = array();
         $List->set_values($a);
         // list always needs this
         return $List->LMarkup;
         //return JB_get_PostListMarkupObject();
     } elseif (function_exists('JB_get_PostListMarkupObject')) {
         return JB_get_PostListMarkupObject();
     } elseif (function_exists('JB_get_PostListMarkupClass')) {
         return JB_get_PostListMarkupClass();
     } else {
         echo "Warning: The Indeed.com XML back-fill plugin needs Jamit Job Board 3.5.0 or higher. Please disable the plugin and upgrade your software. 202";
     }
 }
コード例 #6
0
ファイル: themes.php プロジェクト: vinothtimes/dchqtest
function &JB_get_PostListMarkupClass()
{
    // alias for JB_get_ResumeListMarkupObject()
    return JB_get_PostListMarkupObject();
}