我是codeigniter的新手。我正在开发一个工作网站。我搜索工作并找到合适的工作,然后单击工作详细信息时,如果用户已登录,则会出现立即申请按钮,但如果用户未登录,则登录或注册按钮出现。我需要做的是在他们完成该过程后单击登录或注册后,然后他们需要重定向到他们搜索过的同一页面。我怎样才能在 cdeigniter 中做到这一点?
我的工作详情页面是
public function details($slug = NULL)
{
$this->load->model('jobmodel');
$this->load->helper('job');
$slug = $this->uri->segment(3);
$jobID = $this->jobs_model->getJobidFromSlug($slug);
$userID = $this->session->userdata('user_id');
$check = $this->jobs_model->checkAppliedJob($userID, $jobID);
$data['check'] = $check;
// #common head section
$data['site_title'] = 'Job By Country | Neev ';
$data['site_keywords'] = 'job,dubai,hr,portal';
$data['site_description'] = 'Neev Home, Hr Portal, Job ';
$join = 'LEFT JOIN job_industry AS ji ON(ji.id = ejp.job_industry) LEFT JOIN job_country AS jc ON (ejp.country_id = jc.id)
LEFT JOIN job_category AS jcat ON (ejp.job_category = jcat.id)where ejp.slug ="' . $slug . '"';
$jobsDetails = Jobmodel::find(array(
'select' => 'ejp.*,ji.title as industry_type,jc.title as country,jcat.title as category',
'from' => 'employer_job_posting as ejp',
'joins' => $join
));
// echo Jobmodel::connection()->last_query;
// die;
$data['main_content'] = 'jobFulldetails';
$data['jobs'] = $jobsDetails;
$this->load->view($this->jobView, $data);
}