diff --git a/www/application/controllers/Member.php b/www/application/controllers/Member.php index acad6dbd..7d2cbd85 100644 --- a/www/application/controllers/Member.php +++ b/www/application/controllers/Member.php @@ -957,20 +957,21 @@ class Member extends Users_Controller { $data = $this->getSessionArray(); $this->load->library('table'); $this->table->set_template($this->template); - $mysql = "SELECT added::date AS msg_date,msg,id AS msg_id FROM members_messages WHERE member_id = " . $_SESSION['member_id'] . " AND reply IS NULL ORDER BY id DESC LIMIT 20"; + $mysql = "SELECT added::date AS msg_date,msg,id AS msg_id + FROM members_messages + WHERE member_id = " . $_SESSION['member_id'] . " AND reply IS NULL + ORDER BY id DESC LIMIT 20"; $query = $this->db->query($mysql); - $myTable = ""; + $myTable = "
"; foreach ($query->result_array() as $row) { $myTable .= $this->mesageTableRow($row); } $myTable .="
"; - $data['page_title'] ="Messages"; - //$this->table->set_heading(array('data' => 'Date', 'style' => 'width:110px'), 'Message'); - $data['message_table'] = $myTable; //$this->table->generate($query); + $data['message_table'] = $myTable; $this->RenderUserPage('users/view_message', $data); } @@ -1003,7 +1004,7 @@ class Member extends Users_Controller { if ($num > 0) { $row = $query->row_array(); - $myTable = ""; + $myTable = "
"; $myTable .= $this->makeMesageDetailTableRow($row); $myTable .="
"; } @@ -1025,15 +1026,16 @@ class Member extends Users_Controller { public function replymessage() { $data = $this->getSessionArray(); //url: "/member/replymessage?proc=REPLYMSG&message_code=" + message_code + "&message_id="+message_id+"&yourmessage=" + document.job_message.yourmessage.value - $data["message_id"] = $this->input->get('message_id'); - $data["memo"] = trim($this->input->get('message_code')); - $data["yourmessage"] = trim($this->input->get('yourmessage')); + $in = []; + $in["message_id"] = $this->input->get('message_id'); + $in["memo"] = trim($this->input->get('message_code')); + $in["yourmessage"] = trim($this->input->get('yourmessage')); - if ($data["message_id"] > 0 && $data["memo"] != '' && $data["yourmessage"] != '') { - $data['action'] = WRENCHBOARD_JOB_REPLY_QUESTION; + if ($in["message_id"] > 0 && $in["memo"] != '' && $in["yourmessage"] != '') { + $in['action'] = WRENCHBOARD_JOB_REPLY_QUESTION; $this->load->model('backend_model'); $out = array(); - $res = $this->wrenchboard_api($data, $out); + $res = $this->wrenchboard_api($in, $out); if ($res == PHP_API_OK) { echo 'Replied...'; } diff --git a/www/application/controllers/Refer.php b/www/application/controllers/Refer.php index d97f270b..ae191d0c 100644 --- a/www/application/controllers/Refer.php +++ b/www/application/controllers/Refer.php @@ -27,16 +27,21 @@ class Refer extends Users_Controller { $ref_firstname = $this->input->post('ref_firstname'); $ref_lastname = $this->input->post('ref_lastname'); $ref_email = $this->input->post('ref_email'); - $data['ref_firstname'] = $ref_firstname; - $data['ref_lastname'] = $ref_lastname; - $data['ref_email'] = $ref_email; - $data['action'] = WRENCHBOARD_ACCOUNT_SENDREFER; + $in_data=[]; + $in_data['ref_firstname'] = $ref_firstname; + $in_data['ref_lastname'] = $ref_lastname; + $in_data['ref_email'] = $ref_email; + $in_data['member_id'] = $_SESSION['member_id']; + $in_data['action'] = WRENCHBOARD_ACCOUNT_SENDREFER; + + $data['ref_firstname'] = $in_data['ref_firstname']; + $data['ref_lastname'] = $in_data['ref_lastname']; + $data['ref_email'] = $in_data['ref_email']; - // print_r( $data ); $this->load->model('backend_model'); $out = array(); - $res = $this->backend_model->wrenchboard_api($data, $out); + $res = $this->backend_model->wrenchboard_api($in_data, $out); if ($res == PHP_API_OK) { $data['ref_firstname'] = $data['ref_lastname'] = $data['ref_email'] = ""; $data["status"] = 'Success - ' . $out['status']; @@ -63,17 +68,17 @@ class Refer extends Users_Controller { $config['full_tag_open'] = ""; - $config['num_tag_open'] = '
  • '; + $config['num_tag_open'] = '
  • '; $config['num_tag_close'] = '
  • '; - $config['cur_tag_open'] = "
  • "; + $config['cur_tag_open'] = "
  • "; $config['cur_tag_close'] = "
  • "; - $config['next_tag_open'] = "
  • "; + $config['next_tag_open'] = '
  • '; $config['next_tagl_close'] = "
  • "; - $config['prev_tag_open'] = "
  • "; + $config['prev_tag_open'] = '
  • '; $config['prev_tagl_close'] = "
  • "; - $config['first_tag_open'] = "
  • "; + $config['first_tag_open'] = '
  • '; $config['first_tagl_close'] = "
  • "; - $config['last_tag_open'] = "
  • "; + $config['last_tag_open'] = '
  • '; $config['last_tagl_close'] = "
  • "; $this->pagination->initialize($config); diff --git a/www/application/core/WRB_Controller.php b/www/application/core/WRB_Controller.php index 2f33dd1c..aad5bd23 100644 --- a/www/application/core/WRB_Controller.php +++ b/www/application/core/WRB_Controller.php @@ -3,7 +3,7 @@ class WRB_Controller extends CI_Controller { var $template = array( - 'table_open' => "", + 'table_open' => "
    ", 'thead_open' => '', 'thead_close' => '', 'heading_row_start' => '', diff --git a/www/application/views/users/view_refer.php b/www/application/views/users/view_refer.php index 03315c5f..814352b7 100644 --- a/www/application/views/users/view_refer.php +++ b/www/application/views/users/view_refer.php @@ -28,27 +28,42 @@
    -
    - -
    - -
    -
    -
    - -
    - -
    -
    -
    - -
    - + +
    + +
    +
    +
    + +
    +
    -
    - +
    + +
    +
    +
    + +
    +
    +
    +
    + +
    + +
    +
    +
    + +
    +
    +
    +
    + + @@ -94,6 +109,7 @@ +