function postNote($httpData)
{
    //extract(getExtJSParams());
    $appUid = isset($httpData->appUid) ? $httpData->appUid : '';
    $usrUid = isset($httpData->usrUid) ? $httpData->usrUid : '';
    require_once "classes/model/AppNotes.php";
    $appNotes = new AppNotes();
    $noteContent = addslashes($httpData->noteText);
    $result = $appNotes->postNewNote($appUid, $usrUid, $noteContent, false);
    //return true;
    //die();
    //send the response to client
    @ini_set('implicit_flush', 1);
    ob_start();
    //echo G::json_encode($result);
    @ob_flush();
    @flush();
    @ob_end_flush();
    ob_implicit_flush(1);
    //return true;
    //send notification in background
    $noteRecipientsList = array();
    G::LoadClass('case');
    $oCase = new Cases();
    $p = $oCase->getUsersParticipatedInCase($appUid);
    foreach ($p['array'] as $key => $userParticipated) {
        $noteRecipientsList[] = $key;
    }
    $noteRecipients = implode(",", $noteRecipientsList);
    $appNotes->sendNoteNotification($appUid, $usrUid, $noteContent, $noteRecipients);
}
Ejemplo n.º 2
0
 public function saveInputDoc($params)
 {
     require_once 'classes/model/InputDocument.php';
     G::LoadClass('processMap');
     $aData = array();
     $aData['PRO_UID'] = $params->PRO_UID;
     $aData['INP_DOC_UID'] = $params->INP_DOC_UID;
     $aData['INP_DOC_TITLE'] = $params->INP_DOC_TITLE;
     $aData['INP_DOC_FORM_NEEDED'] = $params->INP_DOC_FORM_NEEDED;
     if ($aData['INP_DOC_FORM_NEEDED'] != 'VIRTUAL') {
         $aData['INP_DOC_ORIGINAL'] = $params->INP_DOC_ORIGINAL;
     } else {
         $aData['INP_DOC_ORIGINAL'] = 'ORIGINAL';
     }
     $aData['INP_DOC_VERSIONING'] = $params->INP_DOC_VERSIONING;
     $aData['INP_DOC_DESCRIPTION'] = $params->INP_DOC_DESCRIPTION;
     $aData['INP_DOC_DESTINATION_PATH'] = $params->INP_DOC_DESTINATION_PATH;
     $aData['INP_DOC_TAGS'] = $params->INP_DOC_TAGS;
     $oInputDocument = new InputDocument();
     if ($aData['INP_DOC_UID'] == '') {
         unset($aData['INP_DOC_UID']);
         $oInputDocument->create($aData);
         $this->msg = G::LoadTranslation('ID_INPUT_DOC_SUCCESS_NEW');
     } else {
         $oInputDocument->update($aData);
         $this->msg = G::LoadTranslation('ID_INPUT_DOC_SUCCESS_UPDATE');
     }
     //refresh dbarray with the last change in inputDocument
     $oMap = new processMap();
     $oCriteria = $oMap->getInputDocumentsCriteria($aData['PRO_UID']);
     $this->success = true;
 }
Ejemplo n.º 3
0
 /**
  * getting default list
  *
  * @param string $httpData->PRO_UID (opional)
  */
 public function index($httpData)
 {
     global $RBAC;
     $RBAC->requirePermissions('PM_SETUP_ADVANCE');
     G::LoadClass('configuration');
     $c = new Configurations();
     $configPage = $c->getConfiguration('additionalTablesList', 'pageSize', '', $_SESSION['USER_LOGGED']);
     $Config['pageSize'] = isset($configPage['pageSize']) ? $configPage['pageSize'] : 20;
     $this->includeExtJS('pmTables/list', $this->debug);
     $this->includeExtJS('pmTables/export', $this->debug);
     $this->setView('pmTables/list');
     //assigning js variables
     $this->setJSVar('FORMATS', $c->getFormats());
     $this->setJSVar('CONFIG', $Config);
     $this->setJSVar('PRO_UID', isset($_GET['PRO_UID']) ? $_GET['PRO_UID'] : false);
     $this->setJSVar('_PLUGIN_SIMPLEREPORTS', $this->_getSimpleReportPluginDef());
     if (isset($_SESSION['_cache_pmtables'])) {
         unset($_SESSION['_cache_pmtables']);
     }
     if (isset($_SESSION['ADD_TAB_UID'])) {
         unset($_SESSION['ADD_TAB_UID']);
     }
     //render content
     G::RenderPage('publish', 'extJs');
 }
Ejemplo n.º 4
0
 /**
  * Sets up the fixture, for example, opens a network connection.
  * This method is called before each test is executed.
  */
 protected function setUp()
 {
     // get Solr initialization variables
     // get Solr initialization variables
     $solrConf = array('solr_enabled' => 1, 'solr_host' => 'localhost', 'solr_instance' => 'os');
     G::LoadClass('AppSolr');
     $this->object = new AppSolr($solrConf['solr_enabled'], $solrConf['solr_host'], $solrConf['solr_instance']);
 }
Ejemplo n.º 5
0
function wsBaseProcessList($studentName)
{
    G::LoadClass('wsBase');
    $ws = new wsBase();
    $result = $ws->processList();
    //$result[] = array ( 'guid' => 'a' . $studentName , 'name' => 'bc' );
    //$result[] = array ( 'guid' => '2a' , 'name' => '2bc' .  $studentName );
    //$result[] = array ( 'guid' => '2a' , 'name' => '2bc' .  $studentName );
    return array("processes" => $result);
    //return array ( "status_code" => 12, "message" => 'abx', "timestamp" => 'aa' );
}
function pagedTable_BeforeQuery(&$ntable)
{
    $file = G::decrypt($ntable->xmlForm->values['URL'], URL_KEY);
    /* Start Block: Defines the virtual XMLDB*/
    G::LoadClass('xmlDb');
    define('DB_XMLDB_HOST', PATH_DYNAFORM . $file . '.xml');
    define('DB_XMLDB_USER', '');
    define('DB_XMLDB_PASS', '');
    define('DB_XMLDB_NAME', '');
    define('DB_XMLDB_TYPE', 'myxml');
    /* End Block*/
}
Ejemplo n.º 7
0
function updatePageSize()
{
    G::LoadClass('configuration');
    $c = new Configurations();
    $arr['pageSize'] = $_REQUEST['size'];
    $arr['dateSave'] = date('Y-m-d H:i:s');
    $config = array();
    $config[] = $arr;
    $c->aConfig = $config;
    $c->saveConfig('skinsList', 'pageSize', '', $_SESSION['USER_LOGGED']);
    echo '{success: true}';
}
Ejemplo n.º 8
0
 /**
  * Constructor of the class
  *
  * return void
  */
 public function __construct()
 {
     try {
         foreach ($this->arrayFieldDefinition as $key => $value) {
             $this->arrayFieldNameForException[$value["fieldNameAux"]] = $key;
         }
         //Library
         \G::LoadClass("triggerLibrary");
         $this->library = \triggerLibrary::getSingleton();
     } catch (\Exception $e) {
         throw $e;
     }
 }
Ejemplo n.º 9
0
function FupdateAPPDATATYPO3($APP_UID, $new = 0)
{
    $_SESSION["PM_RUN_OUTSIDE_MAIN_APP"] = true;
    G::LoadClass("case");
    $caseInstance = new Cases();
    $newFields = $caseInstance->loadCase($APP_UID);
    $newFields['APP_DATA']['FLAGTYPO3'] = 'On';
    $newFields['APP_DATA']['FLAG_ACTIONTYPO3'] = 'actionCreateCase';
    if ($_REQUEST['redirect']) {
        $newFields['APP_DATA']['FLAG_REDIRECT_PAGE'] = urldecode($_REQUEST['redirect']);
    }
    if ($new == 1) {
        $newFields['APP_DATA']['NUM_DOSSIER'] = $newFields['APP_NUMBER'];
    }
    PMFSendVariables($APP_UID, $newFields['APP_DATA']);
    $caseInstance->updateCase($APP_UID, $newFields);
}
Ejemplo n.º 10
0
 public function testingNW($params)
 {
     if (isset($_POST['NW_TITLE'])) {
         $action = isset($_POST['action']) ? trim($_POST['action']) : 'test';
         $ao_db_drop = isset($_POST['AO_DB_DROP']) ? true : false;
         G::LoadClass('Installer');
         //G::LoadClass( 'json' );
         $name = trim($_POST['NW_TITLE']);
         $inst = new Installer();
         if ($inst->isset_site($name) && $ao_db_drop !== true) {
             $this->error = true;
             return;
         }
         $user = isset($_POST['NW_USERNAME']) ? trim($_POST['NW_USERNAME']) : 'admin';
         $pass = isset($_POST['NW_PASSWORD']) ? $_POST['NW_PASSWORD'] : '******';
         $pass1 = isset($_POST['NW_PASSWORD2']) ? $_POST['NW_PASSWORD2'] : 'admin';
         $ao_db_wf = isset($_POST['AO_DB_WF']) ? $_POST['AO_DB_WF'] : false;
         $ao_db_rb = isset($_POST['AO_DB_RB']) ? $_POST['AO_DB_RB'] : false;
         $ao_db_rp = isset($_POST['AO_DB_RP']) ? $_POST['AO_DB_RP'] : false;
         $result = $inst->create_site(array('isset' => true, 'name' => $name, 'admin' => array('username' => $user, 'password' => $pass), 'advanced' => array('ao_db_drop' => $ao_db_drop, 'ao_db_wf' => $ao_db_wf, 'ao_db_rb' => $ao_db_rb, 'ao_db_rp' => $ao_db_rp)), $action === 'create' ? true : false);
         $result['result']['admin']['password'] = $pass === $pass1 ? true : false;
         $result['result']['action'] = $action;
         $_SESSION['NW_PASSWORD'] = $pass;
         $_SESSION['NW_PASSWORD2'] = $pass1;
         //$json = new Services_JSON();
         //G::pr($result['result']['database']);G::pr($action);
         $dbWf = $result['result']['database']['ao']['ao_db_wf']['status'];
         $dbRb = $result['result']['database']['ao']['ao_db_rb']['status'];
         $dbRp = $result['result']['database']['ao']['ao_db_rp']['status'];
         $wsAction = $action != '' ? 1 : 0;
         if ($dbWf && $action) {
             $this->success = true;
             //echo $json->encode($result);
         } else {
             //the site does not available
             $this->error = true;
             $this->message = $result['result']['database']['ao']['ao_db_wf']['message'];
             //$this->message .= ', ' . $result['result']['database']['ao']['ao_db_rb']['message'];
             //$this->message .= ', ' . $result['result']['database']['ao']['ao_db_rp']['message'];
         }
     } else {
         $this->error = true;
     }
 }
Ejemplo n.º 11
0
    /**
     * Generate data
     *
     * return void
     */
    public function generateData()
    {
        try {
            G::LoadClass("case");

            AppAssignSelfServiceValuePeer::doDeleteAll(); //Delete all records

            //Generate data
            $case = new Cases();

            $criteria = new Criteria("workflow");

            $criteria->addSelectColumn(AppDelegationPeer::APP_UID);
            $criteria->addSelectColumn(AppDelegationPeer::DEL_INDEX);
            $criteria->addSelectColumn(ApplicationPeer::APP_DATA);
            $criteria->addSelectColumn(AppDelegationPeer::PRO_UID);
            $criteria->addSelectColumn(TaskPeer::TAS_UID);
            $criteria->addSelectColumn(TaskPeer::TAS_GROUP_VARIABLE);
            $criteria->addJoin(AppDelegationPeer::APP_UID, ApplicationPeer::APP_UID, Criteria::LEFT_JOIN);
            $criteria->addJoin(AppDelegationPeer::TAS_UID, TaskPeer::TAS_UID, Criteria::LEFT_JOIN);
            $criteria->add(TaskPeer::TAS_ASSIGN_TYPE, "SELF_SERVICE", Criteria::EQUAL);
            $criteria->add(TaskPeer::TAS_GROUP_VARIABLE, "", Criteria::NOT_EQUAL);
            $criteria->add(AppDelegationPeer::USR_UID, "", Criteria::EQUAL);
            $criteria->add(AppDelegationPeer::DEL_THREAD_STATUS, "OPEN", Criteria::EQUAL);

            $rsCriteria = AppDelegationPeer::doSelectRS($criteria);
            $rsCriteria->setFetchmode(ResultSet::FETCHMODE_ASSOC);

            while ($rsCriteria->next()) {
                $row = $rsCriteria->getRow();

                $applicationData = $case->unserializeData($row["APP_DATA"]);
                $taskGroupVariable = trim($row["TAS_GROUP_VARIABLE"], " @#");

                if ($taskGroupVariable != "" && isset($applicationData[$taskGroupVariable]) && trim($applicationData[$taskGroupVariable]) != "") {
                    $this->create($row["APP_UID"], $row["DEL_INDEX"], array("PRO_UID" => $row["PRO_UID"], "TAS_UID" => $row["TAS_UID"], "GRP_UID" => trim($applicationData[$taskGroupVariable])));
                }
            }
        } catch (Exception $e) {
            throw $e;
        }
    }
Ejemplo n.º 12
0
function getWorkspacesAvailable()
{
    G::LoadClass('serverConfiguration');
    $oServerConf =& serverConf::getSingleton();
    $dir = PATH_DB;
    $filesArray = array();
    if (file_exists($dir)) {
        if ($handle = opendir($dir)) {
            while (false !== ($file = readdir($handle))) {
                if ($file != "." && $file != "..") {
                    if (file_exists(PATH_DB . $file . '/db.php')) {
                        if (!$oServerConf->isWSDisabled($file)) {
                            $filesArray[] = $file;
                        }
                    }
                }
            }
            closedir($handle);
        }
    }
    sort($filesArray, SORT_STRING);
    return $filesArray;
}
Ejemplo n.º 13
0
 function steps()
 {
     G::LoadClass('applications');
     $applications = new Applications();
     $proUid = isset($_SESSION['PROCESS']) ? $_SESSION['PROCESS'] : '';
     $tasUid = isset($_SESSION['TASK']) ? $_SESSION['TASK'] : '';
     $appUid = isset($_SESSION['APPLICATION']) ? $_SESSION['APPLICATION'] : '';
     $index = isset($_SESSION['INDEX']) ? $_SESSION['INDEX'] : '';
     $steps = $applications->getSteps($appUid, $index, $tasUid, $proUid);
     $list = array();
     foreach ($steps as $step) {
         $item['id'] = $item['idtodraw'] = $step['id'];
         $item['draggable'] = false;
         $item['leaf'] = true;
         $item['hrefTarget'] = 'casesSubFrame';
         $item['text'] = $step['title'];
         $item['url'] = '../' . $step['url'];
         switch ($step['type']) {
             case 'DYNAFORM':
                 $item['iconCls'] = 'ss_sprite ss_application_form';
                 break;
             case 'OUTPUT_DOCUMENT':
                 $item['iconCls'] = 'ss_sprite ss_application_put';
                 break;
             case 'INPUT_DOCUMENT':
                 $item['iconCls'] = 'ss_sprite ss_application_get';
                 break;
             case 'EXTERNAL':
                 $item['iconCls'] = 'ss_sprite ss_application_view_detail';
                 break;
             default:
                 $item['iconCls'] = 'ICON_ASSIGN_TASK';
         }
         $list[] = $item;
     }
     echo G::json_encode($list);
 }
Ejemplo n.º 14
0
/**
 * departments_Ajax.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 LookForChildren($parent, $level, $aDepUsers)
{
    G::LoadClass('configuration');
    $conf = new Configurations();
    $oDept = new Department();
    $allDepartments = $oDept->getDepartments($parent);
    $level++;
    $rows = array();
    foreach ($allDepartments as $department) {
        unset($depto);
        $depto['DEP_TITLE'] = str_replace(array("<", ">"), array("&lt;", "&gt;"), $department['DEP_TITLE']);
        $depto['DEP_STATUS'] = $department['DEP_STATUS'];
        if ($department['DEP_MANAGER_USERNAME'] != '') {
            $depto['DEP_MANAGER_NAME'] = $conf->usersNameFormat($department['DEP_MANAGER_USERNAME'], $department['DEP_MANAGER_FIRSTNAME'], $department['DEP_MANAGER_LASTNAME']);
        } else {
            $depto['DEP_MANAGER_NAME'] = '';
        }
        $depto['DEP_TOTAL_USERS'] = isset($aDepUsers[$department['DEP_UID']]) ? $aDepUsers[$department['DEP_UID']] : 0;
        $depto['DEP_UID'] = $department['DEP_UID'];
        $depto['DEP_MANAGER'] = $department['DEP_MANAGER'];
        $depto['DEP_PARENT'] = $department['DEP_PARENT'];
        if ($department['HAS_CHILDREN'] > 0) {
            $depto['children'] = LookForChildren($department['DEP_UID'], $level, $aDepUsers);
            $depto['iconCls'] = 'ss_sprite ss_chart_organisation';
            $depto['expanded'] = true;
        } else {
            $depto['leaf'] = true;
            if ($level == 1) {
                $depto['iconCls'] = 'ss_sprite ss_chart_organisation';
            } else {
                $depto['iconCls'] = 'ss_sprite ss_plugin';
            }
        }
        $rows[] = $depto;
    }
    return $rows;
}
Ejemplo n.º 15
0
 public static function isApplicable()
 {
     if (!class_exists('System')) {
         G::LoadClass("System");
     }
     patch::$isPathchable = false;
     $con = Propel::getConnection("workflow");
     $stmt = $con->prepareStatement("describe TASK;");
     $rs = $stmt->executeQuery();
     $rs->next();
     while ($row = $rs->getRow()) {
         if ($row['Field'] == "TAS_GROUP_VARIABLE") {
             $version = System::getVersion();
             $version = explode('-', $version);
             if ($version[0] == '2.5.1') {
                 echo "Version " . $version[0] . " Patch\n";
                 patch::$isPathchable = true;
             }
             break;
         }
         $rs->next();
     }
     return patch::$isPathchable;
 }
Ejemplo n.º 16
0
 function adhocAssignUsersk($params)
 {
     G::LoadClass('groups');
     G::LoadClass('tasks');
     $oTasks = new Tasks();
     $aAux = $oTasks->getGroupsOfTask($_SESSION['TASK'], 2);
     $aAdhocUsers = array();
     $oGroups = new Groups();
     foreach ($aAux as $aGroup) {
         $aUsers = $oGroups->getUsersOfGroup($aGroup['GRP_UID']);
         foreach ($aUsers as $aUser) {
             if ($aUser['USR_UID'] != $_SESSION['USER_LOGGED']) {
                 $aAdhocUsers[] = $aUser['USR_UID'];
             }
         }
     }
     $aAux = $oTasks->getUsersOfTask($_SESSION['TASK'], 2);
     foreach ($aAux as $aUser) {
         if ($aUser['USR_UID'] != $_SESSION['USER_LOGGED']) {
             $aAdhocUsers[] = $aUser['USR_UID'];
         }
     }
     require_once 'classes/model/Users.php';
     $oCriteria = new Criteria('workflow');
     $oCriteria->addSelectColumn(UsersPeer::USR_UID);
     $oCriteria->addSelectColumn(UsersPeer::USR_FIRSTNAME);
     $oCriteria->addSelectColumn(UsersPeer::USR_LASTNAME);
     $oCriteria->add(UsersPeer::USR_UID, $aAdhocUsers, Criteria::IN);
     $oDataset = UsersPeer::doSelectRS($oCriteria);
     $oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
     $aData = array();
     while ($oDataset->next()) {
         $aData[] = $oDataset->getRow();
     }
     $this->data = $aData;
 }
Ejemplo n.º 17
0
function getSimpleDashboardData()
{
    G::LoadClass("BasePeer");
    require_once "classes/model/AppCacheView.php";
    require_once 'classes/model/Process.php';
    $sUIDUserLogged = $_SESSION['USER_LOGGED'];
    $Criteria = new Criteria('workflow');
    $Criteria->clearSelectColumns();
    $Criteria->addSelectColumn(AppCacheViewPeer::PRO_UID);
    $Criteria->addSelectColumn(AppCacheViewPeer::APP_UID);
    $Criteria->addSelectColumn(AppCacheViewPeer::APP_NUMBER);
    $Criteria->addSelectColumn(AppCacheViewPeer::APP_STATUS);
    $Criteria->addSelectColumn(AppCacheViewPeer::DEL_INDEX);
    $Criteria->addSelectColumn(AppCacheViewPeer::APP_TITLE);
    $Criteria->addSelectColumn(AppCacheViewPeer::APP_PRO_TITLE);
    $Criteria->addSelectColumn(AppCacheViewPeer::APP_TAS_TITLE);
    $Criteria->addSelectColumn(AppCacheViewPeer::APP_DEL_PREVIOUS_USER);
    $Criteria->addSelectColumn(AppCacheViewPeer::DEL_TASK_DUE_DATE);
    $Criteria->addSelectColumn(AppCacheViewPeer::APP_UPDATE_DATE);
    $Criteria->addSelectColumn(AppCacheViewPeer::DEL_PRIORITY);
    $Criteria->addSelectColumn(AppCacheViewPeer::DEL_DELAYED);
    $Criteria->addSelectColumn(AppCacheViewPeer::USR_UID);
    $Criteria->addSelectColumn(AppCacheViewPeer::APP_THREAD_STATUS);
    $Criteria->add(AppCacheViewPeer::APP_STATUS, array("TO_DO", "DRAFT"), CRITERIA::IN);
    $Criteria->add(AppCacheViewPeer::USR_UID, array($sUIDUserLogged, ""), CRITERIA::IN);
    $Criteria->add(AppCacheViewPeer::DEL_FINISH_DATE, null, Criteria::ISNULL);
    //$Criteria->add ( AppCacheViewPeer::APP_THREAD_STATUS, 'OPEN' );
    $Criteria->add(AppCacheViewPeer::DEL_THREAD_STATUS, 'OPEN');
    //execute the query
    $oDataset = AppCacheViewPeer::doSelectRS($Criteria);
    $oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
    $oDataset->next();
    $oProcess = new Process();
    $rows = array();
    $processNames = array();
    while ($aRow = $oDataset->getRow()) {
        // G::pr($aRow);
        if (!isset($processNames[$aRow['PRO_UID']])) {
            $aProcess = $oProcess->load($aRow['PRO_UID']);
            $processNames[$aRow['PRO_UID']] = $aProcess['PRO_TITLE'];
        }
        if ($aRow['USR_UID'] == "") {
            $aRow['APP_STATUS'] = "UNASSIGNED";
        }
        if (in_array($aRow['APP_STATUS'], array("TO_DO", "UNASSIGNED")) && $aRow['APP_THREAD_STATUS'] == "OPEN" || $aRow['APP_STATUS'] == "DRAFT") {
            $rows[$processNames[$aRow['PRO_UID']]][$aRow['APP_STATUS']][$aRow['DEL_DELAYED']][] = $aRow['APP_UID'];
            if (!isset($rows[$processNames[$aRow['PRO_UID']]][$aRow['APP_STATUS']]['count'])) {
                $rows[$processNames[$aRow['PRO_UID']]][$aRow['APP_STATUS']]['count'] = 0;
            }
            $rows[$processNames[$aRow['PRO_UID']]][$aRow['APP_STATUS']]['count']++;
        }
        $oDataset->next();
    }
    //Generate different groups of data for graphs
    $rowsResponse = array();
    $i = 0;
    foreach ($rows as $processID => $processInfo) {
        $i++;
        if ($i <= 10) {
            $rowsResponse['caseStatusByProcess'][] = array('process' => $processID, 'inbox' => isset($processInfo['TO_DO']['count']) ? $processInfo['TO_DO']['count'] : 0, 'draft' => isset($processInfo['DRAFT']['count']) ? $processInfo['DRAFT']['count'] : 0, 'unassigned' => isset($processInfo['UNASSIGNED']['count']) ? $processInfo['UNASSIGNED']['count'] : 0);
        }
    }
    $rowsResponse['caseDelayed'][] = array('delayed' => 'On Time', 'total' => 100);
    $rowsResponse['caseDelayed'][] = array('delayed' => 'Delayed', 'total' => 50);
    print_r(G::json_encode($rowsResponse));
}
Ejemplo n.º 18
0
 public function startCase($httpData)
 {
     G::LoadClass('case');
     $case = new Cases();
     $aData = $case->startCase($httpData->id, $_SESSION['USER_LOGGED']);
     $_SESSION['APPLICATION'] = $aData['APPLICATION'];
     $_SESSION['INDEX'] = $aData['INDEX'];
     $_SESSION['PROCESS'] = $aData['PROCESS'];
     $_SESSION['TASK'] = $httpData->id;
     $_SESSION['STEP_POSITION'] = 0;
     $_SESSION['CASES_REFRESH'] = true;
     // Execute Events
     require_once 'classes/model/Event.php';
     $event = new Event();
     $event->createAppEvents($_SESSION['PROCESS'], $_SESSION['APPLICATION'], $_SESSION['INDEX'], $_SESSION['TASK']);
     $oCase = new Cases();
     $aNextStep = $oCase->getNextStep($_SESSION['PROCESS'], $_SESSION['APPLICATION'], $_SESSION['INDEX'], $_SESSION['STEP_POSITION']);
     //../cases/cases_Open?APP_UID={$APP.APP_UID}&DEL_INDEX={$APP.DEL_INDEX}&action=todo
     $aNextStep['PAGE'] = '../cases/cases_Open?APP_UID=' . $aData['APPLICATION'] . '&DEL_INDEX=' . $aData['INDEX'] . '&action=draft';
     $_SESSION['BREAKSTEP']['NEXT_STEP'] = $aNextStep;
     $this->redirect($aNextStep['PAGE']);
 }
Ejemplo n.º 19
0
 private function _default()
 {
     require_once PATH_THIRDPARTY . 'smarty/libs/Smarty.class.php';
     // put full path to Smarty.class.php
     global $G_ENABLE_BLANK_SKIN;
     //menu
     global $G_PUBLISH;
     global $G_MAIN_MENU;
     global $G_SUB_MENU;
     global $G_MENU_SELECTED;
     global $G_SUB_MENU_SELECTED;
     global $G_ID_MENU_SELECTED;
     global $G_ID_SUB_MENU_SELECTED;
     G::verifyPath(PATH_SMARTY_C, true);
     G::verifyPath(PATH_SMARTY_CACHE, true);
     $smarty = new Smarty();
     $oHeadPublisher =& headPublisher::getSingleton();
     $smarty->compile_dir = PATH_SMARTY_C;
     $smarty->cache_dir = PATH_SMARTY_CACHE;
     $smarty->config_dir = PATH_THIRDPARTY . 'smarty/configs';
     //To setup en extJS Theme for this Skin
     G::LoadClass('serverConfiguration');
     $oServerConf =& serverConf::getSingleton();
     $extSkin = $oServerConf->getProperty("extSkin");
     if (!$extSkin) {
         $extSkin = array();
     }
     $extSkin[SYS_SKIN] = "xtheme-gray";
     $oServerConf->setProperty("extSkin", $extSkin);
     //End of extJS Theme setup
     if (isset($G_ENABLE_BLANK_SKIN) && $G_ENABLE_BLANK_SKIN) {
         $smarty->template_dir = $this->layoutFileBlank['dirname'];
         $smarty->force_compile = $this->forceTemplateCompile;
         $smarty->display($layoutFileBlank['basename']);
     } else {
         $smarty->template_dir = $this->layoutFile['dirname'];
         $meta = null;
         $header = null;
         if (preg_match("/^.*\\(.*MSIE (\\d+)\\..+\\).*\$/", $_SERVER["HTTP_USER_AGENT"], $arrayMatch)) {
             $ie = intval($arrayMatch[1]);
             if ($ie == 10) {
                 $ie = 8;
                 $meta = "<meta http-equiv=\"X-UA-Compatible\" content=\"IE={$ie}\" />";
             }
         }
         if (isset($oHeadPublisher)) {
             if (defined('SYS_SYS')) {
                 $oHeadPublisher->title = isset($_SESSION['USR_USERNAME']) ? '(' . $_SESSION['USR_USERNAME'] . ' ' . G::LoadTranslation('ID_IN') . ' ' . SYS_SYS . ')' : '';
             }
             $header = $oHeadPublisher->printHeader();
             $header .= $oHeadPublisher->getExtJsStylesheets($this->cssFileName);
         }
         $smarty->assign("meta", $meta);
         $smarty->assign("header", $header);
         $footer = '';
         if (strpos($_SERVER['REQUEST_URI'], '/login/login') !== false) {
             $freeOfChargeText = "";
             if (!defined('SKIP_FREE_OF_CHARGE_TEXT')) {
                 $freeOfChargeText = "Supplied free of charge with no support, certification, warranty, <br>maintenance nor indemnity by Colosa and its Certified Partners.";
             }
             if (class_exists('pmLicenseManager')) {
                 $freeOfChargeText = "";
             }
             $fileFooter = PATH_SKINS . SYS_SKIN . PATH_SEP . 'footer.html';
             if (file_exists($fileFooter)) {
                 $footer .= file_get_contents($fileFooter);
             } else {
                 $fileFooter = PATH_SKIN_ENGINE . SYS_SKIN . PATH_SEP . 'footer.html';
                 if (file_exists($fileFooter)) {
                     $footer .= file_get_contents($fileFooter);
                 } else {
                     $fileFooter = PATH_CUSTOM_SKINS . SYS_SKIN . PATH_SEP . 'footer.html';
                     if (file_exists($fileFooter)) {
                         $footer .= file_get_contents($fileFooter);
                     } else {
                         $footer .= "<br />Copyright &copy; 2003-" . date('Y') . " <a href=\"http://www.colosa.com\" alt=\"Colosa, Inc.\" target=\"_blank\">Colosa, Inc.</a> All rights reserved.<br /> {$freeOfChargeText} " . "<br><br/><a href=\"http://www.processmaker.com\" alt=\"Powered by ProcessMaker - Open Source Workflow & Business Process Management (BPM) Management Software\" title=\"Powered by ProcessMaker\" target=\"_blank\"></a>";
                     }
                 }
             }
         }
         $oMenu = new Menu();
         $menus = $oMenu->generateArrayForTemplate($G_MAIN_MENU, 'SelectedMenu', 'mainMenu', $G_MENU_SELECTED, $G_ID_MENU_SELECTED);
         $smarty->assign('menus', $menus);
         $oSubMenu = new Menu();
         $subMenus = $oSubMenu->generateArrayForTemplate($G_SUB_MENU, 'selectedSubMenu', 'subMenu', $G_SUB_MENU_SELECTED, $G_ID_SUB_MENU_SELECTED);
         $smarty->assign('subMenus', $subMenus);
         if (!defined('NO_DISPLAY_USERNAME')) {
             define('NO_DISPLAY_USERNAME', 0);
         }
         if (NO_DISPLAY_USERNAME == 0) {
             $switch_interface = isset($_SESSION['user_experience']) && $_SESSION['user_experience'] == 'SWITCHABLE';
             $smarty->assign('user_logged', isset($_SESSION['USER_LOGGED']) ? $_SESSION['USER_LOGGED'] : '');
             $smarty->assign('tracker', SYS_COLLECTION == 'tracker' ? $G_PUBLISH->Parts[0]['File'] != 'tracker/login' ? true : '' : '');
             $smarty->assign('switch_interface', $switch_interface);
             $smarty->assign('switch_interface_label', G::LoadTranslation('ID_SWITCH_INTERFACE'));
             $smarty->assign('rolename', isset($_SESSION['USR_ROLENAME']) ? $_SESSION['USR_ROLENAME'] . '' : '');
             $smarty->assign('pipe', isset($_SESSION['USR_USERNAME']) ? ' | ' : '');
             $smarty->assign('logout', G::LoadTranslation('ID_LOGOUT'));
             $smarty->assign('workspace', defined('SYS_SYS') ? SYS_SYS : '');
             $uws = isset($_SESSION['USR_ROLENAME']) && $_SESSION['USR_ROLENAME'] != '' ? strtolower(G::LoadTranslation('ID_WORKSPACE_USING')) : G::LoadTranslation('ID_WORKSPACE_USING');
             $smarty->assign('workspace_label', $uws);
             G::LoadClass("configuration");
             $conf = new Configurations();
             $conf->getFormats();
             if (defined('SYS_SYS')) {
                 $smarty->assign('udate', $conf->getSystemDate(date('Y-m-d H:i:s')));
             } else {
                 $smarty->assign('udate', G::getformatedDate(date('Y-m-d H:i:s'), 'M d, yyyy', SYS_LANG));
             }
             $name = $conf->userNameFormat(isset($_SESSION['USR_USERNAME']) ? $_SESSION['USR_USERNAME'] : '', isset($_SESSION['USR_FULLNAME']) ? htmlentities($_SESSION['USR_FULLNAME'], ENT_QUOTES, 'UTF-8') : '', isset($_SESSION['USER_LOGGED']) ? $_SESSION['USER_LOGGED'] : '');
             $smarty->assign('user', $name);
         }
         if (class_exists('pmLicenseManager')) {
             $pmLicenseManagerO =& pmLicenseManager::getSingleton();
             $expireIn = $pmLicenseManagerO->getExpireIn();
             $expireInLabel = $pmLicenseManagerO->getExpireInLabel();
             //if($expireIn<=30){
             if ($expireInLabel != "") {
                 $smarty->assign('msgVer', '<label class="textBlack">' . $expireInLabel . '</label>&nbsp;&nbsp;');
             }
             //}
         }
         if (defined('SYS_SYS')) {
             $logout = '/sys' . SYS_SYS . '/' . SYS_LANG . '/' . SYS_SKIN . '/login/login';
         } else {
             $logout = '/sys/' . SYS_LANG . '/' . SYS_SKIN . '/login/login';
         }
         $smarty->assign('linklogout', $logout);
         $smarty->assign('footer', $footer);
         $smarty->assign('tpl_menu', PATH_TEMPLATE . 'menu.html');
         $smarty->assign('tpl_submenu', PATH_TEMPLATE . 'submenu.html');
         G::LoadClass('replacementLogo');
         $oLogoR = new replacementLogo();
         if (defined("SYS_SYS")) {
             $aFotoSelect = $oLogoR->getNameLogo(isset($_SESSION['USER_LOGGED']) ? $_SESSION['USER_LOGGED'] : '');
             if (is_array($aFotoSelect)) {
                 $sFotoSelect = trim($aFotoSelect['DEFAULT_LOGO_NAME']);
                 $sWspaceSelect = trim($aFotoSelect['WORKSPACE_LOGO_NAME']);
             }
         }
         if (class_exists('PMPluginRegistry')) {
             $oPluginRegistry =& PMPluginRegistry::getSingleton();
             if (isset($sFotoSelect) && $sFotoSelect != '' && !strcmp($sWspaceSelect, SYS_SYS)) {
                 $sCompanyLogo = $oPluginRegistry->getCompanyLogo($sFotoSelect);
                 $sCompanyLogo = "/sys" . SYS_SYS . "/" . SYS_LANG . "/" . SYS_SKIN . "/setup/showLogoFile.php?id=" . base64_encode($sCompanyLogo);
             } else {
                 $sCompanyLogo = $oPluginRegistry->getCompanyLogo('/images/processmaker.logo.jpg');
             }
         } else {
             $sCompanyLogo = '/images/processmaker.logo.jpg';
         }
         $smarty->assign('logo_company', $sCompanyLogo);
         $smarty->force_compile = $this->forceTemplateCompile;
         $smarty->display($this->layoutFile['basename']);
     }
 }
Ejemplo n.º 20
0
 */
/*
 * Created on 07/01/2008
 *
 * @author David Callizaya <*****@*****.**>
 */
if (isset($_POST['dynaformName'])) {
    $dynaForm = new Dynaform();
    $res = $dynaForm->verifyExistingName($_POST['dynaformName'], $_POST['proUid'], $_POST['dynaformUid']);
    print $res ? 1 : 0;
}
global $_DBArray;
if (!isset($_DBArray)) {
    $_DBArray = array();
}
G::LoadClass('dynaformEditor');
$oDynaformEditorAjax = new dynaformEditorAjax($_POST);
//if (($RBAC_Response=$RBAC->userCanAccess("PM_FACTORY"))!=1) return $RBAC_Response;
//
//  //G::genericForceLogin( 'WF_MYINFO' , 'login/noViewPage', $urlLogin = '******' );
//
//	G::LoadInclude('ajax');
//  G::LoadClass('toolBar');
//  G::LoadClass('dynaFormField');
//  G::LoadClass('dynaform');
//
//  if (!((isset($_POST['A']) && $_POST['A']!=='')||(isset($_GET['A']) && $_GET['A']!==''))) return;
//
//  $file = G::decrypt( get_ajax_value('A') , URL_KEY );
//
//	$function=get_ajax_value('function');
Ejemplo n.º 21
0
 /**
  * @url POST /project/:prj_uid/dynaforms
  *
  * @param string $prj_uid {@min 32}{@max 32}
  *
  */
 public function doGetDynaFormsId($prj_uid, $request_data)
 {
     try {
         $dynaForm = new \ProcessMaker\BusinessModel\DynaForm();
         $dynaForm->setFormatFieldNameInUppercase(false);
         \G::LoadClass("pmDynaform");
         $pmDynaForm = new \pmDynaform();
         $_SESSION['PROCESS'] = $prj_uid;
         $return = array();
         foreach ($request_data['formId'] as $dyn_uid) {
             $response = $dynaForm->getDynaForm($dyn_uid);
             $result   = $this->parserDataDynaForm($response);
             $result['formContent'] = (isset($result['formContent']) && $result['formContent'] != null)?json_decode($result['formContent']):"";
             $pmDynaForm->jsonr($result['formContent']);
             $return[] = $result;
         }
     } catch (\Exception $e) {
         throw (new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage()));
     }
     return $return;
 }
Ejemplo n.º 22
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.
 */
// lets display the items
$pluginFile = $_GET['id'];
$pluginStatus = $_GET['status'];
$items = array();
G::LoadClass('plugin');
//here we are enabling or disabling the plugin and all related options registered.
$oPluginRegistry =& PMPluginRegistry::getSingleton();
if ($handle = opendir(PATH_PLUGINS)) {
    while (false !== ($file = readdir($handle))) {
        if (strpos($file, '.php', 1) && $file == $pluginFile) {
            if ($pluginStatus == '1') {
                //print "change to disable";
                $details = $oPluginRegistry->getPluginDetails($pluginFile);
                $oPluginRegistry->disablePlugin($details->sNamespace);
                $size = file_put_contents(PATH_DATA_SITE . 'plugin.singleton', $oPluginRegistry->serializeInstance());
                print "size saved : {$size}  <br>";
            } else {
                //print "change to ENABLED";
                require_once PATH_PLUGINS . $pluginFile;
                $details = $oPluginRegistry->getPluginDetails($pluginFile);
require_once PATH_THIRDPARTY . '/lime/lime.php';
require_once PATH_THIRDPARTY . 'lime/yaml.class.php';
require_once PATH_CORE . "config/databases.php";
require_once "propel/Propel.php";
Propel::init(PATH_CORE . "config/databases.php");
G::LoadThirdParty('smarty/libs', 'Smarty.class');
G::LoadSystem('error');
G::LoadSystem('xmlform');
G::LoadSystem('xmlDocument');
G::LoadSystem('form');
G::LoadSystem('dbconnection');
G::LoadSystem('dbsession');
G::LoadSystem('dbrecordset');
G::LoadSystem('dbtable');
G::LoadSystem('testTools');
G::LoadClass('appDelegation');
require_once PATH_CORE . '/classes/model/AppDelegation.php';
$dbc = new DBConnection();
$ses = new DBSession($dbc);
$obj = new AppDelegation($dbc);
$t = new lime_test(1, new lime_output_color());
$t->diag('class AppDelegation');
$t->isa_ok($obj, 'AppDelegation', 'class AppDelegation created');
class AppDel extends unitTest
{
    function CreateEmptyAppDelegation($data, $fields)
    {
        $obj = new AppDelegation();
        $res = $obj->createAppDelegation($fields);
        return $res;
    }
Ejemplo n.º 24
0
    $oProcessMap = new processMap();
    //$sGatewayUID = $oProcessMap->saveNewGateway($aData['PROCESS'], $aData['TASK'][0], $aData['ROU_NEXT_TASK'][0]);
    require_once 'classes/model/Gateway.php';
    $oGateway = new Gateway();
    $aGatewayFields = array();
    $aGatewayFields['GAT_UID'] = $aData['GAT_UID'];
    $aGatewayFields['TAS_UID'] = $aData['TASK'][0];
    $aGatewayFields['GAT_NEXT_TASK'] = $aData['ROU_NEXT_TASK'][0];
    $aGatewayFields['GAT_TYPE'] = '';
    $oGateway->update($aGatewayFields);
    //$sGatewayUID   = $oProcessMap->saveNewGateway($aData['PROCESS'], $aData['TASK'][0], $aData['ROU_NEXT_TASK'][0]);
    //echo $sGatewayUID.'|';
}
//else
//  echo $aData['ROU_EVN_UID'].'|';   //sending route_event_uid in response
G::LoadClass('tasks');
$oTasks = new Tasks();
$rou_id = 0;
$aFields['GAT_UID'] = $aData['GAT_UID'];
switch ($aData['action']) {
    case 'savePattern':
        foreach ($aData['TASK'] as $iKey => $aRow) {
            $oTasks->deleteAllRoutesOfTask($aData['PROCESS'], $aRow);
        }
        require_once 'classes/model/Route.php';
        require_once 'classes/model/Event.php';
        $oEvent = new Event();
        $oRoute = new Route();
        switch ($aData['ROU_TYPE']) {
            case 'SEQUENTIAL':
            case 'SEC-JOIN':
Ejemplo n.º 25
0
 */
/* Permissions */
switch ($RBAC->userCanAccess('PM_CASES')) {
    case -2:
        G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels');
        G::header('location: ../login/login');
        die;
        break;
    case -1:
        G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels');
        G::header('location: ../login/login');
        die;
        break;
}
/* Includes */
G::LoadClass('case');
/* GET , POST & $_SESSION Vars */
/* unset any variable, because we are starting a new case */
if (isset($_SESSION['APPLICATION'])) {
    unset($_SESSION['APPLICATION']);
}
if (isset($_SESSION['PROCESS'])) {
    unset($_SESSION['PROCESS']);
}
if (isset($_SESSION['TASK'])) {
    unset($_SESSION['TASK']);
}
if (isset($_SESSION['INDEX'])) {
    unset($_SESSION['INDEX']);
}
if (isset($_SESSION['STEP_POSITION'])) {
Ejemplo n.º 26
0
                    $sNamespace = $val->sNamespace;
                    $sStepName = $val->sStepName;
                }
            }
            if (class_exists($sNamespace . "plugin")) {
                if (!$aPreviousStep) {
                    $Fields['APP_DATA']['__DYNAFORM_OPTIONS']['PREVIOUS_STEP_LABEL'] = '';
                } else {
                    $Fields['APP_DATA']['__DYNAFORM_OPTIONS']['PREVIOUS_STEP'] = $aPreviousStep['PAGE'];
                    $Fields['APP_DATA']['__DYNAFORM_OPTIONS']['PREVIOUS_STEP_LABEL'] = G::loadTranslation("ID_PREVIOUS_STEP");
                }
                $Fields['APP_DATA']['__DYNAFORM_OPTIONS']['NEXT_STEP'] = $aNextStep['PAGE'];
                $Fields['APP_DATA']['__DYNAFORM_OPTIONS']['NEXT_STEP_LABEL'] = G::loadTranslation("ID_NEXT_STEP");
                /** Added By erik date: 16-05-08
                 * Description: this was added for the additional database connections */
                G::LoadClass('dbConnections');
                $oDbConnections = new dbConnections($_SESSION['PROCESS']);
                $oDbConnections->loadAdditionalConnections();
                $stepFilename = "{$sNamespace}/{$sStepName}";
                G::evalJScript("\n        if (parent.setCurrent) {\n          parent.setCurrent('" . $_GET['UID'] . "');\n        }");
                $G_PUBLISH->AddContent('content', $stepFilename);
            } else {
                $aMessage['MESSAGE'] = G::loadTranslation('ID_EXTERNAL_STEP_MISSING', SYS_LANG, array("plugin" => $sNamespace));
                $G_PUBLISH->AddContent('xmlform', 'xmlform', 'login/showMessage', '', $aMessage);
            }
            break;
    }
    //Add content content step - End
} catch (Exception $e) {
    G::SendTemporalMessage(G::LoadTranslation('ID_PROCESS_DEF_PROBLEM'), 'error', 'string', 3, 100);
    $aMessage = array();
Ejemplo n.º 27
0
try {
    global $RBAC;
    switch ($RBAC->userCanAccess('PM_FACTORY')) {
        case -2:
            G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels');
            G::header('location: ../login/login');
            die;
            break;
        case -1:
            G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels');
            G::header('location: ../login/login');
            die;
            break;
    }
    //srequire_once 'classes/model/StepTrigger.php';
    G::LoadClass('processMap');
    $oProcessMap = new ProcessMap();
    switch ($_POST['action']) {
        case 'availableSupervisorDynaforms':
            $oProcessMap->availableSupervisorDynaforms($_POST['PRO_UID']);
            break;
        case 'assignSupervisorDynaform':
            $oProcessMap->assignSupervisorStep($_POST['PRO_UID'], 'DYNAFORM', $_POST['DYN_UID']);
            break;
        case 'removeSupervisorDynaform':
            $oProcessMap->removeSupervisorStep($_POST['STEP_UID'], $_POST['PRO_UID'], 'DYNAFORM', $_POST['DYN_UID'], $_POST['STEP_POSITION']);
            break;
        case 'availableSupervisorInputs':
            $oProcessMap->availableSupervisorInputs($_POST['PRO_UID']);
            break;
        case 'assignSupervisorInput':
Ejemplo n.º 28
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;
     }
 }
Ejemplo n.º 29
0
 * 
 * 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;
$uid = $_SESSION['USER_LOGGED'];
$dbc = new DBConnection();
$ses = new DBSession($dbc);
G::LoadClass('templateTable');
$query = $ses->execute('select USR_COUNTRY ,USR_CITY ,USR_LOCATION from USER where UID = "' . $uid . '"');
$param = $query->read();
$city = $param['USR_CITY'];
$query = $ses->execute('SELECT UID,CAPTION FROM TERRITORY WHERE TERRITORY="LOCATION" AND RELATION="' . $city . '"');
/*	
$table=new templateTable('list_template.html','DIV_LOCATIONS');
	$table->formatTitleCol(0,'width="80%"');
	$table->formatTitleCol(1,'align="center"');
	$table->formatCol(0,'width="80%" ');
	$table->formatCol(1,'align="center"');
	
$table->addTitle(array(G::LoadTranslation('ID_LOCATION'),''));
for($r=0;$r<$query->count();$r++)
{
	$row=$query->read();
Ejemplo n.º 30
0
 /**
  * Delete Activity
  * @var string $prj_uid. Uid for Process
  * @var string $act_uid. Uid for Activity
  *
  * @author Brayan Pereyra (Cochalo) <*****@*****.**>
  * @copyright Colosa - Bolivia
  *
  * return object
  */
 public function deleteTask($prj_uid, $act_uid)
 {
     try {
         $prj_uid = $this->validateProUid($prj_uid);
         $act_uid = $this->validateActUid($act_uid);
         G::LoadClass('tasks');
         $tasks = new \Tasks();
         $tasks->deleteTask($act_uid);
     } catch (Exception $e) {
         throw $e;
     }
 }