function google_jobs() { echo '<rss version ="2.0" xmlns:g="http://base.google.com/ns/1.0"> <channel> <title>' . osc_page_title() . '</title> <description>' . osc_page_description() . '</description> <link>' . osc_base_url() . '</link>'; if (osc_count_items()) { while (osc_has_items()) { $item = feed_get_job_data(osc_item()); $date = date('d/m/Y'); $time = date('H:i'); if (preg_match('|([0-9]{4})-([0-9]{2})-([0-9]{2})|', osc_item_pub_date(), $tmp)) { $date = $tmp[3] . "/" . $tmp[2] . "/" . $tmp[1]; } echo '<item> <title>' . osc_item_title() . '</title> <description>' . osc_item_description() . '</description> <g:education>' . (isset($item['s_studies']) ? $item['s_studies'] : '') . '</g:education> <g:employer>' . (isset($item['s_company_name']) ? $item['s_company_name'] : '') . '</g:employer> <g:id>' . osc_item_id() . '</g:id> <g:job_industry>' . (osc_item_category() != '' ? osc_item_category() : '') . '</g:job_industry> <g:job_type>' . (isset($item['s_contract']) ? $item['s_contract'] : '') . '</g:job_type> <link>' . osc_item_url() . '</link> <g:location>' . (osc_item_address() != '' ? osc_item_address() : '') . ', ' . (osc_item_city() != '' ? osc_item_city() : '') . ', ' . (osc_item_region() != '' ? osc_item_region() : '') . ', ' . (osc_item_zip() != '' ? osc_item_zip() : '') . ' ' . (osc_item_country() != '' ? osc_item_country() : '') . '</g:location> <g:publish_date>' . $date . '</g:publish_date> <g:salary>' . (isset($item['i_salary_min']) && isset($item['i_salary_max']) ? $item['i_salary_min'] . ' - ' . $item['i_salary_max'] : '') . '</g:salary> </item>'; } } echo '</channel> </rss>'; }
function indeed() { echo '<?xml version="1.0" encoding="utf-8"?> <source> <publisher>' . osc_page_title() . '</publisher> <publisherurl>' . osc_base_url() . '</publisherurl> <lastBuildDate>' . date("D, j M Y G:i:s T") . '</lastBuildDate>'; if (osc_count_items()) { while (osc_has_items()) { $item = feed_get_job_data(osc_item()); $salary = ""; if (isset($item['i_salary_min']) && $item['i_salary_min'] != '') { $salary = $item['i_salary_min']; } if (isset($item['i_salary_max']) && $item['i_salary_max'] != '') { if ($salary != "") { $salary .= ' - '; } $salary .= $item['i_salary_max']; } if (isset($item['e_salary_period']) && $item['e_slary_period'] != '') { if ($salary != "") { $salary .= ' '; $salary .= $item['e_salary_period']; } } $locale = current($item['locale']); if (isset($locale['s_desired_exp']) && $locale['s_desired_exp'] != '') { $experience = $locale['s_desired_exp']; } else { $experience = ''; } if (isset($locale['s_studies']) && $locale['s_studies'] != '') { $education = $locale['s_studies']; } else { $education = ''; } echo '<job> <title><![CDATA[' . osc_item_title() . ']]></title> <date><![CDATA[' . osc_item_pub_date() . ']]></date> <referencenumber><![CDATA[' . osc_item_id() . ']]></referencenumber> <url><![CDATA[' . osc_item_url() . ']]></url> <company><![CDATA[' . (isset($item['s_company_name']) && $item['s_company_name'] != NULL ? $item['s_company_name'] : '') . ']]></company> <city><![CDATA[' . (osc_item_city() != NULL ? osc_item_city() : '') . ']]></city> <state><![CDATA[' . (osc_item_region() != NULL ? osc_item_region() : '') . ']]></state> <country><![CDATA[' . (osc_item_country() != NULL ? osc_item_country() : '') . ']]></country> <postalcode><![CDATA[' . (osc_item_zip() != NULL ? osc_item_zip() : '') . ']]></postalcode> <description><![CDATA[' . (osc_item_description() != NULL ? osc_item_description() : '') . ']]></description> <salary><![CDATA[' . $salary . ']]></salary> <education><![CDATA[' . $education . ']]></education> <jobtype><![CDATA[' . (isset($item['e_position_type']) && $item['e_position_type'] != NULL ? $item['e_position_type'] : '') . ']]></jobtype> <category><![CDATA[]]></category> <experience><![CDATA[' . $experience . ']]></experience> </job>'; } } echo '</source>'; }
function oodle_jobs() { echo '<?xml version="1.0" encoding="utf-8"?><listings>'; if (osc_count_items()) { while (osc_has_items()) { $item = feed_get_job_data(osc_item()); $time = explode(" ", osc_item_pub_date()); if (isset($item['e_position_type']) && $item['e_position_type'] == 'FULL') { $position_type = __('Full time', 'extra_feeds'); } else { if (isset($item['e_position_type']) && $item['e_position_type'] == 'PART') { $position_type = __('Part time', 'extra_feeds'); } else { $position_type = __('Undefined', 'extra_feeds'); } } if (isset($item['e_salary_period']) && $item['e_salary_period'] == 'HOUR') { $salary_type = 'hourly'; } else { if (isset($item['e_salary_period']) && $item['e_salary_period'] == 'DAY') { $salary_type = 'hourly'; $item['i_salary_min'] = round($item['i_salary_min'] / 24); $item['i_salary_max'] = round($item['i_salary_max'] / 24); } else { if (isset($item['e_salary_period']) && $item['e_salary_period'] == 'WEEK') { $salary_type = 'bi-weekly'; } else { if (isset($item['e_salary_period']) && $item['e_salary_period'] == 'MONTH') { $salary_type = 'monthly'; } else { if (isset($item['e_salary_period']) && $item['e_salary_period'] == 'YEAR') { $salary_type = 'yearly'; } else { $salary_type = ''; } } } } } echo '<listing> <category>' . osc_item_category() . '</category> <description><![CDATA[' . osc_item_description() . ']]></description> <id>' . osc_item_id() . '</id> <title><![CDATA[' . osc_item_title() . ']]></title> <url>' . osc_item_url() . '</url> <address>' . osc_item_address() . '</address> <city>' . osc_item_city() . '</city> <country>' . osc_item_country_code() . '</country> <neighborhood>' . osc_item_city_area() . '</neighborhood> <state>' . osc_item_region() . '</state> <zip_code>' . osc_item_zip() . '</zip_code> <longitude>' . osc_item_longitude() . '</longitude> <latitude>' . osc_item_latitude() . '</latitude> <company><![CDATA[' . @$item['s_company_name'] . ']]></company> <create_time>' . $time[0] . '</create_time> <currency>' . osc_item_currency() . '</currency> <employee_type>' . $position_type . '</employee_type> <industry>' . osc_item_category() . '</industry> <required_education><![CDATA[' . @$item['s_studies'] . ']]></required_education> <salary>' . @$item['i_salary_min'] . '-' . @$item['i_salary_max'] . '</salary> <salary_type>' . $salary_type . '</salary_type> <seller_email>' . osc_item_contact_email() . '</seller_email> <seller_name><![CDATA[' . osc_item_contact_name() . ']]></seller_name> </listing>'; } } echo '</listings>'; }
function trovit_jobs() { echo '<?xml version="1.0" encoding="utf-8"?> <trovit>'; if (osc_count_items()) { while (osc_has_items()) { $item = feed_get_job_data(osc_item()); $date = date('d/m/Y'); $time = date('H:i'); if (preg_match('|([0-9]{4})-([0-9]{2})-([0-9]{2}) ([0-9]{2}):([0-9]{2})|', osc_item_pub_date(), $tmp)) { $date = $tmp[3] . "/" . $tmp[2] . "/" . $tmp[1]; $time = $tmp[4] . ":" . $tmp[5]; } echo '<ad> <id><![CDATA[' . osc_item_id() . ']]></id> <url><![CDATA[' . osc_item_url() . ']]></url> <title><![CDATA[' . osc_item_title() . ']]></title> <content><![CDATA[' . osc_item_description() . ']]></content> <address><![CDATA[' . (osc_item_address() != '' ? osc_item_address() : '') . ']]></address> <city><![CDATA[' . (osc_item_city() != '' ? osc_item_city() : '') . ']]></city> <city_area><![CDATA[' . (osc_item_city_area() != '' ? osc_item_city_area() : '') . ']]></city_area> <postcode><![CDATA[' . (osc_item_zip() != '' ? osc_item_zip() : '') . ']]></postcode> <region><![CDATA[' . (osc_item_region() != '' ? osc_item_region() : '') . ']]></region> <latitude><![CDATA[' . (osc_item_latitude() != '' ? osc_item_latitude() : '') . ']]></latitude> <longitude><![CDATA[' . (osc_item_longitude() != '' ? osc_item_longitude() : '') . ']]></longitude> <salary><![CDATA[' . (isset($item['i_salary_min']) && isset($item['i_salary_max']) ? $item['i_salary_min'] . ' - ' . $item['i_salary_max'] : '') . ']]></salary> <company><![CDATA[' . (isset($item['s_company_name']) ? $item['s_company_name'] : '') . ']]></company> <experience><![CDATA[' . (isset($item['s_experience']) ? $item['s_experience'] : '') . ']]></experience> <requirements><![CDATA[' . (isset($item['s_requirements']) ? $item['s_requirements'] : '') . ']]></requirements> <contract><![CDATA[' . (isset($item['s_contract']) ? $item['s_contract'] : '') . ']]></contract> <category><![CDATA[' . (osc_item_category() != '' ? osc_item_category() : '') . ']]></category>'; echo ' <date><![CDATA[' . $date . ']]></date> <time><![CDATA[' . $time . ']]></time> </ad>'; } } echo '</trovit>'; }