Example #1
0
 * 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");
Example #2
0
 * 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");
Example #3
0
/**
 * 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");
Example #4
0
 * 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");
Example #5
0
 * 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");
}