1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85
|
<?php
/**
* Kalkun
* An open source web based SMS Management
*
* @package Kalkun
* @author Kalkun Dev Team
* @license https://spdx.org/licenses/GPL-2.0-or-later.html
* @link https://kalkun.sourceforge.io/
*/
// ------------------------------------------------------------------------
/**
* Soap Class
*
* @package Kalkun
* @subpackage Plugin
* @category Controllers
*/
include_once(APPPATH.'plugins/Plugin_controller.php');
class Soap extends Plugin_controller {
function __construct()
{
parent::__construct();
$this->load->model('soap_model');
}
function index()
{
if ($_POST)
{
if ($this->input->post('editid_remote_access'))
{
$this->soap_model->updateRemoteAccess();
}
else
{
if ($this->input->post('notifiy') === 'on')
{
$i = 0;
}
else
{
$this->soap_model->addRemoteAccess();
}
}
redirect('plugin/soap');
}
$this->load->library('pagination');
$config['base_url'] = site_url().'/plugin/soap';
$config['total_rows'] = $this->soap_model->getRemoteAccess('count');
$config['per_page'] = 10;
//$config['per_page'] = $this->Kalkun_model->getSetting('paging', 'value')->row('value');
$config['cur_tag_open'] = '<span id="current">';
$config['cur_tag_close'] = '</span>';
$config['uri_segment'] = 3;
$this->pagination->initialize($config);
$data['main'] = 'index';
$data['remote_access'] = $this->soap_model->getRemoteAccess('paginate', $config['per_page'], $this->uri->segment(3, 0));
//TODO - GET NOTIFICATION
$data['notification'] = array();
$data['number'] = $this->uri->segment(3, 0) + 1;
$this->load->view('main/layout', $data);
}
function delete_remote_access()
{
if ($_POST)
{
$id = intval($this->input->post('id'));
$this->soap_model->delRemoteAccess($id);
}
}
function delete_notification()
{
// TODO - delete notifiy
}
}
|