コード例 #1
0
 public function getUsersToReassign()
 {
     if (!isset($_SESSION['USER_LOGGED'])) {
         $response = new stdclass();
         $response->message = G::LoadTranslation('ID_LOGIN_AGAIN');
         $response->lostSession = true;
         print G::json_encode($response);
         die;
     }
     G::LoadClass('tasks');
     $task = new Task();
     $tasks = $task->load($_SESSION['TASK']);
     $case = new Cases();
     $result->data = $case->getUsersToReassign($_SESSION['TASK'], $_SESSION['USER_LOGGED'], $tasks['PRO_UID']);
     print G::json_encode($result);
 }
コード例 #2
0
    $oDataset = AppCacheViewPeer::doSelectRS($cProcess);
    $oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
    $oDataset->next();
    while ($aRow = $oDataset->getRow()) {
        $processes[] = array($aRow['PRO_UID'], $aRow['APP_PRO_TITLE']);
        $oDataset->next();
    }
    return print G::json_encode($processes);
}
if ($actionAjax == "getUsersToReassign") {
    $_SESSION['TASK'] = $_REQUEST['TAS_UID'];
    $case = new Cases();
    G::LoadClass('tasks');
    $task = new Task();
    $tasks = $task->load($_SESSION['TASK']);
    $result->data = $case->getUsersToReassign($_SESSION['TASK'], $_SESSION['USER_LOGGED'], $tasks['PRO_UID']);
    print G::json_encode($result);
}
if ($actionAjax == 'reassignCase') {
    $APP_UID = $_REQUEST["APP_UID"];
    $DEL_INDEX = $_REQUEST["DEL_INDEX"];
    $_SESSION['APPLICATION'] = $APP_UID;
    $_SESSION['INDEX'] = $DEL_INDEX;
    $cases = new Cases();
    $user = new Users();
    $app = new Application();
    $TO_USR_UID = $_POST['USR_UID'];
    try {
        $cases->reassignCase($_SESSION['APPLICATION'], $_SESSION['INDEX'], $_SESSION['USER_LOGGED'], $TO_USR_UID);
        $caseData = $app->load($_SESSION['APPLICATION']);
        $userData = $user->load($TO_USR_UID);
コード例 #3
0
 public function getUsersToReassign()
 {
     $case = new Cases();
     $result->data = $case->getUsersToReassign($_SESSION['TASK'], $_SESSION['USER_LOGGED']);
     print G::json_encode($result);
 }
コード例 #4
0
//$processUid = isset($_POST['process'])     ? $_POST['process'] : '';
$TaskUid = isset( $_POST['task'] ) ? $_POST['task'] : '';
$sReassignFromUser = isset( $_POST['currentUser'] ) ? $_POST['currentUser'] : '';

G::LoadClass( 'case' );

$oCases = new Cases();
$oConf = new Configurations();

$aUsersInvolved = Array();

$ConfEnv = $oConf->getFormats();
if ($TaskUid != '') {
    G::LoadClass( 'tasks' );
    $task = new Task();
    $tasks = $task->load($TaskUid);
    $rows = $oCases->getUsersToReassign($TaskUid, $_SESSION['USER_LOGGED'], $tasks['PRO_UID']);
    foreach ($rows as $row) {
        $sCaseUser = G::getFormatUserList( $ConfEnv['format'], $row );
        $aUsersInvolved[] = array ('userUid' => $row['USR_UID'], 'userFullname' => $sCaseUser);
    }
}

//            $oTmp = new stdClass();
//            $oTmp->items = $aUsersInvolved;
$result = array ();
$aUsersInvolved = array_sort( $aUsersInvolved, 'userFullname', SORT_ASC, $query );
$result['data'] = $aUsersInvolved;
print G::json_encode( $result );

コード例 #5
0
                $new_array[] = $array[$k];
            } else {
                if (preg_match("/" . preg_quote($query, '/') . "/i", $array[$k]['userFullname'])) {
                    $new_array[] = $array[$k];
                }
            }
        }
    }
    return $new_array;
}
//  $APP_UIDS          = explode(',', $_POST['APP_UID']);
$appUid = isset($_POST['application']) ? $_POST['application'] : '';
//  $processUid = isset($_POST['process'])     ? $_POST['process'] : '';
$TaskUid = isset($_POST['task']) ? $_POST['task'] : '';
$sReassignFromUser = isset($_POST['currentUser']) ? $_POST['currentUser'] : '';
G::LoadClass('case');
$oCases = new Cases();
$oConf = new Configurations();
$aUsersInvolved = array();
$ConfEnv = $oConf->getFormats();
$rows = $oCases->getUsersToReassign($TaskUid, $sReassignFromUser);
foreach ($rows as $row) {
    $sCaseUser = G::getFormatUserList($ConfEnv['format'], $row);
    $aUsersInvolved[] = array('userUid' => $row['USR_UID'], 'userFullname' => $sCaseUser);
}
//            $oTmp = new stdClass();
//            $oTmp->items = $aUsersInvolved;
$result = array();
$aUsersInvolved = array_sort($aUsersInvolved, 'userFullname', SORT_ASC, $query);
$result['data'] = $aUsersInvolved;
print G::json_encode($result);