@@ -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 | |
@@ -21,7 +21,7 @@ discard block |
||
| 21 | 21 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 22 | 22 | ############################################################################### |
| 23 | 23 | |
| 24 | -if (!defined('BASEPATH')) |
|
| 24 | +if ( ! defined('BASEPATH')) |
|
| 25 | 25 | exit('No direct script access allowed'); |
| 26 | 26 | |
| 27 | 27 | class Accounts_form { |
@@ -36,7 +36,7 @@ discard block |
||
| 36 | 36 | $type = $entity_type == 'customer' ? 0 : 3; |
| 37 | 37 | $uname = $this->CI->common->find_uniq_rendno_customer(common_model::$global_config['system_config']['cardlength'], 'number', 'accounts'); |
| 38 | 38 | $pin = Common_model::$global_config['system_config']['pinlength']; |
| 39 | - $pin_number=$this->CI->common->find_uniq_rendno($pin, 'pin', 'accounts'); |
|
| 39 | + $pin_number = $this->CI->common->find_uniq_rendno($pin, 'pin', 'accounts'); |
|
| 40 | 40 | $uname_user = $this->CI->common->find_uniq_rendno('10', 'number', 'accounts'); |
| 41 | 41 | $password = $this->CI->common->generate_password(); |
| 42 | 42 | $logintype = $this->CI->session->userdata('logintype'); |
@@ -48,33 +48,33 @@ discard block |
||
| 48 | 48 | } |
| 49 | 49 | $sip_device = null; |
| 50 | 50 | $opensips_device = null; |
| 51 | - if (!$entity_type) { |
|
| 51 | + if ( ! $entity_type) { |
|
| 52 | 52 | $entity_type = 'customer'; |
| 53 | 53 | } |
| 54 | - $params=array('name' => 'number', 'value' => $uname, 'size' => '20', 'class' => "text field medium", 'id' => 'number','readonly'=>true); |
|
| 54 | + $params = array('name' => 'number', 'value' => $uname, 'size' => '20', 'class' => "text field medium", 'id' => 'number', 'readonly'=>true); |
|
| 55 | 55 | |
| 56 | 56 | if ($id > 0) { |
| 57 | 57 | $readable = 'disabled'; |
| 58 | - $val = 'accounts.email.' . $id; |
|
| 59 | - $account_val='accounts.number.'.$id; |
|
| 58 | + $val = 'accounts.email.'.$id; |
|
| 59 | + $account_val = 'accounts.number.'.$id; |
|
| 60 | 60 | $password = array('Password', 'PASSWORD', array('name' => 'password', 'id' => 'password_show', 'onmouseover' => 'seetext(password_show)', 'onmouseout' => 'hidepassword(password_show)', 'size' => '20', 'class' => "text field medium"), 'required|', 'tOOL TIP', ''); |
| 61 | 61 | $balance = array('Balance', 'INPUT', array('name' => 'balance', 'size' => '20', 'readonly' => true, 'class' => "text field medium"), '', 'tOOL TIP', ''); |
| 62 | - $account=array('Account', 'INPUT',$params, 'required|integer|greater_than[0]|is_unique[' . $account_val . ']', 'tOOL TIP', ''); |
|
| 62 | + $account = array('Account', 'INPUT', $params, 'required|integer|greater_than[0]|is_unique['.$account_val.']', 'tOOL TIP', ''); |
|
| 63 | 63 | /* * ******************************** */ |
| 64 | 64 | } else { |
| 65 | 65 | $val = 'accounts.email'; |
| 66 | - $account_val='accounts.number'; |
|
| 66 | + $account_val = 'accounts.number'; |
|
| 67 | 67 | if (common_model::$global_config['system_config']['opensips'] == 0) { |
| 68 | 68 | $sip_device = array('Create Opensips Device', 'opensips_device_flag', 'SELECT', '', '', 'tOOL TIP', 'Please Enter account number', '', '', '', 'set_prorate'); |
| 69 | 69 | } else { |
| 70 | 70 | $sip_device = array('Create SIP Device', 'sip_device_flag', 'SELECT', '', '', 'tOOL TIP', 'Please Enter account number', '', '', '', 'set_prorate'); |
| 71 | 71 | } |
| 72 | - $account = array('Account', 'INPUT',$params, 'required|integer|greater_than[0]|is_unique[' . $account_val . ']', 'tOOL TIP', '', '<i style="cursor:pointer; font-size: 17px; padding-left:10px; padding-top:6px;color: #1bcb61;" title="Generate Account" class="change_number fa fa-refresh" ></i>'); |
|
| 72 | + $account = array('Account', 'INPUT', $params, 'required|integer|greater_than[0]|is_unique['.$account_val.']', 'tOOL TIP', '', '<i style="cursor:pointer; font-size: 17px; padding-left:10px; padding-top:6px;color: #1bcb61;" title="Generate Account" class="change_number fa fa-refresh" ></i>'); |
|
| 73 | 73 | $password = array('Password', 'INPUT', array('name' => 'password', 'value' => $password, 'size' => '20', 'class' => "text field medium", 'id' => 'password'), 'required|', 'tOOL TIP', '', '<i style="cursor:pointer; font-size: 17px; padding-left:10px; padding-top:6px;color: #1bcb61;" title="Reset Password" class="change_pass fa fa-refresh" ></i>'); |
| 74 | - $balance = array('Balance', 'INPUT', array('name' => 'balance', 'size' => '20','class' => "text field medium"), '', 'tOOL TIP', ''); |
|
| 74 | + $balance = array('Balance', 'INPUT', array('name' => 'balance', 'size' => '20', 'class' => "text field medium"), '', 'tOOL TIP', ''); |
|
| 75 | 75 | } |
| 76 | 76 | $pin = array('Pin', 'INPUT', array('name' => 'pin', 'value' => $pin_number, 'size' => '20', 'class' => "text field medium", 'id' => 'change_pin'), 'required|is_numeric', 'tOOL TIP', '', '<i style="cursor:pointer; font-size: 17px; padding-left:10px; padding-top:6px;color: #1bcb61;" title="Generate Pin" class="change_pin fa fa-refresh" ></i>'); |
| 77 | - $form['forms'] = array(base_url() . 'accounts/' . $entity_type . '_save/'.$id."/", array("id" => "customer_form", "name" => "customer_form")); |
|
| 77 | + $form['forms'] = array(base_url().'accounts/'.$entity_type.'_save/'.$id."/", array("id" => "customer_form", "name" => "customer_form")); |
|
| 78 | 78 | $form[gettext('Account Profile')] = array( |
| 79 | 79 | array('', 'HIDDEN', array('name' => 'id'), '', '', '', ''), |
| 80 | 80 | array('', 'HIDDEN', array('name' => 'type', 'value' => $type), '', '', ''), |
@@ -82,16 +82,16 @@ discard block |
||
| 82 | 82 | $password, |
| 83 | 83 | $pin, |
| 84 | 84 | array(gettext('First Name'), 'INPUT', array('name' => 'first_name', 'id' => 'first_name', 'size' => '15', 'class' => "text field medium"), 'required', 'tOOL TIP', ''), |
| 85 | - array(gettext('Last Name'), 'INPUT', array('name' => 'last_name', 'size' => '15', 'class' => "text field medium"), 'trim|xss_clean', 'tOOL TIP', ''), |
|
| 85 | + array(gettext('Last Name'), 'INPUT', array('name' => 'last_name', 'size' => '15', 'class' => "text field medium"), 'trim|xss_clean', 'tOOL TIP', ''), |
|
| 86 | 86 | array(gettext('Company'), 'INPUT', array('name' => 'company_name', 'size' => '15', 'class' => 'text field medium'), 'trim|xss_clean', 'tOOL TIP', ''), |
| 87 | 87 | array(gettext('Phone'), 'INPUT', array('name' => 'telephone_1', 'size' => '15', 'class' => "text field medium"), '', 'tOOL TIP', ''), |
| 88 | 88 | array(gettext('Mobile'), 'INPUT', array('name' => 'telephone_2', 'size' => '15', 'class' => "text field medium"), '', 'tOOL TIP', ''), |
| 89 | - array(gettext('Email'), 'INPUT', array('name' => 'email', 'size' => '50', 'class' => "text field medium"), 'required|valid_email|is_unique[' . $val . ']', 'tOOL TIP', ''), |
|
| 90 | - array(gettext('Address 1'), 'INPUT', array('name' => 'address_1', 'size' => '15', 'class' => "text field medium"), '', 'tOOL TIP', ''), |
|
| 89 | + array(gettext('Email'), 'INPUT', array('name' => 'email', 'size' => '50', 'class' => "text field medium"), 'required|valid_email|is_unique['.$val.']', 'tOOL TIP', ''), |
|
| 90 | + array(gettext('Address 1'), 'INPUT', array('name' => 'address_1', 'size' => '15', 'class' => "text field medium"), '', 'tOOL TIP', ''), |
|
| 91 | 91 | array(gettext('Address 2'), 'INPUT', array('name' => 'address_2', 'size' => '15', 'class' => "text field medium"), '', 'tOOL TIP', ''), |
| 92 | - array(gettext('City'), 'INPUT', array('name' => 'city', 'size' => '20', 'class' => "text field medium"), '', 'tOOL TIP', ''), |
|
| 93 | - array(gettext('Province/State'), 'INPUT', array('name' => 'province', 'size' => '15', 'class' => "text field medium"), '', 'tOOL TIP', ''), |
|
| 94 | - array(gettext('Zip/Postal Code'), 'INPUT', array('name' => 'postal_code', 'size' => '15', 'class' => "text field medium"), 'trim|xss_clean', 'tOOL TIP', ''), |
|
| 92 | + array(gettext('City'), 'INPUT', array('name' => 'city', 'size' => '20', 'class' => "text field medium"), '', 'tOOL TIP', ''), |
|
| 93 | + array(gettext('Province/State'), 'INPUT', array('name' => 'province', 'size' => '15', 'class' => "text field medium"), '', 'tOOL TIP', ''), |
|
| 94 | + array(gettext('Zip/Postal Code'), 'INPUT', array('name' => 'postal_code', 'size' => '15', 'class' => "text field medium"), 'trim|xss_clean', 'tOOL TIP', ''), |
|
| 95 | 95 | array(gettext('Country'), array('name' => 'country_id', 'class' => 'country_id'), 'SELECT', '', array("name" => "country_id", "rules" => "required"), 'tOOL TIP', 'Please Enter account number', 'id', 'country', 'countrycode', 'build_dropdown', '', ''), |
| 96 | 96 | array(gettext('Timezone'), array('name' => 'timezone_id', 'class' => 'timezone_id'), 'SELECT', '', array("name" => "timezone_id", "rules" => "required"), 'tOOL TIP', 'Please Enter account number', 'id', 'gmtzone', 'timezone', 'build_dropdown', '', ''), |
| 97 | 97 | array(gettext('Currency'), array('name' => 'currency_id', 'class' => 'currency_id'), 'SELECT', '', array("name" => "currency_id", "rules" => "required"), 'tOOL TIP', 'Please Enter account number', 'id', 'currencyname,currency', 'currency', 'build_concat_dropdown', '', array()) |
@@ -105,9 +105,9 @@ discard block |
||
| 105 | 105 | array(gettext('Number Translation'), 'INPUT', array('name' => 'dialed_modify', 'size' => '20', 'class' => "text field medium"), '', 'tOOL TIP', ''), |
| 106 | 106 | array(gettext('Concurrent Calls'), 'INPUT', array('name' => 'maxchannels', 'size' => '20', 'class' => "text field medium"), 'numeric', 'tOOL TIP', ''), |
| 107 | 107 | array(gettext('Interval'), 'INPUT', array('name' => 'interval', 'size' => '20', 'class' => "text field medium"), 'numeric', 'tOOL TIP', ''), |
| 108 | - array(gettext('First Used'), 'INPUT', array('name' => 'first_used', 'size' => '20', 'readonly' => true, 'class' => "text field medium", 'value' => '0000-00-00 00:00:00'), '', 'tOOL TIP', ''), |
|
| 108 | + array(gettext('First Used'), 'INPUT', array('name' => 'first_used', 'size' => '20', 'readonly' => true, 'class' => "text field medium", 'value' => '0000-00-00 00:00:00'), '', 'tOOL TIP', ''), |
|
| 109 | 109 | array(gettext('Account Valid Days'), 'INPUT', array('name' => 'validfordays', 'size' => '20', 'class' => "text field medium"), 'trim|numeric|xss_clean', 'tOOL TIP', ''), |
| 110 | - array(gettext('Expiry Date'), 'INPUT', array('name' => 'expiry', 'size' => '20', 'class' => "text field medium", 'value' => $expiry_date, 'id' => 'expiry'), '', 'tOOL TIP', ''), |
|
| 110 | + array(gettext('Expiry Date'), 'INPUT', array('name' => 'expiry', 'size' => '20', 'class' => "text field medium", 'value' => $expiry_date, 'id' => 'expiry'), '', 'tOOL TIP', ''), |
|
| 111 | 111 | ); |
| 112 | 112 | |
| 113 | 113 | $form[gettext('Billing Settings')] = array( |
@@ -121,12 +121,12 @@ discard block |
||
| 121 | 121 | array(gettext('LC Charge / Min'), 'INPUT', array('name' => 'charge_per_min', 'size' => '20', 'class' => "text field medium"), '', 'tOOL TIP', ''), |
| 122 | 122 | array(gettext('Tax'), 'tax_id', 'SELECT', '', '', 'tOOL TIP', 'Please Enter account number', 'id', 'taxes_description', 'taxes', 'build_dropdown', 'where_arr', array('status' => 0, "reseller_id" => $loginid), 'multi'), |
| 123 | 123 | ); |
| 124 | - if($id==0){ |
|
| 124 | + if ($id == 0) { |
|
| 125 | 125 | $form[gettext('Alert Threshold')] = array( |
| 126 | 126 | array('', 'HIDDEN', array('name' => 'id'), '', '', '', ''), |
| 127 | 127 | array(gettext('Email Alerts ?'), 'notify_flag', 'SELECT', '', '', 'tOOL TIP', '', '', '', '', 'custom_status'), |
| 128 | - array(gettext('Balance Below'), 'INPUT', array('name' => 'notify_credit_limit', 'size' => '20', 'class' => "text field medium"), 'valid_decimal', 'tOOL TIP', ''), |
|
| 129 | - array(gettext('Email'), 'INPUT', array('name' => 'notify_email', 'size' => '50', 'class' => "text field medium"), 'valid_email', 'tOOL TIP', ''), |
|
| 128 | + array(gettext('Balance Below'), 'INPUT', array('name' => 'notify_credit_limit', 'size' => '20', 'class' => "text field medium"), 'valid_decimal', 'tOOL TIP', ''), |
|
| 129 | + array(gettext('Email'), 'INPUT', array('name' => 'notify_email', 'size' => '50', 'class' => "text field medium"), 'valid_email', 'tOOL TIP', ''), |
|
| 130 | 130 | ); |
| 131 | 131 | } |
| 132 | 132 | $form['button_save'] = array('name' => 'action', 'content' => gettext('Save'), 'value' => 'save', 'type' => 'submit', 'class' => 'btn btn-line-parrot'); |
@@ -138,12 +138,12 @@ discard block |
||
| 138 | 138 | } |
| 139 | 139 | |
| 140 | 140 | function customer_alert_threshold($entity_type) { |
| 141 | - $form['forms'] = array(base_url() . 'accounts/' . $entity_type . '_alert_threshold_save/' . $entity_type . "/", array("id" => "customer_alert_threshold", "name" => "customer_alert_threshold")); |
|
| 141 | + $form['forms'] = array(base_url().'accounts/'.$entity_type.'_alert_threshold_save/'.$entity_type."/", array("id" => "customer_alert_threshold", "name" => "customer_alert_threshold")); |
|
| 142 | 142 | $form[gettext('Alert Threshold')] = array( |
| 143 | 143 | array('', 'HIDDEN', array('name' => 'id'), '', '', '', ''), |
| 144 | 144 | array(gettext('Email Alerts ?'), 'notify_flag', 'SELECT', '', '', 'tOOL TIP', '', '', '', '', 'custom_status'), |
| 145 | - array(gettext('Balance Below'), 'INPUT', array('name' => 'notify_credit_limit', 'size' => '20', 'class' => "text field medium"), 'valid_decimal', 'tOOL TIP', ''), |
|
| 146 | - array(gettext('Email'), 'INPUT', array('name' => 'notify_email', 'size' => '50', 'class' => "text field medium"), 'valid_email', 'tOOL TIP', ''), |
|
| 145 | + array(gettext('Balance Below'), 'INPUT', array('name' => 'notify_credit_limit', 'size' => '20', 'class' => "text field medium"), 'valid_decimal', 'tOOL TIP', ''), |
|
| 146 | + array(gettext('Email'), 'INPUT', array('name' => 'notify_email', 'size' => '50', 'class' => "text field medium"), 'valid_email', 'tOOL TIP', ''), |
|
| 147 | 147 | ); |
| 148 | 148 | $form['button_save'] = array('name' => 'action', 'content' => gettext('Save'), 'value' => 'save', 'type' => 'submit', 'class' => 'btn btn-line-parrot'); |
| 149 | 149 | return $form; |
@@ -164,12 +164,12 @@ discard block |
||
| 164 | 164 | $sip_device = array(gettext('Create SIP Device'), 'sip_device_flag', 'SELECT', '', '', 'tOOL TIP', 'Please Enter account number', '', '', '', 'custom_status'); |
| 165 | 165 | } |
| 166 | 166 | } |
| 167 | - $form['forms'] = array(base_url() . 'accounts/customer_bulk_save/', array("id" => "customer_bulk_form", "name" => "customer_bulk_form")); |
|
| 167 | + $form['forms'] = array(base_url().'accounts/customer_bulk_save/', array("id" => "customer_bulk_form", "name" => "customer_bulk_form")); |
|
| 168 | 168 | $form[gettext('General Details')] = array( |
| 169 | - array(gettext('Account Count'), 'INPUT', array('name' => 'count', 'size' => '20', 'class' => "text field medium"), 'trim|required|numeric|xss_clean', 'tOOL TIP', ''), |
|
| 170 | - array(gettext('Start Prefix'), 'INPUT', array('name' => 'prefix', 'size' => '20', 'class' => "text field medium"), 'trim|required|numeric|xss_clean', 'tOOL TIP', ''), |
|
| 171 | - array(gettext('Acc. Number Length'), 'INPUT', array('name' => 'account_length', 'size' => '20', 'class' => "text field medium"), 'trim|required|numeric|xss_clean', 'tOOL TIP', ''), |
|
| 172 | - array(gettext('Company'), 'INPUT', array('name' => 'company_name', 'size' => '15', 'class' => 'text field medium'), 'trim|required|xss_clean', 'tOOL TIP', ''), |
|
| 169 | + array(gettext('Account Count'), 'INPUT', array('name' => 'count', 'size' => '20', 'class' => "text field medium"), 'trim|required|numeric|xss_clean', 'tOOL TIP', ''), |
|
| 170 | + array(gettext('Start Prefix'), 'INPUT', array('name' => 'prefix', 'size' => '20', 'class' => "text field medium"), 'trim|required|numeric|xss_clean', 'tOOL TIP', ''), |
|
| 171 | + array(gettext('Acc. Number Length'), 'INPUT', array('name' => 'account_length', 'size' => '20', 'class' => "text field medium"), 'trim|required|numeric|xss_clean', 'tOOL TIP', ''), |
|
| 172 | + array(gettext('Company'), 'INPUT', array('name' => 'company_name', 'size' => '15', 'class' => 'text field medium'), 'trim|required|xss_clean', 'tOOL TIP', ''), |
|
| 173 | 173 | array(gettext('Country'), array('name' => 'country_id', 'class' => 'country_id'), 'SELECT', '', array("name" => "country_id", "rules" => "required"), 'tOOL TIP', 'Please Enter account number', 'id', 'country', 'countrycode', 'build_dropdown', '', ''), |
| 174 | 174 | array(gettext('Timezone'), array('name' => 'timezone_id', 'class' => 'timezone_id'), 'SELECT', '', array("name" => "timezone_id", "rules" => "required"), 'tOOL TIP', 'Please Enter account number', 'id', 'gmtzone', 'timezone', 'build_dropdown', '', ''), |
| 175 | 175 | array(gettext('Generate Pin'), 'pin', 'SELECT', '', '', 'tOOL TIP', 'Please Enter account number', '', '', '', 'set_pin_allow_customer'), |
@@ -184,7 +184,7 @@ discard block |
||
| 184 | 184 | array(gettext('Billing Schedule'), array('name' => 'sweep_id', 'id' => 'sweep_id', 'class' => 'sweep_id'), 'SELECT', '', '', 'tOOL TIP', '', 'id', 'sweep', 'sweeplist', 'build_dropdown', '', ''), |
| 185 | 185 | array(gettext('Billing Day'), array("name" => 'invoice_day', "class" => "invoice_day"), 'SELECT', '', '', 'tOOL TIP', '', '', '', '', 'set_invoice_option'), |
| 186 | 186 | array(gettext('Currency'), array('name' => 'currency_id', 'class' => 'currency_id'), 'SELECT', '', array("name" => "currency_id", "rules" => "required"), 'tOOL TIP', 'Please Enter account number', 'id', 'currencyname,currency', 'currency', 'build_concat_dropdown', '', array()), |
| 187 | - array(gettext('Balance'), 'INPUT', array('name' => 'balance', 'size' => '20', 'class' => "text field medium"), 'trim|numeric|greater_than[0]|currency_decimal|xss_clean', 'tOOL TIP', ''), |
|
| 187 | + array(gettext('Balance'), 'INPUT', array('name' => 'balance', 'size' => '20', 'class' => "text field medium"), 'trim|numeric|greater_than[0]|currency_decimal|xss_clean', 'tOOL TIP', ''), |
|
| 188 | 188 | array(gettext('Credit Limit'), 'INPUT', array('name' => 'credit_limit', 'size' => '20', 'class' => "text field medium"), 'trim|currency_decimal|xss_clean', 'tOOL TIP', ''), |
| 189 | 189 | array(gettext('Valid Days'), 'INPUT', array('name' => 'validfordays', 'size' => '20', 'class' => "text field medium"), 'trim|numeric|xss_clean', 'tOOL TIP', ''), |
| 190 | 190 | array(gettext('Allow Local Calls'), 'local_call', 'SELECT', '', '', 'tOOL TIP', 'Please Enter account number', '', '', '', 'custom_status'), |
@@ -196,7 +196,7 @@ discard block |
||
| 196 | 196 | } |
| 197 | 197 | |
| 198 | 198 | function get_customer_callerid_fields() { |
| 199 | - $form['forms'] = array(base_url() . 'accounts/customer_add_callerid/', array("id" => "callerid_form")); |
|
| 199 | + $form['forms'] = array(base_url().'accounts/customer_add_callerid/', array("id" => "callerid_form")); |
|
| 200 | 200 | $form[gettext('Information')] = array( |
| 201 | 201 | array('', 'HIDDEN', array('name' => 'flag'), '', '', '', ''), |
| 202 | 202 | array(gettext('Account'), 'INPUT', array('name' => 'accountid', 'size' => '20', 'readonly' => true, 'class' => "text field medium"), '', 'tOOL TIP', 'Please Enter account number'), |
@@ -210,7 +210,7 @@ discard block |
||
| 210 | 210 | } |
| 211 | 211 | |
| 212 | 212 | function get_customer_payment_fields($currency, $number, $currency_id, $id) { |
| 213 | - $form['forms'] = array(base_url() . 'accounts/customer_payment_save/', array('id' => 'acccount_charges_form', 'method' => 'POST', 'name' => 'acccount_charges_form')); |
|
| 213 | + $form['forms'] = array(base_url().'accounts/customer_payment_save/', array('id' => 'acccount_charges_form', 'method' => 'POST', 'name' => 'acccount_charges_form')); |
|
| 214 | 214 | $form['Refill information'] = array( |
| 215 | 215 | array('', 'HIDDEN', array('name' => 'id', 'value' => $id), '', '', '', ''), |
| 216 | 216 | array('', 'HIDDEN', array('name' => 'account_currency', 'value' => $currency_id), '', '', ''), |
@@ -227,11 +227,11 @@ discard block |
||
| 227 | 227 | function get_form_reseller_fields($id = false) { |
| 228 | 228 | $readable = false; |
| 229 | 229 | $invoice_config = null; |
| 230 | - $concurrent_calls=null; |
|
| 230 | + $concurrent_calls = null; |
|
| 231 | 231 | $logintype = $this->CI->session->userdata('logintype'); |
| 232 | 232 | $uname = $this->CI->common->find_uniq_rendno(common_model::$global_config['system_config']['cardlength'], 'number', 'accounts'); |
| 233 | 233 | $password = $this->CI->common->generate_password(); |
| 234 | - $params=array('name' => 'number', 'value' => $uname, 'size' => '20', 'class' => "text field medium", 'id' => 'number','readonly'=>true); |
|
| 234 | + $params = array('name' => 'number', 'value' => $uname, 'size' => '20', 'class' => "text field medium", 'id' => 'number', 'readonly'=>true); |
|
| 235 | 235 | if ($logintype == 1 || $logintype == 5) { |
| 236 | 236 | $account_data = $this->CI->session->userdata("accountinfo"); |
| 237 | 237 | $loginid = $account_data['id']; |
@@ -239,18 +239,18 @@ discard block |
||
| 239 | 239 | $loginid = "0"; |
| 240 | 240 | } |
| 241 | 241 | if ($id > 0) { |
| 242 | - $val = 'accounts.email.' . $id; |
|
| 243 | - $account_val='accounts.number.'.$id; |
|
| 242 | + $val = 'accounts.email.'.$id; |
|
| 243 | + $account_val = 'accounts.number.'.$id; |
|
| 244 | 244 | $readable = 'disabled'; |
| 245 | - $password = array('Password', 'PASSWORD', array('name' => 'password', 'id' => 'password_show', 'onmouseover' => 'seetext(password_show)', 'onmouseout' => 'hidepassword(password_show)', 'size' => '20', 'class' => "text field medium"), 'required|notMatch[number]|', 'tOOL TIP', ''); |
|
| 246 | - $concurrent_calls=array('Concurrent Calls', 'INPUT', array('name' => 'maxchannels', 'size' => '20', 'class' => "text field medium"), 'numeric', 'tOOL TIP', ''); |
|
| 247 | - $account=array('Account', 'INPUT',$params, 'required|integer|greater_than[0]|is_unique[' . $account_val . ']', 'tOOL TIP', ''); |
|
| 245 | + $password = array('Password', 'PASSWORD', array('name' => 'password', 'id' => 'password_show', 'onmouseover' => 'seetext(password_show)', 'onmouseout' => 'hidepassword(password_show)', 'size' => '20', 'class' => "text field medium"), 'required|notMatch[number]|', 'tOOL TIP', ''); |
|
| 246 | + $concurrent_calls = array('Concurrent Calls', 'INPUT', array('name' => 'maxchannels', 'size' => '20', 'class' => "text field medium"), 'numeric', 'tOOL TIP', ''); |
|
| 247 | + $account = array('Account', 'INPUT', $params, 'required|integer|greater_than[0]|is_unique['.$account_val.']', 'tOOL TIP', ''); |
|
| 248 | 248 | } else { |
| 249 | 249 | $val = 'accounts.email'; |
| 250 | - $account_val='accounts.number'; |
|
| 250 | + $account_val = 'accounts.number'; |
|
| 251 | 251 | $invoice_config = array('Use same credential for Invoice Config', 'invoice_config_flag', 'SELECT', '', '', 'tOOL TIP', 'Please Enter account number', '', '', '', 'set_prorate'); |
| 252 | 252 | $password = array('Password', 'INPUT', array('name' => 'password', 'value' => $password, 'size' => '20', 'class' => "text field medium", 'id' => 'password'), 'required|', 'tOOL TIP', '', '<i style="cursor:pointer; font-size: 17px; padding-left:10px; padding-top:6px;color: #1bcb61;" title="Reset Password" class="change_pass fa fa-refresh" ></i>'); |
| 253 | - $account = array('Account', 'INPUT',$params, 'required|integer|greater_than[0]|is_unique[' . $account_val . ']', 'tOOL TIP', '', '<i style="cursor:pointer; font-size: 17px; padding-left:10px; padding-top:6px;color: #1bcb61;" title="Generate Account" class="change_number fa fa-refresh" ></i>'); |
|
| 253 | + $account = array('Account', 'INPUT', $params, 'required|integer|greater_than[0]|is_unique['.$account_val.']', 'tOOL TIP', '', '<i style="cursor:pointer; font-size: 17px; padding-left:10px; padding-top:6px;color: #1bcb61;" title="Generate Account" class="change_number fa fa-refresh" ></i>'); |
|
| 254 | 254 | } |
| 255 | 255 | if ($id == "") { |
| 256 | 256 | $reg_url = array('', 'HIDDEN', array('name' => 'id'), '', '', '', ''); |
@@ -258,7 +258,7 @@ discard block |
||
| 258 | 258 | $reg_url = array('Registration URL', 'INPUT', array('name' => 'registration_url', 'size' => '20', 'readonly' => true, 'class' => "text field medium"), 'tOOL TIP', ''); |
| 259 | 259 | } |
| 260 | 260 | /* * ****************************************************************** */ |
| 261 | - $form['forms'] = array(base_url() . 'accounts/reseller_save/', array("id" => "reseller_form", "name" => "reseller_form")); |
|
| 261 | + $form['forms'] = array(base_url().'accounts/reseller_save/', array("id" => "reseller_form", "name" => "reseller_form")); |
|
| 262 | 262 | $form['Client Panel Access'] = array( |
| 263 | 263 | array('', 'HIDDEN', array('name' => 'id'), '', '', '', ''), |
| 264 | 264 | array('', 'HIDDEN', array('name' => 'type', 'value' => '1'), '', '', ''), |
@@ -275,12 +275,12 @@ discard block |
||
| 275 | 275 | array(gettext('Billing Day'), array("name" => 'invoice_day', "class" => "invoice_day"), 'SELECT', '', '', 'tOOL TIP', '', '', '', '', 'set_invoice_option'), |
| 276 | 276 | array(gettext('Currency'), array('name' => 'currency_id', 'class' => 'currency_id'), 'SELECT', '', array("name" => "currency_id", "rules" => "required"), 'tOOL TIP', 'Please Enter account number', 'id', 'currencyname,currency', 'currency', 'build_concat_dropdown', '', array()), |
| 277 | 277 | array(gettext('Account Type'), array('name' => 'posttoexternal', 'disabled' => $readable, 'class' => 'posttoexternal', 'id' => 'posttoexternal'), 'SELECT', '', '', 'tOOL TIP', 'Please Enter account number', '', '', '', 'set_account_type'), |
| 278 | - array(gettext('Credit Limit'), 'INPUT', array('name' => 'credit_limit', 'size' => '20', 'class' => "text field medium"), '', 'tOOL TIP', ''), |
|
| 278 | + array(gettext('Credit Limit'), 'INPUT', array('name' => 'credit_limit', 'size' => '20', 'class' => "text field medium"), '', 'tOOL TIP', ''), |
|
| 279 | 279 | array(gettext('Tax'), 'tax_id', 'SELECT', '', '', 'tOOL TIP', 'Please Enter account number', 'id', 'taxes_description', 'taxes', 'build_dropdown', 'where_arr', array('status' => 0, 'reseller_id' => $loginid), 'multi'), |
| 280 | 280 | ); |
| 281 | 281 | |
| 282 | 282 | } |
| 283 | -else{ |
|
| 283 | +else { |
|
| 284 | 284 | $form[gettext('Billing Information')] = array( |
| 285 | 285 | array(gettext('Rate Group'), 'pricelist_id', 'SELECT', '', array("name" => "pricelist_id", 'rules' => 'required'), 'tOOL TIP', 'Please Enter account number', 'id', 'name', 'pricelists', 'build_dropdown', 'where_arr', array("status" => "0", "reseller_id" => "0")), |
| 286 | 286 | |
@@ -288,31 +288,31 @@ discard block |
||
| 288 | 288 | array(gettext('Billing Day'), array("name" => 'invoice_day', "class" => "invoice_day"), 'SELECT', '', '', 'tOOL TIP', '', '', '', '', 'set_invoice_option'), |
| 289 | 289 | array(gettext('Currency'), array('name' => 'currency_id', 'class' => 'currency_id'), 'SELECT', '', array("name" => "currency_id", "rules" => "required"), 'tOOL TIP', 'Please Enter account number', 'id', 'currencyname,currency', 'currency', 'build_concat_dropdown', '', array()), |
| 290 | 290 | array(gettext('Account Type'), array('name' => 'posttoexternal', 'disabled' => $readable, 'class' => 'posttoexternal', 'id' => 'posttoexternal'), 'SELECT', '', '', 'tOOL TIP', 'Please Enter account number', '', '', '', 'set_account_type'), |
| 291 | - array(gettext('Credit Limit'), 'INPUT', array('name' => 'credit_limit', 'size' => '20', 'class' => "text field medium"), '', 'tOOL TIP', ''), |
|
| 291 | + array(gettext('Credit Limit'), 'INPUT', array('name' => 'credit_limit', 'size' => '20', 'class' => "text field medium"), '', 'tOOL TIP', ''), |
|
| 292 | 292 | array(gettext('Tax'), 'tax_id', 'SELECT', '', '', 'tOOL TIP', 'Please Enter account number', 'id', 'taxes_description', 'taxes', 'build_dropdown', 'where_arr', array('status' => 0, 'reseller_id' => $loginid), 'multi'), |
| 293 | 293 | $invoice_config, |
| 294 | 294 | ); |
| 295 | 295 | } |
| 296 | 296 | $form[gettext('Reseller Profile')] = array( |
| 297 | - array(gettext('First Name'), 'INPUT', array('name' => 'first_name', 'id' => 'first_name', 'size' => '50', 'class' => "text field medium"), 'trim|required|xss_clean', 'tOOL TIP', ''), |
|
| 298 | - array(gettext('Last Name'), 'INPUT', array('name' => 'last_name', 'size' => '15', 'class' => "text field medium"), 'trim|xss_clean', 'tOOL TIP', ''), |
|
| 299 | - array(gettext('Company'), 'INPUT', array('name' => 'company_name', 'size' => '50', 'class' => 'text field medium'), 'trim|xss_clean', 'tOOL TIP', ''), |
|
| 297 | + array(gettext('First Name'), 'INPUT', array('name' => 'first_name', 'id' => 'first_name', 'size' => '50', 'class' => "text field medium"), 'trim|required|xss_clean', 'tOOL TIP', ''), |
|
| 298 | + array(gettext('Last Name'), 'INPUT', array('name' => 'last_name', 'size' => '15', 'class' => "text field medium"), 'trim|xss_clean', 'tOOL TIP', ''), |
|
| 299 | + array(gettext('Company'), 'INPUT', array('name' => 'company_name', 'size' => '50', 'class' => 'text field medium'), 'trim|xss_clean', 'tOOL TIP', ''), |
|
| 300 | 300 | array(gettext('Telephone 1'), 'INPUT', array('name' => 'telephone_1', 'size' => '15', 'class' => "text field medium"), '', 'tOOL TIP', ''), |
| 301 | 301 | array(gettext('Telephone 2'), 'INPUT', array('name' => 'telephone_2', 'size' => '15', 'class' => "text field medium"), '', 'tOOL TIP', ''), |
| 302 | - array(gettext('Email'), 'INPUT', array('name' => 'email', 'size' => '50', 'class' => "text field medium"), 'required|valid_email|is_unique[' . $val . ']', 'tOOL TIP', ''), |
|
| 302 | + array(gettext('Email'), 'INPUT', array('name' => 'email', 'size' => '50', 'class' => "text field medium"), 'required|valid_email|is_unique['.$val.']', 'tOOL TIP', ''), |
|
| 303 | 303 | array(gettext('Address 1'), 'INPUT', array('name' => 'address_1', 'size' => '15', 'class' => "text field medium"), '', 'tOOL TIP', ''), |
| 304 | - array(gettext('Address 2'), 'INPUT', array('name' => 'address_2', 'size' => '15', 'class' => "text field medium"), '', 'tOOL TIP', ''), |
|
| 304 | + array(gettext('Address 2'), 'INPUT', array('name' => 'address_2', 'size' => '15', 'class' => "text field medium"), '', 'tOOL TIP', ''), |
|
| 305 | 305 | array(gettext('City'), 'INPUT', array('name' => 'city', 'size' => '20', 'class' => "text field medium"), '', 'tOOL TIP', ''), |
| 306 | 306 | array(gettext('Province/State'), 'INPUT', array('name' => 'province', 'size' => '15', 'class' => "text field medium"), '', 'tOOL TIP', ''), |
| 307 | - array(gettext('Zip/Postal Code'), 'INPUT', array('name' => 'postal_code', 'size' => '15', 'class' => "text field medium"), 'trim|xss_clean', 'tOOL TIP', ''), |
|
| 307 | + array(gettext('Zip/Postal Code'), 'INPUT', array('name' => 'postal_code', 'size' => '15', 'class' => "text field medium"), 'trim|xss_clean', 'tOOL TIP', ''), |
|
| 308 | 308 | array(gettext('Country'), array('name' => 'country_id', 'class' => 'country_id'), 'SELECT', '', array("name" => "country_id", "rules" => "required"), 'tOOL TIP', 'Please Enter account number', 'id', 'country', 'countrycode', 'build_dropdown', '', ''), |
| 309 | 309 | array(gettext('Timezone'), array('name' => 'timezone_id', 'class' => 'timezone_id'), 'SELECT', '', array("name" => "timezone_id", "rules" => "required"), 'tOOL TIP', 'Please Enter account number', 'id', 'gmtzone', 'timezone', 'build_dropdown', '', ''), |
| 310 | 310 | array(gettext('Account Status'), 'status', 'SELECT', '', '', 'tOOL TIP', 'Please Enter account number', '', '', '', 'set_status'), |
| 311 | 311 | ); |
| 312 | - if($id==0){ |
|
| 312 | + if ($id == 0) { |
|
| 313 | 313 | $form[gettext('Alert Threshold')] = array( |
| 314 | 314 | array('Email Alert?', 'notify_flag', 'SELECT', '', '', 'tOOL TIP', '', '', '', '', 'custom_status'), |
| 315 | - array(gettext('Balance Below'), 'INPUT', array('name' => 'notify_credit_limit', 'size' => '20', 'class' => "text field medium"), '', 'tOOL TIP', ''), |
|
| 315 | + array(gettext('Balance Below'), 'INPUT', array('name' => 'notify_credit_limit', 'size' => '20', 'class' => "text field medium"), '', 'tOOL TIP', ''), |
|
| 316 | 316 | array(gettext('Email'), 'INPUT', array('name' => 'notify_email', 'size' => '50', 'class' => "text field medium"), 'valid_email', 'tOOL TIP', ''), |
| 317 | 317 | ); |
| 318 | 318 | } |
@@ -323,24 +323,24 @@ discard block |
||
| 323 | 323 | |
| 324 | 324 | function get_form_admin_fields($entity_type = '', $id = false) { |
| 325 | 325 | $uname = $this->CI->common->find_uniq_rendno(common_model::$global_config['system_config']['cardlength'], 'number', 'accounts'); |
| 326 | - $params=array('name' => 'number', 'value' => $uname, 'size' => '20', 'class' => "text field medium", 'id' => 'number','readonly'=>true); |
|
| 326 | + $params = array('name' => 'number', 'value' => $uname, 'size' => '20', 'class' => "text field medium", 'id' => 'number', 'readonly'=>true); |
|
| 327 | 327 | if ($id > 0) { |
| 328 | - $val = 'accounts.email.' . $id; |
|
| 329 | - $account_val='accounts.number.'.$id; |
|
| 330 | - $password = array('Password', 'PASSWORD', array('name' => 'password', 'id' => 'password_show', 'onmouseover' => 'seetext(password_show)', 'onmouseout' => 'hidepassword(password_show)', 'size' => '20', 'class' => "text field medium"), 'required|notMatch[number]|', 'tOOL TIP', ''); |
|
| 331 | - $account=array('Account', 'INPUT',$params, 'required|is_unique[' . $account_val . ']', 'tOOL TIP', ''); |
|
| 328 | + $val = 'accounts.email.'.$id; |
|
| 329 | + $account_val = 'accounts.number.'.$id; |
|
| 330 | + $password = array('Password', 'PASSWORD', array('name' => 'password', 'id' => 'password_show', 'onmouseover' => 'seetext(password_show)', 'onmouseout' => 'hidepassword(password_show)', 'size' => '20', 'class' => "text field medium"), 'required|notMatch[number]|', 'tOOL TIP', ''); |
|
| 331 | + $account = array('Account', 'INPUT', $params, 'required|is_unique['.$account_val.']', 'tOOL TIP', ''); |
|
| 332 | 332 | } else { |
| 333 | 333 | $val = 'accounts.email'; |
| 334 | - $account_val='accounts.number'; |
|
| 334 | + $account_val = 'accounts.number'; |
|
| 335 | 335 | $password = $this->CI->common->generate_password(); |
| 336 | - $password = array('Password', 'INPUT', array('name' => 'password', 'value' => $password, 'size' => '20','class' => "text field medium", 'id' => 'password'), 'required|', 'tOOL TIP', '', '<i style="cursor:pointer; font-size: 17px; padding-left:10px; padding-top:6px;color: #1bcb61;" title="Reset Password" class="change_pass fa fa-refresh" ></i>'); |
|
| 337 | - $account = array('Account', 'INPUT',$params, 'required|is_unique[' . $account_val . ']', 'tOOL TIP', '', '<i style="cursor:pointer; font-size: 17px; padding-left:10px; padding-top:6px;color: #1bcb61;" title="Generate Account" class="change_number fa fa-refresh" ></i>'); |
|
| 336 | + $password = array('Password', 'INPUT', array('name' => 'password', 'value' => $password, 'size' => '20', 'class' => "text field medium", 'id' => 'password'), 'required|', 'tOOL TIP', '', '<i style="cursor:pointer; font-size: 17px; padding-left:10px; padding-top:6px;color: #1bcb61;" title="Reset Password" class="change_pass fa fa-refresh" ></i>'); |
|
| 337 | + $account = array('Account', 'INPUT', $params, 'required|is_unique['.$account_val.']', 'tOOL TIP', '', '<i style="cursor:pointer; font-size: 17px; padding-left:10px; padding-top:6px;color: #1bcb61;" title="Generate Account" class="change_number fa fa-refresh" ></i>'); |
|
| 338 | 338 | /* * ****************** */ |
| 339 | 339 | } |
| 340 | 340 | |
| 341 | 341 | |
| 342 | 342 | $type = $entity_type == 'admin' ? 2 : 4; |
| 343 | - $form['forms'] = array(base_url() . 'accounts/' . $entity_type . '_save/', array("id" => "admin_form", "name" => "admin_form")); |
|
| 343 | + $form['forms'] = array(base_url().'accounts/'.$entity_type.'_save/', array("id" => "admin_form", "name" => "admin_form")); |
|
| 344 | 344 | $form['Client Panel Access'] = array( |
| 345 | 345 | array('', 'HIDDEN', array('name' => 'id'), '', '', '', ''), |
| 346 | 346 | array('', 'HIDDEN', array('name' => 'type', 'value' => $type), '', '', ''), |
@@ -348,17 +348,17 @@ discard block |
||
| 348 | 348 | $password, |
| 349 | 349 | /* * ********************* */ |
| 350 | 350 | ); |
| 351 | - $form[gettext($entity_type . ' Profile')] = array( |
|
| 351 | + $form[gettext($entity_type.' Profile')] = array( |
|
| 352 | 352 | array(gettext('First Name'), 'INPUT', array('name' => 'first_name', 'id' => 'first_name', 'size' => '15', 'maxlength' => '40', 'class' => "text field medium"), 'trim|required|xss_clean', 'tOOL TIP', 'Please Enter account number'), |
| 353 | 353 | array(gettext('Last Name'), 'INPUT', array('name' => 'last_name', 'size' => '15', 'class' => "text field medium"), 'trim|xss_clean', 'tOOL TIP', 'Please Enter Password'), |
| 354 | - array(gettext('Company'), 'INPUT', array('name' => 'company_name', 'size' => '15', 'class' => 'text field medium'), 'trim|xss_clean', 'tOOL TIP', ''), |
|
| 355 | - array(gettext('Telephone 1'), 'INPUT', array('name' => 'telephone_1', 'size' => '15', 'class' => "text field medium"), '', 'tOOL TIP', 'Please Enter Password'), |
|
| 354 | + array(gettext('Company'), 'INPUT', array('name' => 'company_name', 'size' => '15', 'class' => 'text field medium'), 'trim|xss_clean', 'tOOL TIP', ''), |
|
| 355 | + array(gettext('Telephone 1'), 'INPUT', array('name' => 'telephone_1', 'size' => '15', 'class' => "text field medium"), '', 'tOOL TIP', 'Please Enter Password'), |
|
| 356 | 356 | array(gettext('Telephone 2'), 'INPUT', array('name' => 'telephone_2', 'size' => '15', 'class' => "text field medium"), '', 'tOOL TIP', 'Please Enter Password'), |
| 357 | - array(gettext('Email'), 'INPUT', array('name' => 'email', 'size' => '50', 'class' => "text field medium"), 'required|valid_email|is_unique[' . $val . ']', 'tOOL TIP', ''), |
|
| 358 | - array(gettext('Address 1'), 'INPUT', array('name' => 'address_1', 'size' => '15','class' => "text field medium"), '', 'tOOL TIP', 'Please Enter Password'), |
|
| 359 | - array(gettext('Address 2'), 'INPUT', array('name' => 'address_2', 'size' => '15', 'class' => "text field medium"), '', 'tOOL TIP', 'Please Enter Password'), |
|
| 357 | + array(gettext('Email'), 'INPUT', array('name' => 'email', 'size' => '50', 'class' => "text field medium"), 'required|valid_email|is_unique['.$val.']', 'tOOL TIP', ''), |
|
| 358 | + array(gettext('Address 1'), 'INPUT', array('name' => 'address_1', 'size' => '15', 'class' => "text field medium"), '', 'tOOL TIP', 'Please Enter Password'), |
|
| 359 | + array(gettext('Address 2'), 'INPUT', array('name' => 'address_2', 'size' => '15', 'class' => "text field medium"), '', 'tOOL TIP', 'Please Enter Password'), |
|
| 360 | 360 | array(gettext('City'), 'INPUT', array('name' => 'city', 'size' => '20', 'class' => "text field medium"), '', 'tOOL TIP', 'Please Enter Password'), |
| 361 | - array(gettext('Province/State'), 'INPUT', array('name' => 'province', 'size' => '15', 'class' => "text field medium"), '', 'tOOL TIP', 'Please Enter Password'), |
|
| 361 | + array(gettext('Province/State'), 'INPUT', array('name' => 'province', 'size' => '15', 'class' => "text field medium"), '', 'tOOL TIP', 'Please Enter Password'), |
|
| 362 | 362 | array(gettext('Zip/Postal Code'), 'INPUT', array('name' => 'postal_code', 'size' => '15', 'class' => "text field medium"), 'trim|xss_clean', 'tOOL TIP', 'Please Enter Password'), |
| 363 | 363 | array(gettext('Country'), array('name' => 'country_id', 'class' => 'country_id'), 'SELECT', '', '', 'tOOL TIP', 'Please Enter account number', 'id', 'country', 'countrycode', 'build_dropdown', '', ''), |
| 364 | 364 | array(gettext('Timezone'), array('name' => 'timezone_id', 'class' => 'timezone_id'), 'SELECT', '', '', 'tOOL TIP', 'Please Enter account number', 'id', 'gmtzone', 'timezone', 'build_dropdown', '', ''), |
@@ -404,7 +404,7 @@ discard block |
||
| 404 | 404 | $form['forms'] = array("accounts/customer_batch_update/", array('id' => "reseller_batch_update")); |
| 405 | 405 | $form[gettext('Batch Update')] = array( |
| 406 | 406 | array(gettext('Rate Group'), array('name' => 'pricelist_id[pricelist_id]', 'id' => 'pricelist_id'), 'SELECT', '', '', 'tOOL TIP', 'Please Enter account number', 'id', 'name', 'pricelists', 'build_dropdown', 'where_arr', array("status" => "0", "reseller_id" => "0"), array('name' => 'pricelist_id[operator]', 'class' => 'update_drp'), 'update_drp_type'), |
| 407 | - array(gettext('Balance'), 'INPUT', array('name' => 'balance[balance]', 'id' => 'balance', 'value' => '', 'size' => '20', 'class' => "text field "), '', 'Tool tips info', '1', array('name' => 'balance[operator]', 'class' => 'update_drp'), '', '', '', 'update_int_type', ''), |
|
| 407 | + array(gettext('Balance'), 'INPUT', array('name' => 'balance[balance]', 'id' => 'balance', 'value' => '', 'size' => '20', 'class' => "text field "), '', 'Tool tips info', '1', array('name' => 'balance[operator]', 'class' => 'update_drp'), '', '', '', 'update_int_type', ''), |
|
| 408 | 408 | $status, |
| 409 | 409 | ); |
| 410 | 410 | $form['button_search'] = array('name' => 'action', 'id' => "batch_update_btn", 'content' => gettext('Update'), 'value' => 'save', 'type' => 'button', 'class' => 'btn btn-line-parrot pull-right'); |
@@ -419,7 +419,7 @@ discard block |
||
| 419 | 419 | |
| 420 | 420 | function get_search_customer_form() { |
| 421 | 421 | $logintype = $this->CI->session->userdata('userlevel_logintype'); |
| 422 | - if($logintype != 1){ |
|
| 422 | + if ($logintype != 1) { |
|
| 423 | 423 | $form['forms'] = array("", array('id' => "account_search")); |
| 424 | 424 | $form[gettext('Search')] = array( |
| 425 | 425 | array(gettext('Account'), 'INPUT', array('name' => 'number[number]', '', 'size' => '20', 'class' => "text field "), '', 'tOOL TIP', '1', 'number[number-string]', '', '', '', 'search_string_type', ''), |
@@ -525,15 +525,15 @@ discard block |
||
| 525 | 525 | function build_account_list_for_admin() { |
| 526 | 526 | // array(display name, width, db_field_parent_table,feidname, db_field_child_table,function name); |
| 527 | 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"), |
|
| 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 | 537 | /*******************************************************************/ |
| 538 | 538 | array(gettext("Action"), "100", "", "", "", array( |
| 539 | 539 | "EDIT" => array("url" => "accounts/admin_edit/", "mode" => "single"), |
@@ -545,24 +545,24 @@ discard block |
||
| 545 | 545 | |
| 546 | 546 | function build_account_list_for_customer() { |
| 547 | 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); |
|
| 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( |
| 553 | - array("<input type='checkbox' name='chkAll' class='ace checkall'/><label class='lbl'></label>", "30", "", "","","","","false","center"), |
|
| 554 | - array(gettext("Account"), "125", "number", "number", "accounts", "account_number_icon", "EDITABLE","true","left"), |
|
| 555 | - array(gettext("First Name"), "95", "first_name", "", "", "","","true","center"), |
|
| 556 | - array(gettext("Last Name"), "95", "last_name", "", "", "","","true","center"), |
|
| 557 | - array(gettext("Company"), "85", "company_name", "", "", "","","true","center"), |
|
| 558 | - array(gettext("Rate Group"), "85", "pricelist_id", "name", "pricelists", "get_field_name","","true","center"), |
|
| 559 | - array(gettext("Balance")." ($currency)", "100", "balance", "balance", "balance", "convert_to_currency_account","","true","right"), |
|
| 560 | - array(gettext("Credit Limit")." ($currency)", "120", "credit_limit", "credit_limit", "credit_limit", "convert_to_currency_account","","true","right"), |
|
| 561 | - array(gettext("First Used"), "80", "first_used", "", "", "","","true","center"), |
|
| 562 | - array(gettext("Expiry Date"), "80", "expiry", "", "", "","","true","center"), |
|
| 563 | - array("CC", "45", "maxchannels", "", "", "","","true","center"), |
|
| 564 | - array(gettext("Status"), "90", "status", "status", "accounts", "get_status","","true","center"), |
|
| 565 | - array(gettext("Created Date"), "90", "creation", "", "", "","","true","center"), |
|
| 553 | + array("<input type='checkbox' name='chkAll' class='ace checkall'/><label class='lbl'></label>", "30", "", "", "", "", "", "false", "center"), |
|
| 554 | + array(gettext("Account"), "125", "number", "number", "accounts", "account_number_icon", "EDITABLE", "true", "left"), |
|
| 555 | + array(gettext("First Name"), "95", "first_name", "", "", "", "", "true", "center"), |
|
| 556 | + array(gettext("Last Name"), "95", "last_name", "", "", "", "", "true", "center"), |
|
| 557 | + array(gettext("Company"), "85", "company_name", "", "", "", "", "true", "center"), |
|
| 558 | + array(gettext("Rate Group"), "85", "pricelist_id", "name", "pricelists", "get_field_name", "", "true", "center"), |
|
| 559 | + array(gettext("Balance")." ($currency)", "100", "balance", "balance", "balance", "convert_to_currency_account", "", "true", "right"), |
|
| 560 | + array(gettext("Credit Limit")." ($currency)", "120", "credit_limit", "credit_limit", "credit_limit", "convert_to_currency_account", "", "true", "right"), |
|
| 561 | + array(gettext("First Used"), "80", "first_used", "", "", "", "", "true", "center"), |
|
| 562 | + array(gettext("Expiry Date"), "80", "expiry", "", "", "", "", "true", "center"), |
|
| 563 | + array("CC", "45", "maxchannels", "", "", "", "", "true", "center"), |
|
| 564 | + array(gettext("Status"), "90", "status", "status", "accounts", "get_status", "", "true", "center"), |
|
| 565 | + array(gettext("Created Date"), "90", "creation", "", "", "", "", "true", "center"), |
|
| 566 | 566 | /************************************************************************/ |
| 567 | 567 | array(gettext("Action"), "140", "", "", "", array("PAYMENT" => array("url" => "accounts/customer_payment_process_add/", "mode" => "single"), |
| 568 | 568 | "CALLERID" => array("url" => "accounts/customer_add_callerid/", "mode" => "popup"), |
@@ -574,21 +574,21 @@ discard block |
||
| 574 | 574 | |
| 575 | 575 | function build_account_list_for_reseller() { |
| 576 | 576 | $account_info = $accountinfo = $this->CI->session->userdata('accountinfo'); |
| 577 | - $currency_id=$account_info['currency_id']; |
|
| 578 | - $currency=$this->CI->common->get_field_name('currency', 'currency', $currency_id); |
|
| 577 | + $currency_id = $account_info['currency_id']; |
|
| 578 | + $currency = $this->CI->common->get_field_name('currency', 'currency', $currency_id); |
|
| 579 | 579 | |
| 580 | 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"), |
|
| 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 | 592 | /**************************************************************/ |
| 593 | 593 | array(gettext("Action"), "139", "", "", "", array("PAYMENT" => array("url" => "accounts/customer_payment_process_add/", "mode" => "single"), |
| 594 | 594 | "CALLERID" => array("url" => "accounts/customer_add_callerid/", "mode" => 'popup'), |
@@ -608,7 +608,7 @@ discard block |
||
| 608 | 608 | // array(display name, width, db_field_parent_table,feidname, db_field_child_table,function name); |
| 609 | 609 | $buttons_json = json_encode(array( |
| 610 | 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"), |
|
| 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 | 612 | $provider, |
| 613 | 613 | array(gettext("Export"), "btn btn-xing", " fa fa-download fa-lg", "button_action", "/accounts/customer_export_cdr_xls/", 'single'), |
| 614 | 614 | array(gettext("Delete"), "btn btn-line-danger", "fa fa-times-circle fa-lg", "button_action", "/accounts/customer_selected_delete/") |
@@ -636,23 +636,23 @@ discard block |
||
| 636 | 636 | |
| 637 | 637 | function build_ip_list_for_customer($accountid, $accountype) { |
| 638 | 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"))) |
|
| 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 | 645 | )); |
| 646 | 646 | return $grid_field_arr; |
| 647 | 647 | } |
| 648 | 648 | |
| 649 | 649 | function build_animap_list_for_customer($accountid, $accounttype) { |
| 650 | 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"))) |
|
| 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 | 656 | )); |
| 657 | 657 | return $grid_field_arr; |
| 658 | 658 | } |
@@ -668,13 +668,13 @@ discard block |
||
| 668 | 668 | |
| 669 | 669 | function set_block_pattern_action_buttons($id) { |
| 670 | 670 | $ret_url = ''; |
| 671 | - $ret_url .= '<a href="/did/delete/' . $id . '/" class="icon delete_image" title="Delete" onClick="return get_alert_msg();"> </a>'; |
|
| 671 | + $ret_url .= '<a href="/did/delete/'.$id.'/" class="icon delete_image" title="Delete" onClick="return get_alert_msg();"> </a>'; |
|
| 672 | 672 | return $ret_url; |
| 673 | 673 | } |
| 674 | 674 | |
| 675 | 675 | function build_animap_list() { |
| 676 | 676 | $grid_field_arr = json_encode(array(array("Caller ID", "180", "number", "", "", ""), |
| 677 | - array(gettext("status"),"180","status","status","animap","get_status"), |
|
| 677 | + array(gettext("status"), "180", "status", "status", "animap", "get_status"), |
|
| 678 | 678 | array(gettext("Action"), "130", "", "", "", |
| 679 | 679 | array( |
| 680 | 680 | "EDIT_ANIMAP" => array("url" => "accounts/callingcards_animap_list_edit/", "mode" => "single"), |
@@ -21,8 +21,9 @@ discard block |
||
| 21 | 21 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 22 | 22 | ############################################################################### |
| 23 | 23 | |
| 24 | -if (!defined('BASEPATH')) |
|
| 24 | +if (!defined('BASEPATH')) { |
|
| 25 | 25 | exit('No direct script access allowed'); |
| 26 | +} |
|
| 26 | 27 | |
| 27 | 28 | class Accounts_form { |
| 28 | 29 | function __construct($library_name = '') { |
@@ -279,8 +280,7 @@ discard block |
||
| 279 | 280 | array(gettext('Tax'), 'tax_id', 'SELECT', '', '', 'tOOL TIP', 'Please Enter account number', 'id', 'taxes_description', 'taxes', 'build_dropdown', 'where_arr', array('status' => 0, 'reseller_id' => $loginid), 'multi'), |
| 280 | 281 | ); |
| 281 | 282 | |
| 282 | -} |
|
| 283 | -else{ |
|
| 283 | +} else{ |
|
| 284 | 284 | $form[gettext('Billing Information')] = array( |
| 285 | 285 | array(gettext('Rate Group'), 'pricelist_id', 'SELECT', '', array("name" => "pricelist_id", 'rules' => 'required'), 'tOOL TIP', 'Please Enter account number', 'id', 'name', 'pricelists', 'build_dropdown', 'where_arr', array("status" => "0", "reseller_id" => "0")), |
| 286 | 286 | |
@@ -442,8 +442,7 @@ discard block |
||
| 442 | 442 | array('', 'HIDDEN', 'advance_search', '1', '', '', '') |
| 443 | 443 | ); |
| 444 | 444 | |
| 445 | - } |
|
| 446 | - else |
|
| 445 | + } else |
|
| 447 | 446 | { |
| 448 | 447 | |
| 449 | 448 | $form['forms'] = array("", array('id' => "account_search")); |
@@ -603,8 +602,9 @@ discard block |
||
| 603 | 602 | function build_grid_buttons_customer() { |
| 604 | 603 | $logintype = $this->CI->session->userdata('userlevel_logintype'); |
| 605 | 604 | $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/"); |
|
| 605 | + if ($logintype != 1) { |
|
| 606 | + $provider = array(gettext("Create Provider"), "btn btn-line-blue btn", "fa fa-plus-circle fa-lg", "button_action", "/accounts/provider_add/"); |
|
| 607 | + } |
|
| 608 | 608 | // array(display name, width, db_field_parent_table,feidname, db_field_child_table,function name); |
| 609 | 609 | $buttons_json = json_encode(array( |
| 610 | 610 | array(gettext("Create Customer"), "btn btn-line-warning btn", "fa fa-plus-circle fa-lg", "button_action", "/accounts/customer_add/"), |
@@ -104,7 +104,7 @@ |
||
| 104 | 104 | foreach($csv_value as $field_name => $field_val){ |
| 105 | 105 | if($csv_key == 0){ |
| 106 | 106 | echo "<th>".ucfirst($field_name)."</th>"; |
| 107 | - }else{ |
|
| 107 | + } else{ |
|
| 108 | 108 | echo "<td class='portlet-content'>".$field_val."</td>"; |
| 109 | 109 | } |
| 110 | 110 | } |
@@ -15,7 +15,7 @@ discard block |
||
| 15 | 15 | <div class="col-md-12"> |
| 16 | 16 | <div class="w-box"> |
| 17 | 17 | <span style="margin-left:10px; text-align: center;background-color: none;color:#DD191D;"> |
| 18 | - <? if(isset($error) && !empty($error)) { |
|
| 18 | + <? if (isset($error) && ! empty($error)) { |
|
| 19 | 19 | echo $error; |
| 20 | 20 | }?> |
| 21 | 21 | </span> |
@@ -31,19 +31,19 @@ discard block |
||
| 31 | 31 | <div class="col-md-12 no-padding"> |
| 32 | 32 | <label class="col-md-3">Rate Group:</label> |
| 33 | 33 | <div> |
| 34 | - <? $pricelists = form_dropdown('pricelist_id', $this->db_model->build_dropdown("id,name", "pricelists","where_arr", array("reseller_id" => "0", "status" => "0")), ''); |
|
| 34 | + <? $pricelists = form_dropdown('pricelist_id', $this->db_model->build_dropdown("id,name", "pricelists", "where_arr", array("reseller_id" => "0", "status" => "0")), ''); |
|
| 35 | 35 | echo $pricelists; |
| 36 | 36 | ?> |
| 37 | 37 | </div> |
| 38 | 38 | </div> |
| 39 | 39 | <? |
| 40 | - $logintype=$this->session->userdata('userlevel_logintype'); |
|
| 40 | + $logintype = $this->session->userdata('userlevel_logintype'); |
|
| 41 | 41 | // $trunk=null; |
| 42 | - if($logintype !=1) { ?> |
|
| 42 | + if ($logintype != 1) { ?> |
|
| 43 | 43 | <div class="col-md-12 no-padding"> |
| 44 | 44 | <label class="col-md-3">Force Trunk:</label> |
| 45 | 45 | <div> |
| 46 | - <? $trunklist = form_dropdown_all('trunk_id', $this->db_model->build_dropdown("id,name", "trunks","where_arr", array("status" => "0")), ''); |
|
| 46 | + <? $trunklist = form_dropdown_all('trunk_id', $this->db_model->build_dropdown("id,name", "trunks", "where_arr", array("status" => "0")), ''); |
|
| 47 | 47 | echo $trunklist; |
| 48 | 48 | ?> |
| 49 | 49 | </div> |
@@ -100,7 +100,7 @@ discard block |
||
| 100 | 100 | <?}?> |
| 101 | 101 | |
| 102 | 102 | <?php |
| 103 | - if(isset($csv_tmp_data) && !empty($csv_tmp_data)){ ?> |
|
| 103 | + if (isset($csv_tmp_data) && ! empty($csv_tmp_data)) { ?> |
|
| 104 | 104 | |
| 105 | 105 | <section class="slice color-three"> |
| 106 | 106 | <div class="w-section inverse no-padding"> |
@@ -109,14 +109,14 @@ discard block |
||
| 109 | 109 | <div class="col-md-12 margin-t-10"> |
| 110 | 110 | <form id="import_form" name="import_form" action="<?=base_url()?>rates/origination_rate_import_file/<?= $pricelistid?>/<?=$trunkid?>/<?=$check_header?>/" method="POST"> |
| 111 | 111 | <table width="100%" border="1" class="details_table table"> |
| 112 | - <? $cnt =7; |
|
| 113 | - foreach($csv_tmp_data as $csv_key => $csv_value){ |
|
| 114 | - if($csv_key < 15){ |
|
| 112 | + <? $cnt = 7; |
|
| 113 | + foreach ($csv_tmp_data as $csv_key => $csv_value) { |
|
| 114 | + if ($csv_key < 15) { |
|
| 115 | 115 | echo "<tr>"; |
| 116 | - foreach($csv_value as $field_name => $field_val){ |
|
| 117 | - if($csv_key == 0){ |
|
| 116 | + foreach ($csv_value as $field_name => $field_val) { |
|
| 117 | + if ($csv_key == 0) { |
|
| 118 | 118 | echo "<th>".ucfirst($field_name)."</th>"; |
| 119 | - }else{ |
|
| 119 | + } else { |
|
| 120 | 120 | echo "<td class='portlet-content'>".$field_val."</td>"; |
| 121 | 121 | } |
| 122 | 122 | } |
@@ -236,7 +236,7 @@ |
||
| 236 | 236 | <div class="container"> |
| 237 | 237 | <form method="post" action="<?= base_url()?>email/email_client_get/" enctype="multipart/form-data" name="myform" id="myform" onsubmit="return(regvalidate())"> |
| 238 | 238 | <span style="margin-left:10px; text-align: center;background-color: none;color:#DD191D;"> |
| 239 | - <? if(isset($error) && !empty($error)) { |
|
| 239 | + <? if (isset($error) && ! empty($error)) { |
|
| 240 | 240 | echo $error; |
| 241 | 241 | }?> |
| 242 | 242 | </span> |
@@ -1,4 +1,6 @@ |
||
| 1 | -<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); |
|
| 1 | +<?php if ( ! defined('BASEPATH')) { |
|
| 2 | + exit('No direct script access allowed'); |
|
| 3 | +} |
|
| 2 | 4 | |
| 3 | 5 | //DID list |
| 4 | 6 | $lang['DID.MANAGE_DIDs'] = 'Manage DIDs'; |
@@ -1,4 +1,6 @@ |
||
| 1 | -<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); |
|
| 1 | +<?php if ( ! defined('BASEPATH')) { |
|
| 2 | + exit('No direct script access allowed'); |
|
| 3 | +} |
|
| 2 | 4 | |
| 3 | 5 | //did list |
| 4 | 6 | $lang['DID.MANAGE_DIDs'] = 'Gestionar DIDs'; |
@@ -16,7 +16,7 @@ |
||
| 16 | 16 | <div class="col-md-12"> |
| 17 | 17 | <div class="w-box"> |
| 18 | 18 | <span style="margin-left:10px; text-align: center;background-color: none;color:#1c8400;"> |
| 19 | - <? if(isset($error) && !empty($error)) { |
|
| 19 | + <? if (isset($error) && ! empty($error)) { |
|
| 20 | 20 | echo $error; |
| 21 | 21 | }?> |
| 22 | 22 | </span> |
@@ -131,7 +131,7 @@ |
||
| 131 | 131 | </label> |
| 132 | 132 | </div> |
| 133 | 133 | <div class="col-md-3"> |
| 134 | - <input class="col-md-2 form-control" name="speed_dial_<?php echo $i; ?>" id="speed_dial_<?php echo $i; ?>" size="16" type="text" value="<?php if (isset($speeddial[$i]) && !empty($speeddial[$i])) { |
|
| 134 | + <input class="col-md-2 form-control" name="speed_dial_<?php echo $i; ?>" id="speed_dial_<?php echo $i; ?>" size="16" type="text" value="<?php if (isset($speeddial[$i]) && ! empty($speeddial[$i])) { |
|
| 135 | 135 | echo $speeddial[$i]; |
| 136 | 136 | } ?>"> |
| 137 | 137 | </div> |
@@ -206,13 +206,13 @@ |
||
| 206 | 206 | </div> |
| 207 | 207 | </div> |
| 208 | 208 | <?php |
| 209 | - if($account_data['logo'] != ''){ |
|
| 210 | - $logo=$account_data['file']; |
|
| 211 | - }else{ |
|
| 212 | - $logo=$account_data['logo']; |
|
| 209 | + if ($account_data['logo'] != '') { |
|
| 210 | + $logo = $account_data['file']; |
|
| 211 | + } else { |
|
| 212 | + $logo = $account_data['logo']; |
|
| 213 | 213 | } |
| 214 | - if($logo != ''){ |
|
| 215 | - $file_name= base_url()."upload/$logo"; |
|
| 214 | + if ($logo != '') { |
|
| 215 | + $file_name = base_url()."upload/$logo"; |
|
| 216 | 216 | ?> |
| 217 | 217 | |
| 218 | 218 | <div class='col-md-12 no-padding'> |
@@ -208,7 +208,7 @@ |
||
| 208 | 208 | <?php |
| 209 | 209 | if($account_data['logo'] != ''){ |
| 210 | 210 | $logo=$account_data['file']; |
| 211 | - }else{ |
|
| 211 | + } else{ |
|
| 212 | 212 | $logo=$account_data['logo']; |
| 213 | 213 | } |
| 214 | 214 | if($logo != ''){ |
@@ -13,7 +13,7 @@ |
||
| 13 | 13 | <div class="w-section inverse no-padding"> |
| 14 | 14 | <?php echo $form; ?> |
| 15 | 15 | <?php |
| 16 | - if(isset($validation_errors) && $validation_errors != ''){ ?>
|
|
| 16 | + if (isset($validation_errors) && $validation_errors != '') { ?>
|
|
| 17 | 17 | <script> |
| 18 | 18 | var ERR_STR = '<?php echo $validation_errors; ?>'; |
| 19 | 19 | print_error(ERR_STR); |