@@ -26,111 +26,111 @@ |
||
26 | 26 | |
27 | 27 | class Opensips_form { |
28 | 28 | |
29 | - function __construct() { |
|
30 | - $this->CI = & get_instance(); |
|
31 | - } |
|
32 | - |
|
33 | - function get_opensips_form_fields($id = false) { |
|
34 | - $accountinfo = $this->CI->session->userdata("accountinfo"); |
|
35 | - |
|
36 | - $uname_user = $this->CI->common->find_uniq_rendno('10', '', ''); |
|
37 | - $password = $this->CI->common->generate_password(); |
|
38 | - $val = $id > 0 ? 'subscriber.username.' . $id : 'subscriber.username'; |
|
39 | - |
|
40 | - // echo '<pre>'; print_r($val); exit; |
|
41 | - $loginid = $this->CI->session->userdata('logintype') == 2 ? 0 : $accountinfo['id']; |
|
42 | - $form['forms'] = array(base_url() . 'opensips/opensips_save/', array("id" => "opensips_form", "name" => "opensips_form")); |
|
43 | - $form['Opensips Device'] = array( |
|
44 | - array('', 'HIDDEN', array('name' => 'id'), '', '', '', ''), |
|
45 | - array('Username', 'INPUT', array('name' => 'username', 'size' => '30', 'value' => $uname_user, 'id' => 'username', 'class' => "text field medium"), 'trim|required|xss_clean', 'tOOL TIP', 'Please Enter account number', '<i style="cursor:pointer; font-size: 17px; padding-left:10px; padding-top:6px;" title="Reset Password" class="change_number fa fa-refresh"></i>'), |
|
46 | - array('Password', 'INPUT', array('name' => 'password', 'size' => '30', 'value' => $password, 'id' => 'password', 'class' => "text field medium"), 'trim|required|xss_clean', 'tOOL TIP', 'Please Enter Password', '<i style="cursor:pointer; font-size: 17px; padding-left:10px; padding-top:6px;" title="Reset Password" class="change_pass fa fa-refresh"></i>'), |
|
47 | - array('Account', 'accountcode', 'SELECT', '', '', 'tOOL TIP', 'Please Enter account number', 'number', 'number', 'accounts', 'build_dropdown', 'where_arr', array("reseller_id" => $loginid, "type" => "GLOBAL", "deleted" => "0")), |
|
48 | - array('Domain', 'INPUT', array('name' => 'domain', 'size' => '20', 'class' => "text field medium"), '', 'tOOL TIP', ''), |
|
49 | - array('Caller Name', 'INPUT', array('name' => 'effective_caller_id_name', 'size' => '20', 'class' => "text field medium"), '', 'tOOL TIP', 'Please Enter account number'), |
|
50 | - array('Caller Number', 'INPUT', array('name' => 'effective_caller_id_number', 'size' => '20', 'class' => "text field medium"), '', 'tOOL TIP', 'Please Enter account number'), |
|
51 | - array('Status', 'status', 'SELECT', '', '', 'tOOL TIP', 'Please Select Status', '', '', '', 'set_status'), |
|
52 | - ); |
|
53 | - $form['button_save'] = array('name' => 'action', 'content' => 'Save', 'value' => 'save', 'type' => 'button', 'id' => 'submit', 'class' => 'btn btn-line-parrot'); |
|
54 | - $form['button_cancel'] = array('name' => 'action', 'content' => 'Close', 'value' => 'cancel', 'type' => 'button', 'class' => 'btn btn-line-sky margin-x-10', 'onclick' => 'return redirect_page(\'NULL\')'); |
|
55 | - // echo '<pre>'; print_r($form); exit; |
|
56 | - return $form; |
|
57 | - } |
|
58 | - |
|
59 | - function get_dispatcher_form_fields() { |
|
60 | - |
|
61 | - $form['forms'] = array(base_url() . 'opensips/dispatcher_save/', array("id" => "opensips_dispatcher_form", "name" => "opensips_dispatcher_form")); |
|
62 | - $form['Dispatcher Information'] = array( |
|
63 | - array('', 'HIDDEN', array('name' => 'id'), '', '', '', ''), |
|
64 | - array('Setid', 'INPUT', array('name' => 'setid', 'size' => '20', 'class' => "text field medium"), '', 'tOOL TIP', ''), |
|
65 | - array('Destination', 'INPUT', array('name' => 'destination', 'size' => '20', 'class' => "text field medium"), 'trim|required', 'tOOL TIP', ''), |
|
66 | - array('Weight', 'INPUT', array('name' => 'weight', 'size' => '20', 'class' => "text field medium"), '', 'tOOL TIP', ''), |
|
67 | - array('Attrs', 'INPUT', array('name' => 'attrs', 'size' => '20', 'class' => "text field medium"), '', 'tOOL TIP', ''), |
|
68 | - array('Description', 'INPUT', array('name' => 'description', 'size' => '100', 'class' => "text field medium"), '', 'tOOL TIP', ''), |
|
69 | - ); |
|
70 | - $form['button_save'] = array('name' => 'action', 'content' => 'Save', 'value' => 'save', 'type' => 'button', 'id' => 'submit', 'class' => 'btn btn-line-parrot'); |
|
71 | - $form['button_cancel'] = array('name' => 'action', 'content' => 'Close', 'value' => 'cancel', 'type' => 'button', 'class' => 'btn btn-line-sky margin-x-10', 'onclick' => 'return redirect_page(\'/opensips/dispatcher_list/\')'); |
|
72 | - return $form; |
|
73 | - } |
|
74 | - |
|
75 | - function get_search_dispatcher_form() { |
|
76 | - $form['forms'] = array("", array('id' => "dispatcher_search")); |
|
77 | - $form['Search'] = array( |
|
78 | - array('Description', 'INPUT', array('name' => 'description[description]', '', 'size' => '20', 'class' => "text field "), '', 'tOOL TIP', '1', 'description[description-string]', '', '', '', 'search_string_type', ''), |
|
79 | - array('', 'HIDDEN', 'ajax_search', '1', '', '', ''), |
|
80 | - array('', 'HIDDEN', 'advance_search', '1', '', '', ''), |
|
81 | - ); |
|
82 | - |
|
83 | - $form['button_search'] = array('name' => 'action', 'id' => "opensipsdispatcher_search_btn", 'content' => 'Search', 'value' => 'save', 'type' => 'button', 'class' => 'btn btn-line-parrot pull-right'); |
|
84 | - $form['button_reset'] = array('name' => 'action', 'id' => "id_reset", 'content' => 'Clear', 'value' => 'cancel', 'type' => 'reset', 'class' => 'btn btn-line-sky pull-right margin-x-10'); |
|
85 | - |
|
86 | - return $form; |
|
87 | - } |
|
88 | - |
|
89 | - function get_search_opensips_form() { |
|
90 | - $form['forms'] = array("", array('id' => "opensips_list_search")); |
|
91 | - $form['Search'] = array( |
|
92 | - array('Username', 'INPUT', array('name' => 'username[username]', '', 'size' => '20', 'class' => "text field "), '', 'tOOL TIP', '1', 'username[username-string]', '', '', '', 'search_string_type', ''), |
|
93 | - array('', 'HIDDEN', 'ajax_search', '1', '', '', ''), |
|
94 | - array('', 'HIDDEN', 'advance_search', '1', '', '', ''), |
|
95 | - ); |
|
96 | - |
|
97 | - $form['button_search'] = array('name' => 'action', 'id' => "opensipsdevice_search_btn", 'content' => 'Search', 'value' => 'save', 'type' => 'button', 'class' => 'btn btn-line-parrot pull-right'); |
|
98 | - $form['button_reset'] = array('name' => 'action', 'id' => "id_reset", 'content' => 'Clear', 'value' => 'cancel', 'type' => 'reset', 'class' => 'btn btn-line-sky pull-right margin-x-10'); |
|
99 | - |
|
100 | - return $form; |
|
101 | - } |
|
102 | - |
|
103 | - function build_opensips_list() { |
|
104 | - // array(display name, width, db_field_parent_table,feidname, db_field_child_table,function name); |
|
105 | - $grid_field_arr = json_encode(array( |
|
106 | - array("Username", "150", "username", "", "", "","","true","center"), |
|
107 | - array("Password", "150", "password", "", "", "","","true","center"), |
|
108 | - array("Account", "150", "accountcode", "", "", "","","true","center"), |
|
109 | - array("Domain", "317", "domain", "", "", "","","true","center"), |
|
110 | - array("Caller Name", "200", "effective_caller_id_name", "", "", "","","true","center"), |
|
111 | - array("Caller Number", "200", "effective_caller_id_number", "", "", "","","true","center"), |
|
112 | - array(gettext("Action"), "100", "", "", "", array("EDIT" => array("url" => "/opensips/opensips_edit/", "mode" => "popup"), |
|
113 | - "DELETE" => array("url" => "/opensips/opensips_remove/", "mode" => "single"))) |
|
114 | - )); |
|
115 | - return $grid_field_arr; |
|
116 | - } |
|
117 | - |
|
118 | - function build_opensipsdispatcher_list() { |
|
119 | - // array(display name, width, db_field_parent_table,feidname, db_field_child_table,function name); |
|
120 | - $grid_field_arr = json_encode(array( |
|
121 | - array("Set Id", "160", "setid", "", "", "","","true","center"), |
|
122 | - array("Destination", "160", "destination", "", "", "","","true","center"), |
|
123 | - array("Weight", "190", "weight", "", "", "","","true","center"), |
|
124 | - array("Attrs", "180", "attrs", "", "", "","","true","center"), |
|
125 | - array("Description", "190", "description", "", "", "","","true","center"), |
|
126 | - array(gettext("Action"), "170", "", "", "", array("EDIT" => array("url" => "/opensips/dispatcher_edit/", "mode" => "popup"), |
|
127 | - "DELETE" => array("url" => "/opensips/dispatcher_remove/", "mode" => "single"))) |
|
128 | - )); |
|
129 | - return $grid_field_arr; |
|
130 | - } |
|
131 | - |
|
132 | - function build_grid_buttons() { |
|
133 | - $buttons_json = json_encode(array(array("Create", "btn btn-line-warning btn", "fa fa-plus-circle fa-lg", "button_action", "/opensips/opensips_add/", 'popup'), |
|
29 | + function __construct() { |
|
30 | + $this->CI = & get_instance(); |
|
31 | + } |
|
32 | + |
|
33 | + function get_opensips_form_fields($id = false) { |
|
34 | + $accountinfo = $this->CI->session->userdata("accountinfo"); |
|
35 | + |
|
36 | + $uname_user = $this->CI->common->find_uniq_rendno('10', '', ''); |
|
37 | + $password = $this->CI->common->generate_password(); |
|
38 | + $val = $id > 0 ? 'subscriber.username.' . $id : 'subscriber.username'; |
|
39 | + |
|
40 | + // echo '<pre>'; print_r($val); exit; |
|
41 | + $loginid = $this->CI->session->userdata('logintype') == 2 ? 0 : $accountinfo['id']; |
|
42 | + $form['forms'] = array(base_url() . 'opensips/opensips_save/', array("id" => "opensips_form", "name" => "opensips_form")); |
|
43 | + $form['Opensips Device'] = array( |
|
44 | + array('', 'HIDDEN', array('name' => 'id'), '', '', '', ''), |
|
45 | + array('Username', 'INPUT', array('name' => 'username', 'size' => '30', 'value' => $uname_user, 'id' => 'username', 'class' => "text field medium"), 'trim|required|xss_clean', 'tOOL TIP', 'Please Enter account number', '<i style="cursor:pointer; font-size: 17px; padding-left:10px; padding-top:6px;" title="Reset Password" class="change_number fa fa-refresh"></i>'), |
|
46 | + array('Password', 'INPUT', array('name' => 'password', 'size' => '30', 'value' => $password, 'id' => 'password', 'class' => "text field medium"), 'trim|required|xss_clean', 'tOOL TIP', 'Please Enter Password', '<i style="cursor:pointer; font-size: 17px; padding-left:10px; padding-top:6px;" title="Reset Password" class="change_pass fa fa-refresh"></i>'), |
|
47 | + array('Account', 'accountcode', 'SELECT', '', '', 'tOOL TIP', 'Please Enter account number', 'number', 'number', 'accounts', 'build_dropdown', 'where_arr', array("reseller_id" => $loginid, "type" => "GLOBAL", "deleted" => "0")), |
|
48 | + array('Domain', 'INPUT', array('name' => 'domain', 'size' => '20', 'class' => "text field medium"), '', 'tOOL TIP', ''), |
|
49 | + array('Caller Name', 'INPUT', array('name' => 'effective_caller_id_name', 'size' => '20', 'class' => "text field medium"), '', 'tOOL TIP', 'Please Enter account number'), |
|
50 | + array('Caller Number', 'INPUT', array('name' => 'effective_caller_id_number', 'size' => '20', 'class' => "text field medium"), '', 'tOOL TIP', 'Please Enter account number'), |
|
51 | + array('Status', 'status', 'SELECT', '', '', 'tOOL TIP', 'Please Select Status', '', '', '', 'set_status'), |
|
52 | + ); |
|
53 | + $form['button_save'] = array('name' => 'action', 'content' => 'Save', 'value' => 'save', 'type' => 'button', 'id' => 'submit', 'class' => 'btn btn-line-parrot'); |
|
54 | + $form['button_cancel'] = array('name' => 'action', 'content' => 'Close', 'value' => 'cancel', 'type' => 'button', 'class' => 'btn btn-line-sky margin-x-10', 'onclick' => 'return redirect_page(\'NULL\')'); |
|
55 | + // echo '<pre>'; print_r($form); exit; |
|
56 | + return $form; |
|
57 | + } |
|
58 | + |
|
59 | + function get_dispatcher_form_fields() { |
|
60 | + |
|
61 | + $form['forms'] = array(base_url() . 'opensips/dispatcher_save/', array("id" => "opensips_dispatcher_form", "name" => "opensips_dispatcher_form")); |
|
62 | + $form['Dispatcher Information'] = array( |
|
63 | + array('', 'HIDDEN', array('name' => 'id'), '', '', '', ''), |
|
64 | + array('Setid', 'INPUT', array('name' => 'setid', 'size' => '20', 'class' => "text field medium"), '', 'tOOL TIP', ''), |
|
65 | + array('Destination', 'INPUT', array('name' => 'destination', 'size' => '20', 'class' => "text field medium"), 'trim|required', 'tOOL TIP', ''), |
|
66 | + array('Weight', 'INPUT', array('name' => 'weight', 'size' => '20', 'class' => "text field medium"), '', 'tOOL TIP', ''), |
|
67 | + array('Attrs', 'INPUT', array('name' => 'attrs', 'size' => '20', 'class' => "text field medium"), '', 'tOOL TIP', ''), |
|
68 | + array('Description', 'INPUT', array('name' => 'description', 'size' => '100', 'class' => "text field medium"), '', 'tOOL TIP', ''), |
|
69 | + ); |
|
70 | + $form['button_save'] = array('name' => 'action', 'content' => 'Save', 'value' => 'save', 'type' => 'button', 'id' => 'submit', 'class' => 'btn btn-line-parrot'); |
|
71 | + $form['button_cancel'] = array('name' => 'action', 'content' => 'Close', 'value' => 'cancel', 'type' => 'button', 'class' => 'btn btn-line-sky margin-x-10', 'onclick' => 'return redirect_page(\'/opensips/dispatcher_list/\')'); |
|
72 | + return $form; |
|
73 | + } |
|
74 | + |
|
75 | + function get_search_dispatcher_form() { |
|
76 | + $form['forms'] = array("", array('id' => "dispatcher_search")); |
|
77 | + $form['Search'] = array( |
|
78 | + array('Description', 'INPUT', array('name' => 'description[description]', '', 'size' => '20', 'class' => "text field "), '', 'tOOL TIP', '1', 'description[description-string]', '', '', '', 'search_string_type', ''), |
|
79 | + array('', 'HIDDEN', 'ajax_search', '1', '', '', ''), |
|
80 | + array('', 'HIDDEN', 'advance_search', '1', '', '', ''), |
|
81 | + ); |
|
82 | + |
|
83 | + $form['button_search'] = array('name' => 'action', 'id' => "opensipsdispatcher_search_btn", 'content' => 'Search', 'value' => 'save', 'type' => 'button', 'class' => 'btn btn-line-parrot pull-right'); |
|
84 | + $form['button_reset'] = array('name' => 'action', 'id' => "id_reset", 'content' => 'Clear', 'value' => 'cancel', 'type' => 'reset', 'class' => 'btn btn-line-sky pull-right margin-x-10'); |
|
85 | + |
|
86 | + return $form; |
|
87 | + } |
|
88 | + |
|
89 | + function get_search_opensips_form() { |
|
90 | + $form['forms'] = array("", array('id' => "opensips_list_search")); |
|
91 | + $form['Search'] = array( |
|
92 | + array('Username', 'INPUT', array('name' => 'username[username]', '', 'size' => '20', 'class' => "text field "), '', 'tOOL TIP', '1', 'username[username-string]', '', '', '', 'search_string_type', ''), |
|
93 | + array('', 'HIDDEN', 'ajax_search', '1', '', '', ''), |
|
94 | + array('', 'HIDDEN', 'advance_search', '1', '', '', ''), |
|
95 | + ); |
|
96 | + |
|
97 | + $form['button_search'] = array('name' => 'action', 'id' => "opensipsdevice_search_btn", 'content' => 'Search', 'value' => 'save', 'type' => 'button', 'class' => 'btn btn-line-parrot pull-right'); |
|
98 | + $form['button_reset'] = array('name' => 'action', 'id' => "id_reset", 'content' => 'Clear', 'value' => 'cancel', 'type' => 'reset', 'class' => 'btn btn-line-sky pull-right margin-x-10'); |
|
99 | + |
|
100 | + return $form; |
|
101 | + } |
|
102 | + |
|
103 | + function build_opensips_list() { |
|
104 | + // array(display name, width, db_field_parent_table,feidname, db_field_child_table,function name); |
|
105 | + $grid_field_arr = json_encode(array( |
|
106 | + array("Username", "150", "username", "", "", "","","true","center"), |
|
107 | + array("Password", "150", "password", "", "", "","","true","center"), |
|
108 | + array("Account", "150", "accountcode", "", "", "","","true","center"), |
|
109 | + array("Domain", "317", "domain", "", "", "","","true","center"), |
|
110 | + array("Caller Name", "200", "effective_caller_id_name", "", "", "","","true","center"), |
|
111 | + array("Caller Number", "200", "effective_caller_id_number", "", "", "","","true","center"), |
|
112 | + array(gettext("Action"), "100", "", "", "", array("EDIT" => array("url" => "/opensips/opensips_edit/", "mode" => "popup"), |
|
113 | + "DELETE" => array("url" => "/opensips/opensips_remove/", "mode" => "single"))) |
|
114 | + )); |
|
115 | + return $grid_field_arr; |
|
116 | + } |
|
117 | + |
|
118 | + function build_opensipsdispatcher_list() { |
|
119 | + // array(display name, width, db_field_parent_table,feidname, db_field_child_table,function name); |
|
120 | + $grid_field_arr = json_encode(array( |
|
121 | + array("Set Id", "160", "setid", "", "", "","","true","center"), |
|
122 | + array("Destination", "160", "destination", "", "", "","","true","center"), |
|
123 | + array("Weight", "190", "weight", "", "", "","","true","center"), |
|
124 | + array("Attrs", "180", "attrs", "", "", "","","true","center"), |
|
125 | + array("Description", "190", "description", "", "", "","","true","center"), |
|
126 | + array(gettext("Action"), "170", "", "", "", array("EDIT" => array("url" => "/opensips/dispatcher_edit/", "mode" => "popup"), |
|
127 | + "DELETE" => array("url" => "/opensips/dispatcher_remove/", "mode" => "single"))) |
|
128 | + )); |
|
129 | + return $grid_field_arr; |
|
130 | + } |
|
131 | + |
|
132 | + function build_grid_buttons() { |
|
133 | + $buttons_json = json_encode(array(array("Create", "btn btn-line-warning btn", "fa fa-plus-circle fa-lg", "button_action", "/opensips/opensips_add/", 'popup'), |
|
134 | 134 | // array("Refresh","reload","/accounts/clearsearchfilter/") |
135 | 135 | )); |
136 | 136 | return $buttons_json; |
@@ -86,17 +86,17 @@ discard block |
||
86 | 86 | return $form; |
87 | 87 | } |
88 | 88 | |
89 | - function build_system_list_for_admin() { |
|
90 | - $grid_field_arr = json_encode(array( |
|
91 | - array("Name", "190", "name", "", "", ""), |
|
92 | - array("Value", "190", "value", "", "", ""), |
|
93 | - array("Description", "320", "comment", "", "", ""), |
|
94 | - array("Group", "120", "group_title", "", "", ""), |
|
95 | - array(gettext("Action"), "442", "", "", "",array("EDIT" => array("url" => "systems/configuration_edit/", "mode" => "popup"), |
|
96 | - )) |
|
97 | - )); |
|
98 | - return $grid_field_arr; |
|
99 | - } |
|
89 | + function build_system_list_for_admin() { |
|
90 | + $grid_field_arr = json_encode(array( |
|
91 | + array("Name", "190", "name", "", "", ""), |
|
92 | + array("Value", "190", "value", "", "", ""), |
|
93 | + array("Description", "320", "comment", "", "", ""), |
|
94 | + array("Group", "120", "group_title", "", "", ""), |
|
95 | + array(gettext("Action"), "442", "", "", "",array("EDIT" => array("url" => "systems/configuration_edit/", "mode" => "popup"), |
|
96 | + )) |
|
97 | + )); |
|
98 | + return $grid_field_arr; |
|
99 | + } |
|
100 | 100 | |
101 | 101 | function build_grid_buttons() { |
102 | 102 | $buttons_json = json_encode(array( |
@@ -104,28 +104,28 @@ discard block |
||
104 | 104 | return $buttons_json; |
105 | 105 | } |
106 | 106 | |
107 | - function build_template_list_for_admin() { |
|
108 | - $grid_field_arr = json_encode(array(array("Name", "425", "name", "", "", "","","true","center"), |
|
109 | - array("Subject", "650", "subject", "", "", "","","true","center"), |
|
110 | - array(gettext("Action"), "200", "", "", "",array("EDIT" => array("url" => "systems/template_edit/", "mode" => "single"), |
|
111 | - )) |
|
112 | - )); |
|
113 | - return $grid_field_arr; |
|
114 | - } |
|
107 | + function build_template_list_for_admin() { |
|
108 | + $grid_field_arr = json_encode(array(array("Name", "425", "name", "", "", "","","true","center"), |
|
109 | + array("Subject", "650", "subject", "", "", "","","true","center"), |
|
110 | + array(gettext("Action"), "200", "", "", "",array("EDIT" => array("url" => "systems/template_edit/", "mode" => "single"), |
|
111 | + )) |
|
112 | + )); |
|
113 | + return $grid_field_arr; |
|
114 | + } |
|
115 | 115 | |
116 | - function build_country_list_for_admin() { |
|
117 | - $action = 'systems/country_list_edit/'; |
|
118 | - $action_remove = 'systems/country_remove/'; |
|
119 | - $mode="popup"; |
|
120 | - $grid_field_arr = json_encode(array( |
|
121 | - array("<input type='checkbox' name='chkAll' class='ace checkall'/><label class='lbl'></label>", "50", "", "", "", "","","false","center"), |
|
122 | - array("Name", "705", "country", "", "", "","","true","center"), |
|
123 | - array(gettext("Action"), "100", "", "", "", array("EDIT" => array("url" => "$action", "mode" => "$mode"), |
|
124 | - "DELETE" => array("url" => "$action_remove", "mode" => "single") |
|
125 | - )) |
|
126 | - )); |
|
127 | - return $grid_field_arr; |
|
128 | - } |
|
116 | + function build_country_list_for_admin() { |
|
117 | + $action = 'systems/country_list_edit/'; |
|
118 | + $action_remove = 'systems/country_remove/'; |
|
119 | + $mode="popup"; |
|
120 | + $grid_field_arr = json_encode(array( |
|
121 | + array("<input type='checkbox' name='chkAll' class='ace checkall'/><label class='lbl'></label>", "50", "", "", "", "","","false","center"), |
|
122 | + array("Name", "705", "country", "", "", "","","true","center"), |
|
123 | + array(gettext("Action"), "100", "", "", "", array("EDIT" => array("url" => "$action", "mode" => "$mode"), |
|
124 | + "DELETE" => array("url" => "$action_remove", "mode" => "single") |
|
125 | + )) |
|
126 | + )); |
|
127 | + return $grid_field_arr; |
|
128 | + } |
|
129 | 129 | |
130 | 130 | |
131 | 131 | function build_admin_grid_buttons() { |
@@ -170,17 +170,17 @@ discard block |
||
170 | 170 | $action_remove = 'systems/currency_remove/'; |
171 | 171 | $mode="popup"; |
172 | 172 | |
173 | - $grid_field_arr = json_encode(array( |
|
174 | - array("<input type='checkbox' name='chkAll' class='ace checkall'/><label class='lbl'></label>", "70", "", "", "", "","","false","center"), |
|
175 | - array("Name", "320", "currencyname", "", "", "","","true","center"), |
|
176 | - array("Code", "290", "currency", "", "", "","","true","center"), |
|
177 | - array(" Rate", "330", "currencyrate", "", "", "","","true","right"), |
|
178 | - array(gettext("Action"), "265", "", "", "", array("EDIT" => array("url" => "$action", "mode" => "$mode"), |
|
179 | - "DELETE" => array("url" => "$action_remove", "mode" => "single") |
|
180 | - )) |
|
181 | - )); |
|
182 | - return $grid_field_arr; |
|
183 | - } |
|
173 | + $grid_field_arr = json_encode(array( |
|
174 | + array("<input type='checkbox' name='chkAll' class='ace checkall'/><label class='lbl'></label>", "70", "", "", "", "","","false","center"), |
|
175 | + array("Name", "320", "currencyname", "", "", "","","true","center"), |
|
176 | + array("Code", "290", "currency", "", "", "","","true","center"), |
|
177 | + array(" Rate", "330", "currencyrate", "", "", "","","true","right"), |
|
178 | + array(gettext("Action"), "265", "", "", "", array("EDIT" => array("url" => "$action", "mode" => "$mode"), |
|
179 | + "DELETE" => array("url" => "$action_remove", "mode" => "single") |
|
180 | + )) |
|
181 | + )); |
|
182 | + return $grid_field_arr; |
|
183 | + } |
|
184 | 184 | |
185 | 185 | function get_search_currency_form() { |
186 | 186 |
@@ -487,66 +487,66 @@ discard block |
||
487 | 487 | array(gettext('Account Type'), 'posttoexternal', 'SELECT', '', '', 'tOOL TIP', 'Please Enter account number', '', '', '', 'set_account_type_search'), |
488 | 488 | array(gettext('Balance'), 'INPUT', array('name' => 'balance[balance]', 'value' => '', 'size' => '20', 'class' => "text field "), '', 'Tool tips info', '1', 'balance[balance-integer]', '', '', '', 'search_int_type', ''), |
489 | 489 | |
490 | - array(gettext('Credit Limit'), 'INPUT', array('name' => 'credit_limit[credit_limit]', 'value' => '', 'size' => '20', 'class' => "text field "), '', 'Tool tips info', '1', 'credit_limit[credit_limit-integer]', '', '', '', 'search_int_type', ''), |
|
491 | - array(gettext('Status'), 'status', 'SELECT', '', '', 'tOOL TIP', 'Please Enter account number', '', '', '', 'set_search_status'), |
|
492 | - array(gettext('Created Date'), 'INPUT', array('name' => 'creation[0]', '', 'size' => '20', 'class' => "text field", 'id' => 'creation'), '', 'tOOL TIP', '', 'creation[creation-date]'), |
|
493 | - array('', 'HIDDEN', 'ajax_search', '1', '', '', ''), |
|
494 | - array('', 'HIDDEN', 'advance_search', '1', '', '', '') |
|
495 | - ); |
|
496 | - |
|
497 | - $form['button_search'] = array('name' => 'action', 'id' => "account_search_btn", 'content' => gettext('Search'), 'value' => 'save', 'type' => 'button', 'class' => 'btn btn-line-parrot pull-right'); |
|
498 | - $form['button_reset'] = array('name' => 'action', 'id' => "id_reset", 'content' => gettext('Clear'), 'value' => 'cancel', 'type' => 'reset', 'class' => 'btn btn-line-sky pull-right margin-x-10'); |
|
499 | - |
|
500 | - return $form; |
|
501 | - } |
|
502 | - |
|
503 | - function get_admin_search_form() { |
|
504 | - $form['forms'] = array("", array('id' => "account_search")); |
|
505 | - $form['Search'] = array( |
|
506 | - array(gettext('Account'), 'INPUT', array('name' => 'number[number]', '', 'size' => '20', 'class' => "text field"), '', 'tOOL TIP', '1', 'number[number-string]', '', '', '', 'search_string_type', ''), |
|
507 | - array(gettext('First Name'), 'INPUT', array('name' => 'first_name[first_name]', '', 'id' => 'first_name', 'size' => '15', 'class' => "text field "), '', 'tOOL TIP', '1', 'first_name[first_name-string]', '', '', '', 'search_string_type', ''), |
|
508 | - array(gettext('Last Name'), 'INPUT', array('name' => 'last_name[last_name]', 'value' => '', 'size' => '20', 'class' => "text field "), '', 'Tool tips info', '1', 'last_name[last_name-string]', '', '', '', 'search_string_type', ''), |
|
509 | - array(gettext('Company'), 'INPUT', array('name' => 'company_name[company_name]', 'value' => '', 'size' => '20', 'class' => "text field "), '', 'Tool tips info', '1', 'company_name[company_name-string]', '', '', '', 'search_string_type', ''), |
|
510 | - array(gettext('Email'), 'INPUT', array('name' => 'email[email]', 'value' => '', 'size' => '20', 'class' => "text field "), '', 'Tool tips info', '1', 'email[email-string]', '', '', '', 'search_string_type', ''), |
|
511 | - array(gettext('Entity Type'), 'type', 'SELECT', '', '', 'tOOL TIP', 'Please Enter account number', '', '', '', 'set_entity_type_admin'), |
|
512 | - array(gettext('Phone'), 'INPUT', array('name' => 'telephone_1[telephone_1]', 'value' => '', 'size' => '20', 'class' => "text field "), '', 'Tool tips info', '1', 'telephone_1[telephone_1-integer]', '', '', '', 'search_int_type', ''), |
|
513 | - array(gettext('Country'), 'country_id', 'SELECT', '', '', 'tOOL TIP', 'Please Enter account number', 'id', 'country', 'countrycode', 'build_dropdown', '', ''), array('Status', 'status', 'SELECT', '', '', 'tOOL TIP', 'Please Enter account number', '', '', '', 'set_search_status'), |
|
514 | - array('', 'HIDDEN', 'ajax_search', '1', '', '', ''), |
|
515 | - array('', 'HIDDEN', 'advance_search', '1', '', '', '') |
|
516 | - ); |
|
517 | - |
|
518 | - $form['button_search'] = array('name' => 'action', 'id' => "account_search_btn", 'content' => gettext('Search'), 'value' => 'save', 'type' => 'button', 'class' => 'btn btn-line-parrot pull-right'); |
|
519 | - $form['button_reset'] = array('name' => 'action', 'id' => "id_reset", 'content' => gettext('Clear'), 'value' => 'cancel', 'type' => 'reset', 'class' => 'btn btn-line-sky pull-right margin-x-10'); |
|
520 | - |
|
521 | - return $form; |
|
522 | - } |
|
523 | - |
|
524 | - |
|
525 | - function build_account_list_for_admin() { |
|
526 | - // array(display name, width, db_field_parent_table,feidname, db_field_child_table,function name); |
|
527 | - $grid_field_arr = json_encode(array( |
|
528 | - array("<input type='checkbox' name='chkAll' class='ace checkall'/><label class='lbl'></label>", "30", "", "", "", "","","false","center"), |
|
529 | - array(gettext("Account"), "135", "number", "number", "accounts", "account_number_icon", "EDITABLE","true","left"), |
|
530 | - array(gettext("First Name"), "150", "first_name", "", "", "","","true","center"), |
|
531 | - array(gettext("Last Name"), "150", "last_name", "", "", "","","true","center"), |
|
532 | - array(gettext("Company"), "150", "company_name", "", "", "","","true","center"), |
|
533 | - array(gettext("Email"), "170", "email", "", "", "","","true","center"), |
|
534 | - array(gettext("Phone"), "150", "telephone_1", "", "", "","","true","center"), |
|
535 | - array(gettext("Country"), "110", "country_id", "country", "countrycode", "get_field_name","","true","center"), |
|
536 | - array(gettext("Status"), "110", "status", "status", "accounts", "get_status","","true","center"), |
|
537 | - /*******************************************************************/ |
|
538 | - array(gettext("Action"), "100", "", "", "", array( |
|
539 | - "EDIT" => array("url" => "accounts/admin_edit/", "mode" => "single"), |
|
540 | - "DELETE" => array("url" => "accounts/admin_delete/", "mode" => "single") |
|
541 | - )) |
|
542 | - )); |
|
543 | - return $grid_field_arr; |
|
544 | - } |
|
545 | - |
|
546 | - function build_account_list_for_customer() { |
|
547 | - $account_info = $accountinfo = $this->CI->session->userdata('accountinfo'); |
|
548 | - $currency_id=$account_info['currency_id']; |
|
549 | - $currency=$this->CI->common->get_field_name('currency', 'currency', $currency_id); |
|
490 | + array(gettext('Credit Limit'), 'INPUT', array('name' => 'credit_limit[credit_limit]', 'value' => '', 'size' => '20', 'class' => "text field "), '', 'Tool tips info', '1', 'credit_limit[credit_limit-integer]', '', '', '', 'search_int_type', ''), |
|
491 | + array(gettext('Status'), 'status', 'SELECT', '', '', 'tOOL TIP', 'Please Enter account number', '', '', '', 'set_search_status'), |
|
492 | + array(gettext('Created Date'), 'INPUT', array('name' => 'creation[0]', '', 'size' => '20', 'class' => "text field", 'id' => 'creation'), '', 'tOOL TIP', '', 'creation[creation-date]'), |
|
493 | + array('', 'HIDDEN', 'ajax_search', '1', '', '', ''), |
|
494 | + array('', 'HIDDEN', 'advance_search', '1', '', '', '') |
|
495 | + ); |
|
496 | + |
|
497 | + $form['button_search'] = array('name' => 'action', 'id' => "account_search_btn", 'content' => gettext('Search'), 'value' => 'save', 'type' => 'button', 'class' => 'btn btn-line-parrot pull-right'); |
|
498 | + $form['button_reset'] = array('name' => 'action', 'id' => "id_reset", 'content' => gettext('Clear'), 'value' => 'cancel', 'type' => 'reset', 'class' => 'btn btn-line-sky pull-right margin-x-10'); |
|
499 | + |
|
500 | + return $form; |
|
501 | + } |
|
502 | + |
|
503 | + function get_admin_search_form() { |
|
504 | + $form['forms'] = array("", array('id' => "account_search")); |
|
505 | + $form['Search'] = array( |
|
506 | + array(gettext('Account'), 'INPUT', array('name' => 'number[number]', '', 'size' => '20', 'class' => "text field"), '', 'tOOL TIP', '1', 'number[number-string]', '', '', '', 'search_string_type', ''), |
|
507 | + array(gettext('First Name'), 'INPUT', array('name' => 'first_name[first_name]', '', 'id' => 'first_name', 'size' => '15', 'class' => "text field "), '', 'tOOL TIP', '1', 'first_name[first_name-string]', '', '', '', 'search_string_type', ''), |
|
508 | + array(gettext('Last Name'), 'INPUT', array('name' => 'last_name[last_name]', 'value' => '', 'size' => '20', 'class' => "text field "), '', 'Tool tips info', '1', 'last_name[last_name-string]', '', '', '', 'search_string_type', ''), |
|
509 | + array(gettext('Company'), 'INPUT', array('name' => 'company_name[company_name]', 'value' => '', 'size' => '20', 'class' => "text field "), '', 'Tool tips info', '1', 'company_name[company_name-string]', '', '', '', 'search_string_type', ''), |
|
510 | + array(gettext('Email'), 'INPUT', array('name' => 'email[email]', 'value' => '', 'size' => '20', 'class' => "text field "), '', 'Tool tips info', '1', 'email[email-string]', '', '', '', 'search_string_type', ''), |
|
511 | + array(gettext('Entity Type'), 'type', 'SELECT', '', '', 'tOOL TIP', 'Please Enter account number', '', '', '', 'set_entity_type_admin'), |
|
512 | + array(gettext('Phone'), 'INPUT', array('name' => 'telephone_1[telephone_1]', 'value' => '', 'size' => '20', 'class' => "text field "), '', 'Tool tips info', '1', 'telephone_1[telephone_1-integer]', '', '', '', 'search_int_type', ''), |
|
513 | + array(gettext('Country'), 'country_id', 'SELECT', '', '', 'tOOL TIP', 'Please Enter account number', 'id', 'country', 'countrycode', 'build_dropdown', '', ''), array('Status', 'status', 'SELECT', '', '', 'tOOL TIP', 'Please Enter account number', '', '', '', 'set_search_status'), |
|
514 | + array('', 'HIDDEN', 'ajax_search', '1', '', '', ''), |
|
515 | + array('', 'HIDDEN', 'advance_search', '1', '', '', '') |
|
516 | + ); |
|
517 | + |
|
518 | + $form['button_search'] = array('name' => 'action', 'id' => "account_search_btn", 'content' => gettext('Search'), 'value' => 'save', 'type' => 'button', 'class' => 'btn btn-line-parrot pull-right'); |
|
519 | + $form['button_reset'] = array('name' => 'action', 'id' => "id_reset", 'content' => gettext('Clear'), 'value' => 'cancel', 'type' => 'reset', 'class' => 'btn btn-line-sky pull-right margin-x-10'); |
|
520 | + |
|
521 | + return $form; |
|
522 | + } |
|
523 | + |
|
524 | + |
|
525 | + function build_account_list_for_admin() { |
|
526 | + // array(display name, width, db_field_parent_table,feidname, db_field_child_table,function name); |
|
527 | + $grid_field_arr = json_encode(array( |
|
528 | + array("<input type='checkbox' name='chkAll' class='ace checkall'/><label class='lbl'></label>", "30", "", "", "", "","","false","center"), |
|
529 | + array(gettext("Account"), "135", "number", "number", "accounts", "account_number_icon", "EDITABLE","true","left"), |
|
530 | + array(gettext("First Name"), "150", "first_name", "", "", "","","true","center"), |
|
531 | + array(gettext("Last Name"), "150", "last_name", "", "", "","","true","center"), |
|
532 | + array(gettext("Company"), "150", "company_name", "", "", "","","true","center"), |
|
533 | + array(gettext("Email"), "170", "email", "", "", "","","true","center"), |
|
534 | + array(gettext("Phone"), "150", "telephone_1", "", "", "","","true","center"), |
|
535 | + array(gettext("Country"), "110", "country_id", "country", "countrycode", "get_field_name","","true","center"), |
|
536 | + array(gettext("Status"), "110", "status", "status", "accounts", "get_status","","true","center"), |
|
537 | + /*******************************************************************/ |
|
538 | + array(gettext("Action"), "100", "", "", "", array( |
|
539 | + "EDIT" => array("url" => "accounts/admin_edit/", "mode" => "single"), |
|
540 | + "DELETE" => array("url" => "accounts/admin_delete/", "mode" => "single") |
|
541 | + )) |
|
542 | + )); |
|
543 | + return $grid_field_arr; |
|
544 | + } |
|
545 | + |
|
546 | + function build_account_list_for_customer() { |
|
547 | + $account_info = $accountinfo = $this->CI->session->userdata('accountinfo'); |
|
548 | + $currency_id=$account_info['currency_id']; |
|
549 | + $currency=$this->CI->common->get_field_name('currency', 'currency', $currency_id); |
|
550 | 550 | |
551 | 551 | // array(display name, width, db_field_parent_table,feidname, db_field_child_table,function name); |
552 | 552 | $grid_field_arr = json_encode(array( |
@@ -577,118 +577,118 @@ discard block |
||
577 | 577 | $currency_id=$account_info['currency_id']; |
578 | 578 | $currency=$this->CI->common->get_field_name('currency', 'currency', $currency_id); |
579 | 579 | |
580 | - // array(display name, width, db_field_parent_table,feidname, db_field_child_table,function name); |
|
581 | - $grid_field_arr = json_encode(array(array("<input type='checkbox' name='chkAll' class='ace checkall'/><label class='lbl'></label>", "30", "", "", "", "","","false","center"), |
|
582 | - array(gettext("Account"), "105", "number", "", "", "", "EDITABLE","true","center"), |
|
583 | - array(gettext("First Name"), "120", "first_name", "", "", "","","true","center"), |
|
584 | - array(gettext("Last Name"), "115", "last_name", "", "", "","","true","center"), |
|
585 | - array(gettext("Company"), "130", "company_name", "", "", "","","true","center"), |
|
586 | - array(gettext("Rate Group"), "95", "pricelist_id", "name", "pricelists", "get_field_name","","true","center"), |
|
587 | - array(gettext("Account Type"), "107", "posttoexternal", "posttoexternal", "posttoexternal", "get_account_type","","true","center"), |
|
588 | - array(gettext("Balance")." ($currency)", "100", "balance", "balance", "balance", "convert_to_currency","","true","right"), |
|
589 | - array(gettext("Credit Limit")." ($currency)", "120", "credit_limit", "credit_limit", "credit_limit", "convert_to_currency","","true","right"), |
|
590 | - array(gettext("Status"), "110", "status", "status", "accounts", "get_status","","true","center"), |
|
591 | - array(gettext("Created Date"), "90", "creation", "", "", "","","true","center"), |
|
592 | - /**************************************************************/ |
|
593 | - array(gettext("Action"), "139", "", "", "", array("PAYMENT" => array("url" => "accounts/customer_payment_process_add/", "mode" => "single"), |
|
594 | - "CALLERID" => array("url" => "accounts/customer_add_callerid/", "mode" => 'popup'), |
|
595 | - "EDIT" => array("url" => "accounts/reseller_edit/", "mode" => "single"), |
|
596 | - "DELETE" => array("url" => "accounts/reseller_delete/", "mode" => "single") |
|
597 | - )) |
|
598 | - )); |
|
599 | - return $grid_field_arr; |
|
600 | - } |
|
601 | - |
|
602 | - |
|
603 | - function build_grid_buttons_customer() { |
|
604 | - $logintype = $this->CI->session->userdata('userlevel_logintype'); |
|
605 | - $provider = null; |
|
606 | - if ($logintype != 1) |
|
607 | - $provider = array(gettext("Create Provider"), "btn btn-line-blue btn", "fa fa-plus-circle fa-lg", "button_action", "/accounts/provider_add/"); |
|
608 | - // array(display name, width, db_field_parent_table,feidname, db_field_child_table,function name); |
|
609 | - $buttons_json = json_encode(array( |
|
610 | - array(gettext("Create Customer"), "btn btn-line-warning btn", "fa fa-plus-circle fa-lg", "button_action", "/accounts/customer_add/"), |
|
611 | - array(gettext("Mass Create"), "btn btn-line-warning btn", "fa fa-plus-circle fa-lg", "button_action", "/accounts/customer_bulk_creation/", "popup","medium"), |
|
612 | - $provider, |
|
613 | - array(gettext("Export"), "btn btn-xing", " fa fa-download fa-lg", "button_action", "/accounts/customer_export_cdr_xls/", 'single'), |
|
614 | - array(gettext("Delete"), "btn btn-line-danger", "fa fa-times-circle fa-lg", "button_action", "/accounts/customer_selected_delete/") |
|
615 | - )); |
|
616 | - return $buttons_json; |
|
617 | - } |
|
618 | - |
|
619 | - function build_grid_buttons_admin() { |
|
620 | - $buttons_json = json_encode(array( |
|
621 | - array(gettext("Create Admin"), "btn btn-line-warning btn", "fa fa-plus-circle fa-lg", "button_action", "/accounts/admin_add/"), |
|
622 | - array(gettext("Create Subadmin"), "btn btn-line-warning btn", "fa fa-plus-circle fa-lg", "button_action", "/accounts/subadmin_add/4"), |
|
623 | - array(gettext("Delete"), "btn btn-line-danger", "fa fa-times-circle fa-lg", "button_action", "/accounts/admin_selected_delete/") |
|
624 | - )); |
|
625 | - return $buttons_json; |
|
626 | - } |
|
627 | - |
|
628 | - function build_grid_buttons_reseller() { |
|
629 | - $buttons_json = json_encode(array( |
|
630 | - array(gettext("Create"), "btn btn-line-warning btn", "fa fa-plus-circle fa-lg", "button_action", "/accounts/reseller_add/"), |
|
631 | - array(gettext("Export"), "btn btn-xing", " fa fa-download fa-lg", "button_action", "/accounts/reseller_export_cdr_xls", 'single'), |
|
632 | - array(gettext("Delete"), "btn btn-line-danger", "fa fa-times-circle fa-lg", "button_action", "/accounts/reseller_selected_delete/") |
|
633 | - )); |
|
634 | - return $buttons_json; |
|
635 | - } |
|
636 | - |
|
637 | - function build_ip_list_for_customer($accountid, $accountype) { |
|
638 | - $grid_field_arr = json_encode(array( |
|
639 | - array(gettext('Name'), "180", "name", "", "", "","","true","center"), |
|
640 | - array(gettext('IP'), "180", "ip", "", "", "","","true","center"), |
|
641 | - array(gettext('Prefix'), "180", "prefix", "", "", "","","true","center"), |
|
642 | - array(gettext('Created Date'), "174", "created_date", "created_date", "created_date", "convert_GMT_to","","true","center"), |
|
643 | - array(gettext('Modified Date'), "160", "last_modified_date", "last_modified_date", "last_modified_date", "convert_GMT_to","","true","center"), |
|
644 | - array(gettext('Action'), "150", "", "", "", array("DELETE" => array("url" => "accounts/" . $accountype . "_ipmap_action/delete/$accountid/$accountype/", "mode" => "single"))) |
|
645 | - )); |
|
646 | - return $grid_field_arr; |
|
647 | - } |
|
648 | - |
|
649 | - function build_animap_list_for_customer($accountid, $accounttype) { |
|
650 | - $grid_field_arr = json_encode(array( |
|
651 | - array(gettext("Caller ID"), "200", "number", "", "", "","","true","center"), |
|
652 | - array(gettext("Status"), "180", "status", "status", "ani_map", "get_status_new","","true","center"), |
|
653 | - array(gettext("Created Date"), "200", "creation_date", "creation_date", "creation_date", "convert_GMT_to","","true","center"), |
|
654 | - array(gettext("Modified Date"), "170", "last_modified_date", "last_modified_date", "last_modified_date", "convert_GMT_to","","true","center"), |
|
655 | - array(gettext("Action"), "200", "", "", "", array("DELETE" => array("url" => "accounts/" . $accounttype . "_animap_action/delete/$accountid/", "mode" => "single"))) |
|
656 | - )); |
|
657 | - return $grid_field_arr; |
|
658 | - } |
|
659 | - |
|
660 | - function build_sipiax_list_for_customer() { |
|
661 | - $grid_field_arr = json_encode(array(array("Tech", "150", "tech", "", "", ""), |
|
662 | - array(gettext("Type"), "150", "type", "", "", ""), |
|
663 | - array(gettext("User Name"), "150", "username", "sweep", "sweeplist", "get_field_name"), |
|
664 | - array(gettext("Password"), "150", "secret", "", "", ""), |
|
665 | - array(gettext("Context"), "150", "context", "", "", ""))); |
|
666 | - return $grid_field_arr; |
|
667 | - } |
|
668 | - |
|
669 | - function set_block_pattern_action_buttons($id) { |
|
670 | - $ret_url = ''; |
|
671 | - $ret_url .= '<a href="/did/delete/' . $id . '/" class="icon delete_image" title="Delete" onClick="return get_alert_msg();"> </a>'; |
|
672 | - return $ret_url; |
|
673 | - } |
|
674 | - |
|
675 | - function build_animap_list() { |
|
676 | - $grid_field_arr = json_encode(array(array("Caller ID", "180", "number", "", "", ""), |
|
677 | - array(gettext("status"),"180","status","status","animap","get_status"), |
|
678 | - array(gettext("Action"), "130", "", "", "", |
|
679 | - array( |
|
680 | - "EDIT_ANIMAP" => array("url" => "accounts/callingcards_animap_list_edit/", "mode" => "single"), |
|
681 | - "DELETE_ANIMAP" => array("url" => "accounts/callingcards_animap_list_remove/", "mode" => "single") |
|
682 | - ) |
|
683 | - ))); |
|
684 | - return $grid_field_arr; |
|
685 | - } |
|
686 | - |
|
687 | - function build_grid_buttons_destination() { |
|
688 | - $buttons_json = json_encode(array( |
|
689 | - )); |
|
690 | - return $buttons_json; |
|
691 | - } |
|
580 | + // array(display name, width, db_field_parent_table,feidname, db_field_child_table,function name); |
|
581 | + $grid_field_arr = json_encode(array(array("<input type='checkbox' name='chkAll' class='ace checkall'/><label class='lbl'></label>", "30", "", "", "", "","","false","center"), |
|
582 | + array(gettext("Account"), "105", "number", "", "", "", "EDITABLE","true","center"), |
|
583 | + array(gettext("First Name"), "120", "first_name", "", "", "","","true","center"), |
|
584 | + array(gettext("Last Name"), "115", "last_name", "", "", "","","true","center"), |
|
585 | + array(gettext("Company"), "130", "company_name", "", "", "","","true","center"), |
|
586 | + array(gettext("Rate Group"), "95", "pricelist_id", "name", "pricelists", "get_field_name","","true","center"), |
|
587 | + array(gettext("Account Type"), "107", "posttoexternal", "posttoexternal", "posttoexternal", "get_account_type","","true","center"), |
|
588 | + array(gettext("Balance")." ($currency)", "100", "balance", "balance", "balance", "convert_to_currency","","true","right"), |
|
589 | + array(gettext("Credit Limit")." ($currency)", "120", "credit_limit", "credit_limit", "credit_limit", "convert_to_currency","","true","right"), |
|
590 | + array(gettext("Status"), "110", "status", "status", "accounts", "get_status","","true","center"), |
|
591 | + array(gettext("Created Date"), "90", "creation", "", "", "","","true","center"), |
|
592 | + /**************************************************************/ |
|
593 | + array(gettext("Action"), "139", "", "", "", array("PAYMENT" => array("url" => "accounts/customer_payment_process_add/", "mode" => "single"), |
|
594 | + "CALLERID" => array("url" => "accounts/customer_add_callerid/", "mode" => 'popup'), |
|
595 | + "EDIT" => array("url" => "accounts/reseller_edit/", "mode" => "single"), |
|
596 | + "DELETE" => array("url" => "accounts/reseller_delete/", "mode" => "single") |
|
597 | + )) |
|
598 | + )); |
|
599 | + return $grid_field_arr; |
|
600 | + } |
|
601 | + |
|
602 | + |
|
603 | + function build_grid_buttons_customer() { |
|
604 | + $logintype = $this->CI->session->userdata('userlevel_logintype'); |
|
605 | + $provider = null; |
|
606 | + if ($logintype != 1) |
|
607 | + $provider = array(gettext("Create Provider"), "btn btn-line-blue btn", "fa fa-plus-circle fa-lg", "button_action", "/accounts/provider_add/"); |
|
608 | + // array(display name, width, db_field_parent_table,feidname, db_field_child_table,function name); |
|
609 | + $buttons_json = json_encode(array( |
|
610 | + array(gettext("Create Customer"), "btn btn-line-warning btn", "fa fa-plus-circle fa-lg", "button_action", "/accounts/customer_add/"), |
|
611 | + array(gettext("Mass Create"), "btn btn-line-warning btn", "fa fa-plus-circle fa-lg", "button_action", "/accounts/customer_bulk_creation/", "popup","medium"), |
|
612 | + $provider, |
|
613 | + array(gettext("Export"), "btn btn-xing", " fa fa-download fa-lg", "button_action", "/accounts/customer_export_cdr_xls/", 'single'), |
|
614 | + array(gettext("Delete"), "btn btn-line-danger", "fa fa-times-circle fa-lg", "button_action", "/accounts/customer_selected_delete/") |
|
615 | + )); |
|
616 | + return $buttons_json; |
|
617 | + } |
|
618 | + |
|
619 | + function build_grid_buttons_admin() { |
|
620 | + $buttons_json = json_encode(array( |
|
621 | + array(gettext("Create Admin"), "btn btn-line-warning btn", "fa fa-plus-circle fa-lg", "button_action", "/accounts/admin_add/"), |
|
622 | + array(gettext("Create Subadmin"), "btn btn-line-warning btn", "fa fa-plus-circle fa-lg", "button_action", "/accounts/subadmin_add/4"), |
|
623 | + array(gettext("Delete"), "btn btn-line-danger", "fa fa-times-circle fa-lg", "button_action", "/accounts/admin_selected_delete/") |
|
624 | + )); |
|
625 | + return $buttons_json; |
|
626 | + } |
|
627 | + |
|
628 | + function build_grid_buttons_reseller() { |
|
629 | + $buttons_json = json_encode(array( |
|
630 | + array(gettext("Create"), "btn btn-line-warning btn", "fa fa-plus-circle fa-lg", "button_action", "/accounts/reseller_add/"), |
|
631 | + array(gettext("Export"), "btn btn-xing", " fa fa-download fa-lg", "button_action", "/accounts/reseller_export_cdr_xls", 'single'), |
|
632 | + array(gettext("Delete"), "btn btn-line-danger", "fa fa-times-circle fa-lg", "button_action", "/accounts/reseller_selected_delete/") |
|
633 | + )); |
|
634 | + return $buttons_json; |
|
635 | + } |
|
636 | + |
|
637 | + function build_ip_list_for_customer($accountid, $accountype) { |
|
638 | + $grid_field_arr = json_encode(array( |
|
639 | + array(gettext('Name'), "180", "name", "", "", "","","true","center"), |
|
640 | + array(gettext('IP'), "180", "ip", "", "", "","","true","center"), |
|
641 | + array(gettext('Prefix'), "180", "prefix", "", "", "","","true","center"), |
|
642 | + array(gettext('Created Date'), "174", "created_date", "created_date", "created_date", "convert_GMT_to","","true","center"), |
|
643 | + array(gettext('Modified Date'), "160", "last_modified_date", "last_modified_date", "last_modified_date", "convert_GMT_to","","true","center"), |
|
644 | + array(gettext('Action'), "150", "", "", "", array("DELETE" => array("url" => "accounts/" . $accountype . "_ipmap_action/delete/$accountid/$accountype/", "mode" => "single"))) |
|
645 | + )); |
|
646 | + return $grid_field_arr; |
|
647 | + } |
|
648 | + |
|
649 | + function build_animap_list_for_customer($accountid, $accounttype) { |
|
650 | + $grid_field_arr = json_encode(array( |
|
651 | + array(gettext("Caller ID"), "200", "number", "", "", "","","true","center"), |
|
652 | + array(gettext("Status"), "180", "status", "status", "ani_map", "get_status_new","","true","center"), |
|
653 | + array(gettext("Created Date"), "200", "creation_date", "creation_date", "creation_date", "convert_GMT_to","","true","center"), |
|
654 | + array(gettext("Modified Date"), "170", "last_modified_date", "last_modified_date", "last_modified_date", "convert_GMT_to","","true","center"), |
|
655 | + array(gettext("Action"), "200", "", "", "", array("DELETE" => array("url" => "accounts/" . $accounttype . "_animap_action/delete/$accountid/", "mode" => "single"))) |
|
656 | + )); |
|
657 | + return $grid_field_arr; |
|
658 | + } |
|
659 | + |
|
660 | + function build_sipiax_list_for_customer() { |
|
661 | + $grid_field_arr = json_encode(array(array("Tech", "150", "tech", "", "", ""), |
|
662 | + array(gettext("Type"), "150", "type", "", "", ""), |
|
663 | + array(gettext("User Name"), "150", "username", "sweep", "sweeplist", "get_field_name"), |
|
664 | + array(gettext("Password"), "150", "secret", "", "", ""), |
|
665 | + array(gettext("Context"), "150", "context", "", "", ""))); |
|
666 | + return $grid_field_arr; |
|
667 | + } |
|
668 | + |
|
669 | + function set_block_pattern_action_buttons($id) { |
|
670 | + $ret_url = ''; |
|
671 | + $ret_url .= '<a href="/did/delete/' . $id . '/" class="icon delete_image" title="Delete" onClick="return get_alert_msg();"> </a>'; |
|
672 | + return $ret_url; |
|
673 | + } |
|
674 | + |
|
675 | + function build_animap_list() { |
|
676 | + $grid_field_arr = json_encode(array(array("Caller ID", "180", "number", "", "", ""), |
|
677 | + array(gettext("status"),"180","status","status","animap","get_status"), |
|
678 | + array(gettext("Action"), "130", "", "", "", |
|
679 | + array( |
|
680 | + "EDIT_ANIMAP" => array("url" => "accounts/callingcards_animap_list_edit/", "mode" => "single"), |
|
681 | + "DELETE_ANIMAP" => array("url" => "accounts/callingcards_animap_list_remove/", "mode" => "single") |
|
682 | + ) |
|
683 | + ))); |
|
684 | + return $grid_field_arr; |
|
685 | + } |
|
686 | + |
|
687 | + function build_grid_buttons_destination() { |
|
688 | + $buttons_json = json_encode(array( |
|
689 | + )); |
|
690 | + return $buttons_json; |
|
691 | + } |
|
692 | 692 | |
693 | 693 | } |
694 | 694 |
@@ -105,13 +105,13 @@ |
||
105 | 105 | change status active or inactive. |
106 | 106 | */ |
107 | 107 | |
108 | - /***********************************************/ |
|
109 | - array(gettext("Action"), "150", "", "", "", array("EDIT" => array("url" => "charges/periodiccharges_edit/", "mode" => "popup", 'popup'), |
|
110 | - "DELETE" => array("url" => "charges/periodiccharges_delete/", "mode" => "single"))) |
|
111 | - )); |
|
112 | - return $grid_field_arr; |
|
113 | - } |
|
114 | - /********************************************/ |
|
108 | + /***********************************************/ |
|
109 | + array(gettext("Action"), "150", "", "", "", array("EDIT" => array("url" => "charges/periodiccharges_edit/", "mode" => "popup", 'popup'), |
|
110 | + "DELETE" => array("url" => "charges/periodiccharges_delete/", "mode" => "single"))) |
|
111 | + )); |
|
112 | + return $grid_field_arr; |
|
113 | + } |
|
114 | + /********************************************/ |
|
115 | 115 | |
116 | 116 | function build_grid_buttons() { |
117 | 117 | $buttons_json = json_encode(array(array("Create" , "btn btn-line-warning btn" , "fa fa-plus-circle fa-lg", "button_action", "/charges/periodiccharges_add/", "popup"), |