Example #1
0
 function get_template_value($template_tag, $admin = false)
 {
     if (is_numeric($this->form_id)) {
         // get form the dynamic form
         // php5: JB_get_DynamicFormObject($this->form_id)->get_template_value($template_tag, $admin);
         $obj = JB_get_DynamicFormObject($this->form_id);
         return $obj->get_template_value($template_tag, $admin);
     }
 }
Example #2
0
function JB_expire_post($post_id)
{
    $post_id = (int) $post_id;
    $sql = "UPDATE posts_table SET expired='Y' where post_id='" . jb_escape_sql($post_id) . "' ";
    JB_mysql_query($sql) or $DB_ERROR = mysql_error();
    JBPLUG_do_callback('expire_post', $post_id);
    // col val is post_id
    if (JB_EMAIL_POST_EXP_SWITCH == 'YES') {
        // Send Expiration email
        $Form = JB_get_DynamicFormObject(1);
        $Form->load($post_id);
        $TITLE = $Form->get_raw_template_value("TITLE");
        $DATE = JB_get_formatted_date($Form->get_template_value("DATE"));
        $POSTED_BY_ID = $Form->get_value('user_id');
        // get the employer
        $sql = "SELECT * FROM employers WHERE ID='" . jb_escape_sql($POSTED_BY_ID) . "' ";
        $emp_result = jb_mysql_query($sql);
        $emp_row = mysql_fetch_array($emp_result);
        // get the email template
        $template_result = JB_get_email_template(210, $emp_row['lang']);
        $t_row = mysql_fetch_array($template_result);
        $to_address = $emp_row['Email'];
        $to_name = JB_get_formatted_name($emp_row['FirstName'], $emp_row['LastName']);
        $subject = $t_row['EmailSubject'];
        $message = $t_row['EmailText'];
        $from_name = $t_row['EmailFromName'];
        $from_address = $t_row['EmailFromAddress'];
        $message = str_replace("%LNAME%", $emp_row['LastName'], $message);
        $message = str_replace("%FNAME%", $emp_row['FirstName'], $message);
        $message = str_replace("%SITE_NAME%", JB_SITE_NAME, $message);
        $message = str_replace("%SITE_URL%", JB_BASE_HTTP_PATH, $message);
        $message = str_replace("%SITE_CONTACT_EMAIL%", JB_SITE_CONTACT_EMAIL, $message);
        $message = str_replace("%POST_TITLE%", $TITLE, $message);
        $message = str_replace("%POST_DATE%", $DATE, $message);
        $message = str_replace("%VIEWS%", $Form->get_value('hits'), $message);
        $message = str_replace("%APPS%", $Form->get_value('applications'), $message);
        $message = strip_tags($message);
        // plugin can change the recipient
        JBPLUG_do_callback('expire_post_set_recipient_email', $to_address);
        JBPLUG_do_callback('expire_post_set_recipient_name', $to_name);
        // Place the email on the queue!
        JB_queue_mail($to_address, $to_name, $from_address, $from_name, $subject, $message, '', 210);
    }
}
Example #3
0
 function echo_tt_options($value, $type = '')
 {
     $PForm = JB_get_DynamicFormObject(1);
     $post_tag_to_search = $PForm->get_tag_to_search();
     require_once jb_basedirpath() . "include/posts.inc.php";
     foreach ($post_tag_to_search as $key => $tag) {
         if ($key != '') {
             $sel = "";
             if (is_array($value)) {
                 // multiple selected
                 if (in_array($key, $value)) {
                     $sel = ' selected ';
                 }
             } else {
                 if ($key == $value) {
                     $sel = ' selected ';
                 }
             }
             if ($type != '') {
                 // echo only for the $type
                 if ($tag[$key]['field_type'] == $type) {
                     echo '<option  ' . $sel . ' value="' . $key . '">' . JB_truncate_html_str($tag['field_label'], 50, $foo) . '</option>' . "\n";
                     $output = true;
                 }
             } else {
                 // echo all
                 echo '<option ' . $sel . ' value="' . $key . '">' . JB_truncate_html_str($tag['field_label'], 50, $foo) . '</option>' . "\n";
                 $output = true;
             }
         }
     }
     if ($output == false) {
         echo '<option>[There are no ' . $type . ' fields to select]</option>';
     }
 }
Example #4
0
<?php

###########################################################################
# Copyright Jamit Software 2012, http://www.jamit.com
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at http://mozilla.org/MPL/2.0/.
###########################################################################
require "../config.php";
include 'login_functions.php';
JB_process_login();
include "../include/profiles.inc.php";
JB_template_employers_header();
JB_render_box_top(99, $label['employer_vprofile_title']);
$ProfileForm =& JB_get_DynamicFormObject(3);
$row = $ProfileForm->load(false, $_SESSION['JB_ID']);
if ($row['profile_id'] != '') {
    // can we display the profile?
    $ProfileForm->load(false, $_SESSION["JB_ID"]);
    $ProfileForm->display_form('view', false);
} else {
    /*
    The employer does not yet have a profile, show a note
    	  and a link to the edit profile page.
    */
    ?>

<h3><?php 
    echo $label["employer_vprofile_noprof"];
    ?>
</h3>
Example #5
0
<?php

###########################################################################
# Copyright Jamit Software 2012, http://www.jamit.com
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at http://mozilla.org/MPL/2.0/.
###########################################################################
require "../config.php";
include 'login_functions.php';
require_once '../include/candidates.inc.php';
JB_process_login();
$CandidateForm =& JB_get_DynamicFormObject(5);
$CandidateForm->set_mode('edit');
JB_template_candidates_header();
if ($_REQUEST['load_defaults'] == true) {
    $_REQUEST['user_id'] = $_SESSION['JB_ID'];
    $data = $CandidateForm->load($_SESSION['JB_ID']);
    $_REQUEST = array_merge($_REQUEST, $data);
}
JB_render_box_top(80, $label["seeker_ac_intro"]);
echo $label["seeker_ac_note"];
if ($_REQUEST['form'] != "") {
    // saving
    $admin = false;
    $errors = $CandidateForm->validate();
    if ($_REQUEST['user_id'] != $_SESSION['JB_ID'] || $errors) {
        $JBMarkup->error_msg($label['employer_save_error']);
        echo "<p>";
        echo $CandidateForm->get_error_msg();
        echo "</p>";
Example #6
0
 function output($admin = false)
 {
     $mode = 'view';
     $DynamicForm =& JB_get_DynamicFormObject(2);
     $DynamicForm->display_form($mode, $admin);
 }
Example #7
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 
    }
Example #8
0
 $EmailMessage = $e_row['EmailText'];
 $from = $e_row['EmailFromAddress'];
 $from_name = $e_row['EmailFromName'];
 $subject = $e_row['EmailSubject'];
 $resume_alert_line = $e_row['sub_template'];
 ################################################################################
 # Build resume list for each user.
 # Text email
 # Use jb_get_raw_template_value()
 # and then call strip_tags()
 ###
 if ($resume_alert_line != '') {
     // the new way of building the resume lines
     $resume_alert_list_text = '';
     mysql_data_seek($result2, 0);
     $RForm =& JB_get_DynamicFormObject(2);
     $RForm->set_viewer($user_row['ID']);
     while ($resume_row = mysql_fetch_array($result2, MYSQL_ASSOC)) {
         $RForm->set_values($resume_row);
         //
         $temp_text = $resume_alert_line;
         // copy the template
         //$val = substr(md5 ($resume_row['resume_id'].$user_row['Password'].$user_row['ID']), 0,10);
         $resume_db_link = JB_BASE_HTTP_PATH . JB_EMPLOYER_FOLDER . "search.php?resume_id=" . $resume_row['resume_id'];
         //."&id=".$user_row['ID']."&key=$val";
         $temp_text = str_replace('%RESUME_DB_LINK%', $resume_db_link, $temp_text);
         // load in legacy values
         $DATE = $RForm->get_template_value('DATE');
         $FORMATTED_DATE = JB_get_formatted_date($DATE);
         $temp_text = str_replace("%FORMATTED_DATE%", $FORMATTED_DATE, $temp_text);
         $temp_text = str_replace("%DATE%", $FORMATTED_DATE, $temp_text);
Example #9
0
function JB_insert_resume_data()
{
    if (func_num_args() > 0) {
        $admin = func_get_arg(0);
        // admin mode.
    }
    $list_on_web = 'Y';
    $_REQUEST['anon'] = jb_alpha_numeric($_REQUEST['anon']);
    $status = "ACT";
    $approved = 'Y';
    if ($admin == true) {
        $sql = "select user_id from `resumes_table` WHERE resume_id='" . jb_escape_sql($_REQUEST['resume_id']) . "'";
        $result = JB_mysql_query($sql) or die(mysql_error());
        $row = @mysql_fetch_array($result, MYSQL_ASSOC);
        $user_id = $row['user_id'];
    } else {
        $user_id = (int) $_SESSION['JB_ID'];
    }
    if (JB_RESUMES_NEED_APPROVAL == 'YES' && !$admin) {
        $approved = 'N';
    }
    if ($_REQUEST['resume_id'] == false) {
        $assign = array('list_on_web' => 'Y', 'resume_date' => gmdate("Y-m-d H:i:s"), 'user_id' => $user_id, 'approved' => $approved, 'anon' => jb_alpha_numeric($_REQUEST['anon']), 'status' => 'ACT', 'expired' => 'N');
        $sql = "REPLACE INTO `resumes_table` ( " . JB_get_sql_insert_fields(2, $assign) . ") VALUES (" . JB_get_sql_insert_values(2, "resumes_table", "resume_id", $resume_id, $user_id, $assign) . ") ";
        // JB_get_sql_insert_values() escapes the sql values
        $action = "Inserted new resume.";
    } else {
        $resume_id = (int) $_REQUEST['resume_id'];
        $now = gmdate("Y-m-d H:i:s");
        $assign = array('resume_date' => gmdate("Y-m-d H:i:s"), 'anon' => jb_alpha_numeric($_REQUEST['anon']), 'approved' => $approved);
        $sql = "UPDATE `resumes_table` SET  " . JB_get_sql_update_values(2, "resumes_table", "resume_id", $_REQUEST['resume_id'], $user_id, $assign) . " WHERE resume_id='" . jb_escape_sql($resume_id) . "' and user_id='" . jb_escape_sql($user_id) . "' ";
        // JB_get_sql_update_values() // escapes the sql values
        //$action = "Updated existing resume";
    }
    JB_mysql_query($sql) or die("[{$sql}]" . mysql_error());
    if ($resume_id == false) {
        $resume_id = JB_mysql_insert_id();
    }
    $RForm =& JB_get_DynamicFormObject(2);
    $data = $RForm->load($resume_id);
    $data['resume_id'] = $resume_id;
    JB_build_resume_count(0);
    JBPLUG_do_callback('insert_resume_data', $data);
    if (JB_EMAIL_ADMIN_RESUPDATE_SWITCH == 'YES') {
        // send notification email to Admin
        $resume_tag_to_field_id =& $RForm->get_tag_to_field_id();
        $RESUME_SUMMARY = $action . "\r\n";
        $sql = "SELECT * from form_lists WHERE form_id=2 ORDER BY sort_order ";
        $result = JB_mysql_query($sql);
        while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) {
            $label = $field_field_label = $resume_tag_to_field_id[$row['template_tag']]['field_label'];
            $RESUME_SUMMARY .= $label . " - " . $RForm->get_raw_template_value($row['template_tag'], $admin) . "\r\n";
        }
        // get the email template
        $template_result = JB_get_email_template(320, 'EN');
        $t_row = mysql_fetch_array($template_result);
        $to_address = JB_SITE_CONTACT_EMAIL;
        $to_name = JB_SITE_NAME;
        $subject = $t_row['EmailSubject'];
        $message = $t_row['EmailText'];
        $from_name = $t_row['EmailFromName'];
        $from_address = $t_row['EmailFromAddress'];
        $subject = str_replace("%SITE_NAME%", JB_SITE_NAME, $subject);
        $message = str_replace("%RESUME_SUMMARY%", $RESUME_SUMMARY, $message);
        $message = str_replace("%ADMIN_LINK%", JB_BASE_HTTP_PATH . "admin/ra.php?resume_id=" . $resume_id . "&key=" . md5($resume_id . JB_ADMIN_PASSWORD), $message);
        $message = str_replace("%SITE_NAME%", JB_SITE_NAME, $message);
        $message = strip_tags($message);
        JB_queue_mail($to_address, $to_name, $from_address, $from_name, $subject, $message, '', 320);
    }
    return $resume_id;
}
Example #10
0
function JB_get_employer_name($user_id)
{
    if (!is_numeric($user_id)) {
        return false;
    }
    global $JBMarkup;
    static $b_name;
    // cache it
    if (isset($b_name[$user_id])) {
        return $b_name[$user_id];
    }
    // return cached value
    // perhaps the employer profile form was already loaded with the data?
    // In that case lets see if we can get the employer name form there...
    $ProfileForm =& JB_get_DynamicFormObject(3);
    if ($ProfileForm->get_value('user_id') == $user_id) {
        // already loaded
        $row['65'] = $ProfileForm->get_template_value('PROFILE_BNAME');
        $row['CompName'] = $ProfileForm->get_value('CompName');
        $row['FirstName'] = $ProfileForm->get_value('FirstName');
        $row['LastName'] = $ProfileForm->get_value('LastName');
    } else {
        $row = $ProfileForm->load(false, $user_id);
        // get be employer id
    }
    if (is_array($row)) {
        if (strlen(trim($row['65'])) > 0) {
            $b_name[$user_id] = $row['65'];
        } elseif (strlen(trim($row['CompName'])) > 0) {
            $b_name[$user_id] = $row['CompName'];
        } else {
            $b_name[$user_id] = JB_get_formatted_name($row['FirstName'], $row['LastName']);
            //
        }
    }
    return $b_name[$user_id];
}
Example #11
0
function JBXM_get_static_data($form_id, &$data, $val, &$feed_row)
{
    if (!preg_match('/%[a-z_]+%/i', $val)) {
        return $val;
        // is not a variable
    }
    $val = str_replace('%SITE_NAME%', JB_SITE_NAME, $val);
    $val = str_replace('%SITE_DESCRIPTION%', JB_SITE_DESCRIPTION, $val);
    $val = str_replace('%SITE_CONTACT_EMAIL%', JB_SITE_CONTACT_EMAIL, $val);
    $val = str_replace('%BASE_HTTP_PATH%', JB_BASE_HTTP_PATH, $val);
    $val = str_replace('%RSS_FEED_LOGO%', JB_RSS_FEED_LOGO, $val);
    $val = str_replace('%FEED_DATE%', date('r'), $val);
    if (file_exists(JB_RSS_FEED_LOGO)) {
        $img_size = getimagesize(JB_RSS_FEED_LOGO);
    }
    $val = str_replace('%RSS_FEED_LOGO%', JB_RSS_FEED_LOGO, $val);
    $val = str_replace('%RSS_LOGO_HEIGHT%', $img_size[1], $val);
    $val = str_replace('%RSS_LOGO_WIDTH%', $img_size[0], $val);
    $val = str_replace('%DEFAULT_LANG%', $_SESSION['LANG'], $val);
    // These depend on the different record types
    // %EXPIRE_DATE%
    // %DATE%
    // %LINK%
    switch ($form_id) {
        case '1':
            // job posts
            $post_time = strtotime($data['post_date'] . " GMT ");
            //$link = JB_BASE_HTTP_PATH.'index.php?post_id='.$data['post_id'];
            //$link = JB_job_post_url($data['post_id'], '', '', '', '', '', JB_BASE_HTTP_PATH);
            $PForm = JB_get_DynamicFormObject(1);
            $PForm->set_values($data);
            $link = JBXM_xmlentities(JB_job_post_url($data['post_id'], null, JB_BASE_HTTP_PATH . 'index.php'));
            $val = str_replace('%LINK%', $link, $val);
            $val = str_replace('%DATE%', date('Y-m-d', $post_time), $val);
            $val = str_replace('%DATE_RFC%', date('r', $post_time), $val);
            $val = str_replace('%DATE_TROVIT%', date('d/m/Y', $post_time), $val);
            # elapsed = now - post_date
            # expires = post_date + DISPLAY DAYS
            if ($data['post_mode'] == 'premium') {
                $display_dur = JB_P_POSTS_DISPLAY_DAYS * 24 * 60 * 60;
            } else {
                $display_dur = JB_POSTS_DISPLAY_DAYS * 24 * 60 * 60;
            }
            $expire_time = $post_time + $display_dur;
            $val = str_replace('%EXPIRE_DATE%', date('Y-m-d', $expire_time), $val);
            $val = str_replace('%RECORD_ID%', $data['post_id'], $val);
            $val = str_replace('%USER_ID%', $data['user_id'], $val);
            break;
        case '2':
            // resumes
            break;
    }
    return $val;
}
Example #12
0
function JB_get_tag_to_field_id($form_id)
{
    //global $tag_to_search; post_tag_to_field_id
    global $post_tag_to_field_id;
    // for compatibility with older plugins
    $DynamicForm =& JB_get_DynamicFormObject($form_id);
    $post_tag_to_field_id = $DynamicForm->get_tag_to_field_id();
    return $post_tag_to_field_id;
}
Example #13
0
$ord = $_REQUEST['ord'];
$offset = (int) $_REQUEST['offset'];
$app_id = (int) $_REQUEST['app_id'];
$resume_id = (int) $_REQUEST['resume_id'];
if ($_REQUEST['show'] != '') {
    $show = $_REQUEST['show'];
    $_SESSION['resume_show'] = $show;
}
if ($_REQUEST['show'] == '') {
    $_REQUEST['show'] = $_SESSION['resume_show'];
}
$show = $_REQUEST['show'];
if ($show == '') {
    $show = 'ALL';
}
$ResumeForm =& JB_get_DynamicFormObject(2);
$ResumeForm->set_mode('edit');
JB_admin_header('Admin -> Resumes');
?>

<div id="overDiv" style="position:absolute; visibility:hidden; z-index:1000; "></div>
<b>[CANDIDATES - RESUMES]</b> <span style="background-color: #F2F2F2; border-style:outset; padding:5px; "><a href="candidates.php">List Candidates</a></span>
<span style="background-color: <?php 
if ($_REQUEST['show'] == 'ALL') {
    echo "#FFFFCC";
} else {
    echo "#F2F2F2";
}
?>
; border-style:outset; padding: 5px;"><a href="resumes.php?show=ALL">View Resumes</a></span>
<?php 
Example #14
0
###########################################################################
# Copyright Jamit Software 2012, http://www.jamit.com
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at http://mozilla.org/MPL/2.0/.
###########################################################################
require '../config.php';
require dirname(__FILE__) . "/admin_common.php";
require_once '../include/category.inc.php';
require_once '../include/posts.inc.php';
if (!isset($_REQUEST['mode'])) {
    $_REQUEST['mode'] = 'VIEW';
}
$mode = $_REQUEST['mode'];
$PostingForm =& JB_get_DynamicFormObject(1);
$PostingForm->set_mode($mode);
JB_admin_header('Admin -> Posting Form');
?>
<div id="overDiv" style="position:absolute; visibility:hidden; z-index:1000; "></div>
<b>[Posting Form]</b><span style="background-color: <?php 
if ($_REQUEST['mode'] != 'EDIT') {
    echo "#FFFFCC";
}
?>
; border-style:outset; padding: 5px;"><a href="postform.php?mode=VIEW">View Form</a></span> <span style="background-color: <?php 
if ($_REQUEST['mode'] == 'EDIT' && $_REQUEST['NEW_FIELD'] == '') {
    echo "#FFFFCC";
}
?>
; border-style:outset; padding: 5px;"><a href="postform.php?mode=EDIT">Edit Fields</a></span> <span style="background-color: <?php 
Example #15
0
function JB_template_application_form($post_id, $app_name, $app_email, $app_subject, $app_letter, $att1, $att2, $att3)
{
    global $label, $error, $JBMarkup;
    // Need to access the job posting data? It has already been loaded
    // in to memory. Here is an example forhow to do it:
    // $DynamicForm = &JB_get_DynamicFormObject(1);
    // print_r($DynamicForm->get_values());
    JBPLUG_do_callback('app_form_before', $A = false);
    $member_ignore_premium = false;
    if (JB_MEMBER_FIELD_SWITCH == 'YES') {
        if (JB_MEMBER_FIELD_IGNORE_PREMIUM == 'YES') {
            // ignore membership only field and allow applications
            $PForm =& JB_get_DynamicFormObject(1);
            if ($PForm->get_value('post_mode') == 'premium') {
                $member_ignore_premium = true;
            }
        }
    }
    // if membership fields are blocked, and if membership billing for candidates is YES
    // and membership not acive
    // (The membership fields are blocked when JB_MEMBER_FIELD_SWITCH=='YES')
    //
    if (!$member_ignore_premium && JB_ONLINE_APP_SIGN_IN == 'YES' && JB_CANDIDATE_MEMBERSHIP_ENABLED == 'YES' && !JB_is_candidate_membership_active($_SESSION['JB_ID'])) {
        $label['app_member_only'] = str_replace('%MEMBERSHIP_URL%', JB_BASE_HTTP_PATH . JB_CANDIDATE_FOLDER . 'membership.php', $label['app_member_only']);
        $JBMarkup->ok_msg($label['app_member_only']);
    } else {
        $app_name = stripslashes($app_name);
        $app_email = stripslashes($app_email);
        $app_subject = stripslashes($app_subject);
        $app_letter = stripslashes($app_letter);
        if (file_exists(JB_THEME_PATH . 'application-form.php')) {
            require JB_THEME_PATH . 'application-form.php';
        } else {
            require JB_DEFAULT_THEME_PATH . 'application-form.php';
        }
    }
    JBPLUG_do_callback('app_form_after', $A = false);
}
Example #16
0
function email_config_form($email_id)
{
    $result = JB_get_email_template($email_id, $_SESSION['LANG']);
    $row = mysql_fetch_array($result, MYSQL_ASSOC);
    if ($row['EmailFromAddress'] == '') {
        $row['EmailFromAddress'] = JB_SITE_CONTACT_EMAIL;
    }
    if ($row['EmailFromName'] == '') {
        $row['EmailFromName'] = JB_SITE_NAME;
    }
    ?>
	<form method="POST" action="<?php 
    echo htmlentities($_SERVER['PHP_SELF']);
    ?>
">
	<input type="hidden" name="EmailID" value="<?php 
    echo $email_id;
    ?>
">

	<table border="0" cellSpacing="1" cellPadding="3" bgColor="#d9d9d9">
	<tr><td bgColor="#eaeaea"><font size="2"><b>From Address:</b></font></td><td bgColor="#ffffff"><input size="40" type="text" name="EmailFromAddress" value="<?php 
    echo JB_escape_html($row['EmailFromAddress']);
    ?>
"></td></tr>
	<tr><td bgColor="#eaeaea"><font size="2"><b>From Name:</b></font></td ><td bgColor="#ffffff"><input size="40" type="text" name="EmailFromName" value="<?php 
    echo JB_escape_html($row['EmailFromName']);
    ?>
"></td></tr>
	<tr><td bgColor="#eaeaea"><font size="2"><b>Subject:</b></font></td><td bgColor="#ffffff"><input size="40" type="text" name="EmailSubject" <?php 
    if ($email_id == 10) {
        echo ' disabled ';
    }
    ?>
 value="<?php 
    echo JB_escape_html($row['EmailSubject']);
    ?>
"> <?php 
    if ($email_id == 10) {
        echo '<b>Note: The subject of this email will be changed to \'app_receipt_subject\' language phrase which is editable via Admin->Languages : Editing/Translation tool. The \'From address\' and \'from name\' of this email will be changed to what ever is given by the applicant!</b>';
    }
    ?>
(<small>Cannot use template tags here)</small></td></tr>
	<tr><td bgColor="#eaeaea"><font size="2"><b>Email Text:</b></font></td><td bgColor="#ffffff"><textarea name="EmailText" rows="20" cols="80"><?php 
    echo JB_escape_html($row['EmailText']);
    ?>
</textarea></td></tr>
	<?php 
    if ($email_id == 8 || $email_id == 7) {
        // job alerts
        ?>
		<tr><td bgColor="#eaeaea"><font size="2"><b>Job list item template:</b></font></td><td bgColor="#ffffff"><b>%JOB_ALERTS%</b> : The following line will be iterated to produce the list of matching jobs in the %JOB_ALERTS% tag<br><textarea name="sub_template" rows="2" cols="80"><?php 
        echo JB_escape_html($row['sub_template']);
        ?>
</textarea><br><font size="2"><b>You can use the following template tags in the field above:</b><br>
		%FORMATTED_DATE% - Formatted date according to the timezone<br>
		%BASE_HTTP_PATH% - Link to the website, eg http://www.example.com/<br>
		<?php 
        require_once "../include/posts.inc.php";
        $PForm =& JB_get_DynamicFormObject(1);
        $PForm->reset_fields();
        while ($field = $PForm->next_field()) {
            if ($field['field_type'] == 'BLANK' || $field['field_type'] == 'SEPERATOR') {
                continue;
            }
            if ($field['template_tag'] != '' && strlen($field['field_label']) > 0) {
                echo "%" . $field['template_tag'] . "% - " . $field['field_label'] . "<br>";
            }
        }
        ?>
		</font>
		</td></tr>
		<?php 
    }
    ?>
	<?php 
    if ($email_id == 5 || $email_id == 6) {
        // resume alerts
        ?>
		<tr><td bgColor="#eaeaea"><font size="2"><b>Resume list item template:</b></font></td><td bgColor="#ffffff"><b>%RESUME_ALERTS%</b> : The following line will be iterated to produce the list of matching resumes in the %RESUME_ALERTS%<br><textarea name="sub_template" rows="2" cols="80"><?php 
        echo JB_escape_html($row['sub_template']);
        ?>
</textarea><br><font size="2">
		<b>You can use the following template tags in the field above:</b><br>
		%FORMATTED_DATE% - Formatted date according to the timezone<br>
		%RESUME_DB_LINK% - Direct link to the resume / resume database for the employer (<span style="color:red; font-weight:bold;">NEW!</span>)<br>
		<?php 
        require_once "../include/resumes.inc.php";
        $RForm =& JB_get_DynamicFormObject(2);
        $RForm->reset_fields();
        while ($field = $RForm->next_field()) {
            if ($field['field_type'] == 'BLANK' || $field['field_type'] == 'SEPERATOR') {
                continue;
            }
            if ($field['template_tag'] != '' && strlen($field['field_label']) > 0) {
                echo "%" . $field['template_tag'] . "% - " . $field['field_type'] . "<br>";
            }
        }
        ?>
		</font>
		</td></tr>
		<?php 
    }
    ?>
	<tr><td bgColor="#eaeaea"></td><td bgColor="#ffffff"><input type="submit" value="Save Template" name="submit"></td></tr>
	</table>
	</form>
	<?php 
}
Example #17
0
function JB_get_list_template_value($field, $val, $admin, $form_id = 1)
{
    $LM =& JB_get_ListMarkupObject($form_id);
    $Form =& JB_get_DynamicFormObject($form_id);
    // it is assumed that this function is called in 'view' mode
    // the viewer id and type is unknown so null is passed
    if ($Form->process_field_restrictions($field, null, null, $admin)) {
        // Its a restricted field, eg anonymous, blocked or member's only
        return $Form->get_value($field['field_id']);
    }
    switch ($field['field_type']) {
        case 'TIME':
            // convert timestamp to local time zone
            // using the raw value stored in the record
            if ($val != '0000-00-00 00:00:00') {
                $val = JB_get_local_time($Form->get_value($field['field_id']) . ' GMT');
            }
            break;
        case 'EDITOR':
            $val = strip_tags($val);
            $val = jb_escape_html($val);
            if (!$admin) {
                $val = JB_email_at_replace($val);
            }
            break;
        case 'IMAGE':
            if (JB_image_thumb_file_exists($Form->get_value($field['field_id']))) {
                $val = $LM->get_img_html($Form->get_value($field['field_id']));
            }
            break;
        case "CURRENCY":
            if ($val > 0) {
                $val = JB_escape_html(JB_format_currency($Form->get_value($field['field_id']), JB_get_default_currency()));
            } else {
                $val = '';
            }
            break;
        case "CATEGORY":
            $val = jb_escape_html(JB_getCatName($Form->get_value($field['field_id'])));
            break;
        case "RADIO":
            $val = jb_escape_html(JB_getCodeDescription($field['field_id'], $Form->get_value($field['field_id'])));
            break;
        case "SELECT":
            $val = jb_escape_html(JB_getCodeDescription($field['field_id'], $Form->get_value($field['field_id'])));
            break;
        case "MSELECT":
        case "CHECK":
            $vals = explode(",", $Form->get_value($field['field_id']));
            $comma = '';
            $str = '';
            if (sizeof($vals) > 0) {
                foreach ($vals as $v) {
                    $str .= $comma . jb_escape_html(JB_getCodeDescription($field['field_id'], $v));
                    $comma = ", ";
                }
            }
            $val = $str;
            break;
        case "DATE":
        case "DATE_CAL":
            if ($val != '0000-00-00 00:00:00') {
                $val = JB_get_local_time($Form->get_value($field['field_id']) . " GMT");
                $val = JB_get_formatted_date($val);
            } else {
                $val = '';
            }
            break;
        case "SKILL_MATRIX":
            $sql = "SELECT name FROM skill_matrix_data where object_id='" . JB_escape_sql($Form->get_value('resume_id')) . "' ";
            $result = JB_mysql_query($sql) or die(mysql_error());
            $val = '';
            $comma = '';
            while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) {
                $val .= $comma . $row['name'];
                $comma = ", ";
            }
            break;
        default:
            // plugins can alter the data in the cell to be
            // be presented on the list in a custom manner
            $args = array('val' => &$val, 'has_changed' => false, 'field' => &$field, 'form_id' => $form_id, 'data' => $Form->get_values());
            JBPLUG_do_callback('get_list_template_value', $args);
            // This hook was added in 3.6, allows plugins to modify the cell data based on $field, eg. $field['field_type'], the plugin should set 'has_changed' to true if the data in 'val' was changed.
            if ($args['has_changed']) {
                // has it changed?
                return $val;
            }
            // if not modified by plugin
            $val = jb_escape_html($val);
            if (!$admin) {
                $val = JB_email_at_replace($val);
            }
    }
    return $val;
}
###########################################################################
# Copyright Jamit Software 2012, http://www.jamit.com
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at http://mozilla.org/MPL/2.0/.
###########################################################################
require '../config.php';
require dirname(__FILE__) . "/admin_common.php";
//require_once ('../include/dynamic_forms.php');
require_once '../include/category.inc.php';
require_once '../include/employers.inc.php';
if (!isset($_REQUEST['mode'])) {
    $_REQUEST['mode'] = 'VIEW';
}
$mode = $_REQUEST['mode'];
$EmployerForm =& JB_get_DynamicFormObject(4);
$EmployerForm->set_mode($mode);
JB_admin_header('Admin -> Employer Signup Form');
?>
<div id="overDiv" style="position:absolute; visibility:hidden; z-index:1000; "></div>
<b>[Employer's Signup Form]</b><span style="background-color: <?php 
if ($_REQUEST['mode'] != 'EDIT') {
    echo "#FFFFCC";
}
?>
; border-style:outset; padding: 5px;"><a href="signup_employer_form.php?mode=VIEW">View Form</a></span> <span style="background-color:  <?php 
if ($_REQUEST['mode'] == 'EDIT' && $_REQUEST['NEW_FIELD'] == '') {
    echo "#FFFFCC";
}
?>
; border-style:outset; padding: 5px;"><a href="signup_employer_form.php?mode=EDIT">Edit Fields</a></span> <span style="background-color: <?php 
Example #19
0
require "../config.php";
include 'login_functions.php';
JB_process_login();
require_once "../include/posts.inc.php";
require_once "../include/category.inc.php";
$show_emp = (int) $_REQUEST['show_emp'];
$post_id = (int) $_REQUEST['post_id'];
if ($post_id > 0) {
    // Load the data for displaying a job post
    $JBPage = new JBJobPage($post_id);
}
JB_template_candidates_header();
JB_display_dynamic_search_form(1);
if ($show_emp) {
    require_once "../include/profiles.inc.php";
    $PrForm =& JB_get_DynamicFormObject(3);
    $PrForm->load(false, $show_emp);
    $company_name = JB_get_employer_company_name($show_emp);
    ?>
	<br><P style="text-align:center"> <a href="<?php 
    echo htmlentities($_SERVER['PHP_SELF']) . "?{$q_string}&amp;offset={$offset}";
    ?>
"><b><?php 
    echo $label['index_employer_jobs'];
    ?>
</b></a> -> <b><?php 
    echo $JBMarkup->escape($company_name);
    ?>
</b></p>

	<?php 
Example #20
0
###########################################################################
# Copyright Jamit Software 2012, http://www.jamit.com
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at http://mozilla.org/MPL/2.0/.
###########################################################################
require "../config.php";
require_once '../include/posts.inc.php';
require_once "../include/category.inc.php";
include 'login_functions.php';
JB_process_login();
JB_template_employers_header();
require_once '../include/resumes.inc.php';
$ALM = JB_get_AppListMarkupObject();
$PForm =& JB_get_DynamicFormObject(1);
$ALM->set_list_mode('EMPLOYER');
$post_id = (int) $_REQUEST['post_id'];
$action = $_REQUEST['action'];
$apps = $_REQUEST['apps'];
if ($_REQUEST['delete']) {
    $employer_id = (int) $_SESSION['JB_ID'];
    for ($i = 0; $i < sizeof($apps); $i++) {
        $sql = "DELETE FROM `applications` WHERE `app_id`='" . jb_escape_sql($apps[$i]) . "' AND `employer_id`='" . jb_escape_sql($employer_id) . "'";
        $result = JB_mysql_query($sql) or die(mysql_error());
    }
    if (sizeof($apps) > 0) {
        $JBMarkup->ok_msg($label['emp_app_deleted']);
    } else {
        $JBMarkup->error_msg($label['emp_app_no_select']);
    }
 function &get_DynamicFormObject()
 {
     $c = null;
     if ($this->context) {
         $c = $this->context;
     }
     // php5: return JB_get_DynamicFormObject($this->form_id, $c)->get_values();
     return JB_get_DynamicFormObject($this->form_id, $c);
 }