Exemplo n.º 1
0
 /**
  * 
  * @url GET /editTemplate
  */
 public function editTemplate($params)
 {
     // Action Validations
     if (!isset($_REQUEST['TEMPLATE'])) {
         $_REQUEST['TEMPLATE'] = '';
     }
     if ($_REQUEST['TEMPLATE'] == '') {
         throw new Exception('The TEMPLATE parameter is empty.');
     }
     $data = array('CONTENT' => file_get_contents(PATH_DATA_MAILTEMPLATES . $_REQUEST['PRO_UID'] . PATH_SEP . $_REQUEST['TEMPLATE']), 'TEMPLATE' => $_REQUEST['TEMPLATE']);
     global $G_PUBLISH;
     $G_PUBLISH = new Publisher();
     $G_PUBLISH->AddContent('xmlform', 'xmlform', 'actionsByEmail/actionsByEmail_FileEdit', '', $data);
     G::RenderPage('publish', 'raw');
     die;
 }
Exemplo n.º 2
0
            //adding a javascript file .js
            G::RenderPage('publish', 'extJs');
            die;
            break;
        case 'JRXML':
        case 'ACROFORM':
            $type = $aFields['OUT_DOC_TYPE'];
            if ($type == 'JRXML') {
                $extension = 'jrxml';
            }
            if ($type == 'ACROFORM') {
                $extension = 'pdf';
            }
            // The ereg_replace function has been DEPRECATED as of PHP 5.3.0.
            // $downFileName = ereg_replace('[^A-Za-z0-9_]', '_', $aFields['OUT_DOC_TITLE'] ) . '.' . $extension;
            $downFileName = preg_replace('/[^A-Za-z0-9_]/i', '_', $aFields['OUT_DOC_TITLE']) . '.' . $extension;
            $filename = PATH_DYNAFORM . $aFields['PRO_UID'] . PATH_SEP . $aFields['OUT_DOC_UID'] . '.' . $extension;
            if (file_exists($filename)) {
                $aFields['FILENAME'] = $downFileName;
            } else {
                $aFields['FILENAME'] = '';
            }
            $aFields['FILELINK'] = '../outputdocs/downloadFile?' . $aFields['OUT_DOC_UID'];
            $G_PUBLISH->AddContent('xmlform', 'xmlform', 'outputdocs/outputdocsUploadFile', '', $aFields, '../outputdocs/uploadFile');
            $G_PUBLISH->AddContent('view', 'outputdocs/editJrxml');
            break;
    }
    G::RenderPage('publish', 'raw');
} catch (Exception $oException) {
    die($oException->getMessage());
}
Exemplo n.º 3
0
 * 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");
Exemplo n.º 4
0
 /**
  * get setup Plugins
  *
  * @param unknown_type $default
  * @return void
  */
 function setupPlugins()
 {
     try {
         $iPlugins = 0;
         G::LoadClass('serverConfiguration');
         $oServerConf =& serverConf::getSingleton();
         $oServerConf->addPlugin(SYS_SYS, $this->_aPluginDetails);
         foreach ($this->_aPluginDetails as $namespace => $detail) {
             if (isset($detail->enabled) && $detail->enabled) {
                 if (!empty($detail->sFilename) && file_exists($detail->sFilename)) {
                     if (strpos($detail->sFilename, PATH_SEP) !== false) {
                         $aux = explode(PATH_SEP, $detail->sFilename);
                     } else {
                         $aux = explode(chr(92), $detail->sFilename);
                     }
                     $sFilename = PATH_PLUGINS . $aux[count($aux) - 1];
                     if (!file_exists($sFilename)) {
                         continue;
                     }
                     require_once $sFilename;
                     if (class_exists($detail->sClassName)) {
                         $oPlugin = new $detail->sClassName($detail->sNamespace, $detail->sFilename);
                         $this->_aPlugins[$detail->sNamespace] = $oPlugin;
                         $iPlugins++;
                         $oPlugin->setup();
                     }
                 }
             }
         }
         $this->eevalidate();
         return $iPlugins;
     } catch (Exception $e) {
         global $G_PUBLISH;
         $aMessage['MESSAGE'] = $e->getMessage();
         $G_PUBLISH = new Publisher();
         $G_PUBLISH->AddContent('xmlform', 'xmlform', 'login/showMessage', '', $aMessage);
         G::RenderPage('publish');
         die;
     }
 }
Exemplo n.º 5
0
 *
 * 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.
 */
require_once "classes/model/Translation.php";
$t = new Translation();
$fields = Translation::generateFileTranslation('en');
$G_MAIN_MENU = 'tools';
$G_SUB_MENU = 'toolsTranslations';
$G_ID_MENU_SELECTED = 'TRANSLATION';
$G_ID_SUB_MENU_SELECTED = 'TRANSLATION_REBUILD';
$G_PUBLISH = new Publisher();
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'tools/updateTranslation', '', $fields);
if (isset($_SESSION['TOOLS_VIEWTYPE']) && $_SESSION['TOOLS_VIEWTYPE'] == 'blank') {
    G::RenderPage('publishBlank', 'green-submenu');
} else {
    G::RenderPage('publish');
}
Exemplo n.º 6
0
 /**
  * Render Page
  *
  * @author Fernando Ontiveros Lira <*****@*****.**>
  * @access public
  * @param object $objContent
  * @param string $strTemplate
  * @param string $strSkin
  * @return void
  */
 public function RenderPage($strTemplate = "default", $strSkin = SYS_SKIN, $objContent = null, $layout = '')
 {
     global $G_CONTENT;
     global $G_TEMPLATE;
     global $G_SKIN;
     global $G_PUBLISH;
     $G_CONTENT = $objContent;
     $G_TEMPLATE = $strTemplate;
     $G_SKIN = $strSkin;
     try {
         $file = G::ExpandPath('skinEngine') . 'skinEngine.php';
         include $file;
         $skinEngine = new SkinEngine($G_TEMPLATE, $G_SKIN, $G_CONTENT);
         $skinEngine->setLayout($layout);
         $skinEngine->dispatch();
     } catch (Exception $e) {
         global $G_PUBLISH;
         if (is_null($G_PUBLISH)) {
             $G_PUBLISH = new Publisher();
         }
         if (count($G_PUBLISH->Parts) == 1) {
             array_shift($G_PUBLISH->Parts);
         }
         global $oHeadPublisher;
         $leimnudInitString = $oHeadPublisher->leimnudInitString;
         $oHeadPublisher->clearScripts();
         $oHeadPublisher->leimnudInitString = $leimnudInitString;
         $oHeadPublisher->addScriptFile('/js/maborak/core/maborak.js');
         $G_PUBLISH->AddContent('xmlform', 'xmlform', 'login/showMessage', null, array('MESSAGE' => $e->getMessage()));
         if (class_exists('SkinEngine')) {
             $skinEngine = new SkinEngine('publish', 'blank', '');
             $skinEngine->dispatch();
         } else {
             die($e->getMessage());
         }
     }
 }
Exemplo n.º 7
0
 /**
  * Prints the Dynaform in format HTML
  *
  * @param object $A
  * @return array
  */
 public function render_htmledit($A)
 {
     $script = '';
     $file = G::decrypt($A, URL_KEY);
     ob_start();
     global $G_PUBLISH;
     $form = new Form($file, PATH_DYNAFORM, SYS_LANG, true);
     $G_PUBLISH = new Publisher();
     $G_PUBLISH->publisherId = '';
     $html = $this->get_htmlcode($A);
     if (!is_string($html)) {
         $error = $html;
         $html = '';
     } else {
         $error = 0;
     }
     $HtmlEditor = array('URL' => $A, 'HTML' => $html, 'DYN_UID' => $file);
     $G_PUBLISH->AddContent('xmlform', 'xmlform', 'dynaforms/dynaforms_HtmlEditor', '', $HtmlEditor, '', '');
     G::RenderPage("publish", 'raw');
     return array('error' => $error, 'html' => ob_get_clean());
 }
Exemplo n.º 8
0
 * 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");
Exemplo n.º 9
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.
 */
$G_PUBLISH = new Publisher();
$fileGetStart = PATH_SKINS . SYS_SKIN . PATH_SEP . 'login_getStarted.html';
if (!file_exists($fileGetStart)) {
    $fileGetStart = PATH_SKIN_ENGINE . SYS_SKIN . PATH_SEP . 'login_getStarted.html';
    if (!file_exists($fileGetStart)) {
        $fileGetStart = PATH_CUSTOM_SKINS . SYS_SKIN . PATH_SEP . 'login_getStarted.html';
        if (!file_exists($fileGetStart)) {
            $fileGetStart = PATH_TPL . 'services/login_getStarted.html';
        }
    }
}
$oTemplatePower = new TemplatePower($fileGetStart);
$oTemplatePower->prepare();
/*
$oTemplatePower->newBlock('users');
$oTemplatePower->assign('USR_UID', $aUser['USR_UID']);
$oTemplatePower->assign('USR_FULLNAME', $aData['USR_FIRSTNAME'] . ' ' . $aData['USR_LASTNAME'] . ' (' . $aData['USR_USERNAME'] . ')');
*/
$oTemplatePower->assign("URL_MABORAK_JS", G::browserCacheFilesUrl("/js/maborak/core/maborak.js"));
$G_PUBLISH->AddContent('template', '', '', '', $oTemplatePower);
G::RenderPage('publish', 'raw');
Exemplo n.º 10
0
 * 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");
Exemplo n.º 11
0
/**
 * connectionDB.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 (($RBAC_Response = $RBAC->userCanAccess("PM_SETUP")) != 1) {
    return $RBAC_Response;
}
$G_ENABLE_BLANK_SKIN = true;
$dbc = new DBConnection();
$G_PUBLISH = new Publisher();
$G_PUBLISH->AddContent("xmlform", "pagedTable", "setup/connection_db", "", "", "");
G::RenderPage('publish');
Exemplo n.º 12
0
 * 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 $RBAC;
if ($RBAC->userCanAccess('PM_SETUP_ADVANCE') != 1) {
    G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels');
    G::header('location: ../login/login');
    die;
}
$G_MAIN_MENU = 'processmaker';
//$G_SUB_MENU             = 'users';
$G_ID_MENU_SELECTED = 'USERS';
//$G_ID_SUB_MENU_SELECTED = '-';
$G_PUBLISH = new Publisher();
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'users/users_AuthSource', '', $RBAC->load($_GET['USR_UID']), '../users/users_AuthSourceSave');
G::RenderPage('publish', 'blank');
Exemplo n.º 13
0
G::LoadClass( 'dbConnections' );
$oDbConnections = new dbConnections( $_SESSION['PROCESS'] );
$oDbConnections->loadAdditionalConnections();

$G_PUBLISH = new Publisher();
if ($_GET['DYN_UID'] != '') {
    $_SESSION['CURRENT_DYN_UID'] = $_GET['DYN_UID'];
    G::LoadClass('pmDynaform');
    $FieldsPmDynaform = $Fields;
    $FieldsPmDynaform["PRO_UID"] = $_SESSION['PROCESS'];
    $FieldsPmDynaform["CURRENT_DYNAFORM"] = $_GET['DYN_UID'];
    $a = new pmDynaform($FieldsPmDynaform);
    if ($a->isResponsive()) {
        $a->printView();
    }else{
        $G_PUBLISH->AddContent( 'dynaform', 'xmlform', $_SESSION['PROCESS'] . '/' . $_GET['DYN_UID'], '', $Fields['APP_DATA'], 'cases_SaveDataSupervisor?UID=' . $_GET['DYN_UID'] );
    }
}

G::RenderPage( 'publish', 'blank' );

if (! isset( $_GET['ex'] )) {
    $_GET['ex'] = $_GET['position'];
}
?>

<script>
/*------------------------------ To Revise Routines ---------------------------*/
// DEPRECATED this JS section is marked for removal
function setSelect()
{
Exemplo n.º 14
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.
 * 
 */
$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");
Exemplo n.º 15
0
         $oContent = new Content();
         $DBS_UID = $_POST['dbs_uid'];
         $PRO_UID = $_SESSION['PROCESS'];
         $oDBSource->remove($DBS_UID, $PRO_UID);
         $oContent->removeContent('DBS_DESCRIPTION', "", $DBS_UID);
         $result->success = true;
         $result->msg = G::LoadTranslation('ID_DBCONNECTION_REMOVED');
     } catch (Exception $e) {
         $result->success = false;
         $result->msg = $e->getMessage();
     }
     print G::json_encode($result);
     break;
 case 'showTestConnection':
     $G_PUBLISH = new Publisher();
     $G_PUBLISH->AddContent('view', 'dbConnections/dbConnections');
     G::RenderPage('publish', 'raw');
     break;
 case 'testConnection':
     sleep(0);
     $step = $_POST['step'];
     $type = $_POST['type'];
     $server = $_POST['server'];
     $db_name = $_POST['db_name'];
     $user = $_POST['user'];
     $passwd = $_POST['passwd'] == 'none' ? "" : $_POST['passwd'];
     $port = $_POST['port'];
     if ($port == 'none' || $port == 0) {
         //setting defaults ports
         switch ($type) {
             case 'mysql':
Exemplo n.º 16
0
    switch ($access) {
        case -1:
            G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels');
            G::header('location: ../login/login');
            die;
            break;
        case -2:
            G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels');
            G::header('location: ../login/login');
            die;
            break;
        default:
            G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels');
            G::header('location: ../login/login');
            die;
            break;
    }
}
if (($RBAC_Response = $RBAC->userCanAccess("PM_USERS")) != 1) {
    return $RBAC_Response;
}
$dept = new Department();
$DptoUid = isset($_GET['UID']) ? urldecode($_GET['UID']) : '';
if ($DptoUid) {
    $aFields = $dept->Load($DptoUid);
} else {
    $aFields = array();
}
$G_PUBLISH = new Publisher();
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'departments/departments_Edit', '', $aFields, 'departments_Save');
G::RenderPage("publish", "raw");
Exemplo n.º 17
0
    $aFields["USER_LANG"] = $myUrl[2];

} else {

    $aFields["USER_LANG"] = isset($oConf->aConfig["login_defaultLanguage"])? $oConf->aConfig["login_defaultLanguage"] : SYS_LANG;

}



$G_PUBLISH = new Publisher();

if(SYS_SKIN == 'neoclassic'){

    $G_PUBLISH->AddContent('xmlform', 'xmlform', 'login/loginpm3', '', $aFields, SYS_URI . 'login/authentication.php');

}else{

    $G_PUBLISH->AddContent('xmlform', 'xmlform', 'login/login', '', $aFields, SYS_URI . 'login/authentication.php');

}



G::LoadClass('serverConfiguration');

//Bootstrap::LoadClass('serverConfiguration');

//get the serverconf singleton, and check if we can send the heartbeat
Exemplo n.º 18
0
/**
 * webServicesList.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 ($RBAC->userCanAccess('PM_SETUP') != 1 && $RBAC->userCanAccess('PM_FACTORY') != 1) {
    G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels');
    //G::header('location: ../login/login');
    die;
}
//G::genericForceLogin( 'WF_MYINFO' , 'login/noViewPage', $urlLogin = '******' );
$G_PUBLISH = new Publisher();
$G_PUBLISH->AddContent('view', 'setup/webServicesTree');
G::RenderPage("publish-raw", "raw");
Exemplo n.º 19
0
        }

        break;

    case 'no':

        $fileLogin = $version >= 3 ? 'login/sysLoginNoWSpm3' : 'login/sysLoginNoWS';

        break;

    case 'yes':

        $fileLogin = '******';

        break;

    default:

        $fileLogin = '******';

        break;

}

error_log($fileLogin);

$G_PUBLISH->AddContent ('xmlform', 'xmlform', $fileLogin, '', $aField, 'sysLogin');

G::RenderPage ("publish");
Exemplo n.º 20
0
 * ProcessMaker Open Source Edition
 * Copyright (C) 2004 - 2008 Colosa Inc.
 *
 * 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 $RBAC;
if ($RBAC->userCanAccess('PM_SETUP') != 1) {
    G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels');
    G::header('location: ../login/login');
    die;
}
require_once 'classes/model/AppEvent.php';
$oAppEvent = new AppEvent();
global $G_PUBLISH;
$G_PUBLISH = new Publisher();
$G_PUBLISH->AddContent('propeltable', 'paged-table', 'events/appEventsList', $oAppEvent->getAppEventsCriteria($_GET['PRO_UID'], 'PENDING', $_GET['EVN_TYPE']));
G::RenderPage('publish', 'raw');
Exemplo n.º 21
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");
Exemplo n.º 22
0
    G::header('location: ../login/login');
    die;
}
global $_DBArray;
G::LoadClass('tasks');
G::LoadClass('processMap');
$oTasks = new Tasks();
$aAux1 = $oTasks->getAllTasks($_GET['PRO_UID']);
$aTasks = array();
$aTasks[] = array('TAS_UID' => 'char', 'TAS_TITLE' => 'char');
//g::pr($aAux1);die;
foreach ($aAux1 as $aAux2) {
    if ($aAux2['TAS_TYPE'] != 'SUBPROCESS') {
        $aTasks[] = array('TAS_UID' => $aAux2['TAS_UID'], 'TAS_TITLE' => $aAux2['TAS_TITLE']);
    }
}
$oProcessMap = new processMap(new DBConnection());
$aTriggersList = $oProcessMap->getTriggers($_GET['PRO_UID']);
$aTriggersFileds = array('TRI_UID' => 'char', 'TRI_TITLE' => 'char');
foreach ($aTriggersList as $i => $v) {
    unset($aTriggersList[$i]['PRO_UID']);
    unset($aTriggersList[$i]['TRI_DESCRIPTION']);
    $aTriggersList[$i]['TRI_TITLE'] = strlen($aTriggersList[$i]['TRI_TITLE']) > 32 ? substr($aTriggersList[$i]['TRI_TITLE'], 0, 32) . '...' : $aTriggersList[$i]['TRI_TITLE'];
}
$aTriggersList = array_merge($aTriggersFileds, $aTriggersList);
$_DBArray['tasks'] = $aTasks;
$_DBArray['TMP_TRIGGERS'] = $aTriggersList;
$_SESSION['_DBArray'] = $_DBArray;
$G_PUBLISH = new Publisher();
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'events/eventsNew', '', array('PRO_UID' => $_GET['PRO_UID'], 'EVN_ACTION' => $_GET['EVN_TYPE']), '');
G::RenderPage('publish', 'raw');
Exemplo n.º 23
0
 case "uploadToReviseInputDocument":
     //krumo($_POST);
     $G_PUBLISH = new Publisher();
     $Fields['DOC_UID'] = $_POST['docID'];
     $Fields['APP_DOC_UID'] = $_POST['appDocId'];
     $Fields['actionType'] = $_POST['actionType'];
     $Fields['docVersion'] = $_POST['docVersion'];
     $G_PUBLISH->AddContent('xmlform', 'xmlform', 'cases/cases_AttachInputDocumentGeneral', '', $Fields, 'cases_SupervisorSaveDocument?UID=' . $_POST['docID'] . '&APP_UID=' . $_POST['appDocId']);
     G::RenderPage('publish', 'raw');
     break;
 case "inputDocumentVersionHistory":
     //krumo($_POST);
     $G_PUBLISH = new Publisher();
     $Fields['DOC_UID'] = $_POST['docID'];
     $Fields['APP_DOC_UID'] = $_POST['appDocId'];
     $G_PUBLISH->AddContent('propeltable', 'paged-table', 'cases/cases_InputdocsListHistory', $oCase->getInputDocumentsCriteria($_SESSION['APPLICATION'], $_SESSION['INDEX'], $_POST['docID'], $_POST['appDocId']), array());
     //$aFields
     //$G_PUBLISH->AddContent('xmlform', 'xmlform', 'cases/cases_AttachInputDocumentGeneral',
     // '', $Fields, 'cases_SaveDocument?UID=' . $_POST['docID']);
     G::RenderPage('publish', 'raw');
     break;
 case "getCountCasesFolder":
     //$json = new Services_JSON();
     $aTypes = array('to_do', 'draft', 'cancelled', 'sent', 'paused', 'completed', 'selfservice', 'to_revise', 'to_reassign');
     $aTypesID = array('to_do' => 'CASES_INBOX', 'draft' => 'CASES_DRAFT', 'cancelled' => 'CASES_CANCELLED', 'sent' => 'CASES_SENT', 'paused' => 'CASES_PAUSED', 'completed' => 'CASES_COMPLETED', 'selfservice' => 'CASES_SELFSERVICE', 'to_revise' => 'CASES_TO_REVISE', 'to_reassign' => 'CASES_TO_REASSIGN');
     if (!isset($_POST['A'])) {
         $oCases = new Cases();
         $aCount = $oCases->getAllConditionCasesCount($aTypes, true);
         echo Bootstrap::json_encode($aCount);
     } else {
         echo Bootstrap::json_encode($aTypesID);
Exemplo n.º 24
0
<?php

$pluginFile = $_GET['id'];
G::LoadClass('plugin');
$oPluginRegistry =& PMPluginRegistry::getSingleton();
$details = $oPluginRegistry->getPluginDetails($pluginFile);
$xmlform = isset($details->sPluginFolder) ? $details->sPluginFolder . '/' . $details->sSetupPage : '';
$G_MAIN_MENU = 'processmaker';
$G_ID_MENU_SELECTED = 'SETUP';
$G_SUB_MENU = 'setup';
$G_ID_SUB_MENU_SELECTED = 'PLUGINS';
$G_PUBLISH = new Publisher();
try {
    //the setup page is a special page
    if (substr($xmlform, -4) == '.php' && file_exists(PATH_PLUGINS . $xmlform)) {
        require_once PATH_PLUGINS . $xmlform;
        die;
    }
    //the setup page is a xmlform and using the default showform and saveform function to serialize data
    if (!file_exists(PATH_PLUGINS . $xmlform . '.xml')) {
        throw new Exception('setup .xml file is not defined for this plugin');
    }
    $Fields = $oPluginRegistry->getFieldsForPageSetup($details->sNamespace);
    $G_PUBLISH->AddContent('xmlform', 'xmlform', $xmlform, '', $Fields, 'pluginsSetupSave?id=' . $pluginFile);
} catch (Exception $e) {
    $aMessage['MESSAGE'] = $e->getMessage();
    $G_PUBLISH->AddContent('xmlform', 'xmlform', 'login/showMessage', '', $aMessage);
}
G::RenderPage('publishBlank', 'blank');
Exemplo n.º 25
0
 * 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 (($RBAC_Response = $RBAC->userCanAccess("PM_FACTORY")) != 1) {
    return $RBAC_Response;
}
//G::genericForceLogin( 'WF_MYINFO' , 'login/noViewPage', $urlLogin = '******' );
$G_MAIN_MENU = 'processmaker';
$G_SUB_MENU = 'processes';
$G_ID_MENU_SELECTED = 'PROCESSES';
$G_ID_SUB_MENU_SELECTED = 'MESSAGES';
$dbc = new DBConnection();
$ses = new DBSession($dbc);
//Hardcode: UID of the library by default
$PRO_UID = '746B734DC23311';
$G_PUBLISH = new Publisher();
$Fields = array('SYS_LANG' => SYS_LANG, 'PRO_UID' => $PRO_UID);
$G_PUBLISH->AddContent('pagedtable', 'paged-table', 'messages/messages_List', '', $Fields, 'messages_Save');
G::RenderPage("publish");
Exemplo n.º 26
0
/**
 * welcome.php for plugin er2
 *
 *
 */
try {
    /* Render page */
    $oHeadPublisher =& headPublisher::getSingleton();
    $G_MAIN_MENU = "processmaker";
    $G_ID_MENU_SELECTED = "ID_ER2_MNU_01";
    //$G_SUB_MENU             = "setup";
    //$G_ID_SUB_MENU_SELECTED = "ID_ER2_02";
    $config = array();
    $config["pageSize"] = 15;
    $config["message"] = "Hello world!";
    $config["ws"] = $_SESSION["WORKSPACE"];
    $config["skin"] = $_SESSION["currentSkin"];
    $config["action"] = "draft";
    $oHeadPublisher->addContent("er2/er2StartCase");
    //Adding a html file .html
    $oHeadPublisher->addExtJsScript("er2/er2StartCase", false);
    //Adding a javascript file .js
    $oHeadPublisher->assign("CONFIG", $config);
    G::RenderPage("publish", "extJs");
} catch (Exception $e) {
    $G_PUBLISH = new Publisher();
    $aMessage["MESSAGE"] = $e->getMessage();
    $G_PUBLISH->AddContent("xmlform", "xmlform", "er2/messageShow", "", $aMessage);
    G::RenderPage("publish", "blank");
}
Exemplo n.º 27
0
                    $_SESSION['ACTION'] = 'jump';
                } else {
                    $Fields = $oCase->loadCase( $_SESSION['APPLICATION'], $_SESSION['INDEX']);
                    unset($_SESSION['ACTION']);
                }
                $_SESSION['CURRENT_TASK'] = $Fields['TAS_UID'];
                $_SESSION['STEP_POSITION'] = 0;
                require_once (PATH_METHODS . 'cases' . PATH_SEP . 'cases_Resume.php');

            }
            break;
        default: //APP_STATUS <> DRAFT and TO_DO
            $_SESSION['APPLICATION'] = $sAppUid;
            $_SESSION['INDEX'] = $oCase->getCurrentDelegationCase( $_GET['APP_UID'] );
            $_SESSION['PROCESS'] = $aFields['PRO_UID'];
            $_SESSION['TASK'] = - 1;
            $_SESSION['STEP_POSITION'] = 0;
            $Fields = $oCase->loadCase( $_SESSION['APPLICATION'], $_SESSION['INDEX']);
            $_SESSION['CURRENT_TASK'] = $Fields['TAS_UID'];

            require_once (PATH_METHODS . 'cases' . PATH_SEP . 'cases_Resume.php');
    }
} catch (Exception $e) {
    $aMessage = array ();
    $aMessage['MESSAGE'] = $e->getMessage();
    $G_PUBLISH = new Publisher();
    $G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'login/showMessage', '', $aMessage );
    G::RenderPage( 'publishBlank', 'blank' );
}

Exemplo n.º 28
0
/**
 * holiday.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 (($RBAC_Response = $RBAC->userCanAccess("PM_SETUP")) != 1) {
    return $RBAC_Response;
}
$G_ENABLE_BLANK_SKIN = true;
$dbc = new DBConnection();
$G_PUBLISH = new Publisher();
$G_PUBLISH->AddContent('pagedtable', 'paged-table', "setup/holidayList");
G::RenderPage('publish');
Exemplo n.º 29
0
for($r=0;$r<$query->count();$r++)
{
	$row=$query->read();
	$vrow=array($row['CAPTION']);
	$vrow[]='<a href="#" onclick="deleteLocation(\''.$row['UID'].'\')">'.G::LoadTranslation('ID_DELETE').'</a>';
	$table->addRow($r,$vrow);
}
$table->addRowTag($r,'lastRow','','');
	$table->addRow($r,
		array(
			$table->getBlock('text',array('value' => '', 'properties' => 'id="newLocation"')),
			'<a href="#" onclick="addLocation();">'.G::LoadTranslation('ID_ADD').'</a>'
			));
*/
$G_PUBLISH = new Publisher();
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'setup/location', '', $param);
//$G_PUBLISH->AddContent('template', '', '', '', $table->tpl);
G::RenderPage('publish');
?>

<script language="javascript">
rowNumber=<?php 
echo $r;
?>
;
attachFunctionEventOnChange(document.getElementById('form[USR_CITY]'),changeRegion);
attachFunctionEventOnChange(document.getElementById('form[USR_COUNTRY]'),changeRegion);
function changeCity()
{
	var country=document.getElementById('form[USR_COUNTRY]');
	var city=document.getElementById('form[USR_CITY]');
Exemplo n.º 30
0
            $prop = unserialize($serial);
            error_reporting($previousErrorRep);
            if (!is_object($prop)) {
                @unlink(PATH_SKINS . $key . '.cnf');
            }
            if (isset($prop) && isset($prop->description)) {
                $description = $prop->description;
            }
            if (isset($prop) && isset($prop->version)) {
                $version = $prop->version;
            }
        }
        $linkPackValue = G::LoadTranslation('ID_EXPORT');
        $link = 'skinsExport?id=' . $key;
        $items[] = array('id' => count($items), 'name' => $key, 'filename' => $key, 'description' => $description, 'version' => $version, 'url' => $link, 'linkPackValue' => $linkPackValue);
    }
    $folders['items'] = $items;
}
$_DBArray['plugins'] = $items;
$_SESSION['_DBArray'] = $_DBArray;
G::LoadClass('ArrayPeer');
$c = new Criteria('dbarray');
$c->setDBArrayTable('plugins');
$c->addAscendingOrderByColumn('id');
$G_MAIN_MENU = 'processmaker';
$G_ID_MENU_SELECTED = 'SETUP';
$G_SUB_MENU = 'setup';
$G_ID_SUB_MENU_SELECTED = 'SKINS';
$G_PUBLISH = new Publisher();
$G_PUBLISH->AddContent('propeltable', 'paged-table', 'setup/skinsList', $c);
G::RenderPage('publishBlank', 'blank');