BUG 8743 Migrate Case Informations lists to ExtJS SOLVED
- Migrate Case "Information" lists to ExtJS (from master branch) - migrated the following items: Case history, Messages History, Dynaforms, Uploaded Documents, Generated Documents
This commit is contained in:
@@ -335,66 +335,88 @@ class Ajax
|
||||
print(G::json_encode($taskData));
|
||||
}
|
||||
|
||||
function caseHistory()
|
||||
{
|
||||
function caseHistory() {
|
||||
global $G_PUBLISH;
|
||||
$c = Cases::getTransferHistoryCriteria($_SESSION['APPLICATION']);
|
||||
$G_PUBLISH = new Publisher();
|
||||
$G_PUBLISH->AddContent('propeltable', 'paged-table', 'cases/cases_TransferHistory', $c, array());
|
||||
G::RenderPage('publish', 'blank');
|
||||
G::loadClass('configuration');
|
||||
|
||||
$oHeadPublisher =& headPublisher::getSingleton();
|
||||
$conf = new Configurations;
|
||||
$oHeadPublisher->addExtJsScript('cases/caseHistory', true ); //adding a javascript file .js
|
||||
$oHeadPublisher->addContent('cases/caseHistory'); //adding a html file .html.
|
||||
$oHeadPublisher->assign('pageSize', $conf->getEnvSetting('casesListRowNumber'));
|
||||
G::RenderPage('publish', 'extJs');
|
||||
}
|
||||
|
||||
function messageHistory()
|
||||
{
|
||||
function messageHistory() {
|
||||
global $G_PUBLISH;
|
||||
$oCase = new Cases();
|
||||
$G_PUBLISH = new Publisher();
|
||||
$G_PUBLISH->AddContent('propeltable', 'paged-table', 'cases/cases_Messages', $oCase->getHistoryMessagesTracker($_SESSION['APPLICATION']));
|
||||
G::RenderPage('publish', 'blank');
|
||||
G::loadClass('configuration');
|
||||
|
||||
$oHeadPublisher =& headPublisher::getSingleton();
|
||||
$conf = new Configurations;
|
||||
$oHeadPublisher->addExtJsScript('cases/caseMessageHistory', true ); //adding a javascript file .js
|
||||
$oHeadPublisher->addContent ('cases/caseMessageHistory'); //adding a html file .html.
|
||||
$oHeadPublisher->assign('pageSize', $conf->getEnvSetting('casesListRowNumber'));
|
||||
G::RenderPage('publish', 'extJs');
|
||||
}
|
||||
|
||||
function dynaformHistory()
|
||||
{
|
||||
function dynaformHistory() {
|
||||
global $G_PUBLISH;
|
||||
$oCase = new Cases();
|
||||
$G_PUBLISH = new Publisher();
|
||||
$G_PUBLISH->AddContent('propeltable', 'paged-table', 'cases/cases_AllDynaformsList', $oCase->getallDynaformsCriteria($_SESSION['PROCESS'], $_SESSION['APPLICATION'], $_SESSION['TASK'], $_SESSION['USER_LOGGED']));
|
||||
G::RenderPage('publish', 'blank');
|
||||
G::loadClass('configuration');
|
||||
|
||||
$oHeadPublisher =& headPublisher::getSingleton();
|
||||
$conf = new Configurations;
|
||||
$oHeadPublisher->addExtJsScript('cases/caseHistoryDynaformPage', true ); //adding a javascript file .js
|
||||
$oHeadPublisher->addContent ('cases/caseHistoryDynaformPage'); //adding a html file .html.
|
||||
$oHeadPublisher->assign('pageSize', $conf->getEnvSetting('casesListRowNumber'));
|
||||
G::RenderPage('publish', 'extJs');
|
||||
}
|
||||
|
||||
function uploadedDocuments()
|
||||
{
|
||||
global $G_PUBLISH;
|
||||
$oCase = new Cases();
|
||||
$G_PUBLISH = new Publisher();
|
||||
$G_PUBLISH->AddContent('propeltable', 'paged-table', 'cases/cases_AllInputdocsList', $oCase->getAllUploadedDocumentsCriteria($_SESSION['PROCESS'], $_SESSION['APPLICATION'], $_SESSION['TASK'], $_SESSION['USER_LOGGED']));
|
||||
G::RenderPage('publish', 'blank');
|
||||
function uploadedDocuments() {
|
||||
global $G_PUBLISH;
|
||||
G::loadClass('configuration');
|
||||
|
||||
$oHeadPublisher =& headPublisher::getSingleton();
|
||||
$conf = new Configurations;
|
||||
$oHeadPublisher->addExtJsScript('cases/casesUploadedDocumentsPage', true ); //adding a javascript file .js
|
||||
$oHeadPublisher->addContent ('cases/casesUploadedDocumentsPage'); //adding a html file .html.
|
||||
$oHeadPublisher->assign('pageSize', $conf->getEnvSetting('casesListRowNumber'));
|
||||
G::RenderPage('publish', 'extJs');
|
||||
}
|
||||
|
||||
function uploadedDocumentsSummary()
|
||||
{
|
||||
global $G_PUBLISH;
|
||||
$oCase = new Cases();
|
||||
$G_PUBLISH = new Publisher();
|
||||
$G_PUBLISH->AddContent('propeltable', 'paged-table', 'cases/cases_AllInputdocsList_Summary', $oCase->getAllUploadedDocumentsCriteria($_SESSION['PROCESS'], $_SESSION['APPLICATION'], $_SESSION['TASK'], $_SESSION['USER_LOGGED']));
|
||||
G::RenderPage('publish', 'blank');
|
||||
function uploadedDocumentsSummary() {
|
||||
global $G_PUBLISH;
|
||||
G::loadClass('configuration');
|
||||
|
||||
$oHeadPublisher =& headPublisher::getSingleton();
|
||||
$conf = new Configurations;
|
||||
$oHeadPublisher->addExtJsScript('cases/casesUploadedDocumentsPage', true ); //adding a javascript file .js
|
||||
$oHeadPublisher->addContent ('cases/casesUploadedDocumentsPage'); //adding a html file .html.
|
||||
$oHeadPublisher->assign('pageSize', $conf->getEnvSetting('casesListRowNumber'));
|
||||
G::RenderPage('publish', 'extJs');
|
||||
}
|
||||
|
||||
function generatedDocuments()
|
||||
{
|
||||
function generatedDocuments() {
|
||||
global $G_PUBLISH;
|
||||
$oCase = new Cases();
|
||||
$G_PUBLISH = new Publisher();
|
||||
$G_PUBLISH->AddContent('propeltable', 'paged-table', 'cases/cases_AllOutputdocsList', $oCase->getAllGeneratedDocumentsCriteria($_SESSION['PROCESS'], $_SESSION['APPLICATION'], $_SESSION['TASK'], $_SESSION['USER_LOGGED']));
|
||||
G::RenderPage('publish', 'blank');
|
||||
G::loadClass('configuration');
|
||||
|
||||
$oHeadPublisher =& headPublisher::getSingleton();
|
||||
$conf = new Configurations;
|
||||
$oHeadPublisher->addExtJsScript('cases/casesGenerateDocumentPage', true ); //adding a javascript file .js
|
||||
$oHeadPublisher->addContent ('cases/casesGenerateDocumentPage'); //adding a html file .html.
|
||||
$oHeadPublisher->assign('pageSize', $conf->getEnvSetting('casesListRowNumber'));
|
||||
G::RenderPage('publish', 'extJs');
|
||||
}
|
||||
function generatedDocumentsSummary()
|
||||
{
|
||||
|
||||
function generatedDocumentsSummary() {
|
||||
global $G_PUBLISH;
|
||||
$oCase = new Cases();
|
||||
$G_PUBLISH = new Publisher();
|
||||
$G_PUBLISH->AddContent('propeltable', 'paged-table', 'cases/cases_AllOutputdocsList_Summary', $oCase->getAllGeneratedDocumentsCriteria($_SESSION['PROCESS'], $_SESSION['APPLICATION'], $_SESSION['TASK'], $_SESSION['USER_LOGGED']));
|
||||
G::RenderPage('publish', 'blank');
|
||||
G::loadClass('configuration');
|
||||
|
||||
$oHeadPublisher =& headPublisher::getSingleton();
|
||||
$conf = new Configurations;
|
||||
$oHeadPublisher->addExtJsScript('cases/casesGenerateDocumentPage', true ); //adding a javascript file .js
|
||||
$oHeadPublisher->addContent ('cases/casesGenerateDocumentPage'); //adding a html file .html.
|
||||
$oHeadPublisher->assign('pageSize', $conf->getEnvSetting('casesListRowNumber'));
|
||||
G::RenderPage('publish', 'extJs');
|
||||
}
|
||||
|
||||
function cancelCase()
|
||||
@@ -512,8 +534,7 @@ class Ajax
|
||||
print G::json_encode($result);
|
||||
}
|
||||
|
||||
function deleteCase()
|
||||
{
|
||||
function deleteCase() {
|
||||
try{
|
||||
$applicationUID = (isset($_POST['APP_UID'])) ? $_POST['APP_UID'] : $_SESSION['APPLICATION'];
|
||||
$app = new Application();
|
||||
@@ -525,11 +546,11 @@ class Ajax
|
||||
|
||||
$result->success = true;
|
||||
$result->msg = G::LoadTranslation('ID_CASE_DELETED_SUCCESSFULLY', SYS_LANG, $data);
|
||||
} catch(Exception $e) {
|
||||
}
|
||||
catch (Exception $e) {
|
||||
$result->success = false;
|
||||
$result->msg = $e->getMessage();
|
||||
}
|
||||
|
||||
print G::json_encode($result);
|
||||
}
|
||||
|
||||
@@ -555,4 +576,154 @@ class Ajax
|
||||
print G::json_encode($result);
|
||||
}
|
||||
|
||||
function changeLogTab(){
|
||||
try{
|
||||
global $G_PUBLISH;
|
||||
require_once 'classes/model/AppHistory.php';
|
||||
|
||||
//!dataInput
|
||||
$idHistory = $_REQUEST["idHistory"];
|
||||
//!dataInput
|
||||
|
||||
//!dataSytem
|
||||
$idHistoryArray = explode("_",$idHistory );
|
||||
$_REQUEST["PRO_UID"]= $idHistoryArray[0];
|
||||
$_REQUEST["APP_UID"]= $idHistoryArray[1];
|
||||
$_REQUEST["TAS_UID"]= $idHistoryArray[2];
|
||||
$_REQUEST["DYN_UID"]= "";
|
||||
|
||||
|
||||
$G_PUBLISH = new Publisher();
|
||||
$G_PUBLISH->AddContent('view', 'cases/cases_DynaformHistory');
|
||||
?>
|
||||
<link rel="stylesheet" type="text/css" href="/css/classic.css" />
|
||||
<style type="text/css">
|
||||
html {
|
||||
color:black !important;
|
||||
}
|
||||
body {
|
||||
color:black !important;
|
||||
}
|
||||
</style>
|
||||
<script language="javascript">
|
||||
function ajaxPostRequest(url, callback_function, id){
|
||||
var d = new Date();
|
||||
var time = d.getTime();
|
||||
url= url + '&nocachetime='+time;
|
||||
var return_xml=false;
|
||||
var http_request = false;
|
||||
|
||||
if (window.XMLHttpRequest) { // Mozilla, Safari,...
|
||||
http_request = new XMLHttpRequest();
|
||||
if (http_request.overrideMimeType){
|
||||
http_request.overrideMimeType('text/xml');
|
||||
}
|
||||
}
|
||||
else if (window.ActiveXObject) {// IE
|
||||
try {
|
||||
http_request = new ActiveXObject("Msxml2.XMLHTTP");
|
||||
}
|
||||
catch (e) {
|
||||
try {
|
||||
http_request = new ActiveXObject("Microsoft.XMLHTTP");
|
||||
}
|
||||
catch (e) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!http_request){
|
||||
alert('This browser is not supported.');
|
||||
return false;
|
||||
}
|
||||
|
||||
http_request.onreadystatechange = function(){
|
||||
if (http_request.readyState == 4){
|
||||
if (http_request.status == 200){
|
||||
if (return_xml){
|
||||
eval(callback_function + '(http_request.responseXML)');
|
||||
}
|
||||
else{
|
||||
eval(callback_function + '(http_request.responseText, \''+id+'\')');
|
||||
}
|
||||
}
|
||||
else {
|
||||
alert('Error found on request:(Code: ' + http_request.status + ')');
|
||||
}
|
||||
}
|
||||
}
|
||||
http_request.open('GET', url, true);
|
||||
http_request.send(null);
|
||||
}
|
||||
|
||||
function toggleTable(tablename) {
|
||||
table= document.getElementById(tablename);
|
||||
|
||||
if(table.style.display == ''){
|
||||
table.style.display = 'none';
|
||||
}else{
|
||||
table.style.display = '';
|
||||
}
|
||||
}
|
||||
|
||||
function noesFuncion(idIframe) {
|
||||
window.parent.tabIframeWidthFix2(idIframe);
|
||||
}
|
||||
|
||||
function onResizeIframe(idIframe){
|
||||
window.onresize = noesFuncion(idIframe);
|
||||
}
|
||||
|
||||
function showDynaformHistoryGetNomDynaform_RSP(response,id) {
|
||||
//!showDynaformHistoryGlobal
|
||||
showDynaformHistoryGlobal.idDin = showDynaformHistoryGlobal.idDin;
|
||||
showDynaformHistoryGlobal.idHistory = showDynaformHistoryGlobal.idHistory;
|
||||
showDynaformHistoryGlobal.dynDate = showDynaformHistoryGlobal.dynDate;
|
||||
|
||||
//!dataSystem
|
||||
var idDin = showDynaformHistoryGlobal.idDin;
|
||||
var idHistory = showDynaformHistoryGlobal.idHistory;
|
||||
var dynDate = showDynaformHistoryGlobal.dynDate;
|
||||
|
||||
//!windowParent
|
||||
window.parent.historyGridListChangeLogGlobal.viewIdDin = idDin;
|
||||
window.parent.historyGridListChangeLogGlobal.viewIdHistory = idHistory;
|
||||
window.parent.historyGridListChangeLogGlobal.viewDynaformName = response;
|
||||
window.parent.historyGridListChangeLogGlobal.dynDate = dynDate;
|
||||
|
||||
window.parent.Actions.tabFrame('dynaformViewFromHistory');
|
||||
}
|
||||
|
||||
showDynaformHistoryGlobal = {};
|
||||
showDynaformHistoryGlobal.idDin = "";
|
||||
showDynaformHistoryGlobal.idHistory = "";
|
||||
showDynaformHistoryGlobal.dynDate = "";
|
||||
|
||||
function showDynaformHistory(idDin, idHistory,dynDate) {
|
||||
//!showDynaformHistoryGlobal
|
||||
showDynaformHistoryGlobal.idDin = showDynaformHistoryGlobal.idDin;
|
||||
showDynaformHistoryGlobal.idHistory = showDynaformHistoryGlobal.idHistory;
|
||||
showDynaformHistoryGlobal.dynDate = showDynaformHistoryGlobal.dynDate;
|
||||
|
||||
//!dataSystem
|
||||
showDynaformHistoryGlobal.idDin = idDin;
|
||||
showDynaformHistoryGlobal.idHistory = idHistory;
|
||||
showDynaformHistoryGlobal.dynDate = dynDate;
|
||||
|
||||
var url = "caseHistory_Ajax.php?actionAjax=showDynaformHistoryGetNomDynaform_JXP&idDin="+idDin+"&dynDate="+dynDate;
|
||||
ajaxPostRequest(url, 'showDynaformHistoryGetNomDynaform_RSP');
|
||||
}
|
||||
</script>
|
||||
<?php
|
||||
|
||||
G::RenderPage('publish', 'raw');
|
||||
|
||||
$result->success = true;
|
||||
$result->msg = G::LoadTranslation('ID_CASE_REACTIVATED_SUCCESSFULLY', SYS_LANG, "success");
|
||||
}
|
||||
catch(Exception $e){
|
||||
$result->success = false;
|
||||
$result->msg = $e->getMessage();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
183
workflow/engine/methods/cases/caseHistory_Ajax.php
Normal file
183
workflow/engine/methods/cases/caseHistory_Ajax.php
Normal file
@@ -0,0 +1,183 @@
|
||||
<?php
|
||||
/**
|
||||
* processes_List.php
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
*/
|
||||
|
||||
$actionAjax = isset($_REQUEST['actionAjax'])?$_REQUEST['actionAjax']: null;
|
||||
|
||||
|
||||
|
||||
|
||||
if($actionAjax=='historyGridList_JXP'){
|
||||
|
||||
G::LoadClass('case');
|
||||
G::LoadClass("BasePeer" );
|
||||
|
||||
global $G_PUBLISH;
|
||||
$c = Cases::getTransferHistoryCriteria($_SESSION['APPLICATION']);
|
||||
|
||||
$result = new stdClass();
|
||||
$aProcesses = Array();
|
||||
|
||||
|
||||
$rs = GulliverBasePeer::doSelectRs ($c);
|
||||
$rs->setFetchmode (ResultSet::FETCHMODE_ASSOC);
|
||||
$rs->next();
|
||||
for($j=0;$j< $rs->getRecordCount() ;$j++) {
|
||||
$result = $rs->getRow();
|
||||
$result["ID_HISTORY"] = $result["PRO_UID"].'_'.$result["APP_UID"].'_'.$result["TAS_UID"];
|
||||
$aProcesses[] = $result;
|
||||
$rs->next();
|
||||
}
|
||||
|
||||
$newDir = '/tmp/test/directory';
|
||||
$r = G::verifyPath ( $newDir );
|
||||
$r->data = $aProcesses;
|
||||
$r->totalCount = 2;
|
||||
|
||||
echo G::json_encode($r);
|
||||
}
|
||||
|
||||
if($actionAjax=='historyGridListChangeLogPanelBody_JXP'){
|
||||
//!dataInput
|
||||
$idHistory = $_REQUEST["idHistory"];
|
||||
//!dataInput
|
||||
|
||||
//!dataSytem
|
||||
$idHistoryArray = explode("*",$idHistory );
|
||||
$_REQUEST["PRO_UID"]= $idHistoryArray[0];
|
||||
$_REQUEST["APP_UID"]= $idHistoryArray[1];
|
||||
$_REQUEST["TAS_UID"]= $idHistoryArray[2];
|
||||
$_REQUEST["DYN_UID"]= "";
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
||||
<table bgcolor="white" height=100% width=100%>
|
||||
<tr>
|
||||
<td height=99% >
|
||||
<div style="width:100%; overflow-y: scroll; overflow-x: hidden; max-height: 310px;_height:310px;height:310px; visibility: inherit;" >
|
||||
|
||||
<?php
|
||||
require_once 'classes/model/AppHistory.php';
|
||||
$G_PUBLISH = new Publisher();
|
||||
$G_PUBLISH->AddContent('view', 'cases/cases_DynaformHistory');
|
||||
G::RenderPage('publish', 'raw');
|
||||
?>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td height=30 valign=top>
|
||||
|
||||
<table align=center cellspacing="0" class="x-btn x-btn-noicon" id="ext-comp-1043" style="width: 75px;margin-top:0px;">
|
||||
<tbody class="x-btn-small x-btn-icon-small-left">
|
||||
<tr>
|
||||
<td class="x-btn-tl">
|
||||
<i> </i>
|
||||
</td>
|
||||
<td class="x-btn-tc">
|
||||
</td>
|
||||
<td class="x-btn-tr">
|
||||
<i> </i>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="x-btn-ml">
|
||||
<i> </i>
|
||||
</td>
|
||||
<td class="x-btn-mc">
|
||||
<em unselectable="on" class="">
|
||||
<button type="button" id="ext-gen105" class=" x-btn-text">
|
||||
OK
|
||||
</button>
|
||||
</em>
|
||||
</td>
|
||||
<td class="x-btn-mr">
|
||||
<i> </i>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="x-btn-bl">
|
||||
<i> </i>
|
||||
</td>
|
||||
<td class="x-btn-bc">
|
||||
</td>
|
||||
<td class="x-btn-br">
|
||||
<i> </i>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<?php
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
if($actionAjax=="showDynaformHistoryGetNomDynaform_JXP"){
|
||||
require_once 'classes/model/ContentPeer.php';
|
||||
|
||||
//!dataInput
|
||||
$idDin = $_REQUEST['idDin'];
|
||||
$dynDate = $_REQUEST["dynDate"];
|
||||
|
||||
//!dataOuput
|
||||
$md5Hash = "";
|
||||
$dynTitle = '';
|
||||
|
||||
$c = new Criteria();
|
||||
$c0 = $c->getNewCriterion(ContentPeer::CON_ID,$idDin);
|
||||
$c1 = $c->getNewCriterion(ContentPeer::CON_CATEGORY,'DYN_TITLE');
|
||||
$c0->addAnd($c1);
|
||||
$c->add($c0);
|
||||
$contentObjeto = ContentPeer::doSelectOne($c);
|
||||
|
||||
|
||||
if(is_object($contentObjeto)){
|
||||
$dynTitle = $contentObjeto->getConValue();
|
||||
}
|
||||
|
||||
$md5Hash = md5($idDin.$dynDate);
|
||||
|
||||
|
||||
//assign task
|
||||
$result = new stdClass;
|
||||
$result->dynTitle = $dynTitle;
|
||||
$result->md5Hash = $md5Hash;
|
||||
|
||||
echo G::json_encode($result);
|
||||
|
||||
}
|
||||
|
||||
199
workflow/engine/methods/cases/caseMessageHistory_Ajax.php
Normal file
199
workflow/engine/methods/cases/caseMessageHistory_Ajax.php
Normal file
@@ -0,0 +1,199 @@
|
||||
<?php
|
||||
/**
|
||||
* processes_List.php
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
*/
|
||||
|
||||
$actionAjax = isset($_REQUEST['actionAjax'])?$_REQUEST['actionAjax']: null;
|
||||
|
||||
|
||||
|
||||
|
||||
if($actionAjax=='messageHistoryGridList_JXP'){
|
||||
|
||||
G::LoadClass('case');
|
||||
G::LoadClass("BasePeer" );
|
||||
|
||||
global $G_PUBLISH;
|
||||
$oCase = new Cases();
|
||||
|
||||
$appMessageArray = $oCase->getHistoryMessagesTrackerExt($_SESSION['APPLICATION']);
|
||||
|
||||
$result = new stdClass();
|
||||
$aProcesses = Array();
|
||||
|
||||
$totalCount = 0;
|
||||
foreach( $appMessageArray as $index => $value){
|
||||
$appMessageArray[$index]['ID_MESSAGE'] = $appMessageArray[$index]['APP_UID'].'_'.$appMessageArray[$index]['APP_MSG_UID'];
|
||||
$aProcesses[] = $appMessageArray[$index];
|
||||
$totalCount++;
|
||||
}
|
||||
|
||||
|
||||
$newDir = '/tmp/test/directory';
|
||||
$r = G::verifyPath ( $newDir );
|
||||
$r->data = $aProcesses;
|
||||
$r->totalCount = $totalCount;
|
||||
|
||||
|
||||
|
||||
echo G::json_encode($r);
|
||||
}
|
||||
if($actionAjax=='showHistoryMessage'){
|
||||
|
||||
?>
|
||||
<link rel="stylesheet" type="text/css" href="/css/classic.css" />
|
||||
<style type="text/css">
|
||||
html{
|
||||
color:black !important;
|
||||
}
|
||||
body{
|
||||
color:black !important;
|
||||
}
|
||||
</style>
|
||||
<script language="Javascript">
|
||||
//!Code that simulated reload library javascript maborak
|
||||
var leimnud = {};
|
||||
leimnud.exec = "";
|
||||
leimnud.fix = {};
|
||||
leimnud.fix.memoryLeak = "";
|
||||
leimnud.browser = {};
|
||||
leimnud.browser.isIphone = "";
|
||||
leimnud.iphone = {};
|
||||
leimnud.iphone.make = function(){};
|
||||
function ajax_function(ajax_server, funcion, parameters, method){
|
||||
}
|
||||
//!
|
||||
</script>
|
||||
<?php
|
||||
|
||||
G::LoadClass('case');
|
||||
$oCase = new Cases();
|
||||
|
||||
$_POST["APP_UID"] = $_REQUEST["APP_UID"];
|
||||
$_POST['APP_MSG_UID'] = $_REQUEST["APP_MSG_UID"];
|
||||
|
||||
$G_PUBLISH = new Publisher();
|
||||
$oCase = new Cases();
|
||||
|
||||
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'cases/cases_MessagesView', '', $oCase->getHistoryMessagesTrackerView($_POST['APP_UID'], $_POST['APP_MSG_UID']));
|
||||
|
||||
|
||||
?>
|
||||
<script language="javascript">
|
||||
<?php
|
||||
global $G_FORM;
|
||||
?>
|
||||
function loadForm_<?php echo $G_FORM->id;?>(parametro1){
|
||||
}
|
||||
</script>
|
||||
<?php
|
||||
|
||||
G::RenderPage('publish', 'raw');
|
||||
}
|
||||
|
||||
if($actionAjax=='sendMailMessage_JXP'){
|
||||
//!dataSystem
|
||||
$errorMessage = "";
|
||||
try{
|
||||
//!dataInput
|
||||
$_POST['APP_UID'] = $_REQUEST['APP_UID'];
|
||||
$_POST['APP_MSG_UID'] = $_REQUEST['APP_MSG_UID'];
|
||||
|
||||
|
||||
G::LoadClass('case');
|
||||
$oCase = new Cases();
|
||||
|
||||
|
||||
require_once 'classes/model/Configuration.php';
|
||||
G::LoadClass('spool');
|
||||
|
||||
$oCase = new Cases();
|
||||
$data = $oCase->getHistoryMessagesTrackerView($_POST['APP_UID'], $_POST['APP_MSG_UID']);
|
||||
//print_r($data);
|
||||
|
||||
$oConfiguration = new Configuration();
|
||||
$sDelimiter = DBAdapter::getStringDelimiter();
|
||||
$oCriteria = new Criteria('workflow');
|
||||
$oCriteria->add(ConfigurationPeer::CFG_UID, 'Emails');
|
||||
$oCriteria->add(ConfigurationPeer::OBJ_UID, '');
|
||||
$oCriteria->add(ConfigurationPeer::PRO_UID, '');
|
||||
$oCriteria->add(ConfigurationPeer::USR_UID, '');
|
||||
$oCriteria->add(ConfigurationPeer::APP_UID, '');
|
||||
if(ConfigurationPeer::doCount($oCriteria) == 0) {
|
||||
$oConfiguration->create(array('CFG_UID'=>'Emails', 'OBJ_UID'=>'', 'CFG_VALUE'=>'', 'PRO_UID'=>'', 'USR_UID'=>'', 'APP_UID'=>''));
|
||||
$aConfiguration = array();
|
||||
} else {
|
||||
$aConfiguration = $oConfiguration->load('Emails', '', '', '', '');
|
||||
if($aConfiguration['CFG_VALUE'] != '') {
|
||||
$aConfiguration = unserialize($aConfiguration['CFG_VALUE']);
|
||||
} else {
|
||||
$aConfiguration = array();
|
||||
}
|
||||
}
|
||||
$passwd = $aConfiguration['MESS_PASSWORD'];
|
||||
$passwdDec = G::decrypt($passwd,'EMAILENCRYPT');
|
||||
if (strpos( $passwdDec, 'hash:' ) !== false) {
|
||||
list($hash, $pass) = explode(":", $passwdDec);
|
||||
$passwd = $pass;
|
||||
}
|
||||
|
||||
|
||||
$oSpool = new spoolRun();
|
||||
$oSpool->setConfig(array(
|
||||
'MESS_ENGINE' => $aConfiguration['MESS_ENGINE'],
|
||||
'MESS_SERVER' => $aConfiguration['MESS_SERVER'],
|
||||
'MESS_PORT' => $aConfiguration['MESS_PORT'],
|
||||
'MESS_ACCOUNT' => $aConfiguration['MESS_ACCOUNT'],
|
||||
'MESS_PASSWORD' => $passwd,
|
||||
'SMTPAuth' => $aConfiguration['MESS_RAUTH']
|
||||
));
|
||||
|
||||
$oSpool->create(array(
|
||||
'msg_uid' => $data['MSG_UID'],
|
||||
'app_uid' => $data['APP_UID'],
|
||||
'del_index' => $data['DEL_INDEX'],
|
||||
'app_msg_type' => $data['APP_MSG_TYPE'],
|
||||
'app_msg_subject'=> $data['APP_MSG_SUBJECT'],
|
||||
'app_msg_from' => $data['APP_MSG_FROM'],
|
||||
'app_msg_to' => $data['APP_MSG_TO'],
|
||||
'app_msg_body' => $data['APP_MSG_BODY'],
|
||||
'app_msg_cc' => $data['APP_MSG_CC'],
|
||||
'app_msg_bcc' => $data['APP_MSG_BCC'],
|
||||
'app_msg_attach'=> $data['APP_MSG_ATTACH'],
|
||||
'app_msg_template'=>$data['APP_MSG_TEMPLATE'],
|
||||
'app_msg_status'=> 'pending'
|
||||
));
|
||||
$oSpool->sendMail();
|
||||
|
||||
}
|
||||
catch(Exception $e){
|
||||
|
||||
$errorMessage = $e->getMessage();
|
||||
}
|
||||
|
||||
echo $errorMessage;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
149
workflow/engine/methods/cases/casesGenerateDocumentPage_Ajax.php
Normal file
149
workflow/engine/methods/cases/casesGenerateDocumentPage_Ajax.php
Normal file
@@ -0,0 +1,149 @@
|
||||
<?php
|
||||
/**
|
||||
* casesGenerateDocumentPage_Ajax.php
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
*/
|
||||
$actionAjax = isset($_REQUEST['actionAjax'])?$_REQUEST['actionAjax']: null;
|
||||
|
||||
|
||||
function casesShowOuputDocumentExist($url){
|
||||
|
||||
$urlArray = explode("?",$url);
|
||||
$urlParametroString = $urlArray[1];
|
||||
|
||||
parse_str($urlParametroString, $_GET);
|
||||
|
||||
|
||||
require_once ( "classes/model/AppDocumentPeer.php" );
|
||||
|
||||
$oAppDocument = new AppDocument();
|
||||
$oAppDocument->Fields = $oAppDocument->load($_GET['a'],(isset($_GET['v']) )? $_GET['v'] : NULL );
|
||||
|
||||
$sAppDocUid = $oAppDocument->getAppDocUid();
|
||||
$info = pathinfo( $oAppDocument->getAppDocFilename() );
|
||||
if (!isset($_GET['ext'])) {
|
||||
$ext = $info['extension'];
|
||||
}
|
||||
else {
|
||||
if ($_GET['ext'] != '') {
|
||||
$ext = $_GET['ext'];
|
||||
}
|
||||
else {
|
||||
$ext = $info['extension'];
|
||||
}
|
||||
}
|
||||
$ver= (isset($_GET['v']) && $_GET['v']!='') ? '_'.$_GET['v'] : '';
|
||||
|
||||
if(!$ver) //This code is in the case the outputdocument won't be versioned
|
||||
$ver='_1';
|
||||
|
||||
$realPath = PATH_DOCUMENT . $oAppDocument->Fields['APP_UID'] . '/outdocs/' . $sAppDocUid .$ver. '.' . $ext ;
|
||||
$realPath1 = PATH_DOCUMENT . $oAppDocument->Fields['APP_UID'] . '/outdocs/' . $info['basename'] .$ver. '.' . $ext ;
|
||||
$realPath2 = PATH_DOCUMENT . $oAppDocument->Fields['APP_UID'] . '/outdocs/' . $info['basename']. '.' . $ext ;
|
||||
$sw_file_exists=false;
|
||||
if(file_exists($realPath)){
|
||||
$sw_file_exists=true;
|
||||
}elseif(file_exists($realPath1)){
|
||||
$sw_file_exists=true;
|
||||
$realPath=$realPath1;
|
||||
}elseif(file_exists($realPath2)){
|
||||
$sw_file_exists=true;
|
||||
$realPath=$realPath2;
|
||||
}
|
||||
|
||||
$swFileExist = 0;
|
||||
if($sw_file_exists){
|
||||
$swFileExist = 1;
|
||||
}
|
||||
return $swFileExist;
|
||||
}
|
||||
|
||||
if($actionAjax=='casesGenerateDocumentPage'){
|
||||
global $G_PUBLISH;
|
||||
|
||||
$oHeadPublisher =& headPublisher::getSingleton();
|
||||
G::loadClass('configuration');
|
||||
$conf = new Configurations;
|
||||
$oHeadPublisher->addExtJsScript('cases/casesGenerateDocumentPage', true ); //adding a javascript file .js
|
||||
$oHeadPublisher->addContent ('cases/casesGenerateDocumentPage'); //adding a html file .html.
|
||||
$oHeadPublisher->assign('pageSize', $conf->getEnvSetting('casesListRowNumber'));
|
||||
G::RenderPage('publish', 'extJs');
|
||||
}
|
||||
if($actionAjax=='generateDocumentGrid_Ajax'){
|
||||
G::LoadClass('case');
|
||||
G::LoadClass("BasePeer" );
|
||||
|
||||
global $G_PUBLISH;
|
||||
$oCase = new Cases();
|
||||
|
||||
$aProcesses = Array();
|
||||
|
||||
$G_PUBLISH = new Publisher();
|
||||
$c = $oCase->getAllGeneratedDocumentsCriteria($_SESSION['PROCESS'], $_SESSION['APPLICATION'], $_SESSION['TASK'], $_SESSION['USER_LOGGED']);
|
||||
if ( $c->getDbName() == 'dbarray' ){
|
||||
$rs = ArrayBasePeer::doSelectRs ($c);
|
||||
}
|
||||
else{
|
||||
$rs = GulliverBasePeer::doSelectRs ($c);
|
||||
}
|
||||
|
||||
$rs->setFetchmode (ResultSet::FETCHMODE_ASSOC);
|
||||
$rs->next();
|
||||
|
||||
$totalCount = 0;
|
||||
for($j=0;$j< $rs->getRecordCount() ;$j++) {
|
||||
$result = $rs->getRow();
|
||||
|
||||
$result["FILEDOCEXIST"] = casesShowOuputDocumentExist($result["FILEDOC"]);
|
||||
$result["FILEPDFEXIST"] = casesShowOuputDocumentExist($result["FILEPDF"]);
|
||||
|
||||
$aProcesses[] = $result;
|
||||
|
||||
|
||||
$rs->next();
|
||||
$totalCount++;
|
||||
}
|
||||
|
||||
//!dateFormat
|
||||
G::LoadClass ( 'configuration' );
|
||||
$conf = new Configurations();
|
||||
try {
|
||||
$generalConfCasesList = $conf->getConfiguration('ENVIRONMENT_SETTINGS', '' );
|
||||
}
|
||||
catch (Exception $e){
|
||||
$generalConfCasesList = array();
|
||||
}
|
||||
$dateFormat = "";
|
||||
if (isset($generalConfCasesList['casesListDateFormat'])&&!empty($generalConfCasesList['casesListDateFormat'])) {
|
||||
$dateFormat = $generalConfCasesList['casesListDateFormat'];
|
||||
}
|
||||
|
||||
|
||||
|
||||
$newDir = '/tmp/test/directory';
|
||||
$r = G::verifyPath ( $newDir );
|
||||
$r->data = $aProcesses;
|
||||
$r->totalCount = $totalCount;
|
||||
$r->dataFormat = $dateFormat;
|
||||
echo G::json_encode($r);
|
||||
}
|
||||
?>
|
||||
337
workflow/engine/methods/cases/casesHistoryDynaformPage_Ajax.php
Normal file
337
workflow/engine/methods/cases/casesHistoryDynaformPage_Ajax.php
Normal file
@@ -0,0 +1,337 @@
|
||||
<?php
|
||||
/**
|
||||
* processes_List.php
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
*/
|
||||
|
||||
$actionAjax = isset($_REQUEST['actionAjax'])?$_REQUEST['actionAjax']: null;
|
||||
|
||||
|
||||
if($actionAjax=="historyDynaformPage"){
|
||||
global $G_PUBLISH;
|
||||
$oHeadPublisher =& headPublisher::getSingleton();
|
||||
G::loadClass('configuration');
|
||||
$conf = new Configurations;
|
||||
$oHeadPublisher->addExtJsScript('cases/caseHistoryDynaformPage', true ); //adding a javascript file .js
|
||||
$oHeadPublisher->addContent ('cases/caseHistoryDynaformPage'); //adding a html file .html.
|
||||
$oHeadPublisher->assign('pageSize', $conf->getEnvSetting('casesListRowNumber'));
|
||||
G::RenderPage('publish', 'extJs');
|
||||
}
|
||||
if($actionAjax=='historyDynaformGrid_Ajax'){
|
||||
G::LoadClass('case');
|
||||
G::LoadClass("BasePeer" );
|
||||
|
||||
global $G_PUBLISH;
|
||||
$oCase = new Cases();
|
||||
|
||||
$aProcesses = Array();
|
||||
$c = $oCase->getallDynaformsCriteria($_SESSION['PROCESS'], $_SESSION['APPLICATION'], $_SESSION['TASK'], $_SESSION['USER_LOGGED']);
|
||||
|
||||
if ( $c->getDbName() == 'dbarray' ){
|
||||
$rs = ArrayBasePeer::doSelectRs ($c);
|
||||
}
|
||||
else{
|
||||
$rs = GulliverBasePeer::doSelectRs ($c);
|
||||
}
|
||||
|
||||
$rs->setFetchmode (ResultSet::FETCHMODE_ASSOC);
|
||||
$rs->next();
|
||||
|
||||
for($j=0;$j< $rs->getRecordCount() ;$j++) {
|
||||
$result = $rs->getRow();
|
||||
//$result["ID_HISTORY"] = $result["PRO_UID"].'_'.$result["APP_UID"].'_'.$result["TAS_UID"];
|
||||
$aProcesses[] = $result;
|
||||
$rs->next();
|
||||
}
|
||||
|
||||
$newDir = '/tmp/test/directory';
|
||||
$r = G::verifyPath ( $newDir );
|
||||
$r->data = $aProcesses;
|
||||
$r->totalCount = 2;
|
||||
|
||||
echo G::json_encode($r);
|
||||
}
|
||||
|
||||
|
||||
if($actionAjax=='showHistoryMessage'){
|
||||
?>
|
||||
<link rel="stylesheet" type="text/css" href="/css/classic.css" />
|
||||
<style type="text/css">
|
||||
html{
|
||||
color:black !important;
|
||||
}
|
||||
body{
|
||||
color:black !important;
|
||||
}
|
||||
</style>
|
||||
<script language="Javascript">
|
||||
//!Code that simulated reload library javascript maborak
|
||||
var leimnud = {};
|
||||
leimnud.exec = "";
|
||||
leimnud.fix = {};
|
||||
leimnud.fix.memoryLeak = "";
|
||||
leimnud.browser = {};
|
||||
leimnud.browser.isIphone = "";
|
||||
leimnud.iphone = {};
|
||||
leimnud.iphone.make = function(){};
|
||||
function ajax_function(ajax_server, funcion, parameters, method){
|
||||
}
|
||||
//!
|
||||
</script>
|
||||
<?php
|
||||
|
||||
G::LoadClass('case');
|
||||
$oCase = new Cases();
|
||||
|
||||
$_POST["APP_UID"] = $_REQUEST["APP_UID"];
|
||||
$_POST['APP_MSG_UID'] = $_REQUEST["APP_MSG_UID"];
|
||||
|
||||
$G_PUBLISH = new Publisher();
|
||||
$oCase = new Cases();
|
||||
|
||||
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'cases/cases_MessagesView', '', $oCase->getHistoryMessagesTrackerView($_POST['APP_UID'], $_POST['APP_MSG_UID']));
|
||||
|
||||
|
||||
?>
|
||||
<script language="javascript">
|
||||
<?php
|
||||
global $G_FORM;
|
||||
?>
|
||||
function loadForm_<?php echo $G_FORM->id;?>(parametro1){
|
||||
}
|
||||
</script>
|
||||
<?php
|
||||
|
||||
G::RenderPage('publish', 'raw');
|
||||
}
|
||||
|
||||
if($actionAjax=='showDynaformListHistory'){
|
||||
|
||||
//!dataIndex
|
||||
$_POST["APP_UID"] = $_REQUEST["APP_UID"];
|
||||
$_POST["DYN_UID"] = $_REQUEST["DYN_UID"];
|
||||
$_POST["PRO_UID"] = $_REQUEST["PRO_UID"];
|
||||
$_POST["TAS_UID"] = $_REQUEST["TAS_UID"];
|
||||
|
||||
?>
|
||||
<link rel="stylesheet" type="text/css" href="/css/classic.css" />
|
||||
<style type="text/css">
|
||||
html{
|
||||
color:black !important;
|
||||
}
|
||||
body{
|
||||
color:black !important;
|
||||
}
|
||||
</style>
|
||||
<script language="Javascript">
|
||||
globalMd5Return=function(s,raw,hexcase,chrsz){raw=raw||false;hexcase=hexcase||false;chrsz=chrsz||8;function safe_add(x,y){var lsw=(x&0xFFFF)+(y&0xFFFF);var msw=(x>>16)+(y>>16)+(lsw>>16);return(msw<<16)|(lsw&0xFFFF)}function bit_rol(num,cnt){return(num<<cnt)|(num>>>(32-cnt))}function md5_cmn(q,a,b,x,s,t){return safe_add(bit_rol(safe_add(safe_add(a,q),safe_add(x,t)),s),b)}function md5_ff(a,b,c,d,x,s,t){return md5_cmn((b&c)|((~b)&d),a,b,x,s,t)}function md5_gg(a,b,c,d,x,s,t){return md5_cmn((b&d)|(c&(~d)),a,b,x,s,t)}function md5_hh(a,b,c,d,x,s,t){return md5_cmn(b^c^d,a,b,x,s,t)}function md5_ii(a,b,c,d,x,s,t){return md5_cmn(c^(b|(~d)),a,b,x,s,t)}function core_md5(x,len){x[len>>5]|=0x80<<((len)%32);x[(((len+64)>>>9)<<4)+14]=len;var a=1732584193;var b=-271733879;var c=-1732584194;var d=271733878;for(var i=0;i<x.length;i+=16){var olda=a;var oldb=b;var oldc=c;var oldd=d;a=md5_ff(a,b,c,d,x[i+0],7,-680876936);d=md5_ff(d,a,b,c,x[i+1],12,-389564586);c=md5_ff(c,d,a,b,x[i+2],17,606105819);b=md5_ff(b,c,d,a,x[i+3],22,-1044525330);a=md5_ff(a,b,c,d,x[i+4],7,-176418897);d=md5_ff(d,a,b,c,x[i+5],12,1200080426);c=md5_ff(c,d,a,b,x[i+6],17,-1473231341);b=md5_ff(b,c,d,a,x[i+7],22,-45705983);a=md5_ff(a,b,c,d,x[i+8],7,1770035416);d=md5_ff(d,a,b,c,x[i+9],12,-1958414417);c=md5_ff(c,d,a,b,x[i+10],17,-42063);b=md5_ff(b,c,d,a,x[i+11],22,-1990404162);a=md5_ff(a,b,c,d,x[i+12],7,1804603682);d=md5_ff(d,a,b,c,x[i+13],12,-40341101);c=md5_ff(c,d,a,b,x[i+14],17,-1502002290);b=md5_ff(b,c,d,a,x[i+15],22,1236535329);a=md5_gg(a,b,c,d,x[i+1],5,-165796510);d=md5_gg(d,a,b,c,x[i+6],9,-1069501632);c=md5_gg(c,d,a,b,x[i+11],14,643717713);b=md5_gg(b,c,d,a,x[i+0],20,-373897302);a=md5_gg(a,b,c,d,x[i+5],5,-701558691);d=md5_gg(d,a,b,c,x[i+10],9,38016083);c=md5_gg(c,d,a,b,x[i+15],14,-660478335);b=md5_gg(b,c,d,a,x[i+4],20,-405537848);a=md5_gg(a,b,c,d,x[i+9],5,568446438);d=md5_gg(d,a,b,c,x[i+14],9,-1019803690);c=md5_gg(c,d,a,b,x[i+3],14,-187363961);b=md5_gg(b,c,d,a,x[i+8],20,1163531501);a=md5_gg(a,b,c,d,x[i+13],5,-1444681467);d=md5_gg(d,a,b,c,x[i+2],9,-51403784);c=md5_gg(c,d,a,b,x[i+7],14,1735328473);b=md5_gg(b,c,d,a,x[i+12],20,-1926607734);a=md5_hh(a,b,c,d,x[i+5],4,-378558);d=md5_hh(d,a,b,c,x[i+8],11,-2022574463);c=md5_hh(c,d,a,b,x[i+11],16,1839030562);b=md5_hh(b,c,d,a,x[i+14],23,-35309556);a=md5_hh(a,b,c,d,x[i+1],4,-1530992060);d=md5_hh(d,a,b,c,x[i+4],11,1272893353);c=md5_hh(c,d,a,b,x[i+7],16,-155497632);b=md5_hh(b,c,d,a,x[i+10],23,-1094730640);a=md5_hh(a,b,c,d,x[i+13],4,681279174);d=md5_hh(d,a,b,c,x[i+0],11,-358537222);c=md5_hh(c,d,a,b,x[i+3],16,-722521979);b=md5_hh(b,c,d,a,x[i+6],23,76029189);a=md5_hh(a,b,c,d,x[i+9],4,-640364487);d=md5_hh(d,a,b,c,x[i+12],11,-421815835);c=md5_hh(c,d,a,b,x[i+15],16,530742520);b=md5_hh(b,c,d,a,x[i+2],23,-995338651);a=md5_ii(a,b,c,d,x[i+0],6,-198630844);d=md5_ii(d,a,b,c,x[i+7],10,1126891415);c=md5_ii(c,d,a,b,x[i+14],15,-1416354905);b=md5_ii(b,c,d,a,x[i+5],21,-57434055);a=md5_ii(a,b,c,d,x[i+12],6,1700485571);d=md5_ii(d,a,b,c,x[i+3],10,-1894986606);c=md5_ii(c,d,a,b,x[i+10],15,-1051523);b=md5_ii(b,c,d,a,x[i+1],21,-2054922799);a=md5_ii(a,b,c,d,x[i+8],6,1873313359);d=md5_ii(d,a,b,c,x[i+15],10,-30611744);c=md5_ii(c,d,a,b,x[i+6],15,-1560198380);b=md5_ii(b,c,d,a,x[i+13],21,1309151649);a=md5_ii(a,b,c,d,x[i+4],6,-145523070);d=md5_ii(d,a,b,c,x[i+11],10,-1120210379);c=md5_ii(c,d,a,b,x[i+2],15,718787259);b=md5_ii(b,c,d,a,x[i+9],21,-343485551);a=safe_add(a,olda);b=safe_add(b,oldb);c=safe_add(c,oldc);d=safe_add(d,oldd)}return[a,b,c,d]}function str2binl(str){var bin=[];var mask=(1<<chrsz)-1;for(var i=0;i<str.length*chrsz;i+=chrsz){bin[i>>5]|=(str.charCodeAt(i/chrsz)&mask)<<(i%32)}return bin}function binl2str(bin){var str="";var mask=(1<<chrsz)-1;for(var i=0;i<bin.length*32;i+=chrsz){str+=String.fromCharCode((bin[i>>5]>>>(i%32))&mask)}return str}function binl2hex(binarray){var hex_tab=hexcase?"0123456789ABCDEF":"0123456789abcdef";var str="";for(var i=0;i<binarray.length*4;i++){str+=hex_tab.charAt((binarray[i>>2]>>((i%4)*8+4))&0xF)+hex_tab.charAt((binarray[i>>2]>>((i%4)*8))&0xF)}return str}return(raw?binl2str(core_md5(str2binl(s),s.length*chrsz)):binl2hex(core_md5(str2binl(s),s.length*chrsz)))};
|
||||
|
||||
//!Code that simulated reload library javascript maborak
|
||||
var leimnud = {};
|
||||
leimnud.exec = "";
|
||||
leimnud.fix = {};
|
||||
leimnud.fix.memoryLeak = "";
|
||||
leimnud.browser = {};
|
||||
leimnud.browser.isIphone = "";
|
||||
leimnud.iphone = {};
|
||||
leimnud.iphone.make = function(){};
|
||||
function ajax_function(ajax_server, funcion, parameters, method){
|
||||
}
|
||||
|
||||
function toggleTable(tablename){
|
||||
//table= document.getElementByName(tablename);
|
||||
table= document.getElementById(tablename);
|
||||
if(table.style.display == ''){
|
||||
table.style.display = 'none';
|
||||
}else{
|
||||
table.style.display = '';
|
||||
}
|
||||
}
|
||||
|
||||
function noesFuncion(idIframe) {
|
||||
window.parent.tabIframeWidthFix2(idIframe);
|
||||
}
|
||||
|
||||
function onResizeIframe(idIframe){
|
||||
|
||||
|
||||
window.onresize = noesFuncion(idIframe);
|
||||
|
||||
}
|
||||
|
||||
var showDynaformHistoryGlobal = {};
|
||||
showDynaformHistoryGlobal.dynUID = '';
|
||||
showDynaformHistoryGlobal.tablename = '';
|
||||
showDynaformHistoryGlobal.dynDate = '';
|
||||
showDynaformHistoryGlobal.dynTitle = '';
|
||||
function showDynaformHistory(dynUID,tablename,dynDate,dynTitle){
|
||||
showDynaformHistoryGlobal.dynUID = dynUID;
|
||||
showDynaformHistoryGlobal.tablename = tablename;
|
||||
showDynaformHistoryGlobal.dynDate = dynDate;
|
||||
showDynaformHistoryGlobal.dynTitle = dynTitle;
|
||||
|
||||
var dynUID = showDynaformHistoryGlobal.dynUID;
|
||||
var tablename = showDynaformHistoryGlobal.tablename;
|
||||
var dynDate = showDynaformHistoryGlobal.dynDate;
|
||||
var dynTitle = showDynaformHistoryGlobal.dynTitle;
|
||||
|
||||
var idUnique = globalMd5Return(dynUID+tablename+dynDate+dynTitle);
|
||||
|
||||
var tabData = window.parent.Ext.util.JSON.encode(showDynaformHistoryGlobal);
|
||||
var tabName = 'dynaformChangeLogViewHistory'+idUnique;
|
||||
var tabTitle = 'View('+dynTitle+' '+dynDate+')';
|
||||
|
||||
window.parent.ActionTabFrameGlobal.tabData = tabData;
|
||||
window.parent.ActionTabFrameGlobal.tabName = tabName;
|
||||
window.parent.ActionTabFrameGlobal.tabTitle = tabTitle;
|
||||
|
||||
window.parent.Actions.tabFrame(tabName);
|
||||
}
|
||||
</script>
|
||||
<?php
|
||||
|
||||
require_once 'classes/model/AppHistory.php';
|
||||
$G_PUBLISH = new Publisher();
|
||||
$G_PUBLISH->AddContent('view', 'cases/cases_DynaformHistory');
|
||||
|
||||
G::RenderPage('publish', 'raw');
|
||||
}
|
||||
|
||||
if($actionAjax=='dynaformChangeLogViewHistory'){
|
||||
|
||||
?>
|
||||
<link rel="stylesheet" type="text/css" href="/css/classic.css" />
|
||||
<style type="text/css">
|
||||
html{
|
||||
color:black !important;
|
||||
}
|
||||
body{
|
||||
color:black !important;
|
||||
}
|
||||
</style>
|
||||
<script language="Javascript">
|
||||
|
||||
|
||||
|
||||
//!Code that simulated reload library javascript maborak
|
||||
var leimnud = {};
|
||||
leimnud.exec = "";
|
||||
leimnud.fix = {};
|
||||
leimnud.fix.memoryLeak = "";
|
||||
leimnud.browser = {};
|
||||
leimnud.browser.isIphone = "";
|
||||
leimnud.iphone = {};
|
||||
leimnud.iphone.make = function(){};
|
||||
function ajax_function(ajax_server, funcion, parameters, method){
|
||||
}
|
||||
//!
|
||||
</script>
|
||||
<?php
|
||||
|
||||
$_POST['DYN_UID']= $_REQUEST['DYN_UID'];
|
||||
$_POST['HISTORY_ID']= $_REQUEST['HISTORY_ID'];
|
||||
|
||||
|
||||
global $G_PUBLISH;
|
||||
$G_PUBLISH = new Publisher();
|
||||
$FieldsHistory=unserialize($_SESSION['HISTORY_DATA']);
|
||||
$Fields['APP_DATA'] = $FieldsHistory[$_POST['HISTORY_ID']];
|
||||
$Fields['APP_DATA']['__DYNAFORM_OPTIONS']['PREVIOUS_STEP_LABEL'] = '';
|
||||
$Fields['APP_DATA']['__DYNAFORM_OPTIONS']['NEXT_STEP_LABEL'] = '';
|
||||
$Fields['APP_DATA']['__DYNAFORM_OPTIONS']['NEXT_STEP'] = '#';
|
||||
$Fields['APP_DATA']['__DYNAFORM_OPTIONS']['NEXT_ACTION'] = 'return false;';
|
||||
$G_PUBLISH->AddContent('dynaform', 'xmlform', $_SESSION['PROCESS'] . '/' . $_POST['DYN_UID'], '', $Fields['APP_DATA'], '', '', 'view');
|
||||
|
||||
|
||||
?>
|
||||
<script language="javascript">
|
||||
<?php
|
||||
global $G_FORM;
|
||||
?>
|
||||
function loadForm_<?php echo $G_FORM->id;?>(parametro1){
|
||||
|
||||
}
|
||||
</script>
|
||||
<?php
|
||||
|
||||
G::RenderPage('publish', 'raw');
|
||||
|
||||
}
|
||||
if($actionAjax== 'historyDynaformGridPreview'){
|
||||
?>
|
||||
<link rel="stylesheet" type="text/css" href="/css/classic.css" />
|
||||
<style type="text/css">
|
||||
html{
|
||||
color:black !important;
|
||||
}
|
||||
body{
|
||||
color:black !important;
|
||||
}
|
||||
</style>
|
||||
<script language="Javascript">
|
||||
|
||||
|
||||
|
||||
//!Code that simulated reload library javascript maborak
|
||||
var leimnud = {};
|
||||
leimnud.exec = "";
|
||||
leimnud.fix = {};
|
||||
leimnud.fix.memoryLeak = "";
|
||||
leimnud.browser = {};
|
||||
leimnud.browser.isIphone = "";
|
||||
leimnud.iphone = {};
|
||||
leimnud.iphone.make = function(){};
|
||||
function ajax_function(ajax_server, funcion, parameters, method){
|
||||
}
|
||||
//!
|
||||
</script>
|
||||
<?php
|
||||
|
||||
//!dataIndex
|
||||
$_POST["DYN_UID"] = $_REQUEST["DYN_UID"];
|
||||
|
||||
G::LoadClass('case');
|
||||
|
||||
$G_PUBLISH = new Publisher();
|
||||
$oCase = new Cases();
|
||||
$Fields = $oCase->loadCase($_SESSION['APPLICATION']);
|
||||
$Fields['APP_DATA']['__DYNAFORM_OPTIONS']['PREVIOUS_STEP_LABEL'] = '';
|
||||
$Fields['APP_DATA']['__DYNAFORM_OPTIONS']['NEXT_STEP_LABEL'] = '';
|
||||
$Fields['APP_DATA']['__DYNAFORM_OPTIONS']['NEXT_STEP'] = '#';
|
||||
$Fields['APP_DATA']['__DYNAFORM_OPTIONS']['NEXT_ACTION'] = 'return false;';
|
||||
$_SESSION['DYN_UID_PRINT'] = $_POST['DYN_UID'];
|
||||
$G_PUBLISH->AddContent('dynaform', 'xmlform', $_SESSION['PROCESS'] . '/' . $_POST['DYN_UID'], '', $Fields['APP_DATA'], '', '', 'view');
|
||||
|
||||
?>
|
||||
<script language="javascript">
|
||||
<?php
|
||||
global $G_FORM;
|
||||
?>
|
||||
function loadForm_<?php echo $G_FORM->id;?>(parametro1){
|
||||
|
||||
}
|
||||
</script>
|
||||
<?php
|
||||
|
||||
G::RenderPage('publish', 'raw');
|
||||
|
||||
}
|
||||
@@ -493,15 +493,117 @@ switch(($_POST['action'])?$_POST['action']:$_REQUEST['action']) {
|
||||
$G_PUBLISH->AddContent('xmlform', 'xmlform', $sXmlForm, '', G::array_merges($Fields, $oAppDocument->Fields), '');
|
||||
G::RenderPage('publish', 'raw');
|
||||
break;
|
||||
|
||||
case 'showGeneratedDocuments':
|
||||
$oCase = new Cases();
|
||||
global $G_PUBLISH;
|
||||
$oCase = new Cases();
|
||||
$G_PUBLISH = new Publisher();
|
||||
$G_PUBLISH->AddContent('propeltable', 'paged-table', 'cases/cases_AllOutputdocsList', $oCase->getAllGeneratedDocumentsCriteria($_SESSION['PROCESS'], $_SESSION['APPLICATION'], $_SESSION['TASK'], $_SESSION['USER_LOGGED']));
|
||||
|
||||
G::RenderPage('publish', 'raw');
|
||||
break;
|
||||
case 'showGeneratedDocument':
|
||||
require_once 'classes/model/AppDocument.php';
|
||||
|
||||
case 'uploadDocumentGrid_Ajax':
|
||||
G::LoadClass('case');
|
||||
G::LoadClass("BasePeer" );
|
||||
global $G_PUBLISH;
|
||||
|
||||
$oCase = new Cases();
|
||||
$aProcesses = Array();
|
||||
|
||||
$G_PUBLISH = new Publisher();
|
||||
$c = $oCase->getAllUploadedDocumentsCriteria($_SESSION['PROCESS'], $_SESSION['APPLICATION'], $_SESSION['TASK'], $_SESSION['USER_LOGGED']);
|
||||
|
||||
if ( $c->getDbName() == 'dbarray' ) {
|
||||
$rs = ArrayBasePeer::doSelectRs ($c);
|
||||
}
|
||||
else {
|
||||
$rs = GulliverBasePeer::doSelectRs ($c);
|
||||
}
|
||||
|
||||
$rs->setFetchmode (ResultSet::FETCHMODE_ASSOC);
|
||||
$rs->next();
|
||||
|
||||
$totalCount = 0;
|
||||
|
||||
for ($j=0;$j< $rs->getRecordCount() ;$j++) {
|
||||
$result = $rs->getRow();
|
||||
$aProcesses[] = $result;
|
||||
$rs->next();
|
||||
$totalCount++;
|
||||
}
|
||||
|
||||
$newDir = '/tmp/test/directory';
|
||||
$r = G::verifyPath ( $newDir );
|
||||
$r->data = $aProcesses;
|
||||
$r->totalCount = $totalCount;
|
||||
|
||||
echo G::json_encode($r);
|
||||
break;
|
||||
|
||||
case 'generateDocumentGrid_Ajax':
|
||||
|
||||
G::LoadClass('case');
|
||||
G::LoadClass("BasePeer" );
|
||||
G::LoadClass ( 'configuration' );
|
||||
global $G_PUBLISH;
|
||||
|
||||
$oCase = new Cases();
|
||||
$aProcesses = Array();
|
||||
|
||||
$G_PUBLISH = new Publisher();
|
||||
$c = $oCase->getAllGeneratedDocumentsCriteria($_SESSION['PROCESS'], $_SESSION['APPLICATION'], $_SESSION['TASK'], $_SESSION['USER_LOGGED']);
|
||||
|
||||
if ( $c->getDbName() == 'dbarray' ){
|
||||
$rs = ArrayBasePeer::doSelectRs ($c);
|
||||
}
|
||||
else {
|
||||
$rs = GulliverBasePeer::doSelectRs ($c);
|
||||
}
|
||||
|
||||
$rs->setFetchmode (ResultSet::FETCHMODE_ASSOC);
|
||||
$rs->next();
|
||||
|
||||
$totalCount = 0;
|
||||
|
||||
for ($j=0;$j< $rs->getRecordCount() ;$j++) {
|
||||
$result = $rs->getRow();
|
||||
$result["FILEDOCEXIST"] = ($result["FILEDOC"]);
|
||||
$result["FILEPDFEXIST"] = ($result["FILEPDF"]);
|
||||
$aProcesses[] = $result;
|
||||
|
||||
$rs->next();
|
||||
$totalCount++;
|
||||
}
|
||||
|
||||
//!dateFormat
|
||||
$conf = new Configurations();
|
||||
|
||||
try {
|
||||
$generalConfCasesList = $conf->getConfiguration('ENVIRONMENT_SETTINGS', '' );
|
||||
}
|
||||
catch (Exception $e) {
|
||||
$generalConfCasesList = array();
|
||||
}
|
||||
|
||||
$dateFormat = "";
|
||||
|
||||
if (isset($generalConfCasesList['casesListDateFormat'])&&!empty($generalConfCasesList['casesListDateFormat'])) {
|
||||
$dateFormat = $generalConfCasesList['casesListDateFormat'];
|
||||
}
|
||||
|
||||
$newDir = '/tmp/test/directory';
|
||||
$r = G::verifyPath ( $newDir );
|
||||
$r->data = $aProcesses;
|
||||
$r->totalCount = $totalCount;
|
||||
$r->dataFormat = $dateFormat;
|
||||
|
||||
echo G::json_encode($r);
|
||||
|
||||
break;
|
||||
|
||||
case 'showGeneratedDocument' :
|
||||
require_once 'classes/model/AppDocument.php';
|
||||
require_once 'classes/model/AppDelegation.php';
|
||||
$oAppDocument = new AppDocument();
|
||||
$aFields = $oAppDocument->load($_POST['APP_DOC_UID']);
|
||||
|
||||
Reference in New Issue
Block a user