$img_size = @getimagesize($logo_path); if ($img_size[0] == false) { // try to get it by using http $img_size = @getimagesize(JB_RSS_FEED_LOGO); } if (isset($_REQUEST['cat'])) { $cat_id = (int) $_REQUEST['cat']; $title_append = ' - ' . JB_getCatName($cat_id); $out_to_file = false; } else { $cat_id = null; } if (isset($_REQUEST['emp'])) { $emp_id = (int) $_REQUEST['emp']; require_once 'include/profiles.inc.php'; $title_append = ' - ' . JB_get_employer_name($emp_id); $out_to_file = false; } else { $emp_id = null; } $output = "<" . $q . "xml version=\"1.0\" encoding=\"utf-8\" " . $q . ">\n" . "<rss version=\"2.0\">\n" . "<channel>\n" . "<title>" . JB_rss_xmlentities(strip_tags(JB_SITE_HEADING) . $title_append) . "</title>\n" . "<link>" . JB_BASE_HTTP_PATH . "</link>\n" . "<description>" . JB_rss_xmlentities(strip_tags(JB_SITE_DESCRIPTION)) . "</description>\n" . "<language>en</language>\n" . "<pubDate>" . $date . "</pubDate>\n" . "<lastBuildDate>" . $date . "</lastBuildDate>\n" . "<docs>http://blogs.law.harvard.edu/tech/rss</docs>\n" . "<generator>HiTeacher custom in-house RSS generator</generator>\n" . "<managingEditor>" . JB_SITE_CONTACT_EMAIL . "</managingEditor>\n" . "<webMaster>" . JB_SITE_CONTACT_EMAIL . "</webMaster>\n" . "<image>\n" . "<link>" . JB_BASE_HTTP_PATH . "</link>\n" . "<title>" . JB_BASE_HTTP_PATH . "</title>\n" . "<url>" . JB_RSS_FEED_LOGO . "</url>\n" . "<width>" . $img_size[0] . "</width>" . "<height>" . $img_size[1] . "</height>" . "</image>\n"; $now = gmdate("Y-m-d H:i:s"); if ($cat_id) { $extra_sql = JB_search_category_tree_for_posts($cat_id); } if ($emp_id) { $extra_sql = "AND user_id=" . jb_escape_sql($emp_id) . " "; } if (!defined('JB_POSTS_PER_RSS')) { define('JB_POSTS_PER_RSS', JB_POSTS_PER_PAGE); }
function JB_get_employer_company_name($user_id) { return JB_get_employer_name($user_id); }
function JBEmployerPage($employer_id, $admin = false) { global $label; $this->employer_id = (int) $employer_id; $this->page_name = "EMPLOYER_PAGE"; require jb_basedirpath() . 'include/profiles.inc.php'; // load the profile $DynamicForm =& JB_get_DynamicFormObject(3); $DynamicForm->load(false, $employer_id); // load profile by $employer_id $this->profile_id = $DynamicForm->get_value('profile_id'); // set the company name if ($DynamicForm->is_field_restricted('PROFILE_BNAME')) { $comp_name = str_replace('%USER_ID%', $this->employer_id, $label['employer_profile_posted_by']); } else { $comp_name = JB_get_employer_name($this->employer_id); } $this->JobListAttributes = new JobListAttributes(); $this->JobListAttributes->clear(); // make the following variables available for the template $this->vars = array('employer_id' => $this->employer_id, 'profile_id' => $this->profile_id, 'COMP_NAME' => $comp_name, 'JobListAttributes' => &$JobListAttributes, 'DynamicForm' => &$DynamicForm, 'admin' => $admin); JBPLUG_do_callback('init_employer_page_vars', $this->vars, $this->employer_id); // register the header_tags() method so that JBMarkup can call it back global $JBMarkup; $JBMarkup->set_handler('header', $this, 'header_tags'); }