Esempio n. 1
0
 $result = JB_mysql_query($sql) or die(mysql_error());
 $row = mysql_fetch_array($result, MYSQL_ASSOC);
 if ($row['app_id'] != '') {
     echo $label["app_already_applied"] . "<br>";
 } else {
     // increment the application count
     $sql = "UPDATE `posts_table` SET `applications`=`applications`+1 WHERE `post_id`='" . jb_escape_sql($post_id) . "' ";
     JB_mysql_query($sql) or die(mysql_error());
 }
 // load the users' resume (if one exists)
 $sql = "SELECT resume_id FROM resumes_table WHERE user_id='" . jb_escape_sql($_SESSION['JB_ID']) . "'";
 $resume_result = JB_mysql_query($sql) or die(mysql_error());
 $resume_row = mysql_fetch_array($resume_result, MYSQL_ASSOC);
 if ($resume_row['resume_id'] != '') {
     require_once dirname(__FILE__) . "/include/resumes.inc.php";
     $resume_data = JB_load_resume_data($resume_row['resume_id']);
 }
 if ($data['post_mode'] != 'premium') {
     // standard post?
     if (JB_ONLINE_APP_REVEAL_STD == 'YES' && $resume_data['anon'] == 'Y') {
         // reveal candidate's resume, even if hidden?
         JB_grant_request($resume_data['user_id'], $data['user_id']);
     }
 } elseif ($data['post_mode'] == 'premium') {
     // premium posts?
     if (JB_ONLINE_APP_REVEAL_PREMIUM == 'YES' && $resume_data['anon'] == 'Y') {
         // reveal candidate's resume, even if hidden?
         JB_grant_request($resume_data['user_id'], $data['user_id']);
     }
 }
 // redirect the user to a custom URL
Esempio n. 2
0
 function &load($record_id, $user_id = '')
 {
     switch ($this->form_id) {
         case 1:
             // include/posts.inc.php
             $this->set_values(JB_load_post_data($record_id));
             break;
         case 2:
             // include/resumes.inc.php
             $this->set_values(JB_load_resume_data($record_id));
             break;
         case 3:
             // include/profiles.inc.php
             $this->set_values(JB_load_profile_data($record_id, $user_id));
             break;
         case 4:
             // include/employers.inc.php
             $this->set_values(JB_load_employer_data($record_id));
             break;
         case 5:
             // include/candidates.inc.php
             $this->set_values(JB_load_candidate_data($record_id));
             break;
         default:
             $values = null;
             JBPLUG_do_callback('load_values', $values, $this->form_id, $record_id);
             if (is_array($values)) {
                 $this->set_values($values);
             }
             break;
     }
     // now that the fields are initialized and loaded, we can append
     // extra tags to the <head> and <body> sections as needed
     // Tgas will be appended only if JBMarkup is not null
     $this->append_extra_markup();
     return $this->get_values();
 }