Add app/device_vendors.
This commit is contained in:
parent
506483fcfa
commit
eb2541d92b
|
|
@ -0,0 +1,807 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
//application details
|
||||||
|
$apps[$x]['name'] = 'Device Vendors';
|
||||||
|
$apps[$x]['uuid'] = '4111e520-4ecc-431c-9763-d50bf87dfd50';
|
||||||
|
$apps[$x]['category'] = '';
|
||||||
|
$apps[$x]['subcategory'] = '';
|
||||||
|
$apps[$x]['version'] = '';
|
||||||
|
$apps[$x]['license'] = 'Mozilla Public License 1.1';
|
||||||
|
$apps[$x]['url'] = 'http://www.fusionpbx.com';
|
||||||
|
$apps[$x]['description']['en-us'] = '';
|
||||||
|
|
||||||
|
//permission details
|
||||||
|
$y = 0;
|
||||||
|
$apps[$x]['permissions'][$y]['name'] = 'device_vendor_view';
|
||||||
|
$apps[$x]['permissions'][$y]['groups'][] = 'superadmin';
|
||||||
|
$y++;
|
||||||
|
$apps[$x]['permissions'][$y]['name'] = 'device_vendor_add';
|
||||||
|
$apps[$x]['permissions'][$y]['groups'][] = 'superadmin';
|
||||||
|
$y++;
|
||||||
|
$apps[$x]['permissions'][$y]['name'] = 'device_vendor_edit';
|
||||||
|
$apps[$x]['permissions'][$y]['groups'][] = 'superadmin';
|
||||||
|
$y++;
|
||||||
|
$apps[$x]['permissions'][$y]['name'] = 'device_vendor_delete';
|
||||||
|
$apps[$x]['permissions'][$y]['groups'][] = 'superadmin';
|
||||||
|
$y++;
|
||||||
|
$apps[$x]['permissions'][$y]['name'] = 'device_vendor_function_view';
|
||||||
|
$apps[$x]['permissions'][$y]['groups'][] = 'superadmin';
|
||||||
|
$y++;
|
||||||
|
$apps[$x]['permissions'][$y]['name'] = 'device_vendor_function_add';
|
||||||
|
$apps[$x]['permissions'][$y]['groups'][] = 'superadmin';
|
||||||
|
$y++;
|
||||||
|
$apps[$x]['permissions'][$y]['name'] = 'device_vendor_function_edit';
|
||||||
|
$apps[$x]['permissions'][$y]['groups'][] = 'superadmin';
|
||||||
|
$y++;
|
||||||
|
$apps[$x]['permissions'][$y]['name'] = 'device_vendor_function_delete';
|
||||||
|
$apps[$x]['permissions'][$y]['groups'][] = 'superadmin';
|
||||||
|
$y++;
|
||||||
|
|
||||||
|
//schema details
|
||||||
|
$y = 0; //table array index
|
||||||
|
$z = 0; //field array index
|
||||||
|
$apps[$x]['db'][$y]['table'] = 'v_device_vendors';
|
||||||
|
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'device_vendor_uuid';
|
||||||
|
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = 'uuid';
|
||||||
|
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = 'text';
|
||||||
|
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = 'char(36)';
|
||||||
|
$apps[$x]['db'][$y]['fields'][$z]['key']['type'] = 'primary';
|
||||||
|
$z++;
|
||||||
|
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'name';
|
||||||
|
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
|
||||||
|
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = 'Enter the name.';
|
||||||
|
$z++;
|
||||||
|
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'enabled';
|
||||||
|
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
|
||||||
|
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = 'Set the status of the vendor.';
|
||||||
|
$z++;
|
||||||
|
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'description';
|
||||||
|
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
|
||||||
|
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = 'Enter the description.';
|
||||||
|
$z++;
|
||||||
|
|
||||||
|
$y = 1; //table array index
|
||||||
|
$z = 0; //field array index
|
||||||
|
$apps[$x]['db'][$y]['table'] = 'v_device_vendor_functions';
|
||||||
|
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'device_vendor_function_uuid';
|
||||||
|
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = 'uuid';
|
||||||
|
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = 'text';
|
||||||
|
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = 'char(36)';
|
||||||
|
$apps[$x]['db'][$y]['fields'][$z]['key']['type'] = 'primary';
|
||||||
|
$z++;
|
||||||
|
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'device_vendor_uuid';
|
||||||
|
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = 'uuid';
|
||||||
|
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = 'text';
|
||||||
|
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = 'char(36)';
|
||||||
|
$apps[$x]['db'][$y]['fields'][$z]['key']['type'] = 'foreign';
|
||||||
|
$apps[$x]['db'][$y]['fields'][$z]['key']['reference']['table'] = 'v_device_vendor';
|
||||||
|
$apps[$x]['db'][$y]['fields'][$z]['key']['reference']['field'] = 'device_vendor_uuid';
|
||||||
|
$z++;
|
||||||
|
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'label';
|
||||||
|
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
|
||||||
|
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = 'Enter the label.';
|
||||||
|
$z++;
|
||||||
|
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'name';
|
||||||
|
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
|
||||||
|
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = 'Enter the name.';
|
||||||
|
$z++;
|
||||||
|
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'value';
|
||||||
|
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
|
||||||
|
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = 'Enter the value.';
|
||||||
|
$z++;
|
||||||
|
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'enabled';
|
||||||
|
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
|
||||||
|
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = 'Set the status of the function.';
|
||||||
|
$z++;
|
||||||
|
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'description';
|
||||||
|
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
|
||||||
|
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = 'Enter the description.';
|
||||||
|
$z++;
|
||||||
|
|
||||||
|
//vendor details
|
||||||
|
$y=0; //vendor array index
|
||||||
|
$z=0; //functions array index
|
||||||
|
$vendors[$y]['name'] = "yealink";
|
||||||
|
$vendors[$y]['functions'][$z]['label'] = "label-na";
|
||||||
|
$vendors[$y]['functions'][$z]['name'] = "na";
|
||||||
|
$vendors[$y]['functions'][$z]['value'] = "0";
|
||||||
|
$vendors[$y]['functions'][$z]['groups'][] = "admin";
|
||||||
|
$vendors[$y]['functions'][$z]['groups'][] = "superadmin";
|
||||||
|
$z++;
|
||||||
|
$vendors[$y]['functions'][$z]['label'] = "label-line";
|
||||||
|
$vendors[$y]['functions'][$z]['name'] = "line";
|
||||||
|
$vendors[$y]['functions'][$z]['value'] = "15";
|
||||||
|
$z++;
|
||||||
|
$vendors[$y]['functions'][$z]['label'] = "label-conference";
|
||||||
|
$vendors[$y]['functions'][$z]['name'] = "conference";
|
||||||
|
$vendors[$y]['functions'][$z]['value'] = "1";
|
||||||
|
$z++;
|
||||||
|
$vendors[$y]['functions'][$z]['label'] = "label-forward";
|
||||||
|
$vendors[$y]['functions'][$z]['name'] = "forward";
|
||||||
|
$vendors[$y]['functions'][$z]['value'] = "2";
|
||||||
|
$z++;
|
||||||
|
$vendors[$y]['functions'][$z]['label'] = "label-transfer";
|
||||||
|
$vendors[$y]['functions'][$z]['name'] = "transfer";
|
||||||
|
$vendors[$y]['functions'][$z]['value'] = "3";
|
||||||
|
$z++;
|
||||||
|
$vendors[$y]['functions'][$z]['label'] = "label-hold";
|
||||||
|
$vendors[$y]['functions'][$z]['name'] = "hold";
|
||||||
|
$vendors[$y]['functions'][$z]['value'] = "4";
|
||||||
|
$z++;
|
||||||
|
$vendors[$y]['functions'][$z]['label'] = "label-dnd";
|
||||||
|
$vendors[$y]['functions'][$z]['name'] = "dnd";
|
||||||
|
$vendors[$y]['functions'][$z]['value'] = "5";
|
||||||
|
$z++;
|
||||||
|
$vendors[$y]['functions'][$z]['label'] = "label-redial";
|
||||||
|
$vendors[$y]['functions'][$z]['name'] = "redial";
|
||||||
|
$vendors[$y]['functions'][$z]['value'] = "6";
|
||||||
|
$z++;
|
||||||
|
$vendors[$y]['functions'][$z]['label'] = "label-call_return";
|
||||||
|
$vendors[$y]['functions'][$z]['name'] = "call_return";
|
||||||
|
$vendors[$y]['functions'][$z]['value'] = "7";
|
||||||
|
$z++;
|
||||||
|
$vendors[$y]['functions'][$z]['label'] = "label-sms";
|
||||||
|
$vendors[$y]['functions'][$z]['name'] = "sms";
|
||||||
|
$vendors[$y]['functions'][$z]['value'] = "8";
|
||||||
|
$z++;
|
||||||
|
$vendors[$y]['functions'][$z]['label'] = "label-call_pickup";
|
||||||
|
$vendors[$y]['functions'][$z]['name'] = "call_pickup";
|
||||||
|
$vendors[$y]['functions'][$z]['value'] = "9";
|
||||||
|
$z++;
|
||||||
|
$vendors[$y]['functions'][$z]['label'] = "label-call_park";
|
||||||
|
$vendors[$y]['functions'][$z]['name'] = "call_park";
|
||||||
|
$vendors[$y]['functions'][$z]['value'] = "10";
|
||||||
|
$z++;
|
||||||
|
$vendors[$y]['functions'][$z]['label'] = "label-dtmf";
|
||||||
|
$vendors[$y]['functions'][$z]['name'] = "dtmf";
|
||||||
|
$vendors[$y]['functions'][$z]['value'] = "11";
|
||||||
|
$z++;
|
||||||
|
$vendors[$y]['functions'][$z]['label'] = "label-voicemail";
|
||||||
|
$vendors[$y]['functions'][$z]['name'] = "voicemail";
|
||||||
|
$vendors[$y]['functions'][$z]['value'] = "12";
|
||||||
|
$z++;
|
||||||
|
$vendors[$y]['functions'][$z]['label'] = "label-speed_dial";
|
||||||
|
$vendors[$y]['functions'][$z]['name'] = "speed_dial";
|
||||||
|
$vendors[$y]['functions'][$z]['value'] = "13";
|
||||||
|
$z++;
|
||||||
|
$vendors[$y]['functions'][$z]['label'] = "label-intercom";
|
||||||
|
$vendors[$y]['functions'][$z]['name'] = "intercom";
|
||||||
|
$vendors[$y]['functions'][$z]['value'] = "14";
|
||||||
|
$z++;
|
||||||
|
$vendors[$y]['functions'][$z]['label'] = "label-blf";
|
||||||
|
$vendors[$y]['functions'][$z]['name'] = "blf";
|
||||||
|
$vendors[$y]['functions'][$z]['value'] = "16";
|
||||||
|
$z++;
|
||||||
|
$vendors[$y]['functions'][$z]['label'] = "label-url";
|
||||||
|
$vendors[$y]['functions'][$z]['name'] = "url";
|
||||||
|
$vendors[$y]['functions'][$z]['value'] = "17";
|
||||||
|
$z++;
|
||||||
|
$vendors[$y]['functions'][$z]['label'] = "label-public_hold";
|
||||||
|
$vendors[$y]['functions'][$z]['name'] = "public_hold";
|
||||||
|
$vendors[$y]['functions'][$z]['value'] = "19";
|
||||||
|
$z++;
|
||||||
|
$vendors[$y]['functions'][$z]['label'] = "label-private";
|
||||||
|
$vendors[$y]['functions'][$z]['name'] = "private";
|
||||||
|
$vendors[$y]['functions'][$z]['value'] = "20";
|
||||||
|
$z++;
|
||||||
|
$vendors[$y]['functions'][$z]['label'] = "label-shared_line";
|
||||||
|
$vendors[$y]['functions'][$z]['name'] = "shared_line";
|
||||||
|
$vendors[$y]['functions'][$z]['value'] = "21";
|
||||||
|
$z++;
|
||||||
|
$vendors[$y]['functions'][$z]['label'] = "label-xml_group";
|
||||||
|
$vendors[$y]['functions'][$z]['name'] = "xml_group";
|
||||||
|
$vendors[$y]['functions'][$z]['value'] = "22";
|
||||||
|
$z++;
|
||||||
|
$vendors[$y]['functions'][$z]['label'] = "label-group_pickup";
|
||||||
|
$vendors[$y]['functions'][$z]['name'] = "group_pickup";
|
||||||
|
$vendors[$y]['functions'][$z]['value'] = "23";
|
||||||
|
$z++;
|
||||||
|
$vendors[$y]['functions'][$z]['label'] = "label-paging";
|
||||||
|
$vendors[$y]['functions'][$z]['name'] = "paging";
|
||||||
|
$vendors[$y]['functions'][$z]['value'] = "24";
|
||||||
|
$z++;
|
||||||
|
$vendors[$y]['functions'][$z]['label'] = "label-record";
|
||||||
|
$vendors[$y]['functions'][$z]['name'] = "record";
|
||||||
|
$vendors[$y]['functions'][$z]['value'] = "25";
|
||||||
|
$z++;
|
||||||
|
$vendors[$y]['functions'][$z]['label'] = "label-xml_browser";
|
||||||
|
$vendors[$y]['functions'][$z]['name'] = "xml_browser";
|
||||||
|
$vendors[$y]['functions'][$z]['value'] = "27";
|
||||||
|
$z++;
|
||||||
|
$vendors[$y]['functions'][$z]['label'] = "label-history";
|
||||||
|
$vendors[$y]['functions'][$z]['name'] = "history";
|
||||||
|
$vendors[$y]['functions'][$z]['value'] = "28";
|
||||||
|
$z++;
|
||||||
|
$vendors[$y]['functions'][$z]['label'] = "label-directory";
|
||||||
|
$vendors[$y]['functions'][$z]['name'] = "directory";
|
||||||
|
$vendors[$y]['functions'][$z]['value'] = "29";
|
||||||
|
$z++;
|
||||||
|
$vendors[$y]['functions'][$z]['label'] = "label-menu";
|
||||||
|
$vendors[$y]['functions'][$z]['name'] = "menu";
|
||||||
|
$vendors[$y]['functions'][$z]['value'] = "30";
|
||||||
|
$z++;
|
||||||
|
$vendors[$y]['functions'][$z]['label'] = "label-new_sms";
|
||||||
|
$vendors[$y]['functions'][$z]['name'] = "new_sms";
|
||||||
|
$vendors[$y]['functions'][$z]['value'] = "32";
|
||||||
|
$z++;
|
||||||
|
$vendors[$y]['functions'][$z]['label'] = "label-status";
|
||||||
|
$vendors[$y]['functions'][$z]['name'] = "status";
|
||||||
|
$vendors[$y]['functions'][$z]['value'] = "33";
|
||||||
|
$z++;
|
||||||
|
$vendors[$y]['functions'][$z]['label'] = "label-hot_desking";
|
||||||
|
$vendors[$y]['functions'][$z]['name'] = "hot_desking";
|
||||||
|
$vendors[$y]['functions'][$z]['value'] = "34";
|
||||||
|
$z++;
|
||||||
|
$vendors[$y]['functions'][$z]['label'] = "label-url_record";
|
||||||
|
$vendors[$y]['functions'][$z]['name'] = "url_record";
|
||||||
|
$vendors[$y]['functions'][$z]['value'] = "35";
|
||||||
|
$z++;
|
||||||
|
$vendors[$y]['functions'][$z]['label'] = "label-ldap";
|
||||||
|
$vendors[$y]['functions'][$z]['name'] = "ldap";
|
||||||
|
$vendors[$y]['functions'][$z]['value'] = "38";
|
||||||
|
$z++;
|
||||||
|
$vendors[$y]['functions'][$z]['label'] = "label-blf_list";
|
||||||
|
$vendors[$y]['functions'][$z]['name'] = "blf_list";
|
||||||
|
$vendors[$y]['functions'][$z]['value'] = "39";
|
||||||
|
$z++;
|
||||||
|
$vendors[$y]['functions'][$z]['label'] = "label-prefix";
|
||||||
|
$vendors[$y]['functions'][$z]['name'] = "prefix";
|
||||||
|
$vendors[$y]['functions'][$z]['value'] = "40";
|
||||||
|
$z++;
|
||||||
|
$vendors[$y]['functions'][$z]['label'] = "label-zero_sp_touch";
|
||||||
|
$vendors[$y]['functions'][$z]['name'] = "zero_sp_touch";
|
||||||
|
$vendors[$y]['functions'][$z]['value'] = "41";
|
||||||
|
$z++;
|
||||||
|
$vendors[$y]['functions'][$z]['label'] = "label-acd";
|
||||||
|
$vendors[$y]['functions'][$z]['name'] = "acd";
|
||||||
|
$vendors[$y]['functions'][$z]['value'] = "42";
|
||||||
|
$z++;
|
||||||
|
$vendors[$y]['functions'][$z]['label'] = "label-local_phonebook";
|
||||||
|
$vendors[$y]['functions'][$z]['name'] = "local_phonebook";
|
||||||
|
$vendors[$y]['functions'][$z]['value'] = "43";
|
||||||
|
$z++;
|
||||||
|
$vendors[$y]['functions'][$z]['label'] = "label-broadsoft_phonebook";
|
||||||
|
$vendors[$y]['functions'][$z]['name'] = "broadsoft_phonebook";
|
||||||
|
$vendors[$y]['functions'][$z]['value'] = "44";
|
||||||
|
$z++;
|
||||||
|
$vendors[$y]['functions'][$z]['label'] = "label-local_group";
|
||||||
|
$vendors[$y]['functions'][$z]['name'] = "local_group";
|
||||||
|
$vendors[$y]['functions'][$z]['value'] = "45";
|
||||||
|
$z++;
|
||||||
|
$vendors[$y]['functions'][$z]['label'] = "label-broadsoft_group";
|
||||||
|
$vendors[$y]['functions'][$z]['name'] = "broadsoft_group";
|
||||||
|
$vendors[$y]['functions'][$z]['value'] = "46";
|
||||||
|
$z++;
|
||||||
|
$vendors[$y]['functions'][$z]['label'] = "label-xml_phonebook";
|
||||||
|
$vendors[$y]['functions'][$z]['name'] = "xml_phonebook";
|
||||||
|
$vendors[$y]['functions'][$z]['value'] = "47";
|
||||||
|
$z++;
|
||||||
|
$vendors[$y]['functions'][$z]['label'] = "label-switch_account_up";
|
||||||
|
$vendors[$y]['functions'][$z]['name'] = "switch_account_up";
|
||||||
|
$vendors[$y]['functions'][$z]['value'] = "48";
|
||||||
|
$z++;
|
||||||
|
$vendors[$y]['functions'][$z]['label'] = "label-switch_account_down";
|
||||||
|
$vendors[$y]['functions'][$z]['name'] = "switch_account_down";
|
||||||
|
$vendors[$y]['functions'][$z]['value'] = "49";
|
||||||
|
$z++;
|
||||||
|
$vendors[$y]['functions'][$z]['label'] = "label-keypad_lock";
|
||||||
|
$vendors[$y]['functions'][$z]['name'] = "keypad_lock";
|
||||||
|
$vendors[$y]['functions'][$z]['value'] = "50";
|
||||||
|
$z++;
|
||||||
|
|
||||||
|
$y++; //vendors array index
|
||||||
|
$z=0; //functions array index
|
||||||
|
$vendors[$y]['name'] = "snom";
|
||||||
|
$vendors[$y]['functions'][$z]['label'] = "label-none";
|
||||||
|
$vendors[$y]['functions'][$z]['name'] = "none";
|
||||||
|
$vendors[$y]['functions'][$z]['value'] = "none";
|
||||||
|
$z++;
|
||||||
|
$vendors[$y]['functions'][$z]['label'] = "label-url";
|
||||||
|
$vendors[$y]['functions'][$z]['name'] = "action_url";
|
||||||
|
$vendors[$y]['functions'][$z]['value'] = "action_url";
|
||||||
|
$z++;
|
||||||
|
$vendors[$y]['functions'][$z]['label'] = "label-auto_answer";
|
||||||
|
$vendors[$y]['functions'][$z]['name'] = "auto_answer";
|
||||||
|
$vendors[$y]['functions'][$z]['value'] = "auto_answer";
|
||||||
|
$z++;
|
||||||
|
$vendors[$y]['functions'][$z]['label'] = "label-blf";
|
||||||
|
$vendors[$y]['functions'][$z]['name'] = "blf";
|
||||||
|
$vendors[$y]['functions'][$z]['value'] = "blf";
|
||||||
|
$z++;
|
||||||
|
$vendors[$y]['functions'][$z]['label'] = "label-button";
|
||||||
|
$vendors[$y]['functions'][$z]['name'] = "button";
|
||||||
|
$vendors[$y]['functions'][$z]['value'] = "button";
|
||||||
|
$z++;
|
||||||
|
$vendors[$y]['functions'][$z]['label'] = "label-call_agent";
|
||||||
|
$vendors[$y]['functions'][$z]['name'] = "call_agent";
|
||||||
|
$vendors[$y]['functions'][$z]['value'] = "call_agent";
|
||||||
|
$z++;
|
||||||
|
$vendors[$y]['functions'][$z]['label'] = "label-conference";
|
||||||
|
$vendors[$y]['functions'][$z]['name'] = "conference";
|
||||||
|
$vendors[$y]['functions'][$z]['value'] = "conference";
|
||||||
|
$z++;
|
||||||
|
$vendors[$y]['functions'][$z]['label'] = "label-dtmf";
|
||||||
|
$vendors[$y]['functions'][$z]['name'] = "dtmf";
|
||||||
|
$vendors[$y]['functions'][$z]['value'] = "dtmf";
|
||||||
|
$z++;
|
||||||
|
$vendors[$y]['functions'][$z]['label'] = "label-extension";
|
||||||
|
$vendors[$y]['functions'][$z]['name'] = "dest";
|
||||||
|
$vendors[$y]['functions'][$z]['value'] = "dest";
|
||||||
|
$z++;
|
||||||
|
$vendors[$y]['functions'][$z]['label'] = "label-redirect";
|
||||||
|
$vendors[$y]['functions'][$z]['name'] = "redirect";
|
||||||
|
$vendors[$y]['functions'][$z]['value'] = "redirect";
|
||||||
|
$z++;
|
||||||
|
$vendors[$y]['functions'][$z]['label'] = "label-intercom";
|
||||||
|
$vendors[$y]['functions'][$z]['name'] = "icom";
|
||||||
|
$vendors[$y]['functions'][$z]['value'] = "icom";
|
||||||
|
$z++;
|
||||||
|
$vendors[$y]['functions'][$z]['label'] = "label-ivr";
|
||||||
|
$vendors[$y]['functions'][$z]['name'] = "ivr";
|
||||||
|
$vendors[$y]['functions'][$z]['value'] = "ivr";
|
||||||
|
$z++;
|
||||||
|
$vendors[$y]['functions'][$z]['label'] = "label-key_event";
|
||||||
|
$vendors[$y]['functions'][$z]['name'] = "keyevent";
|
||||||
|
$vendors[$y]['functions'][$z]['value'] = "keyevent";
|
||||||
|
$z++;
|
||||||
|
$vendors[$y]['functions'][$z]['label'] = "label-line";
|
||||||
|
$vendors[$y]['functions'][$z]['name'] = "line";
|
||||||
|
$vendors[$y]['functions'][$z]['value'] = "line";
|
||||||
|
$z++;
|
||||||
|
$vendors[$y]['functions'][$z]['label'] = "label-multicast_page";
|
||||||
|
$vendors[$y]['functions'][$z]['name'] = "multicast";
|
||||||
|
$vendors[$y]['functions'][$z]['value'] = "multicast";
|
||||||
|
$z++;
|
||||||
|
$vendors[$y]['functions'][$z]['label'] = "label-orbit";
|
||||||
|
$vendors[$y]['functions'][$z]['name'] = "orbit";
|
||||||
|
$vendors[$y]['functions'][$z]['value'] = "orbit";
|
||||||
|
$z++;
|
||||||
|
$vendors[$y]['functions'][$z]['label'] = "label-presence";
|
||||||
|
$vendors[$y]['functions'][$z]['name'] = "presence";
|
||||||
|
$vendors[$y]['functions'][$z]['value'] = "presence";
|
||||||
|
$z++;
|
||||||
|
$vendors[$y]['functions'][$z]['label'] = "label-p2t";
|
||||||
|
$vendors[$y]['functions'][$z]['name'] = "p2t";
|
||||||
|
$vendors[$y]['functions'][$z]['value'] = "p2t";
|
||||||
|
$z++;
|
||||||
|
$vendors[$y]['functions'][$z]['label'] = "label-shared_line";
|
||||||
|
$vendors[$y]['functions'][$z]['name'] = "mult";
|
||||||
|
$vendors[$y]['functions'][$z]['value'] = "mult";
|
||||||
|
$z++;
|
||||||
|
$vendors[$y]['functions'][$z]['label'] = "label-speed_dial";
|
||||||
|
$vendors[$y]['functions'][$z]['name'] = "speed";
|
||||||
|
$vendors[$y]['functions'][$z]['value'] = "speed";
|
||||||
|
$z++;
|
||||||
|
$vendors[$y]['functions'][$z]['label'] = "label-transfer";
|
||||||
|
$vendors[$y]['functions'][$z]['name'] = "transfer";
|
||||||
|
$vendors[$y]['functions'][$z]['value'] = "transfer";
|
||||||
|
$z++;
|
||||||
|
$vendors[$y]['functions'][$z]['label'] = "label-record";
|
||||||
|
$vendors[$y]['functions'][$z]['name'] = "recorder";
|
||||||
|
$vendors[$y]['functions'][$z]['value'] = "recorder";
|
||||||
|
$z++;
|
||||||
|
|
||||||
|
$y++; //vendors array index
|
||||||
|
$z=0; //functions array index
|
||||||
|
$vendors[$y]['name'] = "polycom";
|
||||||
|
$vendors[$y]['functions'][$z]['label'] = "label-line";
|
||||||
|
$vendors[$y]['functions'][$z]['name'] = "line";
|
||||||
|
$vendors[$y]['functions'][$z]['value'] = "line";
|
||||||
|
$z++;
|
||||||
|
$vendors[$y]['functions'][$z]['label'] = "label-automata";
|
||||||
|
$vendors[$y]['functions'][$z]['name'] = "automata";
|
||||||
|
$vendors[$y]['functions'][$z]['value'] = "automata";
|
||||||
|
$z++;
|
||||||
|
$vendors[$y]['functions'][$z]['label'] = "label-normal";
|
||||||
|
$vendors[$y]['functions'][$z]['name'] = "normal";
|
||||||
|
$vendors[$y]['functions'][$z]['value'] = "normal";
|
||||||
|
$z++;
|
||||||
|
$vendors[$y]['functions'][$z]['label'] = "label-messages";
|
||||||
|
$vendors[$y]['functions'][$z]['name'] = "Messages";
|
||||||
|
$vendors[$y]['functions'][$z]['value'] = "Messages";
|
||||||
|
$z++;
|
||||||
|
$vendors[$y]['functions'][$z]['label'] = "label-micmute";
|
||||||
|
$vendors[$y]['functions'][$z]['name'] = "MicMute";
|
||||||
|
$vendors[$y]['functions'][$z]['value'] = "MicMute";
|
||||||
|
$z++;
|
||||||
|
$vendors[$y]['functions'][$z]['label'] = "label-redial";
|
||||||
|
$vendors[$y]['functions'][$z]['name'] = "Redial";
|
||||||
|
$vendors[$y]['functions'][$z]['value'] = "Redial";
|
||||||
|
$z++;
|
||||||
|
$vendors[$y]['functions'][$z]['label'] = "label-null";
|
||||||
|
$vendors[$y]['functions'][$z]['name'] = "Null";
|
||||||
|
$vendors[$y]['functions'][$z]['value'] = "Null";
|
||||||
|
$z++;
|
||||||
|
$vendors[$y]['functions'][$z]['label'] = "label-speeddial";
|
||||||
|
$vendors[$y]['functions'][$z]['name'] = "SpeedDial";
|
||||||
|
$vendors[$y]['functions'][$z]['value'] = "SpeedDial";
|
||||||
|
$z++;
|
||||||
|
$vendors[$y]['functions'][$z]['label'] = "label-speeddialmenu";
|
||||||
|
$vendors[$y]['functions'][$z]['name'] = "SpeedDialMenu";
|
||||||
|
$vendors[$y]['functions'][$z]['value'] = "SpeedDialMenu";
|
||||||
|
$z++;
|
||||||
|
$vendors[$y]['functions'][$z]['label'] = "label-url";
|
||||||
|
$vendors[$y]['functions'][$z]['name'] = "URL";
|
||||||
|
$vendors[$y]['functions'][$z]['value'] = "URL";
|
||||||
|
|
||||||
|
$y++; //vendors array index
|
||||||
|
$z=0; //functions array index
|
||||||
|
$vendors[$y]['name'] = "aastra";
|
||||||
|
$vendors[$y]['functions'][$z]['label'] = "label-blf";
|
||||||
|
$vendors[$y]['functions'][$z]['name'] = "blf";
|
||||||
|
$vendors[$y]['functions'][$z]['value'] = "blf";
|
||||||
|
$z++;
|
||||||
|
$vendors[$y]['functions'][$z]['label'] = "label-blf_xfer";
|
||||||
|
$vendors[$y]['functions'][$z]['name'] = "blfxfer";
|
||||||
|
$vendors[$y]['functions'][$z]['value'] = "blfxfer";
|
||||||
|
$z++;
|
||||||
|
$vendors[$y]['functions'][$z]['label'] = "label-callers";
|
||||||
|
$vendors[$y]['functions'][$z]['name'] = "callers";
|
||||||
|
$vendors[$y]['functions'][$z]['value'] = "callers";
|
||||||
|
$z++;
|
||||||
|
$vendors[$y]['functions'][$z]['label'] = "label-dnd";
|
||||||
|
$vendors[$y]['functions'][$z]['name'] = "dnd";
|
||||||
|
$vendors[$y]['functions'][$z]['value'] = "dnd";
|
||||||
|
$z++;
|
||||||
|
$vendors[$y]['functions'][$z]['label'] = "label-speed_dial";
|
||||||
|
$vendors[$y]['functions'][$z]['name'] = "speeddial";
|
||||||
|
$vendors[$y]['functions'][$z]['value'] = "speeddial";
|
||||||
|
$z++;
|
||||||
|
$vendors[$y]['functions'][$z]['label'] = "label-xfer";
|
||||||
|
$vendors[$y]['functions'][$z]['name'] = "xfer";
|
||||||
|
$vendors[$y]['functions'][$z]['value'] = "xfer";
|
||||||
|
|
||||||
|
$y++; //vendors array index
|
||||||
|
$z=0; //functions array index
|
||||||
|
$vendors[$y]['name'] = "cisco";
|
||||||
|
$vendors[$y]['functions'][$z]['label'] = "label-blf";
|
||||||
|
$vendors[$y]['functions'][$z]['name'] = "blf";
|
||||||
|
$vendors[$y]['functions'][$z]['value'] = "blf";
|
||||||
|
$z++;
|
||||||
|
$vendors[$y]['functions'][$z]['label'] = "label-line";
|
||||||
|
$vendors[$y]['functions'][$z]['name'] = "line";
|
||||||
|
$vendors[$y]['functions'][$z]['value'] = "line";
|
||||||
|
$z++;
|
||||||
|
$vendors[$y]['functions'][$z]['label'] = "label-disabled";
|
||||||
|
$vendors[$y]['functions'][$z]['name'] = "disabled";
|
||||||
|
$vendors[$y]['functions'][$z]['value'] = "disabled";
|
||||||
|
|
||||||
|
$y++; //vendors array index
|
||||||
|
$z=0; //functions array index
|
||||||
|
$vendors[$y]['name'] = "escene";
|
||||||
|
$vendors[$y]['functions'][$z]['label'] = "label-blf";
|
||||||
|
$vendors[$y]['functions'][$z]['name'] = "blf";
|
||||||
|
$vendors[$y]['functions'][$z]['value'] = "1";
|
||||||
|
$z++;
|
||||||
|
$vendors[$y]['functions'][$z]['label'] = "label-call_park";
|
||||||
|
$vendors[$y]['functions'][$z]['name'] = "call_park";
|
||||||
|
$vendors[$y]['functions'][$z]['value'] = "7";
|
||||||
|
$z++;
|
||||||
|
$vendors[$y]['functions'][$z]['label'] = "label-dtmf";
|
||||||
|
$vendors[$y]['functions'][$z]['name'] = "dtmf";
|
||||||
|
$vendors[$y]['functions'][$z]['value'] = "4";
|
||||||
|
$z++;
|
||||||
|
$vendors[$y]['functions'][$z]['label'] = "label-speed_dial";
|
||||||
|
$vendors[$y]['functions'][$z]['name'] = "speed_dial";
|
||||||
|
$vendors[$y]['functions'][$z]['value'] = "5";
|
||||||
|
$z++;
|
||||||
|
$vendors[$y]['functions'][$z]['label'] = "label-speed_dial_prefix";
|
||||||
|
$vendors[$y]['functions'][$z]['name'] = "speed_dial_prefix";
|
||||||
|
$vendors[$y]['functions'][$z]['value'] = "2";
|
||||||
|
$z++;
|
||||||
|
$vendors[$y]['functions'][$z]['label'] = "label-intercom";
|
||||||
|
$vendors[$y]['functions'][$z]['name'] = "intercom";
|
||||||
|
$vendors[$y]['functions'][$z]['value'] = "8";
|
||||||
|
$z++;
|
||||||
|
$vendors[$y]['functions'][$z]['label'] = "label-pickup";
|
||||||
|
$vendors[$y]['functions'][$z]['name'] = "pickup";
|
||||||
|
$vendors[$y]['functions'][$z]['value'] = "9";
|
||||||
|
$z++;
|
||||||
|
$vendors[$y]['functions'][$z]['label'] = "label-broadsoft_group";
|
||||||
|
$vendors[$y]['functions'][$z]['name'] = "broadsoft_group";
|
||||||
|
$vendors[$y]['functions'][$z]['value'] = "11";
|
||||||
|
//BLA type 3 Paging type 6
|
||||||
|
|
||||||
|
$y++; //vendors array index
|
||||||
|
$z=0; //functions array index
|
||||||
|
$vendors[$y]['name'] = "escene programmable";
|
||||||
|
$vendors[$y]['functions'][$z]['label'] = "label-default";
|
||||||
|
$vendors[$y]['functions'][$z]['name'] = "default";
|
||||||
|
$vendors[$y]['functions'][$z]['value'] = "0";
|
||||||
|
$vendors[$y]['functions'][$z]['description'] = "Default";
|
||||||
|
$z++;
|
||||||
|
$vendors[$y]['functions'][$z]['label'] = "label-redial";
|
||||||
|
$vendors[$y]['functions'][$z]['name'] = "redial";
|
||||||
|
$vendors[$y]['functions'][$z]['value'] = "1";
|
||||||
|
$vendors[$y]['functions'][$z]['description'] = "Redial";
|
||||||
|
$z++;
|
||||||
|
$vendors[$y]['functions'][$z]['label'] = "label-dnd";
|
||||||
|
$vendors[$y]['functions'][$z]['name'] = "dnd";
|
||||||
|
$vendors[$y]['functions'][$z]['value'] = "2";
|
||||||
|
$vendors[$y]['functions'][$z]['description'] = "DND";
|
||||||
|
$z++;
|
||||||
|
$vendors[$y]['functions'][$z]['label'] = "label-phone_book";
|
||||||
|
$vendors[$y]['functions'][$z]['name'] = "phone_book";
|
||||||
|
$vendors[$y]['functions'][$z]['value'] = "3";
|
||||||
|
$vendors[$y]['functions'][$z]['description'] = "Contacts";
|
||||||
|
$z++;
|
||||||
|
$vendors[$y]['functions'][$z]['label'] = "label-ent_phone_book";
|
||||||
|
$vendors[$y]['functions'][$z]['name'] = "ent_phone_book";
|
||||||
|
$vendors[$y]['functions'][$z]['value'] = "4";
|
||||||
|
$vendors[$y]['functions'][$z]['description'] = "Enterprise Phonebook";
|
||||||
|
$z++;
|
||||||
|
$vendors[$y]['functions'][$z]['label'] = "label-ldap";
|
||||||
|
$vendors[$y]['functions'][$z]['name'] = "ldap";
|
||||||
|
$vendors[$y]['functions'][$z]['value'] = "5";
|
||||||
|
$vendors[$y]['functions'][$z]['description'] = "LDAP";
|
||||||
|
$z++;
|
||||||
|
$vendors[$y]['functions'][$z]['label'] = "label-directory";
|
||||||
|
$vendors[$y]['functions'][$z]['name'] = "directory";
|
||||||
|
$vendors[$y]['functions'][$z]['value'] = "6";
|
||||||
|
$vendors[$y]['functions'][$z]['description'] = "Directory";
|
||||||
|
$z++;
|
||||||
|
$vendors[$y]['functions'][$z]['label'] = "label-speed_dial";
|
||||||
|
$vendors[$y]['functions'][$z]['name'] = "speed_dial";
|
||||||
|
$vendors[$y]['functions'][$z]['value'] = "7";
|
||||||
|
$vendors[$y]['functions'][$z]['description'] = "Speed Dial";
|
||||||
|
$z++;
|
||||||
|
$vendors[$y]['functions'][$z]['label'] = "label-call_log";
|
||||||
|
$vendors[$y]['functions'][$z]['name'] = "call_log";
|
||||||
|
$vendors[$y]['functions'][$z]['value'] = "8";
|
||||||
|
$vendors[$y]['functions'][$z]['description'] = "Call List";
|
||||||
|
$z++;
|
||||||
|
$vendors[$y]['functions'][$z]['label'] = "label-missed_calls";
|
||||||
|
$vendors[$y]['functions'][$z]['name'] = "missed_calls";
|
||||||
|
$vendors[$y]['functions'][$z]['value'] = "9";
|
||||||
|
$vendors[$y]['functions'][$z]['description'] = "Missed Calls";
|
||||||
|
$z++;
|
||||||
|
$vendors[$y]['functions'][$z]['label'] = "label-received_calls";
|
||||||
|
$vendors[$y]['functions'][$z]['name'] = "received_calls";
|
||||||
|
$vendors[$y]['functions'][$z]['value'] = "10";
|
||||||
|
$vendors[$y]['functions'][$z]['description'] = "Received Calls";
|
||||||
|
$z++;
|
||||||
|
$vendors[$y]['functions'][$z]['label'] = "label-dialed_calls";
|
||||||
|
$vendors[$y]['functions'][$z]['name'] = "dialed_calls";
|
||||||
|
$vendors[$y]['functions'][$z]['value'] = "11";
|
||||||
|
$vendors[$y]['functions'][$z]['description'] = "Dialed Calls";
|
||||||
|
$z++;
|
||||||
|
$vendors[$y]['functions'][$z]['label'] = "label-menu";
|
||||||
|
$vendors[$y]['functions'][$z]['name'] = "menu";
|
||||||
|
$vendors[$y]['functions'][$z]['value'] = "12";
|
||||||
|
$vendors[$y]['functions'][$z]['description'] = "Menu";
|
||||||
|
$z++;
|
||||||
|
$vendors[$y]['functions'][$z]['label'] = "label-sms";
|
||||||
|
$vendors[$y]['functions'][$z]['name'] = "sms";
|
||||||
|
$vendors[$y]['functions'][$z]['value'] = "13";
|
||||||
|
$vendors[$y]['functions'][$z]['description'] = "SMS";
|
||||||
|
$z++;
|
||||||
|
$vendors[$y]['functions'][$z]['label'] = "label-new_sms";
|
||||||
|
$vendors[$y]['functions'][$z]['name'] = "new_sms";
|
||||||
|
$vendors[$y]['functions'][$z]['value'] = "14";
|
||||||
|
$vendors[$y]['functions'][$z]['description'] = "New SMS";
|
||||||
|
$z++;
|
||||||
|
$vendors[$y]['functions'][$z]['label'] = "label-forward";
|
||||||
|
$vendors[$y]['functions'][$z]['name'] = "forward";
|
||||||
|
$vendors[$y]['functions'][$z]['value'] = "15";
|
||||||
|
$vendors[$y]['functions'][$z]['description'] = "Call Forward";
|
||||||
|
$z++;
|
||||||
|
$vendors[$y]['functions'][$z]['label'] = "label-status";
|
||||||
|
$vendors[$y]['functions'][$z]['name'] = "status";
|
||||||
|
$vendors[$y]['functions'][$z]['value'] = "16";
|
||||||
|
$vendors[$y]['functions'][$z]['description'] = "View Status";
|
||||||
|
$z++;
|
||||||
|
$vendors[$y]['functions'][$z]['label'] = "label-enable_account";
|
||||||
|
$vendors[$y]['functions'][$z]['name'] = "enable_account";
|
||||||
|
$vendors[$y]['functions'][$z]['value'] = "17";
|
||||||
|
$vendors[$y]['functions'][$z]['description'] = "Enable/Disable SIP Account";
|
||||||
|
$z++;
|
||||||
|
$vendors[$y]['functions'][$z]['label'] = "label-xml_browser";
|
||||||
|
$vendors[$y]['functions'][$z]['name'] = "xml browser";
|
||||||
|
$vendors[$y]['functions'][$z]['value'] = "18";
|
||||||
|
$vendors[$y]['functions'][$z]['enabled'] = "false";
|
||||||
|
$vendors[$y]['functions'][$z]['description'] = "XML Browser";
|
||||||
|
$z++;
|
||||||
|
$vendors[$y]['functions'][$z]['label'] = "label-provison_now";
|
||||||
|
$vendors[$y]['functions'][$z]['name'] = "provison_now";
|
||||||
|
$vendors[$y]['functions'][$z]['value'] = "19";
|
||||||
|
$vendors[$y]['functions'][$z]['description'] = "Auto Provison Now";
|
||||||
|
$z++;
|
||||||
|
$vendors[$y]['functions'][$z]['label'] = "label-hot_desking";
|
||||||
|
$vendors[$y]['functions'][$z]['name'] = "hot_desking";
|
||||||
|
$vendors[$y]['functions'][$z]['value'] = "20";
|
||||||
|
$vendors[$y]['functions'][$z]['description'] = "Hot Desking";
|
||||||
|
$z++;
|
||||||
|
|
||||||
|
$y++; //vendors array index
|
||||||
|
$z=0; //functions array index
|
||||||
|
$vendors[$y]['name'] = "grandstream";
|
||||||
|
$vendors[$y]['functions'][$z]['label'] = "label-line";
|
||||||
|
$vendors[$y]['functions'][$z]['name'] = "line";
|
||||||
|
$vendors[$y]['functions'][$z]['value'] = "line";
|
||||||
|
$z++;
|
||||||
|
$vendors[$y]['functions'][$z]['label'] = "label-shared_line";
|
||||||
|
$vendors[$y]['functions'][$z]['name'] = "shared line";
|
||||||
|
$vendors[$y]['functions'][$z]['value'] = "shared line";
|
||||||
|
$z++;
|
||||||
|
$vendors[$y]['functions'][$z]['label'] = "label-speed_dial";
|
||||||
|
$vendors[$y]['functions'][$z]['name'] = "speed dial";
|
||||||
|
$vendors[$y]['functions'][$z]['value'] = "speed dial";
|
||||||
|
$z++;
|
||||||
|
$vendors[$y]['functions'][$z]['label'] = "label-blf";
|
||||||
|
$vendors[$y]['functions'][$z]['name'] = "blf";
|
||||||
|
$vendors[$y]['functions'][$z]['value'] = "blf";
|
||||||
|
$z++;
|
||||||
|
$vendors[$y]['functions'][$z]['label'] = "label-presence_watcher";
|
||||||
|
$vendors[$y]['functions'][$z]['name'] = "presence watcher";
|
||||||
|
$vendors[$y]['functions'][$z]['value'] = "presence watcher";
|
||||||
|
$z++;
|
||||||
|
$vendors[$y]['functions'][$z]['label'] = "label-eventlist_blf";
|
||||||
|
$vendors[$y]['functions'][$z]['name'] = "eventlist blf";
|
||||||
|
$vendors[$y]['functions'][$z]['value'] = "eventlist blf";
|
||||||
|
$z++;
|
||||||
|
$vendors[$y]['functions'][$z]['label'] = "label-speed_dial_active";
|
||||||
|
$vendors[$y]['functions'][$z]['name'] = "speed dial active";
|
||||||
|
$vendors[$y]['functions'][$z]['value'] = "speed dial active";
|
||||||
|
$z++;
|
||||||
|
$vendors[$y]['functions'][$z]['label'] = "label-dial_dtmf";
|
||||||
|
$vendors[$y]['functions'][$z]['name'] = "dial dtmf";
|
||||||
|
$vendors[$y]['functions'][$z]['value'] = "dial dtmf";
|
||||||
|
$z++;
|
||||||
|
$vendors[$y]['functions'][$z]['label'] = "label-voicemail";
|
||||||
|
$vendors[$y]['functions'][$z]['name'] = "voicemail";
|
||||||
|
$vendors[$y]['functions'][$z]['value'] = "voicemail";
|
||||||
|
$z++;
|
||||||
|
$vendors[$y]['functions'][$z]['label'] = "label-call_return";
|
||||||
|
$vendors[$y]['functions'][$z]['name'] = "call return";
|
||||||
|
$vendors[$y]['functions'][$z]['value'] = "call return";
|
||||||
|
$z++;
|
||||||
|
$vendors[$y]['functions'][$z]['label'] = "label-transfer";
|
||||||
|
$vendors[$y]['functions'][$z]['name'] = "transfer";
|
||||||
|
$vendors[$y]['functions'][$z]['value'] = "transfer";
|
||||||
|
$z++;
|
||||||
|
$vendors[$y]['functions'][$z]['label'] = "label-call_park";
|
||||||
|
$vendors[$y]['functions'][$z]['name'] = "call park";
|
||||||
|
$vendors[$y]['functions'][$z]['value'] = "call park";
|
||||||
|
$z++;
|
||||||
|
$vendors[$y]['functions'][$z]['label'] = "label-intercom";
|
||||||
|
$vendors[$y]['functions'][$z]['name'] = "intercom";
|
||||||
|
$vendors[$y]['functions'][$z]['value'] = "intercom";
|
||||||
|
$z++;
|
||||||
|
$vendors[$y]['functions'][$z]['label'] = "label-ldap_search";
|
||||||
|
$vendors[$y]['functions'][$z]['name'] = "ldap search";
|
||||||
|
$vendors[$y]['functions'][$z]['value'] = "ldap search";
|
||||||
|
|
||||||
|
$y++; //vendors array index
|
||||||
|
$z=0; //functions array index
|
||||||
|
$vendors[$y]['name'] = "mitel";
|
||||||
|
$vendors[$y]['functions'][$z]['label'] = "label-not_programmed";
|
||||||
|
$vendors[$y]['functions'][$z]['name'] = "not_programmed";
|
||||||
|
$vendors[$y]['functions'][$z]['value'] = "0";
|
||||||
|
$z++;
|
||||||
|
$vendors[$y]['functions'][$z]['label'] = "label-speed_dial";
|
||||||
|
$vendors[$y]['functions'][$z]['name'] = "speed_dial";
|
||||||
|
$vendors[$y]['functions'][$z]['value'] = "1";
|
||||||
|
$z++;
|
||||||
|
$vendors[$y]['functions'][$z]['label'] = "label-shared_line";
|
||||||
|
$vendors[$y]['functions'][$z]['name'] = "shared_line";
|
||||||
|
$vendors[$y]['functions'][$z]['value'] = "5";
|
||||||
|
$z++;
|
||||||
|
$vendors[$y]['functions'][$z]['label'] = "label-line";
|
||||||
|
$vendors[$y]['functions'][$z]['name'] = "line";
|
||||||
|
$vendors[$y]['functions'][$z]['value'] = "6";
|
||||||
|
$z++;
|
||||||
|
$vendors[$y]['functions'][$z]['label'] = "label-call_log";
|
||||||
|
$vendors[$y]['functions'][$z]['name'] = "call_log";
|
||||||
|
$vendors[$y]['functions'][$z]['value'] = "2";
|
||||||
|
$z++;
|
||||||
|
$vendors[$y]['functions'][$z]['label'] = "label-phone_book";
|
||||||
|
$vendors[$y]['functions'][$z]['name'] = "phone_book";
|
||||||
|
$vendors[$y]['functions'][$z]['value'] = "15";
|
||||||
|
$z++;
|
||||||
|
$vendors[$y]['functions'][$z]['label'] = "label-forward";
|
||||||
|
$vendors[$y]['functions'][$z]['name'] = "forward";
|
||||||
|
$vendors[$y]['functions'][$z]['value'] = "16";
|
||||||
|
$z++;
|
||||||
|
$vendors[$y]['functions'][$z]['label'] = "label-dnd";
|
||||||
|
$vendors[$y]['functions'][$z]['name'] = "dnd";
|
||||||
|
$vendors[$y]['functions'][$z]['value'] = "17";
|
||||||
|
$z++;
|
||||||
|
$vendors[$y]['functions'][$z]['label'] = "label-advisory_message";
|
||||||
|
$vendors[$y]['functions'][$z]['name'] = "advisory_message";
|
||||||
|
$vendors[$y]['functions'][$z]['value'] = "3";
|
||||||
|
$z++;
|
||||||
|
$vendors[$y]['functions'][$z]['label'] = "label-pc_application";
|
||||||
|
$vendors[$y]['functions'][$z]['name'] = "pc_application";
|
||||||
|
$vendors[$y]['functions'][$z]['value'] = "18";
|
||||||
|
$z++;
|
||||||
|
$vendors[$y]['functions'][$z]['label'] = "label-headset_on_off";
|
||||||
|
$vendors[$y]['functions'][$z]['name'] = "headset_on_off";
|
||||||
|
$vendors[$y]['functions'][$z]['value'] = "4";
|
||||||
|
$z++;
|
||||||
|
$vendors[$y]['functions'][$z]['label'] = "label-rss_feed";
|
||||||
|
$vendors[$y]['functions'][$z]['name'] = "rss_feed";
|
||||||
|
$vendors[$y]['functions'][$z]['value'] = "19";
|
||||||
|
$z++;
|
||||||
|
$vendors[$y]['functions'][$z]['label'] = "label-speed_dial_blf";
|
||||||
|
$vendors[$y]['functions'][$z]['name'] = "speed_dial_blf";
|
||||||
|
$vendors[$y]['functions'][$z]['value'] = "27";
|
||||||
|
$z++;
|
||||||
|
$vendors[$y]['functions'][$z]['label'] = "label-url";
|
||||||
|
$vendors[$y]['functions'][$z]['name'] = "url";
|
||||||
|
$vendors[$y]['functions'][$z]['value'] = "19";
|
||||||
|
/*
|
||||||
|
0 - not programmed
|
||||||
|
1 - speed dial
|
||||||
|
2 - callLog
|
||||||
|
3 - advisoryMsg (on/off)
|
||||||
|
4 - headset(on/off)
|
||||||
|
5 - shared line
|
||||||
|
6 - Line 1
|
||||||
|
7 - Line 2
|
||||||
|
8 - Line 3
|
||||||
|
9 - Line 4
|
||||||
|
10 - Line 5
|
||||||
|
11 - Line 6
|
||||||
|
12 - Line 7
|
||||||
|
13 - Line 8
|
||||||
|
15 - phonebook
|
||||||
|
16 - call forwarding
|
||||||
|
17 - do not disturb
|
||||||
|
18 - PC Application
|
||||||
|
19 - RSS Feed URL / Branding /Notes
|
||||||
|
21 - Superkey (5304 set only)
|
||||||
|
22 - Redial key (5304 set only)
|
||||||
|
23 - Hold key (5304 set only)
|
||||||
|
24 - Trans/Conf key (5304 set only)
|
||||||
|
25 - Message key (5304 set only)
|
||||||
|
26 - Cancel key (5304 set only)
|
||||||
|
27 - Speed Dial & BLF
|
||||||
|
|
||||||
|
Mitel web interface shows html_application
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
echo "<pre>\n";
|
||||||
|
foreach ($vendors as $vendor) {
|
||||||
|
//print_r($vendor);
|
||||||
|
$vendor = $vendor['name'];
|
||||||
|
echo "<h1>$vendor</h1>\n";
|
||||||
|
$functions = $vendor['functions'];
|
||||||
|
foreach ($vendor['functions'] as $type) {
|
||||||
|
echo "<hr>\n";
|
||||||
|
echo "label: ".$type['label']."\n";
|
||||||
|
echo "name: ".$type['name']."\n";
|
||||||
|
echo "value: ".$type['value']."\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
echo "</pre>\n";
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
//select
|
||||||
|
$device_vendor = 'yealink';
|
||||||
|
$device_key_type = '16';
|
||||||
|
echo "<select class='formfld' name='device_keys[".$x."][device_key_type]' id='key_type_".$x."'>\n";
|
||||||
|
echo " <option value=''></option>\n";
|
||||||
|
$previous_vendor = '';
|
||||||
|
foreach ($vendors as $vendor) {
|
||||||
|
$i = 0;
|
||||||
|
foreach ($vendor['functions'] as $type) {
|
||||||
|
if ($vendor['name'] != $previous_vendor) {
|
||||||
|
if ($i > 0) { echo " </optgroup>\n"; }
|
||||||
|
echo " <optgroup label='".ucwords($vendor['name'])."'>\n";
|
||||||
|
}
|
||||||
|
$selected = "";
|
||||||
|
if ($device_vendor == $vendor['name'] && $device_key_type == $type['value']) {
|
||||||
|
$selected = "selected='selected'";
|
||||||
|
}
|
||||||
|
echo " <option value='".$type['value']."' $selected >".$text[$type['label']]."</option>\n";
|
||||||
|
$previous_vendor = $vendor['name'];
|
||||||
|
$i++;
|
||||||
|
}
|
||||||
|
echo " </optgroup>\n";
|
||||||
|
}
|
||||||
|
echo "</select>\n";
|
||||||
|
*/
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
@ -0,0 +1,95 @@
|
||||||
|
<?php
|
||||||
|
/*
|
||||||
|
FusionPBX
|
||||||
|
Version: MPL 1.1
|
||||||
|
|
||||||
|
The contents of this file are subject to the Mozilla Public License Version
|
||||||
|
1.1 (the "License"); you may not use this file except in compliance with
|
||||||
|
the License. You may obtain a copy of the License at
|
||||||
|
http://www.mozilla.org/MPL/
|
||||||
|
|
||||||
|
Software distributed under the License is distributed on an "AS IS" basis,
|
||||||
|
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||||
|
for the specific language governing rights and limitations under the
|
||||||
|
License.
|
||||||
|
|
||||||
|
The Original Code is FusionPBX
|
||||||
|
|
||||||
|
The Initial Developer of the Original Code is
|
||||||
|
Mark J Crane <markjcrane@fusionpbx.com>
|
||||||
|
Portions created by the Initial Developer are Copyright (C) 2016
|
||||||
|
the Initial Developer. All Rights Reserved.
|
||||||
|
|
||||||
|
Contributor(s):
|
||||||
|
Mark J Crane <markjcrane@fusionpbx.com>
|
||||||
|
*/
|
||||||
|
|
||||||
|
if ($domains_processed == 1) {
|
||||||
|
|
||||||
|
//add the music_on_hold list to the database
|
||||||
|
$sql = "select count(*) as num_rows from v_device_vendors; ";
|
||||||
|
$prep_statement = $db->prepare($sql);
|
||||||
|
if ($prep_statement) {
|
||||||
|
$prep_statement->execute();
|
||||||
|
$row = $prep_statement->fetch(PDO::FETCH_ASSOC);
|
||||||
|
if ($row['num_rows'] == 0) {
|
||||||
|
|
||||||
|
//get the vendor array
|
||||||
|
require_once $_SERVER["DOCUMENT_ROOT"].'/'.PROJECT_PATH.'/app/device_vendors/app_config.php';
|
||||||
|
|
||||||
|
//process the array
|
||||||
|
foreach ($vendors as $vendor) {
|
||||||
|
|
||||||
|
//insert the data into the database
|
||||||
|
$device_vendor_uuid = uuid();
|
||||||
|
$sql = "insert into v_device_vendors ";
|
||||||
|
$sql .= "(";
|
||||||
|
$sql .= "device_vendor_uuid, ";
|
||||||
|
$sql .= "name, ";
|
||||||
|
$sql .= "enabled ";
|
||||||
|
$sql .= ") ";
|
||||||
|
$sql .= "values ";
|
||||||
|
$sql .= "( ";
|
||||||
|
$sql .= "'".$device_vendor_uuid."', ";
|
||||||
|
$sql .= "'".$vendor['name']."', ";
|
||||||
|
$sql .= "'true' ";
|
||||||
|
$sql .= ");";
|
||||||
|
//echo $sql."\n";
|
||||||
|
$db->exec(check_sql($sql));
|
||||||
|
unset($sql);
|
||||||
|
|
||||||
|
//add the vendor functions
|
||||||
|
foreach ($vendor['functions'] as $function) {
|
||||||
|
|
||||||
|
//add the coference profile params
|
||||||
|
$device_vendor_function_uuid = uuid();
|
||||||
|
$sql = "insert into v_device_vendor_functions ";
|
||||||
|
$sql .= "(";
|
||||||
|
$sql .= "device_vendor_uuid, ";
|
||||||
|
$sql .= "device_vendor_function_uuid, ";
|
||||||
|
$sql .= "name, ";
|
||||||
|
$sql .= "value, ";
|
||||||
|
$sql .= "enabled, ";
|
||||||
|
$sql .= "description ";
|
||||||
|
$sql .= ") ";
|
||||||
|
$sql .= "values ";
|
||||||
|
$sql .= "( ";
|
||||||
|
$sql .= "'".$device_vendor_uuid."', ";
|
||||||
|
$sql .= "'".$device_vendor_function_uuid."', ";
|
||||||
|
$sql .= "'".$function['name']."', ";
|
||||||
|
$sql .= "'".$function['value']."', ";
|
||||||
|
$sql .= "'true', ";
|
||||||
|
$sql .= "'".$function['description']."' ";
|
||||||
|
$sql .= ");";
|
||||||
|
//echo $sql."\n";
|
||||||
|
$db->exec(check_sql($sql));
|
||||||
|
unset($sql);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
} //if num_rows
|
||||||
|
} //if prep_statement
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
@ -0,0 +1,224 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
//Device Vendors
|
||||||
|
$text['title-device_vendors']['en-us'] = 'Device Vendors';
|
||||||
|
$text['title-device_vendors']['es-cl'] = '';
|
||||||
|
$text['title-device_vendors']['pt-pt'] = '';
|
||||||
|
$text['title-device_vendors']['fr-fr'] = '';
|
||||||
|
|
||||||
|
$text['title-device_vendor']['en-us'] = 'Device Vendor';
|
||||||
|
$text['title-device_vendor']['es-cl'] = '';
|
||||||
|
$text['title-device_vendor']['pt-pt'] = '';
|
||||||
|
$text['title-device_vendor']['fr-fr'] = '';
|
||||||
|
|
||||||
|
$text['title_description-device_vendor']['en-us'] = 'Defines the list of vendors used with provisioning devices.';
|
||||||
|
$text['title_description-device_vendor']['es-cl'] = '';
|
||||||
|
$text['title_description-device_vendor']['pt-pt'] = '';
|
||||||
|
$text['title_description-device_vendor']['fr-fr'] = '';
|
||||||
|
|
||||||
|
$text['label-name']['en-us'] = 'Name';
|
||||||
|
$text['label-name']['es-cl'] = '';
|
||||||
|
$text['label-name']['pt-pt'] = '';
|
||||||
|
$text['label-name']['fr-fr'] = '';
|
||||||
|
|
||||||
|
$text['description-name']['en-us'] = 'Enter the name.';
|
||||||
|
$text['description-name']['es-cl'] = '';
|
||||||
|
$text['description-name']['pt-pt'] = '';
|
||||||
|
$text['description-name']['fr-fr'] = '';
|
||||||
|
|
||||||
|
$text['label-enabled']['en-us'] = 'Enabled';
|
||||||
|
$text['label-enabled']['es-cl'] = '';
|
||||||
|
$text['label-enabled']['pt-pt'] = '';
|
||||||
|
$text['label-enabled']['fr-fr'] = '';
|
||||||
|
|
||||||
|
$text['description-enabled']['en-us'] = 'Set the status of the vendor.';
|
||||||
|
$text['description-enabled']['es-cl'] = '';
|
||||||
|
$text['description-enabled']['pt-pt'] = '';
|
||||||
|
$text['description-enabled']['fr-fr'] = '';
|
||||||
|
|
||||||
|
$text['label-description']['en-us'] = 'Description';
|
||||||
|
$text['label-description']['es-cl'] = '';
|
||||||
|
$text['label-description']['pt-pt'] = '';
|
||||||
|
$text['label-description']['fr-fr'] = '';
|
||||||
|
|
||||||
|
$text['description-description']['en-us'] = 'Enter the description.';
|
||||||
|
$text['description-description']['es-cl'] = '';
|
||||||
|
$text['description-description']['pt-pt'] = '';
|
||||||
|
$text['description-description']['fr-fr'] = '';
|
||||||
|
|
||||||
|
$text['label-true']['en-us'] = 'true';
|
||||||
|
$text['label-true']['es-cl'] = '';
|
||||||
|
$text['label-true']['pt-pt'] = '';
|
||||||
|
$text['label-true']['fr-fr'] = '';
|
||||||
|
|
||||||
|
$text['label-false']['en-us'] = 'false';
|
||||||
|
$text['label-false']['es-cl'] = 'falso';
|
||||||
|
$text['label-false']['pt-pt'] = 'falso';
|
||||||
|
$text['label-false']['fr-fr'] = 'falso';
|
||||||
|
|
||||||
|
$text['button-add']['en-us'] = 'Add';
|
||||||
|
$text['button-add']['es-cl'] = '';
|
||||||
|
$text['button-add']['pt-pt'] = '';
|
||||||
|
$text['button-add']['fr-fr'] = '';
|
||||||
|
|
||||||
|
$text['button-edit']['en-us'] = 'Edit';
|
||||||
|
$text['button-edit']['es-cl'] = '';
|
||||||
|
$text['button-edit']['pt-pt'] = '';
|
||||||
|
$text['button-edit']['fr-fr'] = '';
|
||||||
|
|
||||||
|
$text['button-delete']['en-us'] = 'Delete';
|
||||||
|
$text['button-delete']['es-cl'] = '';
|
||||||
|
$text['button-delete']['pt-pt'] = '';
|
||||||
|
$text['button-delete']['fr-fr'] = '';
|
||||||
|
|
||||||
|
$text['button-save']['en-us'] = 'Save';
|
||||||
|
$text['button-save']['es-cl'] = '';
|
||||||
|
$text['button-save']['pt-pt'] = 'Guardar';
|
||||||
|
$text['button-save']['fr-fr'] = '';
|
||||||
|
|
||||||
|
$text['button-view']['en-us'] = 'View';
|
||||||
|
$text['button-view']['es-cl'] = '';
|
||||||
|
$text['button-view']['pt-pt'] = '';
|
||||||
|
$text['button-view']['fr-fr'] = '';
|
||||||
|
|
||||||
|
$text['button-back']['en-us'] = 'Back';
|
||||||
|
$text['button-back']['es-cl'] = '';
|
||||||
|
$text['button-back']['pt-pt'] = 'Voltar';
|
||||||
|
$text['button-back']['fr-fr'] = '';
|
||||||
|
|
||||||
|
$text['confirm-delete']['en-us'] = 'Do you really want to delete this?';
|
||||||
|
$text['confirm-delete']['es-cl'] = '';
|
||||||
|
$text['confirm-delete']['pt-pt'] = '';
|
||||||
|
$text['confirm-delete']['fr-fr'] = '';
|
||||||
|
|
||||||
|
$text['message-add']['en-us'] = 'Add Completed';
|
||||||
|
$text['message-add']['es-cl'] = '';
|
||||||
|
$text['message-add']['pt-pt'] = '';
|
||||||
|
$text['message-add']['fr-fr'] = '';
|
||||||
|
|
||||||
|
$text['message-update']['en-us'] = 'Update Completed';
|
||||||
|
$text['message-update']['es-cl'] = '';
|
||||||
|
$text['message-update']['pt-pt'] = '';
|
||||||
|
$text['message-update']['fr-fr'] = '';
|
||||||
|
|
||||||
|
$text['message-delete']['en-us'] = 'Delete Completed';
|
||||||
|
$text['message-delete']['es-cl'] = '';
|
||||||
|
$text['message-delete']['pt-pt'] = '';
|
||||||
|
$text['message-delete']['fr-fr'] = '';
|
||||||
|
|
||||||
|
$text['message-required']['en-us'] = 'Please provide: ';
|
||||||
|
$text['message-required']['es-cl'] = '';
|
||||||
|
$text['message-required']['pt-pt'] = '';
|
||||||
|
$text['message-required']['fr-fr'] = '';
|
||||||
|
|
||||||
|
//Device Vendors
|
||||||
|
$text['title-device_vendors']['en-us'] = 'Device Vendors';
|
||||||
|
$text['title-device_vendors']['es-cl'] = '';
|
||||||
|
$text['title-device_vendors']['pt-pt'] = '';
|
||||||
|
$text['title-device_vendors']['fr-fr'] = '';
|
||||||
|
|
||||||
|
$text['title-device_vendor']['en-us'] = 'Device Vendor';
|
||||||
|
$text['title-device_vendor']['es-cl'] = '';
|
||||||
|
$text['title-device_vendor']['pt-pt'] = '';
|
||||||
|
$text['title-device_vendor']['fr-fr'] = '';
|
||||||
|
|
||||||
|
$text['title_description-device_vendor']['en-us'] = 'Defines the list of vendors used with provisioning devices.';
|
||||||
|
$text['title_description-device_vendor']['es-cl'] = '';
|
||||||
|
$text['title_description-device_vendor']['pt-pt'] = '';
|
||||||
|
$text['title_description-device_vendor']['fr-fr'] = '';
|
||||||
|
|
||||||
|
$text['label-name']['en-us'] = 'Name';
|
||||||
|
$text['label-name']['es-cl'] = '';
|
||||||
|
$text['label-name']['pt-pt'] = '';
|
||||||
|
$text['label-name']['fr-fr'] = '';
|
||||||
|
|
||||||
|
$text['description-name']['en-us'] = 'Enter the name.';
|
||||||
|
$text['description-name']['es-cl'] = '';
|
||||||
|
$text['description-name']['pt-pt'] = '';
|
||||||
|
$text['description-name']['fr-fr'] = '';
|
||||||
|
|
||||||
|
$text['label-enabled']['en-us'] = 'Enabled';
|
||||||
|
$text['label-enabled']['es-cl'] = '';
|
||||||
|
$text['label-enabled']['pt-pt'] = '';
|
||||||
|
$text['label-enabled']['fr-fr'] = '';
|
||||||
|
|
||||||
|
$text['description-enabled']['en-us'] = 'Set the status of the vendor.';
|
||||||
|
$text['description-enabled']['es-cl'] = '';
|
||||||
|
$text['description-enabled']['pt-pt'] = '';
|
||||||
|
$text['description-enabled']['fr-fr'] = '';
|
||||||
|
|
||||||
|
$text['label-description']['en-us'] = 'Description';
|
||||||
|
$text['label-description']['es-cl'] = '';
|
||||||
|
$text['label-description']['pt-pt'] = '';
|
||||||
|
$text['label-description']['fr-fr'] = '';
|
||||||
|
|
||||||
|
$text['description-description']['en-us'] = 'Enter the description.';
|
||||||
|
$text['description-description']['es-cl'] = '';
|
||||||
|
$text['description-description']['pt-pt'] = '';
|
||||||
|
$text['description-description']['fr-fr'] = '';
|
||||||
|
|
||||||
|
$text['label-true']['en-us'] = 'true';
|
||||||
|
$text['label-true']['es-cl'] = '';
|
||||||
|
$text['label-true']['pt-pt'] = '';
|
||||||
|
$text['label-true']['fr-fr'] = '';
|
||||||
|
|
||||||
|
$text['label-false']['en-us'] = 'false';
|
||||||
|
$text['label-false']['es-cl'] = 'falso';
|
||||||
|
$text['label-false']['pt-pt'] = 'falso';
|
||||||
|
$text['label-false']['fr-fr'] = 'falso';
|
||||||
|
|
||||||
|
$text['button-add']['en-us'] = 'Add';
|
||||||
|
$text['button-add']['es-cl'] = '';
|
||||||
|
$text['button-add']['pt-pt'] = '';
|
||||||
|
$text['button-add']['fr-fr'] = '';
|
||||||
|
|
||||||
|
$text['button-edit']['en-us'] = 'Edit';
|
||||||
|
$text['button-edit']['es-cl'] = '';
|
||||||
|
$text['button-edit']['pt-pt'] = '';
|
||||||
|
$text['button-edit']['fr-fr'] = '';
|
||||||
|
|
||||||
|
$text['button-delete']['en-us'] = 'Delete';
|
||||||
|
$text['button-delete']['es-cl'] = '';
|
||||||
|
$text['button-delete']['pt-pt'] = '';
|
||||||
|
$text['button-delete']['fr-fr'] = '';
|
||||||
|
|
||||||
|
$text['button-save']['en-us'] = 'Save';
|
||||||
|
$text['button-save']['es-cl'] = '';
|
||||||
|
$text['button-save']['pt-pt'] = 'Guardar';
|
||||||
|
$text['button-save']['fr-fr'] = '';
|
||||||
|
|
||||||
|
$text['button-view']['en-us'] = 'View';
|
||||||
|
$text['button-view']['es-cl'] = '';
|
||||||
|
$text['button-view']['pt-pt'] = '';
|
||||||
|
$text['button-view']['fr-fr'] = '';
|
||||||
|
|
||||||
|
$text['button-back']['en-us'] = 'Back';
|
||||||
|
$text['button-back']['es-cl'] = '';
|
||||||
|
$text['button-back']['pt-pt'] = 'Voltar';
|
||||||
|
$text['button-back']['fr-fr'] = '';
|
||||||
|
|
||||||
|
$text['confirm-delete']['en-us'] = 'Do you really want to delete this?';
|
||||||
|
$text['confirm-delete']['es-cl'] = '';
|
||||||
|
$text['confirm-delete']['pt-pt'] = '';
|
||||||
|
$text['confirm-delete']['fr-fr'] = '';
|
||||||
|
|
||||||
|
$text['message-add']['en-us'] = 'Add Completed';
|
||||||
|
$text['message-add']['es-cl'] = '';
|
||||||
|
$text['message-add']['pt-pt'] = '';
|
||||||
|
$text['message-add']['fr-fr'] = '';
|
||||||
|
|
||||||
|
$text['message-update']['en-us'] = 'Update Completed';
|
||||||
|
$text['message-update']['es-cl'] = '';
|
||||||
|
$text['message-update']['pt-pt'] = '';
|
||||||
|
$text['message-update']['fr-fr'] = '';
|
||||||
|
|
||||||
|
$text['message-delete']['en-us'] = 'Delete Completed';
|
||||||
|
$text['message-delete']['es-cl'] = '';
|
||||||
|
$text['message-delete']['pt-pt'] = '';
|
||||||
|
$text['message-delete']['fr-fr'] = '';
|
||||||
|
|
||||||
|
$text['message-required']['en-us'] = 'Please provide: ';
|
||||||
|
$text['message-required']['es-cl'] = '';
|
||||||
|
$text['message-required']['pt-pt'] = '';
|
||||||
|
$text['message-required']['fr-fr'] = '';
|
||||||
|
?>
|
||||||
|
|
@ -0,0 +1,64 @@
|
||||||
|
<?php
|
||||||
|
/*
|
||||||
|
FusionPBX
|
||||||
|
Version: MPL 1.1
|
||||||
|
|
||||||
|
The contents of this file are subject to the Mozilla Public License Version
|
||||||
|
1.1 (the "License"); you may not use this file except in compliance with
|
||||||
|
the License. You may obtain a copy of the License at
|
||||||
|
http://www.mozilla.org/MPL/
|
||||||
|
|
||||||
|
Software distributed under the License is distributed on an "AS IS" basis,
|
||||||
|
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||||
|
for the specific language governing rights and limitations under the
|
||||||
|
License.
|
||||||
|
|
||||||
|
The Original Code is FusionPBX
|
||||||
|
|
||||||
|
The Initial Developer of the Original Code is
|
||||||
|
Mark J Crane <markjcrane@fusionpbx.com>
|
||||||
|
Portions created by the Initial Developer are Copyright (C) 2016
|
||||||
|
the Initial Developer. All Rights Reserved.
|
||||||
|
|
||||||
|
Contributor(s):
|
||||||
|
Mark J Crane <markjcrane@fusionpbx.com>
|
||||||
|
*/
|
||||||
|
|
||||||
|
//includes
|
||||||
|
require_once "root.php";
|
||||||
|
require_once "resources/require.php";
|
||||||
|
|
||||||
|
//check permissions
|
||||||
|
require_once "resources/check_auth.php";
|
||||||
|
if (permission_exists('device_vendor_delete')) {
|
||||||
|
//access granted
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
echo "access denied";
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
//add multi-lingual support
|
||||||
|
$language = new text;
|
||||||
|
$text = $language->get();
|
||||||
|
|
||||||
|
//get the id
|
||||||
|
if (count($_GET)>0) {
|
||||||
|
$id = check_str($_GET["id"]);
|
||||||
|
}
|
||||||
|
|
||||||
|
//delete the data
|
||||||
|
if (strlen($id)>0) {
|
||||||
|
//delete device_vendor
|
||||||
|
$sql = "delete from v_device_vendors ";
|
||||||
|
$sql .= "where device_vendor_uuid = '$id' ";
|
||||||
|
$prep_statement = $db->prepare(check_sql($sql));
|
||||||
|
$prep_statement->execute();
|
||||||
|
unset($sql);
|
||||||
|
}
|
||||||
|
|
||||||
|
//redirect the user
|
||||||
|
$_SESSION['message'] = $text['message-delete'];
|
||||||
|
header('Location: device_vendors.php');
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
@ -0,0 +1,223 @@
|
||||||
|
<?php
|
||||||
|
/*
|
||||||
|
FusionPBX
|
||||||
|
Version: MPL 1.1
|
||||||
|
|
||||||
|
The contents of this file are subject to the Mozilla Public License Version
|
||||||
|
1.1 (the "License"); you may not use this file except in compliance with
|
||||||
|
the License. You may obtain a copy of the License at
|
||||||
|
http://www.mozilla.org/MPL/
|
||||||
|
|
||||||
|
Software distributed under the License is distributed on an "AS IS" basis,
|
||||||
|
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||||
|
for the specific language governing rights and limitations under the
|
||||||
|
License.
|
||||||
|
|
||||||
|
The Original Code is FusionPBX
|
||||||
|
|
||||||
|
The Initial Developer of the Original Code is
|
||||||
|
Mark J Crane <markjcrane@fusionpbx.com>
|
||||||
|
Portions created by the Initial Developer are Copyright (C) 2016
|
||||||
|
the Initial Developer. All Rights Reserved.
|
||||||
|
|
||||||
|
Contributor(s):
|
||||||
|
Mark J Crane <markjcrane@fusionpbx.com>
|
||||||
|
*/
|
||||||
|
|
||||||
|
//includes
|
||||||
|
require_once "root.php";
|
||||||
|
require_once "resources/require.php";
|
||||||
|
|
||||||
|
//check permissions
|
||||||
|
require_once "resources/check_auth.php";
|
||||||
|
if (permission_exists('device_vendor_add') || permission_exists('device_vendor_edit')) {
|
||||||
|
//access granted
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
echo "access denied";
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
//add multi-lingual support
|
||||||
|
$language = new text;
|
||||||
|
$text = $language->get();
|
||||||
|
|
||||||
|
//action add or update
|
||||||
|
if (isset($_REQUEST["id"])) {
|
||||||
|
$action = "update";
|
||||||
|
$device_vendor_uuid = check_str($_REQUEST["id"]);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$action = "add";
|
||||||
|
}
|
||||||
|
|
||||||
|
//get http post variables and set them to php variables
|
||||||
|
if (count($_POST)>0) {
|
||||||
|
$name = check_str($_POST["name"]);
|
||||||
|
$enabled = check_str($_POST["enabled"]);
|
||||||
|
$description = check_str($_POST["description"]);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
||||||
|
|
||||||
|
$msg = '';
|
||||||
|
if ($action == "update") {
|
||||||
|
$device_vendor_uuid = check_str($_POST["device_vendor_uuid"]);
|
||||||
|
}
|
||||||
|
|
||||||
|
//check for all required data
|
||||||
|
if (strlen($name) == 0) { $msg .= $text['message-required']." ".$text['label-name']."<br>\n"; }
|
||||||
|
if (strlen($enabled) == 0) { $msg .= $text['message-required']." ".$text['label-enabled']."<br>\n"; }
|
||||||
|
//if (strlen($description) == 0) { $msg .= $text['message-required']." ".$text['label-description']."<br>\n"; }
|
||||||
|
if (strlen($msg) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
||||||
|
require_once "resources/header.php";
|
||||||
|
require_once "resources/persist_form_var.php";
|
||||||
|
echo "<div align='center'>\n";
|
||||||
|
echo "<table><tr><td>\n";
|
||||||
|
echo $msg."<br />";
|
||||||
|
echo "</td></tr></table>\n";
|
||||||
|
persistformvar($_POST);
|
||||||
|
echo "</div>\n";
|
||||||
|
require_once "resources/footer.php";
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
//add or update the database
|
||||||
|
if ($_POST["persistformvar"] != "true") {
|
||||||
|
if ($action == "add" && permission_exists('device_vendor_add')) {
|
||||||
|
$sql = "insert into v_device_vendors ";
|
||||||
|
$sql .= "(";
|
||||||
|
$sql .= "device_vendor_uuid, ";
|
||||||
|
$sql .= "name, ";
|
||||||
|
$sql .= "enabled, ";
|
||||||
|
$sql .= "description ";
|
||||||
|
$sql .= ")";
|
||||||
|
$sql .= "values ";
|
||||||
|
$sql .= "(";
|
||||||
|
$sql .= "'".uuid()."', ";
|
||||||
|
$sql .= "'$name', ";
|
||||||
|
$sql .= "'$enabled', ";
|
||||||
|
$sql .= "'$description' ";
|
||||||
|
$sql .= ")";
|
||||||
|
$db->exec(check_sql($sql));
|
||||||
|
unset($sql);
|
||||||
|
|
||||||
|
$_SESSION["message"] = $text['message-add'];
|
||||||
|
header("Location: device_vendors.php");
|
||||||
|
return;
|
||||||
|
|
||||||
|
} //if ($action == "add")
|
||||||
|
|
||||||
|
if ($action == "update" && permission_exists('device_vendor_edit')) {
|
||||||
|
$sql = "update v_device_vendors set ";
|
||||||
|
$sql .= "name = '$name', ";
|
||||||
|
$sql .= "enabled = '$enabled', ";
|
||||||
|
$sql .= "description = '$description' ";
|
||||||
|
$sql .= "where device_vendor_uuid = '$device_vendor_uuid'";
|
||||||
|
$db->exec(check_sql($sql));
|
||||||
|
unset($sql);
|
||||||
|
|
||||||
|
$_SESSION["message"] = $text['message-update'];
|
||||||
|
header("Location: device_vendors.php");
|
||||||
|
return;
|
||||||
|
|
||||||
|
} //if ($action == "update")
|
||||||
|
} //if ($_POST["persistformvar"] != "true")
|
||||||
|
} //(count($_POST)>0 && strlen($_POST["persistformvar"]) == 0)
|
||||||
|
|
||||||
|
//pre-populate the form
|
||||||
|
if (count($_GET) > 0 && $_POST["persistformvar"] != "true") {
|
||||||
|
$device_vendor_uuid = check_str($_GET["id"]);
|
||||||
|
$sql = "select * from v_device_vendors ";
|
||||||
|
$sql .= "where device_vendor_uuid = '$device_vendor_uuid' ";
|
||||||
|
$prep_statement = $db->prepare(check_sql($sql));
|
||||||
|
$prep_statement->execute();
|
||||||
|
$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
||||||
|
foreach ($result as &$row) {
|
||||||
|
$name = $row["name"];
|
||||||
|
$enabled = $row["enabled"];
|
||||||
|
$description = $row["description"];
|
||||||
|
}
|
||||||
|
unset ($prep_statement);
|
||||||
|
}
|
||||||
|
|
||||||
|
//show the header
|
||||||
|
require_once "resources/header.php";
|
||||||
|
|
||||||
|
//show the content
|
||||||
|
echo "<form name='frm' id='frm' method='post' action=''>\n";
|
||||||
|
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
|
||||||
|
echo "<tr>\n";
|
||||||
|
echo "<td align='left' width='30%' nowrap='nowrap' valign='top'><b>".$text['title-device_vendor']."</b><br><br></td>\n";
|
||||||
|
echo "<td width='70%' align='right' valign='top'>\n";
|
||||||
|
echo " <input type='button' class='btn' name='' alt='".$text['button-back']."' onclick=\"window.location='device_vendors.php'\" value='".$text['button-back']."'>";
|
||||||
|
echo " <input type='submit' name='submit' class='btn' value='".$text['button-save']."'>";
|
||||||
|
echo "</td>\n";
|
||||||
|
echo "</tr>\n";
|
||||||
|
|
||||||
|
echo "<tr>\n";
|
||||||
|
echo "<td class='vncellreq' valign='top' align='left' nowrap='nowrap'>\n";
|
||||||
|
echo " ".$text['label-name']."\n";
|
||||||
|
echo "</td>\n";
|
||||||
|
echo "<td class='vtable' align='left'>\n";
|
||||||
|
echo " <input class='formfld' type='text' name='name' maxlength='255' value=\"$name\">\n";
|
||||||
|
echo "<br />\n";
|
||||||
|
echo $text['description-name']."\n";
|
||||||
|
echo "</td>\n";
|
||||||
|
echo "</tr>\n";
|
||||||
|
|
||||||
|
echo "<tr>\n";
|
||||||
|
echo "<td class='vncellreq' valign='top' align='left' nowrap='nowrap'>\n";
|
||||||
|
echo " ".$text['label-enabled']."\n";
|
||||||
|
echo "</td>\n";
|
||||||
|
echo "<td class='vtable' align='left'>\n";
|
||||||
|
echo " <select class='formfld' name='enabled'>\n";
|
||||||
|
echo " <option value=''></option>\n";
|
||||||
|
if ($enabled == "false") {
|
||||||
|
echo " <option value='false' selected='selected'>".$text['label-false']."</option>\n";
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
echo " <option value='false'>".$text['label-false']."</option>\n";
|
||||||
|
}
|
||||||
|
if ($enabled == "true") {
|
||||||
|
echo " <option value='true' selected='selected'>".$text['label-true']."</option>\n";
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
echo " <option value='true'>".$text['label-true']."</option>\n";
|
||||||
|
}
|
||||||
|
echo " </select>\n";
|
||||||
|
echo "<br />\n";
|
||||||
|
echo $text['description-enabled']."\n";
|
||||||
|
echo "</td>\n";
|
||||||
|
echo "</tr>\n";
|
||||||
|
|
||||||
|
echo "<tr>\n";
|
||||||
|
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
|
||||||
|
echo " ".$text['label-description']."\n";
|
||||||
|
echo "</td>\n";
|
||||||
|
echo "<td class='vtable' align='left'>\n";
|
||||||
|
echo " <input class='formfld' type='text' name='description' maxlength='255' value=\"$description\">\n";
|
||||||
|
echo "<br />\n";
|
||||||
|
echo $text['description-description']."\n";
|
||||||
|
echo "</td>\n";
|
||||||
|
echo "</tr>\n";
|
||||||
|
echo " <tr>\n";
|
||||||
|
echo " <td colspan='2' align='right'>\n";
|
||||||
|
if ($action == "update") {
|
||||||
|
echo " <input type='hidden' name='device_vendor_uuid' value='$device_vendor_uuid'>\n";
|
||||||
|
}
|
||||||
|
echo " <input type='submit' name='submit' class='btn' value='".$text['button-save']."'>\n";
|
||||||
|
echo " </td>\n";
|
||||||
|
echo " </tr>";
|
||||||
|
echo "</table>";
|
||||||
|
echo "</form>";
|
||||||
|
echo "<br /><br />";
|
||||||
|
|
||||||
|
if ($action == "update") {
|
||||||
|
require "device_vendor_functions.php";
|
||||||
|
}
|
||||||
|
|
||||||
|
//include the footer
|
||||||
|
require_once "resources/footer.php";
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
@ -0,0 +1,65 @@
|
||||||
|
<?php
|
||||||
|
/*
|
||||||
|
FusionPBX
|
||||||
|
Version: MPL 1.1
|
||||||
|
|
||||||
|
The contents of this file are subject to the Mozilla Public License Version
|
||||||
|
1.1 (the "License"); you may not use this file except in compliance with
|
||||||
|
the License. You may obtain a copy of the License at
|
||||||
|
http://www.mozilla.org/MPL/
|
||||||
|
|
||||||
|
Software distributed under the License is distributed on an "AS IS" basis,
|
||||||
|
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||||
|
for the specific language governing rights and limitations under the
|
||||||
|
License.
|
||||||
|
|
||||||
|
The Original Code is FusionPBX
|
||||||
|
|
||||||
|
The Initial Developer of the Original Code is
|
||||||
|
Mark J Crane <markjcrane@fusionpbx.com>
|
||||||
|
Portions created by the Initial Developer are Copyright (C) 2016
|
||||||
|
the Initial Developer. All Rights Reserved.
|
||||||
|
|
||||||
|
Contributor(s):
|
||||||
|
Mark J Crane <markjcrane@fusionpbx.com>
|
||||||
|
*/
|
||||||
|
|
||||||
|
//includes
|
||||||
|
require_once "root.php";
|
||||||
|
require_once "resources/require.php";
|
||||||
|
|
||||||
|
//check permissions
|
||||||
|
require_once "resources/check_auth.php";
|
||||||
|
if (permission_exists('device_vendor_function_delete')) {
|
||||||
|
//access granted
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
echo "access denied";
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
//add multi-lingual support
|
||||||
|
$language = new text;
|
||||||
|
$text = $language->get();
|
||||||
|
|
||||||
|
//get the id
|
||||||
|
if (count($_GET)>0) {
|
||||||
|
$id = check_str($_GET["id"]);
|
||||||
|
$device_vendor_uuid = check_str($_GET["device_vendor_uuid"]);
|
||||||
|
}
|
||||||
|
|
||||||
|
//delete the data
|
||||||
|
if (strlen($id)>0) {
|
||||||
|
//delete device_vendor_function
|
||||||
|
$sql = "delete from v_device_vendor_functions ";
|
||||||
|
$sql .= "where device_vendor_function_uuid = '$id' ";
|
||||||
|
$prep_statement = $db->prepare(check_sql($sql));
|
||||||
|
$prep_statement->execute();
|
||||||
|
unset($sql);
|
||||||
|
}
|
||||||
|
|
||||||
|
//redirect the user
|
||||||
|
$_SESSION['message'] = $text['message-delete'];
|
||||||
|
header('Location: device_vendor_function_edit.php?id='.$device_vendor_uuid);
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
@ -0,0 +1,262 @@
|
||||||
|
<?php
|
||||||
|
/*
|
||||||
|
FusionPBX
|
||||||
|
Version: MPL 1.1
|
||||||
|
|
||||||
|
The contents of this file are subject to the Mozilla Public License Version
|
||||||
|
1.1 (the "License"); you may not use this file except in compliance with
|
||||||
|
the License. You may obtain a copy of the License at
|
||||||
|
http://www.mozilla.org/MPL/
|
||||||
|
|
||||||
|
Software distributed under the License is distributed on an "AS IS" basis,
|
||||||
|
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||||
|
for the specific language governing rights and limitations under the
|
||||||
|
License.
|
||||||
|
|
||||||
|
The Original Code is FusionPBX
|
||||||
|
|
||||||
|
The Initial Developer of the Original Code is
|
||||||
|
Mark J Crane <markjcrane@fusionpbx.com>
|
||||||
|
Portions created by the Initial Developer are Copyright (C) 2016
|
||||||
|
the Initial Developer. All Rights Reserved.
|
||||||
|
|
||||||
|
Contributor(s):
|
||||||
|
Mark J Crane <markjcrane@fusionpbx.com>
|
||||||
|
*/
|
||||||
|
|
||||||
|
//includes
|
||||||
|
require_once "root.php";
|
||||||
|
require_once "resources/require.php";
|
||||||
|
|
||||||
|
//check permissions
|
||||||
|
require_once "resources/check_auth.php";
|
||||||
|
if (permission_exists('device_vendor_function_add') || permission_exists('device_vendor_function_edit')) {
|
||||||
|
//access granted
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
echo "access denied";
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
//add multi-lingual support
|
||||||
|
$language = new text;
|
||||||
|
$text = $language->get();
|
||||||
|
|
||||||
|
//action add or update
|
||||||
|
if (isset($_REQUEST["id"])) {
|
||||||
|
$action = "update";
|
||||||
|
$device_vendor_function_uuid = check_str($_REQUEST["id"]);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$action = "add";
|
||||||
|
}
|
||||||
|
|
||||||
|
//set the parent uuid
|
||||||
|
if (strlen($_GET["device_vendor_uuid"]) > 0) {
|
||||||
|
$device_vendor_uuid = check_str($_GET["device_vendor_uuid"]);
|
||||||
|
}
|
||||||
|
|
||||||
|
//get http post variables and set them to php variables
|
||||||
|
if (count($_POST)>0) {
|
||||||
|
$label = check_str($_POST["label"]);
|
||||||
|
$name = check_str($_POST["name"]);
|
||||||
|
$value = check_str($_POST["value"]);
|
||||||
|
$enabled = check_str($_POST["enabled"]);
|
||||||
|
$description = check_str($_POST["description"]);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
||||||
|
|
||||||
|
$msg = '';
|
||||||
|
if ($action == "update") {
|
||||||
|
$device_vendor_function_uuid = check_str($_POST["device_vendor_function_uuid"]);
|
||||||
|
}
|
||||||
|
|
||||||
|
//check for all required data
|
||||||
|
if (strlen($label) == 0) { $msg .= $text['message-required']." ".$text['label-label']."<br>\n"; }
|
||||||
|
if (strlen($name) == 0) { $msg .= $text['message-required']." ".$text['label-name']."<br>\n"; }
|
||||||
|
if (strlen($value) == 0) { $msg .= $text['message-required']." ".$text['label-value']."<br>\n"; }
|
||||||
|
if (strlen($enabled) == 0) { $msg .= $text['message-required']." ".$text['label-enabled']."<br>\n"; }
|
||||||
|
//if (strlen($description) == 0) { $msg .= $text['message-required']." ".$text['label-description']."<br>\n"; }
|
||||||
|
if (strlen($msg) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
||||||
|
require_once "resources/header.php";
|
||||||
|
require_once "resources/persist_form_var.php";
|
||||||
|
echo "<div align='center'>\n";
|
||||||
|
echo "<table><tr><td>\n";
|
||||||
|
echo $msg."<br />";
|
||||||
|
echo "</td></tr></table>\n";
|
||||||
|
persistformvar($_POST);
|
||||||
|
echo "</div>\n";
|
||||||
|
require_once "resources/footer.php";
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
//add or update the database
|
||||||
|
if ($_POST["persistformvar"] != "true") {
|
||||||
|
if ($action == "add" && permission_exists('device_vendor_function_add')) {
|
||||||
|
$sql = "insert into v_device_vendor_functions ";
|
||||||
|
$sql .= "(";
|
||||||
|
$sql .= "device_vendor_function_uuid, ";
|
||||||
|
$sql .= "device_vendor_uuid, ";
|
||||||
|
$sql .= "label, ";
|
||||||
|
$sql .= "name, ";
|
||||||
|
$sql .= "value, ";
|
||||||
|
$sql .= "enabled, ";
|
||||||
|
$sql .= "description ";
|
||||||
|
$sql .= ")";
|
||||||
|
$sql .= "values ";
|
||||||
|
$sql .= "(";
|
||||||
|
$sql .= "'".uuid()."', ";
|
||||||
|
$sql .= "'$device_vendor_uuid', ";
|
||||||
|
$sql .= "'$label', ";
|
||||||
|
$sql .= "'$name', ";
|
||||||
|
$sql .= "'$value', ";
|
||||||
|
$sql .= "'$enabled', ";
|
||||||
|
$sql .= "'$description' ";
|
||||||
|
$sql .= ")";
|
||||||
|
$db->exec(check_sql($sql));
|
||||||
|
unset($sql);
|
||||||
|
|
||||||
|
$_SESSION["message"] = $text['message-add'];
|
||||||
|
header('Location: device_vendor_edit.php?id='.$device_vendor_uuid);
|
||||||
|
return;
|
||||||
|
|
||||||
|
} //if ($action == "add")
|
||||||
|
|
||||||
|
if ($action == "update" && permission_exists('device_vendor_function_edit')) {
|
||||||
|
$sql = "update v_device_vendor_functions set ";
|
||||||
|
$sql .= "device_vendor_uuid = '$device_vendor_uuid', ";
|
||||||
|
$sql .= "label = '$label', ";
|
||||||
|
$sql .= "name = '$name', ";
|
||||||
|
$sql .= "value = '$value', ";
|
||||||
|
$sql .= "enabled = '$enabled', ";
|
||||||
|
$sql .= "description = '$description' ";
|
||||||
|
$sql .= "where device_vendor_function_uuid = '$device_vendor_function_uuid'";
|
||||||
|
$db->exec(check_sql($sql));
|
||||||
|
unset($sql);
|
||||||
|
|
||||||
|
$_SESSION["message"] = $text['message-update'];
|
||||||
|
header('Location: device_vendor_edit.php?id='.$device_vendor_uuid);
|
||||||
|
return;
|
||||||
|
|
||||||
|
} //if ($action == "update")
|
||||||
|
} //if ($_POST["persistformvar"] != "true")
|
||||||
|
} //(count($_POST)>0 && strlen($_POST["persistformvar"]) == 0)
|
||||||
|
|
||||||
|
//pre-populate the form
|
||||||
|
if (count($_GET) > 0 && $_POST["persistformvar"] != "true") {
|
||||||
|
$device_vendor_function_uuid = check_str($_GET["id"]);
|
||||||
|
$sql = "select * from v_device_vendor_functions ";
|
||||||
|
$sql .= "where device_vendor_function_uuid = '$device_vendor_function_uuid' ";
|
||||||
|
$prep_statement = $db->prepare(check_sql($sql));
|
||||||
|
$prep_statement->execute();
|
||||||
|
$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
||||||
|
foreach ($result as &$row) {
|
||||||
|
$label = $row["label"];
|
||||||
|
$name = $row["name"];
|
||||||
|
$value = $row["value"];
|
||||||
|
$enabled = $row["enabled"];
|
||||||
|
$description = $row["description"];
|
||||||
|
}
|
||||||
|
unset ($prep_statement);
|
||||||
|
}
|
||||||
|
|
||||||
|
//show the header
|
||||||
|
require_once "resources/header.php";
|
||||||
|
|
||||||
|
//show the content
|
||||||
|
echo "<form name='frm' id='frm' method='post' action=''>\n";
|
||||||
|
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
|
||||||
|
echo "<tr>\n";
|
||||||
|
echo "<td align='left' width='30%' nowrap='nowrap' valign='top'><b>".$text['title-device_vendor_function']."</b><br><br></td>\n";
|
||||||
|
echo "<td width='70%' align='right' valign='top'>\n";
|
||||||
|
echo " <input type='button' class='btn' name='' alt='".$text['button-back']."' onclick=\"window.location='device_vendor_edit.php?id=$device_vendor_uuid'\" value='".$text['button-back']."'>";
|
||||||
|
echo " <input type='submit' name='submit' class='btn' value='".$text['button-save']."'>";
|
||||||
|
echo "</td>\n";
|
||||||
|
echo "</tr>\n";
|
||||||
|
|
||||||
|
echo "<tr>\n";
|
||||||
|
echo "<td class='vncellreq' valign='top' align='left' nowrap='nowrap'>\n";
|
||||||
|
echo " ".$text['label-label']."\n";
|
||||||
|
echo "</td>\n";
|
||||||
|
echo "<td class='vtable' align='left'>\n";
|
||||||
|
echo " <input class='formfld' type='text' name='label' maxlength='255' value=\"$label\">\n";
|
||||||
|
echo "<br />\n";
|
||||||
|
echo $text['description-label']."\n";
|
||||||
|
echo "</td>\n";
|
||||||
|
echo "</tr>\n";
|
||||||
|
|
||||||
|
echo "<tr>\n";
|
||||||
|
echo "<td class='vncellreq' valign='top' align='left' nowrap='nowrap'>\n";
|
||||||
|
echo " ".$text['label-name']."\n";
|
||||||
|
echo "</td>\n";
|
||||||
|
echo "<td class='vtable' align='left'>\n";
|
||||||
|
echo " <input class='formfld' type='text' name='name' maxlength='255' value=\"$name\">\n";
|
||||||
|
echo "<br />\n";
|
||||||
|
echo $text['description-name']."\n";
|
||||||
|
echo "</td>\n";
|
||||||
|
echo "</tr>\n";
|
||||||
|
|
||||||
|
echo "<tr>\n";
|
||||||
|
echo "<td class='vncellreq' valign='top' align='left' nowrap='nowrap'>\n";
|
||||||
|
echo " ".$text['label-value']."\n";
|
||||||
|
echo "</td>\n";
|
||||||
|
echo "<td class='vtable' align='left'>\n";
|
||||||
|
echo " <input class='formfld' type='text' name='value' maxlength='255' value=\"$value\">\n";
|
||||||
|
echo "<br />\n";
|
||||||
|
echo $text['description-value']."\n";
|
||||||
|
echo "</td>\n";
|
||||||
|
echo "</tr>\n";
|
||||||
|
|
||||||
|
echo "<tr>\n";
|
||||||
|
echo "<td class='vncellreq' valign='top' align='left' nowrap='nowrap'>\n";
|
||||||
|
echo " ".$text['label-enabled']."\n";
|
||||||
|
echo "</td>\n";
|
||||||
|
echo "<td class='vtable' align='left'>\n";
|
||||||
|
echo " <select class='formfld' name='enabled'>\n";
|
||||||
|
echo " <option value=''></option>\n";
|
||||||
|
if ($enabled == "true") {
|
||||||
|
echo " <option value='true' selected='selected'>".$text['label-true']."</option>\n";
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
echo " <option value='true'>".$text['label-true']."</option>\n";
|
||||||
|
}
|
||||||
|
if ($enabled == "false") {
|
||||||
|
echo " <option value='false' selected='selected'>".$text['label-false']."</option>\n";
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
echo " <option value='false'>".$text['label-false']."</option>\n";
|
||||||
|
}
|
||||||
|
echo " </select>\n";
|
||||||
|
echo "<br />\n";
|
||||||
|
echo $text['description-enabled']."\n";
|
||||||
|
echo "</td>\n";
|
||||||
|
echo "</tr>\n";
|
||||||
|
|
||||||
|
echo "<tr>\n";
|
||||||
|
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
|
||||||
|
echo " ".$text['label-description']."\n";
|
||||||
|
echo "</td>\n";
|
||||||
|
echo "<td class='vtable' align='left'>\n";
|
||||||
|
echo " <input class='formfld' type='text' name='description' maxlength='255' value=\"$description\">\n";
|
||||||
|
echo "<br />\n";
|
||||||
|
echo $text['description-description']."\n";
|
||||||
|
echo "</td>\n";
|
||||||
|
echo "</tr>\n";
|
||||||
|
echo " <tr>\n";
|
||||||
|
echo " <td colspan='2' align='right'>\n";
|
||||||
|
echo " <input type='hidden' name='device_vendor_uuid' value='$device_vendor_uuid'>\n";
|
||||||
|
if ($action == "update") {
|
||||||
|
echo " <input type='hidden' name='device_vendor_function_uuid' value='$device_vendor_function_uuid'>\n";
|
||||||
|
}
|
||||||
|
echo " <input type='submit' name='submit' class='btn' value='".$text['button-save']."'>\n";
|
||||||
|
echo " </td>\n";
|
||||||
|
echo " </tr>";
|
||||||
|
echo "</table>";
|
||||||
|
echo "</form>";
|
||||||
|
echo "<br /><br />";
|
||||||
|
|
||||||
|
//include the footer
|
||||||
|
require_once "resources/footer.php";
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
@ -0,0 +1,160 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
//includes
|
||||||
|
require_once "root.php";
|
||||||
|
require_once "resources/require.php";
|
||||||
|
|
||||||
|
//check permissions
|
||||||
|
require_once "resources/check_auth.php";
|
||||||
|
if (permission_exists('device_vendor_function_view')) {
|
||||||
|
//access granted
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
echo "access denied";
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
//add multi-lingual support
|
||||||
|
$language = new text;
|
||||||
|
$text = $language->get();
|
||||||
|
|
||||||
|
//get variables used to control the order
|
||||||
|
$order_by = check_str($_GET["order_by"]);
|
||||||
|
$order = check_str($_GET["order"]);
|
||||||
|
|
||||||
|
//add the search term
|
||||||
|
$search = check_str($_GET["search"]);
|
||||||
|
if (strlen($search) > 0) {
|
||||||
|
$sql_search = "and (";
|
||||||
|
$sql_search .= "label like '%".$search."%'";
|
||||||
|
$sql_search .= "or name like '%".$search."%'";
|
||||||
|
$sql_search .= "or value like '%".$search."%'";
|
||||||
|
$sql_search .= "or enabled like '%".$search."%'";
|
||||||
|
$sql_search .= "or description like '%".$search."%'";
|
||||||
|
$sql_search .= ")";
|
||||||
|
}
|
||||||
|
//additional includes
|
||||||
|
require_once "resources/header.php";
|
||||||
|
require_once "resources/paging.php";
|
||||||
|
|
||||||
|
//prepare to page the results
|
||||||
|
$sql = "select count(*) as num_rows from v_device_vendor_functions ";
|
||||||
|
$sql .= "where device_vendor_uuid = '$device_vendor_uuid' ";
|
||||||
|
$sql .= $sql_search;
|
||||||
|
if (strlen($order_by)> 0) { $sql .= "order by $order_by $order "; }
|
||||||
|
$prep_statement = $db->prepare($sql);
|
||||||
|
if ($prep_statement) {
|
||||||
|
$prep_statement->execute();
|
||||||
|
$row = $prep_statement->fetch(PDO::FETCH_ASSOC);
|
||||||
|
if ($row['num_rows'] > 0) {
|
||||||
|
$num_rows = $row['num_rows'];
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$num_rows = '0';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//prepare to page the results
|
||||||
|
$rows_per_page = ($_SESSION['domain']['paging']['numeric'] != '') ? $_SESSION['domain']['paging']['numeric'] : 50;
|
||||||
|
$param = "";
|
||||||
|
$page = $_GET['page'];
|
||||||
|
if (strlen($page) == 0) { $page = 0; $_GET['page'] = 0; }
|
||||||
|
list($paging_controls, $rows_per_page, $var3) = paging($num_rows, $param, $rows_per_page);
|
||||||
|
$offset = $rows_per_page * $page;
|
||||||
|
|
||||||
|
//get the list
|
||||||
|
$sql = "select * from v_device_vendor_functions ";
|
||||||
|
$sql .= "where device_vendor_uuid = '$device_vendor_uuid' ";
|
||||||
|
$sql .= $sql_search;
|
||||||
|
if (strlen($order_by)> 0) { $sql .= "order by $order_by $order "; }
|
||||||
|
$sql .= "limit $rows_per_page offset $offset ";
|
||||||
|
$prep_statement = $db->prepare(check_sql($sql));
|
||||||
|
$prep_statement->execute();
|
||||||
|
$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
||||||
|
unset ($prep_statement, $sql);
|
||||||
|
|
||||||
|
//alternate the row style
|
||||||
|
$c = 0;
|
||||||
|
$row_style["0"] = "row_style0";
|
||||||
|
$row_style["1"] = "row_style1";
|
||||||
|
|
||||||
|
//show the content
|
||||||
|
echo "<table width='100%' border='0'>\n";
|
||||||
|
echo " <tr>\n";
|
||||||
|
echo " <td width='50%' align='left' nowrap='nowrap'><b>".$text['title-device_vendor_functions']."</b></td>\n";
|
||||||
|
echo " <form method='get' action=''>\n";
|
||||||
|
echo " <td width='50%' style='vertical-align: top; text-align: right; white-space: nowrap;'>\n";
|
||||||
|
echo " <input type='text' class='txt' style='width: 150px' name='search' id='search' value='".$search."'>\n";
|
||||||
|
echo " <input type='submit' class='btn' name='submit' value='".$text['button-search']."'>\n";
|
||||||
|
echo " </td>\n";
|
||||||
|
echo " </form>\n";
|
||||||
|
echo " </tr>\n";
|
||||||
|
echo "</table>\n";
|
||||||
|
|
||||||
|
echo "<table class='tr_hover' width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
|
||||||
|
echo "<tr>\n";
|
||||||
|
echo th_order_by('label', $text['label-label'], $order_by, $order);
|
||||||
|
echo th_order_by('name', $text['label-name'], $order_by, $order);
|
||||||
|
echo th_order_by('value', $text['label-value'], $order_by, $order);
|
||||||
|
echo th_order_by('enabled', $text['label-enabled'], $order_by, $order);
|
||||||
|
echo th_order_by('description', $text['label-description'], $order_by, $order);
|
||||||
|
echo "<td class='list_control_icons'>";
|
||||||
|
if (permission_exists('device_vendor_function_add')) {
|
||||||
|
echo "<a href='device_vendor_function_edit.php?device_vendor_uuid=".$_GET['id']."' alt='".$text['button-add']."'>$v_link_label_add</a>";
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
echo " \n";
|
||||||
|
}
|
||||||
|
echo "</td>\n";
|
||||||
|
echo "<tr>\n";
|
||||||
|
|
||||||
|
if (is_array($result)) {
|
||||||
|
foreach($result as $row) {
|
||||||
|
if (permission_exists('device_vendor_function_edit')) {
|
||||||
|
$tr_link = "href='device_vendor_function_edit.php?device_vendor_uuid=".$row['device_vendor_uuid']."&id=".$row['device_vendor_function_uuid']."'";
|
||||||
|
}
|
||||||
|
echo "<tr ".$tr_link.">\n";
|
||||||
|
echo " <td valign='top' class='".$row_style[$c]."'>".$row['label']." </td>\n";
|
||||||
|
echo " <td valign='top' class='".$row_style[$c]."'>".$row['name']." </td>\n";
|
||||||
|
echo " <td valign='top' class='".$row_style[$c]."'>".$row['value']." </td>\n";
|
||||||
|
echo " <td valign='top' class='".$row_style[$c]."'>".$row['enabled']." </td>\n";
|
||||||
|
echo " <td valign='top' class='".$row_style[$c]."'>".$row['description']." </td>\n";
|
||||||
|
echo " <td class='list_control_icons'>";
|
||||||
|
if (permission_exists('device_vendor_function_edit')) {
|
||||||
|
echo "<a href='device_vendor_function_edit.php?device_vendor_uuid=".$row['device_vendor_uuid']."&id=".$row['device_vendor_function_uuid']."' alt='".$text['button-edit']."'>$v_link_label_edit</a>";
|
||||||
|
}
|
||||||
|
if (permission_exists('device_vendor_function_delete')) {
|
||||||
|
echo "<a href='device_vendor_function_delete.php?device_vendor_uuid=".$row['device_vendor_uuid']."&id=".$row['device_vendor_function_uuid']."' alt='".$text['button-delete']."' onclick=\"return confirm('".$text['confirm-delete']."')\">$v_link_label_delete</a>";
|
||||||
|
}
|
||||||
|
echo " </td>\n";
|
||||||
|
echo "</tr>\n";
|
||||||
|
if ($c==0) { $c=1; } else { $c=0; }
|
||||||
|
} //end foreach
|
||||||
|
unset($sql, $result, $row_count);
|
||||||
|
} //end if results
|
||||||
|
|
||||||
|
echo "<tr>\n";
|
||||||
|
echo "<td colspan='6' align='left'>\n";
|
||||||
|
echo " <table width='100%' cellpadding='0' cellspacing='0'>\n";
|
||||||
|
echo " <tr>\n";
|
||||||
|
echo " <td width='33.3%' nowrap='nowrap'> </td>\n";
|
||||||
|
echo " <td width='33.3%' align='center' nowrap='nowrap'>$paging_controls</td>\n";
|
||||||
|
echo " <td class='list_control_icons'>";
|
||||||
|
if (permission_exists('device_vendor_function_add')) {
|
||||||
|
echo "<a href='device_vendor_function_edit.php?device_vendor_uuid=".$_GET['id']."' alt='".$text['button-add']."'>$v_link_label_add</a>";
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
echo " ";
|
||||||
|
}
|
||||||
|
echo " </td>\n";
|
||||||
|
echo " </tr>\n";
|
||||||
|
echo " </table>\n";
|
||||||
|
echo "</td>\n";
|
||||||
|
echo "</tr>\n";
|
||||||
|
echo "</table>";
|
||||||
|
echo "<br /><br />";
|
||||||
|
|
||||||
|
//include the footer
|
||||||
|
require_once "resources/footer.php";
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
@ -0,0 +1,181 @@
|
||||||
|
<?php
|
||||||
|
/*
|
||||||
|
FusionPBX
|
||||||
|
Version: MPL 1.1
|
||||||
|
|
||||||
|
The contents of this file are subject to the Mozilla Public License Version
|
||||||
|
1.1 (the "License"); you may not use this file except in compliance with
|
||||||
|
the License. You may obtain a copy of the License at
|
||||||
|
http://www.mozilla.org/MPL/
|
||||||
|
|
||||||
|
Software distributed under the License is distributed on an "AS IS" basis,
|
||||||
|
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||||
|
for the specific language governing rights and limitations under the
|
||||||
|
License.
|
||||||
|
|
||||||
|
The Original Code is FusionPBX
|
||||||
|
|
||||||
|
The Initial Developer of the Original Code is
|
||||||
|
Mark J Crane <markjcrane@fusionpbx.com>
|
||||||
|
Portions created by the Initial Developer are Copyright (C) 2016
|
||||||
|
the Initial Developer. All Rights Reserved.
|
||||||
|
|
||||||
|
Contributor(s):
|
||||||
|
Mark J Crane <markjcrane@fusionpbx.com>
|
||||||
|
*/
|
||||||
|
|
||||||
|
//includes
|
||||||
|
require_once "root.php";
|
||||||
|
require_once "resources/require.php";
|
||||||
|
|
||||||
|
//check permissions
|
||||||
|
require_once "resources/check_auth.php";
|
||||||
|
if (permission_exists('device_vendor_view')) {
|
||||||
|
//access granted
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
echo "access denied";
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
//add multi-lingual support
|
||||||
|
$language = new text;
|
||||||
|
$text = $language->get();
|
||||||
|
|
||||||
|
//get variables used to control the order
|
||||||
|
$order_by = check_str($_GET["order_by"]);
|
||||||
|
$order = check_str($_GET["order"]);
|
||||||
|
|
||||||
|
//add the search term
|
||||||
|
$search = check_str($_GET["search"]);
|
||||||
|
if (strlen($search) > 0) {
|
||||||
|
$sql_search = "where (";
|
||||||
|
$sql_search .= "name like '%".$search."%'";
|
||||||
|
$sql_search .= "or enabled like '%".$search."%'";
|
||||||
|
$sql_search .= "or description like '%".$search."%'";
|
||||||
|
$sql_search .= ")";
|
||||||
|
}
|
||||||
|
//additional includes
|
||||||
|
require_once "resources/header.php";
|
||||||
|
require_once "resources/paging.php";
|
||||||
|
|
||||||
|
//prepare to page the results
|
||||||
|
$sql = "select count(*) as num_rows from v_device_vendors ";
|
||||||
|
$sql .= $sql_search;
|
||||||
|
if (strlen($order_by)> 0) { $sql .= "order by $order_by $order "; }
|
||||||
|
$prep_statement = $db->prepare($sql);
|
||||||
|
if ($prep_statement) {
|
||||||
|
$prep_statement->execute();
|
||||||
|
$row = $prep_statement->fetch(PDO::FETCH_ASSOC);
|
||||||
|
if ($row['num_rows'] > 0) {
|
||||||
|
$num_rows = $row['num_rows'];
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$num_rows = '0';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//prepare to page the results
|
||||||
|
$rows_per_page = ($_SESSION['domain']['paging']['numeric'] != '') ? $_SESSION['domain']['paging']['numeric'] : 50;
|
||||||
|
$param = "";
|
||||||
|
$page = $_GET['page'];
|
||||||
|
if (strlen($page) == 0) { $page = 0; $_GET['page'] = 0; }
|
||||||
|
list($paging_controls, $rows_per_page, $var3) = paging($num_rows, $param, $rows_per_page);
|
||||||
|
$offset = $rows_per_page * $page;
|
||||||
|
|
||||||
|
//get the list
|
||||||
|
$sql = "select * from v_device_vendors ";
|
||||||
|
$sql .= $sql_search;
|
||||||
|
if (strlen($order_by)> 0) { $sql .= "order by $order_by $order "; }
|
||||||
|
$sql .= "limit $rows_per_page offset $offset ";
|
||||||
|
$prep_statement = $db->prepare(check_sql($sql));
|
||||||
|
$prep_statement->execute();
|
||||||
|
$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
||||||
|
unset ($prep_statement, $sql);
|
||||||
|
|
||||||
|
//alternate the row style
|
||||||
|
$c = 0;
|
||||||
|
$row_style["0"] = "row_style0";
|
||||||
|
$row_style["1"] = "row_style1";
|
||||||
|
|
||||||
|
//show the content
|
||||||
|
echo "<table width='100%' border='0'>\n";
|
||||||
|
echo " <tr>\n";
|
||||||
|
echo " <td width='50%' align='left' nowrap='nowrap'><b>".$text['title-device_vendors']."</b></td>\n";
|
||||||
|
echo " <form method='get' action=''>\n";
|
||||||
|
echo " <td width='50%' style='vertical-align: top; text-align: right; white-space: nowrap;'>\n";
|
||||||
|
echo " <input type='text' class='txt' style='width: 150px' name='search' id='search' value='".$search."'>\n";
|
||||||
|
echo " <input type='submit' class='btn' name='submit' value='".$text['button-search']."'>\n";
|
||||||
|
echo " </td>\n";
|
||||||
|
echo " </form>\n";
|
||||||
|
echo " </tr>\n";
|
||||||
|
echo " <tr>\n";
|
||||||
|
echo " <td align='left' colspan='2'>\n";
|
||||||
|
echo " ".$text['title_description-device_vendor']."<br /><br />\n";
|
||||||
|
echo " </td>\n";
|
||||||
|
echo " </tr>\n";
|
||||||
|
echo "</table>\n";
|
||||||
|
|
||||||
|
echo "<table class='tr_hover' width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
|
||||||
|
echo "<tr>\n";
|
||||||
|
echo th_order_by('name', $text['label-name'], $order_by, $order);
|
||||||
|
echo th_order_by('enabled', $text['label-enabled'], $order_by, $order);
|
||||||
|
echo th_order_by('description', $text['label-description'], $order_by, $order);
|
||||||
|
echo "<td class='list_control_icons'>";
|
||||||
|
if (permission_exists('device_vendor_add')) {
|
||||||
|
echo "<a href='device_vendor_edit.php' alt='".$text['button-add']."'>$v_link_label_add</a>";
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
echo " \n";
|
||||||
|
}
|
||||||
|
echo "</td>\n";
|
||||||
|
echo "<tr>\n";
|
||||||
|
|
||||||
|
if (is_array($result)) {
|
||||||
|
foreach($result as $row) {
|
||||||
|
if (permission_exists('device_vendor_edit')) {
|
||||||
|
$tr_link = "href='device_vendor_edit.php?id=".$row['device_vendor_uuid']."'";
|
||||||
|
}
|
||||||
|
echo "<tr ".$tr_link.">\n";
|
||||||
|
echo " <td valign='top' class='".$row_style[$c]."'>".$row['name']." </td>\n";
|
||||||
|
echo " <td valign='top' class='".$row_style[$c]."'>".$row['enabled']." </td>\n";
|
||||||
|
echo " <td valign='top' class='".$row_style[$c]."'>".$row['description']." </td>\n";
|
||||||
|
echo " <td class='list_control_icons'>";
|
||||||
|
if (permission_exists('device_vendor_edit')) {
|
||||||
|
echo "<a href='device_vendor_edit.php?id=".$row['device_vendor_uuid']."' alt='".$text['button-edit']."'>$v_link_label_edit</a>";
|
||||||
|
}
|
||||||
|
if (permission_exists('device_vendor_delete')) {
|
||||||
|
echo "<a href='device_vendor_delete.php?id=".$row['device_vendor_uuid']."' alt='".$text['button-delete']."' onclick=\"return confirm('".$text['confirm-delete']."')\">$v_link_label_delete</a>";
|
||||||
|
}
|
||||||
|
echo " </td>\n";
|
||||||
|
echo "</tr>\n";
|
||||||
|
if ($c==0) { $c=1; } else { $c=0; }
|
||||||
|
} //end foreach
|
||||||
|
unset($sql, $result, $row_count);
|
||||||
|
} //end if results
|
||||||
|
|
||||||
|
echo "<tr>\n";
|
||||||
|
echo "<td colspan='4' align='left'>\n";
|
||||||
|
echo " <table width='100%' cellpadding='0' cellspacing='0'>\n";
|
||||||
|
echo " <tr>\n";
|
||||||
|
echo " <td width='33.3%' nowrap='nowrap'> </td>\n";
|
||||||
|
echo " <td width='33.3%' align='center' nowrap='nowrap'>$paging_controls</td>\n";
|
||||||
|
echo " <td class='list_control_icons'>";
|
||||||
|
if (permission_exists('device_vendor_add')) {
|
||||||
|
echo "<a href='device_vendor_edit.php' alt='".$text['button-add']."'>$v_link_label_add</a>";
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
echo " ";
|
||||||
|
}
|
||||||
|
echo " </td>\n";
|
||||||
|
echo " </tr>\n";
|
||||||
|
echo " </table>\n";
|
||||||
|
echo "</td>\n";
|
||||||
|
echo "</tr>\n";
|
||||||
|
echo "</table>";
|
||||||
|
echo "<br /><br />";
|
||||||
|
|
||||||
|
//include the footer
|
||||||
|
require_once "resources/footer.php";
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
@ -0,0 +1,91 @@
|
||||||
|
<?php
|
||||||
|
/*
|
||||||
|
FusionPBX
|
||||||
|
Version: MPL 1.1
|
||||||
|
|
||||||
|
The contents of this file are subject to the Mozilla Public License Version
|
||||||
|
1.1 (the "License"); you may not use this file except in compliance with
|
||||||
|
the License. You may obtain a copy of the License at
|
||||||
|
http://www.mozilla.org/MPL/
|
||||||
|
|
||||||
|
Software distributed under the License is distributed on an "AS IS" basis,
|
||||||
|
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||||
|
for the specific language governing rights and limitations under the
|
||||||
|
License.
|
||||||
|
|
||||||
|
The Original Code is FusionPBX
|
||||||
|
|
||||||
|
The Initial Developer of the Original Code is
|
||||||
|
Mark J Crane <markjcrane@fusionpbx.com>
|
||||||
|
Portions created by the Initial Developer are Copyright (C) 2008-2012
|
||||||
|
the Initial Developer. All Rights Reserved.
|
||||||
|
|
||||||
|
Contributor(s):
|
||||||
|
Mark J Crane <markjcrane@fusionpbx.com>
|
||||||
|
*/
|
||||||
|
|
||||||
|
// make sure the PATH_SEPARATOR is defined
|
||||||
|
umask(2);
|
||||||
|
if (!defined("PATH_SEPARATOR")) {
|
||||||
|
if (strpos($_ENV["OS"], "Win") !== false) {
|
||||||
|
define("PATH_SEPARATOR", ";");
|
||||||
|
} else {
|
||||||
|
define("PATH_SEPARATOR", ":");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!isset($output_format)) $output_format = (PHP_SAPI == 'cli') ? 'text' : 'html';
|
||||||
|
|
||||||
|
// make sure the document_root is set
|
||||||
|
$_SERVER["SCRIPT_FILENAME"] = str_replace("\\", '/', $_SERVER["SCRIPT_FILENAME"]);
|
||||||
|
if(PHP_SAPI == 'cli'){
|
||||||
|
chdir(pathinfo(realpath($_SERVER["PHP_SELF"]), PATHINFO_DIRNAME));
|
||||||
|
$script_full_path = str_replace("\\", '/', getcwd() . '/' . $_SERVER["SCRIPT_FILENAME"]);
|
||||||
|
$dirs = explode('/', pathinfo($script_full_path, PATHINFO_DIRNAME));
|
||||||
|
if (file_exists('/project_root.php')) {
|
||||||
|
$path = '/';
|
||||||
|
} else {
|
||||||
|
$i = 1;
|
||||||
|
$path = '';
|
||||||
|
while ($i < count($dirs)) {
|
||||||
|
$path .= '/' . $dirs[$i];
|
||||||
|
if (file_exists($path. '/project_root.php')) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
$i++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$_SERVER["DOCUMENT_ROOT"] = $path;
|
||||||
|
}else{
|
||||||
|
$_SERVER["DOCUMENT_ROOT"] = str_replace($_SERVER["PHP_SELF"], "", $_SERVER["SCRIPT_FILENAME"]);
|
||||||
|
}
|
||||||
|
$_SERVER["DOCUMENT_ROOT"] = realpath($_SERVER["DOCUMENT_ROOT"]);
|
||||||
|
|
||||||
|
// try to detect if a project path is being used
|
||||||
|
if (!defined('PROJECT_PATH')) {
|
||||||
|
if (is_dir($_SERVER["DOCUMENT_ROOT"]. '/fusionpbx')) {
|
||||||
|
define('PROJECT_PATH', '/fusionpbx');
|
||||||
|
} elseif (file_exists($_SERVER["DOCUMENT_ROOT"]. '/project_root.php')) {
|
||||||
|
define('PROJECT_PATH', '');
|
||||||
|
} else {
|
||||||
|
$dirs = explode('/', str_replace('\\', '/', pathinfo($_SERVER["PHP_SELF"], PATHINFO_DIRNAME)));
|
||||||
|
$i = 1;
|
||||||
|
$path = $_SERVER["DOCUMENT_ROOT"];
|
||||||
|
while ($i < count($dirs)) {
|
||||||
|
$path .= '/' . $dirs[$i];
|
||||||
|
if (file_exists($path. '/project_root.php')) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
$i++;
|
||||||
|
}
|
||||||
|
if(!file_exists($path. '/project_root.php')){
|
||||||
|
die("Failed to locate the Project Root by searching for project_root.php please contact support for assistance");
|
||||||
|
}
|
||||||
|
$project_path = str_replace($_SERVER["DOCUMENT_ROOT"], "", $path);
|
||||||
|
define('PROJECT_PATH', $project_path);
|
||||||
|
}
|
||||||
|
$_SERVER["PROJECT_ROOT"] = realpath($_SERVER["DOCUMENT_ROOT"] . PROJECT_PATH);
|
||||||
|
set_include_path(get_include_path() . PATH_SEPARATOR . $_SERVER["PROJECT_ROOT"]);
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
||||||
Loading…
Reference in New Issue