\r\n --> \n
Cause all the .php files containing lines ending with \r\n to instead end with \n.
DYI with:
find fusionpbx -type f -name '*.php' -exec dos2unix '{}' \;
This commit is contained in:
+421
-421
@@ -1,421 +1,421 @@
|
||||
<?php
|
||||
//application details
|
||||
$apps[$x]['name'] = "User Manager";
|
||||
$apps[$x]['uuid'] = "112124b3-95c2-5352-7e9d-d14c0b88f207";
|
||||
$apps[$x]['category'] = "Core";
|
||||
$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'] = "Add, edit, delete, and search for users.";
|
||||
$apps[$x]['description']['es-cl'] = "Agregar, Editar, Eliminar y Buscar Usuarios.";
|
||||
$apps[$x]['description']['de-de'] = "";
|
||||
$apps[$x]['description']['de-ch'] = "";
|
||||
$apps[$x]['description']['de-at'] = "";
|
||||
$apps[$x]['description']['fr-fr'] = "Ajouter, Editer, Supprimer et Chercher des Usagers";
|
||||
$apps[$x]['description']['fr-ca'] = "";
|
||||
$apps[$x]['description']['fr-ch'] = "";
|
||||
$apps[$x]['description']['pt-pt'] = "Adicionar, editar, apagar e pesquisa pelos utilizadores.";
|
||||
$apps[$x]['description']['pt-br'] = "";
|
||||
|
||||
//permission details
|
||||
$y = 0;
|
||||
$apps[$x]['permissions'][$y]['name'] = "user_view";
|
||||
$apps[$x]['permissions'][$y]['menu']['uuid'] = "0d57cc1e-1874-47b9-7ddd-fe1f57cec99b";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "admin";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = "user_add";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "admin";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = "user_edit";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "admin";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = "user_delete";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "admin";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = 'user_domain';
|
||||
$apps[$x]['permissions'][$y]['groups'][] = 'superadmin';
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = 'user_all';
|
||||
$apps[$x]['permissions'][$y]['groups'][] = 'superadmin';
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = "group_view";
|
||||
$apps[$x]['permissions'][$y]['menu']['uuid'] = "3b4acc6d-827b-f537-bf21-0093d94ffec7";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "admin";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = "group_add";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = "group_edit";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = "group_delete";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = 'group_domain';
|
||||
$apps[$x]['permissions'][$y]['groups'][] = 'superadmin';
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = 'group_all';
|
||||
$apps[$x]['permissions'][$y]['groups'][] = 'superadmin';
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = "group_member_view";
|
||||
$apps[$x]['permissions'][$y]['menu']['uuid'] = "3b4acc6d-827b-f537-bf21-0093d94ffec7";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "admin";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = "group_member_add";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "admin";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = "group_member_delete";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "admin";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = "group_permissions";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = "group_user_view";
|
||||
$apps[$x]['permissions'][$y]['menu']['uuid'] = "3b4acc6d-827b-f537-bf21-0093d94ffec7";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "admin";
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = "group_user_add";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "admin";
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = "group_user_edit";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "admin";
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = "group_user_delete";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "admin";
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = "group_permission_view";
|
||||
$apps[$x]['permissions'][$y]['menu']['uuid'] = "3b4acc6d-827b-f537-bf21-0093d94ffec7";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = "group_permission_add";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = "group_permission_edit";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = "group_permission_delete";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = "user_setting_view";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "admin";
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = "user_setting_add";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "admin";
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = "user_setting_edit";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "admin";
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = "user_setting_delete";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "admin";
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = "user_setting_category_edit";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
|
||||
//schema details
|
||||
$y = 0; //table array index
|
||||
$z = 0; //field array index
|
||||
$apps[$x]['db'][$y]['table'] = "v_users";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "user_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";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "id";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = "serial";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = "integer";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = "INT NOT NULL AUTO_INCREMENT";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['deprecated'] = "true";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "domain_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_domains";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['key']['reference']['field'] = "domain_uuid";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "v_id";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['deprecated'] = "true";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "username";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "password";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "salt";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "contact_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_contacts";
|
||||
//$apps[$x]['db'][$y]['fields'][$z]['key']['reference']['field'] = "contact_uuid";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name']['text'] = "user_email";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name']['deprecated'] = "useremail";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['deprecated'] = "true";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name']['text'] = "user_status";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name']['deprecated'] = "userstatus";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name']['text'] = "user_time_zone";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name']['deprecated'] = "usertimezone";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['deprecated'] = "true";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "api_key";
|
||||
$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]['description']['en-us'] = "";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "user_enabled";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "add_user";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "add_date";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
|
||||
$y = 1; //table array index
|
||||
$z = 0; //field array index
|
||||
$apps[$x]['db'][$y]['table'] = "v_groups";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "group_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";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "id";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = "serial";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = "integer";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = "INT NOT NULL AUTO_INCREMENT";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['deprecated'] = "true";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "domain_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_domains";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['key']['reference']['field'] = "domain_uuid";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "v_id";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['deprecated'] = "true";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name']['text'] = "group_name";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name']['deprecated'] = "groupid";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "group_protected";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name']['text'] = "group_description";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name']['deprecated'] = "groupdesc";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
|
||||
$y = 2; //table array index
|
||||
$z = 0; //field array index
|
||||
$apps[$x]['db'][$y]['table'] = "v_group_users";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "id";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = "serial";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = "integer";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = "INT NOT NULL AUTO_INCREMENT";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['deprecated'] = "true";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "group_user_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";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "domain_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_domains";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['key']['reference']['field'] = "domain_uuid";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "v_id";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['deprecated'] = "true";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name']['text'] = "group_name";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name']['deprecated'] = "groupid";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "group_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_groups";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['key']['reference']['field'] = "group_uuid";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "username";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['deprecated'] = "true";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "user_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]['description']['en-us'] = "";
|
||||
|
||||
$y = 3; //table array index
|
||||
$z = 0; //field array index
|
||||
$apps[$x]['db'][$y]['table'] = "v_group_permissions";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "group_permission_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";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name']['text'] = "id";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name']['deprecated'] = "group_permission_name";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = "serial";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = "integer";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = "INT NOT NULL AUTO_INCREMENT";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['deprecated'] = "true";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "domain_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_domains";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['key']['reference']['field'] = "domain_uuid";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "v_id";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['deprecated'] = "true";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name']['text'] = "permission_name";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name']['deprecated'] = "permission_id";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "group_name";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "group_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]['description']['en-us'] = "";
|
||||
|
||||
$y = 4; //table array index
|
||||
$z = 0; //field array index
|
||||
$apps[$x]['db'][$y]['table'] = "v_user_settings";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "user_setting_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'] = "user_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]['description']['en-us'] = "";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "domain_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_domains";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['key']['reference']['field'] = "domain_uuid";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "user_setting_category";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Enter the category.";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "user_setting_subcategory";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Enter the subcategory.";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "user_setting_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'] = "user_setting_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'] = "user_setting_order";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "numeric";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "user_setting_enabled";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "user_setting_description";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
?>
|
||||
<?php
|
||||
//application details
|
||||
$apps[$x]['name'] = "User Manager";
|
||||
$apps[$x]['uuid'] = "112124b3-95c2-5352-7e9d-d14c0b88f207";
|
||||
$apps[$x]['category'] = "Core";
|
||||
$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'] = "Add, edit, delete, and search for users.";
|
||||
$apps[$x]['description']['es-cl'] = "Agregar, Editar, Eliminar y Buscar Usuarios.";
|
||||
$apps[$x]['description']['de-de'] = "";
|
||||
$apps[$x]['description']['de-ch'] = "";
|
||||
$apps[$x]['description']['de-at'] = "";
|
||||
$apps[$x]['description']['fr-fr'] = "Ajouter, Editer, Supprimer et Chercher des Usagers";
|
||||
$apps[$x]['description']['fr-ca'] = "";
|
||||
$apps[$x]['description']['fr-ch'] = "";
|
||||
$apps[$x]['description']['pt-pt'] = "Adicionar, editar, apagar e pesquisa pelos utilizadores.";
|
||||
$apps[$x]['description']['pt-br'] = "";
|
||||
|
||||
//permission details
|
||||
$y = 0;
|
||||
$apps[$x]['permissions'][$y]['name'] = "user_view";
|
||||
$apps[$x]['permissions'][$y]['menu']['uuid'] = "0d57cc1e-1874-47b9-7ddd-fe1f57cec99b";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "admin";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = "user_add";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "admin";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = "user_edit";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "admin";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = "user_delete";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "admin";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = 'user_domain';
|
||||
$apps[$x]['permissions'][$y]['groups'][] = 'superadmin';
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = 'user_all';
|
||||
$apps[$x]['permissions'][$y]['groups'][] = 'superadmin';
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = "group_view";
|
||||
$apps[$x]['permissions'][$y]['menu']['uuid'] = "3b4acc6d-827b-f537-bf21-0093d94ffec7";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "admin";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = "group_add";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = "group_edit";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = "group_delete";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = 'group_domain';
|
||||
$apps[$x]['permissions'][$y]['groups'][] = 'superadmin';
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = 'group_all';
|
||||
$apps[$x]['permissions'][$y]['groups'][] = 'superadmin';
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = "group_member_view";
|
||||
$apps[$x]['permissions'][$y]['menu']['uuid'] = "3b4acc6d-827b-f537-bf21-0093d94ffec7";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "admin";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = "group_member_add";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "admin";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = "group_member_delete";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "admin";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = "group_permissions";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = "group_user_view";
|
||||
$apps[$x]['permissions'][$y]['menu']['uuid'] = "3b4acc6d-827b-f537-bf21-0093d94ffec7";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "admin";
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = "group_user_add";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "admin";
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = "group_user_edit";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "admin";
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = "group_user_delete";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "admin";
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = "group_permission_view";
|
||||
$apps[$x]['permissions'][$y]['menu']['uuid'] = "3b4acc6d-827b-f537-bf21-0093d94ffec7";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = "group_permission_add";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = "group_permission_edit";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = "group_permission_delete";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = "user_setting_view";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "admin";
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = "user_setting_add";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "admin";
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = "user_setting_edit";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "admin";
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = "user_setting_delete";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "admin";
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = "user_setting_category_edit";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
|
||||
//schema details
|
||||
$y = 0; //table array index
|
||||
$z = 0; //field array index
|
||||
$apps[$x]['db'][$y]['table'] = "v_users";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "user_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";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "id";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = "serial";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = "integer";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = "INT NOT NULL AUTO_INCREMENT";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['deprecated'] = "true";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "domain_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_domains";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['key']['reference']['field'] = "domain_uuid";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "v_id";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['deprecated'] = "true";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "username";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "password";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "salt";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "contact_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_contacts";
|
||||
//$apps[$x]['db'][$y]['fields'][$z]['key']['reference']['field'] = "contact_uuid";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name']['text'] = "user_email";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name']['deprecated'] = "useremail";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['deprecated'] = "true";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name']['text'] = "user_status";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name']['deprecated'] = "userstatus";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name']['text'] = "user_time_zone";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name']['deprecated'] = "usertimezone";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['deprecated'] = "true";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "api_key";
|
||||
$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]['description']['en-us'] = "";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "user_enabled";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "add_user";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "add_date";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
|
||||
$y = 1; //table array index
|
||||
$z = 0; //field array index
|
||||
$apps[$x]['db'][$y]['table'] = "v_groups";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "group_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";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "id";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = "serial";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = "integer";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = "INT NOT NULL AUTO_INCREMENT";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['deprecated'] = "true";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "domain_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_domains";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['key']['reference']['field'] = "domain_uuid";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "v_id";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['deprecated'] = "true";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name']['text'] = "group_name";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name']['deprecated'] = "groupid";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "group_protected";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name']['text'] = "group_description";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name']['deprecated'] = "groupdesc";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
|
||||
$y = 2; //table array index
|
||||
$z = 0; //field array index
|
||||
$apps[$x]['db'][$y]['table'] = "v_group_users";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "id";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = "serial";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = "integer";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = "INT NOT NULL AUTO_INCREMENT";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['deprecated'] = "true";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "group_user_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";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "domain_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_domains";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['key']['reference']['field'] = "domain_uuid";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "v_id";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['deprecated'] = "true";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name']['text'] = "group_name";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name']['deprecated'] = "groupid";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "group_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_groups";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['key']['reference']['field'] = "group_uuid";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "username";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['deprecated'] = "true";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "user_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]['description']['en-us'] = "";
|
||||
|
||||
$y = 3; //table array index
|
||||
$z = 0; //field array index
|
||||
$apps[$x]['db'][$y]['table'] = "v_group_permissions";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "group_permission_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";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name']['text'] = "id";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name']['deprecated'] = "group_permission_name";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = "serial";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = "integer";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = "INT NOT NULL AUTO_INCREMENT";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['deprecated'] = "true";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "domain_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_domains";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['key']['reference']['field'] = "domain_uuid";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "v_id";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['deprecated'] = "true";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name']['text'] = "permission_name";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name']['deprecated'] = "permission_id";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "group_name";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "group_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]['description']['en-us'] = "";
|
||||
|
||||
$y = 4; //table array index
|
||||
$z = 0; //field array index
|
||||
$apps[$x]['db'][$y]['table'] = "v_user_settings";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "user_setting_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'] = "user_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]['description']['en-us'] = "";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "domain_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_domains";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['key']['reference']['field'] = "domain_uuid";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "user_setting_category";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Enter the category.";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "user_setting_subcategory";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Enter the subcategory.";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "user_setting_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'] = "user_setting_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'] = "user_setting_order";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "numeric";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "user_setting_enabled";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "user_setting_description";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
?>
|
||||
|
||||
+1072
-1072
File diff suppressed because it is too large
Load Diff
+35
-35
@@ -1,36 +1,36 @@
|
||||
<?php
|
||||
|
||||
$apps[$x]['menu'][2]['title']['en-us'] = "Users";
|
||||
$apps[$x]['menu'][2]['title']['es-cl'] = "Gestor de Usuarios";
|
||||
$apps[$x]['menu'][2]['title']['fr-fr'] = "Gestion des utilisteurs";
|
||||
$apps[$x]['menu'][2]['title']['pt-pt'] = "Gestão de Utilizadores";
|
||||
$apps[$x]['menu'][2]['title']['pt-br'] = "Gerencir utiliários";
|
||||
$apps[$x]['menu'][2]['title']['pl'] = "Menedżer użytkowników";
|
||||
$apps[$x]['menu'][2]['title']['uk'] = "Користувачі";
|
||||
$apps[$x]['menu'][2]['title']['sv-se'] = "Användar Inställningar";
|
||||
$apps[$x]['menu'][2]['title']['de-at'] = "Benutzerverwaltung";
|
||||
$apps[$x]['menu'][2]['title']['he'] = "מנהל משתמש";
|
||||
$apps[$x]['menu'][2]['uuid'] = "0d57cc1e-1874-47b9-7ddd-fe1f57cec99b";
|
||||
$apps[$x]['menu'][2]['parent_uuid'] = "bc96d773-ee57-0cdd-c3ac-2d91aba61b55";
|
||||
$apps[$x]['menu'][2]['category'] = "internal";
|
||||
$apps[$x]['menu'][2]['path'] = "/core/users/index.php";
|
||||
$apps[$x]['menu'][2]['groups'][] = "admin";
|
||||
$apps[$x]['menu'][2]['groups'][] = "superadmin";
|
||||
|
||||
$apps[$x]['menu'][3]['title']['en-us'] = "Group Manager";
|
||||
$apps[$x]['menu'][3]['title']['es-cl'] = "Administración de Grupos";
|
||||
$apps[$x]['menu'][3]['title']['fr-fr'] = "Gestion des groupes";
|
||||
$apps[$x]['menu'][3]['title']['pt-pt'] = "'Gestão de Grupos";
|
||||
$apps[$x]['menu'][3]['title']['pt-br'] = "Gerenciar grupos";
|
||||
$apps[$x]['menu'][3]['title']['pl'] = "Menedżer grup";
|
||||
$apps[$x]['menu'][3]['title']['uk'] = "Групи";
|
||||
$apps[$x]['menu'][3]['title']['sv-se'] = "Grupp Inställningar";
|
||||
$apps[$x]['menu'][3]['title']['de-at'] = "Gruppenverwaltung";
|
||||
$apps[$x]['menu'][3]['title']['he'] = "מנהל קבוצה";
|
||||
$apps[$x]['menu'][3]['uuid'] = "3b4acc6d-827b-f537-bf21-0093d94ffec7";
|
||||
$apps[$x]['menu'][3]['parent_uuid'] = "594d99c5-6128-9c88-ca35-4b33392cec0f";
|
||||
$apps[$x]['menu'][3]['category'] = "internal";
|
||||
$apps[$x]['menu'][3]['path'] = "/core/users/groups.php";
|
||||
$apps[$x]['menu'][3]['groups'][] = "superadmin";
|
||||
|
||||
<?php
|
||||
|
||||
$apps[$x]['menu'][2]['title']['en-us'] = "Users";
|
||||
$apps[$x]['menu'][2]['title']['es-cl'] = "Gestor de Usuarios";
|
||||
$apps[$x]['menu'][2]['title']['fr-fr'] = "Gestion des utilisteurs";
|
||||
$apps[$x]['menu'][2]['title']['pt-pt'] = "Gestão de Utilizadores";
|
||||
$apps[$x]['menu'][2]['title']['pt-br'] = "Gerencir utiliários";
|
||||
$apps[$x]['menu'][2]['title']['pl'] = "Menedżer użytkowników";
|
||||
$apps[$x]['menu'][2]['title']['uk'] = "Користувачі";
|
||||
$apps[$x]['menu'][2]['title']['sv-se'] = "Användar Inställningar";
|
||||
$apps[$x]['menu'][2]['title']['de-at'] = "Benutzerverwaltung";
|
||||
$apps[$x]['menu'][2]['title']['he'] = "מנהל משתמש";
|
||||
$apps[$x]['menu'][2]['uuid'] = "0d57cc1e-1874-47b9-7ddd-fe1f57cec99b";
|
||||
$apps[$x]['menu'][2]['parent_uuid'] = "bc96d773-ee57-0cdd-c3ac-2d91aba61b55";
|
||||
$apps[$x]['menu'][2]['category'] = "internal";
|
||||
$apps[$x]['menu'][2]['path'] = "/core/users/index.php";
|
||||
$apps[$x]['menu'][2]['groups'][] = "admin";
|
||||
$apps[$x]['menu'][2]['groups'][] = "superadmin";
|
||||
|
||||
$apps[$x]['menu'][3]['title']['en-us'] = "Group Manager";
|
||||
$apps[$x]['menu'][3]['title']['es-cl'] = "Administración de Grupos";
|
||||
$apps[$x]['menu'][3]['title']['fr-fr'] = "Gestion des groupes";
|
||||
$apps[$x]['menu'][3]['title']['pt-pt'] = "'Gestão de Grupos";
|
||||
$apps[$x]['menu'][3]['title']['pt-br'] = "Gerenciar grupos";
|
||||
$apps[$x]['menu'][3]['title']['pl'] = "Menedżer grup";
|
||||
$apps[$x]['menu'][3]['title']['uk'] = "Групи";
|
||||
$apps[$x]['menu'][3]['title']['sv-se'] = "Grupp Inställningar";
|
||||
$apps[$x]['menu'][3]['title']['de-at'] = "Gruppenverwaltung";
|
||||
$apps[$x]['menu'][3]['title']['he'] = "מנהל קבוצה";
|
||||
$apps[$x]['menu'][3]['uuid'] = "3b4acc6d-827b-f537-bf21-0093d94ffec7";
|
||||
$apps[$x]['menu'][3]['parent_uuid'] = "594d99c5-6128-9c88-ca35-4b33392cec0f";
|
||||
$apps[$x]['menu'][3]['category'] = "internal";
|
||||
$apps[$x]['menu'][3]['path'] = "/core/users/groups.php";
|
||||
$apps[$x]['menu'][3]['groups'][] = "superadmin";
|
||||
|
||||
?>
|
||||
+311
-311
@@ -1,312 +1,312 @@
|
||||
<?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-2014
|
||||
the Initial Developer. All Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
*/
|
||||
include "root.php";
|
||||
require_once "resources/require.php";
|
||||
|
||||
//check permissions
|
||||
require_once "resources/check_auth.php";
|
||||
if (permission_exists('group_edit')) {
|
||||
//access allowed
|
||||
}
|
||||
else {
|
||||
echo "access denied";
|
||||
return;
|
||||
}
|
||||
|
||||
//add multi-lingual support
|
||||
$language = new text;
|
||||
$text = $language->get();
|
||||
|
||||
//process update
|
||||
if (count($_POST) > 0) {
|
||||
//set the variables
|
||||
$group_uuid = check_str($_POST['group_uuid']);
|
||||
$group_name = check_str($_POST['group_name']);
|
||||
$group_name_previous = check_str($_POST['group_name_previous']);
|
||||
$domain_uuid = check_str($_POST["domain_uuid"]);
|
||||
$domain_uuid_previous = check_str($_POST["domain_uuid_previous"]);
|
||||
$group_description = check_str($_POST["group_description"]);
|
||||
|
||||
//check for global/domain duplicates
|
||||
$sql = "select count(*) as num_rows from v_groups where ";
|
||||
$sql .= "group_name = '".$group_name."' ";
|
||||
$sql .= "and group_uuid <> '".$group_uuid."' ";
|
||||
$sql .= "and domain_uuid ".(($domain_uuid != '') ? " = '".$domain_uuid."' " : " is null ");
|
||||
$prep_statement = $db->prepare($sql);
|
||||
if ($prep_statement) {
|
||||
$prep_statement->execute();
|
||||
$row = $prep_statement->fetch(PDO::FETCH_ASSOC);
|
||||
$group_exists = ($row['num_rows'] > 0) ? true : false;
|
||||
}
|
||||
else {
|
||||
$group_exists = false;
|
||||
}
|
||||
unset($sql, $prep_statement, $row);
|
||||
|
||||
//update group
|
||||
if (!$group_exists) {
|
||||
$sql = "update v_groups ";
|
||||
$sql .= "set ";
|
||||
$sql .= "group_name = '".$group_name."', ";
|
||||
$sql .= "domain_uuid = ".(($domain_uuid != '') ? "'".$domain_uuid."'" : "null").", ";
|
||||
$sql .= "group_description = '".$group_description."' ";
|
||||
$sql .= "where group_uuid = '".$group_uuid."' ";
|
||||
if (!$db->exec(check_sql($sql))) {
|
||||
$error = $db->errorInfo();
|
||||
echo "<pre>".print_r($error, true)."</pre>";
|
||||
exit;
|
||||
}
|
||||
|
||||
//group changed from global to domain-specific
|
||||
if ($domain_uuid_previous == '' && $domain_uuid != '') {
|
||||
//remove any users assigned to the group from the old domain
|
||||
$sql = "delete from v_group_users where group_uuid = '".$group_uuid."' and domain_uuid <> '".$domain_uuid."' ";
|
||||
if (!$db->exec(check_sql($sql))) {
|
||||
$error = $db->errorInfo();
|
||||
//echo "<pre>".print_r($error, true)."</pre>"; exit;
|
||||
}
|
||||
//update permissions to use new domain uuid
|
||||
$sql = "update v_group_permissions set domain_uuid = '".$domain_uuid."' where group_name = '".$group_name_previous."' and domain_uuid is null ";
|
||||
if (!$db->exec(check_sql($sql))) {
|
||||
$error = $db->errorInfo();
|
||||
//echo "<pre>".print_r($error, true)."</pre>"; exit;
|
||||
}
|
||||
//change group name
|
||||
if ($group_name != $group_name_previous && $group_name != '') {
|
||||
//change group name in group users
|
||||
$sql = "update v_group_users set group_name = '".$group_name."' where group_uuid = '".$group_uuid."' and group_name = '".$group_name_previous."' ";
|
||||
if (!$db->exec(check_sql($sql))) {
|
||||
$error = $db->errorInfo();
|
||||
//echo "<pre>".print_r($error, true)."</pre>"; exit;
|
||||
}
|
||||
//change group name in permissions
|
||||
$sql = "update v_group_permissions set group_name = '".$group_name."' where domain_uuid = '".$domain_uuid."' and group_name = '".$group_name_previous."' ";
|
||||
if (!$db->exec(check_sql($sql))) {
|
||||
$error = $db->errorInfo();
|
||||
//echo "<pre>".print_r($error, true)."</pre>"; exit;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//group changed from one domain to another
|
||||
else if ($domain_uuid_previous != '' && $domain_uuid != '' && $domain_uuid_previous != $domain_uuid) {
|
||||
//remove any users assigned to the group from the old domain
|
||||
$sql = "delete from v_group_users where group_uuid = '".$group_uuid."' and domain_uuid = '".$domain_uuid_previous."' ";
|
||||
if (!$db->exec(check_sql($sql))) {
|
||||
$error = $db->errorInfo();
|
||||
//echo "<pre>".print_r($error, true)."</pre>"; exit;
|
||||
}
|
||||
//update permissions to use new domain uuid
|
||||
$sql = "update v_group_permissions set domain_uuid = '".$domain_uuid."' where group_name = '".$group_name_previous."' and domain_uuid = '".$domain_uuid_previous."' ";
|
||||
if (!$db->exec(check_sql($sql))) {
|
||||
$error = $db->errorInfo();
|
||||
//echo "<pre>".print_r($error, true)."</pre>"; exit;
|
||||
}
|
||||
//change group name
|
||||
if ($group_name != $group_name_previous && $group_name != '') {
|
||||
//change group name in group users
|
||||
$sql = "update v_group_users set group_name = '".$group_name."' where group_uuid = '".$group_uuid."' and group_name = '".$group_name_previous."' ";
|
||||
if (!$db->exec(check_sql($sql))) {
|
||||
$error = $db->errorInfo();
|
||||
//echo "<pre>".print_r($error, true)."</pre>"; exit;
|
||||
}
|
||||
//change group name in permissions
|
||||
$sql = "update v_group_permissions set group_name = '".$group_name."' where domain_uuid = '".$domain_uuid."' and group_name = '".$group_name_previous."' ";
|
||||
if (!$db->exec(check_sql($sql))) {
|
||||
$error = $db->errorInfo();
|
||||
//echo "<pre>".print_r($error, true)."</pre>"; exit;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//group changed from domain-specific to global
|
||||
else if ($domain_uuid_previous != '' && $domain_uuid == '') {
|
||||
//change group name
|
||||
if ($group_name != $group_name_previous && $group_name != '') {
|
||||
//change group name in group users
|
||||
$sql = "update v_group_users set group_name = '".$group_name."' where group_uuid = '".$group_uuid."' and group_name = '".$group_name_previous."' ";
|
||||
if (!$db->exec(check_sql($sql))) {
|
||||
$error = $db->errorInfo();
|
||||
//echo "<pre>".print_r($error, true)."</pre>"; exit;
|
||||
}
|
||||
//change group name in permissions
|
||||
$sql = "update v_group_permissions set group_name = '".$group_name."' where domain_uuid = '".$domain_uuid_previous."' and group_name = '".$group_name_previous."' ";
|
||||
if (!$db->exec(check_sql($sql))) {
|
||||
$error = $db->errorInfo();
|
||||
//echo "<pre>".print_r($error, true)."</pre>"; exit;
|
||||
}
|
||||
}
|
||||
//update permissions to not use a domain uuid
|
||||
$sql = "update v_group_permissions set domain_uuid = null where group_name = '".$group_name."' and domain_uuid = '".$domain_uuid_previous."' ";
|
||||
if (!$db->exec(check_sql($sql))) {
|
||||
$error = $db->errorInfo();
|
||||
//echo "<pre>".print_r($error, true)."</pre>"; exit;
|
||||
}
|
||||
}
|
||||
|
||||
//domain didn't change, but name may still
|
||||
else {
|
||||
//change group name
|
||||
if ($group_name != $group_name_previous && $group_name != '') {
|
||||
//change group name in group users
|
||||
$sql = "update v_group_users set group_name = '".$group_name."' where group_uuid = '".$group_uuid."' and group_name = '".$group_name_previous."' ";
|
||||
if (!$db->exec(check_sql($sql))) {
|
||||
$error = $db->errorInfo();
|
||||
//echo "<pre>".print_r($error, true)."</pre>"; exit;
|
||||
}
|
||||
//change group name in permissions
|
||||
$sql = "update v_group_permissions set group_name = '".$group_name."' where domain_uuid ".(($domain_uuid != '') ? " = '".$domain_uuid."' " : " is null ")." and group_name = '".$group_name_previous."' ";
|
||||
if (!$db->exec(check_sql($sql))) {
|
||||
$error = $db->errorInfo();
|
||||
//echo "<pre>".print_r($error, true)."</pre>"; exit;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$_SESSION["message"] = $text['message-update'];
|
||||
header("Location: groups.php");
|
||||
}
|
||||
else {
|
||||
$_SESSION['message_mood'] = 'negative';
|
||||
$_SESSION["message"] = $text['message-group_exists'];
|
||||
header("Location: groupedit.php?id=".$group_uuid);
|
||||
}
|
||||
|
||||
//redirect the user
|
||||
return;
|
||||
}
|
||||
|
||||
//pre-populate the form
|
||||
$group_uuid = check_str($_REQUEST['id']);
|
||||
if ($group_uuid != '') {
|
||||
$sql = "select * from v_groups where ";
|
||||
$sql .= "group_uuid = '".$group_uuid."' ";
|
||||
$prep_statement = $db->prepare($sql);
|
||||
if ($prep_statement) {
|
||||
$prep_statement->execute();
|
||||
$row = $prep_statement->fetch(PDO::FETCH_ASSOC);
|
||||
$group_name = $row['group_name'];
|
||||
$domain_uuid = $row['domain_uuid'];
|
||||
$group_description = $row['group_description'];
|
||||
}
|
||||
}
|
||||
|
||||
//include the header
|
||||
include "resources/header.php";
|
||||
$document['title'] = $text['title-group_edit'];
|
||||
|
||||
//copy group javascript
|
||||
echo "<script language='javascript' type='text/javascript'>\n";
|
||||
echo " function copy_group() {\n";
|
||||
echo " var new_group_name;\n";
|
||||
echo " var new_group_desc;\n";
|
||||
echo " new_group_name = prompt('".$text['message-new_group_name']."');\n";
|
||||
echo " if (new_group_name != null) {\n";
|
||||
echo " new_group_desc = prompt('".$text['message-new_group_description']."');\n";
|
||||
echo " if (new_group_desc != null) {\n";
|
||||
echo " window.location = 'permissions_copy.php?group_name=".$group_name."&new_group_name=' + new_group_name + '&new_group_desc=' + new_group_desc;\n";
|
||||
echo " }\n";
|
||||
echo " }\n";
|
||||
echo " }\n";
|
||||
echo "</script>\n";
|
||||
|
||||
//show the content
|
||||
echo "<form name='login' method='post' action=''>\n";
|
||||
echo "<input type='hidden' name='group_uuid' value='".$group_uuid."'>\n";
|
||||
|
||||
echo "<table width='100%' cellpadding='0' cellspacing='0'>\n";
|
||||
echo " <tr>\n";
|
||||
echo " <td align='left' valign='top'>\n";
|
||||
echo " <b>".$text['header-group_edit']."</b>\n";
|
||||
echo " <br><br>\n";
|
||||
echo " ".$text['description-group_edit']."\n";
|
||||
echo " </td>\n";
|
||||
echo " <td align='right' valign='top'>\n";
|
||||
echo " <input type='button' class='btn' name='' alt='back' onclick=\"window.location='groups.php'\" value='".$text['button-back']."'> ";
|
||||
echo " <input type='button' class='btn' alt='".$text['button-copy']."' onclick='copy_group();' value='".$text['button-copy']."'>";
|
||||
echo " <input type='submit' class='btn' value=\"".$text['button-save']."\">\n";
|
||||
echo " </td>\n";
|
||||
echo " </tr>\n";
|
||||
echo "</table>\n";
|
||||
echo "<br>";
|
||||
|
||||
echo "<table width='100%' cellpadding='0' cellspacing='0'>\n";
|
||||
echo "<tr>\n";
|
||||
echo "<td width='30%' class='vncellreq' valign='top'>\n";
|
||||
echo $text['label-group_name']."\n";
|
||||
echo "</td>\n";
|
||||
echo "<td width='70%' align='left' class='vtable'>\n";
|
||||
echo " <input type='hidden' name='group_name_previous' value=\"".$group_name."\">\n";
|
||||
echo " <input type='text' class='formfld' name='group_name' value=\"".$group_name."\">\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
if (permission_exists('group_domain')) {
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncell' valign='top'>\n";
|
||||
echo " ".$text['label-domain']."\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <input type='hidden' name='domain_uuid_previous' value='".$domain_uuid."'>\n";
|
||||
echo " <select class='formfld' name='domain_uuid'>\n";
|
||||
echo " <option value='' ".((strlen($domain_uuid) == 0) ? "selected='selected'" : null).">".$text['option-global']."</option>\n";
|
||||
foreach ($_SESSION['domains'] as $row) {
|
||||
echo "<option value='".$row['domain_uuid']."' ".(($row['domain_uuid'] == $domain_uuid) ? "selected='selected'" : null).">".$row['domain_name']."</option>\n";
|
||||
}
|
||||
echo " </select>\n";
|
||||
echo " <br />\n";
|
||||
echo $text['description-domain_name']."\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
}
|
||||
else {
|
||||
echo "<input type='hidden' name='domain_uuid' value='".$domain_uuid."'>";
|
||||
}
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncell' valign='top'>\n";
|
||||
echo $text['label-group_description']."\n";
|
||||
echo "</td>\n";
|
||||
echo "<td align='left' class='vtable' valign='top'>\n";
|
||||
echo " <textarea name='group_description' class='formfld' style='width: 250px; height: 50px;'>".$group_description."</textarea>\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td colspan='2' align='right'>\n";
|
||||
echo " <br />";
|
||||
echo " <input type='submit' class='btn' value=\"".$text['button-save']."\">\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
echo "</table>\n";
|
||||
echo "<br><br>";
|
||||
echo "</form>";
|
||||
|
||||
//include the footer
|
||||
include "resources/footer.php";
|
||||
|
||||
<?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-2014
|
||||
the Initial Developer. All Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
*/
|
||||
include "root.php";
|
||||
require_once "resources/require.php";
|
||||
|
||||
//check permissions
|
||||
require_once "resources/check_auth.php";
|
||||
if (permission_exists('group_edit')) {
|
||||
//access allowed
|
||||
}
|
||||
else {
|
||||
echo "access denied";
|
||||
return;
|
||||
}
|
||||
|
||||
//add multi-lingual support
|
||||
$language = new text;
|
||||
$text = $language->get();
|
||||
|
||||
//process update
|
||||
if (count($_POST) > 0) {
|
||||
//set the variables
|
||||
$group_uuid = check_str($_POST['group_uuid']);
|
||||
$group_name = check_str($_POST['group_name']);
|
||||
$group_name_previous = check_str($_POST['group_name_previous']);
|
||||
$domain_uuid = check_str($_POST["domain_uuid"]);
|
||||
$domain_uuid_previous = check_str($_POST["domain_uuid_previous"]);
|
||||
$group_description = check_str($_POST["group_description"]);
|
||||
|
||||
//check for global/domain duplicates
|
||||
$sql = "select count(*) as num_rows from v_groups where ";
|
||||
$sql .= "group_name = '".$group_name."' ";
|
||||
$sql .= "and group_uuid <> '".$group_uuid."' ";
|
||||
$sql .= "and domain_uuid ".(($domain_uuid != '') ? " = '".$domain_uuid."' " : " is null ");
|
||||
$prep_statement = $db->prepare($sql);
|
||||
if ($prep_statement) {
|
||||
$prep_statement->execute();
|
||||
$row = $prep_statement->fetch(PDO::FETCH_ASSOC);
|
||||
$group_exists = ($row['num_rows'] > 0) ? true : false;
|
||||
}
|
||||
else {
|
||||
$group_exists = false;
|
||||
}
|
||||
unset($sql, $prep_statement, $row);
|
||||
|
||||
//update group
|
||||
if (!$group_exists) {
|
||||
$sql = "update v_groups ";
|
||||
$sql .= "set ";
|
||||
$sql .= "group_name = '".$group_name."', ";
|
||||
$sql .= "domain_uuid = ".(($domain_uuid != '') ? "'".$domain_uuid."'" : "null").", ";
|
||||
$sql .= "group_description = '".$group_description."' ";
|
||||
$sql .= "where group_uuid = '".$group_uuid."' ";
|
||||
if (!$db->exec(check_sql($sql))) {
|
||||
$error = $db->errorInfo();
|
||||
echo "<pre>".print_r($error, true)."</pre>";
|
||||
exit;
|
||||
}
|
||||
|
||||
//group changed from global to domain-specific
|
||||
if ($domain_uuid_previous == '' && $domain_uuid != '') {
|
||||
//remove any users assigned to the group from the old domain
|
||||
$sql = "delete from v_group_users where group_uuid = '".$group_uuid."' and domain_uuid <> '".$domain_uuid."' ";
|
||||
if (!$db->exec(check_sql($sql))) {
|
||||
$error = $db->errorInfo();
|
||||
//echo "<pre>".print_r($error, true)."</pre>"; exit;
|
||||
}
|
||||
//update permissions to use new domain uuid
|
||||
$sql = "update v_group_permissions set domain_uuid = '".$domain_uuid."' where group_name = '".$group_name_previous."' and domain_uuid is null ";
|
||||
if (!$db->exec(check_sql($sql))) {
|
||||
$error = $db->errorInfo();
|
||||
//echo "<pre>".print_r($error, true)."</pre>"; exit;
|
||||
}
|
||||
//change group name
|
||||
if ($group_name != $group_name_previous && $group_name != '') {
|
||||
//change group name in group users
|
||||
$sql = "update v_group_users set group_name = '".$group_name."' where group_uuid = '".$group_uuid."' and group_name = '".$group_name_previous."' ";
|
||||
if (!$db->exec(check_sql($sql))) {
|
||||
$error = $db->errorInfo();
|
||||
//echo "<pre>".print_r($error, true)."</pre>"; exit;
|
||||
}
|
||||
//change group name in permissions
|
||||
$sql = "update v_group_permissions set group_name = '".$group_name."' where domain_uuid = '".$domain_uuid."' and group_name = '".$group_name_previous."' ";
|
||||
if (!$db->exec(check_sql($sql))) {
|
||||
$error = $db->errorInfo();
|
||||
//echo "<pre>".print_r($error, true)."</pre>"; exit;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//group changed from one domain to another
|
||||
else if ($domain_uuid_previous != '' && $domain_uuid != '' && $domain_uuid_previous != $domain_uuid) {
|
||||
//remove any users assigned to the group from the old domain
|
||||
$sql = "delete from v_group_users where group_uuid = '".$group_uuid."' and domain_uuid = '".$domain_uuid_previous."' ";
|
||||
if (!$db->exec(check_sql($sql))) {
|
||||
$error = $db->errorInfo();
|
||||
//echo "<pre>".print_r($error, true)."</pre>"; exit;
|
||||
}
|
||||
//update permissions to use new domain uuid
|
||||
$sql = "update v_group_permissions set domain_uuid = '".$domain_uuid."' where group_name = '".$group_name_previous."' and domain_uuid = '".$domain_uuid_previous."' ";
|
||||
if (!$db->exec(check_sql($sql))) {
|
||||
$error = $db->errorInfo();
|
||||
//echo "<pre>".print_r($error, true)."</pre>"; exit;
|
||||
}
|
||||
//change group name
|
||||
if ($group_name != $group_name_previous && $group_name != '') {
|
||||
//change group name in group users
|
||||
$sql = "update v_group_users set group_name = '".$group_name."' where group_uuid = '".$group_uuid."' and group_name = '".$group_name_previous."' ";
|
||||
if (!$db->exec(check_sql($sql))) {
|
||||
$error = $db->errorInfo();
|
||||
//echo "<pre>".print_r($error, true)."</pre>"; exit;
|
||||
}
|
||||
//change group name in permissions
|
||||
$sql = "update v_group_permissions set group_name = '".$group_name."' where domain_uuid = '".$domain_uuid."' and group_name = '".$group_name_previous."' ";
|
||||
if (!$db->exec(check_sql($sql))) {
|
||||
$error = $db->errorInfo();
|
||||
//echo "<pre>".print_r($error, true)."</pre>"; exit;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//group changed from domain-specific to global
|
||||
else if ($domain_uuid_previous != '' && $domain_uuid == '') {
|
||||
//change group name
|
||||
if ($group_name != $group_name_previous && $group_name != '') {
|
||||
//change group name in group users
|
||||
$sql = "update v_group_users set group_name = '".$group_name."' where group_uuid = '".$group_uuid."' and group_name = '".$group_name_previous."' ";
|
||||
if (!$db->exec(check_sql($sql))) {
|
||||
$error = $db->errorInfo();
|
||||
//echo "<pre>".print_r($error, true)."</pre>"; exit;
|
||||
}
|
||||
//change group name in permissions
|
||||
$sql = "update v_group_permissions set group_name = '".$group_name."' where domain_uuid = '".$domain_uuid_previous."' and group_name = '".$group_name_previous."' ";
|
||||
if (!$db->exec(check_sql($sql))) {
|
||||
$error = $db->errorInfo();
|
||||
//echo "<pre>".print_r($error, true)."</pre>"; exit;
|
||||
}
|
||||
}
|
||||
//update permissions to not use a domain uuid
|
||||
$sql = "update v_group_permissions set domain_uuid = null where group_name = '".$group_name."' and domain_uuid = '".$domain_uuid_previous."' ";
|
||||
if (!$db->exec(check_sql($sql))) {
|
||||
$error = $db->errorInfo();
|
||||
//echo "<pre>".print_r($error, true)."</pre>"; exit;
|
||||
}
|
||||
}
|
||||
|
||||
//domain didn't change, but name may still
|
||||
else {
|
||||
//change group name
|
||||
if ($group_name != $group_name_previous && $group_name != '') {
|
||||
//change group name in group users
|
||||
$sql = "update v_group_users set group_name = '".$group_name."' where group_uuid = '".$group_uuid."' and group_name = '".$group_name_previous."' ";
|
||||
if (!$db->exec(check_sql($sql))) {
|
||||
$error = $db->errorInfo();
|
||||
//echo "<pre>".print_r($error, true)."</pre>"; exit;
|
||||
}
|
||||
//change group name in permissions
|
||||
$sql = "update v_group_permissions set group_name = '".$group_name."' where domain_uuid ".(($domain_uuid != '') ? " = '".$domain_uuid."' " : " is null ")." and group_name = '".$group_name_previous."' ";
|
||||
if (!$db->exec(check_sql($sql))) {
|
||||
$error = $db->errorInfo();
|
||||
//echo "<pre>".print_r($error, true)."</pre>"; exit;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$_SESSION["message"] = $text['message-update'];
|
||||
header("Location: groups.php");
|
||||
}
|
||||
else {
|
||||
$_SESSION['message_mood'] = 'negative';
|
||||
$_SESSION["message"] = $text['message-group_exists'];
|
||||
header("Location: groupedit.php?id=".$group_uuid);
|
||||
}
|
||||
|
||||
//redirect the user
|
||||
return;
|
||||
}
|
||||
|
||||
//pre-populate the form
|
||||
$group_uuid = check_str($_REQUEST['id']);
|
||||
if ($group_uuid != '') {
|
||||
$sql = "select * from v_groups where ";
|
||||
$sql .= "group_uuid = '".$group_uuid."' ";
|
||||
$prep_statement = $db->prepare($sql);
|
||||
if ($prep_statement) {
|
||||
$prep_statement->execute();
|
||||
$row = $prep_statement->fetch(PDO::FETCH_ASSOC);
|
||||
$group_name = $row['group_name'];
|
||||
$domain_uuid = $row['domain_uuid'];
|
||||
$group_description = $row['group_description'];
|
||||
}
|
||||
}
|
||||
|
||||
//include the header
|
||||
include "resources/header.php";
|
||||
$document['title'] = $text['title-group_edit'];
|
||||
|
||||
//copy group javascript
|
||||
echo "<script language='javascript' type='text/javascript'>\n";
|
||||
echo " function copy_group() {\n";
|
||||
echo " var new_group_name;\n";
|
||||
echo " var new_group_desc;\n";
|
||||
echo " new_group_name = prompt('".$text['message-new_group_name']."');\n";
|
||||
echo " if (new_group_name != null) {\n";
|
||||
echo " new_group_desc = prompt('".$text['message-new_group_description']."');\n";
|
||||
echo " if (new_group_desc != null) {\n";
|
||||
echo " window.location = 'permissions_copy.php?group_name=".$group_name."&new_group_name=' + new_group_name + '&new_group_desc=' + new_group_desc;\n";
|
||||
echo " }\n";
|
||||
echo " }\n";
|
||||
echo " }\n";
|
||||
echo "</script>\n";
|
||||
|
||||
//show the content
|
||||
echo "<form name='login' method='post' action=''>\n";
|
||||
echo "<input type='hidden' name='group_uuid' value='".$group_uuid."'>\n";
|
||||
|
||||
echo "<table width='100%' cellpadding='0' cellspacing='0'>\n";
|
||||
echo " <tr>\n";
|
||||
echo " <td align='left' valign='top'>\n";
|
||||
echo " <b>".$text['header-group_edit']."</b>\n";
|
||||
echo " <br><br>\n";
|
||||
echo " ".$text['description-group_edit']."\n";
|
||||
echo " </td>\n";
|
||||
echo " <td align='right' valign='top'>\n";
|
||||
echo " <input type='button' class='btn' name='' alt='back' onclick=\"window.location='groups.php'\" value='".$text['button-back']."'> ";
|
||||
echo " <input type='button' class='btn' alt='".$text['button-copy']."' onclick='copy_group();' value='".$text['button-copy']."'>";
|
||||
echo " <input type='submit' class='btn' value=\"".$text['button-save']."\">\n";
|
||||
echo " </td>\n";
|
||||
echo " </tr>\n";
|
||||
echo "</table>\n";
|
||||
echo "<br>";
|
||||
|
||||
echo "<table width='100%' cellpadding='0' cellspacing='0'>\n";
|
||||
echo "<tr>\n";
|
||||
echo "<td width='30%' class='vncellreq' valign='top'>\n";
|
||||
echo $text['label-group_name']."\n";
|
||||
echo "</td>\n";
|
||||
echo "<td width='70%' align='left' class='vtable'>\n";
|
||||
echo " <input type='hidden' name='group_name_previous' value=\"".$group_name."\">\n";
|
||||
echo " <input type='text' class='formfld' name='group_name' value=\"".$group_name."\">\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
if (permission_exists('group_domain')) {
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncell' valign='top'>\n";
|
||||
echo " ".$text['label-domain']."\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <input type='hidden' name='domain_uuid_previous' value='".$domain_uuid."'>\n";
|
||||
echo " <select class='formfld' name='domain_uuid'>\n";
|
||||
echo " <option value='' ".((strlen($domain_uuid) == 0) ? "selected='selected'" : null).">".$text['option-global']."</option>\n";
|
||||
foreach ($_SESSION['domains'] as $row) {
|
||||
echo "<option value='".$row['domain_uuid']."' ".(($row['domain_uuid'] == $domain_uuid) ? "selected='selected'" : null).">".$row['domain_name']."</option>\n";
|
||||
}
|
||||
echo " </select>\n";
|
||||
echo " <br />\n";
|
||||
echo $text['description-domain_name']."\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
}
|
||||
else {
|
||||
echo "<input type='hidden' name='domain_uuid' value='".$domain_uuid."'>";
|
||||
}
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncell' valign='top'>\n";
|
||||
echo $text['label-group_description']."\n";
|
||||
echo "</td>\n";
|
||||
echo "<td align='left' class='vtable' valign='top'>\n";
|
||||
echo " <textarea name='group_description' class='formfld' style='width: 250px; height: 50px;'>".$group_description."</textarea>\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td colspan='2' align='right'>\n";
|
||||
echo " <br />";
|
||||
echo " <input type='submit' class='btn' value=\"".$text['button-save']."\">\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
echo "</table>\n";
|
||||
echo "<br><br>";
|
||||
echo "</form>";
|
||||
|
||||
//include the footer
|
||||
include "resources/footer.php";
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user