44 lines
1.4 KiB
PHP
44 lines
1.4 KiB
PHP
<?php
|
|
|
|
defined('BASEPATH') OR exit('No direct script access allowed');
|
|
|
|
class Surveys extends Admin_Controller {
|
|
|
|
public function index() {
|
|
$this->load->helper('url');
|
|
$data = array();
|
|
|
|
$this->load->library('table');
|
|
$this->table->set_template($this->template);
|
|
|
|
}
|
|
|
|
public function onoardsurveys() {
|
|
|
|
$this->load->helper('url');
|
|
$data = array();
|
|
|
|
$this->load->library('table');
|
|
$this->table->set_template($this->template);
|
|
|
|
$data['backoffice_users'] = "";
|
|
$mysql = "SELECT id,group_key,answers_key,status,answers, ' <input type=\"text\" class=\"form-control\" value=\"'||answers||'\">' AS ans1,'<button type=\"button\" onclick=\"viewSubscription('||id||');\" class=\"btn btn-danger\"> Update </button>' AS View FROM onboarding_survey ";
|
|
$query = $this->read_replica->query($mysql);
|
|
// $this->table->set_heading('Country', array('data' => 'View', 'style' => 'width:50px'));
|
|
$data['onboard_survey'] = $this->table->generate($query);
|
|
//print_r( $data );
|
|
|
|
|
|
$this->renderSurveyPage('view_onboardsurvey', $data);
|
|
}
|
|
|
|
|
|
|
|
protected function renderSurveyPage($page_name, $data) {
|
|
$this->load->view('admin/view_admin_header', $data);
|
|
$this->load->view('surveys/' . $page_name, $data);
|
|
$this->load->view('admin/view_admin_footer', $data);
|
|
}
|
|
|
|
}
|