Пример #1
0
    function get_post_summary(&$JobListAttributes, &$class_postfix)
    {
        global $label;
        if ($JobListAttributes->list_mode == 'ADMIN' || $JobListAttributes->list_mode == 'EMPLOYER') {
            $new_window = "onclick=\"window.open('post_window.php?post_id=" . $this->get_data_value('post_id') . "', '', 'toolbar=no,scrollbars=yes,location=no,statusbar=no,menubar=no,resizable=1,width=800,height=500,left = 50,top = 50');return false;\"";
        }
        $post_url = JB_job_post_url($this->get_data_value('post_id'), $JobListAttributes);
        $profile_url = JB_emp_profile_url($this->get_data_value('user_id'), $JobListAttributes);
        ob_start();
        // buffer start,
        // from now on all output is captured in to a buffer, and the
        // contents of the buffer is returned by this function
        $TITLE = $this->get_template_value('TITLE', $this->admin);
        $TITLE = preg_replace(JB_CLEAN_PUN_REGEX, '$1 ', $TITLE);
        // automatically fix punctuation spacing so that it the line can break
        ?>

		<span class="job_list_title<?php 
        echo $class_postfix;
        ?>
" >
		<a class="job_list_title<?php 
        echo $class_postfix;
        ?>
" href="<?php 
        echo $post_url;
        ?>
" <?php 
        echo $new_window;
        ?>
><?php 
        echo $TITLE;
        ?>
</a></span> 
		<?php 
        if (!$JobListAttributes->is_internal_page()) {
            ?>
			<a href="<?php 
            echo $post_url;
            ?>
" target="new"><img src="<?php 
            echo JB_THEME_URL;
            ?>
images/nw2.gif" width="11" height="11" border="0" alt=""></a>
		<?php 
        }
        if (JB_POSTS_SHOW_POSTED_BY == 'YES') {
            if (JB_POSTS_SHOW_POSTED_BY_BR == 'YES') {
                echo "<br>";
            }
            $POSTED_BY = $this->get_template_value('POSTED_BY', $this->admin);
            ?>
		<span class="job_list_small_print<?php 
            echo $class_postfix;
            ?>
"> 
			<b><?php 
            echo $label['post_list_posted_by'];
            ?>
</b> <a href="<?php 
            echo $profile_url;
            ?>
"><i><?php 
            if ($POSTED_BY == '') {
                $POSTED_BY = $label["posted_by_unknown"];
            }
            echo $POSTED_BY;
            ?>
</i></a>
		</span>
		<?php 
        }
        if (JB_POSTS_SHOW_JOB_TYPE == 'YES') {
            if (JB_POSTS_SHOW_JOB_TYPE_BR == 'YES') {
                echo '<br>';
            }
            ?>
<span class="job_list_small_print<?php 
            echo $class_postfix;
            ?>
">
				<b><?php 
            echo $label['post_list_category'];
            ?>
</b>
				</span>
				<span class="job_list_cat_name<?php 
            echo $class_postfix;
            ?>
">
				<?php 
            echo $this->get_template_value('JOB_TYPE', $this->admin);
            ?>
			</span>
		<?php 
        }
        if (JB_POSTS_SHOW_DESCRIPTION == 'YES') {
            ?>
			<br>
			<span class="job_list_small_print<?php 
            echo $class_postfix;
            ?>
">
			<?php 
            echo jb_escape_html(str_replace('&nbsp;', ' ', JB_truncate_html_str(strip_tags($this->get_template_value('DESCRIPTION', $this->admin)), JB_POSTS_DESCRIPTION_CHARS, $trunc_str_len)));
            ?>
 		
			</span>
			<?php 
        }
        if ($this->get_template_value('REASON', $this->admin) != '') {
            echo '<span style="font-weight:bold">' . $label['post_not_approved_cause'] . '</span><span style="color:red; font-weight:bold;">' . $this->get_template_value('REASON', $this->admin) . '</span>';
        }
        // capture the buffer, and clean it
        $val = ob_get_contents();
        ob_end_clean();
        return $val;
        // return the buffered output
    }
Пример #2
0
}
// employer profiles
$sql = "SELECT profile_id, expired, DATE_FORMAT(`profile_date`, '%Y-%m-%dT%H:%i:%s+00:00') AS formatted_date FROM profiles_table  ORDER BY expired DESC, `profile_date` DESC";
//echo $sql;
$result = jb_mysql_query($sql);
while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) {
    if ($row['expired'] == 'Y') {
        // expired posts get archived
        $changefreq = 'never';
        $piority = '0.1';
    } else {
        $changefreq = 'monthly';
        // on avg..
        $priority = $data['emp_priority'];
    }
    $output .= '<url>' . "\n" . '<loc>' . JB_xmlentities(JB_emp_profile_url($row['profile_id'], null, JB_BASE_HTTP_PATH . 'index.php')) . '</loc>' . "\n" . '<lastmod>' . $row['formatted_date'] . '</lastmod>' . "\n" . '<changefreq>' . $changefreq . '</changefreq>' . "\n" . '<priority>' . $priority . '</priority>' . "\n" . '</url>' . "\n";
}
// category URLs
$sql = "SELECT t1.category_id as CID, seo_fname, t2.category_name as CNAME FROM categories as t1, cat_name_translations as t2 WHERE t1.category_id=t2.category_id AND t2.lang='EN' AND form_id=1  ";
$result = jb_mysql_query($sql);
while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) {
    $changefreq = 'daily';
    // on avg..
    $priority = $data['cat_priority'];
    $output .= '<url>' . "\n" . '<loc>' . JB_xmlentities(JB_cat_url_write($row['CID'], $row['CNAME'], $row['seo_fname'], JB_BASE_HTTP_PATH . 'index.php')) . '</loc>' . "\n" . '<lastmod>' . date('Y-m-d') . '</lastmod>' . "\n" . '<changefreq>' . $changefreq . '</changefreq>' . "\n" . '<priority>' . $priority . '</priority>' . "\n" . '</url>' . "\n";
}
// Additional URLs
$sql = "SELECT * FROM sitemaps_urls ";
//echo $sql;
$result = jb_mysql_query($sql);
while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) {
Пример #3
0
function JB_echo_job_list_data($admin)
{
    global $label;
    # HTML output for this function comes from ListMarkup Class
    # include/themes/default/JBListMarkup.php
    # Any HTML customizations should be done there.
    # Please copy this class in to your custom theme directory, and
    # customize form there
    $LM =& JB_get_ListMarkupObject(1);
    // load the ListMarkup Class
    $Form =& JB_get_DynamicFormObject(1);
    $ttf =& $Form->get_tag_to_field_id();
    global $JobListAttributes;
    $post_id = $Form->get_template_value('POST_ID', $admin);
    $post_mode = $Form->get_template_value('POST_MODE', $admin);
    $class_postfix = $LM->get_item_class_postfix($post_mode);
    foreach ($LM->column_list as $template_tag) {
        if ($LM->column_info[$template_tag]['admin'] == 'Y' && !$admin) {
            continue;
            // do not render this column
        }
        $val = $Form->get_value($ttf[$template_tag]['field_id']);
        if ($template_tag == 'POST_SUMMARY') {
            if ($JobListAttributes->list_mode == 'ADMIN' || $JobListAttributes->list_mode == 'EMPLOYER') {
                $new_window = $LM->get_new_window_js();
            }
            $val = $LM->get_post_summary($JobListAttributes, $class_postfix);
        } elseif ($template_tag == 'DATE') {
            $val = JB_get_formatted_date(JB_get_local_time($val));
        } else {
            if ($LM->column_info[$template_tag]['trunc'] > 0) {
                $val = JB_truncate_html_str($val, $LM->column_info[$template_tag]['trunc'], $trunc_str_len);
            }
            $val = JB_get_list_template_value($ttf[$template_tag], $val, $admin, 1);
            if ($LM->column_info[$template_tag]['clean'] == 'Y') {
                // fix up punctuation spacing
                $val = preg_replace(JB_CLEAN_PUN_REGEX, '$1 ', $val);
            }
        }
        if ($LM->column_info[$template_tag]['is_bold'] == 'Y') {
            $b1 = $LM->get_open_bold();
            $b2 = $LM->get_close_bold();
        } else {
            $b1 = '';
            $b2 = '';
        }
        if ($LM->column_info[$template_tag]['link'] == 'Y') {
            // Render as a Link to the record?
            if ($JobListAttributes->list_mode == 'ADMIN' || $JobListAttributes->list_mode == 'EMPLOYER') {
                $new_window = "onclick=\"window.open('post_window.php?post_id=" . $post_id . "', '', 'toolbar=no,scrollbars=yes,location=no,statusbar=no,menubar=no,resizable=1,width=800,height=500,left = 50,top = 50');return false;\"";
            }
            if ($template_tag == 'POSTED_BY') {
                // this link will lead to the employer's profile / list
                $val = $LM->get_open_link(JB_emp_profile_url($Form->get_template_value('USER_ID', $admin), $JobListAttributes), $new_window) . $val . $LM->get_close_link();
            } else {
                // this link will lead to the job post
                $val = $LM->get_open_link(JB_job_post_url($post_id, $JobListAttributes), $new_window) . $val . $LM->get_close_link();
            }
        }
        JBPLUG_do_callback('job_list_data_val', $val, $template_tag);
        //A plugin can modify the $val
        $LM->list_cell_open($template_tag, $class_postfix);
        $LM->echo_post_data($val, $b1, $b2);
        $LM->list_cell_close();
    }
}
Пример #4
0
 function get_canonical_url()
 {
     return JB_emp_profile_url($this->employer_id, $this->JobListAttributes, JB_BASE_HTTP_PATH . 'index.php');
 }