Fix offers list
This commit is contained in:
@@ -32,6 +32,61 @@ class Bkouser extends Bko_Controller {
|
||||
$this->load->view('bko/view_bko_footer', $data);
|
||||
}
|
||||
|
||||
public function offers() {
|
||||
// $this->load->view('bko/view_bko_header', $data);
|
||||
|
||||
$config = $this->PrepPagination(10, 3, '/bkouser/jobs');
|
||||
|
||||
$mysql0 = "SELECT * FROM members_jobs_offer WHERE expire > now() AND status = 1 AND public_view = 0 ";
|
||||
$q = $this->db->query($mysql0);
|
||||
$config["total_rows"] = $q->num_rows();
|
||||
|
||||
$this->load->library('pagination');
|
||||
$this->pagination->initialize($config);
|
||||
$data["pagination_links"] = $this->pagination->create_links();
|
||||
|
||||
$this->load->library('table');
|
||||
$this->table->set_template($this->template);
|
||||
|
||||
$page = ($this->uri->segment(3)) ? $this->uri->segment(3) : 0;
|
||||
$page = is_numeric($page) ? $page : 0;
|
||||
|
||||
$mysql = "SELECT '<b>Added :</b>'||jo.added::date||'<br>'||'<b>Expire :</b>'||jo.expire||'<br><b>Reminder :</b>'||COALESCE( jo.reminder_date::text, '') AS pdate,j.title,jo.email AS Recipient,m.email AS Owner,"
|
||||
. " '<button class=\"btn btn-danger\ id=\"dacc'||jo.offer_code||'\" onclick=\"return resendReminder('''||jo.offer_code||''')\">Resend Alert</button>' "
|
||||
. " FROM members_jobs_offer jo LEFT JOIN members_jobs j ON j.id = jo.job_id "
|
||||
. " LEFT JOIN members m ON m.id=jo.member_id "
|
||||
. " WHERE jo.expire > now() AND jo.status = 1 AND jo.public_view = 0 ";
|
||||
|
||||
// . "AND jo.client_id = " . $_SESSION['member_id'] . " LIMIT $listLimit";
|
||||
|
||||
$query = $this->db->query($mysql);
|
||||
$this->table->function = 'smart_htmlspecialchars';
|
||||
$data['job_list_table'] = $this->table->generate($query);
|
||||
|
||||
|
||||
$data['page_title'] = "Offers List";
|
||||
$this->load->view('bko/view_bko_header', $data);
|
||||
$this->load->view('bko/view_bko_offerslist', $data);
|
||||
$this->load->view('bko/view_bko_footer', $data);
|
||||
}
|
||||
|
||||
public function resendReminder(){
|
||||
$offer_code = trim( $this->input->get('offer_code') );
|
||||
if ( $offer_code !=''){
|
||||
$this->load->model('backend_model');
|
||||
$in = array();
|
||||
$in['offer_code'] = $offer_code;
|
||||
$in['action'] = WRENCHBOARD_BKO_RESEND_OFFER;
|
||||
$out = array();
|
||||
$res = $this->backend_model->wrenchboard_api($in, $out);
|
||||
echo "Resent code ". $offer_code;
|
||||
|
||||
}
|
||||
else{
|
||||
echo 'Not Sent';
|
||||
}
|
||||
}
|
||||
|
||||
public function jobs() {
|
||||
// $this->load->view('bko/view_bko_header', $data);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user