コード例 #1
0
ファイル: flows.php プロジェクト: hharrysidhu/OpenVBX
 private function flows()
 {
     $max = $this->input->get_post('max');
     $offset = $this->input->get_post('offset');
     if (empty($max)) {
         $max = $this->flows_per_page;
     }
     $this->template->add_js('assets/j/flows.js');
     $data = $this->init_view_data();
     $flows = VBX_Flow::search(array(), $max, $offset);
     if (empty($flows)) {
         set_banner('flows', $this->load->view('banners/flows-start', array(), true));
     }
     $flows_with_numbers = array();
     foreach ($flows as $flow) {
         $flows_with_numbers[] = array('id' => $flow->id, 'name' => trim($flow->name), 'numbers' => $flow->numbers, 'voice_data' => $flow->data, 'sms_data' => $flow->sms_data);
     }
     $data['items'] = $flows_with_numbers;
     $data['highlighted_flows'] = array($this->session->flashdata('flow-first-save', 0));
     // pagination
     $total_items = VBX_Flow::count();
     $page_config = array('base_url' => site_url('flows/'), 'total_rows' => $total_items, 'per_page' => $max);
     $this->pagination->initialize($page_config);
     $data['pagination'] = CI_Template::literal($this->pagination->create_links());
     $this->respond('Call Flows', 'flows', $data);
 }
コード例 #2
0
ファイル: devices.php プロジェクト: hharrysidhu/OpenVBX
 public function index()
 {
     $this->template->add_js('assets/j/account.js');
     $this->template->add_js('assets/j/devices.js');
     $data = $this->init_view_data();
     $user = VBX_user::get(array('id' => $this->user_id));
     $data['user'] = $user;
     $data['numbers'] = $data['devices'] = $user->devices;
     if (empty($data['devices'])) {
         set_banner('devices', 'Want someone to be able to reach you on your work or cell phone?', 'Add a device below.');
     }
     return $this->respond('', 'devices', $data);
 }
コード例 #3
0
ファイル: flows.php プロジェクト: joshgomez/OpenVBX
 private function flows()
 {
     $this->template->add_js('assets/j/flows.js');
     $data = $this->init_view_data();
     $flows = VBX_Flow::search(array(), 100, 0);
     if (empty($flows)) {
         set_banner('flows', 'Customize what happens when someone calls into your Twilio numbers.', 'Add or modify a flow below.');
     }
     $flows_with_numbers = array();
     foreach ($flows as $flow) {
         $flows_with_numbers[] = array('id' => $flow->id, 'name' => trim($flow->name), 'numbers' => $flow->numbers, 'voice_data' => $flow->data, 'sms_data' => $flow->sms_data);
     }
     $data['items'] = $flows_with_numbers;
     $data['highlighted_flows'] = array($this->session->flashdata('flow-first-save', 0));
     $this->respond('Call Flows', 'flows', $data);
 }
コード例 #4
0
ファイル: devices.php プロジェクト: ryanlarrabure/OpenVBX
 public function index()
 {
     if (!$this->session->userdata('loggedin')) {
         redirect('auth/login');
     }
     $this->template->add_js('assets/j/account.js');
     $this->template->add_js('assets/j/devices.js');
     $data = $this->init_view_data();
     $user = VBX_user::get(array('id' => $this->user_id));
     $data['user'] = $user;
     $numbers = $this->vbx_device->get_by_user($this->user_id);
     $data['numbers'] = $numbers;
     $data['devices'] = $this->vbx_device->get_by_user($this->user_id);
     if (empty($data['devices'])) {
         set_banner('devices', 'Want someone to be able to reach you on your work or cell phone?', 'Add a device below.');
     }
     return $this->respond('', 'devices', $data);
 }