Example #1
0
				<span id="app_form_blank" >
				</span>
				<span id="app_form_tmp" style="display: none">
				 <iframe width="100%" height="380" frameborder="0" MARGINWIDTH="0" MARGINheight="0" VSPACE="0" HSPACE="0"  src="<?php 
                echo JB_BASE_HTTP_PATH . JB_EMPLOYER_FOLDER;
                ?>
email_iframe.php?resume_id=<?php 
                echo $_REQUEST['resume_id'] . "&step=1";
                ?>
"></iframe>
				</span>
			
			<?php 
            }
            if ($REQUEST_FEATURE && $data['anon'] == 'Y') {
                $req_status = JB_is_request_granted($data['user_id'], $_SESSION['JB_ID']);
                if ($req_status === true) {
                    // request granted
                    echo "<Br>" . $label["c_resume_hide_allowed"];
                } elseif ($req_status === false) {
                    // request was made, it is refused or waiting
                    echo "<p class='request_msg_sent_label'>";
                    //echo "<i>".$label["c_resume_hide"]."</i>";
                    echo $label["resume_display_request_sent"];
                    echo "</p>";
                } else {
                    // display a request button
                    ?>
					<p style="text-align:center">
					<i><?php 
                    echo $label["c_resume_hide"];
Example #2
0
 // Here use $PForm to process the field restrictions
 $PForm->set_value('anon', $resume_row['anon']);
 if ($resume_row['anon'] == 'Y') {
     if (JB_ONLINE_APP_REVEAL_PREMIUM == 'YES' && $post_row['post_mode'] == 'premium') {
         $PForm->set_value('anon', 'N');
         // can show anonymous fields
     }
     if (JB_ONLINE_APP_REVEAL_STD == 'YES' && $post_row['post_mode'] != 'premium') {
         $PForm->set_value('anon', 'N');
         // can show anonymous fields
     }
     if (JB_ONLINE_APP_REVEAL_RESUME == 'YES' && $post_row['post_mode'] != 'premium') {
         $PForm->set_value('anon', 'N');
         // can show anonymous fields
     }
     if (JB_is_request_granted($resume_row['user_id'], $_SESSION['JB_ID']) === false) {
         // In this situation, the user sepcifically disallowed the employer
         // form viewing their resume. (When applying for a job, the employer
         // will be automatically allowed to view anonymous fields if any
         // of the above (three) config options are set to YES)
         $PForm->set_value('anon', 'Y');
         // cannot view resumes
     }
 }
 // Here we process the field restrictions for
 // the name and email field.
 // These fields can be anonymous (hidden) and blocked (subscription only)
 // We use the dynamic form object for this task.
 // First we set the data, and the call  process_field_restrictions()
 $PForm->set_value('row2_FormattedName', $candidate_row['FormattedName']);
 $PForm->set_value('row2_Email', $candidate_row['Email']);
Example #3
0
function JB_process_field_restrictions(&$data, &$row, $mode = 'view', $admin = false, $viewer_user_id = false, $viewer_domain = false)
{
    if ($admin) {
        return false;
    }
    // not restricted for admin
    global $label;
    $is_restricted = false;
    if (!$viewer_user_id) {
        if (isset($_SESSION['JB_ID']) && $_SESSION['JB_ID']) {
            $viewer_user_id = $_SESSION['JB_ID'];
        }
    }
    if (!$viewer_domain) {
        if (isset($_SESSION['JB_Domain']) && $_SESSION['JB_Domain']) {
            $viewer_domain = $_SESSION['JB_Domain'];
        }
    }
    $DFM =& JB_get_DynamicFormMarkupObject($mode);
    //  HTML formatting
    // there is no need to restrict fields which are empty
    if (strlen(trim($data[$row['field_id']])) === 0) {
        return false;
    }
    ################################################################
    # Block Anonymous fields
    # These filds can be on the resume only.
    if (JB_RESUME_REQUEST_SWITCH == 'YES') {
        if ($data['anon'] == 'Y' && $mode == 'view' && $viewer_domain == 'EMPLOYER') {
            if ($row['is_anon'] == 'Y' && JB_is_request_granted($data['user_id'], $viewer_user_id) !== true) {
                // replace with a 'this field is anonymous' note
                if ($row['field_type'] == 'IMAGE') {
                    $data[$row['field_id']] = $DFM->get_image_anonymous_note($data['user_id']);
                } else {
                    $data[$row['field_id']] = $DFM->get_anonymous_note($data['user_id']);
                }
                $is_restricted = true;
                //return true;
            }
        }
    }
    #########################
    # Block Blocked fields
    # This is for the resume only, for the logged in employer
    if (JB_FIELD_BLOCK_SWITCH == 'YES' && $row['is_blocked'] == 'Y') {
        global $key_test_passed;
        if ($mode == 'view' && $viewer_domain == 'EMPLOYER' && !$key_test_passed) {
            $subscr_block_status = JB_get_employer_view_block_status($viewer_user_id);
            if ($subscr_block_status == 'N') {
                // replace with a 'this field is blocked' note
                $data[$row['field_id']] = $DFM->get_blocked_note($data['user_id']);
                $is_restricted = true;
                //return true;
            }
        }
    }
    #########################
    # fields that are marked "Member's Only"
    if (JB_MEMBER_FIELD_SWITCH == 'YES') {
        $member_view_status = JB_get_member_view_status($viewer_user_id, $viewer_domain);
        if ($row['is_member'] == 'Y' && $member_view_status == 'N') {
            if ($data['post_mode'] == 'premium' && JB_MEMBER_FIELD_IGNORE_PREMIUM == 'YES') {
                // ignore for premium posts
            } else {
                $data[$row['field_id']] = $DFM->get_membership_note();
                $is_restricted = true;
            }
        }
    }
    # For plugin authors: You can block / restrict your own fields by using a plugin
    # See the comments at the top of this function for a description of the parameters.
    #
    # The idea is that your plugin would modify the apropriate $data[$field_id] values with the
    # blocked message instead of the field data, depending on the settings in $row, $mode and $admin
    $original_value = $data[$row['field_id']];
    // store the original value to compare after return from the plugin
    JBPLUG_do_callback('process_field_restrictions', $data, $row, $mode, $admin);
    if (strcmp($original_value, $data[$row['field_id']]) !== 0) {
        $is_restricted = true;
        //return true; // return true if the value was changed (changed by a plugin in this case)
    }
    return $is_restricted;
}