HOR-1091: CLONE - Clean The Code - rbac/engine/*
@@ -1,172 +0,0 @@
|
|||||||
<?xml version="1.0"?>
|
|
||||||
<dynaForm name="labels.xml" basedir="">xml destinado para los lenguages de los labels
|
|
||||||
<ID_AUTHOR>
|
|
||||||
<es>Autor</es>
|
|
||||||
<en>Author</en>
|
|
||||||
<po>Autor</po>
|
|
||||||
</ID_AUTHOR>
|
|
||||||
<ID_RPT_TYPE>
|
|
||||||
<es>Tipo</es>
|
|
||||||
<en>Type</en>
|
|
||||||
<po>Type</po>
|
|
||||||
</ID_RPT_TYPE>
|
|
||||||
<ID_UID>
|
|
||||||
<es>UID</es>
|
|
||||||
<en>UID</en>
|
|
||||||
<po>UID</po>
|
|
||||||
</ID_UID>
|
|
||||||
<ID_YES>
|
|
||||||
<es>Si</es>
|
|
||||||
<en>Yes</en>
|
|
||||||
<po>Si</po>
|
|
||||||
</ID_YES>
|
|
||||||
<ID_NOPE>
|
|
||||||
<es>No</es>
|
|
||||||
<en>No</en>
|
|
||||||
<po>No</po>
|
|
||||||
</ID_NOPE>
|
|
||||||
<ID_ROLE>
|
|
||||||
<es>Rol</es>
|
|
||||||
<en>Role</en>
|
|
||||||
<po>Rol</po>
|
|
||||||
</ID_ROLE>
|
|
||||||
<ID_UP>
|
|
||||||
<es>Subir</es>
|
|
||||||
<en>Up</en>
|
|
||||||
<po>Subir</po>
|
|
||||||
</ID_UP>
|
|
||||||
<ID_DOWN>
|
|
||||||
<es>Bajar</es>
|
|
||||||
<en>Down</en>
|
|
||||||
<po>Bajar</po>
|
|
||||||
</ID_DOWN>
|
|
||||||
<ID_CITY >
|
|
||||||
<es>Ciudad</es>
|
|
||||||
<en>City</en>
|
|
||||||
<po>Ciudad</po>
|
|
||||||
</ID_CITY>
|
|
||||||
<ID_USER_INACTIVE >
|
|
||||||
<es>El usuario se encuentra inactivo</es>
|
|
||||||
<en>The user is currently inactive</en>
|
|
||||||
<po>Usuario eu inactivo</po>
|
|
||||||
</ID_USER_INACTIVE>
|
|
||||||
<ID_WRONG_PASS >
|
|
||||||
<es>Contraseña incorrecta para el usuario</es>
|
|
||||||
<en>Incorrect Password for the user</en>
|
|
||||||
<po>Senha incorrecta do usurio</po>
|
|
||||||
</ID_WRONG_PASS>
|
|
||||||
<ID_USER_NOT_REGISTERED >
|
|
||||||
<es>El usuario no esta registrado en el sistema</es>
|
|
||||||
<en>The User is not registered in the system</en>
|
|
||||||
<po></po>
|
|
||||||
</ID_USER_NOT_REGISTERED>
|
|
||||||
<ID_NEW_PASS_SAME_OLD_PASS >
|
|
||||||
<es>La contraseña y la confirmacion deben ser iguales</es>
|
|
||||||
<en>The New Password and the Confirm Password must be equals</en>
|
|
||||||
<po></po>
|
|
||||||
</ID_NEW_PASS_SAME_OLD_PASS>
|
|
||||||
<ID_WRONG_OLD_PASS >
|
|
||||||
<es>Contraseña antigua incorrecta para el usuario</es>
|
|
||||||
<en>Incorrect Old Password for the user</en>
|
|
||||||
<po></po>
|
|
||||||
</ID_WRONG_OLD_PASS>
|
|
||||||
<ID_CANT_REMOVE_USER >
|
|
||||||
<es>Ud. no puede eliminar un usuario que tiene tramites</es>
|
|
||||||
<en>You can't remove a user with one or more Applications</en>
|
|
||||||
<po>voce no pode remover</po>
|
|
||||||
</ID_CANT_REMOVE_USER>
|
|
||||||
<ID_USER_HAVENT_RIGHTS_SYSTEM >
|
|
||||||
<es>El usuario no tiene derecho de ingresar al sistema</es>
|
|
||||||
<en>User haven't rights to login this system</en>
|
|
||||||
<po></po>
|
|
||||||
</ID_USER_HAVENT_RIGHTS_SYSTEM>
|
|
||||||
<ID_USER_HAVENT_RIGHTS_PAGE >
|
|
||||||
<es>El usuario no tiene derechos para ingresar a esta opcion</es>
|
|
||||||
<en>User haven't rights in this page</en>
|
|
||||||
<po></po>
|
|
||||||
</ID_USER_HAVENT_RIGHTS_PAGE>
|
|
||||||
<ID_USER_HAVENT_RIGHTS_APPLICATION >
|
|
||||||
<es>El usuario no tiene derecho para iniciar un nuevo Tramite</es>
|
|
||||||
<en>User haven't rights to start a New Application</en>
|
|
||||||
<po></po>
|
|
||||||
</ID_USER_HAVENT_RIGHTS_APPLICATION>
|
|
||||||
<ID_USER_ID_EXIST >
|
|
||||||
<es>Ya existe un usuario con el mismo Identificador de usuario</es>
|
|
||||||
<en>There is another user with the same User ID.</en>
|
|
||||||
<po></po>
|
|
||||||
</ID_USER_ID_EXIST>
|
|
||||||
<ID_PASS_CHANGED >
|
|
||||||
<es>Contraseña de inicio, cambiada correctamente</es>
|
|
||||||
<en>Password changed succesfully</en>
|
|
||||||
<po></po>
|
|
||||||
</ID_PASS_CHANGED>
|
|
||||||
<ID_PASS_RESET >
|
|
||||||
<es>Contraseña de inicio, reiniciada correctamente</es>
|
|
||||||
<en>Password reseted succesfully</en>
|
|
||||||
<po></po>
|
|
||||||
</ID_PASS_RESET>
|
|
||||||
<ID_NEW_EMPLOYEE_CREATED >
|
|
||||||
<es>Nuevo Empleado creado satisfactoriamente</es>
|
|
||||||
<en>New Employee created successfully</en>
|
|
||||||
<po></po>
|
|
||||||
</ID_NEW_EMPLOYEE_CREATED>
|
|
||||||
<ID_NEW_CLIENT_CREATED >
|
|
||||||
<es>Nuevo Cliente creado satisfactoriamente</es>
|
|
||||||
<en>New Client created successfully</en>
|
|
||||||
<po>Noivo cliente creado</po>
|
|
||||||
</ID_NEW_CLIENT_CREATED>
|
|
||||||
|
|
||||||
<ID_PAGE>
|
|
||||||
<es>Página</es>
|
|
||||||
<en>Page</en>
|
|
||||||
<po>Page</po>
|
|
||||||
</ID_PAGE>
|
|
||||||
|
|
||||||
<ID_OF>
|
|
||||||
<es>de</es>
|
|
||||||
<en>of</en>
|
|
||||||
<po>do</po>
|
|
||||||
</ID_OF>
|
|
||||||
|
|
||||||
<ID_NAME>
|
|
||||||
<es>Nombre</es>
|
|
||||||
<en>Name</en>
|
|
||||||
<po>Nome</po>
|
|
||||||
</ID_NAME>
|
|
||||||
|
|
||||||
<ID_SERVER_NAME>
|
|
||||||
<es>Nombre Servidor</es>
|
|
||||||
<en>Server Name</en>
|
|
||||||
<po>Nome Server</po>
|
|
||||||
</ID_SERVER_NAME>
|
|
||||||
|
|
||||||
<ID_PROVIDER>
|
|
||||||
<es>Proveedor</es>
|
|
||||||
<en>Provider</en>
|
|
||||||
<po>Proveedor</po>
|
|
||||||
</ID_PROVIDER>
|
|
||||||
|
|
||||||
<ID_ROLES >
|
|
||||||
<es>Roles</es>
|
|
||||||
<en>Roles</en>
|
|
||||||
<po>Roles</po>
|
|
||||||
</ID_ROLES>
|
|
||||||
|
|
||||||
<ID_PERMISSIONS >
|
|
||||||
<es>Permisos</es>
|
|
||||||
<en>Permissions</en>
|
|
||||||
<po>Permisos</po>
|
|
||||||
</ID_PERMISSIONS>
|
|
||||||
|
|
||||||
<ID_DELETE >
|
|
||||||
<es>Borrar</es>
|
|
||||||
<en>Delete</en>
|
|
||||||
<po>Supressão</po>
|
|
||||||
</ID_DELETE>
|
|
||||||
|
|
||||||
<ID_NO_RECORDS_FOUND>
|
|
||||||
<es>Sin registros</es>
|
|
||||||
<en>Records not found</en>
|
|
||||||
<po>UID_NO_RECORDS_FOUND</po>
|
|
||||||
</ID_NO_RECORDS_FOUND>
|
|
||||||
</dynaForm>
|
|
||||||
@@ -1,64 +0,0 @@
|
|||||||
<dynaForm name="menus.xml" basedir="">xml destinado para los lenguajes de los menus
|
|
||||||
<ID_MY_INFO >
|
|
||||||
<es>Mis datos</es>
|
|
||||||
<en>My info</en>
|
|
||||||
<po></po>
|
|
||||||
</ID_MY_INFO>
|
|
||||||
<ID_USERS >
|
|
||||||
<es>Usuarios</es>
|
|
||||||
<en>Users</en>
|
|
||||||
<po></po>
|
|
||||||
</ID_USERS>
|
|
||||||
|
|
||||||
<ID_ADD_USERS >
|
|
||||||
<es>Añadir Usuarios</es>
|
|
||||||
<en>Add Users</en>
|
|
||||||
<po>Adicionar Usuarios</po>
|
|
||||||
</ID_ADD_USERS>
|
|
||||||
|
|
||||||
|
|
||||||
<ID_NEW_APPLICATION >
|
|
||||||
<es>Añadir Nueva Applicación (sistema)</es>
|
|
||||||
<en>Add New Application</en>
|
|
||||||
<po>Inserir Novo Application</po>
|
|
||||||
</ID_NEW_APPLICATION>
|
|
||||||
|
|
||||||
<ID_NEW_AUTH_SOURCE >
|
|
||||||
<es>Añadir Fuente de Autenticación</es>
|
|
||||||
<en>New Authentication Source</en>
|
|
||||||
<po>Inserir Authentication</po>
|
|
||||||
</ID_NEW_AUTH_SOURCE>
|
|
||||||
|
|
||||||
<ID_EDIT >
|
|
||||||
<es>Editar</es>
|
|
||||||
<en>Edit</en>
|
|
||||||
<po>Editar</po>
|
|
||||||
</ID_EDIT>
|
|
||||||
|
|
||||||
<ID_TEST >
|
|
||||||
<es>Probar Conexión</es>
|
|
||||||
<en>Test Conectivity</en>
|
|
||||||
<po>Testar Conexion</po>
|
|
||||||
</ID_TEST>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<xxx >
|
|
||||||
<es></es>
|
|
||||||
<en></en>
|
|
||||||
<po></po>
|
|
||||||
</xxx>
|
|
||||||
|
|
||||||
<xxx >
|
|
||||||
<es></es>
|
|
||||||
<en></en>
|
|
||||||
<po></po>
|
|
||||||
</xxx>
|
|
||||||
|
|
||||||
<xxx >
|
|
||||||
<es></es>
|
|
||||||
<en></en>
|
|
||||||
<po></po>
|
|
||||||
</xxx>
|
|
||||||
|
|
||||||
</dynaForm>
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
The User "$USER" is currently inactive
|
|
||||||
Incorrect Password for the user "$USER"
|
|
||||||
The User "$USER" is not registered in the system
|
|
||||||
The New Password and the Confirm Password must be equals
|
|
||||||
Incorrect Old Password for the user "$USER"
|
|
||||||
You can't remove a user with one or more Applications
|
|
||||||
There is another user with the same User ID.
|
|
||||||
Password changed succesfully
|
|
||||||
Password reseted succesfully
|
|
||||||
New User created successfully
|
|
||||||
Applications
|
|
||||||
Roles from Application $STR_APP.
|
|
||||||
Permissions from Application $STR_APP.
|
|
||||||
Permissions from Role $STR_ROL in Application $STR_APP
|
|
||||||
There is another role with the same Code.
|
|
||||||
There is another application with the same Code.
|
|
||||||
There is another permission with the same Code.
|
|
||||||
User haven't rights to login this system.
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
El usuario "$USER" se encuentra inactivo
|
|
||||||
Clave de ingreso incorrecto para el usuario "$USER"
|
|
||||||
El usuario "$USER" no esta registrado en el sistema
|
|
||||||
El password nuevo y el de confirmacion deben ser iguales
|
|
||||||
Password antiguo incorrecto para el usuario "$USER"
|
|
||||||
Ud. no puede eliminar un usuario que tiene tramites
|
|
||||||
Ya existe un usuario con el mismo Identificador de usuario
|
|
||||||
Clave de inicio, cambiada correctamente
|
|
||||||
Clave de inicio, reiniciada correctamente
|
|
||||||
Nuevo Empleado creado satisfactoriamente
|
|
||||||
Aplicaciones
|
|
||||||
Roles de la Aplicación $STR_APP
|
|
||||||
Permisos de la Aplicación $STR_APP
|
|
||||||
Permisos del Rol $STR_APP en la Aplicación $STR_APP
|
|
||||||
Ya existe un Rol con el mismo código
|
|
||||||
Ya existe una Applicatión con el mismo código
|
|
||||||
Ya existe un Permiso con el mismo código
|
|
||||||
El usuario no tiene derechos para ejecutar esta aplicación
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
El usuario "$USER" se encuentra inactivo
|
|
||||||
Clave de ingreso incorrecto para el usuario "$USER"
|
|
||||||
El usuario "$USER" no esta registrado en el sistema
|
|
||||||
El password nuevo y el de confirmacion deben ser iguales
|
|
||||||
Password antiguo incorrecto para el usuario "$USER"
|
|
||||||
Ud. no puede eliminar un usuario que tiene tramites
|
|
||||||
Ya existe un usuario con el mismo Identificador de usuario
|
|
||||||
Clave de inicio, cambiada correctamente
|
|
||||||
Clave de inicio, reiniciada correctamente
|
|
||||||
Nuevo Usuario creado satisfactoriamente
|
|
||||||
Applicaciones
|
|
||||||
Roles de la Aplicacion $STR_APP
|
|
||||||
Permisos de la Aplicaciones $STR_APP
|
|
||||||
Permisos del Rol $STR_ROL en $STR_APP
|
|
||||||
Ya existe un Rol con el mismo Codigo
|
|
||||||
Ya existe una Aplicacion con el mismo Codigo
|
|
||||||
Ya existe un Permiso con el mismo Codigo
|
|
||||||
El usuario no tiene derechos para ejecutar esta aplicacion
|
|
||||||
@@ -1,26 +0,0 @@
|
|||||||
%??.name=myApp.cnt basedir=content//files generic Mis tr<74>mites
|
|
||||||
|
|
||||||
%es.title
|
|
||||||
Administraci<EFBFBD>n de usuarios
|
|
||||||
%es.body.header
|
|
||||||
<center class=subtitle>.<center>
|
|
||||||
%es.body
|
|
||||||
|
|
||||||
%es.body.footer
|
|
||||||
<center><center>
|
|
||||||
%en.title
|
|
||||||
User Manager
|
|
||||||
%en.body.header
|
|
||||||
<center class=subtitle>.<center>
|
|
||||||
%en.body
|
|
||||||
|
|
||||||
%en.body.footer
|
|
||||||
<center><center>
|
|
||||||
%po.title
|
|
||||||
User Administrator
|
|
||||||
%en.body.header
|
|
||||||
<center class=subtitle>.<center>
|
|
||||||
%en.body
|
|
||||||
|
|
||||||
%en.body.footer
|
|
||||||
<center><center>
|
|
||||||
@@ -1,64 +0,0 @@
|
|||||||
INSERT INTO RBAC_PERMISSIONS VALUES ('00000000000000000000000000000001','PM_LOGIN','2007-08-03 12:24:36','2007-08-03 12:24:36',1,'00000000000000000000000000000002');
|
|
||||||
INSERT INTO RBAC_PERMISSIONS VALUES ('00000000000000000000000000000002','PM_SETUP','2007-08-03 12:24:36','2007-08-03 12:24:36',1,'00000000000000000000000000000002');
|
|
||||||
INSERT INTO RBAC_PERMISSIONS VALUES ('00000000000000000000000000000003','PM_USERS','2007-08-03 12:24:36','2007-08-03 12:24:36',1,'00000000000000000000000000000002');
|
|
||||||
INSERT INTO RBAC_PERMISSIONS VALUES ('00000000000000000000000000000004','PM_FACTORY','2007-08-03 12:24:36','2007-08-03 12:24:36',1,'00000000000000000000000000000002');
|
|
||||||
INSERT INTO RBAC_PERMISSIONS VALUES ('00000000000000000000000000000005','PM_CASES','2007-08-03 12:24:36','2007-08-03 12:24:36',1,'00000000000000000000000000000002');
|
|
||||||
INSERT INTO RBAC_PERMISSIONS VALUES ('00000000000000000000000000000006','PM_ALLCASES','2008-04-30 00:00:00','2008-04-30 00:00:00',1,'00000000000000000000000000000002');
|
|
||||||
INSERT INTO RBAC_PERMISSIONS VALUES ('00000000000000000000000000000008','PM_REPORTS','2008-05-12 00:00:00','2008-05-12 00:00:00',0,'00000000000000000000000000000002');
|
|
||||||
INSERT INTO RBAC_PERMISSIONS VALUES ('00000000000000000000000000000007','PM_REASSIGNCASE','2008-05-02 18:16:29','2008-05-02 18:16:29',1,'00000000000000000000000000000002');
|
|
||||||
INSERT INTO RBAC_PERMISSIONS VALUES ('00000000000000000000000000000009','PM_SUPERVISOR','0000-00-00 00:00:00','0000-00-00 00:00:00',1,'00000000000000000000000000000002');
|
|
||||||
INSERT INTO RBAC_PERMISSIONS VALUES ('00000000000000000000000000000010','PM_SETUP_ADVANCE','0000-00-00 00:00:00','0000-00-00 00:00:00',1,'00000000000000000000000000000002');
|
|
||||||
INSERT INTO RBAC_PERMISSIONS VALUES ('00000000000000000000000000000011','PM_DASHBOARD','2009-02-18 00:00:00','2009-02-18 00:00:00',1,'00000000000000000000000000000002');
|
|
||||||
INSERT INTO RBAC_PERMISSIONS VALUES ('00000000000000000000000000000012','PM_WEBDAV','2009-08-21 00:00:00','2009-08-21 00:00:00',1,'00000000000000000000000000000002');
|
|
||||||
INSERT INTO RBAC_PERMISSIONS VALUES ('00000000000000000000000000000013','PM_DELETECASE','2009-10-12 00:00:00','0000-00-00 00:00:00',0,'00000000000000000000000000000002');
|
|
||||||
INSERT INTO RBAC_PERMISSIONS VALUES ('00000000000000000000000000000014','PM_EDITPERSONALINFO','2009-10-12 00:00:00','0000-00-00 00:00:00',1,'00000000000000000000000000000002');
|
|
||||||
INSERT INTO RBAC_PERMISSIONS VALUES ('00000000000000000000000000000015','PM_FOLDERS_VIEW','2009-10-12 00:00:00','0000-00-00 00:00:00',1,'00000000000000000000000000000002');
|
|
||||||
INSERT INTO RBAC_PERMISSIONS VALUES ('00000000000000000000000000000016','PM_FOLDERS_ADD_FOLDER','2009-10-12 00:00:00','0000-00-00 00:00:00',1,'00000000000000000000000000000002');
|
|
||||||
INSERT INTO RBAC_PERMISSIONS VALUES ('00000000000000000000000000000017','PM_FOLDERS_ADD_FILE','2009-10-12 00:00:00','0000-00-00 00:00:00',1,'00000000000000000000000000000002');
|
|
||||||
|
|
||||||
INSERT INTO RBAC_ROLES VALUES ('00000000000000000000000000000001','','00000000000000000000000000000001','RBAC_ADMIN','2007-07-31 19:10:22','2007-08-03 12:24:36',1);
|
|
||||||
INSERT INTO RBAC_ROLES VALUES ('00000000000000000000000000000002','','00000000000000000000000000000002','PROCESSMAKER_ADMIN','2007-07-31 19:10:22','2007-08-03 12:24:36',1);
|
|
||||||
INSERT INTO RBAC_ROLES VALUES ('00000000000000000000000000000003','','00000000000000000000000000000002','PROCESSMAKER_OPERATOR','2007-07-31 19:10:22','2007-08-03 12:24:36',1);
|
|
||||||
INSERT INTO RBAC_ROLES VALUES ('00000000000000000000000000000004','','00000000000000000000000000000002','PROCESSMAKER_MANAGER', '2010-03-29 09:14:15', '2010-03-29 09:19:53', 1);
|
|
||||||
|
|
||||||
INSERT INTO RBAC_ROLES_PERMISSIONS VALUES ('00000000000000000000000000000002','00000000000000000000000000000001');
|
|
||||||
INSERT INTO RBAC_ROLES_PERMISSIONS VALUES ('00000000000000000000000000000002','00000000000000000000000000000002');
|
|
||||||
INSERT INTO RBAC_ROLES_PERMISSIONS VALUES ('00000000000000000000000000000002','00000000000000000000000000000003');
|
|
||||||
INSERT INTO RBAC_ROLES_PERMISSIONS VALUES ('00000000000000000000000000000002','00000000000000000000000000000004');
|
|
||||||
INSERT INTO RBAC_ROLES_PERMISSIONS VALUES ('00000000000000000000000000000002','00000000000000000000000000000005');
|
|
||||||
INSERT INTO RBAC_ROLES_PERMISSIONS VALUES ('00000000000000000000000000000002','00000000000000000000000000000006');
|
|
||||||
INSERT INTO RBAC_ROLES_PERMISSIONS VALUES ('00000000000000000000000000000002','00000000000000000000000000000007');
|
|
||||||
INSERT INTO RBAC_ROLES_PERMISSIONS VALUES ('00000000000000000000000000000002','00000000000000000000000000000008');
|
|
||||||
INSERT INTO RBAC_ROLES_PERMISSIONS VALUES ('00000000000000000000000000000002','00000000000000000000000000000009');
|
|
||||||
INSERT INTO RBAC_ROLES_PERMISSIONS VALUES ('00000000000000000000000000000002','00000000000000000000000000000010');
|
|
||||||
INSERT INTO RBAC_ROLES_PERMISSIONS VALUES ('00000000000000000000000000000002','00000000000000000000000000000011');
|
|
||||||
INSERT INTO RBAC_ROLES_PERMISSIONS VALUES ('00000000000000000000000000000002','00000000000000000000000000000012');
|
|
||||||
INSERT INTO RBAC_ROLES_PERMISSIONS VALUES ('00000000000000000000000000000002','00000000000000000000000000000013');
|
|
||||||
INSERT INTO RBAC_ROLES_PERMISSIONS VALUES ('00000000000000000000000000000002','00000000000000000000000000000014');
|
|
||||||
INSERT INTO RBAC_ROLES_PERMISSIONS VALUES ('00000000000000000000000000000002','00000000000000000000000000000015');
|
|
||||||
INSERT INTO RBAC_ROLES_PERMISSIONS VALUES ('00000000000000000000000000000002','00000000000000000000000000000016');
|
|
||||||
INSERT INTO RBAC_ROLES_PERMISSIONS VALUES ('00000000000000000000000000000002','00000000000000000000000000000017');
|
|
||||||
INSERT INTO RBAC_ROLES_PERMISSIONS VALUES ('00000000000000000000000000000003','00000000000000000000000000000001');
|
|
||||||
INSERT INTO RBAC_ROLES_PERMISSIONS VALUES ('00000000000000000000000000000003','00000000000000000000000000000005');
|
|
||||||
INSERT INTO RBAC_ROLES_PERMISSIONS VALUES ('00000000000000000000000000000004', '00000000000000000000000000000001');
|
|
||||||
INSERT INTO RBAC_ROLES_PERMISSIONS VALUES ('00000000000000000000000000000004', '00000000000000000000000000000003');
|
|
||||||
INSERT INTO RBAC_ROLES_PERMISSIONS VALUES ('00000000000000000000000000000004', '00000000000000000000000000000005');
|
|
||||||
INSERT INTO RBAC_ROLES_PERMISSIONS VALUES ('00000000000000000000000000000004', '00000000000000000000000000000006');
|
|
||||||
INSERT INTO RBAC_ROLES_PERMISSIONS VALUES ('00000000000000000000000000000004', '00000000000000000000000000000007');
|
|
||||||
INSERT INTO RBAC_ROLES_PERMISSIONS VALUES ('00000000000000000000000000000004', '00000000000000000000000000000008');
|
|
||||||
INSERT INTO RBAC_ROLES_PERMISSIONS VALUES ('00000000000000000000000000000004', '00000000000000000000000000000009');
|
|
||||||
INSERT INTO RBAC_ROLES_PERMISSIONS VALUES ('00000000000000000000000000000004', '00000000000000000000000000000011');
|
|
||||||
INSERT INTO RBAC_ROLES_PERMISSIONS VALUES ('00000000000000000000000000000004', '00000000000000000000000000000013');
|
|
||||||
INSERT INTO RBAC_ROLES_PERMISSIONS VALUES ('00000000000000000000000000000004', '00000000000000000000000000000014');
|
|
||||||
INSERT INTO RBAC_ROLES_PERMISSIONS VALUES ('00000000000000000000000000000004', '00000000000000000000000000000015');
|
|
||||||
INSERT INTO RBAC_ROLES_PERMISSIONS VALUES ('00000000000000000000000000000004', '00000000000000000000000000000016');
|
|
||||||
INSERT INTO RBAC_ROLES_PERMISSIONS VALUES ('00000000000000000000000000000004', '00000000000000000000000000000017');
|
|
||||||
INSERT INTO RBAC_ROLES_PERMISSIONS VALUES ('00000000000000000000000000000004', '00000000000000000000000000000018');
|
|
||||||
INSERT INTO RBAC_ROLES_PERMISSIONS VALUES ('00000000000000000000000000000004', '00000000000000000000000000000019');
|
|
||||||
|
|
||||||
INSERT INTO RBAC_SYSTEMS VALUES ('00000000000000000000000000000001','RBAC','2007-07-31 19:10:22','2007-08-03 12:24:36',1);
|
|
||||||
INSERT INTO RBAC_SYSTEMS VALUES ('00000000000000000000000000000002','PROCESSMAKER','2007-07-31 19:10:22','2007-08-03 12:24:36',1);
|
|
||||||
|
|
||||||
INSERT INTO RBAC_USERS VALUES ('00000000000000000000000000000001','admin','21232f297a57a5a743894a0e4a801fc3','Administrator','','admin@processmaker.com','2020-01-01','2007-08-03 12:24:36','2008-02-13 07:24:07',1,'MYSQL','00000000000000000000000000000000','','','','');
|
|
||||||
|
|
||||||
INSERT INTO RBAC_USERS_ROLES VALUES ('00000000000000000000000000000001','00000000000000000000000000000002');
|
|
||||||
@@ -1,361 +0,0 @@
|
|||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
|
||||||
/* PERMISSIONS */
|
|
||||||
/* ---------------------------------------------------------------------- */
|
|
||||||
|
|
||||||
|
|
||||||
IF EXISTS (SELECT 1 FROM sysobjects WHERE type = 'U' AND name = 'RBAC_PERMISSIONS')
|
|
||||||
BEGIN
|
|
||||||
DECLARE @reftable_1 nvarchar(60), @constraintname_1 nvarchar(60)
|
|
||||||
DECLARE refcursor CURSOR FOR
|
|
||||||
select reftables.name tablename, cons.name constraintname
|
|
||||||
from sysobjects tables,
|
|
||||||
sysobjects reftables,
|
|
||||||
sysobjects cons,
|
|
||||||
sysreferences ref
|
|
||||||
where tables.id = ref.rkeyid
|
|
||||||
and cons.id = ref.constid
|
|
||||||
and reftables.id = ref.fkeyid
|
|
||||||
and tables.name = 'RBAC_PERMISSIONS'
|
|
||||||
OPEN refcursor
|
|
||||||
FETCH NEXT from refcursor into @reftable_1, @constraintname_1
|
|
||||||
while @@FETCH_STATUS = 0
|
|
||||||
BEGIN
|
|
||||||
exec ('alter table '+@reftable_1+' drop constraint '+@constraintname_1)
|
|
||||||
FETCH NEXT from refcursor into @reftable_1, @constraintname_1
|
|
||||||
END
|
|
||||||
CLOSE refcursor
|
|
||||||
DEALLOCATE refcursor
|
|
||||||
DROP TABLE [RBAC_PERMISSIONS]
|
|
||||||
END
|
|
||||||
|
|
||||||
|
|
||||||
CREATE TABLE [RBAC_PERMISSIONS]
|
|
||||||
(
|
|
||||||
[PER_UID] VARCHAR(32) default '' NOT NULL,
|
|
||||||
[PER_CODE] VARCHAR(64) default '' NOT NULL,
|
|
||||||
[PER_CREATE_DATE] CHAR(19) default '0000-00-00 00:00:00' NOT NULL,
|
|
||||||
[PER_UPDATE_DATE] CHAR(19) default '0000-00-00 00:00:00' NOT NULL,
|
|
||||||
[PER_STATUS] INT default 1 NOT NULL,
|
|
||||||
[PER_SYSTEM] VARCHAR(32) default '00000000000000000000000000000002' NOT NULL,
|
|
||||||
CONSTRAINT RBAC_PERMISSIONS_PK PRIMARY KEY ([PER_UID])
|
|
||||||
);
|
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
|
||||||
/* ROLES */
|
|
||||||
/* ---------------------------------------------------------------------- */
|
|
||||||
|
|
||||||
|
|
||||||
IF EXISTS (SELECT 1 FROM sysobjects WHERE type = 'U' AND name = 'RBAC_ROLES')
|
|
||||||
BEGIN
|
|
||||||
DECLARE @reftable_2 nvarchar(60), @constraintname_2 nvarchar(60)
|
|
||||||
DECLARE refcursor CURSOR FOR
|
|
||||||
select reftables.name tablename, cons.name constraintname
|
|
||||||
from sysobjects tables,
|
|
||||||
sysobjects reftables,
|
|
||||||
sysobjects cons,
|
|
||||||
sysreferences ref
|
|
||||||
where tables.id = ref.rkeyid
|
|
||||||
and cons.id = ref.constid
|
|
||||||
and reftables.id = ref.fkeyid
|
|
||||||
and tables.name = 'ROLES'
|
|
||||||
OPEN refcursor
|
|
||||||
FETCH NEXT from refcursor into @reftable_2, @constraintname_2
|
|
||||||
while @@FETCH_STATUS = 0
|
|
||||||
BEGIN
|
|
||||||
exec ('alter table '+@reftable_2+' drop constraint '+@constraintname_2)
|
|
||||||
FETCH NEXT from refcursor into @reftable_2, @constraintname_2
|
|
||||||
END
|
|
||||||
CLOSE refcursor
|
|
||||||
DEALLOCATE refcursor
|
|
||||||
DROP TABLE [RBAC_ROLES]
|
|
||||||
END
|
|
||||||
|
|
||||||
|
|
||||||
CREATE TABLE [RBAC_ROLES]
|
|
||||||
(
|
|
||||||
[ROL_UID] VARCHAR(32) default '' NOT NULL,
|
|
||||||
[ROL_PARENT] VARCHAR(32) default '' NOT NULL,
|
|
||||||
[ROL_SYSTEM] VARCHAR(32) default '' NOT NULL,
|
|
||||||
[ROL_CODE] VARCHAR(32) default '' NOT NULL,
|
|
||||||
[ROL_CREATE_DATE] CHAR(19) default '0000-00-00 00:00:00' NOT NULL,
|
|
||||||
[ROL_UPDATE_DATE] CHAR(19) default '0000-00-00 00:00:00' NOT NULL,
|
|
||||||
[ROL_STATUS] INT default 1 NOT NULL,
|
|
||||||
CONSTRAINT RBAC_ROLES_PK PRIMARY KEY ([ROL_UID])
|
|
||||||
);
|
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
|
||||||
/* ROLES_PERMISSIONS */
|
|
||||||
/* ---------------------------------------------------------------------- */
|
|
||||||
|
|
||||||
|
|
||||||
IF EXISTS (SELECT 1 FROM sysobjects WHERE type = 'U' AND name = 'RBAC_ROLES_PERMISSIONS')
|
|
||||||
BEGIN
|
|
||||||
DECLARE @reftable_3 nvarchar(60), @constraintname_3 nvarchar(60)
|
|
||||||
DECLARE refcursor CURSOR FOR
|
|
||||||
select reftables.name tablename, cons.name constraintname
|
|
||||||
from sysobjects tables,
|
|
||||||
sysobjects reftables,
|
|
||||||
sysobjects cons,
|
|
||||||
sysreferences ref
|
|
||||||
where tables.id = ref.rkeyid
|
|
||||||
and cons.id = ref.constid
|
|
||||||
and reftables.id = ref.fkeyid
|
|
||||||
and tables.name = 'RBAC_ROLES_PERMISSIONS'
|
|
||||||
OPEN refcursor
|
|
||||||
FETCH NEXT from refcursor into @reftable_3, @constraintname_3
|
|
||||||
while @@FETCH_STATUS = 0
|
|
||||||
BEGIN
|
|
||||||
exec ('alter table '+@reftable_3+' drop constraint '+@constraintname_3)
|
|
||||||
FETCH NEXT from refcursor into @reftable_3, @constraintname_3
|
|
||||||
END
|
|
||||||
CLOSE refcursor
|
|
||||||
DEALLOCATE refcursor
|
|
||||||
DROP TABLE [RBAC_ROLES_PERMISSIONS]
|
|
||||||
END
|
|
||||||
|
|
||||||
|
|
||||||
CREATE TABLE [RBAC_ROLES_PERMISSIONS]
|
|
||||||
(
|
|
||||||
[ROL_UID] VARCHAR(32) default '' NOT NULL,
|
|
||||||
[PER_UID] VARCHAR(32) default '' NOT NULL,
|
|
||||||
CONSTRAINT RBAC_ROLES_PERMISSIONS_PK PRIMARY KEY ([ROL_UID],[PER_UID])
|
|
||||||
);
|
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
|
||||||
/* SYSTEMS */
|
|
||||||
/* ---------------------------------------------------------------------- */
|
|
||||||
|
|
||||||
|
|
||||||
IF EXISTS (SELECT 1 FROM sysobjects WHERE type = 'U' AND name = 'RBAC_SYSTEMS')
|
|
||||||
BEGIN
|
|
||||||
DECLARE @reftable_4 nvarchar(60), @constraintname_4 nvarchar(60)
|
|
||||||
DECLARE refcursor CURSOR FOR
|
|
||||||
select reftables.name tablename, cons.name constraintname
|
|
||||||
from sysobjects tables,
|
|
||||||
sysobjects reftables,
|
|
||||||
sysobjects cons,
|
|
||||||
sysreferences ref
|
|
||||||
where tables.id = ref.rkeyid
|
|
||||||
and cons.id = ref.constid
|
|
||||||
and reftables.id = ref.fkeyid
|
|
||||||
and tables.name = 'RBAC_SYSTEMS'
|
|
||||||
OPEN refcursor
|
|
||||||
FETCH NEXT from refcursor into @reftable_4, @constraintname_4
|
|
||||||
while @@FETCH_STATUS = 0
|
|
||||||
BEGIN
|
|
||||||
exec ('alter table '+@reftable_4+' drop constraint '+@constraintname_4)
|
|
||||||
FETCH NEXT from refcursor into @reftable_4, @constraintname_4
|
|
||||||
END
|
|
||||||
CLOSE refcursor
|
|
||||||
DEALLOCATE refcursor
|
|
||||||
DROP TABLE [RBAC_SYSTEMS]
|
|
||||||
END
|
|
||||||
|
|
||||||
|
|
||||||
CREATE TABLE [RBAC_SYSTEMS]
|
|
||||||
(
|
|
||||||
[SYS_UID] VARCHAR(32) default '' NOT NULL,
|
|
||||||
[SYS_CODE] VARCHAR(32) default '' NOT NULL,
|
|
||||||
[SYS_CREATE_DATE] CHAR(19) default '0000-00-00 00:00:00' NOT NULL,
|
|
||||||
[SYS_UPDATE_DATE] CHAR(19) default '0000-00-00 00:00:00' NOT NULL,
|
|
||||||
[SYS_STATUS] INT default 0 NOT NULL,
|
|
||||||
CONSTRAINT RBAC_SYSTEMS_PK PRIMARY KEY ([SYS_UID])
|
|
||||||
);
|
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
|
||||||
/* RBAC_USERS */
|
|
||||||
/* ---------------------------------------------------------------------- */
|
|
||||||
|
|
||||||
|
|
||||||
IF EXISTS (SELECT 1 FROM sysobjects WHERE type = 'U' AND name = 'RBAC_USERS')
|
|
||||||
BEGIN
|
|
||||||
DECLARE @reftable_5 nvarchar(60), @constraintname_5 nvarchar(60)
|
|
||||||
DECLARE refcursor CURSOR FOR
|
|
||||||
select reftables.name tablename, cons.name constraintname
|
|
||||||
from sysobjects tables,
|
|
||||||
sysobjects reftables,
|
|
||||||
sysobjects cons,
|
|
||||||
sysreferences ref
|
|
||||||
where tables.id = ref.rkeyid
|
|
||||||
and cons.id = ref.constid
|
|
||||||
and reftables.id = ref.fkeyid
|
|
||||||
and tables.name = 'RBAC_USERS'
|
|
||||||
OPEN refcursor
|
|
||||||
FETCH NEXT from refcursor into @reftable_5, @constraintname_5
|
|
||||||
while @@FETCH_STATUS = 0
|
|
||||||
BEGIN
|
|
||||||
exec ('alter table '+@reftable_5+' drop constraint '+@constraintname_5)
|
|
||||||
FETCH NEXT from refcursor into @reftable_5, @constraintname_5
|
|
||||||
END
|
|
||||||
CLOSE refcursor
|
|
||||||
DEALLOCATE refcursor
|
|
||||||
DROP TABLE [RBAC_USERS]
|
|
||||||
END
|
|
||||||
|
|
||||||
|
|
||||||
CREATE TABLE [RBAC_USERS]
|
|
||||||
(
|
|
||||||
[USR_UID] VARCHAR(32) default '' NOT NULL,
|
|
||||||
[USR_USERNAME] VARCHAR(100) default '' NOT NULL,
|
|
||||||
[USR_PASSWORD] VARCHAR(32) default '' NOT NULL,
|
|
||||||
[USR_FIRSTNAME] VARCHAR(50) default '' NOT NULL,
|
|
||||||
[USR_LASTNAME] VARCHAR(50) default '' NOT NULL,
|
|
||||||
[USR_EMAIL] VARCHAR(100) default '' NOT NULL,
|
|
||||||
[USR_DUE_DATE] CHAR(19) default '0000-00-00' NOT NULL,
|
|
||||||
[USR_CREATE_DATE] CHAR(19) default '0000-00-00 00:00:00' NOT NULL,
|
|
||||||
[USR_UPDATE_DATE] CHAR(19) default '0000-00-00 00:00:00' NOT NULL,
|
|
||||||
[USR_STATUS] INT default 1 NOT NULL,
|
|
||||||
[USR_AUTH_TYPE] VARCHAR(32) default '' NOT NULL,
|
|
||||||
[UID_AUTH_SOURCE] VARCHAR(32) default '' NOT NULL,
|
|
||||||
[USR_AUTH_USER_DN] VARCHAR(MAX) NULL,
|
|
||||||
[USR_AUTH_SUPERVISOR_DN] VARCHAR(255) default '' NOT NULL,
|
|
||||||
CONSTRAINT RBAC_USERS_PK PRIMARY KEY ([USR_UID])
|
|
||||||
);
|
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
|
||||||
/* USERS_ROLES */
|
|
||||||
/* ---------------------------------------------------------------------- */
|
|
||||||
|
|
||||||
|
|
||||||
IF EXISTS (SELECT 1 FROM sysobjects WHERE type = 'U' AND name = 'RBAC_USERS_ROLES')
|
|
||||||
BEGIN
|
|
||||||
DECLARE @reftable_6 nvarchar(60), @constraintname_6 nvarchar(60)
|
|
||||||
DECLARE refcursor CURSOR FOR
|
|
||||||
select reftables.name tablename, cons.name constraintname
|
|
||||||
from sysobjects tables,
|
|
||||||
sysobjects reftables,
|
|
||||||
sysobjects cons,
|
|
||||||
sysreferences ref
|
|
||||||
where tables.id = ref.rkeyid
|
|
||||||
and cons.id = ref.constid
|
|
||||||
and reftables.id = ref.fkeyid
|
|
||||||
and tables.name = 'RBAC_USERS_ROLES'
|
|
||||||
OPEN refcursor
|
|
||||||
FETCH NEXT from refcursor into @reftable_6, @constraintname_6
|
|
||||||
while @@FETCH_STATUS = 0
|
|
||||||
BEGIN
|
|
||||||
exec ('alter table '+@reftable_6+' drop constraint '+@constraintname_6)
|
|
||||||
FETCH NEXT from refcursor into @reftable_6, @constraintname_6
|
|
||||||
END
|
|
||||||
CLOSE refcursor
|
|
||||||
DEALLOCATE refcursor
|
|
||||||
DROP TABLE [RBAC_USERS_ROLES]
|
|
||||||
END
|
|
||||||
|
|
||||||
|
|
||||||
CREATE TABLE [RBAC_USERS_ROLES]
|
|
||||||
(
|
|
||||||
[USR_UID] VARCHAR(32) default '' NOT NULL,
|
|
||||||
[ROL_UID] VARCHAR(32) default '' NOT NULL,
|
|
||||||
CONSTRAINT RBAC_USERS_ROLES_PK PRIMARY KEY ([USR_UID],[ROL_UID])
|
|
||||||
);
|
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
|
||||||
/* AUTHENTICATION_SOURCE */
|
|
||||||
/* ---------------------------------------------------------------------- */
|
|
||||||
|
|
||||||
|
|
||||||
IF EXISTS (SELECT 1 FROM sysobjects WHERE type = 'U' AND name = 'RBAC_AUTHENTICATION_SOURCE')
|
|
||||||
BEGIN
|
|
||||||
DECLARE @reftable_7 nvarchar(60), @constraintname_7 nvarchar(60)
|
|
||||||
DECLARE refcursor CURSOR FOR
|
|
||||||
select reftables.name tablename, cons.name constraintname
|
|
||||||
from sysobjects tables,
|
|
||||||
sysobjects reftables,
|
|
||||||
sysobjects cons,
|
|
||||||
sysreferences ref
|
|
||||||
where tables.id = ref.rkeyid
|
|
||||||
and cons.id = ref.constid
|
|
||||||
and reftables.id = ref.fkeyid
|
|
||||||
and tables.name = 'RBAC_AUTHENTICATION_SOURCE'
|
|
||||||
OPEN refcursor
|
|
||||||
FETCH NEXT from refcursor into @reftable_7, @constraintname_7
|
|
||||||
while @@FETCH_STATUS = 0
|
|
||||||
BEGIN
|
|
||||||
exec ('alter table '+@reftable_7+' drop constraint '+@constraintname_7)
|
|
||||||
FETCH NEXT from refcursor into @reftable_7, @constraintname_7
|
|
||||||
END
|
|
||||||
CLOSE refcursor
|
|
||||||
DEALLOCATE refcursor
|
|
||||||
DROP TABLE [RBAC_AUTHENTICATION_SOURCE]
|
|
||||||
END
|
|
||||||
|
|
||||||
|
|
||||||
CREATE TABLE [RBAC_AUTHENTICATION_SOURCE]
|
|
||||||
(
|
|
||||||
[AUTH_SOURCE_UID] VARCHAR(32) default '' NOT NULL,
|
|
||||||
[AUTH_SOURCE_NAME] VARCHAR(50) default '' NOT NULL,
|
|
||||||
[AUTH_SOURCE_PROVIDER] VARCHAR(20) default '' NOT NULL,
|
|
||||||
[AUTH_SOURCE_SERVER_NAME] VARCHAR(50) default '' NOT NULL,
|
|
||||||
[AUTH_SOURCE_PORT] INT default 389 NULL,
|
|
||||||
[AUTH_SOURCE_ENABLED_TLS] INT default 0 NULL,
|
|
||||||
[AUTH_SOURCE_VERSION] VARCHAR(16) default '3' NOT NULL,
|
|
||||||
[AUTH_SOURCE_BASE_DN] VARCHAR(128) default '' NOT NULL,
|
|
||||||
[AUTH_ANONYMOUS] INT default 0 NULL,
|
|
||||||
[AUTH_SOURCE_SEARCH_USER] VARCHAR(128) default '' NOT NULL,
|
|
||||||
[AUTH_SOURCE_PASSWORD] VARCHAR(32) default '' NOT NULL,
|
|
||||||
[AUTH_SOURCE_ATTRIBUTES] VARCHAR(255) default '' NOT NULL,
|
|
||||||
[AUTH_SOURCE_OBJECT_CLASSES] VARCHAR(255) default '' NOT NULL,
|
|
||||||
[AUTH_SOURCE_DATA] TEXT NULL,
|
|
||||||
CONSTRAINT RBAC_AUTHENTICATION_SOURCE_PK PRIMARY KEY ([AUTH_SOURCE_UID])
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
|
||||||
/* USERS */
|
|
||||||
/* ---------------------------------------------------------------------- */
|
|
||||||
|
|
||||||
|
|
||||||
IF EXISTS (SELECT 1 FROM sysobjects WHERE type = 'U' AND name = 'RBAC_USERS')
|
|
||||||
BEGIN
|
|
||||||
DECLARE @reftable_8 nvarchar(60), @constraintname_8 nvarchar(60)
|
|
||||||
DECLARE refcursor CURSOR FOR
|
|
||||||
select reftables.name tablename, cons.name constraintname
|
|
||||||
from sysobjects tables,
|
|
||||||
sysobjects reftables,
|
|
||||||
sysobjects cons,
|
|
||||||
sysreferences ref
|
|
||||||
where tables.id = ref.rkeyid
|
|
||||||
and cons.id = ref.constid
|
|
||||||
and reftables.id = ref.fkeyid
|
|
||||||
and tables.name = 'RBAC_USERS'
|
|
||||||
OPEN refcursor
|
|
||||||
FETCH NEXT from refcursor into @reftable_8, @constraintname_8
|
|
||||||
while @@FETCH_STATUS = 0
|
|
||||||
BEGIN
|
|
||||||
exec ('alter table '+@reftable_8+' drop constraint '+@constraintname_8)
|
|
||||||
FETCH NEXT from refcursor into @reftable_8, @constraintname_8
|
|
||||||
END
|
|
||||||
CLOSE refcursor
|
|
||||||
DEALLOCATE refcursor
|
|
||||||
DROP TABLE [RBAC_USERS]
|
|
||||||
END
|
|
||||||
|
|
||||||
CREATE TABLE [RBAC_USERS]
|
|
||||||
(
|
|
||||||
[USR_UID] VARCHAR(32) default '' NOT NULL,
|
|
||||||
[USR_USERNAME] VARCHAR(100) default '' NOT NULL,
|
|
||||||
[USR_PASSWORD] VARCHAR(32) default '' NOT NULL,
|
|
||||||
[USR_FIRSTNAME] VARCHAR(50) default '' NOT NULL,
|
|
||||||
[USR_LASTNAME] VARCHAR(50) default '' NOT NULL,
|
|
||||||
[USR_EMAIL] VARCHAR(100) default '' NOT NULL,
|
|
||||||
[USR_DUE_DATE] CHAR(19) default '0000-00-00' NOT NULL,
|
|
||||||
[USR_CREATE_DATE] CHAR(19) default '0000-00-00 00:00:00' NOT NULL,
|
|
||||||
[USR_UPDATE_DATE] CHAR(19) default '0000-00-00 00:00:00' NOT NULL,
|
|
||||||
[USR_STATUS] INT default 1 NOT NULL,
|
|
||||||
|
|
||||||
[USR_AUTH_TYPE] VARCHAR(32) NOT NULL DEFAULT ('MSSQL'),
|
|
||||||
[UID_AUTH_SOURCE] VARCHAR(32) NOT NULL DEFAULT ('00000000000000000000000000000000'),
|
|
||||||
[USR_AUTH_USER_DN] VARCHAR(255) NOT NULL,
|
|
||||||
[USR_AUTH_SUPERVISOR_DN] VARCHAR(255) NULL,
|
|
||||||
|
|
||||||
[USR_REPLACED_BY] varchar(32) NULL,
|
|
||||||
[USR_REPORTS_TO] varchar(32) NULL,
|
|
||||||
|
|
||||||
|
|
||||||
CONSTRAINT RBAC_USERS_PK PRIMARY KEY ([USR_UID])
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
# Sqlfile -> Database map
|
|
||||||
schema.sql=rbac
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
-- foreach ($databaseName in $databaseNames)
|
|
||||||
-- drop database $databaseName;
|
|
||||||
-- create database $databaseName;
|
|
||||||
-- end
|
|
||||||
@@ -1,127 +0,0 @@
|
|||||||
|
|
||||||
|
|
||||||
/* -----------------------------------------------------------------------
|
|
||||||
PERMISSIONS
|
|
||||||
----------------------------------------------------------------------- */
|
|
||||||
|
|
||||||
DROP TABLE "RBAC_PERMISSIONS" CASCADE CONSTRAINTS;
|
|
||||||
|
|
||||||
|
|
||||||
CREATE TABLE "RBAC_PERMISSIONS"
|
|
||||||
(
|
|
||||||
"PER_UID" VARCHAR2(32) default '' NOT NULL,
|
|
||||||
"PER_CODE" VARCHAR2(64) default '' NOT NULL,
|
|
||||||
"PER_CREATE_DATE" DATE default '0000-00-00 00:00:00' NOT NULL,
|
|
||||||
"PER_UPDATE_DATE" DATE default '0000-00-00 00:00:00' NOT NULL,
|
|
||||||
"PER_STATUS" NUMBER default 1 NOT NULL
|
|
||||||
);
|
|
||||||
|
|
||||||
ALTER TABLE "RBAC_PERMISSIONS"
|
|
||||||
ADD CONSTRAINT "PERMISSIONS_PK"
|
|
||||||
PRIMARY KEY ("PER_UID");
|
|
||||||
|
|
||||||
|
|
||||||
/* -----------------------------------------------------------------------
|
|
||||||
ROLES
|
|
||||||
----------------------------------------------------------------------- */
|
|
||||||
|
|
||||||
DROP TABLE "RBAC_ROLES" CASCADE CONSTRAINTS;
|
|
||||||
|
|
||||||
|
|
||||||
CREATE TABLE "RBAC_ROLES"
|
|
||||||
(
|
|
||||||
"ROL_UID" VARCHAR2(32) default '' NOT NULL,
|
|
||||||
"ROL_PARENT" VARCHAR2(32) default '' NOT NULL,
|
|
||||||
"ROL_SYSTEM" VARCHAR2(32) default '' NOT NULL,
|
|
||||||
"ROL_CODE" VARCHAR2(32) default '' NOT NULL,
|
|
||||||
"ROL_CREATE_DATE" DATE default '0000-00-00 00:00:00' NOT NULL,
|
|
||||||
"ROL_UPDATE_DATE" DATE default '0000-00-00 00:00:00' NOT NULL,
|
|
||||||
"ROL_STATUS" NUMBER default 1 NOT NULL
|
|
||||||
);
|
|
||||||
|
|
||||||
ALTER TABLE "RBAC_ROLES"
|
|
||||||
ADD CONSTRAINT "ROLES_PK"
|
|
||||||
PRIMARY KEY ("ROL_UID");
|
|
||||||
|
|
||||||
|
|
||||||
/* -----------------------------------------------------------------------
|
|
||||||
ROLES_PERMISSIONS
|
|
||||||
----------------------------------------------------------------------- */
|
|
||||||
|
|
||||||
DROP TABLE "RBAC_ROLES_PERMISSIONS" CASCADE CONSTRAINTS;
|
|
||||||
|
|
||||||
|
|
||||||
CREATE TABLE "RBAC_ROLES_PERMISSIONS"
|
|
||||||
(
|
|
||||||
"ROL_UID" VARCHAR2(32) default '' NOT NULL,
|
|
||||||
"PER_UID" VARCHAR2(32) default '' NOT NULL
|
|
||||||
);
|
|
||||||
|
|
||||||
ALTER TABLE "RBAC_ROLES_PERMISSIONS"
|
|
||||||
ADD CONSTRAINT "RBAC_ROLES_PERMISSIONS_PK"
|
|
||||||
PRIMARY KEY ("ROL_UID","PER_UID");
|
|
||||||
|
|
||||||
|
|
||||||
/* -----------------------------------------------------------------------
|
|
||||||
SYSTEMS
|
|
||||||
----------------------------------------------------------------------- */
|
|
||||||
|
|
||||||
DROP TABLE "RBAC_SYSTEMS" CASCADE CONSTRAINTS;
|
|
||||||
|
|
||||||
|
|
||||||
CREATE TABLE "RBAC_SYSTEMS"
|
|
||||||
(
|
|
||||||
"SYS_UID" VARCHAR2(32) default '' NOT NULL,
|
|
||||||
"SYS_CODE" VARCHAR2(32) default '' NOT NULL,
|
|
||||||
"SYS_CREATE_DATE" DATE default '0000-00-00 00:00:00' NOT NULL,
|
|
||||||
"SYS_UPDATE_DATE" DATE default '0000-00-00 00:00:00' NOT NULL,
|
|
||||||
"SYS_STATUS" NUMBER default 0 NOT NULL
|
|
||||||
);
|
|
||||||
|
|
||||||
ALTER TABLE "RBAC_SYSTEMS"
|
|
||||||
ADD CONSTRAINT "SYSTEMS_PK"
|
|
||||||
PRIMARY KEY ("SYS_UID");
|
|
||||||
|
|
||||||
|
|
||||||
/* -----------------------------------------------------------------------
|
|
||||||
USERS
|
|
||||||
----------------------------------------------------------------------- */
|
|
||||||
|
|
||||||
DROP TABLE "RBAC_USERS" CASCADE CONSTRAINTS;
|
|
||||||
|
|
||||||
|
|
||||||
CREATE TABLE "RBAC_USERS"
|
|
||||||
(
|
|
||||||
"USR_UID" VARCHAR2(32) default '' NOT NULL,
|
|
||||||
"USR_USERNAME" VARCHAR2(100) default '' NOT NULL,
|
|
||||||
"USR_PASSWORD" VARCHAR2(32) default '' NOT NULL,
|
|
||||||
"USR_FIRSTNAME" VARCHAR2(50) default '' NOT NULL,
|
|
||||||
"USR_LASTNAME" VARCHAR2(50) default '' NOT NULL,
|
|
||||||
"USR_EMAIL" VARCHAR2(100) default '' NOT NULL,
|
|
||||||
"USR_DUE_DATE" DATE default '0000-00-00' NOT NULL,
|
|
||||||
"USR_CREATE_DATE" DATE default '0000-00-00 00:00:00' NOT NULL,
|
|
||||||
"USR_UPDATE_DATE" DATE default '0000-00-00 00:00:00' NOT NULL,
|
|
||||||
"USR_STATUS" NUMBER default 1 NOT NULL
|
|
||||||
);
|
|
||||||
|
|
||||||
ALTER TABLE "RBAC_USERS"
|
|
||||||
ADD CONSTRAINT "USERS_PK"
|
|
||||||
PRIMARY KEY ("USR_UID");
|
|
||||||
|
|
||||||
|
|
||||||
/* -----------------------------------------------------------------------
|
|
||||||
USERS_ROLES
|
|
||||||
----------------------------------------------------------------------- */
|
|
||||||
|
|
||||||
DROP TABLE "RBAC_USERS_ROLES" CASCADE CONSTRAINTS;
|
|
||||||
|
|
||||||
|
|
||||||
CREATE TABLE "RBAC_USERS_ROLES"
|
|
||||||
(
|
|
||||||
"USR_UID" VARCHAR2(32) default '' NOT NULL,
|
|
||||||
"ROL_UID" VARCHAR2(32) default '' NOT NULL
|
|
||||||
);
|
|
||||||
|
|
||||||
ALTER TABLE "RBAC_USERS_ROLES"
|
|
||||||
ADD CONSTRAINT "USERS_ROLES_PK"
|
|
||||||
PRIMARY KEY ("USR_UID","ROL_UID");
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
# Sqlfile -> Database map
|
|
||||||
schema.sql=rbac
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
drop database rbac;
|
|
||||||
create database rbac;
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
# Sqlfile -> Database map
|
|
||||||
schema.sql=rbac
|
|
||||||
@@ -1,29 +0,0 @@
|
|||||||
<?php
|
|
||||||
/**
|
|
||||||
* dbmodule_processmaker.php
|
|
||||||
*
|
|
||||||
* ProcessMaker Open Source Edition
|
|
||||||
* Copyright (C) 2004 - 2008 Colosa Inc.23
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU Affero General Public License as
|
|
||||||
* published by the Free Software Foundation, either version 3 of the
|
|
||||||
* License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU Affero General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*
|
|
||||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
|
||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
$DB_INDEX++;
|
|
||||||
$DB_MODULE[$DB_INDEX]['name'] = 'ProcessMaker';
|
|
||||||
$DB_MODULE[$DB_INDEX]['type'] = 'multiple';
|
|
||||||
$DB_MODULE[$DB_INDEX]['path'] = '/shared/workflow_data/sites/';
|
|
||||||
?>
|
|
||||||
@@ -1,118 +0,0 @@
|
|||||||
<?php
|
|
||||||
/**
|
|
||||||
* inc.application.php
|
|
||||||
*
|
|
||||||
* ProcessMaker Open Source Edition
|
|
||||||
* Copyright (C) 2004 - 2008 Colosa Inc.23
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU Affero General Public License as
|
|
||||||
* published by the Free Software Foundation, either version 3 of the
|
|
||||||
* License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU Affero General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*
|
|
||||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
|
||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
class App
|
|
||||||
{
|
|
||||||
function ForceLogin()
|
|
||||||
{
|
|
||||||
global $HTTP_SESSION_VARS;
|
|
||||||
global $G_MAIN_MENU;
|
|
||||||
global $G_SUB_MENU;
|
|
||||||
if( $HTTP_SESSION_VARS['LOGGED_IN'] == false)
|
|
||||||
{
|
|
||||||
header( "location: /sys/" . SYS_LANG . "/" . SYS_SKIN . "/login/login.html" );
|
|
||||||
die();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$cmptype = $HTTP_SESSION_VARS['USER_TYPE'];
|
|
||||||
switch( $cmptype )
|
|
||||||
{
|
|
||||||
case 'BUYER':
|
|
||||||
$G_MAIN_MENU = "buyer";
|
|
||||||
$G_SUB_MENU = "";
|
|
||||||
break;
|
|
||||||
case 'PROVIDER':
|
|
||||||
$G_MAIN_MENU = "provider";
|
|
||||||
$G_SUB_MENU = "";
|
|
||||||
break;
|
|
||||||
case 'REINSURANCE':
|
|
||||||
$G_MAIN_MENU = "reinsurance";
|
|
||||||
$G_SUB_MENU = "";
|
|
||||||
break;
|
|
||||||
case 'ADMIN':
|
|
||||||
$G_MAIN_MENU = "admin";
|
|
||||||
$G_SUB_MENU = "";
|
|
||||||
break;
|
|
||||||
case '':
|
|
||||||
header( "location: /sys/" . SYS_LANG . "/" . SYS_SKIN . "/login/login.html" );
|
|
||||||
die();
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
$G_MAIN_MENU = "default";
|
|
||||||
$G_SUB_MENU = "";
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function GetPartnerStatus()
|
|
||||||
{
|
|
||||||
global $HTTP_SESSION_VARS;
|
|
||||||
$slipid = $HTTP_SESSION_VARS['CURRENT_SLIP'];
|
|
||||||
$partnerid = $HTTP_SESSION_VARS['CURRENT_PARTNER'];
|
|
||||||
|
|
||||||
$mdbc = new DBConnection();
|
|
||||||
G::LoadClass( "slip" );
|
|
||||||
$slip = new Slip;
|
|
||||||
$slip->SetTo( $mdbc );
|
|
||||||
$slip->Load( $slipid );
|
|
||||||
$partner = $slip->GetPartner( $partnerid );
|
|
||||||
|
|
||||||
$res = $partner->Fields['SLP_PARTNER_STATUS'];
|
|
||||||
unset( $partner );
|
|
||||||
unset( $slip );
|
|
||||||
unset( $mdbc );
|
|
||||||
return $res;
|
|
||||||
}
|
|
||||||
|
|
||||||
function SetPartnerStatus( $intStatus = 0 )
|
|
||||||
{
|
|
||||||
global $HTTP_SESSION_VARS;
|
|
||||||
$slipid = $HTTP_SESSION_VARS['CURRENT_SLIP'];
|
|
||||||
$partnerid = $HTTP_SESSION_VARS['CURRENT_PARTNER'];
|
|
||||||
|
|
||||||
$mdbc = new DBConnection();
|
|
||||||
G::LoadClass( "slip" );
|
|
||||||
$slip = new Slip;
|
|
||||||
$slip->SetTo( $mdbc );
|
|
||||||
$slip->Load( $slipid );
|
|
||||||
$partner = $slip->GetPartner( $partnerid );
|
|
||||||
|
|
||||||
$partner->Fields = NULL;
|
|
||||||
$partner->Fields['UID_SLIP'] = $slipid;
|
|
||||||
$partner->Fields['UID_REINSURANCE'] = $partnerid;
|
|
||||||
$partner->Fields['SLP_PARTNER_STATUS'] = $intStatus;
|
|
||||||
$partner->Fields['SLP_PARTNER_UPDATED'] = G::CurDate();
|
|
||||||
$partner->Save();
|
|
||||||
|
|
||||||
unset( $partner );
|
|
||||||
unset( $slip );
|
|
||||||
unset( $mdbc );
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
?>
|
|
||||||
@@ -1,224 +0,0 @@
|
|||||||
<?php
|
|
||||||
/**
|
|
||||||
* inc.dynaForms.php
|
|
||||||
*
|
|
||||||
* ProcessMaker Open Source Edition
|
|
||||||
* Copyright (C) 2004 - 2008 Colosa Inc.23
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU Affero General Public License as
|
|
||||||
* published by the Free Software Foundation, either version 3 of the
|
|
||||||
* License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU Affero General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*
|
|
||||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
|
||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
class Node {
|
|
||||||
var $name = "";
|
|
||||||
var $attribute = NULL;
|
|
||||||
var $value = NULL;
|
|
||||||
var $children = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
$header = "";
|
|
||||||
$tree = NULL;
|
|
||||||
|
|
||||||
function read_config_file(){
|
|
||||||
global $home;
|
|
||||||
$directory = PATH_DYNAFORM;
|
|
||||||
$car = substr ($directory, strlen ($directory)-1, 1);
|
|
||||||
if ($car=='/' ) $directory = substr( $directory, 0, strlen($directory)- 1 );
|
|
||||||
$home = $directory;
|
|
||||||
|
|
||||||
global $showlang;
|
|
||||||
$showlang = "es,en";
|
|
||||||
}
|
|
||||||
|
|
||||||
function parseNodo1 ( $token ) {
|
|
||||||
//parse de <name atr=1 attr=2 ... > en un nuevo nodo.
|
|
||||||
$nodo = new Node;
|
|
||||||
$nodo->children = NULL;
|
|
||||||
$tok = ""; $n = 0;
|
|
||||||
for ($i=0; $i<strlen ($token); $i++) {
|
|
||||||
$car = $token[$i];
|
|
||||||
if ($car == ' ' || $car == "=") {
|
|
||||||
if (strlen($tok) > 0 ) { $tokens [$n++] = $tok; $tok = ""; }
|
|
||||||
if ($car == '=' ) { $tokens [$n++] = $car; }
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
$tok .= $car;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (strlen($tok) > 0 ) { $tokens [$n++] = $tok; $tok = ""; }
|
|
||||||
|
|
||||||
//asignar los valores para el nombre del nodo y sus attributos
|
|
||||||
$nodo->name = trim($tokens[0]);
|
|
||||||
for ($i=1; $i< $n; $i++ ) {
|
|
||||||
$aux = $tokens[$i+2];
|
|
||||||
if ($aux[0] == $aux[strlen($aux)-1] || $aux[0] == '"') $aux = substr ($aux,1,strlen($aux)-2);
|
|
||||||
$key = $tokens[$i]; $val = "true";
|
|
||||||
if ($tokens[$i+1]== "=") {$val = $aux; $i+=2;}
|
|
||||||
// $nodo->attribute = array_merge ( $nodo->attribute, array ( $key => $val ) );
|
|
||||||
$nodo->attribute[$key] = $val;
|
|
||||||
}
|
|
||||||
return $nodo;
|
|
||||||
}
|
|
||||||
|
|
||||||
function getTag () {
|
|
||||||
global $buffer;
|
|
||||||
global $bufIndex;
|
|
||||||
global $size;
|
|
||||||
global $header;
|
|
||||||
global $tree;
|
|
||||||
$token = "";
|
|
||||||
|
|
||||||
//PRIMER BUCLE buscar tag >
|
|
||||||
while ($bufIndex <= $size && $car !='>') {
|
|
||||||
$token .= $car;
|
|
||||||
$car = $buffer [$bufIndex++];
|
|
||||||
}
|
|
||||||
if ($token[0] == "?") {
|
|
||||||
$header = $token;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
$nodo = parseNodo1 ($token);
|
|
||||||
|
|
||||||
//SEGUNDO BUCLE buscar VALUE
|
|
||||||
$car = $buffer [$bufIndex++]; $token = "";
|
|
||||||
while ($bufIndex <= $size && $car !='<') {
|
|
||||||
$token .= $car;
|
|
||||||
$car = $buffer [$bufIndex++];
|
|
||||||
}
|
|
||||||
$nodo->value = trim($token);
|
|
||||||
|
|
||||||
|
|
||||||
//TERCER BUCLE buscar </tag>
|
|
||||||
$res = 0;
|
|
||||||
while ($res == 0) {
|
|
||||||
if ($car != "<") while ( ($car = trim( $buffer [$bufIndex++] )) == "");
|
|
||||||
if ($car=="<") {
|
|
||||||
$res = 0;
|
|
||||||
$car = $buffer [$bufIndex++];
|
|
||||||
//ADDCHILD nodo recien creado
|
|
||||||
if ($car != "/") {
|
|
||||||
$bufIndex --;
|
|
||||||
$n = count($nodo->children);
|
|
||||||
$nodo->children[$n] = getTag ();
|
|
||||||
} else $res = 1;
|
|
||||||
}
|
|
||||||
else die ("se esperaba '<' y se encontro $car");
|
|
||||||
}
|
|
||||||
|
|
||||||
//se supone que se ha leido "</" y continuamos con el nombre
|
|
||||||
$token = "";
|
|
||||||
$car = $buffer [$bufIndex++];
|
|
||||||
while ($bufIndex <= $size && $car !='>') {
|
|
||||||
$token .= $car;
|
|
||||||
$car = $buffer [$bufIndex++];
|
|
||||||
}
|
|
||||||
if ( strcmp ($nodo->name, trim($token)) != 0) die ("no corresponde fin de tag </$token> con <" . $nodo->name. ">");
|
|
||||||
|
|
||||||
return $nodo;
|
|
||||||
}
|
|
||||||
|
|
||||||
function parseFile ($filename) {
|
|
||||||
global $tree;
|
|
||||||
global $buffer;
|
|
||||||
global $bufIndex;
|
|
||||||
global $size;
|
|
||||||
|
|
||||||
if (strlen($filename) <= 0) die ("invalid filename");
|
|
||||||
|
|
||||||
if ( ! file_exists ( $filename) ) die ("This file $filename does not exist");
|
|
||||||
if ( ! is_file ( $filename) ) die ("$filename is not a file");
|
|
||||||
|
|
||||||
$size = filesize ($filename);
|
|
||||||
$fp = fopen ($filename, "rb");
|
|
||||||
$i = 0;
|
|
||||||
|
|
||||||
$aux = fread($fp, $size);
|
|
||||||
$buffer = "";
|
|
||||||
for ($i = 0; $i < $size; $i++) {
|
|
||||||
if (!($aux[$i] == "\n" || $aux[$i] == "\r" || $aux[$i] == "\t")) $buffer .= $aux[$i];
|
|
||||||
}
|
|
||||||
fclose ($fp);
|
|
||||||
$bufIndex = 0;
|
|
||||||
|
|
||||||
$size = strlen ($buffer);
|
|
||||||
|
|
||||||
while ( $bufIndex <= $size ) {
|
|
||||||
$car = $buffer [$bufIndex++];
|
|
||||||
if ($car == '<' )
|
|
||||||
$tree = getTag();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function saveXml(){
|
|
||||||
global $tree;
|
|
||||||
global $header;
|
|
||||||
global $filename;
|
|
||||||
global $HTTP_POST_VARS;
|
|
||||||
global $curDir;
|
|
||||||
global $onlyName;
|
|
||||||
|
|
||||||
//crear el archivo Xml
|
|
||||||
// print "$filename <br>";
|
|
||||||
|
|
||||||
$fp = fopen ($filename, "w+");
|
|
||||||
fputs ($fp,"<$header>\n");
|
|
||||||
|
|
||||||
$aux = explode ( '/', $filename);
|
|
||||||
$onlyName = $aux[count($aux)-1];
|
|
||||||
$curDir = $HTTP_POST_VARS['curDir'];
|
|
||||||
|
|
||||||
fputs ($fp,"<dynaForm name=\"$onlyName\" basedir=\"$curDir\">$tree->value\n");
|
|
||||||
|
|
||||||
for ($i = 0; $i < count($tree->children); $i++) {
|
|
||||||
$nodo = $tree->children[$i];
|
|
||||||
|
|
||||||
fputs ($fp,"<$nodo->name ");
|
|
||||||
if ( is_array ($nodo->attribute) )
|
|
||||||
foreach ( $nodo->attribute as $attr=>$attrValue )
|
|
||||||
fputs ($fp,"$attr=\"$attrValue\" ");
|
|
||||||
fputs ($fp,">\n");
|
|
||||||
|
|
||||||
//si es un dropdown-SQL la sentencia select va como valor del nodo
|
|
||||||
if (strlen ($nodo->value) > 0) {
|
|
||||||
fputs ($fp,"$nodo->value\n");
|
|
||||||
}
|
|
||||||
|
|
||||||
for ($j = 0; $j < count($nodo->children); $j++) {
|
|
||||||
$lang = $nodo->children[$j];
|
|
||||||
fputs ($fp, " <$lang->name>$lang->value");
|
|
||||||
|
|
||||||
//si tiene etiquetas del tipo option
|
|
||||||
if (is_array($lang->children)) {
|
|
||||||
fputs ($fp, "\n");
|
|
||||||
for ($k = 0; $k < count($lang->children); $k++) {
|
|
||||||
$option = $lang->children[$k];
|
|
||||||
fputs ($fp, "<option name=\"" . $option->attribute['name'] . "\">$option->value</option>\n");
|
|
||||||
}
|
|
||||||
} //if tiene etiquetas del tipo opcion.
|
|
||||||
fputs ($fp, "</$lang->name>\n");
|
|
||||||
|
|
||||||
} //for j
|
|
||||||
fputs ($fp,"</$nodo->name>\n");
|
|
||||||
|
|
||||||
} //for i
|
|
||||||
fputs ($fp,"</dynaForm>\n");
|
|
||||||
fclose ($fp);
|
|
||||||
}
|
|
||||||
|
|
||||||
?>
|
|
||||||
@@ -1,42 +0,0 @@
|
|||||||
<?php
|
|
||||||
/**
|
|
||||||
* backApp.php
|
|
||||||
*
|
|
||||||
* ProcessMaker Open Source Edition
|
|
||||||
* Copyright (C) 2004 - 2008 Colosa Inc.23
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU Affero General Public License as
|
|
||||||
* published by the Free Software Foundation, either version 3 of the
|
|
||||||
* License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU Affero General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*
|
|
||||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
|
||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
global $G_TMP_MENU;
|
|
||||||
global $G_BACK_PAGE;
|
|
||||||
|
|
||||||
$G_TMP_MENU->AddRawOption( $G_BACK_PAGE);
|
|
||||||
|
|
||||||
switch ( SYS_LANG ) {
|
|
||||||
case "es" :
|
|
||||||
$G_TMP_MENU->Labels = Array (
|
|
||||||
"Retornar al trámite"
|
|
||||||
);
|
|
||||||
break;
|
|
||||||
default :
|
|
||||||
$G_TMP_MENU->Labels = Array (
|
|
||||||
"Back to Application"
|
|
||||||
);
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
@@ -1,47 +0,0 @@
|
|||||||
<?php
|
|
||||||
/**
|
|
||||||
* cancel.php
|
|
||||||
*
|
|
||||||
* ProcessMaker Open Source Edition
|
|
||||||
* Copyright (C) 2004 - 2008 Colosa Inc.23
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU Affero General Public License as
|
|
||||||
* published by the Free Software Foundation, either version 3 of the
|
|
||||||
* License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU Affero General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*
|
|
||||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
|
||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
global $G_TMP_MENU;
|
|
||||||
global $G_BACK_PAGE;
|
|
||||||
|
|
||||||
$G_TMP_MENU->AddRawOption( $G_BACK_PAGE);
|
|
||||||
|
|
||||||
switch ( SYS_LANG ) {
|
|
||||||
case "es" :
|
|
||||||
$G_TMP_MENU->Labels = Array (
|
|
||||||
"Cancelar"
|
|
||||||
);
|
|
||||||
break;
|
|
||||||
case "po" :
|
|
||||||
$G_TMP_MENU->Labels = Array (
|
|
||||||
"Cancelar"
|
|
||||||
);
|
|
||||||
break;
|
|
||||||
default :
|
|
||||||
$G_TMP_MENU->Labels = Array (
|
|
||||||
"Cancel"
|
|
||||||
);
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
@@ -1,64 +0,0 @@
|
|||||||
<?php
|
|
||||||
/**
|
|
||||||
* rbac.appEdit.php
|
|
||||||
*
|
|
||||||
* ProcessMaker Open Source Edition
|
|
||||||
* Copyright (C) 2004 - 2008 Colosa Inc.23
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU Affero General Public License as
|
|
||||||
* published by the Free Software Foundation, either version 3 of the
|
|
||||||
* License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU Affero General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*
|
|
||||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
|
||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
global $G_TMP_MENU;
|
|
||||||
global $HTTP_SESSION_VARS;
|
|
||||||
$appid = $HTTP_SESSION_VARS['CURRENT_APPLICATION'];
|
|
||||||
|
|
||||||
$G_TMP_MENU->AddIdRawOption( "OP1", "rbac/appList.html" );
|
|
||||||
$G_TMP_MENU->AddIdRawOption( "OP2", "rbac/appDel.html" );
|
|
||||||
|
|
||||||
switch( SYS_LANG )
|
|
||||||
{
|
|
||||||
case 'es':
|
|
||||||
$G_TMP_MENU->Labels = array(
|
|
||||||
"Cancelar",
|
|
||||||
"Eliminar Applicación"
|
|
||||||
);
|
|
||||||
break;
|
|
||||||
case 'po':
|
|
||||||
$G_TMP_MENU->Labels = array(
|
|
||||||
"Cancelar",
|
|
||||||
"Eliminar Application"
|
|
||||||
);
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
$G_TMP_MENU->Labels = array(
|
|
||||||
"Cancel",
|
|
||||||
"Remove Application"
|
|
||||||
);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
//si no hay nada relacionado a esta aplicación se puede BORRAR!!
|
|
||||||
$dbc = new DBConnection(DB_HOST, DB_RBAC_USER, DB_RBAC_PASS, DB_RBAC_NAME );
|
|
||||||
//G::LoadClassRBAC ("applications");
|
|
||||||
$obj = New RBAC_Application;
|
|
||||||
$obj->SetTo ($dbc);
|
|
||||||
$sw = $obj->canRemoveApplication ($appid);
|
|
||||||
if ($sw > 0)
|
|
||||||
$G_TMP_MENU->disableOptionId ("OP2");
|
|
||||||
|
|
||||||
?>
|
|
||||||
@@ -1,57 +0,0 @@
|
|||||||
<?php
|
|
||||||
/**
|
|
||||||
* rbac.appView.php
|
|
||||||
*
|
|
||||||
* ProcessMaker Open Source Edition
|
|
||||||
* Copyright (C) 2004 - 2008 Colosa Inc.23
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU Affero General Public License as
|
|
||||||
* published by the Free Software Foundation, either version 3 of the
|
|
||||||
* License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU Affero General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*
|
|
||||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
|
||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
global $G_TMP_MENU;
|
|
||||||
global $HTTP_SESSION_VARS;
|
|
||||||
|
|
||||||
$G_TMP_MENU->AddIdRawOption( "OP1", "rbac/roleList.html" );
|
|
||||||
$G_TMP_MENU->AddIdRawOption( "OP2", "rbac/permList.html" );
|
|
||||||
$G_TMP_MENU->AddIdRawOption( "OP3", "rbac/appList.html" );
|
|
||||||
|
|
||||||
switch( SYS_LANG )
|
|
||||||
{
|
|
||||||
case 'es':
|
|
||||||
$G_TMP_MENU->Labels = array(
|
|
||||||
"Ver Roles",
|
|
||||||
"Ver Permisos",
|
|
||||||
"Lista de Aplicaciones"
|
|
||||||
);
|
|
||||||
break;
|
|
||||||
case 'po':
|
|
||||||
$G_TMP_MENU->Labels = array(
|
|
||||||
"Ver Roles",
|
|
||||||
"Ver Permisos",
|
|
||||||
"Lista de Aplicaciones"
|
|
||||||
);
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
$G_TMP_MENU->Labels = array(
|
|
||||||
"View Roles",
|
|
||||||
"View Permissions",
|
|
||||||
"Applications List"
|
|
||||||
);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
@@ -1,34 +0,0 @@
|
|||||||
<?php
|
|
||||||
/**
|
|
||||||
* rbac.application.php
|
|
||||||
*
|
|
||||||
* ProcessMaker Open Source Edition
|
|
||||||
* Copyright (C) 2004 - 2008 Colosa Inc.23
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU Affero General Public License as
|
|
||||||
* published by the Free Software Foundation, either version 3 of the
|
|
||||||
* License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU Affero General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*
|
|
||||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
|
||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
global $G_TMP_MENU;
|
|
||||||
global $canCreateApp;
|
|
||||||
|
|
||||||
$G_TMP_MENU->AddOption( G::LoadMenuXml ('ID_NEW_APPLICATION'), "rbac/appNew.html" );
|
|
||||||
|
|
||||||
if ( $canCreateApp != 1 )
|
|
||||||
$G_TMP_MENU->DisableOptionPos (0);
|
|
||||||
|
|
||||||
?>
|
|
||||||
@@ -1,33 +0,0 @@
|
|||||||
<?php
|
|
||||||
/**
|
|
||||||
* rbac.authSource.php
|
|
||||||
*
|
|
||||||
* ProcessMaker Open Source Edition
|
|
||||||
* Copyright (C) 2004 - 2008 Colosa Inc.23
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU Affero General Public License as
|
|
||||||
* published by the Free Software Foundation, either version 3 of the
|
|
||||||
* License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU Affero General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*
|
|
||||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
|
||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
global $G_TMP_MENU;
|
|
||||||
global $canCreateApp;
|
|
||||||
|
|
||||||
$G_TMP_MENU->AddOption( G::LoadMenuXml ('ID_EDIT'), "rbac/authEdit.html" );
|
|
||||||
$G_TMP_MENU->AddOption( G::LoadMenuXml ('ID_TEST'), "rbac/authTest.html" );
|
|
||||||
$G_TMP_MENU->AddOption( G::LoadMenuXml ('ID_ADD_USERS'), "rbac/authAddUser.html" );
|
|
||||||
|
|
||||||
?>
|
|
||||||
@@ -1,33 +0,0 @@
|
|||||||
<?php
|
|
||||||
/**
|
|
||||||
* rbac.authentication.php
|
|
||||||
*
|
|
||||||
* ProcessMaker Open Source Edition
|
|
||||||
* Copyright (C) 2004 - 2008 Colosa Inc.23
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU Affero General Public License as
|
|
||||||
* published by the Free Software Foundation, either version 3 of the
|
|
||||||
* License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU Affero General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*
|
|
||||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
|
||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
global $G_TMP_MENU;
|
|
||||||
global $canCreateApp;
|
|
||||||
|
|
||||||
$G_TMP_MENU->AddOption( G::LoadMenuXml ('ID_NEW_AUTH_SOURCE'), "rbac/authNew.html" );
|
|
||||||
|
|
||||||
if ( $canCreateApp != 1 )
|
|
||||||
$G_TMP_MENU->DisableOptionPos (0);
|
|
||||||
?>
|
|
||||||
@@ -1,54 +0,0 @@
|
|||||||
<?php
|
|
||||||
/**
|
|
||||||
* rbac.login.php
|
|
||||||
*
|
|
||||||
* ProcessMaker Open Source Edition
|
|
||||||
* Copyright (C) 2004 - 2008 Colosa Inc.23
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU Affero General Public License as
|
|
||||||
* published by the Free Software Foundation, either version 3 of the
|
|
||||||
* License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU Affero General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*
|
|
||||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
|
||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
global $G_TMP_MENU;
|
|
||||||
|
|
||||||
$G_TMP_MENU->AddRawOption( "login/login.html" );
|
|
||||||
$G_TMP_MENU->AddRawOption( "login/dbInfo.html" );
|
|
||||||
|
|
||||||
|
|
||||||
switch( SYS_LANG )
|
|
||||||
{
|
|
||||||
case 'po':
|
|
||||||
$G_TMP_MENU->Labels = array(
|
|
||||||
"login",
|
|
||||||
"about"
|
|
||||||
);
|
|
||||||
break;
|
|
||||||
case 'es':
|
|
||||||
$G_TMP_MENU->Labels = array(
|
|
||||||
"Iniciar Sesión",
|
|
||||||
"acerca de"
|
|
||||||
);
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
$G_TMP_MENU->Labels = array(
|
|
||||||
"login",
|
|
||||||
"about"
|
|
||||||
);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
?>
|
|
||||||
@@ -1,48 +0,0 @@
|
|||||||
<?php
|
|
||||||
/**
|
|
||||||
* rbac.permission.php
|
|
||||||
*
|
|
||||||
* ProcessMaker Open Source Edition
|
|
||||||
* Copyright (C) 2004 - 2008 Colosa Inc.23
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU Affero General Public License as
|
|
||||||
* published by the Free Software Foundation, either version 3 of the
|
|
||||||
* License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU Affero General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*
|
|
||||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
|
||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
global $G_TMP_MENU;
|
|
||||||
|
|
||||||
$G_TMP_MENU->AddRawOption( "rbac/permNew.html" );
|
|
||||||
|
|
||||||
switch( SYS_LANG )
|
|
||||||
{
|
|
||||||
case 'es':
|
|
||||||
$G_TMP_MENU->Labels = array(
|
|
||||||
"Añadir Nuevo Permiso"
|
|
||||||
);
|
|
||||||
break;
|
|
||||||
case 'po':
|
|
||||||
$G_TMP_MENU->Labels = array(
|
|
||||||
"Inserir Novo Permisio"
|
|
||||||
);
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
$G_TMP_MENU->Labels = array(
|
|
||||||
"Add New Permission"
|
|
||||||
);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
@@ -1,66 +0,0 @@
|
|||||||
<?php
|
|
||||||
/**
|
|
||||||
* rbac.php
|
|
||||||
*
|
|
||||||
* ProcessMaker Open Source Edition
|
|
||||||
* Copyright (C) 2004 - 2008 Colosa Inc.23
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU Affero General Public License as
|
|
||||||
* published by the Free Software Foundation, either version 3 of the
|
|
||||||
* License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU Affero General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*
|
|
||||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
|
||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
global $G_TMP_MENU;
|
|
||||||
|
|
||||||
$G_TMP_MENU->AddRawOption( "rbac/userList.html" );
|
|
||||||
$G_TMP_MENU->AddRawOption( "rbac/appList.html" );
|
|
||||||
$G_TMP_MENU->AddRawOption( "rbac/authenticationList.html" );
|
|
||||||
$G_TMP_MENU->AddRawOption( "rbac/dbInfo.html" );
|
|
||||||
$G_TMP_MENU->AddRawOption( "login/login.html" );
|
|
||||||
|
|
||||||
|
|
||||||
switch( SYS_LANG )
|
|
||||||
{
|
|
||||||
case 'po':
|
|
||||||
$G_TMP_MENU->Labels = array(
|
|
||||||
"Usuarios",
|
|
||||||
"Applicaciones",
|
|
||||||
"Authentication Sources",
|
|
||||||
"Info Database",
|
|
||||||
"Saír do Sistema"
|
|
||||||
);
|
|
||||||
break;
|
|
||||||
case 'es':
|
|
||||||
$G_TMP_MENU->Labels = array(
|
|
||||||
"Usuarios",
|
|
||||||
"Applicaciones",
|
|
||||||
"Fuentes de Autenticación",
|
|
||||||
"Información de BD",
|
|
||||||
"Salir del Sistema"
|
|
||||||
);
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
$G_TMP_MENU->Labels = array(
|
|
||||||
"Users",
|
|
||||||
"Applications",
|
|
||||||
"Authentication Sources",
|
|
||||||
"DB Info",
|
|
||||||
"Logout"
|
|
||||||
);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
?>
|
|
||||||
@@ -1,65 +0,0 @@
|
|||||||
<?php
|
|
||||||
/**
|
|
||||||
* rbac.role.php
|
|
||||||
*
|
|
||||||
* ProcessMaker Open Source Edition
|
|
||||||
* Copyright (C) 2004 - 2008 Colosa Inc.23
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU Affero General Public License as
|
|
||||||
* published by the Free Software Foundation, either version 3 of the
|
|
||||||
* License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU Affero General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*
|
|
||||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
|
||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
global $G_TMP_MENU;
|
|
||||||
|
|
||||||
$G_TMP_MENU->AddIdRawOption( "OP1", "rbac/roleNew.html" );
|
|
||||||
$G_TMP_MENU->AddIdRawOption( "OP2", "rbac/roleList.html" );
|
|
||||||
$G_TMP_MENU->AddIdRawOption( "OP3", "rbac/permList.html" );
|
|
||||||
$G_TMP_MENU->AddIdRawOption( "OP4", "rbac/appList.html" );
|
|
||||||
|
|
||||||
switch( SYS_LANG )
|
|
||||||
{
|
|
||||||
case 'es':
|
|
||||||
$G_TMP_MENU->Labels = array(
|
|
||||||
"Añadir Nuevo Rol",
|
|
||||||
"Ver Roles",
|
|
||||||
"Ver Permisos",
|
|
||||||
"Lista de Aplicaciones"
|
|
||||||
);
|
|
||||||
break;
|
|
||||||
case 'po':
|
|
||||||
$G_TMP_MENU->Labels = array(
|
|
||||||
"Inserir Novo Rol",
|
|
||||||
"Ver Roles",
|
|
||||||
"Ver Permisos",
|
|
||||||
"Lista de Aplicaciones"
|
|
||||||
);
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
$G_TMP_MENU->Labels = array(
|
|
||||||
"Add New Role",
|
|
||||||
"View Roles",
|
|
||||||
"View Permissions",
|
|
||||||
"Applications List"
|
|
||||||
);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
global $canCreateRole;
|
|
||||||
if ($canCreateRole != 1)
|
|
||||||
$G_TMP_MENU->DisableOptionID ("OP1");
|
|
||||||
|
|
||||||
?>
|
|
||||||
@@ -1,52 +0,0 @@
|
|||||||
<?php
|
|
||||||
/**
|
|
||||||
* rbac.user.php
|
|
||||||
*
|
|
||||||
* ProcessMaker Open Source Edition
|
|
||||||
* Copyright (C) 2004 - 2008 Colosa Inc.23
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU Affero General Public License as
|
|
||||||
* published by the Free Software Foundation, either version 3 of the
|
|
||||||
* License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU Affero General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*
|
|
||||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
|
||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
global $G_TMP_MENU;
|
|
||||||
global $canCreateUsers;
|
|
||||||
|
|
||||||
$G_TMP_MENU->AddRawOption( "rbac/userNew.html" );
|
|
||||||
|
|
||||||
switch( SYS_LANG )
|
|
||||||
{
|
|
||||||
case 'es':
|
|
||||||
$G_TMP_MENU->Labels = array(
|
|
||||||
"Añadir Nuevo Usuario"
|
|
||||||
);
|
|
||||||
break;
|
|
||||||
case 'po':
|
|
||||||
$G_TMP_MENU->Labels = array(
|
|
||||||
"Inserir Novo Usuario"
|
|
||||||
);
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
$G_TMP_MENU->Labels = array(
|
|
||||||
"Add New User"
|
|
||||||
);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($canCreateUsers != 1 )
|
|
||||||
$G_TMP_MENU->DisableOptionPos(0);
|
|
||||||
?>
|
|
||||||
@@ -1,69 +0,0 @@
|
|||||||
<?php
|
|
||||||
/**
|
|
||||||
* rbac.userEdit.php
|
|
||||||
*
|
|
||||||
* ProcessMaker Open Source Edition
|
|
||||||
* Copyright (C) 2004 - 2008 Colosa Inc.23
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU Affero General Public License as
|
|
||||||
* published by the Free Software Foundation, either version 3 of the
|
|
||||||
* License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU Affero General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*
|
|
||||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
|
||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
global $G_TMP_MENU;
|
|
||||||
|
|
||||||
$G_TMP_MENU->AddIdRawOption("OP2b", "rbac/userChangeLdap.html" );
|
|
||||||
$G_TMP_MENU->AddIdRawOption("OP2c", "rbac/userTestLdap.html" );
|
|
||||||
$G_TMP_MENU->AddIdRawOption("OP4", "Javascript:go();", 'absolute' );
|
|
||||||
|
|
||||||
switch( SYS_LANG )
|
|
||||||
{
|
|
||||||
case 'es':
|
|
||||||
$G_TMP_MENU->Labels = array(
|
|
||||||
"LDAP/AD",
|
|
||||||
'Test Login',
|
|
||||||
"Asignar Roles"
|
|
||||||
);
|
|
||||||
break;
|
|
||||||
case 'po':
|
|
||||||
$G_TMP_MENU->Labels = array(
|
|
||||||
"LDAP/AD",
|
|
||||||
'Test Login',
|
|
||||||
"Asignar Roles"
|
|
||||||
);
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
$G_TMP_MENU->Labels = array(
|
|
||||||
"LDAP/AD",
|
|
||||||
'Test Login',
|
|
||||||
"Assign Role"
|
|
||||||
);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
global $access;
|
|
||||||
global $useLdap;
|
|
||||||
|
|
||||||
if ($access != 1) {
|
|
||||||
$G_TMP_MENU->DisableOptionId ("OP4");
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( ! $useLdap ) {
|
|
||||||
$G_TMP_MENU->DisableOptionId ("OP2b");
|
|
||||||
$G_TMP_MENU->DisableOptionId ("OP2c");
|
|
||||||
}
|
|
||||||
|
|
||||||
?>
|
|
||||||
@@ -1,85 +0,0 @@
|
|||||||
<?php
|
|
||||||
/**
|
|
||||||
* rbac.userView.php
|
|
||||||
*
|
|
||||||
* ProcessMaker Open Source Edition
|
|
||||||
* Copyright (C) 2004 - 2008 Colosa Inc.23
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU Affero General Public License as
|
|
||||||
* published by the Free Software Foundation, either version 3 of the
|
|
||||||
* License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU Affero General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*
|
|
||||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
|
||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
global $G_TMP_MENU;
|
|
||||||
|
|
||||||
$G_TMP_MENU->AddIdRawOption("OP1", "rbac/userEdit.html" );
|
|
||||||
$G_TMP_MENU->AddIdRawOption("OP2", "rbac/userChangePwd.html" );
|
|
||||||
$G_TMP_MENU->AddIdRawOption("OP2b", "rbac/userChangeLdap.html" );
|
|
||||||
$G_TMP_MENU->AddIdRawOption("OP2c", "rbac/userTestLdap.html" );
|
|
||||||
$G_TMP_MENU->AddIdRawOption("OP3", "rbac/userViewRole.html" );
|
|
||||||
$G_TMP_MENU->AddIdRawOption("OP4", "rbac/userAssignRole.html" );
|
|
||||||
|
|
||||||
switch( SYS_LANG )
|
|
||||||
{
|
|
||||||
case 'es':
|
|
||||||
$G_TMP_MENU->Labels = array(
|
|
||||||
"Editar Usuario",
|
|
||||||
"Reiniciar Password",
|
|
||||||
"LDAP/AD",
|
|
||||||
'Test Login',
|
|
||||||
"Ver Roles",
|
|
||||||
"Asignar Roles"
|
|
||||||
);
|
|
||||||
break;
|
|
||||||
case 'po':
|
|
||||||
$G_TMP_MENU->Labels = array(
|
|
||||||
"Editar Usuario",
|
|
||||||
"Reiniciar Password",
|
|
||||||
"LDAP/AD",
|
|
||||||
'Test Login',
|
|
||||||
"Ver Roles",
|
|
||||||
"Asignar Roles"
|
|
||||||
);
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
$G_TMP_MENU->Labels = array(
|
|
||||||
"Edit User",
|
|
||||||
"Reset Password",
|
|
||||||
"LDAP/AD",
|
|
||||||
'Test Login',
|
|
||||||
"View Roles",
|
|
||||||
"Assign Role"
|
|
||||||
);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
global $access;
|
|
||||||
global $useLdap;
|
|
||||||
|
|
||||||
if ($access != 1) {
|
|
||||||
$G_TMP_MENU->DisableOptionId ("OP1");
|
|
||||||
$G_TMP_MENU->DisableOptionId ("OP2");
|
|
||||||
$G_TMP_MENU->DisableOptionId ("OP4");
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( $useLdap )
|
|
||||||
$G_TMP_MENU->DisableOptionId ("OP2");
|
|
||||||
else {
|
|
||||||
$G_TMP_MENU->DisableOptionId ("OP2b");
|
|
||||||
$G_TMP_MENU->DisableOptionId ("OP2c");
|
|
||||||
}
|
|
||||||
|
|
||||||
?>
|
|
||||||
@@ -1,38 +0,0 @@
|
|||||||
demo de buscador<br>
|
|
||||||
/**
|
|
||||||
* buscador2.php
|
|
||||||
*
|
|
||||||
* ProcessMaker Open Source Edition
|
|
||||||
* Copyright (C) 2004 - 2008 Colosa Inc.23
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU Affero General Public License as
|
|
||||||
* published by the Free Software Foundation, either version 3 of the
|
|
||||||
* License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU Affero General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*
|
|
||||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
|
||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
<?php
|
|
||||||
$frm = $HTTP_POST_VARS;
|
|
||||||
|
|
||||||
$dbc = new dbconnection();
|
|
||||||
$ses = new DBSession($dbc);
|
|
||||||
$sql = "update tickets set tipo = ' " . $frm['tipo'] ."', resultado = ' " . $frm['curso'] . "' where ticket = '" . $frm['ticket'] ."' ";
|
|
||||||
$ses->Execute ( $sql );
|
|
||||||
?>
|
|
||||||
<script language = "JavaScript">
|
|
||||||
window.close();
|
|
||||||
|
|
||||||
</script>
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1,162 +0,0 @@
|
|||||||
// Title: Tigra Calendar
|
|
||||||
// URL: http://www.softcomplex.com/products/tigra_calendar/
|
|
||||||
// Version: 3.2 (European date format)
|
|
||||||
// Date: 10/14/2002 (mm/dd/yyyy)
|
|
||||||
// Feedback: feedback@softcomplex.com (specify product title in the subject)
|
|
||||||
// Note: Permission given to use this script in ANY kind of applications if
|
|
||||||
// header lines are left unchanged.
|
|
||||||
// Note: Script consists of two files: calendar?.js and calendar.html
|
|
||||||
// About us: Our company provides offshore IT consulting services.
|
|
||||||
// Contact us at sales@softcomplex.com if you have any programming task you
|
|
||||||
// want to be handled by professionals. Our typical hourly rate is $20.
|
|
||||||
|
|
||||||
// if two digit year input dates after this year considered 20 century.
|
|
||||||
var NUM_CENTYEAR = 30;
|
|
||||||
// is time input control required by default
|
|
||||||
var BUL_TIMECOMPONENT = false;
|
|
||||||
// are year scrolling buttons required by default
|
|
||||||
var BUL_YEARSCROLL = true;
|
|
||||||
|
|
||||||
var calendars = [];
|
|
||||||
var RE_NUM = /^\-?\d+$/;
|
|
||||||
|
|
||||||
function calendar1(obj_target) {
|
|
||||||
|
|
||||||
// assing methods
|
|
||||||
this.gen_date = cal_gen_date1;
|
|
||||||
this.gen_time = cal_gen_time1;
|
|
||||||
this.gen_tsmp = cal_gen_tsmp1;
|
|
||||||
this.prs_date = cal_prs_date1;
|
|
||||||
this.prs_time = cal_prs_time1;
|
|
||||||
this.prs_tsmp = cal_prs_tsmp1;
|
|
||||||
this.popup = cal_popup1;
|
|
||||||
this.fecha = "0";
|
|
||||||
|
|
||||||
// validate input parameters
|
|
||||||
if (!obj_target)
|
|
||||||
return cal_error("Error calling the calendar: no target control specified");
|
|
||||||
if (obj_target.value == null)
|
|
||||||
return cal_error("Error calling the calendar: parameter specified is not valid tardet control");
|
|
||||||
this.target = obj_target;
|
|
||||||
this.time_comp = BUL_TIMECOMPONENT;
|
|
||||||
this.year_scroll = BUL_YEARSCROLL;
|
|
||||||
|
|
||||||
// register in global collections
|
|
||||||
this.id = calendars.length;
|
|
||||||
calendars[this.id] = this;
|
|
||||||
}
|
|
||||||
|
|
||||||
function cal_popup1 (str_datetime) {
|
|
||||||
this.dt_current = this.prs_tsmp(str_datetime ? str_datetime : this.target.value);
|
|
||||||
if (!this.dt_current) return;
|
|
||||||
|
|
||||||
var obj_calwindow = window.open(
|
|
||||||
'calendar.html?datetime=' + this.dt_current.valueOf()+ '&id=' + this.id,
|
|
||||||
'Calendar', 'width=200,height='+(this.time_comp ? 215 : 190)+
|
|
||||||
',status=no,resizable=no,top=200,left=200,dependent=yes,alwaysRaised=yes'
|
|
||||||
);
|
|
||||||
obj_calwindow.opener = window;
|
|
||||||
obj_calwindow.focus();
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
// timestamp generating function
|
|
||||||
function cal_gen_tsmp1 (dt_datetime) {
|
|
||||||
return(this.gen_date(dt_datetime) + ' ' + this.gen_time(dt_datetime));
|
|
||||||
}
|
|
||||||
|
|
||||||
// date generating function
|
|
||||||
function cal_gen_date1 (dt_datetime) {
|
|
||||||
return (
|
|
||||||
(dt_datetime.getDate() < 10 ? '0' : '') + dt_datetime.getDate() + "-"
|
|
||||||
+ (dt_datetime.getMonth() < 9 ? '0' : '') + (dt_datetime.getMonth() + 1) + "-"
|
|
||||||
+ dt_datetime.getFullYear()
|
|
||||||
);
|
|
||||||
}
|
|
||||||
// time generating function
|
|
||||||
function cal_gen_time1 (dt_datetime) {
|
|
||||||
return (
|
|
||||||
(dt_datetime.getHours() < 10 ? '0' : '') + dt_datetime.getHours() + ":"
|
|
||||||
+ (dt_datetime.getMinutes() < 10 ? '0' : '') + (dt_datetime.getMinutes()) + ":"
|
|
||||||
+ (dt_datetime.getSeconds() < 10 ? '0' : '') + (dt_datetime.getSeconds())
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
// timestamp parsing function
|
|
||||||
function cal_prs_tsmp1 (str_datetime) {
|
|
||||||
// if no parameter specified return current timestamp
|
|
||||||
if (!str_datetime)
|
|
||||||
return (new Date());
|
|
||||||
|
|
||||||
// if positive integer treat as milliseconds from epoch
|
|
||||||
if (RE_NUM.exec(str_datetime))
|
|
||||||
return new Date(str_datetime);
|
|
||||||
|
|
||||||
// else treat as date in string format
|
|
||||||
var arr_datetime = str_datetime.split(' ');
|
|
||||||
return this.prs_time(arr_datetime[1], this.prs_date(arr_datetime[0]));
|
|
||||||
}
|
|
||||||
|
|
||||||
// date parsing function
|
|
||||||
function cal_prs_date1 (str_date) {
|
|
||||||
|
|
||||||
var arr_date = str_date.split('-');
|
|
||||||
|
|
||||||
if (arr_date.length != 3) return cal_error ("Invalid date format: '" + str_date + "'.\nFormat accepted is dd-mm-yyyy.");
|
|
||||||
if (!arr_date[0]) return cal_error ("Invalid date format: '" + str_date + "'.\nNo day of month value can be found.");
|
|
||||||
if (!RE_NUM.exec(arr_date[0])) return cal_error ("Invalid day of month value: '" + arr_date[0] + "'.\nAllowed values are unsigned integers.");
|
|
||||||
if (!arr_date[1]) return cal_error ("Invalid date format: '" + str_date + "'.\nNo month value can be found.");
|
|
||||||
if (!RE_NUM.exec(arr_date[1])) return cal_error ("Invalid month value: '" + arr_date[1] + "'.\nAllowed values are unsigned integers.");
|
|
||||||
if (!arr_date[2]) return cal_error ("Invalid date format: '" + str_date + "'.\nNo year value can be found.");
|
|
||||||
if (!RE_NUM.exec(arr_date[2])) return cal_error ("Invalid year value: '" + arr_date[2] + "'.\nAllowed values are unsigned integers.");
|
|
||||||
|
|
||||||
var dt_date = new Date();
|
|
||||||
dt_date.setDate(1);
|
|
||||||
|
|
||||||
if (arr_date[1] < 1 || arr_date[1] > 12) return cal_error ("Invalid month value: '" + arr_date[1] + "'.\nAllowed range is 01-12.");
|
|
||||||
dt_date.setMonth(arr_date[1]-1);
|
|
||||||
|
|
||||||
if (arr_date[2] < 100) arr_date[2] = Number(arr_date[2]) + (arr_date[2] < NUM_CENTYEAR ? 2000 : 1900);
|
|
||||||
dt_date.setFullYear(arr_date[2]);
|
|
||||||
|
|
||||||
var dt_numdays = new Date(arr_date[2], arr_date[1], 0);
|
|
||||||
dt_date.setDate(arr_date[0]);
|
|
||||||
if (dt_date.getMonth() != (arr_date[1]-1)) return cal_error ("Invalid day of month value: '" + arr_date[0] + "'.\nAllowed range is 01-"+dt_numdays.getDate()+".");
|
|
||||||
|
|
||||||
return (dt_date)
|
|
||||||
}
|
|
||||||
|
|
||||||
// time parsing function
|
|
||||||
function cal_prs_time1 (str_time, dt_date) {
|
|
||||||
|
|
||||||
if (!dt_date) return null;
|
|
||||||
var arr_time = String(str_time ? str_time : '').split(':');
|
|
||||||
|
|
||||||
if (!arr_time[0]) dt_date.setHours(0);
|
|
||||||
else if (RE_NUM.exec(arr_time[0]))
|
|
||||||
if (arr_time[0] < 24) dt_date.setHours(arr_time[0]);
|
|
||||||
else return cal_error ("Invalid hours value: '" + arr_time[0] + "'.\nAllowed range is 00-23.");
|
|
||||||
else return cal_error ("Invalid hours value: '" + arr_time[0] + "'.\nAllowed values are unsigned integers.");
|
|
||||||
|
|
||||||
if (!arr_time[1]) dt_date.setMinutes(0);
|
|
||||||
else if (RE_NUM.exec(arr_time[1]))
|
|
||||||
if (arr_time[1] < 60) dt_date.setMinutes(arr_time[1]);
|
|
||||||
else return cal_error ("Invalid minutes value: '" + arr_time[1] + "'.\nAllowed range is 00-59.");
|
|
||||||
else return cal_error ("Invalid minutes value: '" + arr_time[1] + "'.\nAllowed values are unsigned integers.");
|
|
||||||
|
|
||||||
if (!arr_time[2]) dt_date.setSeconds(0);
|
|
||||||
else if (RE_NUM.exec(arr_time[2]))
|
|
||||||
if (arr_time[2] < 60) dt_date.setSeconds(arr_time[2]);
|
|
||||||
else return cal_error ("Invalid seconds value: '" + arr_time[2] + "'.\nAllowed range is 00-59.");
|
|
||||||
else return cal_error ("Invalid seconds value: '" + arr_time[2] + "'.\nAllowed values are unsigned integers.");
|
|
||||||
|
|
||||||
dt_date.setMilliseconds(0);
|
|
||||||
return dt_date;
|
|
||||||
}
|
|
||||||
|
|
||||||
function cal_error (str_message) {
|
|
||||||
alert (str_message);
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
@@ -1,183 +0,0 @@
|
|||||||
<!--
|
|
||||||
/**
|
|
||||||
* calendar.php
|
|
||||||
*
|
|
||||||
* ProcessMaker Open Source Edition
|
|
||||||
* Copyright (C) 2004 - 2008 Colosa Inc.23
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU Affero General Public License as
|
|
||||||
* published by the Free Software Foundation, either version 3 of the
|
|
||||||
* License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU Affero General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*
|
|
||||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
|
||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
Title: Tigra Calendar
|
|
||||||
URL: http://www.softcomplex.com/products/tigra_calendar/
|
|
||||||
Version: 3.2
|
|
||||||
Date: 10/14/2002 (mm/dd/yyyy)
|
|
||||||
Feedback: feedback@softcomplex.com (specify product title in the subject)
|
|
||||||
Note: Permission given to use this script in ANY kind of applications if
|
|
||||||
header lines are left unchanged.
|
|
||||||
Note: Script consists of two files: calendar?.js and calendar.html
|
|
||||||
About us: Our company provides offshore IT consulting services.
|
|
||||||
Contact us at sales@softcomplex.com if you have any programming task you
|
|
||||||
want to be handled by professionals. Our typical hourly rate is $20.
|
|
||||||
-->
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<title>Select Date, Please.</title>
|
|
||||||
<style>
|
|
||||||
td {font-family: Tahoma, Verdana, sans-serif; font-size: 12px;}
|
|
||||||
</style>
|
|
||||||
<script language="JavaScript">
|
|
||||||
|
|
||||||
// months as they appear in the calendar's title
|
|
||||||
var ARR_MONTHS = ["January", "February", "March", "April", "May", "June",
|
|
||||||
"July", "August", "September", "October", "November", "December"];
|
|
||||||
// week day titles as they appear on the calendar
|
|
||||||
var ARR_WEEKDAYS = ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"];
|
|
||||||
// day week starts from (normally 0-Su or 1-Mo)
|
|
||||||
var NUM_WEEKSTART = 1;
|
|
||||||
// path to the directory where calendar images are stored. trailing slash req.
|
|
||||||
var STR_ICONPATH = '/images/calendar/';
|
|
||||||
|
|
||||||
var re_url = new RegExp('datetime=(\\-?\\d+)');
|
|
||||||
var dt_current = (re_url.exec(String(window.location))
|
|
||||||
? new Date(new Number(RegExp.$1)) : new Date());
|
|
||||||
var re_id = new RegExp('id=(\\d+)');
|
|
||||||
var num_id = (re_id.exec(String(window.location))
|
|
||||||
? new Number(RegExp.$1) : 0);
|
|
||||||
var obj_caller = (window.opener ? window.opener.calendars[num_id] : null);
|
|
||||||
|
|
||||||
if (obj_caller && obj_caller.year_scroll) {
|
|
||||||
// get same date in the previous year
|
|
||||||
var dt_prev_year = new Date(dt_current);
|
|
||||||
dt_prev_year.setFullYear(dt_prev_year.getFullYear() - 1);
|
|
||||||
if (dt_prev_year.getDate() != dt_current.getDate())
|
|
||||||
dt_prev_year.setDate(0);
|
|
||||||
|
|
||||||
// get same date in the next year
|
|
||||||
var dt_next_year = new Date(dt_current);
|
|
||||||
dt_next_year.setFullYear(dt_next_year.getFullYear() + 1);
|
|
||||||
if (dt_next_year.getDate() != dt_current.getDate())
|
|
||||||
dt_next_year.setDate(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
// get same date in the previous month
|
|
||||||
var dt_prev_month = new Date(dt_current);
|
|
||||||
dt_prev_month.setMonth(dt_prev_month.getMonth() - 1);
|
|
||||||
if (dt_prev_month.getDate() != dt_current.getDate())
|
|
||||||
dt_prev_month.setDate(0);
|
|
||||||
|
|
||||||
// get same date in the next month
|
|
||||||
var dt_next_month = new Date(dt_current);
|
|
||||||
dt_next_month.setMonth(dt_next_month.getMonth() + 1);
|
|
||||||
if (dt_next_month.getDate() != dt_current.getDate())
|
|
||||||
dt_next_month.setDate(0);
|
|
||||||
|
|
||||||
// get first day to display in the grid for current month
|
|
||||||
var dt_firstday = new Date(dt_current);
|
|
||||||
dt_firstday.setDate(1);
|
|
||||||
dt_firstday.setDate(1 - (7 + dt_firstday.getDay() - NUM_WEEKSTART) % 7);
|
|
||||||
|
|
||||||
// function passing selected date to calling window
|
|
||||||
function set_datetime(n_datetime, b_close) {
|
|
||||||
if (!obj_caller) return;
|
|
||||||
|
|
||||||
var dt_datetime = obj_caller.prs_time(
|
|
||||||
(document.cal ? document.cal.time.value : ''),
|
|
||||||
new Date(n_datetime)
|
|
||||||
);
|
|
||||||
|
|
||||||
if (!dt_datetime) return;
|
|
||||||
if (b_close) {
|
|
||||||
window.close();
|
|
||||||
obj_caller.fecha = (document.cal
|
|
||||||
? obj_caller.gen_tsmp(dt_datetime)
|
|
||||||
: obj_caller.gen_date(dt_datetime)
|
|
||||||
);
|
|
||||||
var arr_date = obj_caller.fecha.split('-');
|
|
||||||
obj_caller.date1.value = arr_date[0];
|
|
||||||
obj_caller.date2.value = arr_date[1];
|
|
||||||
obj_caller.date3.value = arr_date[2];
|
|
||||||
}
|
|
||||||
else obj_caller.popup(dt_datetime.valueOf());
|
|
||||||
}
|
|
||||||
|
|
||||||
</script>
|
|
||||||
</head>
|
|
||||||
<body bgcolor="#FFFFFF" marginheight="5" marginwidth="5" topmargin="5" leftmargin="5" rightmargin="5">
|
|
||||||
<table class="clsOTable" cellspacing="0" border="0" width="100%">
|
|
||||||
<tr><td bgcolor="#4682B4">
|
|
||||||
<table cellspacing="1" cellpadding="3" border="0" width="100%">
|
|
||||||
<tr><td colspan="7"><table cellspacing="0" cellpadding="0" border="0" width="100%">
|
|
||||||
<tr>
|
|
||||||
<script language="JavaScript">
|
|
||||||
document.write(
|
|
||||||
'<td>'+(obj_caller&&obj_caller.year_scroll?'<a href="javascript:set_datetime('+dt_prev_year.valueOf()+')"><img src="'+STR_ICONPATH+'prev_year.gif" width="16" height="16" border="0" alt="previous year"></a> ':'')+'<a href="javascript:set_datetime('+dt_prev_month.valueOf()+')"><img src="'+STR_ICONPATH+'prev.gif" width="16" height="16" border="0" alt="previous month"></a></td>'+
|
|
||||||
'<td align="center" width="100%"><font color="#ffffff">'+ARR_MONTHS[dt_current.getMonth()]+' '+dt_current.getFullYear() + '</font></td>'+
|
|
||||||
'<td><a href="javascript:set_datetime('+dt_next_month.valueOf()+')"><img src="'+STR_ICONPATH+'next.gif" width="16" height="16" border="0" alt="next month"></a>'+(obj_caller && obj_caller.year_scroll?' <a href="javascript:set_datetime('+dt_next_year.valueOf()+')"><img src="'+STR_ICONPATH+'next_year.gif" width="16" height="16" border="0" alt="next year"></a>':'')+'</td>'
|
|
||||||
);
|
|
||||||
</script>
|
|
||||||
</tr>
|
|
||||||
</table></td></tr>
|
|
||||||
<tr>
|
|
||||||
<script language="JavaScript">
|
|
||||||
|
|
||||||
// print weekdays titles
|
|
||||||
for (var n=0; n<7; n++)
|
|
||||||
document.write('<td bgcolor="#87cefa" align="center"><font color="#ffffff">'+ARR_WEEKDAYS[(NUM_WEEKSTART+n)%7]+'</font></td>');
|
|
||||||
document.write('</tr>');
|
|
||||||
|
|
||||||
// print calendar table
|
|
||||||
var dt_current_day = new Date(dt_firstday);
|
|
||||||
while (dt_current_day.getMonth() == dt_current.getMonth() ||
|
|
||||||
dt_current_day.getMonth() == dt_firstday.getMonth()) {
|
|
||||||
// print row heder
|
|
||||||
document.write('<tr>');
|
|
||||||
for (var n_current_wday=0; n_current_wday<7; n_current_wday++) {
|
|
||||||
if (dt_current_day.getDate() == dt_current.getDate() &&
|
|
||||||
dt_current_day.getMonth() == dt_current.getMonth())
|
|
||||||
// print current date
|
|
||||||
document.write('<td bgcolor="#ffb6c1" align="center" width="14%">');
|
|
||||||
else if (dt_current_day.getDay() == 0 || dt_current_day.getDay() == 6)
|
|
||||||
// weekend days
|
|
||||||
document.write('<td bgcolor="#dbeaf5" align="center" width="14%">');
|
|
||||||
else
|
|
||||||
// print working days of current month
|
|
||||||
document.write('<td bgcolor="#ffffff" align="center" width="14%">');
|
|
||||||
|
|
||||||
document.write('<a href="javascript:set_datetime('+dt_current_day.valueOf() +', true);">');
|
|
||||||
|
|
||||||
if (dt_current_day.getMonth() == this.dt_current.getMonth())
|
|
||||||
// print days of current month
|
|
||||||
document.write('<font color="#000000">');
|
|
||||||
else
|
|
||||||
// print days of other months
|
|
||||||
document.write('<font color="#606060">');
|
|
||||||
|
|
||||||
document.write(dt_current_day.getDate()+'</font></a></td>');
|
|
||||||
dt_current_day.setDate(dt_current_day.getDate()+1);
|
|
||||||
}
|
|
||||||
// print row footer
|
|
||||||
document.write('</tr>');
|
|
||||||
}
|
|
||||||
if (obj_caller && obj_caller.time_comp)
|
|
||||||
document.write('<form onsubmit="javascript:set_datetime('+dt_current.valueOf()+', true)" name="cal"><tr><td colspan="7" bgcolor="#87CEFA"><font color="White" face="tahoma, verdana" size="2">Time: <input type="text" name="time" value="'+obj_caller.gen_time(this.dt_current)+'" size="8" maxlength="8"></font></td></tr></form>');
|
|
||||||
</script>
|
|
||||||
</table></tr></td>
|
|
||||||
</table>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
|
|
||||||
|
Before Width: | Height: | Size: 127 B |
|
Before Width: | Height: | Size: 660 B |
|
Before Width: | Height: | Size: 214 B |
|
Before Width: | Height: | Size: 256 B |
|
Before Width: | Height: | Size: 67 B |
|
Before Width: | Height: | Size: 212 B |
|
Before Width: | Height: | Size: 259 B |
|
Before Width: | Height: | Size: 8.1 KiB |
@@ -1,89 +0,0 @@
|
|||||||
<?php
|
|
||||||
/**
|
|
||||||
* dbInfo.php
|
|
||||||
*
|
|
||||||
* ProcessMaker Open Source Edition
|
|
||||||
* Copyright (C) 2004 - 2008 Colosa Inc.23
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU Affero General Public License as
|
|
||||||
* published by the Free Software Foundation, either version 3 of the
|
|
||||||
* License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU Affero General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*
|
|
||||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
|
||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
function lookup($target)
|
|
||||||
{
|
|
||||||
global $ntarget;
|
|
||||||
$msg = $target . ' => ';
|
|
||||||
//if( eregi('[a-zA-Z]', $target) )
|
|
||||||
if( preg_match('[a-zA-Z]', $target) ) //Made compatible to PHP 5.3
|
|
||||||
$ntarget = gethostbyname($target);
|
|
||||||
else
|
|
||||||
$ntarget = gethostbyaddr($target);
|
|
||||||
$msg .= $ntarget;
|
|
||||||
return($msg);
|
|
||||||
}
|
|
||||||
|
|
||||||
$G_MAIN_MENU = 'rbac.login';
|
|
||||||
$G_MENU_SELECTED = 1;
|
|
||||||
|
|
||||||
if (file_exists(PATH_METHODS . 'login/version-rbac.php'))
|
|
||||||
{
|
|
||||||
include('version-rbac.php');
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
define('RBAC_VERSION', 'Development Version');
|
|
||||||
}
|
|
||||||
|
|
||||||
$dbc = new DBConnection(DB_HOST, DB_RBAC_USER, DB_RBAC_PASS, DB_RBAC_NAME );
|
|
||||||
$ses = new DBSession ($dbc);
|
|
||||||
$dset = $ses->execute ('SELECT VERSION() AS VERSION ');
|
|
||||||
$row = $dset->Read();
|
|
||||||
|
|
||||||
if (getenv('HTTP_CLIENT_IP')) {
|
|
||||||
$ip = getenv('HTTP_CLIENT_IP');
|
|
||||||
}
|
|
||||||
elseif(getenv('HTTP_X_FORWARDED_FOR')) {
|
|
||||||
$ip = getenv('HTTP_X_FORWARDED_FOR');
|
|
||||||
} else {
|
|
||||||
$ip = getenv('REMOTE_ADDR');
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( file_exists ( '/etc/redhat-release' ) ) {
|
|
||||||
$fnewsize = filesize( '/etc/redhat-release' );
|
|
||||||
$fp = fopen( '/etc/redhat-release' , 'r' );
|
|
||||||
$redhat = fread( $fp, $fnewsize );
|
|
||||||
fclose( $fp );
|
|
||||||
}
|
|
||||||
|
|
||||||
$Fields = $dbc->db->dsn;
|
|
||||||
$Fields['SYSTEM'] = $redhat;
|
|
||||||
$Fields['MYSQL'] = $row['VERSION'];
|
|
||||||
$Fields['PHP'] = phpversion();
|
|
||||||
$Fields['FLUID'] = RBAC_VERSION;
|
|
||||||
$Fields['IP'] = lookup ($ip);
|
|
||||||
$Fields['ENVIRONMENT'] = SYS_SYS;
|
|
||||||
$Fields['SERVER_SOFTWARE'] = getenv('SERVER_SOFTWARE');
|
|
||||||
$Fields['SERVER_NAME'] = getenv('SERVER_NAME');
|
|
||||||
$Fields['SERVER_PROTOCOL'] = getenv('SERVER_PROTOCOL');
|
|
||||||
$Fields['SERVER_PORT'] = getenv('SERVER_PORT');
|
|
||||||
$Fields['REMOTE_HOST'] = getenv('REMOTE_HOST');
|
|
||||||
$Fields['SERVER_ADDR'] = getenv('SERVER_ADDR');
|
|
||||||
$Fields['HTTP_USER_AGENT'] = getenv('HTTP_USER_AGENT');
|
|
||||||
$Fields['a'] = $dbc;
|
|
||||||
$G_PUBLISH = new Publisher;
|
|
||||||
$G_PUBLISH->SetTo($dbc);
|
|
||||||
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'rbac/dbInfo', '', $Fields, 'appNew2');
|
|
||||||
G::RenderPage( 'publish');
|
|
||||||
?>
|
|
||||||
@@ -1,131 +0,0 @@
|
|||||||
<style>
|
|
||||||
/**
|
|
||||||
* enumerate.php
|
|
||||||
*
|
|
||||||
* ProcessMaker Open Source Edition
|
|
||||||
* Copyright (C) 2004 - 2008 Colosa Inc.23
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU Affero General Public License as
|
|
||||||
* published by the Free Software Foundation, either version 3 of the
|
|
||||||
* License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU Affero General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*
|
|
||||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
|
||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
.formContent {
|
|
||||||
background: #f2f9fd;
|
|
||||||
color : #002c72;
|
|
||||||
font-family: Arial, Helvetica, sans-serif;
|
|
||||||
font-size: 11px;
|
|
||||||
font-weight: normal;
|
|
||||||
border: 1px solid #bee1f6;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
<?php
|
|
||||||
|
|
||||||
$dbc = new DBConnection (DB_HOST, 'root', '', 'mysql' );
|
|
||||||
|
|
||||||
$ses = new DBsession($dbc);
|
|
||||||
$dset = $ses->Execute ( "SHOW DATABASES; " );
|
|
||||||
|
|
||||||
$sites = array ();
|
|
||||||
$row = $dset->Read();
|
|
||||||
while ( is_array ( $row ) ) {
|
|
||||||
$dbname = $row[Database];
|
|
||||||
if ( substr ( $dbname,0,5) == 'rbac_' ) {
|
|
||||||
$sname = substr ( $dbname,5);
|
|
||||||
$sites[$sname]['rbac'] = 'Y';
|
|
||||||
}
|
|
||||||
if ( substr ( $dbname,0,3) == 'wf_' ) {
|
|
||||||
$sname = substr ( $dbname,3);
|
|
||||||
$sites[$sname]['wf'] = 'Y';
|
|
||||||
}
|
|
||||||
if ( substr ( $dbname,0,7) == 'report_' ) {
|
|
||||||
$sname = substr ( $dbname,7);
|
|
||||||
$sites[$sname]['report'] = 'Y';
|
|
||||||
}
|
|
||||||
$row = $dset->Read();
|
|
||||||
}
|
|
||||||
|
|
||||||
$dynaPath = '/home/workflow/engine/xmlform/dynaform/';
|
|
||||||
if ( $handle1 = opendir ( $dynaPath ) ) {
|
|
||||||
while ( false !== ($file1 = readdir($handle1) )) {
|
|
||||||
$dirSize = 0; $dirCant = 0;
|
|
||||||
if ( $file1 != '.' && $file1 != '..' && $handle2 = opendir ( $dynaPath . $file1 ) ) {
|
|
||||||
while ( false !== ($file2 = readdir($handle2) )) {
|
|
||||||
$dynaPath2 = $dynaPath . $file1 . '/' . $file2;
|
|
||||||
if ( is_dir( $dynaPath2) && $file2 != '.' && $file2 != '..' && $handle3 = opendir ( $dynaPath2 ) ) {
|
|
||||||
while ( false !== ($file3 = readdir($handle3) )) {
|
|
||||||
if ( $file3 != '.' && $file3 != '..' ) {
|
|
||||||
$dirSize += filesize ( $dynaPath. $file1.'/'.$file2.'/'.$file3 );
|
|
||||||
$dirCant ++;
|
|
||||||
//print "$file1/$file2/$file3 $dirCant $dirSize <br>";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if ( $file1 != '.' && $file1 != '..' ) {
|
|
||||||
$dirSize = (int)($dirSize / 1024 );
|
|
||||||
$sites[$file1]['dynaCant'] = $dirCant;
|
|
||||||
$sites[$file1]['dynaSize'] = $dirSize;
|
|
||||||
//print "$file1 $dirCant $dirSize Kb. <hr>";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
foreach ( $sites as $key=>$val ) {
|
|
||||||
if ( $val['wf'] == 'Y' && $val['rbac'] == 'Y' ) {
|
|
||||||
print "<table class='formContent' >";
|
|
||||||
print "<tr><td width=300 class='formContent'>$key</td><td class='formContent'> " .
|
|
||||||
($val[wf]=='Y' ? ' wf ' : ' - ') . ($val[rbac]=='Y' ? ' rbac ' : ' - ') . ($val[report]=='Y' ? ' report ' : ' - ') .
|
|
||||||
" </td><td class='formContent' align='center'> cases </td>" .
|
|
||||||
"<td class='formContent'> " . $val[dynaCant] . ' files ' .
|
|
||||||
"</td><td class='formContent'> " . $val[dynaSize] . " Kb. </td></tr>";
|
|
||||||
|
|
||||||
$dbc1 = new DBConnection (DB_HOST, 'root', '', 'wf_' . $key );
|
|
||||||
$ses1 = new DBsession($dbc1);
|
|
||||||
$dset1 = $ses1->Execute ( "SELECT * FROM PROCESS; " );
|
|
||||||
$row1 = $dset1->Read();
|
|
||||||
while ( is_array ( $row1) ) {
|
|
||||||
print "<tr><td>" . $row1[UID] .'. '. $row1[PRO_TITLE] . "</td><td align=center>" . $row1[PRO_STATUS] . "</td>";
|
|
||||||
$ses2 = new DBsession($dbc1);
|
|
||||||
$dset2 = $ses2->Execute ( "SELECT count(*) as CANT FROM APPLICATION where APP_PROCESS = " . $row1[UID] );
|
|
||||||
$row2 = $dset2->Read();
|
|
||||||
print "</td><td align='center'>" . $row2[CANT] . " </td>";
|
|
||||||
|
|
||||||
$dynaPath = '/home/workflow/engine/xmlform/dynaform/' . $key . '/'. $row1[UID] . '/';
|
|
||||||
//print_r ( $dynaPath);
|
|
||||||
$dirSize = 0; $dirCant = 0;
|
|
||||||
if ( is_dir ($dynaPath) && $handle1 = opendir ( $dynaPath ) ) {
|
|
||||||
while ( false !== ($file1 = readdir($handle1) )) {
|
|
||||||
if ( $file1 != '.' && $file1 != '..' ) {
|
|
||||||
$dirSize += (int) ( filesize ( $dynaPath. $file1 ) / 1024);
|
|
||||||
$dirCant ++;
|
|
||||||
//print "$file1 $dirCant $dirSize <br>";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
//if ( is_dir ( $dynaPath) )
|
|
||||||
// print $dynaPath;
|
|
||||||
print "</td><td align='center'>$dirCant </td><td align='center'> $dirSize </td></tr>";
|
|
||||||
|
|
||||||
print "</tr>";
|
|
||||||
$row1 = $dset1->Read();
|
|
||||||
}
|
|
||||||
print "</table><br>";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
;
|
|
||||||
?>
|
|
||||||
@@ -1,55 +0,0 @@
|
|||||||
<?php
|
|
||||||
/**
|
|
||||||
* login.php
|
|
||||||
*
|
|
||||||
* ProcessMaker Open Source Edition
|
|
||||||
* Copyright (C) 2004 - 2008 Colosa Inc.23
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU Affero General Public License as
|
|
||||||
* published by the Free Software Foundation, either version 3 of the
|
|
||||||
* License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU Affero General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*
|
|
||||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
|
||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
if (!isset($_SESSION['G_MESSAGE']))
|
|
||||||
{
|
|
||||||
$_SESSION['G_MESSAGE'] = '';
|
|
||||||
}
|
|
||||||
if (!isset($_SESSION['G_MESSAGE_TYPE']))
|
|
||||||
{
|
|
||||||
$_SESSION['G_MESSAGE_TYPE'] = '';
|
|
||||||
}
|
|
||||||
|
|
||||||
$msg = $_SESSION['G_MESSAGE'];
|
|
||||||
$msgType = $_SESSION['G_MESSAGE_TYPE'];
|
|
||||||
|
|
||||||
session_destroy();
|
|
||||||
session_start();
|
|
||||||
|
|
||||||
$G_MAIN_MENU = 'rbac.login';
|
|
||||||
$G_MENU_SELECTED = '';
|
|
||||||
if (strlen($msg) > 0 )
|
|
||||||
{
|
|
||||||
$_SESSION['G_MESSAGE'] = $msg;
|
|
||||||
}
|
|
||||||
if (strlen($msgType) > 0 )
|
|
||||||
{
|
|
||||||
$_SESSION['G_MESSAGE_TYPE'] = $msgType;
|
|
||||||
}
|
|
||||||
|
|
||||||
$G_PUBLISH = new Publisher;
|
|
||||||
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'login/login', '', '', 'verify-login.php');
|
|
||||||
|
|
||||||
G::RenderPage( "publish" );
|
|
||||||
?>
|
|
||||||
@@ -1,82 +0,0 @@
|
|||||||
<?php
|
|
||||||
/**
|
|
||||||
* loginAjax.php
|
|
||||||
*
|
|
||||||
* ProcessMaker Open Source Edition
|
|
||||||
* Copyright (C) 2004 - 2008 Colosa Inc.23
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU Affero General Public License as
|
|
||||||
* published by the Free Software Foundation, either version 3 of the
|
|
||||||
* License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU Affero General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*
|
|
||||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
|
||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
//G::LoadSystem('json');
|
|
||||||
require_once(PATH_THIRDPARTY . 'pear/json/class.json.php');
|
|
||||||
$json=new Services_JSON();
|
|
||||||
$G_FORM=new form(G::getUIDName(urlDecode($_POST['form'])));
|
|
||||||
$G_FORM->id=urlDecode($_POST['form']);
|
|
||||||
$G_FORM->values=$_SESSION[$G_FORM->id];
|
|
||||||
|
|
||||||
$newValues=($json->decode(urlDecode(stripslashes($_POST['fields']))));
|
|
||||||
//Resolve dependencies
|
|
||||||
//Returns an array ($dependentFields) with the names of the fields
|
|
||||||
//that depends of fields passed through AJAX ($_GET/$_POST)
|
|
||||||
$dependentFields=array();
|
|
||||||
for($r=0;$r<sizeof($newValues);$r++) {
|
|
||||||
$newValues[$r]=(array)$newValues[$r];
|
|
||||||
$G_FORM->setValues($newValues[$r]);
|
|
||||||
//Search dependent fields
|
|
||||||
foreach($newValues[$r] as $k => $v) {
|
|
||||||
$myDependentFields = explode( ',', $G_FORM->fields[$k]->dependentFields);
|
|
||||||
$dependentFields=array_merge($dependentFields, $myDependentFields);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
$dependentFields=array_unique($dependentFields);
|
|
||||||
|
|
||||||
//Parse and update the new content
|
|
||||||
$template = PATH_CORE . 'templates/xmlform.html';
|
|
||||||
$newContent=$G_FORM->getFields($template);
|
|
||||||
|
|
||||||
//Returns the dependentFields's content
|
|
||||||
$sendContent=array();
|
|
||||||
$r=0;
|
|
||||||
foreach($dependentFields as $d) {
|
|
||||||
$sendContent[$r]->name=$d;
|
|
||||||
$sendContent[$r]->content=NULL;
|
|
||||||
foreach($G_FORM->fields[$d] as $attribute => $value) {
|
|
||||||
switch($attribute) {
|
|
||||||
case 'type':
|
|
||||||
$sendContent[$r]->content->{$attribute}=$value; break;
|
|
||||||
case 'options':
|
|
||||||
$sendContent[$r]->content->{$attribute}=toJSArray($value); break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
$sendContent[$r]->value=$G_FORM->values[$d];
|
|
||||||
$r++;
|
|
||||||
}
|
|
||||||
echo($json->encode($sendContent));
|
|
||||||
|
|
||||||
function toJSArray($array)
|
|
||||||
{
|
|
||||||
$result=array();
|
|
||||||
foreach($array as $k => $v){
|
|
||||||
$o=NULL;
|
|
||||||
$o->key=$k;
|
|
||||||
$o->value=$v;
|
|
||||||
$result[]=$o;
|
|
||||||
}
|
|
||||||
return $result;
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
@@ -1,37 +0,0 @@
|
|||||||
<?php
|
|
||||||
/**
|
|
||||||
* noViewPage.php
|
|
||||||
*
|
|
||||||
* ProcessMaker Open Source Edition
|
|
||||||
* Copyright (C) 2004 - 2008 Colosa Inc.23
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU Affero General Public License as
|
|
||||||
* published by the Free Software Foundation, either version 3 of the
|
|
||||||
* License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU Affero General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*
|
|
||||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
|
||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
$G_MENU_SELECTED = 0;
|
|
||||||
$G_MAIN_MENU = "empty";
|
|
||||||
$G_SUB_MENU = "empty";
|
|
||||||
|
|
||||||
$referer = $_SERVER['HTTP_REFERER'];
|
|
||||||
$dbc = new DBConnection;
|
|
||||||
$G_PUBLISH = new Publisher;
|
|
||||||
$G_PUBLISH->SetTo( $dbc );
|
|
||||||
$G_PUBLISH->AddContent( "xmlform", "xmlform", "login/noViewPage", "", NULL );
|
|
||||||
|
|
||||||
G::RenderPage( "publish" );
|
|
||||||
?>
|
|
||||||
@@ -1,34 +0,0 @@
|
|||||||
<?php
|
|
||||||
/**
|
|
||||||
* showDBFiles.php
|
|
||||||
*
|
|
||||||
* ProcessMaker Open Source Edition
|
|
||||||
* Copyright (C) 2004 - 2008 Colosa Inc.23
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU Affero General Public License as
|
|
||||||
* published by the Free Software Foundation, either version 3 of the
|
|
||||||
* License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU Affero General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*
|
|
||||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
|
||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
$G_MAIN_MENU = 'rbac.login';
|
|
||||||
$G_MENU_SELECTED = '';
|
|
||||||
|
|
||||||
|
|
||||||
$G_PUBLISH = new Publisher;
|
|
||||||
$G_PUBLISH->AddContent('view', 'login/showDBFiles');
|
|
||||||
|
|
||||||
G::RenderPage( "publish" );
|
|
||||||
?>
|
|
||||||
@@ -1,85 +0,0 @@
|
|||||||
<?php
|
|
||||||
/**
|
|
||||||
* verify-login.php
|
|
||||||
*
|
|
||||||
* ProcessMaker Open Source Edition
|
|
||||||
* Copyright (C) 2004 - 2008 Colosa Inc.23
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU Affero General Public License as
|
|
||||||
* published by the Free Software Foundation, either version 3 of the
|
|
||||||
* License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU Affero General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*
|
|
||||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
|
||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
if (defined('SYS_SYS')) $_SESSION['ENVIRONMENT']= SYS_SYS;
|
|
||||||
else $_SESSION['ENVIRONMENT']= 'vacio';
|
|
||||||
|
|
||||||
$frm = $_POST['form'];
|
|
||||||
$usr = strtolower(trim($frm['USER_NAME']));
|
|
||||||
$pwd = trim($frm['USER_PASS']);
|
|
||||||
|
|
||||||
$dbc = new DBConnection(DB_HOST, DB_RBAC_USER, DB_RBAC_PASS, DB_RBAC_NAME );
|
|
||||||
|
|
||||||
$_SESSION['USER_LOGGED'] = 0;
|
|
||||||
$_SESSION['VALID_SESSION'] = session_id();
|
|
||||||
$_SESSION['USER'] = $usr;
|
|
||||||
|
|
||||||
$res = $RBAC->VerifyLogin($usr, $pwd);
|
|
||||||
|
|
||||||
switch ($res)
|
|
||||||
{
|
|
||||||
case -1://don't exist
|
|
||||||
G::SendMessageXml('ID_USER_NOT_REGISTERED', 'warning');
|
|
||||||
break;
|
|
||||||
case -2://password incorrect
|
|
||||||
G::SendMessageXml('ID_WRONG_PASS', 'warning');
|
|
||||||
break;
|
|
||||||
case -3: //inactive
|
|
||||||
case -4: //due
|
|
||||||
G::SendMessageXml('ID_USER_INACTIVE', 'warning');
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
if ($res < 0 )
|
|
||||||
{
|
|
||||||
header('location: login.html');
|
|
||||||
die;
|
|
||||||
}
|
|
||||||
|
|
||||||
$uid = $res;
|
|
||||||
$_SESSION['USER_LOGGED'] = $uid;
|
|
||||||
$res = $RBAC->userCanAccess('RBAC_LOGIN');
|
|
||||||
if ($res != 1 )
|
|
||||||
{
|
|
||||||
G::SendMessageXml('ID_USER_HAVENT_RIGHTS_PAGE', 'error');
|
|
||||||
header('location: login.html');
|
|
||||||
die;
|
|
||||||
}
|
|
||||||
|
|
||||||
$_SESSION['USER_NAME'] = $usr;
|
|
||||||
|
|
||||||
$file = PATH_RBAC . PATH_SEP . 'class.authentication.php';
|
|
||||||
require_once($file);
|
|
||||||
$obj = new authenticationSource;
|
|
||||||
$obj->SetTo($dbc);
|
|
||||||
$res = $obj->verifyStructures();
|
|
||||||
|
|
||||||
if ($RBAC->userCanAccess("RBAC_READONLY") == 1)
|
|
||||||
{
|
|
||||||
header('location: ../rbac/userList');
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
header('location: ../rbac/appList');
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
@@ -1,36 +0,0 @@
|
|||||||
<?php
|
|
||||||
/**
|
|
||||||
* appDel.php
|
|
||||||
*
|
|
||||||
* ProcessMaker Open Source Edition
|
|
||||||
* Copyright (C) 2004 - 2008 Colosa Inc.23
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU Affero General Public License as
|
|
||||||
* published by the Free Software Foundation, either version 3 of the
|
|
||||||
* License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU Affero General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*
|
|
||||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
|
||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
$appid = $HTTP_SESSION_VARS['CURRENT_APPLICATION'];
|
|
||||||
|
|
||||||
$dbc = new DBConnection(DB_HOST, DB_RBAC_USER, DB_RBAC_PASS, DB_RBAC_NAME );
|
|
||||||
|
|
||||||
//crear Objeto
|
|
||||||
G::LoadClassRBAC ("applications");
|
|
||||||
$obj = new RBAC_Application;
|
|
||||||
$obj->SetTo ($dbc);
|
|
||||||
$obj->removeApplication ( $appid );
|
|
||||||
header( "location: appList.html" );
|
|
||||||
?>
|
|
||||||
@@ -1,50 +0,0 @@
|
|||||||
<?php
|
|
||||||
/**
|
|
||||||
* appEdit.php
|
|
||||||
*
|
|
||||||
* ProcessMaker Open Source Edition
|
|
||||||
* Copyright (C) 2004 - 2008 Colosa Inc.23
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU Affero General Public License as
|
|
||||||
* published by the Free Software Foundation, either version 3 of the
|
|
||||||
* License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU Affero General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*
|
|
||||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
|
||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @package classes.model
|
|
||||||
*/
|
|
||||||
|
|
||||||
$G_MAIN_MENU = "rbac";
|
|
||||||
$G_SUB_MENU = "rbac.appEdit";
|
|
||||||
$G_MENU_SELECTED = 1;
|
|
||||||
|
|
||||||
$appid = isset($_GET[0])?$_GET[0]:'';//$URI_VARS[0];
|
|
||||||
$HTTP_SESSION_VARS['CURRENT_APPLICATION'] = $appid;
|
|
||||||
$dbc = new DBConnection(DB_HOST, DB_RBAC_USER, DB_RBAC_PASS, DB_RBAC_NAME );
|
|
||||||
G::LoadClassRBAC ("applications");
|
|
||||||
$obj = new RBAC_Application;
|
|
||||||
$obj->SetTo ($dbc);
|
|
||||||
$obj->Load($appid);
|
|
||||||
|
|
||||||
$obj->Fields['EDIT_ROLES'] = G::LoadMessageXml ('ID_ROLES');
|
|
||||||
$obj->Fields['EDIT_PERMISSIONS'] = G::LoadMessageXml ('ID_PERMISSIONS');
|
|
||||||
$G_PUBLISH = new Publisher;
|
|
||||||
$G_PUBLISH->SetTo ($dbc);
|
|
||||||
$G_PUBLISH->AddContent ( "xmlform", "xmlform", "rbac/appEdit", "", $obj->Fields, "../appEdit2");
|
|
||||||
$content = '';//G::LoadContent( "rbac/myApp" );
|
|
||||||
G::RenderPage( "publish" );
|
|
||||||
|
|
||||||
?>
|
|
||||||
@@ -1,50 +0,0 @@
|
|||||||
<?php
|
|
||||||
/**
|
|
||||||
* appEdit2.php
|
|
||||||
*
|
|
||||||
* ProcessMaker Open Source Edition
|
|
||||||
* Copyright (C) 2004 - 2008 Colosa Inc.23
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU Affero General Public License as
|
|
||||||
* published by the Free Software Foundation, either version 3 of the
|
|
||||||
* License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU Affero General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*
|
|
||||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
|
||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
$frm = $HTTP_POST_VARS['form'];
|
|
||||||
$frm = G::PrepareFormArray( $frm );
|
|
||||||
|
|
||||||
$dbc = new DBConnection(DB_HOST, DB_RBAC_USER, DB_RBAC_PASS, DB_RBAC_NAME );
|
|
||||||
|
|
||||||
$appid = $HTTP_SESSION_VARS['CURRENT_APPLICATION'];
|
|
||||||
$code = strtoupper( $frm['APP_CODE']);
|
|
||||||
$descrip = $frm['APP_DESCRIPTION'];
|
|
||||||
|
|
||||||
//crear nueva applicacion
|
|
||||||
G::LoadClassRBAC ( "applications");
|
|
||||||
$obj = new RBAC_Application;
|
|
||||||
$obj->SetTo( $dbc );
|
|
||||||
|
|
||||||
print "xx $res";
|
|
||||||
$res = $obj->applicationCodeRepetido ( $code );
|
|
||||||
if ($res != 0 && $res != $appid ) {
|
|
||||||
G::SendMessage ( 15, "error");
|
|
||||||
header ("location: appList.php");
|
|
||||||
die;
|
|
||||||
}
|
|
||||||
print "xx $res";
|
|
||||||
$uid = $obj->editApplication( $appid, $code , $descrip );
|
|
||||||
header( "location: appList.html" );
|
|
||||||
?>
|
|
||||||
@@ -1,64 +0,0 @@
|
|||||||
<?php
|
|
||||||
/**
|
|
||||||
* appList.php
|
|
||||||
*
|
|
||||||
* ProcessMaker Open Source Edition
|
|
||||||
* Copyright (C) 2004 - 2008 Colosa Inc.23
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU Affero General Public License as
|
|
||||||
* published by the Free Software Foundation, either version 3 of the
|
|
||||||
* License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU Affero General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*
|
|
||||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
|
||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
/*class XmlForm_Field_Menu extends XmlForm_Field
|
|
||||||
{
|
|
||||||
function render( $value = NULL )
|
|
||||||
{
|
|
||||||
return "<22>asdsad";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
class filterForm extends form
|
|
||||||
{
|
|
||||||
var $cols = 3;
|
|
||||||
var $type = 'filterform';
|
|
||||||
var $ajaxServer = '...';
|
|
||||||
}
|
|
||||||
class xmlMenu extends form
|
|
||||||
{
|
|
||||||
var $type = 'xmlmenu';
|
|
||||||
}*/
|
|
||||||
G::LoadClass("dynaform");
|
|
||||||
G::GenericForceLogin ('RBAC_LOGIN','login/noViewPage','login/login');
|
|
||||||
$G_MAIN_MENU = "rbac";
|
|
||||||
$G_SUB_MENU = "rbac.application";
|
|
||||||
$G_MENU_SELECTED = 1;
|
|
||||||
|
|
||||||
//$RBAC->userCanAccess("RBAC_LOGIN");
|
|
||||||
//$RBAC->userCanAccess("RBAC_READONLY" );
|
|
||||||
//$RBAC->userCanAccess("RBAC_CREATE_ROLE" );
|
|
||||||
//$RBAC->userCanAccess("RBAC_CREATE_PERMISSION" );
|
|
||||||
$canCreateApp = $RBAC->userCanAccess("RBAC_CREATE_APPLICATION" );
|
|
||||||
|
|
||||||
$dbc = new DBConnection(DB_HOST, DB_RBAC_USER, DB_RBAC_PASS, DB_RBAC_NAME );
|
|
||||||
$G_PUBLISH = new Publisher;
|
|
||||||
$G_PUBLISH->SetTo ($dbc);
|
|
||||||
//$G_PUBLISH->AddContent ( "table", "paged-table", "rbac.applications.list", "rbac/myApp", "", "load");
|
|
||||||
//$G_PUBLISH->AddContent ( "xmlform", "xmlmenu", "rbac/appMenu", "", "", "load");
|
|
||||||
//$G_PUBLISH->AddContent ( "xmlform", "filterform", "rbac/applicationsList", "", "", "load");
|
|
||||||
$G_PUBLISH->AddContent ( "xmlform", "pagedTable", "rbac/applicationsList", "", "", "", "../gulliver/pagedTableAjax.php");
|
|
||||||
$content = '';
|
|
||||||
G::RenderPage( "publish" );
|
|
||||||
|
|
||||||
?>
|
|
||||||
@@ -1,38 +0,0 @@
|
|||||||
<?php
|
|
||||||
/**
|
|
||||||
* appNew.php
|
|
||||||
*
|
|
||||||
* ProcessMaker Open Source Edition
|
|
||||||
* Copyright (C) 2004 - 2008 Colosa Inc.23
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU Affero General Public License as
|
|
||||||
* published by the Free Software Foundation, either version 3 of the
|
|
||||||
* License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU Affero General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*
|
|
||||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
|
||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
$G_MAIN_MENU = "rbac";
|
|
||||||
$G_BACK_PAGE = "rbac/appList";
|
|
||||||
$G_SUB_MENU = "cancel";
|
|
||||||
$G_MENU_SELECTED = 1;
|
|
||||||
|
|
||||||
$dbc = new DBConnection(DB_HOST, DB_RBAC_USER, DB_RBAC_PASS, DB_RBAC_NAME );
|
|
||||||
$G_PUBLISH = new Publisher;
|
|
||||||
$G_PUBLISH->SetTo ($dbc);
|
|
||||||
$G_PUBLISH->AddContent ( "xmlform", "xmlform", "rbac/appNew", "", '', "appNew2");
|
|
||||||
$content = '';//'';//G::LoadContent( "rbac/myApp" );
|
|
||||||
G::RenderPage( "publish" );
|
|
||||||
|
|
||||||
?>
|
|
||||||
@@ -1,49 +0,0 @@
|
|||||||
<?php
|
|
||||||
/**
|
|
||||||
* appNew2.php
|
|
||||||
*
|
|
||||||
* ProcessMaker Open Source Edition
|
|
||||||
* Copyright (C) 2004 - 2008 Colosa Inc.23
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU Affero General Public License as
|
|
||||||
* published by the Free Software Foundation, either version 3 of the
|
|
||||||
* License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU Affero General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*
|
|
||||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
|
||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
header( "location: appList.html" );die;
|
|
||||||
/*Falta revisar la clase RBAC_Application*/
|
|
||||||
$frm = $_POST['form'];
|
|
||||||
|
|
||||||
$code = strtoupper ( $frm['APP_CODE']);
|
|
||||||
$description = $frm['APP_DESCRIPTION'];
|
|
||||||
$dbc = new DBConnection(DB_HOST, DB_RBAC_USER, DB_RBAC_PASS, DB_RBAC_NAME );
|
|
||||||
|
|
||||||
//crear nueva aplicacion
|
|
||||||
G::LoadClassRBAC ('applications');
|
|
||||||
$obj = new RBAC_Application;
|
|
||||||
$obj->SetTo( $dbc );
|
|
||||||
$res = $obj->applicationCodeRepetido ( $code );
|
|
||||||
|
|
||||||
if ($res != 0 ) {
|
|
||||||
G::SendMessage ( 15, "error");
|
|
||||||
header ("location: appNew.php");
|
|
||||||
die;
|
|
||||||
}
|
|
||||||
|
|
||||||
$appid = $obj->createApplication ($code, $description );
|
|
||||||
$_SESSION['CURRENT_APPLICATION'] = $appid;
|
|
||||||
|
|
||||||
header( "location: appList.html" );
|
|
||||||
?>
|
|
||||||
@@ -1,38 +0,0 @@
|
|||||||
<?php
|
|
||||||
/**
|
|
||||||
* appView.php
|
|
||||||
*
|
|
||||||
* ProcessMaker Open Source Edition
|
|
||||||
* Copyright (C) 2004 - 2008 Colosa Inc.23
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU Affero General Public License as
|
|
||||||
* published by the Free Software Foundation, either version 3 of the
|
|
||||||
* License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU Affero General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*
|
|
||||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
|
||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
$G_MAIN_MENU = "rbac";
|
|
||||||
$G_BACK_PAGE = "rbac/appList";
|
|
||||||
$G_SUB_MENU = "cancel";
|
|
||||||
$G_MENU_SELECTED = 1;
|
|
||||||
|
|
||||||
$dbc = new DBConnection(DB_HOST, DB_RBAC_USER, DB_RBAC_PASS, DB_RBAC_NAME );
|
|
||||||
$G_PUBLISH = new Publisher;
|
|
||||||
$G_PUBLISH->SetTo ($dbc);
|
|
||||||
$G_PUBLISH->AddContent ( "xmlform", "xmlform", "rbac/appNew", "", "", "appNew2");
|
|
||||||
$content = '';//G::LoadContent( "rbac/myApp" );
|
|
||||||
G::RenderPage( "publish" );
|
|
||||||
|
|
||||||
?>
|
|
||||||
@@ -1,49 +0,0 @@
|
|||||||
<?php
|
|
||||||
/**
|
|
||||||
* authAddUser.php
|
|
||||||
*
|
|
||||||
* ProcessMaker Open Source Edition
|
|
||||||
* Copyright (C) 2004 - 2008 Colosa Inc.23
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU Affero General Public License as
|
|
||||||
* published by the Free Software Foundation, either version 3 of the
|
|
||||||
* License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU Affero General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*
|
|
||||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
|
||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
$G_MAIN_MENU = 'rbac';
|
|
||||||
$G_SUB_MENU = 'rbac.authSource';
|
|
||||||
$G_BACK_PAGE = 'rbac/authenticationList.html';
|
|
||||||
$G_MENU_SELECTED = 2;
|
|
||||||
$G_SUB_MENU_SELECTED = 2;
|
|
||||||
|
|
||||||
if (!isset($_GET['UID']))
|
|
||||||
{
|
|
||||||
$_GET['UID'] = '';
|
|
||||||
}
|
|
||||||
$appid = $_GET['UID'];
|
|
||||||
if ($appid == '' && $_SESSION['CURRENT_AUTH_SOURCE'] != '')
|
|
||||||
{
|
|
||||||
$appid = $_SESSION['CURRENT_AUTH_SOURCE'];
|
|
||||||
}
|
|
||||||
$_SESSION['CURRENT_AUTH_SOURCE'] = $appid;
|
|
||||||
$dbc = new DBConnection(DB_HOST, DB_RBAC_USER, DB_RBAC_PASS, DB_RBAC_NAME );
|
|
||||||
G::LoadClassRBAC('authentication');
|
|
||||||
$Fields['authId'] = $appid;
|
|
||||||
|
|
||||||
$G_PUBLISH = new Publisher;
|
|
||||||
$G_PUBLISH->SetTo ($dbc);
|
|
||||||
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'rbac/authAddUser', '', $Fields);
|
|
||||||
G::RenderPage( 'publish');
|
|
||||||
?>
|
|
||||||
@@ -1,219 +0,0 @@
|
|||||||
<?php
|
|
||||||
/**
|
|
||||||
* authAjax.php
|
|
||||||
*
|
|
||||||
* ProcessMaker Open Source Edition
|
|
||||||
* Copyright (C) 2004 - 2008 Colosa Inc.23
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU Affero General Public License as
|
|
||||||
* published by the Free Software Foundation, either version 3 of the
|
|
||||||
* License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU Affero General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*
|
|
||||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
|
||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
G::Loadinclude ('ajax');
|
|
||||||
$function = get_ajax_value ( 'function' );
|
|
||||||
$searchText = get_ajax_value ( 'text' );
|
|
||||||
|
|
||||||
$userName = get_ajax_value ( 'userName' );
|
|
||||||
$authSource = get_ajax_value ( 'authSource' );
|
|
||||||
$dn = get_ajax_value ( 'dn' );
|
|
||||||
$fullname = get_ajax_value ( 'fullname' );
|
|
||||||
$email = get_ajax_value ( 'email' );
|
|
||||||
$roles = get_ajax_value ( 'roles' );
|
|
||||||
|
|
||||||
switch ( $function ) {
|
|
||||||
case 'searchText' : searchText( $searchText );
|
|
||||||
break;
|
|
||||||
case 'validUser' : validUser( $searchText );
|
|
||||||
break;
|
|
||||||
case 'createUser' : createUser( $userName, $authSource, $dn, $fullname, $email, $roles );
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
function createUser( $userName, $authSource, $dn, $fullname, $email, $roles ){
|
|
||||||
global $DB_MODULE; // :(
|
|
||||||
G::LoadClassRBAC ('user');
|
|
||||||
$dbc = new DBConnection(DB_HOST, DB_RBAC_USER, DB_RBAC_PASS, DB_RBAC_NAME );
|
|
||||||
$obj = new RBAC_User;
|
|
||||||
$obj->SetTo( $dbc );
|
|
||||||
|
|
||||||
//is ProcessMaker?
|
|
||||||
$isPM = false;
|
|
||||||
foreach ( $DB_MODULE as $index => $module ) { if ( $module = 'ProcessMaker' ) $isPM = true; }
|
|
||||||
if ( $isPM ) {
|
|
||||||
$dbcPM = new DBConnection(DB_HOST, DB_USER, DB_PASS, DB_NAME );
|
|
||||||
$sesPM = new DBSession ( $dbcPM );
|
|
||||||
}
|
|
||||||
|
|
||||||
$res = $obj->UserNameRepetido( 0, $userName );
|
|
||||||
if ( $res != 0 ) {
|
|
||||||
$result = "-1";
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
$aux = explode( ' ', $fullname );
|
|
||||||
$last = str_replace ( $aux[0] . ' ', '', $fullname );
|
|
||||||
$uid = $obj->createUser ( $last, /*mid*/'', $aux[0], $email);
|
|
||||||
$result = $obj->createUserName ($uid, $userName, 'LDAP');
|
|
||||||
$obj->updateLDAP ( $uid, $authSource, $dn );
|
|
||||||
$rol = explode ( ',', $roles );
|
|
||||||
foreach ( $rol as $key => $val ) {
|
|
||||||
if ( $val != 0 )
|
|
||||||
$obj->assignUserRole ( $uid, $val );
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($isPM ) {
|
|
||||||
$sql = "insert into USER (UID, USR_USER_NAME, USR_LASTNAME, USR_MIDNAME, USR_FIRSTNAME, USR_EMAIL) VALUES ( " .
|
|
||||||
$uid . ", '" . $userName . "', '" . $last . "','', '". $aux[0] . "', '". $email. "' ) ";
|
|
||||||
//$f =fopen ( '/shared/security.log', "a+" );fwrite ( $f, date("Y-m-d h:i:s") . "$isPM $sql \n" ); fclose ($f);
|
|
||||||
$sesPM->Execute ( $sql );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
header("Content-Type: text/xml");
|
|
||||||
print '<?xml version="1.0" encoding="UTF-8"?>';
|
|
||||||
print '<data>';
|
|
||||||
print "<value>$result</value>";
|
|
||||||
print '</data>';
|
|
||||||
}
|
|
||||||
|
|
||||||
function validUser ( $userid) {
|
|
||||||
global $RBAC;
|
|
||||||
$res = $RBAC->UserNameRepetido( 0, $userid );
|
|
||||||
|
|
||||||
header("Content-Type: text/xml");
|
|
||||||
print '<?xml version="1.0" encoding="UTF-8"?>';
|
|
||||||
print '<data>';
|
|
||||||
print "<value>$res</value>";
|
|
||||||
print '</data>';
|
|
||||||
/*
|
|
||||||
if ( $res == 0 ) {
|
|
||||||
print "<font color='green'>valid user</font>";
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
print "<font color='red'>user already used</font>";
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
}
|
|
||||||
|
|
||||||
function searchText ( $searchText) {
|
|
||||||
global $_SESSION;
|
|
||||||
global $RBAC;
|
|
||||||
$curAuthSource = $_SESSION['CURRENT_AUTH_SOURCE'];
|
|
||||||
$dbc = new DBConnection(DB_HOST, DB_RBAC_USER, DB_RBAC_PASS, DB_RBAC_NAME );
|
|
||||||
|
|
||||||
$tpl = new TemplatePower( PATH_TPL . 'authListUsers.html' );
|
|
||||||
$tpl->prepare();
|
|
||||||
|
|
||||||
$tpl->assign( "STYLE_CSS" , ( defined ('STYLE_CSS') ? STYLE_CSS : 'simple' ) );
|
|
||||||
$tpl->assign( "title" , 'Search Results' );
|
|
||||||
|
|
||||||
//authentication source
|
|
||||||
G::LoadClassRBAC ('authentication');
|
|
||||||
$obj = new authenticationSource;
|
|
||||||
$obj->SetTo( $dbc );
|
|
||||||
$data = $obj->searchUsers ( $curAuthSource , $searchText);
|
|
||||||
if ( $data['codError'] == 0 && isset ( $data['rows'] ) && !is_array( $data['rows'] ) ) {
|
|
||||||
$tpl->newBlock( "empty-rows" );
|
|
||||||
$tpl->assign( "title" , 'Search Results' );
|
|
||||||
$tpl->assign( "empty-rows-text" , 'no records found' );
|
|
||||||
$tpl->printToScreen();
|
|
||||||
die;
|
|
||||||
}
|
|
||||||
if ( $data['codError'] != 0 ) {
|
|
||||||
$tpl->newBlock( "error" );
|
|
||||||
$tpl->assign( "title" , 'Log Error' );
|
|
||||||
$tpl->assign( "text" , "<font color='Red'>" . $data['rows'] . "</font>" ) ;
|
|
||||||
$tpl->printToScreen();
|
|
||||||
die;
|
|
||||||
}
|
|
||||||
|
|
||||||
//build the options to create...an user, list the applications and their roles..
|
|
||||||
$ses = new DBSession ( $dbc );
|
|
||||||
$ses2 = new DBSession ( $dbc );
|
|
||||||
$dset = $ses->execute ( "SELECT * from APPLICATION where APP_CODE != 'RBAC' " );
|
|
||||||
$appRow = $dset->Read();
|
|
||||||
$checkboxs = "<br><input type='checkbox' @@disabled name='C-@@Y' id='C-@@Y' onclick='emptyDropdowns( \"@@X\");' ><input type='hidden' name='H-@@Y' id='H-@@Y' value='@@X' ><input type='hidden' name='E-@@Y' id='E-@@Y' value='' >";
|
|
||||||
$inputs = "<div id='D-@@Y'>@@validuser</div><input type='text' name='T-@@Y' id='T-@@Y' value=\"@@Z\" onchange='verifyUserName ( this, \"@@Y\" );' size='14' maxlength='16'> ";
|
|
||||||
$options = "<table cellpadding='0' cellspacing='0'><tr>" ;
|
|
||||||
$options .= "";
|
|
||||||
while ( is_array ( $appRow ) ) {
|
|
||||||
$appid = $appRow['UID'];
|
|
||||||
$selectId = 'S-@@Y-'. $appid;
|
|
||||||
$dset2 = $ses2->execute ( 'SELECT * from ROLE where ROL_APPLICATION = ' . $appid );
|
|
||||||
$rolRow = $dset2->Read();
|
|
||||||
$selectEnabled = false;
|
|
||||||
if ( is_array ( $rolRow ) ) {
|
|
||||||
$options .= '<td>' . $appRow['APP_CODE'] . '<br>';
|
|
||||||
$options .= "<select name='$selectId' id='$selectId' @@disabled onchange='flipCheckbox( \"@@Y\");' >\n";
|
|
||||||
$options .= "<option value='0'>select a Role</option>";
|
|
||||||
$selectEnabled = true;
|
|
||||||
}
|
|
||||||
while ( is_array ( $rolRow ) ) {
|
|
||||||
$options .= "<option value='" . $rolRow['UID'] . "'>" . $rolRow['ROL_CODE'] . "</option>";
|
|
||||||
$rolRow = $dset2->Read();
|
|
||||||
}
|
|
||||||
if ( $selectEnabled ) {
|
|
||||||
$options .= "</select>\n<td>";
|
|
||||||
}
|
|
||||||
|
|
||||||
$appRow = $dset->Read();
|
|
||||||
}
|
|
||||||
$options .= '</tr></table>';
|
|
||||||
|
|
||||||
$i = 0;
|
|
||||||
if ( isset ( $data['rows'] ) )
|
|
||||||
foreach ( $data['rows'] as $row ) {
|
|
||||||
|
|
||||||
$tpl->newBlock( "users" );
|
|
||||||
if ( ++$i % 2 == 0 )
|
|
||||||
$tpl->assign( "class" , 'Row2' );
|
|
||||||
else
|
|
||||||
$tpl->assign( "class" , 'Row1' );
|
|
||||||
$tpl->assign( "index" , $i );
|
|
||||||
$tpl->assign( "dn" , $row['dn'] );
|
|
||||||
$tpl->assign( "name" , $row['attr']['givenName'] );
|
|
||||||
$tpl->assign( "lastname" , $row['attr']['sn'] );
|
|
||||||
$tpl->assign( "fullname" , $row['attr']['cn'] );
|
|
||||||
$tpl->assign( "email" , $row['attr']['mail'] );
|
|
||||||
$tpl->assign( "uid" , $row['attr']['uid'] );
|
|
||||||
|
|
||||||
//verificar uid
|
|
||||||
$userid = $row['attr']['uid'];
|
|
||||||
$res = $RBAC->UserNameRepetido( 0, $userid );
|
|
||||||
|
|
||||||
|
|
||||||
$input = str_replace ( '@@Z', $userid, str_replace ( '@@X', $row['dn'], str_replace ( '@@Y', $i, $inputs) ) );
|
|
||||||
$input = str_replace ( '@@validuser', ( $res == 0 ? "<font color='green'>valid user</font>" : "<font color='red'>user already used</font>"), $input );
|
|
||||||
$checkbox = str_replace ( '@@X', $row['dn'], str_replace ( '@@Y', $i, $checkboxs) );
|
|
||||||
$checkbox = str_replace ( '@@disabled', ( $res <> 0 ? 'disabled' : ''), $checkbox );
|
|
||||||
$option = str_replace ( '@@X', $row['dn'], str_replace ( '@@Y', $i, $options) );
|
|
||||||
// $option = str_replace ( '@@disabled', ( $res <> 0 ? 'disabled' : ''), $option );
|
|
||||||
$tpl->assign( "checkbox" , $checkbox );
|
|
||||||
$tpl->assign( "input" , $input );
|
|
||||||
$tpl->assign( "options" , $option );
|
|
||||||
}
|
|
||||||
$tpl->gotoBlock( "_ROOT" );
|
|
||||||
$tpl->newBlock( "start-users" );
|
|
||||||
$tpl->assign( "dummy" , 'dummy' );
|
|
||||||
|
|
||||||
$tpl->gotoBlock( "_ROOT" );
|
|
||||||
$tpl->newBlock( "end-users" );
|
|
||||||
$tpl->assign( "dummy" , 'dummy' );
|
|
||||||
|
|
||||||
$tpl->printToScreen();
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
?>
|
|
||||||
@@ -1,31 +0,0 @@
|
|||||||
<?php
|
|
||||||
/**
|
|
||||||
* authDel.php
|
|
||||||
*
|
|
||||||
* ProcessMaker Open Source Edition
|
|
||||||
* Copyright (C) 2004 - 2008 Colosa Inc.23
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU Affero General Public License as
|
|
||||||
* published by the Free Software Foundation, either version 3 of the
|
|
||||||
* License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU Affero General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*
|
|
||||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
|
||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
$dbc = new DBConnection(DB_HOST, DB_RBAC_USER, DB_RBAC_PASS, DB_RBAC_NAME );
|
|
||||||
G::LoadClassRBAC ('authentication');
|
|
||||||
$obj = new authenticationSource;
|
|
||||||
$obj->SetTo($dbc);
|
|
||||||
$obj->removeSource($_GET['UID']);
|
|
||||||
header('location: authenticationList.html');
|
|
||||||
?>
|
|
||||||
@@ -1,46 +0,0 @@
|
|||||||
<?php
|
|
||||||
/**
|
|
||||||
* authEdit.php
|
|
||||||
*
|
|
||||||
* ProcessMaker Open Source Edition
|
|
||||||
* Copyright (C) 2004 - 2008 Colosa Inc.23
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU Affero General Public License as
|
|
||||||
* published by the Free Software Foundation, either version 3 of the
|
|
||||||
* License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU Affero General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*
|
|
||||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
|
||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
$G_MAIN_MENU = 'rbac';
|
|
||||||
$G_SUB_MENU = 'rbac.authSource';
|
|
||||||
$G_BACK_PAGE = 'rbac/authenticationList.html';
|
|
||||||
$G_MENU_SELECTED = 2;
|
|
||||||
|
|
||||||
$appid = isset($_GET[0])?$_GET[0]:'';
|
|
||||||
if ( $appid == '' && $HTTP_SESSION_VARS['CURRENT_AUTH_SOURCE'] != '' )
|
|
||||||
$appid = $HTTP_SESSION_VARS['CURRENT_AUTH_SOURCE'];
|
|
||||||
|
|
||||||
$HTTP_SESSION_VARS['CURRENT_AUTH_SOURCE'] = $appid;
|
|
||||||
$dbc = new DBConnection(DB_HOST, DB_RBAC_USER, DB_RBAC_PASS, DB_RBAC_NAME );
|
|
||||||
|
|
||||||
G::LoadClassRBAC('authentication');
|
|
||||||
$obj = new authenticationSource;
|
|
||||||
$obj->SetTo ($dbc);
|
|
||||||
$obj->Load($appid);
|
|
||||||
|
|
||||||
$G_PUBLISH = new Publisher;
|
|
||||||
$G_PUBLISH->SetTo ($dbc);
|
|
||||||
$G_PUBLISH->AddContent ( 'xmlform', 'xmlform', 'rbac/authNew', '', $obj->Fields, 'authEdit2');
|
|
||||||
G::RenderPage( 'publish');
|
|
||||||
?>
|
|
||||||
@@ -1,45 +0,0 @@
|
|||||||
<?php
|
|
||||||
/**
|
|
||||||
* authEdit2.php
|
|
||||||
*
|
|
||||||
* ProcessMaker Open Source Edition
|
|
||||||
* Copyright (C) 2004 - 2008 Colosa Inc.23
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU Affero General Public License as
|
|
||||||
* published by the Free Software Foundation, either version 3 of the
|
|
||||||
* License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU Affero General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*
|
|
||||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
|
||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
$frm = $_POST['form'];
|
|
||||||
|
|
||||||
$code = strtoupper ( $frm['APP_CODE']);
|
|
||||||
$description = $frm['APP_DESCRIPTION'];
|
|
||||||
$dbc = new DBConnection(DB_HOST, DB_RBAC_USER, DB_RBAC_PASS, DB_RBAC_NAME );
|
|
||||||
|
|
||||||
G::LoadClassRBAC('authentication');
|
|
||||||
$obj = new authenticationSource;
|
|
||||||
$obj->SetTo($dbc);
|
|
||||||
$res = $obj->editSource($_SESSION['CURRENT_AUTH_SOURCE'], $frm);
|
|
||||||
|
|
||||||
if ($res <= 0)
|
|
||||||
{
|
|
||||||
G::SendMessageXml('ID_USER_HAVENT_RIGHTS_PAGE', 'error');
|
|
||||||
header('location: authEdit');
|
|
||||||
die;
|
|
||||||
}
|
|
||||||
|
|
||||||
header('location: authTest.html');
|
|
||||||
//header('location: authenticationList.html');
|
|
||||||
?>
|
|
||||||
@@ -1,45 +0,0 @@
|
|||||||
<?php
|
|
||||||
/**
|
|
||||||
* authNew.php
|
|
||||||
*
|
|
||||||
* ProcessMaker Open Source Edition
|
|
||||||
* Copyright (C) 2004 - 2008 Colosa Inc.23
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU Affero General Public License as
|
|
||||||
* published by the Free Software Foundation, either version 3 of the
|
|
||||||
* License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU Affero General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*
|
|
||||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
|
||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
G::GenericForceLogin ('RBAC_LOGIN','login/noViewPage','login/login');
|
|
||||||
|
|
||||||
$G_MAIN_MENU = "rbac";
|
|
||||||
$G_BACK_PAGE = "rbac/authenticationList";
|
|
||||||
$G_SUB_MENU = "cancel";
|
|
||||||
$G_MENU_SELECTED = 1;
|
|
||||||
|
|
||||||
$Fields['AUT_PROVIDER'] = 'adprovider';
|
|
||||||
$Fields['AUT_ENABLED_TLS'] = '0';
|
|
||||||
$Fields['AUT_PORT'] = '389';
|
|
||||||
$Fields['AUT_SEARCH_ATTRIBUTES'] = "cn\nmail\nmsAMAccountName";
|
|
||||||
$Fields['AUT_OBJECT_CLASSES'] = "user\ninetOrgPerson\nposixAccount";
|
|
||||||
|
|
||||||
|
|
||||||
$dbc = new DBConnection(DB_HOST, DB_RBAC_USER, DB_RBAC_PASS, DB_RBAC_NAME );
|
|
||||||
$G_PUBLISH = new Publisher;
|
|
||||||
$G_PUBLISH->SetTo ($dbc);
|
|
||||||
$G_PUBLISH->AddContent ( "xmlform", "xmlform", "rbac/authNew", "", $Fields, "authNew2");
|
|
||||||
G::RenderPage( "publish" );
|
|
||||||
|
|
||||||
?>
|
|
||||||
@@ -1,47 +0,0 @@
|
|||||||
<?php
|
|
||||||
/**
|
|
||||||
* authNew2.php
|
|
||||||
*
|
|
||||||
* ProcessMaker Open Source Edition
|
|
||||||
* Copyright (C) 2004 - 2008 Colosa Inc.23
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU Affero General Public License as
|
|
||||||
* published by the Free Software Foundation, either version 3 of the
|
|
||||||
* License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU Affero General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*
|
|
||||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
|
||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
$frm = $_POST['form'];
|
|
||||||
|
|
||||||
$code = strtoupper ( $frm['APP_CODE']);
|
|
||||||
$description = $frm['APP_DESCRIPTION'];
|
|
||||||
$dbc = new DBConnection(DB_HOST, DB_RBAC_USER, DB_RBAC_PASS, DB_RBAC_NAME );
|
|
||||||
|
|
||||||
//crear nueva authentication source
|
|
||||||
G::LoadClassRBAC ('authentication');
|
|
||||||
$obj = new authenticationSource;
|
|
||||||
$obj->SetTo( $dbc );
|
|
||||||
$res = $obj->newSource ( $frm );
|
|
||||||
|
|
||||||
if ($res <= 0 ) {
|
|
||||||
//G::SendMessage ( -$res, "error");
|
|
||||||
header ("location: authNew");
|
|
||||||
die;
|
|
||||||
}
|
|
||||||
$HTTP_SESSION_VARS['CURRENT_AUTH_SOURCE'] = $res;
|
|
||||||
|
|
||||||
header( "location: authenticationList.html" );
|
|
||||||
|
|
||||||
?>
|
|
||||||
@@ -1,133 +0,0 @@
|
|||||||
<?php
|
|
||||||
/**
|
|
||||||
* authTest.php
|
|
||||||
*
|
|
||||||
* ProcessMaker Open Source Edition
|
|
||||||
* Copyright (C) 2004 - 2008 Colosa Inc.23
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU Affero General Public License as
|
|
||||||
* published by the Free Software Foundation, either version 3 of the
|
|
||||||
* License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU Affero General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*
|
|
||||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
|
||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
$G_MAIN_MENU = 'rbac';
|
|
||||||
$G_SUB_MENU = 'rbac.authSource';
|
|
||||||
$G_BACK_PAGE = 'rbac/authenticationList.html';
|
|
||||||
$G_MENU_SELECTED = 2;
|
|
||||||
$G_SUB_MENU_SELECTED = 1;
|
|
||||||
|
|
||||||
$appid = isset($_GET[0])?$_GET[0]:'';//$URI_VARS[0];
|
|
||||||
if ($appid == '' && $_SESSION['CURRENT_AUTH_SOURCE'] != '')
|
|
||||||
{
|
|
||||||
$appid = $_SESSION['CURRENT_AUTH_SOURCE'];
|
|
||||||
}
|
|
||||||
|
|
||||||
$_SESSION['CURRENT_AUTH_SOURCE'] = $appid;
|
|
||||||
$dbc = new DBConnection(DB_HOST, DB_RBAC_USER, DB_RBAC_PASS, DB_RBAC_NAME );
|
|
||||||
|
|
||||||
G::LoadClassRBAC('authentication');
|
|
||||||
$obj = new authenticationSource;
|
|
||||||
$obj->SetTo($dbc);
|
|
||||||
$obj->Load($appid);
|
|
||||||
|
|
||||||
$G_PUBLISH = new Publisher;
|
|
||||||
$G_PUBLISH->SetTo ($dbc);
|
|
||||||
$G_PUBLISH->AddContent('view', 'testAuthenticationSource');
|
|
||||||
G::RenderPage( 'publish');
|
|
||||||
|
|
||||||
/*
|
|
||||||
require_once('Net/LDAP.php');
|
|
||||||
$rootDn = 'OU=Ventas,DC=colosa,DC=net';
|
|
||||||
$config = array(
|
|
||||||
'dn' => 'scout@colosa.net',
|
|
||||||
'password' => 'Colosa1',
|
|
||||||
'host' => '192.168.0.50',
|
|
||||||
'base' => $rootDn,
|
|
||||||
'options' => array('LDAP_OPT_REFERRALS' => 0),
|
|
||||||
'tls' => false,
|
|
||||||
'port'=> 389
|
|
||||||
);
|
|
||||||
|
|
||||||
$oLdap =& Net_LDAP::connect($config);
|
|
||||||
if (PEAR::isError($oLdap)) {
|
|
||||||
print ( $oLdap->message);
|
|
||||||
return $oLdap;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
$sFilter = '(&(|(objectClass=user)(objectClass=inetOrgPerson)(objectClass=posixAccount))(|(cn=*a*)(mail=*a*)(sAMAccountName=*a*)))';
|
|
||||||
$aParams = array(
|
|
||||||
'scope' => 'sub',
|
|
||||||
'attributes' => array('cn', 'dn', 'samaccountname'),
|
|
||||||
);
|
|
||||||
|
|
||||||
$oResult = $oLdap->search($rootDn, $sFilter, $aParams);
|
|
||||||
if (PEAR::isError($oResult)) {
|
|
||||||
print ( $oLdap->message);
|
|
||||||
return $oResult;
|
|
||||||
}
|
|
||||||
$aRet = array();
|
|
||||||
foreach($oResult->entries() as $oEntry) {
|
|
||||||
$aAttr = $oEntry->attributes();
|
|
||||||
$aAttr['dn'] = $oEntry->dn();
|
|
||||||
$aRet[] = $aAttr;
|
|
||||||
}
|
|
||||||
|
|
||||||
print_r ($aRet);
|
|
||||||
print '<hr>';
|
|
||||||
|
|
||||||
//ahora pedir todos los datos
|
|
||||||
//active directory
|
|
||||||
$aAttributes = array ('cn', 'samaccountname', 'givenname', 'sn', 'userprincipalname', 'telephonenumber');
|
|
||||||
//ldap
|
|
||||||
//$aAttributes = array ('cn', 'uid', 'givenname', 'sn', 'mail', 'mobile');
|
|
||||||
|
|
||||||
$sFilter = '(objectClass=*)';
|
|
||||||
$aParams = array(
|
|
||||||
'scope' => 'base',
|
|
||||||
'attributes' => $aAttributes,
|
|
||||||
);
|
|
||||||
|
|
||||||
$userDn = 'CN=Javier,OU=Ventas,DC=colosa,DC=net';
|
|
||||||
$oResult = $oLdap->search($userDn, $sFilter, $aParams);
|
|
||||||
if (PEAR::isError($oResult)) {
|
|
||||||
print ( $oLdap->message);
|
|
||||||
return $oResult;
|
|
||||||
}
|
|
||||||
$aRet = array();
|
|
||||||
foreach($oResult->entries() as $oEntry) {
|
|
||||||
$aAttr = $oEntry->attributes();
|
|
||||||
$aAttr['dn'] = $oEntry->dn();
|
|
||||||
$aRet[] = $aAttr;
|
|
||||||
}
|
|
||||||
print_r ($aRet);
|
|
||||||
print '<hr>';
|
|
||||||
|
|
||||||
$oLdap =& Net_LDAP::connect($config);
|
|
||||||
if (PEAR::isError($oLdap)) {
|
|
||||||
print ( $oLdap->message);
|
|
||||||
return $oLdap;
|
|
||||||
}
|
|
||||||
$res = $oLdap->reBind('scout@colosa.net', 'Colosa1');
|
|
||||||
|
|
||||||
if (PEAR::isError($res)) {
|
|
||||||
print ( $res->message);
|
|
||||||
return $res;
|
|
||||||
}
|
|
||||||
if ($res === true) {
|
|
||||||
print 'ok';
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
?>
|
|
||||||
@@ -1,33 +0,0 @@
|
|||||||
<?php
|
|
||||||
/**
|
|
||||||
* authenticationList.php
|
|
||||||
*
|
|
||||||
* ProcessMaker Open Source Edition
|
|
||||||
* Copyright (C) 2004 - 2008 Colosa Inc.23
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU Affero General Public License as
|
|
||||||
* published by the Free Software Foundation, either version 3 of the
|
|
||||||
* License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU Affero General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*
|
|
||||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
|
||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
$G_MAIN_MENU = 'rbac';
|
|
||||||
$G_SUB_MENU = 'rbac.authentication';
|
|
||||||
$G_MENU_SELECTED = 2;
|
|
||||||
$canCreateApp = $RBAC->userCanAccess('RBAC_CREATE_APPLICATION' );
|
|
||||||
|
|
||||||
$G_PUBLISH = new Publisher;
|
|
||||||
$G_PUBLISH->AddContent('xmlform', 'pagedTable', 'rbac/authenticationsList', '', array('DELETE' => G::LoadMessageXml('ID_DELETE')), '');
|
|
||||||
G::RenderPage( 'publish');
|
|
||||||
?>
|
|
||||||
@@ -1,92 +0,0 @@
|
|||||||
<?php
|
|
||||||
/**
|
|
||||||
* dbInfo.php
|
|
||||||
*
|
|
||||||
* ProcessMaker Open Source Edition
|
|
||||||
* Copyright (C) 2004 - 2008 Colosa Inc.23
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU Affero General Public License as
|
|
||||||
* published by the Free Software Foundation, either version 3 of the
|
|
||||||
* License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU Affero General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*
|
|
||||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
|
||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
$G_MAIN_MENU = "rbac";
|
|
||||||
$G_BACK_PAGE = "rbac/appList";
|
|
||||||
$G_MENU_SELECTED = 3;
|
|
||||||
|
|
||||||
if ( file_exists ( PATH_METHODS . 'login/version-rbac.php') ) {
|
|
||||||
include ( PATH_METHODS . 'login/version-rbac.php' );
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
define ( 'RBAC_VERSION', "Development Version" );
|
|
||||||
}
|
|
||||||
|
|
||||||
function lookup($target){
|
|
||||||
global $ntarget;
|
|
||||||
$msg = "$target => ";
|
|
||||||
//if( eregi("[a-zA-Z]", $target) )
|
|
||||||
if( preg_match("[a-zA-Z]", $target) ) //Made compatible to PHP 5.3
|
|
||||||
$ntarget = gethostbyname($target);
|
|
||||||
else
|
|
||||||
$ntarget = gethostbyaddr($target);
|
|
||||||
$msg .= $ntarget;
|
|
||||||
return($msg);
|
|
||||||
}
|
|
||||||
$dbc = new DBConnection(DB_HOST, DB_RBAC_USER, DB_RBAC_PASS, DB_RBAC_NAME );
|
|
||||||
$ses = new DBSession ($dbc);
|
|
||||||
$dset = $ses->execute ("SELECT VERSION() AS VERSION ");
|
|
||||||
$row = $dset->Read();
|
|
||||||
|
|
||||||
if (getenv('HTTP_CLIENT_IP')) {
|
|
||||||
$ip = getenv('HTTP_CLIENT_IP');
|
|
||||||
}
|
|
||||||
elseif(getenv('HTTP_X_FORWARDED_FOR')) {
|
|
||||||
$ip = getenv('HTTP_X_FORWARDED_FOR');
|
|
||||||
} else {
|
|
||||||
$ip = getenv('REMOTE_ADDR');
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( file_exists ( "/etc/redhat-release" ) ) {
|
|
||||||
$fnewsize = filesize( "/etc/redhat-release" );
|
|
||||||
$fp = fopen( "/etc/redhat-release" , "r" );
|
|
||||||
$redhat = fread( $fp, $fnewsize );
|
|
||||||
fclose( $fp );
|
|
||||||
}
|
|
||||||
|
|
||||||
$Fields = $dbc->db->dsn;
|
|
||||||
$Fields['SYSTEM'] = $redhat;
|
|
||||||
$Fields['MYSQL'] = $row['VERSION'];
|
|
||||||
$Fields['PHP'] = phpversion();
|
|
||||||
$Fields['FLUID'] = RBAC_VERSION;
|
|
||||||
$Fields['IP'] = lookup ($ip);
|
|
||||||
$Fields['ENVIRONMENT'] = SYS_SYS;
|
|
||||||
$Fields['SERVER_SOFTWARE'] = getenv('SERVER_SOFTWARE');
|
|
||||||
$Fields['SERVER_NAME'] = getenv('SERVER_NAME');
|
|
||||||
$Fields['SERVER_PROTOCOL'] = getenv('SERVER_PROTOCOL');
|
|
||||||
$Fields['SERVER_PORT'] = getenv('SERVER_PORT' );
|
|
||||||
$Fields['REMOTE_HOST'] = getenv('REMOTE_HOST');
|
|
||||||
$Fields['SERVER_ADDR'] = getenv('SERVER_ADDR');
|
|
||||||
$Fields['HTTP_USER_AGENT'] = getenv('HTTP_USER_AGENT');
|
|
||||||
|
|
||||||
|
|
||||||
$Fields['a'] = $dbc;
|
|
||||||
$G_PUBLISH = new Publisher;
|
|
||||||
$G_PUBLISH->SetTo ($dbc);
|
|
||||||
$G_PUBLISH->AddContent ( "xmlform", "xmlform", "rbac/dbInfo", "", $Fields, "appNew2");
|
|
||||||
$content = '';//'';//G::LoadContent( "rbac/myApp" );
|
|
||||||
G::RenderPage( "publish" );
|
|
||||||
|
|
||||||
?>
|
|
||||||
@@ -1,27 +0,0 @@
|
|||||||
<?php
|
|
||||||
/**
|
|
||||||
* loadAuthSource.php
|
|
||||||
*
|
|
||||||
* ProcessMaker Open Source Edition
|
|
||||||
* Copyright (C) 2004 - 2008 Colosa Inc.23
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU Affero General Public License as
|
|
||||||
* published by the Free Software Foundation, either version 3 of the
|
|
||||||
* License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU Affero General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*
|
|
||||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
|
||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
$_SESSION['CURRENT_AUTH_SOURCE'] = $_GET['UID'];
|
|
||||||
header('location: authEdit.htm');
|
|
||||||
?>
|
|
||||||
@@ -1,28 +0,0 @@
|
|||||||
<?php
|
|
||||||
/**
|
|
||||||
* loadPermView.php
|
|
||||||
*
|
|
||||||
* ProcessMaker Open Source Edition
|
|
||||||
* Copyright (C) 2004 - 2008 Colosa Inc.23
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU Affero General Public License as
|
|
||||||
* published by the Free Software Foundation, either version 3 of the
|
|
||||||
* License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU Affero General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*
|
|
||||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
|
||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
if ($_GET['UID'] != "")
|
|
||||||
$_SESSION['CURRENT_APPLICATION'] = isset($_GET['UID'])?$_GET['UID']:'';//$URI_VARS[0];
|
|
||||||
header ("location: permList.htm");
|
|
||||||
?>
|
|
||||||
@@ -1,35 +0,0 @@
|
|||||||
<?php
|
|
||||||
/**
|
|
||||||
* loadRoleProp.php
|
|
||||||
*
|
|
||||||
* ProcessMaker Open Source Edition
|
|
||||||
* Copyright (C) 2004 - 2008 Colosa Inc.23
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU Affero General Public License as
|
|
||||||
* published by the Free Software Foundation, either version 3 of the
|
|
||||||
* License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU Affero General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*
|
|
||||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
|
||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
$_SESSION['CURRENT_ROLE'] = $_GET['ROL_UID'];
|
|
||||||
|
|
||||||
$dbc = new DBConnection(DB_HOST, DB_RBAC_USER, DB_RBAC_PASS, DB_RBAC_NAME);
|
|
||||||
$ses = new DBSession;
|
|
||||||
$ses->SetTo ($dbc);
|
|
||||||
$dset = $ses->Execute('SELECT ROL_APPLICATION FROM USER_ROLE LEFT JOIN ROLE ON (ROL_UID = UID) WHERE ROL_UID = ' . $_SESSION['CURRENT_ROLE']);
|
|
||||||
$row = $dset->Read();
|
|
||||||
$_SESSION['CURRENT_APPLICATION'] = $row['ROL_APPLICATION'];
|
|
||||||
|
|
||||||
header('location: userRoleProp.htm');
|
|
||||||
?>
|
|
||||||
@@ -1,40 +0,0 @@
|
|||||||
<?php
|
|
||||||
/**
|
|
||||||
* loadRoleProp2.php
|
|
||||||
*
|
|
||||||
* ProcessMaker Open Source Edition
|
|
||||||
* Copyright (C) 2004 - 2008 Colosa Inc.23
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU Affero General Public License as
|
|
||||||
* published by the Free Software Foundation, either version 3 of the
|
|
||||||
* License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU Affero General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*
|
|
||||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
|
||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
$rolid = isset($_GET['ROL_UID']) ? $_GET['ROL_UID']:'';
|
|
||||||
if ($rolid != "")
|
|
||||||
$_SESSION['CURRENT_ROLE'] = $rolid;
|
|
||||||
|
|
||||||
$dbc = new DBConnection(DB_HOST, DB_RBAC_USER, DB_RBAC_PASS, DB_RBAC_NAME );
|
|
||||||
|
|
||||||
$ses = new DBSession;
|
|
||||||
$ses->SetTo ($dbc);
|
|
||||||
|
|
||||||
$sql = "select ROL_APPLICATION FROM USER_ROLE LEFT JOIN ROLE ON (ROL_UID = UID) WHERE ROL_UID = $rolid ";
|
|
||||||
$dset = $ses->Execute ($sql);
|
|
||||||
$row = $dset->Read();
|
|
||||||
if (is_array($row) )
|
|
||||||
$_SESSION['CURRENT_APPLICATION'] = $row['ROL_APPLICATION'];
|
|
||||||
header ("location: roleProp.htm");
|
|
||||||
?>
|
|
||||||
@@ -1,28 +0,0 @@
|
|||||||
<?php
|
|
||||||
/**
|
|
||||||
* loadRoleView.php
|
|
||||||
*
|
|
||||||
* ProcessMaker Open Source Edition
|
|
||||||
* Copyright (C) 2004 - 2008 Colosa Inc.23
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU Affero General Public License as
|
|
||||||
* published by the Free Software Foundation, either version 3 of the
|
|
||||||
* License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU Affero General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*
|
|
||||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
|
||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
if ($_GET['UID'] != "")
|
|
||||||
$_SESSION['CURRENT_APPLICATION'] = $_GET['UID'];
|
|
||||||
header('location: roleList.htm');
|
|
||||||
?>
|
|
||||||
@@ -1,27 +0,0 @@
|
|||||||
<?php
|
|
||||||
/**
|
|
||||||
* loadUser.php
|
|
||||||
*
|
|
||||||
* ProcessMaker Open Source Edition
|
|
||||||
* Copyright (C) 2004 - 2008 Colosa Inc.23
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU Affero General Public License as
|
|
||||||
* published by the Free Software Foundation, either version 3 of the
|
|
||||||
* License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU Affero General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*
|
|
||||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
|
||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
$_SESSION['CURRENT_USER'] = $_GET['UID'];
|
|
||||||
header('location: userEdit.htm');
|
|
||||||
?>
|
|
||||||
@@ -1,29 +0,0 @@
|
|||||||
<?php
|
|
||||||
/**
|
|
||||||
* loadUserRole.php
|
|
||||||
*
|
|
||||||
* ProcessMaker Open Source Edition
|
|
||||||
* Copyright (C) 2004 - 2008 Colosa Inc.23
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU Affero General Public License as
|
|
||||||
* published by the Free Software Foundation, either version 3 of the
|
|
||||||
* License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU Affero General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*
|
|
||||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
|
||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
$_GET['UID'] = (int)$_GET['UID'];
|
|
||||||
$_SESSION['CURRENT_USER'] = $_GET['UID'];
|
|
||||||
header('location: userEdit');
|
|
||||||
// header('location: userViewRole');
|
|
||||||
?>
|
|
||||||
@@ -1,31 +0,0 @@
|
|||||||
<table border='0' width='100%' >
|
|
||||||
/**
|
|
||||||
* message.php
|
|
||||||
*
|
|
||||||
* ProcessMaker Open Source Edition
|
|
||||||
* Copyright (C) 2004 - 2008 Colosa Inc.23
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU Affero General Public License as
|
|
||||||
* published by the Free Software Foundation, either version 3 of the
|
|
||||||
* License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU Affero General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*
|
|
||||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
|
||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
<tr height='70'><td class='formLabel' width='60' align='center' >
|
|
||||||
<img src='/js/maborak/core/images/warning.gif'></td><td class='formLabel'>This test will connect to a mail server via SMTP, perform a simple Open Relay Test and verify the server has a reverse DNS (PTR) record.</td></tr>
|
|
||||||
<tr><td colspan='2' align='center'>
|
|
||||||
<input type='button' value='Delete' >
|
|
||||||
<input type='button' value='Cancel' >
|
|
||||||
</td></tr>
|
|
||||||
</table>
|
|
||||||
@@ -1,38 +0,0 @@
|
|||||||
<?php
|
|
||||||
/**
|
|
||||||
* permDel.php
|
|
||||||
*
|
|
||||||
* ProcessMaker Open Source Edition
|
|
||||||
* Copyright (C) 2004 - 2008 Colosa Inc.23
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU Affero General Public License as
|
|
||||||
* published by the Free Software Foundation, either version 3 of the
|
|
||||||
* License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU Affero General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*
|
|
||||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
|
||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
$permid = isset($_GET['UID'])?$_GET['UID']:'';//$URI_VARS[0];
|
|
||||||
|
|
||||||
$dbc = new DBConnection(DB_HOST, DB_RBAC_USER, DB_RBAC_PASS, DB_RBAC_NAME );
|
|
||||||
|
|
||||||
|
|
||||||
//crear Objeto Permission
|
|
||||||
G::LoadClassRBAC ("permissions");
|
|
||||||
$obj = new RBAC_Permission;
|
|
||||||
$obj->SetTo ($dbc);
|
|
||||||
$obj->removePermission ( $permid );
|
|
||||||
|
|
||||||
header( "location: permList.html" );
|
|
||||||
?>
|
|
||||||
@@ -1,48 +0,0 @@
|
|||||||
<?php
|
|
||||||
/**
|
|
||||||
* permEdit.php
|
|
||||||
*
|
|
||||||
* ProcessMaker Open Source Edition
|
|
||||||
* Copyright (C) 2004 - 2008 Colosa Inc.23
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU Affero General Public License as
|
|
||||||
* published by the Free Software Foundation, either version 3 of the
|
|
||||||
* License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU Affero General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*
|
|
||||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
|
||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
$G_MAIN_MENU = "rbac";
|
|
||||||
$G_BACK_PAGE = "rbac/permList";
|
|
||||||
$G_SUB_MENU = "cancel";
|
|
||||||
$G_MENU_SELECTED = 1;
|
|
||||||
|
|
||||||
$uid = isset($_GET['UID'])?$_GET['UID']:'';//$URI_VARS[0];
|
|
||||||
$_SESSION['CURRENT_PERM_PARENT'] = $uid;
|
|
||||||
$dbc = new DBConnection(DB_HOST, DB_RBAC_USER, DB_RBAC_PASS, DB_RBAC_NAME );
|
|
||||||
|
|
||||||
|
|
||||||
G::LoadClassRBAC ("permissions");
|
|
||||||
$obj = new RBAC_Permission;
|
|
||||||
$obj->SetTo ($dbc);
|
|
||||||
$obj->Load($uid);
|
|
||||||
|
|
||||||
$obj->Fields['UID'] = $_SESSION['CURRENT_APPLICATION'];
|
|
||||||
$G_PUBLISH = new Publisher;
|
|
||||||
$G_PUBLISH->SetTo ($dbc);
|
|
||||||
$G_PUBLISH->AddContent ( "xmlform", "xmlform", "rbac/permEdit", "", $obj->Fields, "permEdit2");
|
|
||||||
$content = '';//G::LoadContent( "rbac/myApp" );
|
|
||||||
G::RenderPage( "publish" );
|
|
||||||
|
|
||||||
?>
|
|
||||||
@@ -1,48 +0,0 @@
|
|||||||
<?php
|
|
||||||
/**
|
|
||||||
* permEdit2.php
|
|
||||||
*
|
|
||||||
* ProcessMaker Open Source Edition
|
|
||||||
* Copyright (C) 2004 - 2008 Colosa Inc.23
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU Affero General Public License as
|
|
||||||
* published by the Free Software Foundation, either version 3 of the
|
|
||||||
* License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU Affero General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*
|
|
||||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
|
||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
$frm = $_POST['form'];
|
|
||||||
|
|
||||||
$dbc = new DBConnection(DB_HOST, DB_RBAC_USER, DB_RBAC_PASS, DB_RBAC_NAME );
|
|
||||||
|
|
||||||
|
|
||||||
$permid = $_SESSION['CURRENT_PERM_PARENT'];
|
|
||||||
$appid = $_SESSION['CURRENT_APPLICATION'];
|
|
||||||
$code = strtoupper( $frm['PRM_CODE']);
|
|
||||||
$descrip = $frm['PRM_DESCRIPTION'];
|
|
||||||
|
|
||||||
//crear nuevo permiso
|
|
||||||
G::LoadClassRBAC ( "permissions");
|
|
||||||
$obj = new RBAC_Permission;
|
|
||||||
$obj->SetTo( $dbc );
|
|
||||||
$res = $obj->permissionCodeRepetido ( $code );
|
|
||||||
if ($res != 0 && $res != $permid) {
|
|
||||||
G::SendMessage ( 16, "error");
|
|
||||||
header ("location: permList.php");
|
|
||||||
die;
|
|
||||||
}
|
|
||||||
$uid = $obj->editPermission( $permid, $appid, $code , $descrip );
|
|
||||||
header( "location: permList.html" );
|
|
||||||
?>
|
|
||||||
@@ -1,40 +0,0 @@
|
|||||||
<?php
|
|
||||||
/**
|
|
||||||
* permList.php
|
|
||||||
*
|
|
||||||
* ProcessMaker Open Source Edition
|
|
||||||
* Copyright (C) 2004 - 2008 Colosa Inc.23
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU Affero General Public License as
|
|
||||||
* published by the Free Software Foundation, either version 3 of the
|
|
||||||
* License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU Affero General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*
|
|
||||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
|
||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
$G_MAIN_MENU = "rbac";
|
|
||||||
$G_SUB_MENU = "rbac.appView";
|
|
||||||
$G_MENU_SELECTED = 1;
|
|
||||||
|
|
||||||
$canCreatePerm = $RBAC->userCanAccess("RBAC_CREATE_PERMISSION" );
|
|
||||||
|
|
||||||
$dbc = new DBConnection(DB_HOST, DB_RBAC_USER, DB_RBAC_PASS, DB_RBAC_NAME );
|
|
||||||
|
|
||||||
$G_PUBLISH = new Publisher;
|
|
||||||
$G_PUBLISH->SetTo ($dbc);
|
|
||||||
$G_PUBLISH->AddContent ( "view", "treePerm");
|
|
||||||
$content = '';//G::LoadContent( "rbac/myApp" );
|
|
||||||
G::RenderPage( "publish" );
|
|
||||||
|
|
||||||
?>
|
|
||||||
@@ -1,56 +0,0 @@
|
|||||||
<?php
|
|
||||||
/**
|
|
||||||
* permNew.php
|
|
||||||
*
|
|
||||||
* ProcessMaker Open Source Edition
|
|
||||||
* Copyright (C) 2004 - 2008 Colosa Inc.23
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU Affero General Public License as
|
|
||||||
* published by the Free Software Foundation, either version 3 of the
|
|
||||||
* License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU Affero General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*
|
|
||||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
|
||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
$G_MAIN_MENU = "rbac";
|
|
||||||
$G_BACK_PAGE = "rbac/permList";
|
|
||||||
$G_SUB_MENU = "cancel";
|
|
||||||
$G_MENU_SELECTED = 1;
|
|
||||||
|
|
||||||
$permid = isset($_GET['UID'])?$_GET['UID']:'';//$URI_VARS[0];
|
|
||||||
$HTTP_SESSION_VARS['CURRENT_PERM_PARENT'] = $permid;
|
|
||||||
|
|
||||||
$dbc = new DBConnection(DB_HOST, DB_RBAC_USER, DB_RBAC_PASS, DB_RBAC_NAME );
|
|
||||||
|
|
||||||
$G_PUBLISH = new Publisher;
|
|
||||||
$G_PUBLISH->SetTo ($dbc);
|
|
||||||
|
|
||||||
$fields['APPID'] = $_SESSION['CURRENT_APPLICATION'];
|
|
||||||
if ( PEAR_DATABASE == 'pgsql' ) {
|
|
||||||
$CONCAT1 = "APP_CODE || \" - \" || APP_DESCRIPTION ";
|
|
||||||
$CONCAT2 = "PRM_CODE || \" - \" || PRM_DESCRIPTION ";
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
$CONCAT1 = "CONCAT(APP_CODE,\" - \",APP_DESCRIPTION) ";
|
|
||||||
$CONCAT2 = "CONCAT(PRM_CODE,\" - \",PRM_DESCRIPTION) ";
|
|
||||||
}
|
|
||||||
$fields['CONCAT1'] = $CONCAT1;
|
|
||||||
$fields['CONCAT2'] = $CONCAT2;
|
|
||||||
$fields['PERMID'] = $permid;
|
|
||||||
|
|
||||||
$G_PUBLISH->AddContent ( "xmlform", "xmlform", "rbac/permNew", "", $fields, "permNew2");
|
|
||||||
$content = '';//G::LoadContent( "rbac/myApp" );
|
|
||||||
G::RenderPage( "publish" );
|
|
||||||
|
|
||||||
?>
|
|
||||||
@@ -1,48 +0,0 @@
|
|||||||
<?php
|
|
||||||
/**
|
|
||||||
* permNew2.php
|
|
||||||
*
|
|
||||||
* ProcessMaker Open Source Edition
|
|
||||||
* Copyright (C) 2004 - 2008 Colosa Inc.23
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU Affero General Public License as
|
|
||||||
* published by the Free Software Foundation, either version 3 of the
|
|
||||||
* License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU Affero General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*
|
|
||||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
|
||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
$frm = $_POST['form'];
|
|
||||||
|
|
||||||
$dbc = new DBConnection(DB_HOST, DB_RBAC_USER, DB_RBAC_PASS, DB_RBAC_NAME );
|
|
||||||
|
|
||||||
|
|
||||||
$parent = $_SESSION['CURRENT_PERM_PARENT'];
|
|
||||||
$appid = $_SESSION['CURRENT_APPLICATION'];
|
|
||||||
$code = strtoupper( $frm['PRM_CODE']);
|
|
||||||
$descrip = $frm['PRM_DESCRIPTION'];
|
|
||||||
|
|
||||||
//crear nuevo permiso
|
|
||||||
G::LoadClassRBAC ( "permissions");
|
|
||||||
$obj = new RBAC_Permission;
|
|
||||||
$obj->SetTo( $dbc );
|
|
||||||
$res = $obj->permissionCodeRepetido ( $code );
|
|
||||||
if ($res != 0 ) {
|
|
||||||
G::SendMessage ( 16, "error");
|
|
||||||
header ("location: permList.php");
|
|
||||||
die;
|
|
||||||
}
|
|
||||||
$uid = $obj->createPermission( $parent, $appid, $code , $descrip );
|
|
||||||
header( "location: permList.html" );
|
|
||||||
?>
|
|
||||||
@@ -1,38 +0,0 @@
|
|||||||
<?php
|
|
||||||
/**
|
|
||||||
* roleDel.php
|
|
||||||
*
|
|
||||||
* ProcessMaker Open Source Edition
|
|
||||||
* Copyright (C) 2004 - 2008 Colosa Inc.23
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU Affero General Public License as
|
|
||||||
* published by the Free Software Foundation, either version 3 of the
|
|
||||||
* License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU Affero General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*
|
|
||||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
|
||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
$roleid = isset($_GET[0])?$_GET[0]:'';//$URI_VARS[0];
|
|
||||||
|
|
||||||
$dbc = new DBConnection(DB_HOST, DB_RBAC_USER, DB_RBAC_PASS, DB_RBAC_NAME );
|
|
||||||
|
|
||||||
|
|
||||||
//crear Objeto Roles
|
|
||||||
G::LoadClassRBAC ("roles");
|
|
||||||
$obj = new RBAC_Role;
|
|
||||||
$obj->SetTo ($dbc);
|
|
||||||
$obj->removeRole ( $roleid );
|
|
||||||
|
|
||||||
header( "location: roleList.html" );
|
|
||||||
?>
|
|
||||||
@@ -1,52 +0,0 @@
|
|||||||
<?php
|
|
||||||
/**
|
|
||||||
* roleEdit.php
|
|
||||||
*
|
|
||||||
* ProcessMaker Open Source Edition
|
|
||||||
* Copyright (C) 2004 - 2008 Colosa Inc.23
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU Affero General Public License as
|
|
||||||
* published by the Free Software Foundation, either version 3 of the
|
|
||||||
* License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU Affero General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*
|
|
||||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
|
||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
$G_MAIN_MENU = "rbac";
|
|
||||||
$G_BACK_PAGE = "rbac/roleList";
|
|
||||||
$G_SUB_MENU = "cancel";
|
|
||||||
$G_MENU_SELECTED = 1;
|
|
||||||
|
|
||||||
$uid = isset($_GET[0])?$_GET[0]:'';//$URI_VARS[0];
|
|
||||||
$_SESSION['CURRENT_ROLE_PARENT'] = $uid;
|
|
||||||
$dbc = new DBConnection(DB_HOST, DB_RBAC_USER, DB_RBAC_PASS, DB_RBAC_NAME );
|
|
||||||
|
|
||||||
|
|
||||||
G::LoadClassRBAC ("roles");
|
|
||||||
$obj = new RBAC_Role;
|
|
||||||
$obj->SetTo ($dbc);
|
|
||||||
$obj->Load($uid);
|
|
||||||
|
|
||||||
$obj->Fields['EDIT_ROLES'] = G::LoadMessageXml ('ID_ROLES');
|
|
||||||
$obj->Fields['EDIT_PERMISSIONS'] = G::LoadMessageXml ('ID_PERMISSIONS');
|
|
||||||
|
|
||||||
$G_PUBLISH = new Publisher;
|
|
||||||
$G_PUBLISH->SetTo ($dbc);
|
|
||||||
$fields = $obj->Fields;
|
|
||||||
$fields['CURRENT_APPLICATION'] = $_SESSION['CURRENT_APPLICATION'];
|
|
||||||
$G_PUBLISH->AddContent ( "xmlform", "xmlform", "rbac/roleEdit", "", $fields, "roleEdit2");
|
|
||||||
$content = '';//G::LoadContent( "rbac/myApp" );
|
|
||||||
G::RenderPage( "publish" );
|
|
||||||
|
|
||||||
?>
|
|
||||||
@@ -1,47 +0,0 @@
|
|||||||
<?php
|
|
||||||
/**
|
|
||||||
* roleEdit2.php
|
|
||||||
*
|
|
||||||
* ProcessMaker Open Source Edition
|
|
||||||
* Copyright (C) 2004 - 2008 Colosa Inc.23
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU Affero General Public License as
|
|
||||||
* published by the Free Software Foundation, either version 3 of the
|
|
||||||
* License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU Affero General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*
|
|
||||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
|
||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
$frm = $_POST['form'];
|
|
||||||
|
|
||||||
$dbc = new DBConnection(DB_HOST, DB_RBAC_USER, DB_RBAC_PASS, DB_RBAC_NAME );
|
|
||||||
|
|
||||||
$roleid = $_SESSION['CURRENT_ROLE_PARENT'];
|
|
||||||
$appid = $_SESSION['CURRENT_APPLICATION'];
|
|
||||||
$code = strtoupper( $frm['ROL_CODE']);
|
|
||||||
$descrip = $frm['ROL_DESCRIPTION'];
|
|
||||||
|
|
||||||
//crear nuevo rol
|
|
||||||
G::LoadClassRBAC ( "roles");
|
|
||||||
$obj = new RBAC_Role;
|
|
||||||
$obj->SetTo( $dbc );
|
|
||||||
$res = $obj->roleCodeRepetido ( $code );
|
|
||||||
if ($res != 0 && $res != $roleid) {
|
|
||||||
G::SendMessage ( 14, "error");
|
|
||||||
header ("location: roleList.php");
|
|
||||||
die;
|
|
||||||
}
|
|
||||||
$uid = $obj->editRole( $roleid, $appid, $code , $descrip );
|
|
||||||
header( "location: roleList.html" );
|
|
||||||
?>
|
|
||||||
@@ -1,38 +0,0 @@
|
|||||||
<?php
|
|
||||||
/**
|
|
||||||
* roleList.php
|
|
||||||
*
|
|
||||||
* ProcessMaker Open Source Edition
|
|
||||||
* Copyright (C) 2004 - 2008 Colosa Inc.23
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU Affero General Public License as
|
|
||||||
* published by the Free Software Foundation, either version 3 of the
|
|
||||||
* License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU Affero General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*
|
|
||||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
|
||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
$G_MAIN_MENU = "rbac";
|
|
||||||
$G_SUB_MENU = "rbac.role";
|
|
||||||
$G_MENU_SELECTED = 1;
|
|
||||||
|
|
||||||
$canCreateRole = $RBAC->userCanAccess("RBAC_CREATE_ROLE" );
|
|
||||||
$dbc = new DBConnection(DB_HOST, DB_RBAC_USER, DB_RBAC_PASS, DB_RBAC_NAME );
|
|
||||||
|
|
||||||
$G_PUBLISH = new Publisher;
|
|
||||||
$G_PUBLISH->SetTo ($dbc);
|
|
||||||
$G_PUBLISH->AddContent ( "view", "treeRole");
|
|
||||||
$content = '';//G::LoadContent( "rbac/myApp" );
|
|
||||||
G::RenderPage( "publish" );
|
|
||||||
|
|
||||||
?>
|
|
||||||
@@ -1,63 +0,0 @@
|
|||||||
<?php
|
|
||||||
/**
|
|
||||||
* roleNew.php
|
|
||||||
*
|
|
||||||
* ProcessMaker Open Source Edition
|
|
||||||
* Copyright (C) 2004 - 2008 Colosa Inc.23
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU Affero General Public License as
|
|
||||||
* published by the Free Software Foundation, either version 3 of the
|
|
||||||
* License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU Affero General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*
|
|
||||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
|
||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
$G_MAIN_MENU = "rbac";
|
|
||||||
$G_BACK_PAGE = "rbac/roleList";
|
|
||||||
$G_SUB_MENU = "cancel";
|
|
||||||
$G_MENU_SELECTED = 1;
|
|
||||||
|
|
||||||
if (!isset($_GET[0])) {
|
|
||||||
$parent = "0";
|
|
||||||
$postFile = "roleNew2";
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
$parent = isset($_GET[0])?$_GET[0]:'';//$URI_VARS[0];
|
|
||||||
$postFile = "roleNew2";
|
|
||||||
}
|
|
||||||
|
|
||||||
$_SESSION ['CURRENT_ROLE_PARENT'] = $parent;
|
|
||||||
$dbc = new DBConnection(DB_HOST, DB_RBAC_USER, DB_RBAC_PASS, DB_RBAC_NAME );
|
|
||||||
|
|
||||||
$G_PUBLISH = new Publisher;
|
|
||||||
$G_PUBLISH->SetTo ($dbc);
|
|
||||||
|
|
||||||
if ( PEAR_DATABASE == 'pgsql' ) {
|
|
||||||
$concat1 = 'APP_CODE || " - " || APP_DESCRIPTION';
|
|
||||||
$concat2 = 'ROL_CODE || " - " || ROL_DESCRIPTION';
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
$concat1 = 'CONCAT(APP_CODE," - ",APP_DESCRIPTION)';
|
|
||||||
$concat2 = 'CONCAT(ROL_CODE," - ",ROL_DESCRIPTION)';
|
|
||||||
}
|
|
||||||
|
|
||||||
$fields['APPID'] = $_SESSION['CURRENT_APPLICATION'];
|
|
||||||
$fields['ROLID'] = $_SESSION['CURRENT_ROLE_PARENT'];
|
|
||||||
$fields['CONCAT1'] = $concat1;
|
|
||||||
$fields['CONCAT2'] = $concat2;
|
|
||||||
$G_PUBLISH->AddContent ( "xmlform", "xmlform", "rbac/roleNew", "", $fields, $postFile );
|
|
||||||
$content = '';//G::LoadContent( "rbac/myApp" );
|
|
||||||
G::RenderPage( "publish" );
|
|
||||||
|
|
||||||
?>
|
|
||||||
@@ -1,49 +0,0 @@
|
|||||||
<?php
|
|
||||||
/**
|
|
||||||
* roleNew2.php
|
|
||||||
*
|
|
||||||
* ProcessMaker Open Source Edition
|
|
||||||
* Copyright (C) 2004 - 2008 Colosa Inc.23
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU Affero General Public License as
|
|
||||||
* published by the Free Software Foundation, either version 3 of the
|
|
||||||
* License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU Affero General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*
|
|
||||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
|
||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
$frm = $_POST['form'];
|
|
||||||
|
|
||||||
$dbc = new DBConnection(DB_HOST, DB_RBAC_USER, DB_RBAC_PASS, DB_RBAC_NAME );
|
|
||||||
|
|
||||||
|
|
||||||
$parent = $_SESSION['CURRENT_ROLE_PARENT'];
|
|
||||||
$appid = $_SESSION['CURRENT_APPLICATION'];
|
|
||||||
$code = strtoupper( $frm['ROL_CODE']);
|
|
||||||
$descrip = $frm['ROL_DESCRIPTION'];
|
|
||||||
|
|
||||||
//crear nuevo ROL
|
|
||||||
G::LoadClassRBAC ( "roles");
|
|
||||||
$obj = new RBAC_Role;
|
|
||||||
$obj->SetTo( $dbc );
|
|
||||||
$res = $obj->roleCodeRepetido( $code );
|
|
||||||
if ($res != 0 ) {
|
|
||||||
G::SendMessage (14, "error");
|
|
||||||
header ("location: roleList.php");
|
|
||||||
die;
|
|
||||||
}
|
|
||||||
|
|
||||||
$uid = $obj->createRole( $parent, $appid, $code , $descrip );
|
|
||||||
header( "location: roleList.html" );
|
|
||||||
?>
|
|
||||||
@@ -1,56 +0,0 @@
|
|||||||
<?php
|
|
||||||
/**
|
|
||||||
* roleProp.php
|
|
||||||
*
|
|
||||||
* ProcessMaker Open Source Edition
|
|
||||||
* Copyright (C) 2004 - 2008 Colosa Inc.23
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU Affero General Public License as
|
|
||||||
* published by the Free Software Foundation, either version 3 of the
|
|
||||||
* License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU Affero General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*
|
|
||||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
|
||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
$G_MAIN_MENU = "rbac";
|
|
||||||
$G_SUB_MENU = "rbac.appView";
|
|
||||||
$G_MENU_SELECTED = 1;
|
|
||||||
|
|
||||||
$permid = isset($_GET[0])?$_GET[0]:'';//$URI_VARS[0];
|
|
||||||
$rolid = $_SESSION['CURRENT_ROLE'];
|
|
||||||
|
|
||||||
G::LoadClassRBAC ( "roles" );
|
|
||||||
G::LoadClassRBAC ( "user" );
|
|
||||||
$dbc = new DBConnection(DB_HOST, DB_RBAC_USER, DB_RBAC_PASS, DB_RBAC_NAME );
|
|
||||||
|
|
||||||
|
|
||||||
$canCreateRole = $RBAC->userCanAccess("RBAC_CREATE_PERMISSION" );
|
|
||||||
$obj = New RBAC_role;
|
|
||||||
$obj->SetTo ($dbc);
|
|
||||||
$parents = $obj->GetAllParents($rolid);
|
|
||||||
$_SESSION['CURRENT_ROLE_PARENTS'] = $parents;
|
|
||||||
|
|
||||||
if ( $permid != "" ) {
|
|
||||||
$obj->flipFlopRole($rolid, $permid);
|
|
||||||
}
|
|
||||||
|
|
||||||
$dbc = new DBConnection(DB_HOST, DB_RBAC_USER, DB_RBAC_PASS, DB_RBAC_NAME );
|
|
||||||
|
|
||||||
$G_PUBLISH = new Publisher;
|
|
||||||
$G_PUBLISH->SetTo ($dbc);
|
|
||||||
$G_PUBLISH->AddContent ( "view", "treePermRole");
|
|
||||||
$content = '';//G::LoadContent( "rbac/myApp" );
|
|
||||||
G::RenderPage( "publish" );
|
|
||||||
|
|
||||||
?>
|
|
||||||
@@ -1,206 +0,0 @@
|
|||||||
<?php
|
|
||||||
/**
|
|
||||||
* showFieldAjax.php
|
|
||||||
*
|
|
||||||
* ProcessMaker Open Source Edition
|
|
||||||
* Copyright (C) 2004 - 2008 Colosa Inc.23
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU Affero General Public License as
|
|
||||||
* published by the Free Software Foundation, either version 3 of the
|
|
||||||
* License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU Affero General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*
|
|
||||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
|
||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
global $HTTP_SESSION_VARS;
|
|
||||||
global $G_FORM;
|
|
||||||
|
|
||||||
G::LoadInclude ( 'ajax' );
|
|
||||||
/*
|
|
||||||
if(isset($HTTP_SESSION_VARS['CURRENT_APPLICATION'])){
|
|
||||||
if ($HTTP_GET_VARS['__dynaform__'] == '')
|
|
||||||
$filename = $HTTP_SESSION_VARS['CURRENT_REQ_DYNAFORM_FILENAME'];
|
|
||||||
if ($HTTP_GET_VARS['__filename__'] != '')
|
|
||||||
$filename = $HTTP_GET_VARS['__filename__'];
|
|
||||||
|
|
||||||
$Connection = new DBConnection;
|
|
||||||
$ses = new DBSession($Connection);
|
|
||||||
|
|
||||||
if ($HTTP_GET_VARS['__dynaform__'] == '') {
|
|
||||||
$Dataset = $ses->Execute("SELECT UID FROM REQ_DYNAFORM WHERE REQ_FILENAME = '$filename' AND UID_PROCESS = '" . $HTTP_SESSION_VARS['PROCESS_GUID']."'");
|
|
||||||
$Row = $Dataset->Read();
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
$Dataset = $ses->Execute('SELECT REQ_FILENAME FROM REQ_DYNAFORM WHERE UID = "' . $HTTP_GET_VARS['__dynaform__'].'"');
|
|
||||||
$Row = $Dataset->Read();
|
|
||||||
|
|
||||||
$filename = $Row['REQ_FILENAME'];
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($HTTP_GET_VARS['__dynaform__'] == '')
|
|
||||||
$HTTP_SESSION_VARS['CURRENT_REQ_DYNAFORM'] = $Row['UID'];
|
|
||||||
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
$filename = 'rbac/userAssignRole';
|
|
||||||
|
|
||||||
|
|
||||||
$fieldName = get_ajax_value( 'field' );
|
|
||||||
$fieldValue = get_ajax_value( 'value' );
|
|
||||||
$fieldParent = get_ajax_value( 'parent' );
|
|
||||||
$function = get_ajax_value( 'function' );
|
|
||||||
$appid = get_ajax_value( 'application' );
|
|
||||||
$Dynaform = get_ajax_value( 'Dynaform' );
|
|
||||||
$InitValue = get_ajax_value( 'InitValue' );
|
|
||||||
|
|
||||||
switch ( $function ) {
|
|
||||||
case 'text' : fillText( $fieldName, $fieldParent, $fieldValue, $appid, $filename ); break;
|
|
||||||
case 'dropdown' : fillDropdown( $fieldName, $fieldParent, $fieldValue, $appid, $filename,$InitValue ); break;
|
|
||||||
default : echo'<small>none</small>';
|
|
||||||
}
|
|
||||||
function fillCaption ( $fieldName,$fieldParent, $valueRecived, $appid, $filename) {
|
|
||||||
$options = reload( $fieldName,$fieldParent, $valueRecived, $appid,$filename );
|
|
||||||
header("Content-Type: text/xml");
|
|
||||||
print '<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<data>
|
|
||||||
<value>' . $value . '</value>
|
|
||||||
</data>';
|
|
||||||
// <value>' . utf8_encode($value) . '</value>
|
|
||||||
}
|
|
||||||
function fillText ( $fieldName,$fieldParent, $valueRecived, $appid, $filename) {
|
|
||||||
$options = reload( $fieldName,$fieldParent, $valueRecived, $appid,$filename );
|
|
||||||
$value = "_vacio";
|
|
||||||
if(is_array($options))
|
|
||||||
foreach($options as $key => $val){
|
|
||||||
$value = $val;
|
|
||||||
}
|
|
||||||
header("Content-Type: text/xml");
|
|
||||||
print '<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<data>
|
|
||||||
<value>' . $value . '</value>
|
|
||||||
</data>';
|
|
||||||
|
|
||||||
// <value>'.utf8_encode($value).'</value>
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
function fillDropdown ( $fieldName,$fieldParent, $valueRecived, $appid,$filename, $InitValue ) {
|
|
||||||
|
|
||||||
global $HTTP_SESSION_VARS;
|
|
||||||
$options = reload( $fieldName,$fieldParent, $valueRecived, $appid,$filename);
|
|
||||||
if(is_array($options))
|
|
||||||
foreach($options as $key => $val){
|
|
||||||
$value .= '<item value="'.$key.'">' . $val .'</item> ';
|
|
||||||
// $value .= '<item value="'.$key.'">'.utf8_encode($val) .'</item> ';
|
|
||||||
}
|
|
||||||
if($value == ""){
|
|
||||||
$value = "_vacio";
|
|
||||||
}else{
|
|
||||||
if($InitValue == 'true'){
|
|
||||||
if(isset($HTTP_SESSION_VARS['INIT_VALUES'][$fieldName])){
|
|
||||||
// $value .= '<item value="Init_Values">' . utf8_encode($HTTP_SESSION_VARS['INIT_VALUES'][$fieldName]) .'</item> ';
|
|
||||||
$value .= '<item value="Init_Values">' . $HTTP_SESSION_VARS['INIT_VALUES'][$fieldName] .'</item> ';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
//$value = '<item value="1">'.$HTTP_SESSION_VARS['INIT_VALUES'][$fieldName].'</item> ';
|
|
||||||
//$value = '<item value="1">HOLA</item> ';
|
|
||||||
//header("Content-Type: text/xml");
|
|
||||||
//header("Content-type: text/xml;charset=UTF-8");
|
|
||||||
header('Content-Type: text/xml; charset=UTF-8');
|
|
||||||
print '<?xml version="1.0" encoding="UTF-8"?>';
|
|
||||||
print '<data>'.$value.'</data>';
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
function LoadOptions( $stQry , $dbc )
|
|
||||||
{
|
|
||||||
|
|
||||||
$stQry = str_replace("''''", "''", $stQry);
|
|
||||||
|
|
||||||
//cuando la conexion es normal... se intenta realizar el query
|
|
||||||
$dses = new DBSession;
|
|
||||||
$dses->SetTo( $dbc );
|
|
||||||
$dses->UseDB( DB_NAME );
|
|
||||||
$dset = $dses->Execute($stQry, false, 3 );
|
|
||||||
$data = $dset->ReadAbsolute();
|
|
||||||
|
|
||||||
while( $data )
|
|
||||||
{
|
|
||||||
$key = $data[0];
|
|
||||||
$val = $data[1];
|
|
||||||
$result[$key] = $val;
|
|
||||||
$data = $dset->ReadAbsolute();
|
|
||||||
}
|
|
||||||
return $result;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function reload( $fieldName,$fieldParent, $valueRecived, $appid, $filename){
|
|
||||||
global $HTTP_SESSION_VARS;
|
|
||||||
$G_FORM = new Form;
|
|
||||||
G::LoadSystem("xmlform");
|
|
||||||
G::LoadClass("dynaform");
|
|
||||||
$fieldNew[$fieldParent] = $valueRecived;
|
|
||||||
$Connection = new DBConnection(DB_HOST, DB_RBAC_USER, DB_RBAC_PASS, DB_RBAC_NAME );;
|
|
||||||
$ses = new DBSession($Connection);
|
|
||||||
$xml = new Xmlform;
|
|
||||||
$vars = explode('][',$fieldName);
|
|
||||||
if(is_array($vars)){
|
|
||||||
$cant = count($vars);
|
|
||||||
$fieldName = $vars[$cant-1];
|
|
||||||
if ($cant > 1)
|
|
||||||
$filename = $vars[0];
|
|
||||||
}
|
|
||||||
$vars2 = explode('][',$fieldParent);
|
|
||||||
if(is_array($vars2)){
|
|
||||||
$cant2 = count($vars2);
|
|
||||||
$fieldParent = $vars2[$cant2-1];
|
|
||||||
|
|
||||||
}
|
|
||||||
$v = $filename;
|
|
||||||
$xml->home = PATH_XMLFORM;
|
|
||||||
|
|
||||||
$fieldXmlform = $xml->parseXmlformToArray ($v);
|
|
||||||
|
|
||||||
$fieldNew[$fieldParent] = $fieldXmlform[$fieldName][defaultvalue];
|
|
||||||
if($valueRecived != '') $fieldNew[$fieldParent] = $valueRecived;
|
|
||||||
$qry = stripslashes($fieldXmlform[$fieldName][Sql]);
|
|
||||||
$fieldNew[$fieldParent] = $fieldXmlform[$fieldName][defaultvalue];
|
|
||||||
if($valueRecived != '') $fieldNew[$fieldParent] = $valueRecived;
|
|
||||||
|
|
||||||
if($qry != ''){
|
|
||||||
$conexion = $fieldXmlform[$fieldName][sqlconnection];
|
|
||||||
G::LoadClass('dynaform');
|
|
||||||
$myDyna = new Dynaform($Connection);
|
|
||||||
$fieldsBase = array();
|
|
||||||
|
|
||||||
if ($HTTP_SESSION_VARS['CURRENT_APPLICATION'] != "0")
|
|
||||||
$fieldsBase = $myDyna->getFieldsDefaultDynaform( $appid, 0 );
|
|
||||||
if ( $appid != "" ) {
|
|
||||||
$Fields = G::array_merges ( $fieldsBase, $fieldNew );
|
|
||||||
$qry = $myDyna->replaceTextWithFields($qry, $Fields);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
$qry = "Select '1', 'dynamically filled' ";
|
|
||||||
|
|
||||||
|
|
||||||
eval ( '$Result = "$qry "; ' );
|
|
||||||
$options = LoadOptions ( $Result , $Connection );
|
|
||||||
}
|
|
||||||
return $options;
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
@@ -1,70 +0,0 @@
|
|||||||
<?php
|
|
||||||
/**
|
|
||||||
* userAssignRole.php
|
|
||||||
*
|
|
||||||
* ProcessMaker Open Source Edition
|
|
||||||
* Copyright (C) 2004 - 2008 Colosa Inc.23
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU Affero General Public License as
|
|
||||||
* published by the Free Software Foundation, either version 3 of the
|
|
||||||
* License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU Affero General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*
|
|
||||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
|
||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
//$G_MAIN_MENU = 'rbac';
|
|
||||||
//$G_SUB_MENU = 'rbac.userView';
|
|
||||||
//$G_MENU_SELECTED = 0;
|
|
||||||
//$G_SUB_MENU_SELECTED = 3;
|
|
||||||
|
|
||||||
unset($_SESSION['CURRENT_APPLICATION']);
|
|
||||||
G::LoadClassRBAC('user');
|
|
||||||
$dbc = new DBConnection(DB_HOST, DB_RBAC_USER, DB_RBAC_PASS, DB_RBAC_NAME);
|
|
||||||
|
|
||||||
$obj = new RBAC_user;
|
|
||||||
$obj->SetTo($dbc);
|
|
||||||
$access = $RBAC->userCanAccess('RBAC_CREATE_USERS');
|
|
||||||
|
|
||||||
$obj->SetTo($dbc);
|
|
||||||
$obj->Load($_SESSION['CURRENT_USER']);
|
|
||||||
$useLdap = $obj->Fields['USR_USE_LDAP'] == 'Y';
|
|
||||||
|
|
||||||
$ses = new DBSession;
|
|
||||||
$ses->SetTo ($dbc);
|
|
||||||
|
|
||||||
$stQry = 'SELECT ROL_APPLICATION FROM USER_ROLE LEFT JOIN ROLE AS R ON (ROL_UID = R.UID) WHERE USR_UID = ' . $_SESSION['CURRENT_USER'];
|
|
||||||
$dset = $ses->Execute($stQry);
|
|
||||||
$row = $dset->Read();
|
|
||||||
$inApps = '(0';
|
|
||||||
while (is_array($row))
|
|
||||||
{
|
|
||||||
$inApps .= ', ' . (int)$row['ROL_APPLICATION'];
|
|
||||||
$row = $dset->Read();
|
|
||||||
}
|
|
||||||
$inApps .= ')';
|
|
||||||
$obj->Fields['INAPPS'] = $inApps;
|
|
||||||
|
|
||||||
$stQry = 'SELECT COUNT(*) AS CANT FROM APPLICATION WHERE UID NOT IN ' . $inApps;
|
|
||||||
$dset = $ses->Execute($stQry);
|
|
||||||
$row = $dset->Read();
|
|
||||||
|
|
||||||
$G_PUBLISH = new Publisher;
|
|
||||||
$G_PUBLISH->SetTo ($dbc);
|
|
||||||
|
|
||||||
if ( $row['CANT'] > 0 )
|
|
||||||
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'rbac/userAssignRole', '', $obj->Fields, 'userAssignRole2');
|
|
||||||
else
|
|
||||||
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'rbac/noMoreRolesAvailable', '', $obj->Fields, 'userViewRole');
|
|
||||||
|
|
||||||
G::RenderPage( 'publish', 'blank');
|
|
||||||
?>
|
|
||||||
@@ -1,37 +0,0 @@
|
|||||||
<?php
|
|
||||||
/**
|
|
||||||
* userAssignRole2.php
|
|
||||||
*
|
|
||||||
* ProcessMaker Open Source Edition
|
|
||||||
* Copyright (C) 2004 - 2008 Colosa Inc.23
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU Affero General Public License as
|
|
||||||
* published by the Free Software Foundation, either version 3 of the
|
|
||||||
* License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU Affero General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*
|
|
||||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
|
||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
$frm = $_POST['form'];
|
|
||||||
$rolid = $frm['USR_ROLE'];
|
|
||||||
$dbc = new DBConnection(DB_HOST, DB_RBAC_USER, DB_RBAC_PASS, DB_RBAC_NAME );
|
|
||||||
G::LoadClassRBAC('user');
|
|
||||||
$obj = new RBAC_User;
|
|
||||||
$obj->SetTo($dbc);
|
|
||||||
$obj->assignUserRole($_SESSION['CURRENT_USER'], $rolid);
|
|
||||||
//header('location: userViewRole.html');
|
|
||||||
?>
|
|
||||||
<script language='Javascript'>
|
|
||||||
//parent.myPanel.remove();
|
|
||||||
parent.window.location = 'userEdit.html';
|
|
||||||
</script>
|
|
||||||
@@ -1,51 +0,0 @@
|
|||||||
<?php
|
|
||||||
/**
|
|
||||||
* userChangeLdap.php
|
|
||||||
*
|
|
||||||
* ProcessMaker Open Source Edition
|
|
||||||
* Copyright (C) 2004 - 2008 Colosa Inc.23
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU Affero General Public License as
|
|
||||||
* published by the Free Software Foundation, either version 3 of the
|
|
||||||
* License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU Affero General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*
|
|
||||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
|
||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
$G_MAIN_MENU = "rbac";
|
|
||||||
$G_SUB_MENU = "rbac.userEdit";
|
|
||||||
$G_MENU_SELECTED = 0;
|
|
||||||
|
|
||||||
$uid = $HTTP_SESSION_VARS['CURRENT_USER'];
|
|
||||||
|
|
||||||
$dbc = new DBConnection(DB_HOST, DB_RBAC_USER, DB_RBAC_PASS, DB_RBAC_NAME );
|
|
||||||
$ses = new DBSession ( $dbc );
|
|
||||||
|
|
||||||
$stQry = "SELECT UID, USR_USE_LDAP FROM USERS where UID = $uid ";
|
|
||||||
$dset = $ses->Execute ( $stQry );
|
|
||||||
$row = $dset->Read();
|
|
||||||
$useLdap = $row['USR_USE_LDAP'] == 'Y';
|
|
||||||
|
|
||||||
$access = $RBAC->userCanAccess ("RBAC_CREATE_USERS");
|
|
||||||
|
|
||||||
G::LoadClassRBAC ("user");
|
|
||||||
$obj = new RBAC_User;
|
|
||||||
$obj->SetTo ($dbc);
|
|
||||||
$obj->Load ($uid);
|
|
||||||
|
|
||||||
$G_PUBLISH = new Publisher;
|
|
||||||
$G_PUBLISH->SetTo ($dbc);
|
|
||||||
$G_PUBLISH->AddContent ( "xmlform", "xmlform", "rbac/userChangeLdap", "", $obj->Fields, "userChangeLdap2");
|
|
||||||
G::RenderPage( "publish" );
|
|
||||||
?>
|
|
||||||
@@ -1,44 +0,0 @@
|
|||||||
<?php
|
|
||||||
/**
|
|
||||||
* userChangeLdap2.php
|
|
||||||
*
|
|
||||||
* ProcessMaker Open Source Edition
|
|
||||||
* Copyright (C) 2004 - 2008 Colosa Inc.23
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU Affero General Public License as
|
|
||||||
* published by the Free Software Foundation, either version 3 of the
|
|
||||||
* License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU Affero General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*
|
|
||||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
|
||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
$frm = $_POST['form'];
|
|
||||||
//$frm = G::PrepareFormArray( $frm );
|
|
||||||
|
|
||||||
$use = $frm['USR_USE_LDAP'];
|
|
||||||
$source = $frm['USR_LDAP_SOURCE'];
|
|
||||||
$dn = $frm['USR_LDAP_DN'];
|
|
||||||
|
|
||||||
$uid = $HTTP_SESSION_VARS['CURRENT_USER'];
|
|
||||||
$dbc = new DBConnection(DB_HOST, DB_RBAC_USER, DB_RBAC_PASS, DB_RBAC_NAME );
|
|
||||||
|
|
||||||
|
|
||||||
G::LoadClassRBAC ('user');
|
|
||||||
$obj = new RBAC_User;
|
|
||||||
$obj->SetTo( $dbc );
|
|
||||||
|
|
||||||
$obj->updateLDAP( $uid, $source, $dn, $use );
|
|
||||||
|
|
||||||
header( "location: userEdit.html" );
|
|
||||||
?>
|
|
||||||
@@ -1,41 +0,0 @@
|
|||||||
<?php
|
|
||||||
/**
|
|
||||||
* userChangePwd.php
|
|
||||||
*
|
|
||||||
* ProcessMaker Open Source Edition
|
|
||||||
* Copyright (C) 2004 - 2008 Colosa Inc.23
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU Affero General Public License as
|
|
||||||
* published by the Free Software Foundation, either version 3 of the
|
|
||||||
* License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU Affero General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*
|
|
||||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
|
||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
$G_MAIN_MENU = 'rbac';
|
|
||||||
$G_SUB_MENU = 'rbac.userView';
|
|
||||||
$G_MENU_SELECTED = 0;
|
|
||||||
$G_SUB_MENU_SELECTED = 1;
|
|
||||||
|
|
||||||
$dbc = new DBConnection(DB_HOST, DB_RBAC_USER, DB_RBAC_PASS, DB_RBAC_NAME);
|
|
||||||
$access = $RBAC->userCanAccess('RBAC_CREATE_USERS');
|
|
||||||
|
|
||||||
G::LoadClassRBAC('user');
|
|
||||||
$obj = new RBAC_User;
|
|
||||||
$obj->SetTo($dbc);
|
|
||||||
$obj->Load($_SESSION['CURRENT_USER']);
|
|
||||||
$G_PUBLISH = new Publisher;
|
|
||||||
$G_PUBLISH->SetTo($dbc);
|
|
||||||
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'rbac/userChangePwd', '', $obj->Fields, 'userChangePwd2');
|
|
||||||
G::RenderPage( 'publish');
|
|
||||||
?>
|
|
||||||
@@ -1,43 +0,0 @@
|
|||||||
<?php
|
|
||||||
/**
|
|
||||||
* userChangePwd2.php
|
|
||||||
*
|
|
||||||
* ProcessMaker Open Source Edition
|
|
||||||
* Copyright (C) 2004 - 2008 Colosa Inc.23
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU Affero General Public License as
|
|
||||||
* published by the Free Software Foundation, either version 3 of the
|
|
||||||
* License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU Affero General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*
|
|
||||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
|
||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
$frm = $_POST['form'];
|
|
||||||
$pass1 = $frm['PASSWORD'];
|
|
||||||
$pass2 = $frm['PASSWORD2'];
|
|
||||||
|
|
||||||
$dbc = new DBConnection(DB_HOST, DB_RBAC_USER, DB_RBAC_PASS, DB_RBAC_NAME);
|
|
||||||
G::LoadClassRBAC('user');
|
|
||||||
$obj = new RBAC_User;
|
|
||||||
$obj->SetTo($dbc);
|
|
||||||
if ($pass1 != $pass2)
|
|
||||||
{
|
|
||||||
G::SendMessage(3, 'error');
|
|
||||||
header('location: userChangePwd.php');
|
|
||||||
die;
|
|
||||||
}
|
|
||||||
$obj->SetTo($dbc);
|
|
||||||
$obj->changePassword($_SESSION['CURRENT_USER'], $pass1);
|
|
||||||
header('location: userEdit.html');
|
|
||||||
//header('location: userViewRole.html');
|
|
||||||
?>
|
|
||||||
@@ -1,155 +0,0 @@
|
|||||||
<?php
|
|
||||||
/**
|
|
||||||
* userEdit.php
|
|
||||||
*
|
|
||||||
* ProcessMaker Open Source Edition
|
|
||||||
* Copyright (C) 2004 - 2008 Colosa Inc.23
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU Affero General Public License as
|
|
||||||
* published by the Free Software Foundation, either version 3 of the
|
|
||||||
* License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU Affero General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*
|
|
||||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
|
||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
G::GenericForceLogin ('RBAC_LOGIN','login/noViewPage','login/login');
|
|
||||||
|
|
||||||
$G_MAIN_MENU = 'rbac';
|
|
||||||
$G_SUB_MENU = 'rbac.userEdit';
|
|
||||||
$G_MENU_SELECTED = 0;
|
|
||||||
|
|
||||||
$dbc = new DBConnection(DB_HOST, DB_RBAC_USER, DB_RBAC_PASS, DB_RBAC_NAME);
|
|
||||||
$ses = new DBSession($dbc);
|
|
||||||
|
|
||||||
$dset = $ses->Execute('SELECT UID, USR_USE_LDAP FROM USERS where UID = ' . $_SESSION['CURRENT_USER']);
|
|
||||||
$row = $dset->Read();
|
|
||||||
$useLdap = $row['USR_USE_LDAP'] == 'Y';
|
|
||||||
$access = $RBAC->userCanAccess ('RBAC_CREATE_USERS');
|
|
||||||
|
|
||||||
G::LoadClassRBAC('user');
|
|
||||||
$obj = new RBAC_User;
|
|
||||||
$obj->SetTo($dbc);
|
|
||||||
$obj->Load($_SESSION['CURRENT_USER']);
|
|
||||||
|
|
||||||
$G_PUBLISH = new Publisher;
|
|
||||||
$G_PUBLISH->SetTo ($dbc);
|
|
||||||
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'rbac/userEdit', '', $obj->Fields, 'userEdit2');
|
|
||||||
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'rbac/userChangePwd', '', $obj->Fields, 'userChangePwd2');
|
|
||||||
$G_PUBLISH->AddContent('xmlform', 'pagedTable', 'rbac/usersRolesList', '', array('CURRENT_USER' => $_SESSION['CURRENT_USER']), '');
|
|
||||||
|
|
||||||
G::RenderPage('publish');
|
|
||||||
?>
|
|
||||||
<script language='Javascript'>
|
|
||||||
|
|
||||||
function go () {
|
|
||||||
|
|
||||||
myPanel=new leimnud.module.panel();
|
|
||||||
myPanel.options={
|
|
||||||
size:{w:620,h:300},
|
|
||||||
position:{center:true},
|
|
||||||
title:"Assign Role",
|
|
||||||
control:{
|
|
||||||
close :true,
|
|
||||||
roll :true,
|
|
||||||
drag :true,
|
|
||||||
resize :true
|
|
||||||
},
|
|
||||||
fx:{
|
|
||||||
//shadow :true,
|
|
||||||
blinkToFront:false,
|
|
||||||
modal :true
|
|
||||||
},
|
|
||||||
theme:"simple"
|
|
||||||
};
|
|
||||||
|
|
||||||
myPanel.make();
|
|
||||||
|
|
||||||
myPanel.addContent("<iframe width='580' height='250' frameborder='0' src='userAssignRole'></iframe>");
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
function commonDialog ( type, title , text, buttons, values, callbackFn ) {
|
|
||||||
myDialog = new leimnud.module.panel();
|
|
||||||
myDialog.options={
|
|
||||||
size:{w:400,h:200}, position:{center:true},
|
|
||||||
title: title,
|
|
||||||
control:{
|
|
||||||
close :false,
|
|
||||||
roll :false,
|
|
||||||
drag :true,
|
|
||||||
resize :false
|
|
||||||
},
|
|
||||||
fx:{
|
|
||||||
//shadow :true,
|
|
||||||
blinkToFront:false,
|
|
||||||
opacity :true,
|
|
||||||
modal: true
|
|
||||||
},
|
|
||||||
theme:"panel"
|
|
||||||
};
|
|
||||||
myDialog.make();
|
|
||||||
switch (type) {
|
|
||||||
case 'question':
|
|
||||||
icon = 'question.gif';
|
|
||||||
break
|
|
||||||
case 'warning':
|
|
||||||
icon = 'warning.gif';
|
|
||||||
break
|
|
||||||
case 'error':
|
|
||||||
icon = 'error.gif';
|
|
||||||
break
|
|
||||||
default:
|
|
||||||
icon = 'information.gif';
|
|
||||||
break
|
|
||||||
}
|
|
||||||
|
|
||||||
var contentStr = '';
|
|
||||||
contentStr += "<div><table border='0' width='100%' > <tr height='70'><td width='60' align='center' >";
|
|
||||||
contentStr += "<img src='/js/maborak/core/images/" + icon + "'></td><td >" + text + "</td></tr>";
|
|
||||||
contentStr += "<tr height='35' valign='bottom'><td colspan='2' align='center'> ";
|
|
||||||
if ( buttons.custom && buttons.customText )
|
|
||||||
contentStr += "<input type='button' value='" + buttons.customText + "' onclick='myDialog.dialogCallback(4); ';> ";
|
|
||||||
if ( buttons.cancel )
|
|
||||||
contentStr += "<input type='button' value='Cancel' onclick='myDialog.dialogCallback(0);'> ";
|
|
||||||
if ( buttons.yes )
|
|
||||||
contentStr += "<input type='button' value=' Yes ' onclick='myDialog.dialogCallback(1);'> ";
|
|
||||||
if ( buttons.no )
|
|
||||||
contentStr += "<input type='button' value=' No ' onclick='myDialog.dialogCallback(2);'> ";
|
|
||||||
contentStr += "</td></tr>";
|
|
||||||
contentStr += "</table>";
|
|
||||||
|
|
||||||
myDialog.addContent( contentStr );
|
|
||||||
myDialog.values = values;
|
|
||||||
myDialog.dialogCallback = function ( dialogResult ) {
|
|
||||||
myDialog.remove( );
|
|
||||||
if ( callbackFn )
|
|
||||||
callbackFn ( dialogResult );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function removeRoleCallback ( dialogResult ) {
|
|
||||||
if ( dialogResult == '4' ) {
|
|
||||||
window.location = 'userRoleDel?r='+ myDialog.values.role;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function removeRole ( application, role ) {
|
|
||||||
commonDialog ( 'question', 'Remove Role', 'Do you want to remove this role?',
|
|
||||||
{ custom:true, cancel: true , customText:'Delete' },
|
|
||||||
{ application:application, role:role },
|
|
||||||
removeRoleCallback
|
|
||||||
);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
</script>
|
|
||||||
@@ -1,98 +0,0 @@
|
|||||||
<?php
|
|
||||||
/**
|
|
||||||
* userEdit2.php
|
|
||||||
*
|
|
||||||
* ProcessMaker Open Source Edition
|
|
||||||
* Copyright (C) 2004 - 2008 Colosa Inc.23
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU Affero General Public License as
|
|
||||||
* published by the Free Software Foundation, either version 3 of the
|
|
||||||
* License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU Affero General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*
|
|
||||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
|
||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
$frm = $_POST['form'];
|
|
||||||
$first = strtoupper ($frm['USR_LASTNAME']);
|
|
||||||
$mid = strtoupper ($frm['USR_MIDNAME']);
|
|
||||||
$names = strtoupper ($frm['USR_FIRSTNAME']);
|
|
||||||
if (!isset($frm['USR_EMAIL']))
|
|
||||||
{
|
|
||||||
$frm['USR_EMAIL'] = '';
|
|
||||||
}
|
|
||||||
if (!isset($frm['USR_PHONE']))
|
|
||||||
{
|
|
||||||
$frm['USR_PHONE'] = '';
|
|
||||||
}
|
|
||||||
if (!isset($frm['USR_CELLULAR']))
|
|
||||||
{
|
|
||||||
$frm['USR_CELLULAR'] = '';
|
|
||||||
}
|
|
||||||
if (!isset($frm['USR_FAX']))
|
|
||||||
{
|
|
||||||
$frm['USR_FAX'] = '';
|
|
||||||
}
|
|
||||||
if (!isset($frm['USR_POBOX']))
|
|
||||||
{
|
|
||||||
$frm['USR_POBOX'] = '';
|
|
||||||
}
|
|
||||||
if (!isset($frm['USR_USERNAME']))
|
|
||||||
{
|
|
||||||
$frm['USR_USERNAME'] = '';
|
|
||||||
}
|
|
||||||
if (!isset($frm['USR_STATUS']))
|
|
||||||
{
|
|
||||||
$frm['USR_STATUS'] = '';
|
|
||||||
}
|
|
||||||
if (!isset($frm['USR_DUE_DATE']))
|
|
||||||
{
|
|
||||||
$frm['USR_DUE_DATE'] = '';
|
|
||||||
}
|
|
||||||
if (!isset($frm['USR_USE_LDAP']))
|
|
||||||
{
|
|
||||||
$frm['USR_USE_LDAP'] = '';
|
|
||||||
}
|
|
||||||
$email = $frm['USR_EMAIL'];
|
|
||||||
$phone = $frm['USR_PHONE'];
|
|
||||||
$cell = $frm['USR_CELLULAR'];
|
|
||||||
$fax = $frm['USR_FAX'];
|
|
||||||
$pobox = $frm['USR_POBOX'];
|
|
||||||
$userID = $frm['USR_USERNAME'];
|
|
||||||
$status = $frm['USR_STATUS'];
|
|
||||||
$due = $frm['USR_DUE_DATE'];
|
|
||||||
$useLdap = $frm['USR_USE_LDAP'];
|
|
||||||
$uid = $_SESSION['CURRENT_USER'];
|
|
||||||
$dbc = new DBConnection(DB_HOST, DB_RBAC_USER, DB_RBAC_PASS, DB_RBAC_NAME);
|
|
||||||
|
|
||||||
G::LoadClassRBAC ('user');
|
|
||||||
$obj = new RBAC_User;
|
|
||||||
$obj->SetTo($dbc);
|
|
||||||
$repId = $obj->UserNameRepetido($uid, $userID);
|
|
||||||
if ($repId != 0 )
|
|
||||||
{
|
|
||||||
G::SendMessage (6, 'error');
|
|
||||||
header('location: userEdit.php');
|
|
||||||
die;
|
|
||||||
}
|
|
||||||
|
|
||||||
$obj->SetTo($dbc);
|
|
||||||
$obj->SetToRBAC(DB_RBAC_USER, DB_RBAC_PASS, DB_RBAC_NAME);
|
|
||||||
$uid = $obj->editUser($uid, $first, $mid, $names, $email, '', '', '', '', $userID, $status, $due, '', '', '');
|
|
||||||
$obj->Load( $uid );
|
|
||||||
if ( $obj->Fields['USR_USE_LDAP'] != $useLdap )
|
|
||||||
{
|
|
||||||
$obj->updateLDAP( $uid, $obj->Fields['USR_LDAP_SOURCE'] , $obj->Fields['USR_LDAP_DN'] , $useLdap );
|
|
||||||
}
|
|
||||||
header('location: userEdit.html');
|
|
||||||
//header('location: userViewRole.html');
|
|
||||||
?>
|
|
||||||
@@ -1,44 +0,0 @@
|
|||||||
<?php
|
|
||||||
/**
|
|
||||||
* userList.php
|
|
||||||
*
|
|
||||||
* ProcessMaker Open Source Edition
|
|
||||||
* Copyright (C) 2004 - 2008 Colosa Inc.23
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU Affero General Public License as
|
|
||||||
* published by the Free Software Foundation, either version 3 of the
|
|
||||||
* License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU Affero General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*
|
|
||||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
|
||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
G::GenericForceLogin ('RBAC_LOGIN','login/noViewPage','login/login');
|
|
||||||
|
|
||||||
$userID = isset ( $_SESSION ['USER_LOGGED'] ) ? $_SESSION ['USER_LOGGED'] : '';
|
|
||||||
$G_MAIN_MENU = "rbac";
|
|
||||||
$G_SUB_MENU = "rbac.user";
|
|
||||||
$G_MENU_SELECTED = 0;
|
|
||||||
|
|
||||||
$canCreateUsers = $RBAC->userCanAccess("RBAC_CREATE_USERS" );
|
|
||||||
|
|
||||||
$dbc = new DBConnection(DB_HOST, DB_RBAC_USER, DB_RBAC_PASS, DB_RBAC_NAME );
|
|
||||||
$G_PUBLISH = new Publisher;
|
|
||||||
$G_PUBLISH->SetTo ($dbc);
|
|
||||||
//$G_PUBLISH->AddContent ( "table", "paged-table", "rbac.users.list", "rbac/myApp", "", "load");
|
|
||||||
$fields['CURRENT_USER'] = '';//"WHERE USR_UID = 1";//$HTTP_SESSION_VARS['CURRENT_USER'];
|
|
||||||
$G_PUBLISH->AddContent ( "xmlform", "pagedTable", "rbac/usersList", "", $fields, "");
|
|
||||||
$content = '';//'';//G::LoadContent( "rbac/myApp" );
|
|
||||||
G::RenderPage( "publish" );
|
|
||||||
|
|
||||||
?>
|
|
||||||
@@ -1,33 +0,0 @@
|
|||||||
<?php
|
|
||||||
/**
|
|
||||||
* userNew.php
|
|
||||||
*
|
|
||||||
* ProcessMaker Open Source Edition
|
|
||||||
* Copyright (C) 2004 - 2008 Colosa Inc.23
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU Affero General Public License as
|
|
||||||
* published by the Free Software Foundation, either version 3 of the
|
|
||||||
* License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU Affero General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*
|
|
||||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
|
||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
$G_MAIN_MENU = 'rbac';
|
|
||||||
$G_BACK_PAGE = 'rbac/userList';
|
|
||||||
$G_SUB_MENU = 'cancel';
|
|
||||||
$G_MENU_SELECTED = 0;
|
|
||||||
|
|
||||||
$G_PUBLISH = new Publisher;
|
|
||||||
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'rbac/userNew', '', '', 'userNew2');
|
|
||||||
G::RenderPage( 'publish');
|
|
||||||
?>
|
|
||||||
@@ -1,75 +0,0 @@
|
|||||||
<?php
|
|
||||||
/**
|
|
||||||
* userNew2.php
|
|
||||||
*
|
|
||||||
* ProcessMaker Open Source Edition
|
|
||||||
* Copyright (C) 2004 - 2008 Colosa Inc.23
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU Affero General Public License as
|
|
||||||
* published by the Free Software Foundation, either version 3 of the
|
|
||||||
* License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU Affero General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*
|
|
||||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
|
||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
$frm = $_POST['form'];
|
|
||||||
if (!isset($frm['USR_FIRSTNAME']))
|
|
||||||
{
|
|
||||||
$frm['USR_FIRSTNAME'] = '';
|
|
||||||
}
|
|
||||||
if (!isset($frm['USR_MIDNAME']))
|
|
||||||
{
|
|
||||||
$frm['USR_MIDNAME'] = '';
|
|
||||||
}
|
|
||||||
if (!isset($frm['USR_NAMES']))
|
|
||||||
{
|
|
||||||
$frm['USR_NAMES'] = '';
|
|
||||||
}
|
|
||||||
if (!isset($frm['USR_EMAIL']))
|
|
||||||
{
|
|
||||||
$frm['USR_EMAIL'] = '';
|
|
||||||
}
|
|
||||||
if (!isset($frm['USR_PHONE']))
|
|
||||||
{
|
|
||||||
$frm['USR_PHONE'] = '';
|
|
||||||
}
|
|
||||||
if (!isset($frm['USR_CELLULAR']))
|
|
||||||
{
|
|
||||||
$frm['USR_CELLULAR'] = '';
|
|
||||||
}
|
|
||||||
if (!isset($frm['USR_FAX']))
|
|
||||||
{
|
|
||||||
$frm['USR_FAX'] = '';
|
|
||||||
}
|
|
||||||
if (!isset($frm['USR_POBOX']))
|
|
||||||
{
|
|
||||||
$frm['USR_POBOX'] = '';
|
|
||||||
}
|
|
||||||
$first = strtoupper ($frm['USR_FIRSTNAME']);
|
|
||||||
$mid = strtoupper ($frm['USR_MIDNAME']);
|
|
||||||
$names = strtoupper ($frm['USR_NAMES']);
|
|
||||||
$email = $frm['USR_EMAIL'];
|
|
||||||
$phone = $frm['USR_PHONE'];
|
|
||||||
$cell = $frm['USR_CELLULAR'];
|
|
||||||
$fax = $frm['USR_FAX'];
|
|
||||||
$pobox = $frm['USR_POBOX'];
|
|
||||||
$dbc = new DBConnection(DB_HOST, DB_RBAC_USER, DB_RBAC_PASS, DB_RBAC_NAME);
|
|
||||||
|
|
||||||
G::LoadClassRBAC ('user');
|
|
||||||
$obj = new RBAC_User;
|
|
||||||
$obj->SetTo($dbc);
|
|
||||||
$uid = $obj->createUser ($first, $mid, $names, $email, $phone, $cell, $fax, $pobox);
|
|
||||||
$_SESSION['CURRENT_USER'] = $uid;
|
|
||||||
|
|
||||||
header('location: userNew3.html');
|
|
||||||
?>
|
|
||||||
@@ -1,33 +0,0 @@
|
|||||||
<?php
|
|
||||||
/**
|
|
||||||
* userNew3.php
|
|
||||||
*
|
|
||||||
* ProcessMaker Open Source Edition
|
|
||||||
* Copyright (C) 2004 - 2008 Colosa Inc.23
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU Affero General Public License as
|
|
||||||
* published by the Free Software Foundation, either version 3 of the
|
|
||||||
* License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU Affero General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*
|
|
||||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
|
||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
$G_MAIN_MENU = 'rbac';
|
|
||||||
$G_BACK_PAGE = 'rbac/userList';
|
|
||||||
$G_SUB_MENU = 'cancel';
|
|
||||||
$G_MENU_SELECTED = 0;
|
|
||||||
|
|
||||||
$G_PUBLISH = new Publisher;
|
|
||||||
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'rbac/userNewPwd', '', '', 'userNew4');
|
|
||||||
G::RenderPage( 'publish');
|
|
||||||
?>
|
|
||||||