예제 #1
0
function pp_subscr_manual_approve($invoice_id)
{
    global $label;
    $sql = "UPDATE `subscription_invoices` set status='Pending',  reason='" . jb_escape_sql('reviewing') . "', `payment_method`='PayPal' WHERE invoice_id='" . jb_escape_sql($invoice_id) . "' ";
    JB_mysql_query($sql) or JB_pp_mail_error(mysql_error());
    $invoice_row = JB_get_subscription_invoice_row($invoice_id);
    $sql = "Select * FROM employers WHERE ID='" . jb_escape_sql($invoice_row['employer_id']) . "'";
    $result = JB_mysql_query($sql) or die(mysql_error());
    $e_row = mysql_fetch_array($result, MYSQL_ASSOC);
    $email = $label['paypal_subscr_manual_review'];
    $email = str_replace('%NAME%', $e_row['FirstName'] . ' ' . $e_row['LastName'], $email);
    $email = str_replace('%SITE_NAME%', JB_SITE_NAME, $email);
    $email = str_replace('%SITE_EMAIL%', JB_SITE_CONTACT_EMAIL, $email);
    $email = str_replace('%INVOICE_ID%', $invoice_id, $email);
    $email_id = JB_queue_mail($e_row['Email'], $e_row['FirstName'] . ' ' . $e_row['LastName'], JB_SITE_CONTACT_EMAIL, JB_SITE_NAME, $label['paypal_subscr_manual_sbj'], $email, '', 677);
    JB_process_mail_queue(1, $email_id);
    // copy to Admin
    $email = $label['paypal_subscr_manual_admin'] . $email;
    $email_id = JB_queue_mail(JB_SITE_CONTACT_EMAIL, 'Admin', JB_SITE_CONTACT_EMAIL, JB_SITE_NAME, $label['paypal_subscr_manual_sbj'], $email, '', 678);
    JB_process_mail_queue(1, $email_id);
}
예제 #2
0
    function config_form()
    {
        //
        ?>
		<form method="post" action="<?php 
        echo htmlentities($_SERVER['PHP_SELF']);
        ?>
">
		<table border="0" cellpadding="5" cellspacing="2" style="border-style:groove" id="AutoNumber1" width="100%" bgcolor="#FFFFFF">
		
		<tr>
			<td  colspan="2" bgcolor="#e6f2ea">
				<b>Jobs Filler - Configuration</b></td>
			
		</tr>

		<tr>
			<td  width="20%" bgcolor="#e6f2ea">
				<b>API key</b></td>
			<td  bgcolor="#e6f2ea"><input size="20" type="text" name='id' value="<?php 
        echo $this->config['id'];
        ?>
"> (Your api.jamit.com key, get it from http://api.jamit.com)
			</td>
		</tr>
		<!--
		<tr>
			<td  width="20%" bgcolor="#e6f2ea">
				<b>Country</b></td>
			<td  bgcolor="#e6f2ea"><select  name="c" value="<?php 
        echo $this->config['c'];
        ?>
">
			<option value="us" <?php 
        if ($this->config['c'] == "us") {
            echo ' selected ';
        }
        ?>
>US</option>
			<option value="ca" <?php 
        if ($this->config['c'] == "ca") {
            echo ' selected ';
        }
        ?>
>Canada</option>
			<option value="gb" <?php 
        if ($this->config['c'] == "gb") {
            echo ' selected ';
        }
        ?>
>Great Britain</option>
			<option value="de" <?php 
        if ($this->config['c'] == "de") {
            echo ' selected ';
        }
        ?>
>Germany</option>
			<option value="fr" <?php 
        if ($this->config['c'] == "fr") {
            echo ' selected ';
        }
        ?>
>France</option>
			<option value="es" <?php 
        if ($this->config['c'] == "es") {
            echo ' selected ';
        }
        ?>
>Spain</option>
			<option value="in" <?php 
        if ($this->config['c'] == "in") {
            echo ' selected ';
        }
        ?>
>India</option>
			<option value="ie" <?php 
        if ($this->config['c'] == "ie") {
            echo ' selected ';
        }
        ?>
>Ireland</option>
			<option value="nl" <?php 
        if ($this->config['c'] == "nl") {
            echo ' selected ';
        }
        ?>
>Netherlands</option>
			</select>
			</td>
		</tr>
		-->
		<tr>
			<td  width="20%" bgcolor="#e6f2ea">
				<b>Sources</b></td>
			<td  bgcolor="#e6f2ea">

		<?php 
        $this->api_cache_flush(1);
        // flush older than one day
        $params = array('pub' => $this->config['id']);
        $countries = $this->api_call_cached('get_country_list', $params);
        $params = array('pub' => $this->config['id']);
        $sources = $this->api_call_cached('get_source_list', $params);
        $params = array('pub' => $this->config['id']);
        $types = $this->api_call_cached('get_type_list', $params);
        echo '<p><b>Countries:</b> ';
        $pipe = '';
        if ('ALL' == $this->config['cnt']) {
            $sel = ' checked ';
        } else {
            $sel = '';
        }
        echo '<input ' . $sel . 'type="radio" name="cnt" value="ALL"> All, &nbsp;';
        foreach ($countries as $c) {
            //if (in_array($c, $this->config['cnt'])) {
            if ($c == $this->config['cnt']) {
                $sel = ' checked ';
            } else {
                $sel = '';
            }
            //echo $pipe.'<input '.$sel.' type="checkbox" name="cnt[]" value="'.$c.'"> '.$c;
            echo $pipe . '<input ' . $sel . ' type="radio" name="cnt" value="' . $c . '"> ' . $c;
            $pipe = ', &nbsp;';
        }
        echo '</p>';
        echo '<p><b>Sources:</b> ';
        $pipe = '';
        if ('ALL' == $this->config['src']) {
            $sel = ' checked ';
        } else {
            $sel = '';
        }
        echo '<input ' . $sel . 'type="radio" name="src" value="ALL"> All, &nbsp;';
        foreach ($sources as $s) {
            if ($s == $this->config['src']) {
                //if (in_array($s, $this->config['src'])) {
                $sel = ' checked ';
            } else {
                $sel = '';
            }
            //echo $pipe.'<input '.$sel.'type="checkbox" name="src[]" value="'.$s.'"> '.$s;
            echo $pipe . '<input ' . $sel . 'type="radio" name="src" value="' . $s . '"> ' . $s;
            $pipe = ', &nbsp;';
        }
        echo '</p>';
        echo '<p><b>Job Types:</b> ';
        $pipe = '';
        if ('ALL' == $this->config['typ']) {
            $sel = ' checked ';
        } else {
            $sel = '';
        }
        echo '<input ' . $sel . 'type="radio" name="typ" value="ALL"> All, &nbsp;';
        foreach ($types as $c) {
            //if (in_array($c, $this->config['cnt'])) {
            if ($c == $this->config['typ']) {
                $sel = ' checked ';
            } else {
                $sel = '';
            }
            //echo $pipe.'<input '.$sel.' type="checkbox" name="cnt[]" value="'.$c.'"> '.$c;
            echo $pipe . '<input ' . $sel . ' type="radio" name="typ" value="' . $c . '"> ' . $c;
            $pipe = ', &nbsp;';
        }
        echo '</p>';
        ?>
			</td>
		</tr>

				<tr>
			<td  width="20%" bgcolor="#e6f2ea">
				<b>Default Keyword(s)</b></td>
			<td  bgcolor="#e6f2ea"><input size="20" type="text" name='k' value="<?php 
        echo $this->config['k'];
        ?>
"> (By default the terms are AND'ed.)
			</td>
		</tr>
		<tr>
			<td  width="20%" bgcolor="#e6f2ea">
				<b>Default City</b></td>
			<td  bgcolor="#e6f2ea"><input size="20" type="text" name='l' value="<?php 
        echo $this->config['l'];
        ?>
"> (City is optional. e.g. Sydney)
			</td>
		</tr>
		<tr>
			<td  width="20%" bgcolor="#e6f2ea">
				<b>Search Field(s) for Keyword</b></td>
			<td  bgcolor="#e6f2ea">
			<select name="k_tag[]" multiple size="5">
				<!--<option value="">[Select]</option>-->
				<?php 
        echo $this->echo_tt_options($this->config['k_tag']);
        ?>
				</select> (The selected search parameters will be combined and used as the keywords for the search query sent to Indeed. If not selected or no keyword is searched, then it will default to the Main Keyword. Hold down the Ctrl key to select/unselect multiple items)
			</td>
		</tr>
		<tr>
			<td  width="20%" bgcolor="#e6f2ea">
				<b>Search Field(s) for Location</b></td>
			<td  bgcolor="#e6f2ea">
			<select name="l_tag[]" multiple size="5" >
				<!--<option value="">[Select]</option>-->
				<?php 
        echo $this->echo_tt_options($this->config['l_tag']);
        ?>
			</select> (The selected search parameters will be combined and used as the location for the search query sent to Indeed. If not selected or no location is searched, then it will default to the Main Location. Hold down the Ctrl key to select/unselect multiple items)
			</td>
		</tr>
		<td colspan="2" bgcolor="#e6f2ea">

			<table width="100%" border="0" cellSpacing="1" cellPadding="3" bgColor="#d9d9d9"  >

			<tr bgcolor="#e6f2ea">

					<h4>Source to Local field mappings</h4>

					<td width="10%" valign="top">
					<b>Local Fields</b> - Fields your job posting form. Fields marked with * are required.
					</td>

					<td valign="top">
					<b>Source Fields</b> - These fields are the original fields that are coming in from the feed
					</td>

				</tr>
			<?php 
        require_once "../include/posts.inc.php";
        $PForm =& JB_get_DynamicFormObject(1, 'global');
        $params = array('pub' => $this->config['id']);
        $in_fields = $this->api_call('get_field_list', $params);
        sort($in_fields);
        $sql = "SELECT *, t1.field_label AS FLABEL FROM form_field_translations as t1, form_fields as t2 WHERE t2.form_id=1 AND t2.field_id=t1.field_id AND field_type!='BLANK' AND field_type != 'SEPERATOR' AND lang='" . JB_escape_sql($_SESSION['LANG']) . "' order by section asc, field_sort asc  ";
        $result = jb_mysql_query($sql);
        while ($field = mysql_fetch_array($result, MYSQL_ASSOC)) {
            if ($field['template_tag'] == 'EMAIL') {
                continue;
            }
            ?>

				

				<tr bgcolor="e6f2ea">

					<td width="10%" nowrap valign="top">
						<span style="font-weight: bold; font-size: 10pt"><?php 
            echo $field['field_label'];
            if ($field['is_required'] == 'Y') {
                echo '<span style="color:red; font-size:18pt">*</span>';
            }
            ?>
</span> <?php 
            echo $field['field_type'] . ' (#' . $field['field_id'];
            ?>
)
					</td>

					<td >
						&lt;---<select <?php 
            if ($this->config['map'][$field['field_id']]) {
                ?>
 style="color:#008080; font-weight: bold" <?php 
            }
            ?>
 style="font-size: 12pt" type="select" name="map[]">
						<option value="" style="color:#008080; font-weight: bold">[Select Field]</option>
						<?php 
            foreach ($in_fields as $in_key => $in_field) {
                if ($this->config['map'][$field['field_id']] == $in_field) {
                    $sel = ' selected ';
                } else {
                    $sel = '';
                }
                echo '<option style="color:#008080; font-weight: bold" ' . $sel . 'value="' . $field['field_id'] . '=' . $in_field . '">' . $in_field . '</option>' . "\n";
            }
            ?>
						</select>
					</td>
				</tr>

			<?php 
        }
        ?>
			</table>


		</td>

		<tr>
			<td  width="20%" bgcolor="#e6f2ea">
				<b>Ad Code</b></td>
			<td  bgcolor="#e6f2ea">
				<small>Paste in the ad code HTML here, eg. Google Adsense</small>
				<textarea rows="10" style="width:100%" name="ad"><?php 
        echo htmlentities($this->config['ad']);
        ?>
</textarea>
			</td>
		</tr>
	<!--	
		<tr>
			<td  width="20%" bgcolor="#e6f2ea">
				<b>Channel</b></td>
			<td  bgcolor="#e6f2ea"><input size="15" type="text" name='ch' value="<?php 
        echo $this->config['ch'];
        ?>
"> (Optional. Used to track performance if you have more than one web site. Add a new channel in your Indeed publisher account by going to the XML Feed page)
			</td>
		</tr>
		
	--><!--	<tr>
			<td  width="20%" bgcolor="#e6f2ea">
				<b>Sort</b></td>
			<td  bgcolor="#e6f2ea"><input type="radio" name="so" <?php 
        if ($this->config['so'] == 'date') {
            echo ' checked ';
        }
        ?>
 value="date"> By Date Posted (default)<br>
			<input type="radio" name="so" <?php 
        if ($this->config['so'] == 'relevance') {
            echo ' checked ';
        }
        ?>
 value="relevance"> By Relevance<br>
			<input type="radio" name="so" <?php 
        if ($this->config['so'] == 'custom') {
            echo ' checked ';
        }
        ?>
 value="custom"> By relevance + Date Sorted (Jamit does additional sorting so that the relevant results are sorted by date. CPU intensive)
			</td>
		</tr>
	--><!--	<tr>
			<td  width="20%" bgcolor="#e6f2ea">
				<b>Site Type</b></td>
			<td  bgcolor="#e6f2ea"><input type="radio" name="st" <?php 
        if ($this->config['st'] == 'jobsite') {
            echo ' checked ';
        }
        ?>
 value="jobsite"> Job Site: To show jobs only from job board sites<br>
			<input type="radio" name="st" <?php 
        if ($this->config['st'] == 'employer') {
            echo ' checked ';
        }
        ?>
 value="employer">Show jobs only direct from employer sites<br>
			<input type="radio" name="st" <?php 
        if ($this->config['st'] == '') {
            echo ' checked ';
        }
        ?>
 value="">Show from all<br>
			</td>
		</tr>
	--><!--	<tr>
			<td  width="20%" bgcolor="#e6f2ea">
				<b>Job Type</b></td>
			<td  bgcolor="#e6f2ea">
			<input type="radio" name="jt" <?php 
        if ($this->config['jt'] == 'fulltime') {
            echo ' checked ';
        }
        ?>
 value="fulltime"> Get Full Time jobs<br>
			<input type="radio" name="jt" <?php 
        if ($this->config['jt'] == 'parttime') {
            echo ' checked ';
        }
        ?>
 value="parttime"> Get Part Time jobs<br>
			<input type="radio" name="jt" <?php 
        if ($this->config['jt'] == 'contract') {
            echo ' checked ';
        }
        ?>
 value="contract"> Get Contract jobs<br>
			<input type="radio" name="jt" <?php 
        if ($this->config['jt'] == 'internship') {
            echo ' checked ';
        }
        ?>
 value="internship"> Get Intership jobs<br>
			<input type="radio" name="jt" <?php 
        if ($this->config['jt'] == 'temporary') {
            echo ' checked ';
        }
        ?>
 value="temporary"> Get temporary jobs<br>
			<input type="radio" name="jt" <?php 
        if ($this->config['jt'] == '') {
            echo ' checked ';
        }
        ?>
 value=""> Get all types of jobs
			</td>
		</tr>
	--><!--	<tr>
			<td  width="20%" bgcolor="#e6f2ea">
				<b>Radius</b></td>
			<td  bgcolor="#e6f2ea"><input size="3" type="text" name='r' value="<?php 
        echo $this->config['r'];
        ?>
"> Distance from search location ("as the crow flies"). Default is 25.
			</td>
		</tr>
		--><!--<tr>
			<td  width="20%" bgcolor="#e6f2ea">
				<b>From Age</b></td>
			<td  bgcolor="#e6f2ea"><input size="3" type="text" name='age' value="<?php 
        echo $this->config['age'];
        ?>
"> (Number of days back to search. Default/Max is 30)
			</td>
		</tr>
--><!--
		<tr>
			<td  width="20%" bgcolor="#e6f2ea">
				<b>highlight</b></td>
			<td  bgcolor="#e6f2ea"><input type="radio" name="h" <?php 
        if ($this->config['h'] == '1') {
            echo ' checked ';
        }
        ?>
 value="1"> Yes, highlight keywords<br>
			<input type="radio" name="h" <?php 
        if ($this->config['h'] == '0') {
            echo ' checked ';
        }
        ?>
 value="0"> No)
			</td>
		</tr>
	--><!--
		<tr>
			<td  width="20%" bgcolor="#e6f2ea">
				<b>Filter Results</b></td>
			<td  bgcolor="#e6f2ea"><input type="radio" name="f" <?php 
        if ($this->config['f'] == '1') {
            echo ' checked ';
        }
        ?>
 value="1"> Yes, filter duplicate results<br>
			<input type="radio" name="f" <?php 
        if ($this->config['f'] == '0') {
            echo ' checked ';
        }
        ?>
 value="0"> No
			</td>
		</tr>
	--><!--
		<tr>
			<td  width="20%" bgcolor="#e6f2ea">
				<b>How to Back-fill?</b></td>
			<td  bgcolor="#e6f2ea">
			<input type="radio" name="fill" <?php 
        if ($this->config['fill'] == 'S') {
            echo ' checked ';
        }
        ?>
 value="S"> Stop after filling the first page<br>
			<input type="radio" name="fill" <?php 
        if ($this->config['fill'] == 'C') {
            echo ' checked ';
        }
        ?>
 value="C"> Continue to futher pages (if more results are available)
			</td>
		</tr>
-->
		

		
		<tr><td colspan="2">Advanced Settings</td>
		</tr>


	<tr>
      <td  bgcolor="#e6f2ea"><font face="Verdana" size="1">Use cURL (Y/N)</font></td>
      <td  bgcolor="#e6f2ea"><font face="Verdana" size="1">
       <br>
	   <?php 
        if (!function_exists('curl_init')) {
            echo ' Note: Your host does not suppor cURL. Options currently disabled <br>';
        }
        ?>
	  <input type="radio" name="curl" value="N" <?php 
        if (!function_exists('curl_init')) {
            echo ' disabled ';
        }
        ?>
 <?php 
        if ($this->config['curl'] == 'N') {
            echo " checked ";
        }
        ?>
 >No - Normally this option is best<br>
	  <input type="radio" name="curl" value="Y" <?php 
        if (!function_exists('curl_init')) {
            echo ' disabled ';
        }
        ?>
 <?php 
        if ($this->config['curl'] == 'Y') {
            echo " checked ";
        }
        ?>
 >Yes - If your hosting company blocked fsockopen() and has cURL, then use this option</font></td>
    </tr>

	<tr>
      <td  bgcolor="#e6f2ea"><font face="Verdana" size="1">cURL 
      Proxy URL</font></td>
      <td  bgcolor="#e6f2ea"><font face="Verdana" size="1">
      <input <?php 
        if (!function_exists('curl_init')) {
            echo ' disabled ';
        }
        ?>
 type="text" name="proxy" size="50" value="<?php 
        echo $this->config['proxy'];
        ?>
">Leave blank if your server does not need one. Contact your hosting company if you are not sure about which option to use. For GoDaddy it is: http://proxy.shr.secureserver.net:3128<br></font></td>
    </tr>
		<tr>
			<td  bgcolor="#e6f2ea" colspan="2"><font face="Verdana" size="1"><input type="submit" value="Save">
		</td>
		</tr>
		</table>
		<input type="hidden" name="plugin" value="<?php 
        echo jb_escape_html($_REQUEST['plugin']);
        ?>
">
		<input type="hidden" name="action" value="save">

		</form>
		<?php 
        if ($this->bug_test()) {
            echo "<p><font color='red'>PHP Bug warning: The system detected that your PHP version has a bug in the XML parser. This is not a bug in the Jamit Job Board, but a bug in 'libxml' that comes built in to PHP itself. An upgrade of PHP with the latest version of 'libxml' with  is recommended. This plugin contains a workaround for this bug - so it should still work...</font> For details about the bug, please see <a href='http://bugs.php.net/bug.php?id=45996'>http://bugs.php.net/bug.php?id=45996</a></p> ";
        }
        // check if fsockopen is disabled
        if (stristr(ini_get('disable_functions'), "fsockopen")) {
            JB_pp_mail_error("<p>fsockopen is disabled on this server. You can try to set this plugin to use cURL instead</p>");
        }
        ?>
		<b>Important:</b> After configuring Go here to <a href="p.php?p=JobsFiller&action=kw">Configure Category Keywords</a>
<p>
TROUBLE SHOOTING
<p>
> Keywords do not return any results?
Try your keyword on indeed.com first, before putting them in the job board.
<p>
> Page times out / does not fetch any results?
Your server must be able to make external connections to api.indeed.com
through port 80 (HTTP). This means that fsockopen must be enabled on
your host, and must be allowed to make external connections.
<p>
- I see warning/errors messages saying that 'argument 2' is missing.
This has been reported and can be fixed if you open the include/lists.inc.php
file and locate the following code:
<p>
JBPLUG_do_callback('job_list_data_val', $val, $template_tag);
<p>
and change to:
<p>
JBPLUG_do_callback('job_list_data_val', $val, $template_tag, $a);
<p>
- Can I make the links open in a new window?
<p>
Nope.. Indeed rules are that in order to record the click, it must use their 
onmousedown event to call their javascript, and the javascripts 
prevents the link from opening in a new window.
<p>
- It still does not work
<p>
Please check the requirements - requires Jamit Job Board 3.5.0 or higher
Please also check with your hosting company that your server
is allowed to use fsockopen or Curl
		 <?php 
    }
예제 #3
0
    function config_form()
    {
        //
        ?>
		<form method="post" action="<?php 
        echo htmlentities($_SERVER['PHP_SELF']);
        ?>
">
		<table border="0" cellpadding="5" cellspacing="2" style="border-style:groove" width="100%" bgcolor="#FFFFFF">
		
		<tr>
			<td  width="20%" bgcolor="#e6f2ea">
				<b>Publisher ID</b></td>
			<td  bgcolor="#e6f2ea"><input size="40" type="text" name='id' value="<?php 
        echo jb_escape_html($this->config['id']);
        ?>
"> (Your CareerJet Affid ID, please visit <a style="font-weight:bold" href="http://www.careerjet.com/partners/?ak=09d1598b91e4e0b87d0dd7dcf75a180e" target="_blank">CareerJet Partners</a> site to register - follow the link and click 'Create your partner account' at the bottom of the page to register)
			</td>
		</tr>
		<tr>
			<td  width="20%" bgcolor="#e6f2ea">
				<b>Locale</b></td>
			<td  bgcolor="#e6f2ea">

			<?php 
        $locale2base = array('cs_CZ' => "http://www.careerjet.cz", 'da_DK' => "http://www.careerjet.dk", 'de_AT' => "http://www.careerjet.at", 'de_CH' => "http://www.careerjet.ch", 'de_DE' => "http://www.careerjet.de", 'en_AE' => "http://www.careerjet.ae", 'en_AU' => "http://www.careerjet.com.au", 'en_CA' => "http://www.careerjet.ca", 'en_CN' => "http://en.careerjet.cn", 'en_HK' => "http://www.careerjet.hk", 'en_IE' => "http://www.careerjet.ie", 'en_IN' => "http://www.careerjet.co.in", 'en_MY' => "http://www.careerjet.com.my", 'en_NZ' => "http://www.careerjet.co.nz", 'en_OM' => "http://www.careerjet.com.om", 'en_PH' => "http://www.careerjet.ph", 'en_PK' => "http://www.careerjet.com.pk", 'en_QA' => "http://www.careerjet.com.qa", 'en_SG' => "http://www.careerjet.sg", 'en_GB' => "http://www.careerjet.co.uk", 'en_UK' => "http://www.careerjet.co.uk", 'en_US' => "http://www.careerjet.com", 'en_ZA' => "http://www.careerjet.co.za", 'en_TW' => "http://www.careerjet.com.tw", 'en_VN' => "http://www.careerjet.vn", 'es_AR' => "http://www.opcionempleo.com.ar", 'es_BO' => "http://www.opcionempleo.com.bo", 'es_CL' => "http://www.opcionempleo.cl", 'es_CR' => "http://www.opcionempleo.co.cr", 'es_DO' => "http://www.opcionempleo.com.do", 'es_EC' => "http://www.opcionempleo.ec", 'es_ES' => "http://www.opcionempleo.com", 'es_GT' => "http://www.opcionempleo.com.gt", 'es_MX' => "http://www.opcionempleo.com.mx", 'es_PA' => "http://www.opcionempleo.com.pa", 'es_PE' => "http://www.opcionempleo.com.pe", 'es_PR' => "http://www.opcionempleo.com.pr", 'es_PY' => "http://www.opcionempleo.com.py", 'es_UY' => "http://www.opcionempleo.com.uy", 'es_VE' => "http://www.opcionempleo.com.ve", 'fi_FI' => "http://www.careerjet.fi", 'fr_BE' => "http://www.optioncarriere.be", 'fr_CA' => "http://fr.careerjet.ca", 'fr_CH' => "http://www.optioncarriere.ch", 'fr_FR' => "http://www.optioncarriere.com", 'fr_LU' => "http://www.optioncarriere.lu", 'fr_MA' => "http://www.optioncarriere.ma", 'hu_HU' => "http://www.careerjet.hu", 'it_IT' => "http://www.careerjet.it", 'ja_JP' => "http://www.careerjet.jp", 'ko_KR' => "http://www.careerjet.co.kr", 'nl_BE' => "http://www.careerjet.be", 'nl_NL' => "http://www.careerjet.nl", 'no_NO' => "http://www.careerjet.no", 'pl_PL' => "http://www.careerjet.pl", 'pt_PT' => "http://www.careerjet.pt", 'pt_BR' => "http://www.careerjet.com.br", 'ru_RU' => "http://www.careerjet.ru", 'ru_UA' => "http://www.careerjet.com.ua", 'sv_SE' => "http://www.careerjet.se", 'sk_SK' => "http://www.careerjet.sk", 'tr_TR' => "http://www.careerjet.com.tr", 'uk_UA' => "http://www.careerjet.ua", 'vi_VN' => "http://www.careerjet.com.vn", 'zh_CN' => "http://www.careerjet.cn");
        ?>
			<select   name="c" value="<?php 
        echo $this->config['c'];
        ?>
">
			<?php 
        foreach ($locale2base as $key => $val) {
            ?>
				<option value="<?php 
            echo $key;
            ?>
" <?php 
            if ($this->config['c'] == $key) {
                echo ' selected ';
            }
            ?>
><?php 
            echo $key;
            ?>
</option>
			<?php 
        }
        ?>
			</select> (Language/Country)
			
			</td>
		</tr>

		<tr>
			<td  width="20%" bgcolor="#e6f2ea">
				<b>Attribution</b></td>
			<td  bgcolor="#e6f2ea"><input type="radio" name="att" <?php 
        if ($this->config['att'] == 'Y') {
            echo ' checked ';
        }
        ?>
 value="Y"> Yes (default - this will display a 'Jobs By CareerJet' link above the results, to distinguish your job posts from CareerJet's)<br>
			<input type="radio" name="att" <?php 
        if ($this->config['att'] == 'N') {
            echo ' checked ';
        }
        ?>
 value="N"> No<br>
			
			</td>
		</tr>
		
		
		
		<tr>
			<td  width="20%" bgcolor="#e6f2ea">
				<b>Sort</b></td>
			<td  bgcolor="#e6f2ea"><input type="radio" name="so" <?php 
        if ($this->config['so'] == 'date') {
            echo ' checked ';
        }
        ?>
 value="date"> By Date Posted (default)<br>
			<input type="radio" name="so" <?php 
        if ($this->config['so'] == 'relevance') {
            echo ' checked ';
        }
        ?>
 value="relevance"> By Relevance<br>
			<input type="radio" name="so" <?php 
        if ($this->config['so'] == 'salary') {
            echo ' checked ';
        }
        ?>
 value="salary"> Biggest salary first
			</td>
		</tr>
		<tr>
			<td  width="20%" bgcolor="#e6f2ea">
				<b>Job Types</b></td>
			<td  bgcolor="#e6f2ea">
			<input type="radio" name="jt" <?php 
        if ($this->config['jt'] == '') {
            echo ' checked ';
        }
        ?>
 value=""> All Jobs<br>
			<input type="radio" name="jt" <?php 
        if ($this->config['jt'] == 'p') {
            echo ' checked ';
        }
        ?>
 value="p"> Permanent jobs<br>
			<input type="radio" name="jt" <?php 
        if ($this->config['jt'] == 'c') {
            echo ' checked ';
        }
        ?>
 value="c"> Contract<br>
			<input type="radio" name="jt" <?php 
        if ($this->config['jt'] == 't') {
            echo ' checked ';
        }
        ?>
 value="t"> Temporary<br>
			<input type="radio" name="jt" <?php 
        if ($this->config['jt'] == 'i') {
            echo ' checked ';
        }
        ?>
 value="i"> Training<br>
			<input type="radio" name="jt" <?php 
        if ($this->config['jt'] == 'v') {
            echo ' checked ';
        }
        ?>
 value="v"> Voluntary<br>
			</td>
		</tr>

		<tr>
			<td  width="20%" bgcolor="#e6f2ea">
				<b>Job Period</b></td>
			<td  bgcolor="#e6f2ea">
			<input type="radio" name="jp" <?php 
        if ($this->config['jp'] == '') {
            echo ' checked ';
        }
        ?>
 value=""> All Jobs<br>
			<input type="radio" name="jp" <?php 
        if ($this->config['jp'] == 'f') {
            echo ' checked ';
        }
        ?>
 value="f"> Full-time<br>
			<input type="radio" name="jp" <?php 
        if ($this->config['jp'] == 'p') {
            echo ' checked ';
        }
        ?>
 value="p"> Part-time<br>
			
			</td>
		</tr>
		
		
		
<!--
		<tr>
			<td  width="20%" bgcolor="#e6f2ea">
				<b>highlight</b></td>
			<td  bgcolor="#e6f2ea"><input type="radio" name="h" <?php 
        if ($this->config['h'] == '1') {
            echo ' checked ';
        }
        ?>
 value="1"> Yes, highlight keywords<br>
			<input type="radio" name="h" <?php 
        if ($this->config['h'] == '0') {
            echo ' checked ';
        }
        ?>
 value="0"> No)
			</td>
		</tr>
	-->
		
	
		<tr>
			<td  width="20%" bgcolor="#e6f2ea">
				<b>How to Back-fill?</b></td>
			<td  bgcolor="#e6f2ea">
			<input type="radio" name="fill" <?php 
        if ($this->config['fill'] == 'S') {
            echo ' checked ';
        }
        ?>
 value="S"> Stop after filling the first page<br>
			<input type="radio" name="fill" <?php 
        if ($this->config['fill'] == 'C') {
            echo ' checked ';
        }
        ?>
 value="C"> Continue to futher pages (if more results are available)
			</td>
		</tr>

		
		<tr>
			<td  width="20%" bgcolor="#e6f2ea">
				<b>Main Keyword(s)</b></td>
			<td  bgcolor="#e6f2ea"><input size="20" type="text" name='k' value="<?php 
        echo jb_escape_html($this->config['k']);
        ?>
"> (eg. Title:accounting, By default terms are AND'ed. To see what is possible, use their advanced search page for more possibilities http://www.careerjet.com/search/advanced.html)
			</td>
		</tr>
		<tr>
			<td  width="20%" bgcolor="#e6f2ea">
				<b>Main Location</b></td>
			<td  bgcolor="#e6f2ea"><input size="20" type="text" name='l' value="<?php 
        echo jb_escape_html($this->config['l']);
        ?>
"> (Location is optional. e.g. US)
			</td>
		</tr>
		<tr>
			<td  width="20%" bgcolor="#e6f2ea">
				<b>Search Field(s) for Keyword</b></td>
			<td  bgcolor="#e6f2ea">
			<select name="k_tag[]" multiple size="5">
				<!--<option value="">[Select]</option>-->
				<?php 
        echo $this->echo_tt_options($this->config['k_tag']);
        ?>
				</select> (The selected search parameters will be combined and used as the keywords for the search query sent to CareerJet. If not selected or no keyword is searched, then it will default to the Main Keyword. Hold down the Ctrl key to select/unselect multiple items)
			</td>
		</tr>
		<tr>
			<td  width="20%" bgcolor="#e6f2ea">
				<b>Search Field(s) for Location</b></td>
			<td  bgcolor="#e6f2ea">
			<select name="l_tag[]" multiple size="5" >
				<!--<option value="">[Select]</option>-->
				<?php 
        echo $this->echo_tt_options($this->config['l_tag']);
        ?>
			</select> (The selected search parameters will be combined and used as the location for the search query sent to CareerJet. If not selected or no location is searched, then it will default to the Main Location. Hold down the Ctrl key to select/unselect multiple items)
			</td>
		</tr>
		
		<tr><td colspan="2">Advanced Settings</td>
		</tr>
		<tr>
      <td  bgcolor="#e6f2ea"><font face="Verdana" size="1">Use cURL (Y/N)</font></td>
      <td  bgcolor="#e6f2ea"><font face="Verdana" size="1">
       <br>
	  <input type="radio" name="curl" value="N"  <?php 
        if ($this->config['curl'] == 'N') {
            echo " checked ";
        }
        ?>
 >No - Normally this option is best<br>
	  <input type="radio" name="curl" value="Y"  <?php 
        if ($this->config['curl'] == 'Y') {
            echo " checked ";
        }
        ?>
 >Yes - If your hosting company blocked fsockopen() and has cURL, then use this option</font></td>
    </tr>

	<tr>
      <td  bgcolor="#e6f2ea"><font face="Verdana" size="1">cURL 
      Proxy URL</font></td>
      <td  bgcolor="#e6f2ea"><font face="Verdana" size="1">
      <input type="text" name="proxy" size="50" value="<?php 
        echo $this->config['proxy'];
        ?>
">Leave blank if your server does not need one. Contact your hosting company if you are not sure about which option to use. For GoDaddy it is: http://proxy.shr.secureserver.net:3128<br></font></td>
    </tr>
		<tr>
			<td  bgcolor="#e6f2ea" colspan="2"><font face="Verdana" size="1"><input type="submit" value="Save">
		</td>
		</tr>
		</table>
		<input type="hidden" name="plugin" value="<?php 
        echo jb_escape_html($_REQUEST['plugin']);
        ?>
">
		<input type="hidden" name="action" value="save">

		</form>
		<?php 
        if ($this->bug_test()) {
            echo "<p><font color='red'>PHP Bug warning: The system detected that your PHP version has a bug in the XML parser. This is not a bug in the Jamit Job Board, but a bug in 'libxml' that comes built in to PHP itself. An upgrade of PHP with the latest version of 'libxml' with  is recommended. This plugin contains a workaround for this bug - so it should still work...</font> For details about the bug, please see <a href='http://bugs.php.net/bug.php?id=45996'>http://bugs.php.net/bug.php?id=45996</a></p> ";
        }
        // check if fsockopen is disabled
        if (stristr(ini_get('disable_functions'), "fsockopen")) {
            JB_pp_mail_error("<p>fsockopen is disabled on this server. You can try to set this plugin to use cURL instead</p>");
        }
        ?>
		<b>Important:</b> After configuring Go here to <a href="p.php?p=CareerJet&action=kw">Configure Category Keywords</a>
<p>
TROUBLE SHOOTING
<p>
> Keywords do not return any results?
Try your keyword on careerjet.com first, before putting them in the job board.
<p>
> Page times out / does not fetch any results?
Your server must be able to make external connections to http://www.careerjet.com/
through port 80 (HTTP). This means that fsockopen must be enabled on
your host, and must be allowed to make external connections.
<p>
- I see warning/errors messages saying that 'argument 2' is missing.
This has been reported and can be fixed if you open the include/lists.inc.php
file and locate the following code:
<p>
JBPLUG_do_callback('job_list_data_val', $val, $template_tag);
<p>
and change to:
<p>
JBPLUG_do_callback('job_list_data_val', $val, $template_tag, $a);
<p>
- Can I make the links open in a new window?
<p>
Nope.. careerjet rules are that in order to record the click, it must use their 
onmousedown event to call their javascript, and the javascripts 
prevents the link from opening in a new window.
<p>
- It still does not work
<p>
Please check the requirements - requires Jamit Job Board 3.5.0 or higher
Please also check with your hosting company that your server
is allowed to use fsockopen or Curl
		 <?php 
    }
예제 #4
0
    function config_form()
    {
        //
        ?>
		<form method="post" action="<?php 
        echo htmlentities($_SERVER['PHP_SELF']);
        ?>
">
		<table border="0" cellpadding="5" cellspacing="2" style="border-style:groove" id="AutoNumber1" width="100%" bgcolor="#FFFFFF">
		
		<tr>
			<td  width="20%" bgcolor="#e6f2ea">
				<b>Publisher ID</b></td>
			<td  bgcolor="#e6f2ea"><input size="20" type="text" name='id' value="<?php 
        echo jb_escape_html($this->config['id']);
        ?>
"> (Your indeed.com publisher ID, get it from https://ads.indeed.com/jobroll/xmlfeed)
			</td>
		</tr>
		<tr>
	

			<td  width="20%" bgcolor="#e6f2ea">
				<b>Country</b></td>
			<td  bgcolor="#e6f2ea"><select  name="c" value="<?php 
        echo $this->config['c'];
        ?>
">
			<option value="us" <?php 
        if ($this->config['c'] == "us") {
            echo ' selected ';
        }
        ?>
>US</option>
			<option value="ar" <?php 
        if ($this->config['c'] == "ar") {
            echo ' selected ';
        }
        ?>
>Argentina</option>
			<option value="au" <?php 
        if ($this->config['c'] == "au") {
            echo ' selected ';
        }
        ?>
>Australia</option>
			<option value="at" <?php 
        if ($this->config['c'] == "at") {
            echo ' selected ';
        }
        ?>
>Austria</option>
			<option value="bh" <?php 
        if ($this->config['c'] == "bh") {
            echo ' selected ';
        }
        ?>
>Bahrain</option>
			<option value="be" <?php 
        if ($this->config['c'] == "be") {
            echo ' selected ';
        }
        ?>
>Belgium</option>
			<option value="br" <?php 
        if ($this->config['c'] == "br") {
            echo ' selected ';
        }
        ?>
>Brazil</option>
			<option value="ca" <?php 
        if ($this->config['c'] == "ca") {
            echo ' selected ';
        }
        ?>
>Canada</option>
			<option value="cn" <?php 
        if ($this->config['c'] == "cn") {
            echo ' selected ';
        }
        ?>
>China</option>
			<option value="co" <?php 
        if ($this->config['c'] == "co") {
            echo ' selected ';
        }
        ?>
>Colombia</option>
			<option value="cz" <?php 
        if ($this->config['c'] == "cz") {
            echo ' selected ';
        }
        ?>
>Czech Republic</option>
			<option value="dk" <?php 
        if ($this->config['c'] == "dk") {
            echo ' selected ';
        }
        ?>
>Denmark</option>
			<option value="fi" <?php 
        if ($this->config['c'] == "fi") {
            echo ' selected ';
        }
        ?>
>Finalnd</option>
			<option value="fr" <?php 
        if ($this->config['c'] == "fr") {
            echo ' selected ';
        }
        ?>
>France</option>
			<option value="gb" <?php 
        if ($this->config['c'] == "gb") {
            echo ' selected ';
        }
        ?>
>Great Britain</option>
			<option value="de" <?php 
        if ($this->config['c'] == "de") {
            echo ' selected ';
        }
        ?>
>Germany</option>
			<option value="gr" <?php 
        if ($this->config['c'] == "gr") {
            echo ' selected ';
        }
        ?>
>Greece</option>
			<option value="hk" <?php 
        if ($this->config['c'] == "hk") {
            echo ' selected ';
        }
        ?>
>Hong Kong</option>
			<option value="hu" <?php 
        if ($this->config['c'] == "hu") {
            echo ' selected ';
        }
        ?>
>Hungary</option>
			<option value="in" <?php 
        if ($this->config['c'] == "in") {
            echo ' selected ';
        }
        ?>
>India</option>
			<option value="ie" <?php 
        if ($this->config['c'] == "ie") {
            echo ' selected ';
        }
        ?>
>Ireland</option>
			<option value="il" <?php 
        if ($this->config['c'] == "il") {
            echo ' selected ';
        }
        ?>
>Israel</option>
			<option value="it" <?php 
        if ($this->config['c'] == "it") {
            echo ' selected ';
        }
        ?>
>Italy</option>
			<option value="jp" <?php 
        if ($this->config['c'] == "jp") {
            echo ' selected ';
        }
        ?>
>Japan</option>
			<option value="kr" <?php 
        if ($this->config['c'] == "kr") {
            echo ' selected ';
        }
        ?>
>Korea</option>
			<option value="kw" <?php 
        if ($this->config['c'] == "kw") {
            echo ' selected ';
        }
        ?>
>Kuwait</option>
			<option value="lu" <?php 
        if ($this->config['c'] == "lu") {
            echo ' selected ';
        }
        ?>
>Luxembourg</option>
			<option value="my" <?php 
        if ($this->config['c'] == "my") {
            echo ' selected ';
        }
        ?>
>Malaysia</option>
			<option value="mx" <?php 
        if ($this->config['c'] == "mx") {
            echo ' selected ';
        }
        ?>
>Mexico</option>
			<option value="nl" <?php 
        if ($this->config['c'] == "nl") {
            echo ' selected ';
        }
        ?>
>Netherlands</option>
			<option value="nz" <?php 
        if ($this->config['c'] == "nz") {
            echo ' selected ';
        }
        ?>
>New Zealand</option>
			<option value="no" <?php 
        if ($this->config['c'] == "no") {
            echo ' selected ';
        }
        ?>
>Norway</option>
			<option value="om" <?php 
        if ($this->config['c'] == "om") {
            echo ' selected ';
        }
        ?>
>Oman</option>
			<option value="pk" <?php 
        if ($this->config['c'] == "pk") {
            echo ' selected ';
        }
        ?>
>Pakistan</option>
			<option value="pe" <?php 
        if ($this->config['c'] == "pe") {
            echo ' selected ';
        }
        ?>
>Peru</option>
			<option value="ph" <?php 
        if ($this->config['c'] == "ph") {
            echo ' selected ';
        }
        ?>
>Philippines</option>
			<option value="pl" <?php 
        if ($this->config['c'] == "pl") {
            echo ' selected ';
        }
        ?>
>Poland</option>
			<option value="pt" <?php 
        if ($this->config['c'] == "pt") {
            echo ' selected ';
        }
        ?>
>Portugal</option>
			<option value="qa" <?php 
        if ($this->config['c'] == "qa") {
            echo ' selected ';
        }
        ?>
>Qatar</option>
			<option value="ro" <?php 
        if ($this->config['c'] == "ro") {
            echo ' selected ';
        }
        ?>
>Romainia</option>
			<option value="ru" <?php 
        if ($this->config['c'] == "ru") {
            echo ' selected ';
        }
        ?>
>Russia</option>
			<option value="sa" <?php 
        if ($this->config['c'] == "sa") {
            echo ' selected ';
        }
        ?>
>Saudi Arabia</option>
			<option value="sg" <?php 
        if ($this->config['c'] == "sg") {
            echo ' selected ';
        }
        ?>
>Singapore</option>
			<option value="za" <?php 
        if ($this->config['c'] == "za") {
            echo ' selected ';
        }
        ?>
>South Africa</option>
			<option value="es" <?php 
        if ($this->config['c'] == "es") {
            echo ' selected ';
        }
        ?>
>Spain</option>
			<option value="se" <?php 
        if ($this->config['c'] == "se") {
            echo ' selected ';
        }
        ?>
>Sweden</option>
			<option value="ch" <?php 
        if ($this->config['c'] == "ch") {
            echo ' selected ';
        }
        ?>
>Switzerland</option>
			<option value="tw" <?php 
        if ($this->config['c'] == "tw") {
            echo ' selected ';
        }
        ?>
>Taiwan</option>
			<option value="tr" <?php 
        if ($this->config['c'] == "tr") {
            echo ' selected ';
        }
        ?>
>Turkey</option>
			<option value="ae" <?php 
        if ($this->config['c'] == "ae") {
            echo ' selected ';
        }
        ?>
>UAE</option>
			<option value="uk" <?php 
        if ($this->config['c'] == "uk") {
            echo ' selected ';
        }
        ?>
>UK</option>
			<option value="ve" <?php 
        if ($this->config['c'] == "ve") {
            echo ' selected ';
        }
        ?>
>Venezuela</option>
			</select>
			</td>
		</tr>
		
		<tr>
			<td  width="20%" bgcolor="#e6f2ea">
				<b>Channel</b></td>
			<td  bgcolor="#e6f2ea"><input size="15" type="text" name='ch' value="<?php 
        echo jb_escape_html($this->config['ch']);
        ?>
"> (Optional. Used to track performance if you have more than one web site. Add a new channel in your Indeed publisher account by going to the XML Feed page)
			</td>
		</tr>
		
		<tr>
			<td  width="20%" bgcolor="#e6f2ea">
				<b>Sort</b></td>
			<td  bgcolor="#e6f2ea"><input type="radio" name="so" <?php 
        if ($this->config['so'] == 'date') {
            echo ' checked ';
        }
        ?>
 value="date"> By Date Posted (default)<br>
			<input type="radio" name="so" <?php 
        if ($this->config['so'] == 'relevance') {
            echo ' checked ';
        }
        ?>
 value="relevance"> By Relevance<br>
			<input type="radio" name="so" <?php 
        if ($this->config['so'] == 'custom') {
            echo ' checked ';
        }
        ?>
 value="custom"> By relevance + Date Sorted (Jamit does additional sorting so that the relevant results are sorted by date. CPU intensive)
			</td>
		</tr>
		<tr>
			<td  width="20%" bgcolor="#e6f2ea">
				<b>Site Type</b></td>
			<td  bgcolor="#e6f2ea"><input type="radio" name="st" <?php 
        if ($this->config['st'] == 'jobsite') {
            echo ' checked ';
        }
        ?>
 value="jobsite"> Job Site: To show jobs only from job board sites<br>
			<input type="radio" name="st" <?php 
        if ($this->config['st'] == 'employer') {
            echo ' checked ';
        }
        ?>
 value="employer">Show jobs only direct from employer sites<br>
			<input type="radio" name="st" <?php 
        if ($this->config['st'] == '') {
            echo ' checked ';
        }
        ?>
 value="">Show from all<br>
			</td>
		</tr>
		<tr>
			<td  width="20%" bgcolor="#e6f2ea">
				<b>Job Type</b></td>
			<td  bgcolor="#e6f2ea">
			<input type="radio" name="jt" <?php 
        if ($this->config['jt'] == 'fulltime') {
            echo ' checked ';
        }
        ?>
 value="fulltime"> Get Full Time jobs<br>
			<input type="radio" name="jt" <?php 
        if ($this->config['jt'] == 'parttime') {
            echo ' checked ';
        }
        ?>
 value="parttime"> Get Part Time jobs<br>
			<input type="radio" name="jt" <?php 
        if ($this->config['jt'] == 'contract') {
            echo ' checked ';
        }
        ?>
 value="contract"> Get Contract jobs<br>
			<input type="radio" name="jt" <?php 
        if ($this->config['jt'] == 'internship') {
            echo ' checked ';
        }
        ?>
 value="internship"> Get Intership jobs<br>
			<input type="radio" name="jt" <?php 
        if ($this->config['jt'] == 'temporary') {
            echo ' checked ';
        }
        ?>
 value="temporary"> Get temporary jobs<br>
			<input type="radio" name="jt" <?php 
        if ($this->config['jt'] == '') {
            echo ' checked ';
        }
        ?>
 value=""> Get all types of jobs
			</td>
		</tr>
		<tr>
			<td  width="20%" bgcolor="#e6f2ea">
				<b>Radius</b></td>
			<td  bgcolor="#e6f2ea"><input size="3" type="text" name='r' value="<?php 
        echo jb_escape_html($this->config['r']);
        ?>
"> Distance from search location ("as the crow flies"). Default is 25.
			</td>
		</tr>
		<tr>
			<td  width="20%" bgcolor="#e6f2ea">
				<b>From Age</b></td>
			<td  bgcolor="#e6f2ea"><input size="3" type="text" name='age' value="<?php 
        echo jb_escape_html($this->config['age']);
        ?>
"> (Number of days back to search. Default/Max is 30)
			</td>
		</tr>
<!--
		<tr>
			<td  width="20%" bgcolor="#e6f2ea">
				<b>highlight</b></td>
			<td  bgcolor="#e6f2ea"><input type="radio" name="h" <?php 
        if ($this->config['h'] == '1') {
            echo ' checked ';
        }
        ?>
 value="1"> Yes, highlight keywords<br>
			<input type="radio" name="h" <?php 
        if ($this->config['h'] == '0') {
            echo ' checked ';
        }
        ?>
 value="0"> No)
			</td>
		</tr>
	-->
		<tr>
			<td  width="20%" bgcolor="#e6f2ea">
				<b>Filter Results</b></td>
			<td  bgcolor="#e6f2ea"><input type="radio" name="f" <?php 
        if ($this->config['f'] == '1') {
            echo ' checked ';
        }
        ?>
 value="1"> Yes, filter duplicate results<br>
			<input type="radio" name="f" <?php 
        if ($this->config['f'] == '0') {
            echo ' checked ';
        }
        ?>
 value="0"> No
			</td>
		</tr>
	
		<tr>
			<td  width="20%" bgcolor="#e6f2ea">
				<b>How to Back-fill?</b></td>
			<td  bgcolor="#e6f2ea">
			<input type="radio" name="fill" <?php 
        if ($this->config['fill'] == 'S') {
            echo ' checked ';
        }
        ?>
 value="S"> Stop after filling the first page<br>
			<input type="radio" name="fill" <?php 
        if ($this->config['fill'] == 'C') {
            echo ' checked ';
        }
        ?>
 value="C"> Continue to futher pages (if more results are available)
			</td>
		</tr>

		
		<tr>
			<td  width="20%" bgcolor="#e6f2ea">
				<b>Main Keyword(s)</b></td>
			<td  bgcolor="#e6f2ea"><input size="20" type="text" name='k' value="<?php 
        echo jb_escape_html($this->config['k']);
        ?>
"> (eg. Title:accounting, By default terms are AND'ed. To see what is possible, use their advanced search page for more possibilities http://www.indeed.com/advanced_search.)
			</td>
		</tr>
		<tr>
			<td  width="20%" bgcolor="#e6f2ea">
				<b>Main Location</b></td>
			<td  bgcolor="#e6f2ea"><input size="20" type="text" name='l' value="<?php 
        echo jb_escape_html($this->config['l']);
        ?>
"> (Location is optional. e.g. US)
			</td>
		</tr>
		<tr>
			<td  width="20%" bgcolor="#e6f2ea">
				<b>Search Field(s) for Keyword</b></td>
			<td  bgcolor="#e6f2ea">
			<select name="k_tag[]" multiple size="5">
				<!--<option value="">[Select]</option>-->
				<?php 
        echo $this->echo_tt_options($this->config['k_tag']);
        ?>
				</select> (The selected search parameters will be combined and used as the keywords for the search query sent to Indeed. If not selected or no keyword is searched, then it will default to the Main Keyword. Hold down the Ctrl key to select/unselect multiple items)
			</td>
		</tr>
		<tr>
			<td  width="20%" bgcolor="#e6f2ea">
				<b>Search Field(s) for Location</b></td>
			<td  bgcolor="#e6f2ea">
			<select name="l_tag[]" multiple size="5" >
				<!--<option value="">[Select]</option>-->
				<?php 
        echo $this->echo_tt_options($this->config['l_tag']);
        ?>
			</select> (The selected search parameters will be combined and used as the location for the search query sent to Indeed. If not selected or no location is searched, then it will default to the Main Location. Hold down the Ctrl key to select/unselect multiple items)
			</td>
		</tr>
		
		<tr><td colspan="2">Advanced Settings</td>
		</tr>
		<tr>
      <td  bgcolor="#e6f2ea"><font face="Verdana" size="1">Use cURL (Y/N)</font></td>
      <td  bgcolor="#e6f2ea"><font face="Verdana" size="1">
       <br>
	  <input type="radio" name="curl" value="N"  <?php 
        if ($this->config['curl'] == 'N') {
            echo " checked ";
        }
        ?>
 >No - Normally this option is best<br>
	  <input type="radio" name="curl" value="Y"  <?php 
        if ($this->config['curl'] == 'Y') {
            echo " checked ";
        }
        ?>
 >Yes - If your hosting company blocked fsockopen() and has cURL, then use this option</font></td>
    </tr>

	<tr>
      <td  bgcolor="#e6f2ea"><font face="Verdana" size="1">cURL 
      Proxy URL</font></td>
      <td  bgcolor="#e6f2ea"><font face="Verdana" size="1">
      <input type="text" name="proxy" size="50" value="<?php 
        echo $this->config['proxy'];
        ?>
">Leave blank if your server does not need one. Contact your hosting company if you are not sure about which option to use. For GoDaddy it is: http://proxy.shr.secureserver.net:3128<br></font></td>
    </tr>
		<tr>
			<td  bgcolor="#e6f2ea" colspan="2"><font face="Verdana" size="1"><input type="submit" value="Save">
		</td>
		</tr>
		</table>
		<input type="hidden" name="plugin" value="<?php 
        echo jb_escape_html($_REQUEST['plugin']);
        ?>
">
		<input type="hidden" name="action" value="save">

		</form>
		<?php 
        if ($this->bug_test()) {
            echo "<p><font color='red'>PHP Bug warning: The system detected that your PHP version has a bug in the XML parser. This is not a bug in the Jamit Job Board, but a bug in 'libxml' that comes built in to PHP itself. An upgrade of PHP with the latest version of 'libxml' with  is recommended. This plugin contains a workaround for this bug - so it should still work...</font> For details about the bug, please see <a href='http://bugs.php.net/bug.php?id=45996'>http://bugs.php.net/bug.php?id=45996</a></p> ";
        }
        // check if fsockopen is disabled
        if (stristr(ini_get('disable_functions'), "fsockopen")) {
            JB_pp_mail_error("<p>fsockopen is disabled on this server. You can try to set this plugin to use cURL instead</p>");
        }
        ?>
		<b>Important:</b> After configuring Go here to <a href="p.php?p=IndeedXML&action=kw">Configure Category Keywords</a>
<p>
TROUBLE SHOOTING
<p>
> Keywords do not return any results?
Try your keyword on indeed.com first, before putting them in the job board.
<p>
> Page times out / does not fetch any results?
Your server must be able to make external connections to api.indeed.com
through port 80 (HTTP). This means that fsockopen must be enabled on
your host, and must be allowed to make external connections.
<p>
- I see warning/errors messages saying that 'argument 2' is missing.
This has been reported and can be fixed if you open the include/lists.inc.php
file and locate the following code:
<p>
JBPLUG_do_callback('job_list_data_val', $val, $template_tag);
<p>
and change to:
<p>
JBPLUG_do_callback('job_list_data_val', $val, $template_tag, $a);
<p>
- Can I make the links open in a new window?
<p>
Nope.. Indeed rules are that in order to record the click, it must use their 
onmousedown event to call their javascript, and the javascripts 
prevents the link from opening in a new window.
<p>
- It still does not work
<p>
Please check the requirements - requires Jamit Job Board 3.5.0 or higher
Please also check with your hosting company that your server
is allowed to use fsockopen or Curl
		 <?php 
    }
예제 #5
0
    function config_form()
    {
        //
        ?>
		
		<h2>Simply Hired XML Back-fill Configuration</h2>
		
		<form method="post" action="<?php 
        echo htmlentities($_SERVER['PHP_SELF']);
        ?>
">
		<table border="0" cellpadding="5" cellspacing="2" style="border-style:groove" id="AutoNumber1" width="100%" bgcolor="#FFFFFF">
		
		
		
		<tr>
			<td  width="20%" bgcolor="#e6f2ea">
				<b>Country</b></td>
			<td  bgcolor="#e6f2ea"><select  name="c" value="<?php 
        echo $this->config['c'];
        ?>
">

			
			<option value="au" <?php 
        if ($this->config['c'] == "au") {
            echo ' selected ';
        }
        ?>
>Australia</option>
			<option value="at" <?php 
        if ($this->config['c'] == "at") {
            echo ' selected ';
        }
        ?>
>Austria</option>
			<option value="be" <?php 
        if ($this->config['c'] == "be") {
            echo ' selected ';
        }
        ?>
>Belgium</option>
			<option value="br" <?php 
        if ($this->config['c'] == "br") {
            echo ' selected ';
        }
        ?>
>Brazil</option>
			<option value="ca" <?php 
        if ($this->config['c'] == "ca") {
            echo ' selected ';
        }
        ?>
>Canada</option>
			<option value="cn" <?php 
        if ($this->config['c'] == "cn") {
            echo ' selected ';
        }
        ?>
>China</option>
			<option value="fr" <?php 
        if ($this->config['c'] == "fr") {
            echo ' selected ';
        }
        ?>
>France</option>
			<option value="de" <?php 
        if ($this->config['c'] == "de") {
            echo ' selected ';
        }
        ?>
>Germany</option>
			<option value="in" <?php 
        if ($this->config['c'] == "in") {
            echo ' selected ';
        }
        ?>
>India</option>
			<option value="ie" <?php 
        if ($this->config['c'] == "ie") {
            echo ' selected ';
        }
        ?>
>Ierland</option>
			<option value="it" <?php 
        if ($this->config['c'] == "it") {
            echo ' selected ';
        }
        ?>
>Italy</option>
			<option value="jp" <?php 
        if ($this->config['c'] == "jp") {
            echo ' selected ';
        }
        ?>
>Japan</option>
			<option value="kr" <?php 
        if ($this->config['c'] == "kr") {
            echo ' selected ';
        }
        ?>
>Korea</option>
			<option value="nl" <?php 
        if ($this->config['c'] == "nl") {
            echo ' selected ';
        }
        ?>
>Netherlands</option>
			<option value="mx" <?php 
        if ($this->config['c'] == "mx") {
            echo ' selected ';
        }
        ?>
>Mexico</option>
			<option value="es" <?php 
        if ($this->config['c'] == "es") {
            echo ' selected ';
        }
        ?>
>Spain</option>
			<option value="ch" <?php 
        if ($this->config['c'] == "ch") {
            echo ' selected ';
        }
        ?>
>Switzerland</option>
			<option value="uk" <?php 
        if ($this->config['c'] == "uk") {
            echo ' selected ';
        }
        ?>
>United Kingdom</option>
			<option value="us" <?php 
        if ($this->config['c'] == "us") {
            echo ' selected ';
        }
        ?>
>US</option>
			
			</select>
			</td>
		</tr>

		<tr>
			<td  width="20%" bgcolor="#e6f2ea">
				<b>Result Style</b></td>
			<td  bgcolor="#e6f2ea"><input type="radio" name="ssty" <?php 
        if ($this->config['ssty'] == '1') {
            echo ' checked ';
        }
        ?>
 value="1"> All sponsored jobs, followed by zero organic jobs (US Only)<br>
			<input type="radio" name="ssty" <?php 
        if ($this->config['ssty'] == '2') {
            echo ' checked ';
        }
        ?>
 value="2"> All posted jobs, followed by all sponsored jobs, followed by all organic jobs (Sponsored jobs US Only)<br>
			<input type="radio" name="ssty" <?php 
        if ($this->config['ssty'] == '3') {
            echo ' checked ';
        }
        ?>
 value="3"> All organic jobs (If you are not seeing any results, please try this option)<br>
			
			</td>
		</tr>
		
		<tr>
			<td  width="20%" bgcolor="#e6f2ea">
				<b>Sort by</b></td>
			<td  bgcolor="#e6f2ea"><input type="radio" name="so" <?php 
        if ($this->config['so'] == 'dd') {
            echo ' checked ';
        } elseif ($this->config['so'] == '') {
            echo ' checked';
        }
        ?>
 value="dd"> Date, descending (default)<br>
			<input type="radio" name="so" <?php 
        if ($this->config['so'] == 'da') {
            echo ' checked ';
        }
        ?>
 value="da"> Date, ascending<br>
			<input type="radio" name="so" <?php 
        if ($this->config['so'] == 'rd') {
            echo ' checked ';
        }
        ?>
 value="rd"> Relevance, descending<br>
			<input type="radio" name="so" <?php 
        if ($this->config['so'] == 'ra') {
            echo ' checked ';
        }
        ?>
 value="ra"> Relevance, ascending<br>
			<input type="radio" name="so" <?php 
        if ($this->config['so'] == 'td') {
            echo ' checked ';
        }
        ?>
 value="td"> Title, descending<br>
			<input type="radio" name="so" <?php 
        if ($this->config['so'] == 'ta') {
            echo ' checked ';
        }
        ?>
 value="ta"> Title, ascending<br>
			<input type="radio" name="so" <?php 
        if ($this->config['so'] == 'cd') {
            echo ' checked ';
        }
        ?>
 value="cd"> Company, descending<br>
			<input type="radio" name="so" <?php 
        if ($this->config['so'] == 'ca') {
            echo ' checked ';
        }
        ?>
 value="ca"> Company, ascending<br>
			<input type="radio" name="so" <?php 
        if ($this->config['so'] == 'ld') {
            echo ' checked ';
        }
        ?>
 value="ld"> Location, descending<br>
			<input type="radio" name="so" <?php 
        if ($this->config['so'] == 'la') {
            echo ' checked ';
        }
        ?>
 value="la"> Location, ascending<br>
			<input type="radio" name="so" <?php 
        if ($this->config['so'] == 'custom') {
            echo ' checked ';
        }
        ?>
 value="custom"> Relevance + Date (Jamit does additional sorting so that the relevant results are sorted by date. CPU intensive)
			</td>
		</tr>
		<!-- NOT USED
		<tr>
			<td  width="20%" bgcolor="#e6f2ea">
				<b>Site Type</b></td>
			<td  bgcolor="#e6f2ea"><input type="radio" name="st" <?php 
        if ($this->config['st'] == 'jobsite') {
            echo ' checked ';
        }
        ?>
 value="jobsite"> Job Site: To show jobs only from job board sites<br>
			<input type="radio" name="st" <?php 
        if ($this->config['st'] == 'employer') {
            echo ' checked ';
        }
        ?>
 value="employer">Show jobs only direct from employer sites<br>
			<input type="radio" name="st" <?php 
        if ($this->config['st'] == '') {
            echo ' checked ';
        }
        ?>
 value="">Show from all<br>
			</td>
		</tr>
		<tr>
			<td  width="20%" bgcolor="#e6f2ea">
				<b>Job Type</b></td>
			<td  bgcolor="#e6f2ea">
			<input type="radio" name="jt" <?php 
        if ($this->config['jt'] == 'fulltime') {
            echo ' checked ';
        }
        ?>
 value="fulltime"> Get Full Time jobs<br>
			<input type="radio" name="jt" <?php 
        if ($this->config['jt'] == 'parttime') {
            echo ' checked ';
        }
        ?>
 value="parttime"> Get Part Time jobs<br>
			<input type="radio" name="jt" <?php 
        if ($this->config['jt'] == 'contract') {
            echo ' checked ';
        }
        ?>
 value="contract"> Get Contract jobs<br>
			<input type="radio" name="jt" <?php 
        if ($this->config['jt'] == 'internship') {
            echo ' checked ';
        }
        ?>
 value="internship"> Get Intership jobs<br>
			<input type="radio" name="jt" <?php 
        if ($this->config['jt'] == 'temporary') {
            echo ' checked ';
        }
        ?>
 value="temporary"> Get temporary jobs<br>
			<input type="radio" name="jt" <?php 
        if ($this->config['jt'] == '') {
            echo ' checked ';
        }
        ?>
 value=""> Get all types of jobs
			</td>
		</tr>
		-->
		<tr>
			<td  width="20%" bgcolor="#e6f2ea">
				<b>Radius</b></td>
			<td  bgcolor="#e6f2ea"><input size="3" type="text" name='r' value="<?php 
        echo $this->config['r'];
        ?>
"> Distance in miles from search location ("as the crow flies"). Default is 25.
			</td>
		</tr>
		<tr>
			<td  width="20%" bgcolor="#e6f2ea">
				<b>Maximum Age</b></td>
			<td  bgcolor="#e6f2ea"><input size="3" type="text" name="age" value="<?php 
        echo $this->config['age'];
        ?>
"> (Number of days back to search. Default/Max is 30)
			</td>
		</tr>
<!--
		<tr>
			<td  width="20%" bgcolor="#e6f2ea">
				<b>highlight</b></td>
			<td  bgcolor="#e6f2ea"><input type="radio" name="h" <?php 
        if ($this->config['h'] == '1') {
            echo ' checked ';
        }
        ?>
 value="1"> Yes, highlight keywords<br>
			<input type="radio" name="h" <?php 
        if ($this->config['h'] == '0') {
            echo ' checked ';
        }
        ?>
 value="0"> No)
			</td>
		</tr>
	-->
		<tr>
			<td  width="20%" bgcolor="#e6f2ea">
				<b>Filter Results</b></td>
			<td  bgcolor="#e6f2ea"><input type="radio" name="f" <?php 
        if ($this->config['f'] == '1') {
            echo ' checked ';
        }
        ?>
 value="1"> Yes, filter duplicate results<br>
			<input type="radio" name="f" <?php 
        if ($this->config['f'] == '0') {
            echo ' checked ';
        }
        ?>
 value="0"> No
			</td>
		</tr>

		<tr>
			<td  width="20%" bgcolor="#e6f2ea">
				<b>How to Back-fill?</b></td>
			<td  bgcolor="#e6f2ea">
			<input type="radio" name="fill" <?php 
        if ($this->config['fill'] == 'S') {
            echo ' checked ';
        }
        ?>
 value="S"> Stop after filling the first page<br>
			<input type="radio" name="fill" <?php 
        if ($this->config['fill'] == 'C') {
            echo ' checked ';
        }
        ?>
 value="C"> Continue to futher pages (pagination) if more results are available
			</td>
		</tr>
	
		<tr>
			<td  width="20%" bgcolor="#e6f2ea">
				<b>Show the Day, and how many days elapsed?</b></td>
			<td  bgcolor="#e6f2ea">
			<input type="radio" name="day" <?php 
        if ($this->config['day'] == 'Y') {
            echo ' checked ';
        }
        ?>
 value="Y"> Yes (default)<br>
			<input type="radio" name="day" <?php 
        if ($this->config['day'] == 'N') {
            echo ' checked ';
        }
        ?>
 value="N"> No 
			</td>
		</tr>

		
		<tr>
			<td  width="20%" bgcolor="#e6f2ea">
				<b>Main Keyword(s)</b></td>
			<td  bgcolor="#e6f2ea"><input size="50" type="text" name="k" value="<?php 
        echo jb_escape_html($this->config['k']);
        ?>
"><br>
			Examples:<br>
			manager<br>
			title(engineering manager)<br>
			title(manager) company(Kaiser)<br>
			(By default terms are AND'ed. For more details visit http://www.simplyhired.com/.)
			</td>
		</tr>
		<tr>
			<td  width="20%" bgcolor="#e6f2ea">
				<b>Main Location</b></td>
			<td  bgcolor="#e6f2ea"><input size="20" type="text" name='l' value="<?php 
        echo jb_escape_html($this->config['l']);
        ?>
"> (Location is optional. e.g. San Jose, CA)
			</td>
		</tr>
		<tr>
			<td  width="20%" bgcolor="#e6f2ea">
				<b>Search Field(s) for Keyword</b></td>
			<td  bgcolor="#e6f2ea">
			<select name="k_tag[]" multiple size="5">
				<!--<option value="">[Select]</option>-->
				<?php 
        echo $this->echo_tt_options($this->config['k_tag']);
        ?>
				</select> (The selected search parameters will be combined and used as the keywords for the search query sent to Indeed. If not selected or no keyword is searched, then it will default to the Main Keyword. Hold down the Ctrl key to select/unselect multiple items)
			</td>
		</tr>
		<tr>
			<td  width="20%" bgcolor="#e6f2ea">
				<b>Search Field(s) for Location</b></td>
			<td  bgcolor="#e6f2ea">
			<select name="l_tag[]" multiple size="5" >
				<!--<option value="">[Select]</option>-->
				<?php 
        echo $this->echo_tt_options($this->config['l_tag']);
        ?>
			</select> (The selected search parameters will be combined and used as the location for the search query sent to Indeed. If not selected or no location is searched, then it will default to the Main Location. Hold down the Ctrl key to select/unselect multiple items)
			</td>
		</tr>
		<tr>
			<td  bgcolor="#e6f2ea" colspan="2"><font face="Verdana" size="1"><input type="submit" value="Save"></td>
		</tr>
		<tr>
			<td  width="20%" bgcolor="#e6f2ea">
				<b>API Key</b></td>
			<td  bgcolor="#e6f2ea"><input size="20" type="text" name='id' value="<?php 
        echo $this->config['id'];
        ?>
"> (Simply Hired publisher ID; For details, please see http://www.simplyhired.com/a/publishers/overview). 
			</td>
		</tr>
		</table>
		
		<h3>Advanced Settings</h3>
		
		<table border="0" cellpadding="5" cellspacing="2" style="border-style:groove;" width="100%" bgcolor="#FFFFFF">
		<tr>
	      <td  bgcolor="#e6f2ea">Use cURL (Y/N)</td>
	      <td  bgcolor="#e6f2ea">
		  <input type="radio" name="curl" value="N"  <?php 
        if ($this->config['curl'] == 'N') {
            echo " checked ";
        }
        ?>
 >No (Normally, this option is the best.)<br>
		  <input type="radio" name="curl" value="Y"  <?php 
        if ($this->config['curl'] == 'Y') {
            echo " checked ";
        }
        ?>
 >Yes - If your hosting company blocked fsockopen() and has cURL, then use this option</td>
	    </tr>
		<tr>
	      <td  bgcolor="#e6f2ea">cURL Proxy URL</td>
	      <td  bgcolor="#e6f2ea">
	      <input type="text" name="proxy" size="50" value="<?php 
        echo $this->config['proxy'];
        ?>
">Leave blank if your server does not need one. Contact your hosting company if you are not sure about which option to use. For GoDaddy it is: http://proxy.shr.secureserver.net:3128<br></td>
	    </tr>
		<tr>
			<td  bgcolor="#e6f2ea" colspan="2"><font face="Verdana" size="1"><input type="submit" value="Save"></td>
		</tr>

		</table>
		<input type="hidden" name="plugin" value="<?php 
        echo $_REQUEST['plugin'];
        ?>
">
		<input type="hidden" name="action" value="save">

		</form>
		<?php 
        if ($this->bug_test()) {
            echo "<p><font color='red'>PHP Bug warning: The system detected that your PHP version has a bug in the XML parser. This is not a bug in the Jamit Job Board, but a bug in 'libxml' that comes built in to PHP itself. An upgrade of PHP with the latest version of 'libxml' with  is recommended. This plugin contains a workaround for this bug - so it should still work...</font> For details about the bug, please see <a href='http://bugs.php.net/bug.php?id=45996'>http://bugs.php.net/bug.php?id=45996</a></p> ";
        }
        // check if fsockopen is disabled
        if (stristr(ini_get('disable_functions'), "fsockopen")) {
            JB_pp_mail_error("<p>fsockopen is disabled on this server. You can try to set this plugin to use cURL instead</p>");
        }
        ?>
		<b>Important:</b> After configuring Go here to <a href="p.php?p=SimplyHiredXML&action=kw">Configure Category Keywords</a>
<p>
TROUBLE SHOOTING
<p>
> Keywords do not return any results?
Try your keyword on simplyhired.com first, before putting them in the job board.
<i>Notice: There are three result styles which can be switched on the form above.</i> 
<p>
> Page times out / does not fetch any results?
Your server must be able to make external connections to api.simplyhired.com
through port 80 (HTTP). This means that fsockopen must be enabled on
your host, and must be allowed to make external connections.
<p>
- I see warning/errors messages saying that 'argument 2' is missing.
This has been reported and can be fixed if you open the include/lists.inc.php
file and locate the following code:
<p>
JBPLUG_do_callback('job_list_data_val', $val, $template_tag);
<p>
and change to:
<p>
JBPLUG_do_callback('job_list_data_val', $val, $template_tag, $a);
<p>
- Can I make the links open in a new window?
<p>
Nope.. SimplyHired rules are that in order to record the click, we must use their 
onmousedown event to call their javascript, and the javascripts 
prevents the link from opening in a new window.
<p>
- It still does not work
<p>
Please check the requirements - requires Jamit Job Board 3.5.0 or higher
Please also check with your hosting company that your server
is allowed to use fsockopen or Curl
		 <?php 
    }
예제 #6
0
function JB_void_membership_invoice($invoice_id)
{
    $invoice_row = JB_get_membership_invoice_row($invoice_id);
    $sql = "UPDATE `membership_invoices` set status='Void' WHERE invoice_id='" . jb_escape_sql($invoice_id) . "' ";
    JB_mysql_query($sql) or JB_pp_mail_error(mysql_error());
}