There is a subscription validation inside the resumes.php under the function default_action():
- Code: Select all
//make sure that they have a subscription, if the site has a subscription billing item
$sql->query("SELECT 0 FROM `jb_billing` WHERE type = ".$sql->escape_string('resume_sub')." LIMIT 1");
if(!$sql->is_empty()){
$sql->query("SELECT 0 FROM `jb_seeker_subscriptions` WHERE uid = $seeker_id LIMIT 1");
if($sql->is_empty()){
$this->load_page('seeker_area');
$application->output['form_html'] = '<center><p class="error"><strong>'.$application->text('no_subscription').'</strong></p>'.$application->text('no_subscription_info').'</center><br><br>';
parent::default_action();
return;
}
}
[*]How can I implement this for job details and remove it from posting resumes? I've done a copy/paste in the function default_action() in the view_job.php file:
- Code: Select all
function display()
{
$application =& application();
$status = $application->clean_cookie('status', 'basename'); // Get value of cookie- either 'seeker' or 'employer'
if($application->show_header()){
if($status == 'seeker'){
// TEST BILLING SCRIPT STARTS HERE COPY AND PASTED FROM RESUMES.PHP
//make sure that they have a subscription, if the site has a subscription billing item
$sql->query("SELECT 0 FROM `jb_billing` WHERE type = ".$sql->escape_string('resume_sub')." LIMIT 1");
if(!$sql->is_empty()){
$sql->query("SELECT 0 FROM `jb_seeker_subscriptions` WHERE uid = $seeker_id LIMIT 1");
if($sql->is_empty()){
$this->load_page('seeker_area');
$application->output['form_html'] = '<center><p class="error"><strong>'.$application->text('no_subscription').'</strong></p>'.$application->text('no_subscription_info').'</center><br><br>';
parent::default_action();
return;
}
// END TEST
$this->load_page('seeker_area');
}
else if($status=='employer'){
$this->load_page('employer_area');
}
else{
$this->load_page('no_login');
}
}
$this->prepare_errors();
parent::display();
} // display
But it error ed out. If anyone knows how to do this, it would be greatly appreciated.
