fix
This commit is contained in:
@@ -142,18 +142,9 @@ class Proj extends Users_Controller {
|
||||
redirect(home);
|
||||
} else {
|
||||
|
||||
/* $data['username'] = $_SESSION['username']; // = $this->input->post('username');
|
||||
$data['name'] = $_SESSION['name']; // = $this->input->post('username');
|
||||
$data['firstname'] = $_SESSION['firstname']; // = $ret->firstname;
|
||||
$data['lastname'] = $_SESSION['lastname']; // = $ret->lastname;
|
||||
$data['email'] = $_SESSION['email']; // = $ret->email;
|
||||
$data['member_id'] = $_SESSION['member_id']; // = $ret->email; */
|
||||
|
||||
$data = $this->getSessionArray();
|
||||
|
||||
|
||||
$this->load->library('table');
|
||||
|
||||
$this->table->set_template($this->template);
|
||||
|
||||
$jbx = "''/proj/thisjob''";
|
||||
@@ -169,28 +160,8 @@ class Proj extends Users_Controller {
|
||||
. " AND mc.status IN (1,2,4) ";
|
||||
|
||||
$this->load->library('pagination');
|
||||
$config = array();
|
||||
$query = $this->db->query($mysql);
|
||||
$config["total_rows"] = $query->num_rows();
|
||||
$config["base_url"] = base_url() . "/proj/active";
|
||||
$config["per_page"] = 5;
|
||||
$config["uri_segment"] = 3;
|
||||
$config["num_links"] = 5;
|
||||
|
||||
$config['full_tag_open'] = "<ul class='pagination' style='font-size: 14px; padding-left: 5px; padding-right: 5px'>";
|
||||
$config['full_tag_close'] = "</ul>";
|
||||
$config['num_tag_open'] = '<li>';
|
||||
$config['num_tag_close'] = '</li>';
|
||||
$config['cur_tag_open'] = "<li class='disabled'><li class='active'><a href='#'>";
|
||||
$config['cur_tag_close'] = "<span class='sr-only'></span></a></li>";
|
||||
$config['next_tag_open'] = "<li>";
|
||||
$config['next_tagl_close'] = "</li>";
|
||||
$config['prev_tag_open'] = "<li>";
|
||||
$config['prev_tagl_close'] = "</li>";
|
||||
$config['first_tag_open'] = "<li>";
|
||||
$config['first_tagl_close'] = "</li>";
|
||||
$config['last_tag_open'] = "<li>";
|
||||
$config['last_tagl_close'] = "</li>";
|
||||
$config =$this->paginationConfig(3,5,$query->num_rows(),"/proj/active",5);
|
||||
|
||||
$this->pagination->initialize($config);
|
||||
|
||||
@@ -198,17 +169,7 @@ class Proj extends Users_Controller {
|
||||
|
||||
$page = is_numeric($page) ? $page : 0;
|
||||
|
||||
|
||||
|
||||
$mysql = "SELECT '<b>ID:</b>'||mc.contract||'<br><b>Timeline:</b>'||mc.timeline_days||' day(s)<br><b>Price:</b>'||mc.price*0.01 AS Project,"
|
||||
. " '<b>Title: </b>'||mc.title||'<br><b>Description: </b>'||mc.description AS description,"
|
||||
. " (CASE WHEN mc.status=4 THEN '<input type=submit onclick=\"return post_nav_find_action($jbx, '||mc.id||')\" name=\"manage\" class=\"btn btn-info btn-xs btn-block\" value=\"Review\">' "
|
||||
. " WHEN mc.status = 1 AND mc.delivery_date > now() THEN '<input type=submit onclick=\"return post_nav_find_action($jbx, '||mc.id||')\" name=\"manage\" class=\"btn btn-success btn-xs btn-block\" value=\"View\">' "
|
||||
. " WHEN mc.status = 1 AND mc.delivery_date <now() THEN '<input type=submit onclick=\"return post_nav_find_action($jbx, '||mc.id||')\" name=\"manage\" class=\"btn btn-warning btn-xs btn-block\" value=\"Past Due\">' "
|
||||
. "ELSE '<input type=submit onclick=\"return post_nav_find_action($jbx, '||mc.id||')\" name=\"manage\" class=\"btn btn-info btn-xs btn-block\" value=\"View\">' END) AS manage "
|
||||
. " FROM members_jobs_contract mc LEFT JOIN members m ON m.id=mc.client_id WHERE mc.member_id = " . $_SESSION['member_id'] . " AND mc.status IN (1,2,4) OR mc.client_id =" . $_SESSION['member_id'] . " AND mc.status IN (1,2,4) LIMIT " . $config["per_page"] . " OFFSET " . $page;
|
||||
|
||||
$mysql = "SELECT '<b>ID:</b><a href=\"#\" onclick=\"showJobModal('''||mc.contract||''');\" >'||mc.contract||'</a><br>'||mc.timeline_days||' day(s)<br><b>Price:</b>'||mc.price*0.01 AS Project,"
|
||||
$mysql = "SELECT '<b>ID:</b><a href=\"#\" onclick=\"showJobModal('''||mc.contract||''');\" >'||mc.contract||'</a><br>'||mc.timeline_days||' day(s)<br><b>Price:</b>'||mc.price*0.01 AS Project,"
|
||||
. " '<b>Title: </b>'||mc.title||'<br><b>Description: </b>'||mc.description AS description,"
|
||||
. " (CASE WHEN mc.status=4 THEN '<input type=submit onclick=\"return post_nav_find_action($jbx, '||mc.id||')\" name=\"manage\" class=\"btn btn-info btn-xs btn-block\" value=\"Review\">' "
|
||||
. " WHEN mc.status = 1 AND mc.delivery_date > now() THEN '<input type=submit onclick=\"return post_nav_find_action($jbx, '||mc.id||')\" name=\"manage\" class=\"btn btn-success btn-xs btn-block\" value=\"View\">' "
|
||||
|
||||
@@ -51,8 +51,6 @@ class Refer extends Users_Controller {
|
||||
}
|
||||
|
||||
$this->load->library('pagination');
|
||||
$config = array();
|
||||
|
||||
|
||||
$mysql = "SELECT added::date||'<br>'||firstname||' '||lastname,email as date_name,"
|
||||
. "(CASE WHEN status=1 THEN 'Pending' WHEN status=5 THEN 'Completed' ElSE '' END) As status "
|
||||
@@ -60,31 +58,9 @@ class Refer extends Users_Controller {
|
||||
. "WHERE member_id =" . $_SESSION['member_id'];
|
||||
|
||||
$query = $this->db->query($mysql);
|
||||
$config["total_rows"] = $query->num_rows();
|
||||
$config["base_url"] = base_url() . "/refer/refpage";
|
||||
$config["per_page"] = 5;
|
||||
$config["uri_segment"] = 3;
|
||||
$config["num_links"] = 5;
|
||||
|
||||
$config['full_tag_open'] = "<ul class='pagination'>";
|
||||
$config['full_tag_close'] = "</ul>";
|
||||
$config['num_tag_open'] = '<li class="page-item">';
|
||||
$config['num_tag_close'] = '</li>';
|
||||
$config['cur_tag_open'] = "<li class='page-item active'><a href='#'>";
|
||||
$config['cur_tag_close'] = "<span class='sr-only'></span></a></li>";
|
||||
$config['next_tag_open'] = '<li class="page-item">';
|
||||
$config['next_tagl_close'] = "</li>";
|
||||
$config['prev_tag_open'] = '<li class="page-item">';
|
||||
$config['prev_tagl_close'] = "</li>";
|
||||
$config['first_tag_open'] = '<li class="page-item">';
|
||||
$config['first_tagl_close'] = "</li>";
|
||||
$config['last_tag_open'] = '<li class="page-item">';
|
||||
$config['last_tagl_close'] = "</li>";
|
||||
|
||||
$config =$this->paginationConfig(3,5,$query->num_rows(),"/refer/refpage",5);
|
||||
$this->pagination->initialize($config);
|
||||
|
||||
$page = ($this->uri->segment(3)) ? $this->uri->segment(3) : 0;
|
||||
|
||||
$page = is_numeric($page) ? $page : 0;
|
||||
|
||||
$mysql = "SELECT added::date||'<br>'||firstname||' '||lastname,email as date_name,"
|
||||
@@ -96,18 +72,11 @@ class Refer extends Users_Controller {
|
||||
$this->load->library('table');
|
||||
$this->table->set_template($this->template);
|
||||
$data["links"] = $this->pagination->create_links();
|
||||
|
||||
$this->table->set_heading(array('data' => 'Added/Name', 'style' => 'width:170px'), 'Email', array('data' => 'Status', 'style' => 'width:80px'));
|
||||
|
||||
$data['refer_table'] = $this->table->generate($query);
|
||||
$data['refer_table_result'] =$query->result();
|
||||
|
||||
$data['page_title'] ="Refer a Friend";
|
||||
/*
|
||||
$this->load->view('users/view_header_user', $data);
|
||||
$this->load->view('users/view_refer', $data);
|
||||
$this->load->view('users/view_footer_user', $data);
|
||||
*/
|
||||
$this->RenderUserPage('users/view_refer', $data);
|
||||
}
|
||||
|
||||
|
||||
@@ -22,6 +22,9 @@ class WRB_Controller extends CI_Controller {
|
||||
'cell_alt_end' => '</td>',
|
||||
'table_close' => '</table>'
|
||||
);
|
||||
|
||||
|
||||
|
||||
var $template_nohead = array(
|
||||
'table_open' => "<table class='table table-striped table-hover table-bordered table-condensed'>",
|
||||
'thead_open' => '<thead>',
|
||||
@@ -50,6 +53,31 @@ class WRB_Controller extends CI_Controller {
|
||||
$this->load->library(array('session', 'lib_login'));
|
||||
}
|
||||
|
||||
public function paginationConfig($urlSeg,$perPage,$numRows,$linkPath,$numLnk){
|
||||
$config = array();
|
||||
$config["total_rows"] =$numRows;
|
||||
$config["base_url"] = base_url() . $linkPath;
|
||||
$config["per_page"] = $perPage;
|
||||
$config["uri_segment"] = $urlSeg;
|
||||
$config["num_links"] = $numLnk;
|
||||
|
||||
$config['full_tag_open'] = "<ul class='pagination'>";
|
||||
$config['full_tag_close'] = "</ul>";
|
||||
$config['num_tag_open'] = '<li class="page-item">';
|
||||
$config['num_tag_close'] = '</li>';
|
||||
$config['cur_tag_open'] = "<li class='page-item active'><a href='#'>";
|
||||
$config['cur_tag_close'] = "<span class='sr-only'></span></a></li>";
|
||||
$config['next_tag_open'] = '<li class="page-item">';
|
||||
$config['next_tagl_close'] = "</li>";
|
||||
$config['prev_tag_open'] = '<li class="page-item">';
|
||||
$config['prev_tagl_close'] = "</li>";
|
||||
$config['first_tag_open'] = '<li class="page-item">';
|
||||
$config['first_tagl_close'] = "</li>";
|
||||
$config['last_tag_open'] = '<li class="page-item">';
|
||||
$config['last_tagl_close'] = "</li>";
|
||||
return $config;
|
||||
}
|
||||
|
||||
public function wrenchboard_api($in, $out) {
|
||||
$this->load->model('backend_model');
|
||||
// $out = array();
|
||||
|
||||
Reference in New Issue
Block a user