CODE STYLE, workflow/engine/methods/setup/ PART 3 (final)

FILES:
setup.js
setup.php
setupAjax.php
showLogoFile.php
skin_Ajax.php
skinsExport.php
skinsList.php
skinsNew.php
skinsSave.php
upgrade.php
upgrade_RBAC.php
upgrade_System.php
upgrade_SystemAjax.php
uplogo.php
webServices.php
webServicesAjax.php
webServicesList.php
webServicesSetup.php
webServicesSetupSave.php
weekend.php
weekendAjax.php
workPeriod.js
workPeriod.php
workPeriodGraph.php
workPeriodSave.php
This commit is contained in:
jennylee
2012-10-17 17:21:35 -04:00
parent 4bd1ce1a41
commit 0f6644bcb0
25 changed files with 3146 additions and 3103 deletions

View File

@@ -1,13 +1,10 @@
function abc(panel, txt) {
/* commonDialog ( '', 'saved' , 'saved', {}, '' ) ;
setTimeout ( leimnud.closure({instance:myDialog,method:function(panel){
myDialog.remove();
panel.tabLastSelected=false;
panel.tabSelected=1;
panel.makeTab();
},args:panel}) , 1000 );
/*
* commonDialog ( '', 'saved' , 'saved', {}, '' ) ; setTimeout (
* leimnud.closure({instance:myDialog,method:function(panel){
*
* myDialog.remove(); panel.tabLastSelected=false; panel.tabSelected=1;
* panel.makeTab(); },args:panel}) , 1000 );
*/
var img = document.getElementById('workPeriodGraph');
img.src = 'workPeriodGraph?b=' + Math.random();
@@ -17,57 +14,71 @@ function abc( panel, txt ) {
return false;
}
function showHideFilterForm( divName)
{
function showHideFilterForm(divName) {
if (document.getElementById(divName).style.display === 'none')
document.getElementById(divName).style.display = '';
else
document.getElementById(divName).style.display = 'none';
}
function newHoliday(ev) {
var coor = leimnud.dom.mouse(ev);
var myPanel = new leimnud.module.panel();
myPanel.options = {
size:{w:500,h:200},
position:{x:coor.x-200,y:coor.y},
size : {
w : 500,
h : 200
},
position : {
x : coor.x - 200,
y : coor.y
},
title : "New Holiday",
theme : "panel",
control : {
close : true,
drag : true
},
fx: { modal:true }
fx : {
modal : true
}
};
myPanel.make();
var r = new leimnud.module.rpc.xmlhttp({url:"holidayNew.php"});
r.callback=leimnud.closure({Function:function(rpc){
var r = new leimnud.module.rpc.xmlhttp({
url : "holidayNew.php"
});
r.callback = leimnud.closure({
Function : function(rpc) {
myPanel.addContent(rpc.xmlhttp.responseText);
},args:r})
},
args : r
})
r.make();
}
function deleteHoliday(uid) {
url = "setupAjax.php?action=deleteHoliday&uid=" + uid;
var r = new leimnud.module.rpc.xmlhttp({url: url });
r.callback=leimnud.closure({Function:function(rpc){
var r = new leimnud.module.rpc.xmlhttp({
url : url
});
r.callback = leimnud.closure({
Function : function(rpc) {
// myPanel.addContent(rpc.xmlhttp.responseText);
myPanel = setupPanel.panels.control;
myPanel.tabLastSelected = false;
myPanel.tabSelected = 0;
myPanel.makeTab();
},args:r})
},
args : r
})
r.make();
// myPanel.clearContent();
// myPanel.addContent ( uid );
}

View File

@@ -20,33 +20,28 @@
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/
/**
* New Admin User interface
*
* @author Erik A. O. <erik@colosa.com, aortiz.erik@gmail.com>
* @date Apr 5th, 2010
*/
if (($RBAC_Response=$RBAC->userCanAccess("PM_SETUP"))!=1) return $RBAC_Response;
if (($RBAC_Response = $RBAC->userCanAccess( "PM_SETUP" )) != 1)
return $RBAC_Response;
$G_MAIN_MENU = "processmaker";
$G_ID_MENU_SELECTED = "SETUP";
$G_PUBLISH = new Publisher;
$G_PUBLISH = new Publisher();
global $G_TMP_MENU;
$oMenu = new Menu();
$oMenu->load( 'setup' );
$toolItems = Array ();
foreach ($oMenu->Options as $i => $option) {
$toolItems[] = Array(
'id' => $oMenu->Id[$i],
'link' => ($oMenu->Options[$i]!='')? $oMenu->Options[$i]: '#',
'onclick' => ($oMenu->JS[$i]!='')? $oMenu->JS[$i]: '',
'label' => $oMenu->Labels[$i],
'icon' => ($oMenu->Icons[$i]!='')? $oMenu->Icons[$i]: 'icon-pmlogo.png',
'target'=> ($oMenu->JS[$i]!='')? '': 'admToolsContent'
$toolItems[] = Array ('id' => $oMenu->Id[$i],'link' => ($oMenu->Options[$i] != '') ? $oMenu->Options[$i] : '#','onclick' => ($oMenu->JS[$i] != '') ? $oMenu->JS[$i] : '','label' => $oMenu->Labels[$i],'icon' => ($oMenu->Icons[$i] != '') ? $oMenu->Icons[$i] : 'icon-pmlogo.png','target' => ($oMenu->JS[$i] != '') ? '' : 'admToolsContent'
);
}
@@ -68,7 +63,6 @@ if( isset($_GET['newSite']) ){
$template->assign( 'displayNewSiteTool', 'none' );
}
foreach ($toolItems as $item) {
$template->newBlock( 'tool_options' );
foreach ($item as $propertyName => $propertyValue)
@@ -85,3 +79,4 @@ if(isset($_GET['module'])){
</script>
";
}

View File

@@ -20,15 +20,15 @@
*
* 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;
if (($RBAC_Response = $RBAC->userCanAccess( "PM_SETUP" )) != 1)
return $RBAC_Response;
//$oSMTPJSON = new Services_JSON();
//$oSMTPData = $oSMTPJSON->decode(stripslashes($_POST['data']));
//$sOutput = '';
G::LoadClass( 'setup' );
$oSMTPSetup = new Setup(new DBConnection);
$oSMTPSetup = new Setup( new DBConnection() );
$action = strtolower( $_GET['action'] );
$data = $_GET;
@@ -38,4 +38,4 @@ if (($RBAC_Response=$RBAC->userCanAccess("PM_SETUP"))!=1) return $RBAC_Response;
if ($method == $action)
$oSMTPSetup->{$action}( $_GET );
}
?>

View File

@@ -20,13 +20,14 @@
*
* 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_CASES"))!=1) return $RBAC_Response;
$idDecode64 = base64_decode( $_GET['id'] );
$idExploded = explode( '/', $idDecode64 );
if ( $idExploded[0] == '' ) array_shift($idExploded);
if ($idExploded[0] == '')
array_shift( $idExploded );
if ($idExploded[0] == 'plugin') {
//Get the Plugin Folder, always the first element
$pluginFolder = $idExploded[1];
@@ -34,7 +35,7 @@
if (file_exists( $pluginFilename )) {
G::streamFile( $pluginFilename );
}
die;
die();
}
$ainfoSite = explode( "/", $_SERVER["REQUEST_URI"] );
@@ -46,13 +47,10 @@
$dir = PATH_DATA . "sites" . PATH_SEP . str_replace( "sys", "", $ainfoSite[1] ) . PATH_SEP . "files/logos";
$imagen = $dir . PATH_SEP . $idDecode64;
if (is_file($imagen))
{
if (is_file( $imagen )) {
showLogo( $imagen );
}
else {
} else {
$newDir = PATH_DATA . "sites" . PATH_SEP . str_replace( "sys", "", $ainfoSite[1] ) . PATH_SEP . "files/logos";
$dir = PATH_HOME . "public_html/files/logos";
@@ -66,24 +64,25 @@
$dir .= PATH_SEP . $idDecode64;
copy( $dir, $newDir );
showLogo( $newDir );
die;
die();
}
function showLogo($imagen){
function showLogo ($imagen)
{
$info = @getimagesize( $imagen );
$fp = fopen( $imagen, "rb" );
if ($info && $fp) {
header( "Content-type: {$info['mime']}" );
fpassthru( $fp );
exit;
exit();
} else {
throw new Exception( "Image format not valid" );
}
}
function cpyMoreLogos($dir,$newDir){
function cpyMoreLogos ($dir, $newDir)
{
if (file_exists( $dir )) {
if ($handle = opendir( $dir )) {
while (false !== ($file = readdir( $handle ))) {
@@ -91,14 +90,14 @@
$extention = explode( ".", $file );
$aImageProp = getimagesize( $dir . '/' . $file, $info );
$sfileExtention = strtoupper( $extention[count( $extention ) - 1] );
if( in_array($sfileExtention, array('JPG','JPEG','PNG','GIF') ) ) {
if (in_array( $sfileExtention, array ('JPG','JPEG','PNG','GIF'
) )) {
$dir1 = $dir . PATH_SEP . $file;
$dir2 = $newDir . PATH_SEP . $file;
//print $dir1 ." *** ".$dir2."<br><br>";
copy( $dir1, $dir2 );
}
}
}
@@ -107,10 +106,10 @@
}
}
die;
die();
?>
<script>
</script>

View File

@@ -14,7 +14,8 @@ if (!function_exists($_REQUEST ['action'])) {
print G::json_encode( $res );
die();
}
$restrictedFunctions=array('copy_skin_folder','addTarFolder');
$restrictedFunctions = array ('copy_skin_folder','addTarFolder'
);
if (in_array( $_REQUEST['action'], $restrictedFunctions )) {
$res['success'] = false;
$res['error'] = $res['message'] = 'The requested action does not exist *';
@@ -22,7 +23,6 @@ if (in_array($_REQUEST ['action'],$restrictedFunctions)) {
die();
}
$functionName = $_REQUEST['action'];
$functionParams = isset( $_REQUEST['params'] ) ? $_REQUEST['params'] : array ();
@@ -48,8 +48,7 @@ function skinList()
$skinList = System::getSkingList();
$wildcard = '';
if(isset($_REQUEST['activeskin']))
{
if (isset( $_REQUEST['activeskin'] )) {
$wildcard = '@';
}
foreach ($skinList['skins'] as $key => $value) {
@@ -61,8 +60,7 @@ function skinList()
$value['SKIN_AUTHOR'] = $wildcard . $value['SKIN_AUTHOR'];
$value['SKIN_CREATEDATE'] = $wildcard . $value['SKIN_CREATEDATE'];
$value['SKIN_MODIFIEDDATE'] = $wildcard . $value['SKIN_MODIFIEDDATE'];
}
else{
} else {
$value['SKIN_STATUS'] = G::LoadTranslation( 'ID_INACTIVE' );
}
$skinListArray['skins'][] = $value;
@@ -89,6 +87,7 @@ function newSkin($baseSkin='classic')
//Should validate skin folder name here
//if....
$skinName = $_REQUEST['skinName'];
$skinFolder = $_REQUEST['skinFolder'];
$skinDescription = isset( $_REQUEST['skinDescription'] ) ? $_REQUEST['skinDescription'] : '';
@@ -105,19 +104,20 @@ function newSkin($baseSkin='classic')
switch ($skinBase) {
//Validate skin base
case 'uxmodern':
copy_skin_folder(G::ExpandPath("skinEngine") . 'uxmodern' . PATH_SEP, PATH_CUSTOM_SKINS .
$skinFolder,array("config.xml"));
copy_skin_folder( G::ExpandPath( "skinEngine" ) . 'uxmodern' . PATH_SEP, PATH_CUSTOM_SKINS . $skinFolder, array ("config.xml"
) );
$pathBase = G::ExpandPath( "skinEngine" ) . 'base' . PATH_SEP;
break;
case 'classic':
//Special Copy of this dir + xmlreplace
copy_skin_folder(G::ExpandPath("skinEngine") . 'base' . PATH_SEP, PATH_CUSTOM_SKINS .
$skinFolder,array("config.xml","baseCss"));
copy_skin_folder( G::ExpandPath( "skinEngine" ) . 'base' . PATH_SEP, PATH_CUSTOM_SKINS . $skinFolder, array ("config.xml","baseCss"
) );
$pathBase = G::ExpandPath( "skinEngine" ) . 'base' . PATH_SEP;
break;
default:
//Commmon copy/paste of a folder + xmlrepalce
copy_skin_folder(PATH_CUSTOM_SKINS . $skinBase, PATH_CUSTOM_SKINS . $skinFolder,array("config.xml"));
copy_skin_folder( PATH_CUSTOM_SKINS . $skinBase, PATH_CUSTOM_SKINS . $skinFolder, array ("config.xml"
) );
$pathBase = PATH_CUSTOM_SKINS . $skinBase;
break;
}
@@ -126,18 +126,12 @@ function newSkin($baseSkin='classic')
$configFileOriginal = $pathBase . PATH_SEP . 'config.xml';
$configFileFinal = PATH_CUSTOM_SKINS . $skinFolder . PATH_SEP . 'config.xml';
$xmlConfiguration = file_get_contents( $configFileOriginal );
$xmlConfiguration = preg_replace('/(<id>)(.+?)(<\/id>)/i', '<id>' . G::generateUniqueID() .
'</id><!-- $2 -->', $xmlConfiguration);
$xmlConfiguration = preg_replace("/(<name>)(.+?)(<\/name>)/i", "<name>" . $skinName .
"</name><!-- $2 -->", $xmlConfiguration);
$xmlConfiguration = preg_replace("/(<description>)(.+?)(<\/description>)/i", "<description>" .
$skinDescription . "</description><!-- $2 -->", $xmlConfiguration);
$xmlConfiguration = preg_replace("/(<author>)(.+?)(<\/author>)/i", "<author>" . $skinAuthor .
"</author><!-- $2 -->", $xmlConfiguration);
$xmlConfiguration = preg_replace("/(<createDate>)(.+?)(<\/createDate>)/i", "<createDate>" .
date("Y-m-d H:i:s") . "</createDate><!-- $2 -->", $xmlConfiguration);
$xmlConfiguration = preg_replace("/(<modifiedDate>)(.+?)(<\/modifiedDate>)/i", "<modifiedDate>" .
date("Y-m-d H:i:s") . "</modifiedDate><!-- $2 -->", $xmlConfiguration);
$xmlConfiguration = preg_replace( '/(<id>)(.+?)(<\/id>)/i', '<id>' . G::generateUniqueID() . '</id><!-- $2 -->', $xmlConfiguration );
$xmlConfiguration = preg_replace( "/(<name>)(.+?)(<\/name>)/i", "<name>" . $skinName . "</name><!-- $2 -->", $xmlConfiguration );
$xmlConfiguration = preg_replace( "/(<description>)(.+?)(<\/description>)/i", "<description>" . $skinDescription . "</description><!-- $2 -->", $xmlConfiguration );
$xmlConfiguration = preg_replace( "/(<author>)(.+?)(<\/author>)/i", "<author>" . $skinAuthor . "</author><!-- $2 -->", $xmlConfiguration );
$xmlConfiguration = preg_replace( "/(<createDate>)(.+?)(<\/createDate>)/i", "<createDate>" . date( "Y-m-d H:i:s" ) . "</createDate><!-- $2 -->", $xmlConfiguration );
$xmlConfiguration = preg_replace( "/(<modifiedDate>)(.+?)(<\/modifiedDate>)/i", "<modifiedDate>" . date( "Y-m-d H:i:s" ) . "</modifiedDate><!-- $2 -->", $xmlConfiguration );
file_put_contents( $configFileFinal, $xmlConfiguration );
$response['success'] = true;
@@ -188,7 +182,8 @@ function importSkin()
//$errors[$i]='uploadfile';
}
$fileInfo = pathinfo( $items );
$validType = array('tar', 'gz');
$validType = array ('tar','gz'
);
if (! in_array( $fileInfo['extension'], $validType )) {
throw (new Exception( G::LoadTranslation( 'ID_FILE_UPLOAD_INCORRECT_EXTENSION' ) ));
@@ -288,6 +283,7 @@ function exportSkin($skinToExport="")
print_r( G::json_encode( $response ) );
}
}
function deleteSkin ()
{
try {
@@ -311,6 +307,7 @@ function deleteSkin()
print_r( G::json_encode( $response ) );
}
}
function streamSkin ()
{
$skinTar = $_REQUEST['file'];
@@ -343,7 +340,8 @@ function addTarFolder($tar, $pathBase, $pluginHome)
function copy_skin_folder ($path, $dest, $exclude = array())
{
$defaultExcluded=array(".","..");
$defaultExcluded = array (".",".."
);
$excludedItems = array_merge( $defaultExcluded, $exclude );
if (is_dir( $path )) {
@mkdir( $dest );

View File

@@ -1,4 +1,5 @@
<?php
/**
* skinsExport.php
*
@@ -20,16 +21,17 @@
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/
function copyFile ( $input, $output ) {
function copyFile ($input, $output)
{
$content = file_get_contents( $input );
$filename = $output . PATH_SEP . basename( $input );
return file_put_contents( $filename, $content );
}
function savePluginFile ( $tplName, $fileName, $fields ) {
function savePluginFile ($tplName, $fileName, $fields)
{
$pluginTpl = PATH_GULLIVER_HOME . 'bin' . PATH_SEP . 'tasks' . PATH_SEP . 'templates' . PATH_SEP . $tplName . '.tpl';
$template = new TemplatePower( $pluginTpl );
$template->prepare();
@@ -53,9 +55,11 @@
return $iSize;
}
function addTarFolder ( $tar, $pathBase,$pluginHome ) {
function addTarFolder ($tar, $pathBase, $pluginHome)
{
$aux = explode( PATH_SEP, $pathBase );
if ( $aux[count($aux) -2 ] == '.svn' ) return;
if ($aux[count( $aux ) - 2] == '.svn')
return;
if ($handle = opendir( $pathBase )) {
while (false !== ($file = readdir( $handle ))) {
@@ -72,8 +76,8 @@
}
}
function packPlugin ( $pluginName, $version ) {
function packPlugin ($pluginName, $version)
{
$pathBase = PATH_DATA . 'skins' . PATH_SEP . $pluginName . PATH_SEP;
$pathHome = PATH_DATA . 'skins' . PATH_SEP . $pluginName;
@@ -103,17 +107,16 @@
}
global $RBAC;
switch ($RBAC->userCanAccess('PM_SETUP'))
{
switch ($RBAC->userCanAccess( 'PM_SETUP' )) {
case - 2:
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels' );
G::header( 'location: ../login/login' );
die;
die();
break;
case - 1:
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
G::header( 'location: ../login/login' );
die;
die();
break;
}
@@ -161,12 +164,12 @@ switch ($RBAC->userCanAccess('PM_SETUP'))
copyFile( PATH_HTML . 'skins' . PATH_SEP . $id . PATH_SEP . 'iepngfix.htc', $pathPublic );
copyFile( PATH_HTML . 'skins' . PATH_SEP . $id . PATH_SEP . 'style.css', $pathPublic );
$aFiles = array ();
if ($handle = opendir( $pathImages )) {
while (false !== ($file = readdir( $handle ))) {
if (substr( $file, 0, 1 ) != '.') {
if ( isset($aFiles[ $file ]) ) $aFiles[$file] = 0;
if (isset( $aFiles[$file] ))
$aFiles[$file] = 0;
copyFile( $pathImages . $file, $pathPublic . 'images' . PATH_SEP );
}
@@ -176,9 +179,9 @@ switch ($RBAC->userCanAccess('PM_SETUP'))
$fileTar = packPlugin( $id, $oConf->version );
$bDownload = true;
G::streamFile( $fileTar, $bDownload, basename( $fileTar ) );
@G::rm_dir( $pathHome );
@unlink( $fileTar );

View File

@@ -20,13 +20,12 @@
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/
if ($RBAC->userCanAccess( 'PM_SETUP' ) != 1 && $RBAC->userCanAccess( 'PM_SETUP_ADVANCE' ) != 1) {
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
//G::header('location: ../login/login');
die;
die();
}
$G_MAIN_MENU = 'processmaker';
@@ -34,7 +33,7 @@ $G_SUB_MENU = 'setup';
$G_ID_MENU_SELECTED = 'SETUP';
$G_ID_SUB_MENU_SELECTED = 'CALENDAR';
$G_PUBLISH = new Publisher;
$G_PUBLISH = new Publisher();
G::LoadClass( 'configuration' );
$c = new Configurations();
@@ -50,33 +49,32 @@ $oHeadPublisher->assign('SYS_SKIN', SYS_SKIN);
$oHeadPublisher->assign( 'FORMATS', $c->getFormats() );
G::RenderPage( 'publish', 'extJs' );
die;
die();
global $RBAC;
$access = $RBAC->userCanAccess( 'PM_SETUP' );
if ($access != 1) {
switch ($access)
{
switch ($access) {
case - 1:
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
G::header( 'location: ../login/login' );
die;
die();
break;
case - 2:
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels' );
G::header( 'location: ../login/login' );
die;
die();
break;
default:
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
G::header( 'location: ../login/login' );
die;
die();
break;
}
}
// lets display the items
$items[] = array ( 'id' => 'char', 'title' => 'char', 'type' => 'char', 'creator' => 'char' ,
'modifiedBy' => 'char', 'filename' => 'char', 'size' => 'char', 'mime' => 'char');
$items[] = array ('id' => 'char','title' => 'char','type' => 'char','creator' => 'char','modifiedBy' => 'char','filename' => 'char','size' => 'char','mime' => 'char'
);
//***************** Skins **************************
$aFiles = array ();
@@ -86,20 +84,23 @@ if( $access != 1 ){
$filename = substr( $file, 0, strrpos( $file, '.' ) );
// list of no complete skins
$aFilterSkinsList = Array('blank', 'green', 'raw', 'tracker', 'iphone', 'green-submenu', 'extJsInitLoad', 'extJs' );
$aFilterSkinsList = Array ('blank','green','raw','tracker','iphone','green-submenu','extJsInitLoad','extJs'
);
if (! is_dir( PATH_SKINS . $file )) {
if (! in_array( $filename, $aFilterSkinsList ) /*&& /*/ && ! strpos( $file, '.tar', 1 )) {
if ( !isset($aFiles[ $filename ]) ) $aFiles[$filename] = 0;
if ( strpos($file, '.php', 1) ) $aFiles[ $filename ] += 1;
if ( strpos($file, '.html',1) ) $aFiles[ $filename ] += 2;
if (! isset( $aFiles[$filename] ))
$aFiles[$filename] = 0;
if (strpos( $file, '.php', 1 ))
$aFiles[$filename] += 1;
if (strpos( $file, '.html', 1 ))
$aFiles[$filename] += 2;
}
}
}
closedir( $handle );
//now walk in the array to get the .cnf file and display properties
foreach ($aFiles as $key => $val) {
$description = '';
@@ -113,20 +114,15 @@ if( $access != 1 ){
if (! is_object( $prop )) {
@unlink( PATH_SKINS . $key . '.cnf' );
}
if ( isset ( $prop) && isset($prop->description) ) $description = $prop->description;
if ( isset ( $prop) && isset($prop->version ) ) $version = $prop->version;
if (isset( $prop ) && isset( $prop->description ))
$description = $prop->description;
if (isset( $prop ) && isset( $prop->version ))
$version = $prop->version;
}
$linkPackValue = G::LoadTranslation( 'ID_EXPORT' );
$link = 'skinsExport?id=' . $key;
$items[] = array (
'id' => count($items),
'name' => $key,
'filename' => $key,
'description' => $description,
'version' => $version,
'url' => $link,
'linkPackValue' => $linkPackValue
$items[] = array ('id' => count( $items ),'name' => $key,'filename' => $key,'description' => $description,'version' => $version,'url' => $link,'linkPackValue' => $linkPackValue
);
}
$folders['items'] = $items;
@@ -145,7 +141,7 @@ if( $access != 1 ){
$G_SUB_MENU = 'setup';
$G_ID_SUB_MENU_SELECTED = 'SKINS';
$G_PUBLISH = new Publisher;
$G_PUBLISH = new Publisher();
$G_PUBLISH->AddContent( 'propeltable', 'paged-table', 'setup/skinsList', $c );

View File

@@ -20,34 +20,33 @@
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/
$access = $RBAC->userCanAccess( 'PM_SETUP' );
if ($access != 1) {
switch ($access)
{
switch ($access) {
case - 1:
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
G::header( 'location: ../login/login' );
die;
die();
break;
case - 2:
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels' );
G::header( 'location: ../login/login' );
die;
die();
break;
default:
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
G::header( 'location: ../login/login' );
die;
die();
break;
}
}
if (($RBAC_Response=$RBAC->userCanAccess("PM_SETUP"))!=1) return $RBAC_Response;
if (($RBAC_Response = $RBAC->userCanAccess( "PM_SETUP" )) != 1)
return $RBAC_Response;
$dbc = new DBConnection;
$G_PUBLISH = new Publisher;
$dbc = new DBConnection();
$G_PUBLISH = new Publisher();
$G_MAIN_MENU = 'processmaker';
$G_ID_MENU_SELECTED = 'SETUP';
$G_SUB_MENU = 'setup';

View File

@@ -1,4 +1,5 @@
<?php
/**
* skinsSave.php
*
@@ -20,11 +21,10 @@
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/
function xcopy ( $pathSource, $pathTarget ) {
function xcopy ($pathSource, $pathTarget)
{
G::mk_dir( $pathTarget );
if ($handle = opendir( $pathSource )) {
while (false !== ($file = readdir( $handle ))) {
@@ -38,19 +38,17 @@
}
}
global $RBAC;
switch ($RBAC->userCanAccess('PM_SETUP'))
{
switch ($RBAC->userCanAccess( 'PM_SETUP' )) {
case - 2:
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels' );
G::header( 'location: ../login/login' );
die;
die();
break;
case - 1:
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
G::header( 'location: ../login/login' );
die;
die();
break;
}
@@ -82,14 +80,9 @@ switch ($RBAC->userCanAccess('PM_SETUP'))
$pathImages = PATH_HTML . 'skins' . PATH_SEP . $id . PATH_SEP . 'images' . PATH_SEP;
G::mk_dir( $pathImages );
xcopy (
PATH_HTML . 'skins' . PATH_SEP . 'green' . PATH_SEP ,
PATH_HTML . 'skins' . PATH_SEP . $id . PATH_SEP
);
xcopy( PATH_HTML . 'skins' . PATH_SEP . 'green' . PATH_SEP, PATH_HTML . 'skins' . PATH_SEP . $id . PATH_SEP );
xcopy (
PATH_HTML . 'skins' . PATH_SEP . 'green' . PATH_SEP . 'images'. PATH_SEP,
PATH_HTML . 'skins' . PATH_SEP . $id . PATH_SEP . 'images'. PATH_SEP
);
xcopy( PATH_HTML . 'skins' . PATH_SEP . 'green' . PATH_SEP . 'images' . PATH_SEP, PATH_HTML . 'skins' . PATH_SEP . $id . PATH_SEP . 'images' . PATH_SEP );
G::Header( 'Location: ../../' . $id . '/setup/skinsList' );

View File

@@ -20,27 +20,25 @@
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/
global $RBAC;
$access = $RBAC->userCanAccess( 'PM_SETUP_ADVANCE' );
if ($access != 1) {
switch ($access)
{
switch ($access) {
case - 1:
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
G::header( 'location: ../login/login' );
die;
die();
break;
case - 2:
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels' );
G::header( 'location: ../login/login' );
die;
die();
break;
default:
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
G::header( 'location: ../login/login' );
die;
die();
break;
}
}
@@ -55,8 +53,8 @@ if( $access != 1 ){
$mul = ($mul == 'M' ? 1048576 : ($mul == 'K' ? 1024 : ($mul == 'G' ? 1073741824 : 1)));
$uploadMaxSize = (int) $UPLOAD_MAX_SIZE * $mul;
if ( $postMaxSize < $uploadMaxSize ) $uploadMaxSize = $postMaxSize;
if ($postMaxSize < $uploadMaxSize)
$uploadMaxSize = $postMaxSize;
$G_MAIN_MENU = 'processmaker';
$G_SUB_MENU = 'setup';
@@ -68,7 +66,7 @@ if( $access != 1 ){
$Fields['PM_VERSION'] = System::getVersion();
$Fields['MAX_FILE_SIZE'] = $uploadMaxSize . " (" . $UPLOAD_MAX_SIZE . ") ";
$G_PUBLISH = new Publisher;
$G_PUBLISH = new Publisher();
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'setup/upgrade', '', $Fields, 'upgrade_System' );
G::RenderPage( 'publishBlank', 'blank' );

View File

@@ -40,3 +40,4 @@ $aRequiredPermissions = array('PM_LOGIN',
'PM_FOLDERS_ADD_FOLDER',
'PM_FOLDERS_ADD_FILE'
);

View File

@@ -20,7 +20,6 @@
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/
/**
@@ -30,17 +29,16 @@
* @date May 12th, 2010
*/
global $RBAC;
switch ($RBAC->userCanAccess('PM_SETUP_ADVANCE'))
{
switch ($RBAC->userCanAccess( 'PM_SETUP_ADVANCE' )) {
case - 2:
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels' );
G::header( 'location: ../login/login' );
die;
die();
break;
case - 1:
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
G::header( 'location: ../login/login' );
die;
die();
break;
}
set_time_limit( 0 );
@@ -61,7 +59,7 @@ try {
$oSystem->getUpgradedFilesList();
$ver = $oSystem->upgrade();
$G_PUBLISH = new Publisher;
$G_PUBLISH = new Publisher();
$aMessage['THEMESSAGE1'] = G::LoadTranslation( 'ID_UPGRADE_READY' ) . " <b>" . $ver[0] . "</b> " . G::LoadTranslation( 'ID_TO' ) . " <b>" . $ver[1] . "</b>";
$aMessage['THEMESSAGE2'] = file_get_contents( $oSystem->sUpgradeFileList );
$aMessage['THEMESSAGE3'] = '';
@@ -100,11 +98,11 @@ try {
G::RenderPage( 'publishBlank', 'blank' );
G::evalJScript( 'upgradeSystem(' . count( $oSystem->aWorkspaces ) . ')' );
exit( 0 );
}
catch (Exception $e) {
$G_PUBLISH = new Publisher;
} catch (Exception $e) {
$G_PUBLISH = new Publisher();
$aMessage['MESSAGE'] = $e->getMessage();
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'login/showMessage', '', $aMessage );
G::RenderPage( 'publishBlank', 'blank' );
exit( 0 );
}

View File

@@ -20,7 +20,6 @@
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/
global $DB_ADAPTER;
global $DB_HOST;
@@ -30,7 +29,8 @@
set_time_limit( 0 );
$id = '';
if ( isset($_POST['id'] ) ) $id = $_POST['id'];
if (isset( $_POST['id'] ))
$id = $_POST['id'];
G::LoadClass( 'languages' );
G::LoadSystem( 'database_mysql' );
@@ -55,7 +55,6 @@
if ($aUpgradeData['sSchemaFile'] != '')
processMasterSchemaFile( $aUpgradeData['sSchemaFile'] );
//draw a gauge control indicating the progress in workspaces
$gauge = intval( (($aUpgradeData['wsQuantity'] - count( $aWorkspaces ) + 1) / $aUpgradeData['wsQuantity']) * 301 );
print "<table cellpadding=0><tr><td><img src='/images/ajax-loader.gif' border=0/></td><td>";
@@ -63,17 +62,17 @@
print "<div style='color:#FFF; height:16px; text-align:center; padding-top:3px; background-image: url(/skins/green/images/bm.jpg); background-repeat: repeat-x; width: {$gauge}px' ></div> </div>";
print "</td><td width='40%'><font color=black> Upgrading the workspace </font><b><font color=green>$workspace</font></b></td><td width=250 align=right>| $id Remaining</td></tr></table>";
file_put_contents( PATH_DATA . 'log' . PATH_SEP . "upgrade.data.bin", serialize( $aUpgradeData ) );
}
else {
} else {
print "<table cellpadding=0><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td><td>";
print "<div style='border-style:solid;border-width:1px; border-color: #A1C868; width:300px; height:19px;' >";
print "<div style='color:#FFF; height:16px; text-align:center; padding-top:3px; background-image: url(/skins/green/images/bm.jpg); background-repeat: repeat-x; width: 301px' ></div> </div>";
print "</td><td> Finished! All workspaces were upgraded successfully.</td></tr></table>";
}
die;
die();
function getDatabaseCredentials ( $dbFile ) {
function getDatabaseCredentials ($dbFile)
{
$sContent = file_get_contents( $dbFile );
$sContent = str_replace( '<?php', '', $sContent );
$sContent = str_replace( '<?', '', $sContent );
@@ -85,7 +84,8 @@ function getDatabaseCredentials ( $dbFile ) {
return $sContent;
}
function processMasterSchemaFile ( $sSchemaFile ) {
function processMasterSchemaFile ($sSchemaFile)
{
global $DB_ADAPTER;
global $DB_HOST;
global $DB_USER;
@@ -96,8 +96,7 @@ function processMasterSchemaFile ( $sSchemaFile ) {
//convert newSchema to array
if (isset( $aUpgradeData['aNewSchema'] )) {
$aNewSchema = $aUpgradeData['aNewSchema'];
}
else {
} else {
$aNewSchema = schemaToArray( $sSchemaFile );
$aUpgradeData['aNewSchema'] = $aNewSchema;
}
@@ -157,8 +156,8 @@ function processMasterSchemaFile ( $sSchemaFile ) {
$oDataBase->close();
}
function processSchemaFile( ) {
function processSchemaFile ()
{
global $DB_ADAPTER;
global $DB_HOST;
global $DB_USER;
@@ -173,7 +172,7 @@ function processSchemaFile( ) {
if (! $oDataBase->isConnected()) {
$oDataBase->logQuery( 'Does not exist an available connection!' );
return NULL;
return null;
}
$oDataBase->iFetchType = MYSQL_NUM;
@@ -181,7 +180,7 @@ function processSchemaFile( ) {
} catch (Exception $e) {
$oDataBase->logQuery( $e->getmessage() );
return NULL;
return null;
}
//going thru all tables in current WF_ database
@@ -217,12 +216,14 @@ function processSchemaFile( ) {
$oDataBase->iFetchType = MYSQL_NUM; //this line is neccesary because the next fetch needs to be with MYSQL_NUM
}
//finally return the array with old schema obtained from the Database
if ( count($aOldSchema) == 0 ) $aOldSchema = null;
if (count( $aOldSchema ) == 0)
$aOldSchema = null;
return $aOldSchema;
}
//process the schema file in the patch file, and obtain an array
function schemaToArray($sSchemaFile) {
function schemaToArray ($sSchemaFile)
{
try {
$aSchema = array ();
$oXml = new DomDocument();
@@ -249,7 +250,8 @@ function schemaToArray($sSchemaFile) {
$aPrimaryKeys[] = $oColumn->getAttribute( 'name' );
}
if ( in_array ( $parameterName, array('Field','Type','Null','Default') ) ) {
if (in_array( $parameterName, array ('Field','Type','Null','Default'
) )) {
$aSchema[$sTableName][$sColumName][$parameterName] = $oParameter->getAttribute( 'value' );
}
}
@@ -269,13 +271,13 @@ function schemaToArray($sSchemaFile) {
}
}
return $aSchema;
}
catch (Exception $oError) {
} catch (Exception $oError) {
throw $oError;
}
}
function obtainChanges($aOldSchema, $aNewSchema) {
function obtainChanges ($aOldSchema, $aNewSchema)
{
//$aChanges = array('tablesToDelete' => array(), 'tablesToAdd' => array(), 'tablesToAlter' => array());
//Tables to delete, but this is disabled
//foreach ($aOldSchema as $sTableName => $aColumns) {
@@ -286,19 +288,21 @@ function obtainChanges($aOldSchema, $aNewSchema) {
// }
//}
$aChanges = array('tablesToAdd' => array(), 'tablesToAlter' => array(), 'tablesWithNewIndex' => array(), 'tablesToAlterIndex'=> array());
$aChanges = array ('tablesToAdd' => array (),'tablesToAlter' => array (),'tablesWithNewIndex' => array (),'tablesToAlterIndex' => array ()
);
//new tables to create and alter
foreach ($aNewSchema as $sTableName => $aColumns) {
if (! isset( $aOldSchema[$sTableName] )) {
$aChanges['tablesToAdd'][$sTableName] = $aColumns;
}
else {
} else {
//drop old columns
foreach ($aOldSchema[$sTableName] as $sColumName => $aParameters) {
if (! isset( $aNewSchema[$sTableName][$sColumName] )) {
if (! isset( $aChanges['tablesToAlter'][$sTableName] )) {
$aChanges['tablesToAlter'][$sTableName] = array('DROP' => array(), 'ADD' => array(), 'CHANGE' => array());
$aChanges['tablesToAlter'][$sTableName] = array ('DROP' => array (),'ADD' => array (),'CHANGE' => array ()
);
}
$aChanges['tablesToAlter'][$sTableName]['DROP'][$sColumName] = $sColumName;
}
@@ -310,18 +314,21 @@ function obtainChanges($aOldSchema, $aNewSchema) {
if ($sColumName != 'INDEXES') {
if (! isset( $aOldSchema[$sTableName][$sColumName] )) { //this column doesnt exist in oldschema
if (! isset( $aChanges['tablesToAlter'][$sTableName] )) {
$aChanges['tablesToAlter'][$sTableName] = array('DROP' => array(), 'ADD' => array(), 'CHANGE' => array());
$aChanges['tablesToAlter'][$sTableName] = array ('DROP' => array (),'ADD' => array (),'CHANGE' => array ()
);
}
$aChanges['tablesToAlter'][$sTableName]['ADD'][$sColumName] = $aParameters;
}
else { //the column exists
} else { //the column exists
$newField = $aNewSchema[$sTableName][$sColumName];
$oldField = $aOldSchema[$sTableName][$sColumName];
//both are null, no change is required
if ( !isset($newField['Default']) && !isset($oldField['Default'])) $changeDefaultAttr = false;
if (! isset( $newField['Default'] ) && ! isset( $oldField['Default'] ))
$changeDefaultAttr = false;
//one of them is null, change IS required
if ( !isset($newField['Default']) && isset($oldField['Default']) && $oldField['Default']!= '') $changeDefaultAttr = true;
if ( isset($newField['Default']) && !isset($oldField['Default'])) $changeDefaultAttr = true;
if (! isset( $newField['Default'] ) && isset( $oldField['Default'] ) && $oldField['Default'] != '')
$changeDefaultAttr = true;
if (isset( $newField['Default'] ) && ! isset( $oldField['Default'] ))
$changeDefaultAttr = true;
//both are defined and they are different.
if (isset( $newField['Default'] ) && isset( $oldField['Default'] )) {
if ($newField['Default'] != $oldField['Default'])
@@ -331,11 +338,13 @@ function obtainChanges($aOldSchema, $aNewSchema) {
}
//special cases
// BLOB and TEXT columns cannot have DEFAULT values. http://dev.mysql.com/doc/refman/5.0/en/blob.html
if ( in_array(strtolower($newField['Type']), array('text','mediumtext') ) )
if (in_array( strtolower( $newField['Type'] ), array ('text','mediumtext'
) ))
$changeDefaultAttr = false;
//#1067 - Invalid default value for datetime field
if ( in_array($newField['Type'], array('datetime')) && isset($newField['Default']) && $newField['Default']== '' )
if (in_array( $newField['Type'], array ('datetime'
) ) && isset( $newField['Default'] ) && $newField['Default'] == '')
$changeDefaultAttr = false;
//#1067 - Invalid default value for int field
@@ -343,12 +352,10 @@ function obtainChanges($aOldSchema, $aNewSchema) {
$changeDefaultAttr = false;
//if any difference exists, then insert the difference in aChanges
if ( $newField['Field'] != $oldField['Field'] ||
$newField['Type'] != $oldField['Type'] ||
$newField['Null'] != $oldField['Null'] ||
$changeDefaultAttr ) {
if ($newField['Field'] != $oldField['Field'] || $newField['Type'] != $oldField['Type'] || $newField['Null'] != $oldField['Null'] || $changeDefaultAttr) {
if (! isset( $aChanges['tablesToAlter'][$sTableName] )) {
$aChanges['tablesToAlter'][$sTableName] = array('DROP' => array(), 'ADD' => array(), 'CHANGE' => array());
$aChanges['tablesToAlter'][$sTableName] = array ('DROP' => array (),'ADD' => array (),'CHANGE' => array ()
);
}
$aChanges['tablesToAlter'][$sTableName]['CHANGE'][$sColumName]['Field'] = $newField['Field'];
$aChanges['tablesToAlter'][$sTableName]['CHANGE'][$sColumName]['Type'] = $newField['Type'];
@@ -363,6 +370,7 @@ function obtainChanges($aOldSchema, $aNewSchema) {
} //only columns, no the indexes column
} //foreach $aColumns
//now check the indexes of table
if (isset( $aNewSchema[$sTableName]['INDEXES'] )) {
foreach ($aNewSchema[$sTableName]['INDEXES'] as $indexName => $indexFields) {
@@ -371,8 +379,7 @@ function obtainChanges($aOldSchema, $aNewSchema) {
$aChanges['tablesWithNewIndex'][$sTableName] = array ();
}
$aChanges['tablesWithNewIndex'][$sTableName][$indexName] = $indexFields;
}
else {
} else {
if ($aOldSchema[$sTableName]['INDEXES'][$indexName] != $indexFields) {
if (! isset( $aChanges['tablesToAlterIndex'][$sTableName] )) {
$aChanges['tablesToAlterIndex'][$sTableName] = array ();

View File

@@ -20,7 +20,6 @@
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/
global $RBAC;
@@ -28,7 +27,7 @@
if ($RBAC->userCanAccess( 'PM_SETUP' ) != 1 && $RBAC->userCanAccess( 'PM_SETUP_ADVANCE' ) != 1) {
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
die;
die();
}
//calculating the max upload file size;
@@ -42,7 +41,8 @@
$mul = ($mul == 'M' ? 1048576 : ($mul == 'K' ? 1024 : ($mul == 'G' ? 1073741824 : 1)));
$uploadMaxSize = (int) $UPLOAD_MAX_SIZE * $mul;
if ( $postMaxSize < $uploadMaxSize ) $uploadMaxSize = $postMaxSize;
if ($postMaxSize < $uploadMaxSize)
$uploadMaxSize = $postMaxSize;
$Fields['MAX_FILE_SIZE'] = $uploadMaxSize . " (" . $UPLOAD_MAX_SIZE . ") ";
$G_MAIN_MENU = 'processmaker';
@@ -50,7 +50,7 @@
$G_ID_MENU_SELECTED = 'SETUP';
$G_ID_SUB_MENU_SELECTED = 'LOGO';
$G_PUBLISH = new Publisher;
$G_PUBLISH = new Publisher();
$oHeadPublisher = & headPublisher::getSingleton();
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'setup/uplogo', '', $Fields );
@@ -100,3 +100,4 @@
window.location = 'uplogo';
}
</script>

View File

@@ -20,13 +20,12 @@
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/
if ($RBAC->userCanAccess( 'PM_SETUP' ) != 1 && $RBAC->userCanAccess( 'PM_FACTORY' ) != 1) {
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
//G::header('location: ../login/login');
die;
die();
}
$G_MAIN_MENU = 'processmaker';
@@ -34,14 +33,13 @@ if($RBAC->userCanAccess('PM_SETUP') != 1 && $RBAC->userCanAccess('PM_FACTORY') !
$G_ID_MENU_SELECTED = 'SETUP';
//$G_ID_SUB_MENU_SELECTED = 'WEBSERVICES';
if (! extension_loaded( 'soap' )) {
$G_PUBLISH = new Publisher;
$G_PUBLISH = new Publisher();
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'setup/wsMessage' );
G::RenderPage( "publish" );
}
else
{
$G_PUBLISH = new Publisher;
} else {
$G_PUBLISH = new Publisher();
$G_PUBLISH->AddContent( 'view', 'setup/webServicesTree' );
$G_PUBLISH->AddContent( 'smarty', 'groups/groups_usersList', '', '', array () );
@@ -51,7 +49,6 @@ if($RBAC->userCanAccess('PM_SETUP') != 1 && $RBAC->userCanAccess('PM_FACTORY') !
$link_Edit = G::encryptlink( 'webServicesSetup' );
$link_List = G::encryptlink( 'webServicesList' );
?>
<script>
document.body.style.backgroundColor="#fff";

View File

@@ -20,15 +20,15 @@
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/
ini_set( "soap.wsdl_cache_enabled", "0" ); // enabling WSDL cache
G::LoadClass( 'ArrayPeer' );
if ($RBAC->userCanAccess( 'PM_SETUP' ) != 1 && $RBAC->userCanAccess( 'PM_FACTORY' ) != 1) {
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
//G::header('location: ../login/login');
die;
die();
}
G::LoadInclude( 'ajax' );
@@ -53,7 +53,6 @@ switch ($_POST ['action']) {
G::RenderPage( 'publish', 'raw' );
}
break;
case 'showDetails':
G::LoadClass( 'groups' );
@@ -77,9 +76,12 @@ switch ($_POST ['action']) {
$aFields['WS_WORKSPACE'] = substr( $aAux[1], 3 );
}
$rows [] = array ('uid' => 'char', 'name' => 'char', 'age' => 'integer', 'balance' => 'float' );
$rows [] = array ('uid' => 'http', 'name' => 'http' );
$rows [] = array ('uid' => 'https', 'name' => 'https' );
$rows[] = array ('uid' => 'char','name' => 'char','age' => 'integer','balance' => 'float'
);
$rows[] = array ('uid' => 'http','name' => 'http'
);
$rows[] = array ('uid' => 'https','name' => 'https'
);
global $_DBArray;
$_DBArray = (isset( $_SESSION['_DBArray'] ) ? $_SESSION['_DBArray'] : '');
@@ -112,7 +114,6 @@ switch ($_POST ['action']) {
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'setup/webServicesDetails', '', $aFields, 'webServicesSetupSave' );
G::RenderPage( "publish", "raw" );
break;
case 'showUploadFilesForm':
global $G_PUBLISH;
@@ -129,7 +130,8 @@ switch ($_POST ['action']) {
G::RenderPage( 'publish', 'blank' );
}
break;
}try {
}
try {
global $G_PUBLISH;
if (isset( $_POST['form']['ACTION'] )) {
$frm = $_POST['form'];
@@ -165,8 +167,10 @@ switch ($_POST ['action']) {
case "Login":
$user = $frm["USER_ID"];
$pass = $frm["PASSWORD"];
$params = array ('userid' => $user, 'password' => $pass );
$result = $client->__SoapCall ( 'login', array ($params ) );
$params = array ('userid' => $user,'password' => $pass
);
$result = $client->__SoapCall( 'login', array ($params
) );
$_SESSION['WS_SESSION_ID'] = '';
if ($result->status_code == 0) {
$_SESSION['WS_SESSION_ID'] = $result->message;
@@ -181,13 +185,16 @@ switch ($_POST ['action']) {
break;
case "ProcessList":
$sessionId = $frm["SESSION_ID"];
$params = array ('sessionId' => $sessionId );
$params = array ('sessionId' => $sessionId
);
$wsResponse = $client->__SoapCall ( 'ProcessList', array ($params ) );
$wsResponse = $client->__SoapCall( 'ProcessList', array ($params
) );
$result = G::PMWSCompositeResponse( $wsResponse, 'processes' );
$G_PUBLISH = new Publisher();
$rows [] = array ('guid' => 'char', 'name' => 'char' );
$rows[] = array ('guid' => 'char','name' => 'char'
);
if (is_array( $result )) {
foreach ($result as $key => $item) {
@@ -212,7 +219,8 @@ switch ($_POST ['action']) {
$name = $item->name;
}
$rows [] = array ('guid' => $guid, 'name' => $name );
$rows[] = array ('guid' => $guid,'name' => $name
);
}
global $_DBArray;
$_DBArray = (isset( $_SESSION['_DBArray'] ) ? $_SESSION['_DBArray'] : '');
@@ -235,13 +243,16 @@ switch ($_POST ['action']) {
break;
case "RoleList":
$sessionId = $frm["SESSION_ID"];
$params = array ('sessionId' => $sessionId );
$wsResponse = $client->__SoapCall ( 'RoleList', array ($params ) );
$params = array ('sessionId' => $sessionId
);
$wsResponse = $client->__SoapCall( 'RoleList', array ($params
) );
$result = G::PMWSCompositeResponse( $wsResponse, 'roles' );
$G_PUBLISH = new Publisher();
$rows [] = array ('guid' => 'char', 'name' => 'char');
$rows[] = array ('guid' => 'char','name' => 'char'
);
if (is_array( $result )) {
foreach ($result as $key => $item) {
@@ -266,7 +277,8 @@ switch ($_POST ['action']) {
$name = $item->name;
}
$rows [] = array ('guid' => $guid, 'name' => $name );
$rows[] = array ('guid' => $guid,'name' => $name
);
}
global $_DBArray;
$_DBArray = (isset( $_SESSION['_DBArray'] ) ? $_SESSION['_DBArray'] : '');
@@ -288,15 +300,17 @@ switch ($_POST ['action']) {
G::RenderPage( 'publish', 'raw' );
break;
case "GroupList":
$sessionId = $frm["SESSION_ID"];
$params = array ('sessionId' => $sessionId );
$wsResponse = $client->__SoapCall ( 'GroupList', array ($params ) );
$params = array ('sessionId' => $sessionId
);
$wsResponse = $client->__SoapCall( 'GroupList', array ($params
) );
$result = G::PMWSCompositeResponse( $wsResponse, 'groups' );
$G_PUBLISH = new Publisher();
$rows [] = array ('guid' => 'char', 'name' => 'char' );
$rows[] = array ('guid' => 'char','name' => 'char'
);
if (is_array( $result )) {
foreach ($result as $key => $item) {
if (isset( $item->item ))
@@ -320,7 +334,8 @@ switch ($_POST ['action']) {
$name = $item->name;
}
$rows [] = array ('guid' => $guid, 'name' => $name );
$rows[] = array ('guid' => $guid,'name' => $name
);
}
global $_DBArray;
$_DBArray = (isset( $_SESSION['_DBArray'] ) ? $_SESSION['_DBArray'] : '');
@@ -342,14 +357,16 @@ switch ($_POST ['action']) {
G::RenderPage( 'publish', 'raw' );
break;
case "CaseList":
$sessionId = $frm["SESSION_ID"];
$params = array ('sessionId' => $sessionId );
$wsResponse = $client->__SoapCall ( 'CaseList', array ($params ) );
$params = array ('sessionId' => $sessionId
);
$wsResponse = $client->__SoapCall( 'CaseList', array ($params
) );
$G_PUBLISH = new Publisher();
$rows [] = array ('guid' => 'char', 'name' => 'char', 'status' => 'char', 'delIndex' => 'char' );
$rows[] = array ('guid' => 'char','name' => 'char','status' => 'char','delIndex' => 'char'
);
$result = G::PMWSCompositeResponse( $wsResponse, 'cases' );
@@ -388,7 +405,8 @@ switch ($_POST ['action']) {
$delIndex = $item->delIndex;
}
$rows [] = array ('guid' => $guid, 'name' => $name, 'status' => $status, 'delIndex' => $delIndex );
$rows[] = array ('guid' => $guid,'name' => $name,'status' => $status,'delIndex' => $delIndex
);
}
@@ -413,17 +431,17 @@ switch ($_POST ['action']) {
G::RenderPage( 'publish', 'raw' );
break;
case "UnassignedCaseList":
$sessionId = $frm["SESSION_ID"];
$params = array ('sessionId' => $sessionId );
$params = array ('sessionId' => $sessionId
);
$wsResponse = $client->__SoapCall ( 'UnassignedCaseList', array ($params ));
$wsResponse = $client->__SoapCall( 'UnassignedCaseList', array ($params
) );
$G_PUBLISH = new Publisher();
$rows [] = array ('guid' => 'char', 'name' => 'char', 'delIndex' => 'char' );
$rows[] = array ('guid' => 'char','name' => 'char','delIndex' => 'char'
);
$result = G::PMWSCompositeResponse( $wsResponse, 'cases' );
if (is_array( $result )) {
@@ -454,7 +472,8 @@ switch ($_POST ['action']) {
if (isset( $item->delIndex ))
$delIndex = $item->delIndex;
}
$rows [] = array ('guid' => $guid, 'name' => $name, 'delIndex' => $delIndex );
$rows[] = array ('guid' => $guid,'name' => $name,'delIndex' => $delIndex
);
}
global $_DBArray;
@@ -467,8 +486,7 @@ switch ($_POST ['action']) {
$c->setDBArrayTable( 'case' );
$G_PUBLISH->AddContent( 'propeltable', 'paged-table', 'setup/wsrUnassignedCaseList', $c );
}
else if( is_object($result) ){
} else if (is_object( $result )) {
$_SESSION['WS_SESSION_ID'] = '';
$fields['status_code'] = $result->status_code;
$fields['message'] = $result->message;
@@ -478,15 +496,17 @@ switch ($_POST ['action']) {
G::RenderPage( 'publish', 'raw' );
break;
case "UserList":
$sessionId = $frm["SESSION_ID"];
$params = array ('sessionId' => $sessionId );
$wsResponse = $client->__SoapCall ( 'UserList', array ($params ) );
$params = array ('sessionId' => $sessionId
);
$wsResponse = $client->__SoapCall( 'UserList', array ($params
) );
$result = G::PMWSCompositeResponse( $wsResponse, 'users' );
$G_PUBLISH = new Publisher();
$rows [] = array ('guid' => 'char', 'name' => 'char' );
$rows[] = array ('guid' => 'char','name' => 'char'
);
if (is_array( $result )) {
foreach ($result as $key => $item) {
@@ -511,10 +531,10 @@ switch ($_POST ['action']) {
$name = $item->name;
}
$rows [] = array ('guid' => $guid, 'name' => $name );
$rows[] = array ('guid' => $guid,'name' => $name
);
}
global $_DBArray;
$_DBArray = (isset( $_SESSION['_DBArray'] ) ? $_SESSION['_DBArray'] : '');
$_DBArray['user'] = $rows;
@@ -535,7 +555,6 @@ switch ($_POST ['action']) {
}
G::RenderPage( 'publish', 'raw' );
break;
case "SendMessage":
require_once ('classes/model/Application.php');
$sessionId = $frm["SESSION_ID"];
@@ -558,15 +577,10 @@ switch ($_POST ['action']) {
$messageBody = "message for case: " . $caseNumber . "<br>" . $message;
file_put_contents( $templateFile, $messageBody );
$params = array ( 'sessionId' => $sessionId,
'caseId' => $caseId,
'from' => $from,
'to' => $to,
'cc' => $cc,
'bcc' => $bcc,
'subject' => $subject,
'template' => 'tempTemplate.hml' );
$result = $client->__SoapCall ( 'sendMessage', array ($params ) );
$params = array ('sessionId' => $sessionId,'caseId' => $caseId,'from' => $from,'to' => $to,'cc' => $cc,'bcc' => $bcc,'subject' => $subject,'template' => 'tempTemplate.hml'
);
$result = $client->__SoapCall( 'sendMessage', array ($params
) );
$G_PUBLISH = new Publisher();
$fields['status_code'] = $result->status_code;
$fields['message'] = $result->message;
@@ -579,7 +593,6 @@ switch ($_POST ['action']) {
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'setup/wsShowResult', null, $fields );
G::RenderPage( 'publish', 'raw' );
break;
case "SendVariables":
$sessionId = $frm["SESSION_ID"];
$caseId = $frm["CASE_ID"];
@@ -594,8 +607,10 @@ switch ($_POST ['action']) {
$o->value = $frm["VALUE2"];
array_push( $variables, $o );
$params = array ('sessionId' => $sessionId, 'caseId' => $caseId, 'variables' => $variables );
$result = $client->__SoapCall ( 'SendVariables', array ($params ) );
$params = array ('sessionId' => $sessionId,'caseId' => $caseId,'variables' => $variables
);
$result = $client->__SoapCall( 'SendVariables', array ($params
) );
$G_PUBLISH = new Publisher();
$fields['status_code'] = $result->status_code;
$fields['message'] = $result->message;
@@ -608,14 +623,15 @@ switch ($_POST ['action']) {
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'setup/wsShowResult', null, $fields );
G::RenderPage( 'publish', 'raw' );
break;
case "DerivateCase":
$sessionId = $frm["SESSION_ID"];
$caseId = $frm["CASE_ID"];
$delIndex = $frm["DEL_INDEX"];
$params = array ('sessionId' => $sessionId, 'caseId' => $caseId, 'delIndex' => $delIndex );
$result = $client->__SoapCall ( 'RouteCase', array ($params ) );
$params = array ('sessionId' => $sessionId,'caseId' => $caseId,'delIndex' => $delIndex
);
$result = $client->__SoapCall( 'RouteCase', array ($params
) );
$G_PUBLISH = new Publisher();
$fields['status_code'] = $result->status_code;
$fields['message'] = $result->message;
@@ -628,7 +644,6 @@ switch ($_POST ['action']) {
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'setup/wsShowResult', null, $fields );
G::RenderPage( 'publish', 'raw' );
break;
case "ReassignCase":
$sessionId = $frm["SESSION_ID"];
$caseId = $frm["CASE_ID"];
@@ -636,8 +651,10 @@ switch ($_POST ['action']) {
$userIdSource = $frm['USERIDSOURCE'];
$userIdTarget = $frm['USERIDTARGET'];
$params = array ('sessionId' => $sessionId, 'caseId' => $caseId, 'delIndex' => $delIndex, 'userIdSource' => $userIdSource, 'userIdTarget' => $userIdTarget );
$result = $client->__SoapCall ( 'reassignCase', array ($params ) );
$params = array ('sessionId' => $sessionId,'caseId' => $caseId,'delIndex' => $delIndex,'userIdSource' => $userIdSource,'userIdTarget' => $userIdTarget
);
$result = $client->__SoapCall( 'reassignCase', array ($params
) );
$G_PUBLISH = new Publisher();
$fields['status_code'] = $result->status_code;
@@ -650,9 +667,7 @@ switch ($_POST ['action']) {
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'setup/wsShowResult', null, $fields );
G::RenderPage( 'publish', 'raw' );
break;
case "NewCaseImpersonate":
$sessionId = $frm["SESSION_ID"];
$processId = $frm["PROCESS_ID"];
@@ -664,8 +679,10 @@ switch ($_POST ['action']) {
$o->value = $aRow['VALUE'];
array_push( $variables, $o );
}
$params = array ('sessionId' => $sessionId, 'processId' => $processId, 'userId' => $userId, 'variables' => $variables );
$result = $client->__SoapCall ( 'NewCaseImpersonate', array ($params ) );
$params = array ('sessionId' => $sessionId,'processId' => $processId,'userId' => $userId,'variables' => $variables
);
$result = $client->__SoapCall( 'NewCaseImpersonate', array ($params
) );
$G_PUBLISH = new Publisher();
$fields['status_code'] = $result->status_code;
$fields['message'] = $result->message;
@@ -678,7 +695,6 @@ switch ($_POST ['action']) {
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'setup/wsShowResult', null, $fields );
G::RenderPage( 'publish', 'raw' );
break;
case "NewCase":
$sessionId = $frm["SESSION_ID"];
$processId = $frm["PROCESS_ID"];
@@ -691,8 +707,10 @@ switch ($_POST ['action']) {
$o->value = $aRow['VALUE'];
array_push( $variables, $o );
}
$params = array ('sessionId' => $sessionId, 'processId' => $processId, 'taskId' => $taskId, 'variables' => $variables );
$result = $client->__SoapCall ( 'NewCase', array ($params ) );
$params = array ('sessionId' => $sessionId,'processId' => $processId,'taskId' => $taskId,'variables' => $variables
);
$result = $client->__SoapCall( 'NewCase', array ($params
) );
$G_PUBLISH = new Publisher();
@@ -710,13 +728,14 @@ switch ($_POST ['action']) {
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'setup/wsShowResult', null, $fields );
G::RenderPage( 'publish', 'raw' );
break;
case "AssignUserToGroup":
$sessionId = $frm["SESSION_ID"];
$userId = $frm["USER_ID"];
$groupId = $frm["GROUP_ID"];
$params = array ('sessionId' => $sessionId, 'userId' => $userId, 'groupId' => $groupId );
$result = $client->__SoapCall ( 'AssignUserToGroup', array ($params ) );
$params = array ('sessionId' => $sessionId,'userId' => $userId,'groupId' => $groupId
);
$result = $client->__SoapCall( 'AssignUserToGroup', array ($params
) );
$G_PUBLISH = new Publisher();
$fields['status_code'] = $result->status_code;
$fields['message'] = $result->message;
@@ -729,7 +748,6 @@ switch ($_POST ['action']) {
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'setup/wsShowResult', null, $fields );
G::RenderPage( 'publish', 'raw' );
break;
case "CreateUser":
$sessionId = $frm["SESSION_ID"];
$userId = $frm["USER_ID"];
@@ -739,8 +757,10 @@ switch ($_POST ['action']) {
$role = $frm["ROLE"];
$password = $frm["PASSWORD"];
$params = array ('sessionId' => $sessionId, 'userId' => $userId, 'firstname' => $firstname, 'lastname' => $lastname, 'email' => $email, 'role' => $role, 'password' => $password );
$result = $client->__SoapCall ( 'CreateUser', array ($params ) );
$params = array ('sessionId' => $sessionId,'userId' => $userId,'firstname' => $firstname,'lastname' => $lastname,'email' => $email,'role' => $role,'password' => $password
);
$result = $client->__SoapCall( 'CreateUser', array ($params
) );
$G_PUBLISH = new Publisher();
$fields['status_code'] = $result->status_code;
$fields['message'] = $result->message;
@@ -753,15 +773,17 @@ switch ($_POST ['action']) {
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'setup/wsShowResult', null, $fields );
G::RenderPage( 'publish', 'raw' );
break;
case "TaskList":
$sessionId = $frm["SESSION_ID"];
$params = array ('sessionId' => $sessionId );
$wsResponse = $client->__SoapCall ( 'TaskList', array ($params ) );
$params = array ('sessionId' => $sessionId
);
$wsResponse = $client->__SoapCall( 'TaskList', array ($params
) );
$result = G::PMWSCompositeResponse( $wsResponse, 'tasks' );
$G_PUBLISH = new Publisher();
$rows [] = array ('guid' => 'char', 'name' => 'char' );
$rows[] = array ('guid' => 'char','name' => 'char'
);
if (is_array( $result )) {
@@ -787,7 +809,8 @@ switch ($_POST ['action']) {
$name = $item->name;
}
$rows [] = array ('guid' => $guid, 'name' => $name );
$rows[] = array ('guid' => $guid,'name' => $name
);
}
global $_DBArray;
$_DBArray = (isset( $_SESSION['_DBArray'] ) ? $_SESSION['_DBArray'] : '');
@@ -808,16 +831,18 @@ switch ($_POST ['action']) {
}
G::RenderPage( 'publish', 'raw' );
break;
case "TriggerList":
$sessionId = $frm["SESSION_ID"];
$params = array ('sessionId' => $sessionId );
$params = array ('sessionId' => $sessionId
);
$wsResponse = $client->__SoapCall ( 'triggerList', array ($params ) );
$wsResponse = $client->__SoapCall( 'triggerList', array ($params
) );
$result = G::PMWSCompositeResponse( $wsResponse, 'triggers' );
$G_PUBLISH = new Publisher();
$rows [] = array ('guid' => 'char', 'name' => 'char', 'processId' => 'char' );
$rows[] = array ('guid' => 'char','name' => 'char','processId' => 'char'
);
if (is_array( $result )) {
foreach ($result as $key => $item) {
@@ -847,7 +872,8 @@ switch ($_POST ['action']) {
if (isset( $item->processId ))
$processId = $item->processId;
}
$rows [] = array ('guid' => $guid, 'name' => $name, 'processId' => $processId );
$rows[] = array ('guid' => $guid,'name' => $name,'processId' => $processId
);
}
global $_DBArray;
@@ -882,19 +908,21 @@ switch ($_POST ['action']) {
G::RenderPage( 'publish', 'raw' );
break;
case "InputDocumentList":
$caseId = $frm["CASE_ID"];
$sessionId = $frm["SESSION_ID"];
$params = array ('sessionId' => $sessionId, 'caseId' => $caseId );
$params = array ('sessionId' => $sessionId,'caseId' => $caseId
);
$wsResponse = $client->__SoapCall ( 'InputDocumentList', array ($params ) );
$wsResponse = $client->__SoapCall( 'InputDocumentList', array ($params
) );
//g::pr($wsResponse);
$result = G::PMWSCompositeResponse( $wsResponse, 'documents' );
$G_PUBLISH = new Publisher();
$rows [] = array ('guid' => 'char', 'name' => 'char', 'processId' => 'char' );
$rows[] = array ('guid' => 'char','name' => 'char','processId' => 'char'
);
if (is_array( $result )) {
foreach ($result as $key => $item) {
@@ -954,23 +982,26 @@ switch ($_POST ['action']) {
if (isset( $item->link ))
$link = $item->link;
}
$rows [] = array ('guid' => $guid, 'filename' => $filename, 'docId' => $docId, 'version' => $version,
'createDate' => $createDate, 'createBy' => $createBy, 'type' => $type, 'link' => $link );
$rows[] = array ('guid' => $guid,'filename' => $filename,'docId' => $docId,'version' => $version,'createDate' => $createDate,'createBy' => $createBy,'type' => $type,'link' => $link
);
}
global $_DBArray;
$_DBArray = (isset( $_SESSION['_DBArray'] ) ? $_SESSION['_DBArray'] : '');
$_DBArray['inputDocument'] = $rows;
$documentArray = array ();
$documentArray[] = array ('guid' => 'char', 'filename' => 'char' );
$documentArray[] = array ('guid' => 'char','filename' => 'char'
);
if (isset( $_DBArray['inputDocument'] ))
foreach ($_DBArray['inputDocument'] as $key => $val)
if ($key != 0 && isset( $val['filename'] ))
$documentArray[] = array ('guid' => $val['guid'], 'filename' => $val['filename'] );
$documentArray[] = array ('guid' => $val['guid'],'filename' => $val['filename']
);
if (isset( $_DBArray['outputDocument'] ))
foreach ($_DBArray['outputDocument'] as $key => $val)
if ($key != 0 && isset( $val['filename'] ))
$documentArray[] = array ('guid' => $val['guid'], 'filename' => $val['filename'] );
$documentArray[] = array ('guid' => $val['guid'],'filename' => $val['filename']
);
$_DBArray['documents'] = $documentArray;
$_DBArray['WS_TMP_CASE_UID'] = $frm["CASE_ID"];
$_SESSION['_DBArray'] = $_DBArray;
@@ -989,19 +1020,20 @@ switch ($_POST ['action']) {
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'setup/wsShowResult', null, $fields );
}
G::RenderPage( 'publish', 'raw' );
break;
case "InputDocumentProcessList":
$processId = $frm["PROCESS_ID"];
$sessionId = $frm["SESSION_ID"];
$params = array ('sessionId' => $sessionId, 'processId' => $processId );
$params = array ('sessionId' => $sessionId,'processId' => $processId
);
$wsResponse = $client->__SoapCall ( 'InputDocumentProcessList', array ($params ) );
$wsResponse = $client->__SoapCall( 'InputDocumentProcessList', array ($params
) );
$result = G::PMWSCompositeResponse( $wsResponse, 'documents' );
$G_PUBLISH = new Publisher();
$rows [] = array ('guid' => 'char', 'name' => 'char', 'description' => 'char' );
$rows[] = array ('guid' => 'char','name' => 'char','description' => 'char'
);
if (is_array( $result )) {
foreach ($result as $key => $item) {
if (isset( $item->item ))
@@ -1030,7 +1062,8 @@ switch ($_POST ['action']) {
if (isset( $item->description ))
$description = $item->description;
}
$rows [] = array ('guid' => $guid, 'name' => $name, 'description' => $description );
$rows[] = array ('guid' => $guid,'name' => $name,'description' => $description
);
}
global $_DBArray;
$_DBArray = (isset( $_SESSION['_DBArray'] ) ? $_SESSION['_DBArray'] : '');
@@ -1051,19 +1084,20 @@ switch ($_POST ['action']) {
}
G::RenderPage( 'publish', 'raw' );
break;
case "OutputDocumentList":
$caseId = $frm["CASE_ID"];
$sessionId = $frm["SESSION_ID"];
$params = array ('sessionId' => $sessionId, 'caseId' => $caseId );
$params = array ('sessionId' => $sessionId,'caseId' => $caseId
);
$wsResponse = $client->__SoapCall ( 'outputDocumentList', array ($params ) );
$wsResponse = $client->__SoapCall( 'outputDocumentList', array ($params
) );
$result = G::PMWSCompositeResponse( $wsResponse, 'documents' );
$G_PUBLISH = new Publisher();
$rows = array ();
$rows [] = array ('guid' => 'char', 'name' => 'char' );
$rows[] = array ('guid' => 'char','name' => 'char'
);
if (is_array( $result )) {
foreach ($result as $key => $item) {
@@ -1123,22 +1157,25 @@ switch ($_POST ['action']) {
if (isset( $item->link ))
$link = $item->link;
}
$rows [] = array ('guid' => $guid, 'filename' => $filename, 'docId' => $docId, 'version' => $version,
'createDate' => $createDate, 'createBy' => $createBy, 'type' => $type, 'link' => $link );
$rows[] = array ('guid' => $guid,'filename' => $filename,'docId' => $docId,'version' => $version,'createDate' => $createDate,'createBy' => $createBy,'type' => $type,'link' => $link
);
}
global $_DBArray;
$_DBArray = (isset( $_SESSION['_DBArray'] ) ? $_SESSION['_DBArray'] : '');
$_DBArray['outputDocument'] = $rows;
$documentArray = array ();
$documentArray[] = array ('guid' => 'char', 'filename' => 'char' );
$documentArray[] = array ('guid' => 'char','filename' => 'char'
);
if (isset( $_DBArray['inputDocument'] ))
foreach ($_DBArray['inputDocument'] as $key => $val)
if ($key != 0 && isset( $val['filename'] ))
$documentArray[] = array ('guid' => $val['guid'], 'filename' => $val['filename'] );
$documentArray[] = array ('guid' => $val['guid'],'filename' => $val['filename']
);
if (isset( $_DBArray['outputDocument'] ))
foreach ($_DBArray['outputDocument'] as $key => $val)
if ($key != 0 && isset( $val['filename'] ))
$documentArray[] = array ('guid' => $val['guid'], 'filename' => $val['filename'] );
$documentArray[] = array ('guid' => $val['guid'],'filename' => $val['filename']
);
$_DBArray['documents'] = $documentArray;
$_SESSION['_DBArray'] = $_DBArray;
@@ -1162,8 +1199,10 @@ case "removeUserFromGroup" :
$sessionId = $frm["SESSION_ID"];
$userId = $frm["USER_ID"];
$groupId = $frm["GROUP_ID"];
$params = array ('sessionId' => $sessionId, 'userId' => $userId, 'groupId' => $groupId );
$result = $client->__SoapCall ( 'removeUserFromGroup', array ($params ) );
$params = array ('sessionId' => $sessionId,'userId' => $userId,'groupId' => $groupId
);
$result = $client->__SoapCall( 'removeUserFromGroup', array ($params
) );
$G_PUBLISH = new Publisher();
$fields['status_code'] = $result->status_code;
$fields['message'] = $result->message;
@@ -1179,8 +1218,10 @@ case "removeUserFromGroup" :
case "RemoveDocument":
$appDocUid = $frm["APP_DOC_UID"];
$sessionId = $frm["SESSION_ID"];
$params = array ('sessionId' => $sessionId, 'appDocUid' => $appDocUid );
$result = $client->__SoapCall ( 'RemoveDocument', array ($params ) );
$params = array ('sessionId' => $sessionId,'appDocUid' => $appDocUid
);
$result = $client->__SoapCall( 'RemoveDocument', array ($params
) );
$fields['status_code'] = $result->status_code;
$fields['message'] = $result->message;
$fields['time_stamp'] = $result->timestamp;
@@ -1193,43 +1234,54 @@ case "removeUserFromGroup" :
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'setup/wsShowResult', null, $fields );
G::RenderPage( 'publish', 'raw' );
break;
case "TaskCase":
$sessionId = $frm["SESSION_ID"];
$caseId = $frm["CASE_ID"];
$params = array ('sessionId' => $sessionId, 'caseId' => $caseId );
$wsResponse = $client->__SoapCall ( 'TaskCase', array ($params ) );
$params = array ('sessionId' => $sessionId,'caseId' => $caseId
);
$wsResponse = $client->__SoapCall( 'TaskCase', array ($params
) );
$result = G::PMWSCompositeResponse( $wsResponse, 'taskCases' );
$G_PUBLISH = new Publisher();
$rows [] = array ('guid' => 'char', 'name' => 'char' );
$rows[] = array ('guid' => 'char','name' => 'char'
);
if (is_array( $result )) {
foreach ($result as $key => $item) {
if (isset( $item->item ))
foreach ($item->item as $index => $val) {
if ($val->key == 'guid')
if ($val->key == 'guid') {
$guid = $val->value;
if ($val->key == 'name')
}
if ($val->key == 'name') {
$name = $val->value;
}
}
else if (is_array( $item ))
foreach ($item as $index => $val) {
if ($val->key == 'guid')
$guid = $val->value;
if ($val->key == 'name')
}
if ($val->key == 'name') {
$name = $val->value;
}
else {
if (isset ( $item->guid ))
}
else
{
if (isset( $item->guid )) {
$guid = $item->guid;
if (isset ( $item->name ))
}
if (isset( $item->name )) {
$name = $item->name;
}
}
$rows [] = array ('guid' => $guid, 'name' => $name );
$rows[] = array ('guid' => $guid,'name' => $name
);
}
global $_DBArray;
@@ -1242,7 +1294,9 @@ case "removeUserFromGroup" :
$c->setDBArrayTable( 'taskCases' );
$c->addAscendingOrderByColumn( 'name' );
$G_PUBLISH->AddContent( 'propeltable', 'paged-table', 'setup/wsrTaskCase', $c );
} else if ( is_object($result) ){
} else
if (is_object( $result )) {
$_SESSION['WS_SESSION_ID'] = '';
$fields['status_code'] = $result->status_code;
$fields['message'] = $result->message;
@@ -1252,8 +1306,9 @@ case "removeUserFromGroup" :
G::RenderPage( 'publish', 'raw' );
break;
case "wsSendFiles":
if (isset( $_FILES['form'] )) {
foreach ($_FILES['form']['name'] as $sFieldName => $vValue) {
if ($_FILES['form']['error'][$sFieldName] == 0) {
@@ -1268,7 +1323,6 @@ case "removeUserFromGroup" :
$_POST['form']['INPUT_DOCUMENT'] = '';
}
if (isset( $_SESSION['_DBArray']['inputDocument'] )) {
foreach ($_SESSION['_DBArray']['inputDocument'] as $inputDocument) {
if ($inputDocument['guid'] == $_POST['form']['INPUT_DOCUMENT']) {
@@ -1285,24 +1339,17 @@ case "removeUserFromGroup" :
$app_uid = $_SESSION['_DBArray']['WS_TMP_CASE_UID'];
$del_index = 1;
function sendFile($FILENAME, $USR_UID, $APP_UID, $DEL_INDEX = 1, $DOC_UID = NULL, $title = NULL, $comment = NULL) {
function sendFile ($FILENAME, $USR_UID, $APP_UID, $DEL_INDEX = 1, $DOC_UID = null, $title = null, $comment = null)
{
$defaultEndpoint = 'http://' . $_SERVER['SERVER_NAME'] . ':' . $_SERVER['SERVER_PORT'] . '/sys' . SYS_SYS . '/' . SYS_LANG . '/classic/services/upload';
$upload = isset( $_SESSION['END_POINT'] ) ? $_SESSION['END_POINT'] : $defaultEndpoint;
$DOC_UID = ($DOC_UID != NULL) ? $DOC_UID : - 1;
$DOC_UID = ($DOC_UID != null) ? $DOC_UID : - 1;
$APP_DOC_TYPE = ($DOC_UID == - 1) ? 'ATTACHED' : 'INPUT';
$title = ($title != NULL) ? $title : $FILENAME;
$comment = ($comment != NULL) ? $comment : '';
$title = ($title != null) ? $title : $FILENAME;
$comment = ($comment != null) ? $comment : '';
$params = array (
'ATTACH_FILE' => "@$FILENAME",
'APPLICATION' => $APP_UID,
'INDEX' => $DEL_INDEX,
'USR_UID' => $USR_UID,
'DOC_UID' => $DOC_UID,
'APP_DOC_TYPE' => $APP_DOC_TYPE,
'TITLE' => $title,
'COMMENT' => $comment
$params = array ('ATTACH_FILE' => "@$FILENAME",'APPLICATION' => $APP_UID,'INDEX' => $DEL_INDEX,'USR_UID' => $USR_UID,'DOC_UID' => $DOC_UID,'APP_DOC_TYPE' => $APP_DOC_TYPE,'TITLE' => $title,'COMMENT' => $comment
);
$ch = curl_init();
@@ -1331,12 +1378,15 @@ case "removeUserFromGroup" :
die();
break;
default:
print_r( $_POST );
}
}
global $_DBArray;
global $_DBArray;
} catch (Exception $e) {
$G_PUBLISH = new Publisher();
$aMessage['MESSAGE'] = $e->getMessage();

View File

@@ -20,17 +20,17 @@
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/
if ($RBAC->userCanAccess( 'PM_SETUP' ) != 1 && $RBAC->userCanAccess( 'PM_FACTORY' ) != 1) {
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
//G::header('location: ../login/login');
die;
die();
}
//G::genericForceLogin( 'WF_MYINFO' , 'login/noViewPage', $urlLogin = 'login/login' );
$G_PUBLISH = new Publisher;
$G_PUBLISH = new Publisher();
$G_PUBLISH->AddContent( 'view', 'setup/webServicesTree' );
G::RenderPage( "publish-raw", "raw" );
?>

View File

@@ -20,9 +20,9 @@
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/
if (($RBAC_Response=$RBAC->userCanAccess("PM_FACTORY"))!=1) return $RBAC_Response;
if (($RBAC_Response = $RBAC->userCanAccess( "PM_FACTORY" )) != 1)
return $RBAC_Response;
G::LoadClass( 'groups' );
@@ -32,12 +32,10 @@ if (($RBAC_Response=$RBAC->userCanAccess("PM_FACTORY"))!=1) return $RBAC_Respons
if (! isset( $_SESSION['END_POINT'] )) {
$aFields['WS_HOST'] = $_SERVER['HTTP_HOST'];
$aFields['WS_WORKSPACE'] = SYS_SYS;
}
else {
} else {
if (strpos( $_SESSION['END_POINT'], 'https' ) !== false) {
preg_match( '@^(?:https://)?([^/]+)@i', $_SESSION['END_POINT'], $coincidencias );
}
else {
} else {
preg_match( '@^(?:http://)?([^/]+)@i', $_SESSION['END_POINT'], $coincidencias );
}
$aAux = explode( ':', $coincidencias[1] );
@@ -48,9 +46,12 @@ if (($RBAC_Response=$RBAC->userCanAccess("PM_FACTORY"))!=1) return $RBAC_Respons
$aFields['WS_WORKSPACE'] = substr( $aAux[1], 3 );
}
$rows[] = array ( 'uid' => 'char', 'name' => 'char', 'age' => 'integer', 'balance' => 'float' );
$rows[] = array ( 'uid' => 'http', 'name' => 'http' );
$rows[] = array ( 'uid' => 'https', 'name' => 'https' );
$rows[] = array ('uid' => 'char','name' => 'char','age' => 'integer','balance' => 'float'
);
$rows[] = array ('uid' => 'http','name' => 'http'
);
$rows[] = array ('uid' => 'https','name' => 'https'
);
$_DBArray['protocol'] = $rows;
$_SESSION['_DBArray'] = $_DBArray;
@@ -60,4 +61,3 @@ $_SESSION['_DBArray'] = $_DBArray;
G::RenderPage( "publish", "raw" );
?>

View File

@@ -1,22 +1,16 @@
<?php
unset( $_SESSION['WS_SESSION_ID'] );
if($_POST['form']['WS_PROTOCOL']!='' && $_POST['form']['WS_WORKSPACE']!='')
{
if($_POST['form']['WS_PORT']!='')
{
if ($_POST['form']['WS_PROTOCOL'] != '' && $_POST['form']['WS_WORKSPACE'] != '') {
if ($_POST['form']['WS_PORT'] != '') {
$_SESSION['END_POINT'] = $_POST['form']['WS_PROTOCOL'] . '://' . $_POST['form']['WS_HOST'] . ':' . $_POST['form']['WS_PORT'] . '/sys' . $_POST['form']['WS_WORKSPACE'] . '/en/classic/services/wsdl2';
G::header( 'location: webServices?x=1' );
}
else
{ $_SESSION['END_POINT']=$_POST['form']['WS_PROTOCOL'].'://' .$_POST['form']['WS_HOST'] .'/sys' .$_POST['form']['WS_WORKSPACE'].'/en/classic/services/wsdl2';
} else {
$_SESSION['END_POINT'] = $_POST['form']['WS_PROTOCOL'] . '://' . $_POST['form']['WS_HOST'] . '/sys' . $_POST['form']['WS_WORKSPACE'] . '/en/classic/services/wsdl2';
G::header( 'location: webServices?x=1' );
}
$_SESSION['WS_WORKSPACE'] = $_POST['form']['WS_WORKSPACE'];
}
else
{
} else {
G::header( 'location: webServices?x=0' );
}
?>

View File

@@ -20,31 +20,34 @@
*
* 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;
if (($RBAC_Response = $RBAC->userCanAccess( "PM_SETUP" )) != 1)
return $RBAC_Response;
G::LoadInclude( 'ajax' );
$G_ENABLE_BLANK_SKIN = true;
$ARR_WEEKDAYS[0] = array('SUNDAY', 'MONDAY', 'TUESDAY', 'WEDNESDAY', 'THURSDAY', 'FRIDAY', 'SATURDAY');
$ARR_WEEKDAYS['es'] = array("Domingo?", "Lunes?", "Martes?", "Miércoles?", "Jueves?", "Viernes?", "Sábado?");
$ARR_WEEKDAYS['en'] = array("Sunday?", "Monday?", "Tuesday?", "Wednesday?", "Thursday?", "Friday?", "Saturday?");
$ARR_WEEKDAYS['fa'] = array('یکشنبه','دوشنبه','سه شنبه','چهارشنبه','پنجشنبه ','جمعه','آدینه');
$ARR_WEEKDAYS[0] = array ('SUNDAY','MONDAY','TUESDAY','WEDNESDAY','THURSDAY','FRIDAY','SATURDAY'
);
$ARR_WEEKDAYS['es'] = array ("Domingo?","Lunes?","Martes?","Miércoles?","Jueves?","Viernes?","Sábado?"
);
$ARR_WEEKDAYS['en'] = array ("Sunday?","Monday?","Tuesday?","Wednesday?","Thursday?","Friday?","Saturday?"
);
$ARR_WEEKDAYS['fa'] = array ('یکشنبه','دوشنبه','سه شنبه','چهارشنبه','پنجشنبه ','جمعه','آدینه'
);
$dbc = new DBConnection;
$dbc = new DBConnection();
$ses = new DBSession( $dbc );
$holidays = $ses->execute( "SELECT LEX_VALUE FROM LEXICO WHERE LEX_TOPIC ='NOWORKINGDAY' " );
$config = array ();
for($id=0;$id<7;$id++)
{
for ($id = 0; $id < 7; $id ++) {
$res = $ses->execute( " SELECT * FROM LEXICO WHERE LEX_KEY = '" . $ARR_WEEKDAYS[0][$id] . "' AND LEX_TOPIC ='HOLIDAY' " );
$res = $res->read();
$config[$ARR_WEEKDAYS[0][$id]] = $res['LEX_VALUE'];
}
$G_PUBLISH = new Publisher;
$G_PUBLISH = new Publisher();
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'setup/weekend', '', $config, '' );
G::RenderPage( 'publish' );
?>

View File

@@ -20,9 +20,9 @@
*
* 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;
if (($RBAC_Response = $RBAC->userCanAccess( "PM_SETUP" )) != 1)
return $RBAC_Response;
G::ForceLogin( 'WF_PROCESS' );
G::LoadInclude( 'ajax' );
@@ -36,14 +36,15 @@ $G_ID_MENU_SELECTED = "SETUP";
$G_ID_SUB_MENU_SELECTED = "ENVIRONMENT";
$G_ID_THIRD_MENU_SELECTED = "WEEKEND";
$dbc = new DBConnection;
$dbc = new DBConnection();
$ses = new DBSession( $dbc );
$holidays = $ses->execute( 'SELECT LEX_VALUE FROM LEXICO WHERE LEX_TOPIC ="HOLIDAY"' );
$funcion = strtolower( get_ajax_value( 'function' ) );
$funcions = get_defined_functions();
if (in_array($funcion,$funcions['user'])) eval($funcion.'();');
if (in_array( $funcion, $funcions['user'] ))
eval( $funcion . '();' );
function setDays ()
{
@@ -54,6 +55,7 @@ function setDays()
for ($r = 1; $r < sizeof( $days ); $r ++)
setDay( $days[$r], $values[$r] );
}
function setDay ($day, $dayValue)
{
global $ses;
@@ -67,4 +69,4 @@ function setDay($day,$dayValue)
$res = $res->read();
echo ($res['LEX_VALUE'] == '1') ? 'true' : 'false';
}
?>

View File

@@ -1,13 +1,10 @@
function abc(panel, txt) {
/* commonDialog ( '', 'saved' , 'saved', {}, '' ) ;
setTimeout ( leimnud.closure({instance:myDialog,method:function(panel){
myDialog.remove();
panel.tabLastSelected=false;
panel.tabSelected=1;
panel.makeTab();
},args:panel}) , 1000 );
/*
* commonDialog ( '', 'saved' , 'saved', {}, '' ) ; setTimeout (
* leimnud.closure({instance:myDialog,method:function(panel){
*
* myDialog.remove(); panel.tabLastSelected=false; panel.tabSelected=1;
* panel.makeTab(); },args:panel}) , 1000 );
*/
var img = document.getElementById('workPeriodGraph');
img.src = 'workPeriodGraph?b=' + Math.random();
@@ -17,4 +14,3 @@ function abc( panel, txt ) {
return false;
}

View File

@@ -20,14 +20,14 @@
*
* 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;
if (($RBAC_Response = $RBAC->userCanAccess( "PM_SETUP" )) != 1)
return $RBAC_Response;
$G_ENABLE_BLANK_SKIN = true;
G::LoadClass( "workPeriod" );
$dbc = new DBConnection;
$dbc = new DBConnection();
$ses = new DBSession( $dbc );
$obj = new workPeriod( $dbc );
@@ -41,9 +41,9 @@ if (($RBAC_Response=$RBAC->userCanAccess("PM_SETUP"))!=1) return $RBAC_Response;
$row['FRIDAY'] = $row['noWorkingDays'][5];
$row['SATURDAY'] = $row['noWorkingDays'][6];
$G_PUBLISH = new Publisher;
$G_PUBLISH = new Publisher();
$G_PUBLISH->AddContent( "image", "image", "workPeriodGraph" );
$G_PUBLISH->AddContent( "xmlform", "xmlform", "setup/workPeriod", "", $row, "workPeriodSave" );
G::RenderPage( 'publish' );
?>

View File

@@ -20,14 +20,14 @@
*
* 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;
if (($RBAC_Response = $RBAC->userCanAccess( "PM_SETUP" )) != 1)
return $RBAC_Response;
Header( "Content-type: image/jpeg" );
G::LoadClass( "workPeriod" );
$dbc = new DBConnection;
$dbc = new DBConnection();
$ses = new DBSession( $dbc );
$obj = new workPeriod( $dbc );
@@ -60,8 +60,8 @@ if (($RBAC_Response=$RBAC->userCanAccess("PM_SETUP"))!=1) return $RBAC_Response;
ImageFilledRectangle( $im, 0, 0, $width - 1, $height - 1, $bgcolor );
ImageRectangle( $im, 0, 0, $width - 1, $height - 1, $black );
$x = 10; $y = 20;
$x = 10;
$y = 20;
$x1 = 78;
$x2 = $x1 + 2 * 6;
@@ -81,7 +81,8 @@ if (($RBAC_Response=$RBAC->userCanAccess("PM_SETUP"))!=1) return $RBAC_Response;
$color = $orange;
else
$color = $white;
if ( isset ( $noWorkingDays[ $day ]) && $noWorkingDays[ $day ] ) $color = $white;
if (isset( $noWorkingDays[$day] ) && $noWorkingDays[$day])
$color = $white;
ImageFillToBorder( $im, $x1 + $i * 4 + 1, $y + 1, $plomo, $color );
}
@@ -98,5 +99,6 @@ if (($RBAC_Response=$RBAC->userCanAccess("PM_SETUP"))!=1) return $RBAC_Response;
}
//ImageString($im, 2, 5, 5, $initPeriod1*6 . ", $endPeriod1, $initPeriod2, $endPeriod2 ", $black);
ImageJpeg( $im );
?>

View File

@@ -20,9 +20,9 @@
*
* 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;
if (($RBAC_Response = $RBAC->userCanAccess( "PM_SETUP" )) != 1)
return $RBAC_Response;
G::LoadClass( "workPeriod" );
$frm = $_POST['form'];
@@ -39,5 +39,5 @@ if (($RBAC_Response=$RBAC->userCanAccess("PM_SETUP"))!=1) return $RBAC_Response;
$obj->Save( $frm['initPeriod1'], $frm['endPeriod1'], $frm['initPeriod2'], $frm['endPeriod2'], $noWorkingDays );
print "ok";
die;
?>
die();