Merge pull request #800 from Jennydmz/master

CODE STYLE, workflow/engine/methods/setup/ PART 3 (final)
This commit is contained in:
ferOnti
2012-10-17 15:24:05 -07:00
76 changed files with 6886 additions and 7022 deletions

View File

@@ -1,73 +1,84 @@
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 );
*/
var img = document.getElementById('workPeriodGraph');
img.src = 'workPeriodGraph?b=' + Math.random();
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 );
*/
var img = document.getElementById( 'workPeriodGraph' );
img.src = 'workPeriodGraph?b=' + Math.random() ;
// panel.clearContent();
// panel.addContent ( txt );
return false;
// panel.clearContent();
// panel.addContent ( txt );
return false;
}
function showHideFilterForm( divName)
{
if (document.getElementById( divName ).style.display==='none')
document.getElementById( divName).style.display = '';
else
document.getElementById( divName).style.display = 'none';
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},
title:"New Holiday",
theme:"panel",
control:{
close:true,
drag:true
},
fx: { modal:true }
};
myPanel.make();
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
},
title : "New Holiday",
theme : "panel",
control : {
close : true,
drag : true
},
fx : {
modal : true
}
};
var r = new leimnud.module.rpc.xmlhttp({url:"holidayNew.php"});
r.callback=leimnud.closure({Function:function(rpc){
myPanel.addContent(rpc.xmlhttp.responseText);
},args:r})
r.make();
myPanel.make();
var r = new leimnud.module.rpc.xmlhttp({
url : "holidayNew.php"
});
r.callback = leimnud.closure({
Function : function(rpc) {
myPanel.addContent(rpc.xmlhttp.responseText);
},
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){
//myPanel.addContent(rpc.xmlhttp.responseText);
myPanel = setupPanel.panels.control;
myPanel.tabLastSelected=false;
myPanel.tabSelected=0;
myPanel.makeTab();
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) {
// myPanel.addContent(rpc.xmlhttp.responseText);
myPanel = setupPanel.panels.control;
myPanel.tabLastSelected = false;
myPanel.tabSelected = 0;
myPanel.makeTab();
},
args : r
})
r.make();
// myPanel.clearContent();
// myPanel.addContent ( uid );
}
},args:r})
r.make();
// myPanel.clearContent();
// myPanel.addContent ( uid );
}

View File

@@ -12,76 +12,71 @@
*
* 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
* 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/>.
* 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.
*
*/
/**
* 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_ID_MENU_SELECTED = "SETUP";
$G_PUBLISH = new Publisher();
global $G_TMP_MENU;
$oMenu = new Menu();
$oMenu->load('setup');
$toolItems = Array();
$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'
);
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'
);
}
$template = new TemplatePower( PATH_TPL . 'setup' . PATH_SEP . 'tools.html' );
$template->prepare();
$template->assign ('LeftWidth', '230');
$template->assign ('contentHeight', '520');
$template->assign( 'LeftWidth', '230' );
$template->assign( 'contentHeight', '520' );
if( isset($_GET['i18']) ){
$_SESSION['TOOLS_VIEWTYPE'] = true;
$template->assign ('displayLanguageTool', 'block');
if (isset( $_GET['i18'] )) {
$_SESSION['TOOLS_VIEWTYPE'] = true;
$template->assign( 'displayLanguageTool', 'block' );
} else {
$template->assign ('displayLanguageTool', 'none');
$template->assign( 'displayLanguageTool', 'none' );
}
if( isset($_GET['newSite']) ){
$template->assign ('displayNewSiteTool', 'block');
if (isset( $_GET['newSite'] )) {
$template->assign( 'displayNewSiteTool', 'block' );
} else {
$template->assign ('displayNewSiteTool', 'none');
$template->assign( 'displayNewSiteTool', 'none' );
}
foreach($toolItems as $item) {
$template->newBlock( 'tool_options');
foreach($item as $propertyName=>$propertyValue)
$template->assign ($propertyName, $propertyValue);
foreach ($toolItems as $item) {
$template->newBlock( 'tool_options' );
foreach ($item as $propertyName => $propertyValue)
$template->assign( $propertyName, $propertyValue );
}
$G_PUBLISH->AddContent('template', '', '', '', $template );
G::RenderPage('publish');
if(isset($_GET['module'])){
$G_PUBLISH->AddContent( 'template', '', '', '', $template );
G::RenderPage( 'publish' );
if (isset( $_GET['module'] )) {
print "
print "
<script>
admToolsContent.location='".$_GET['module']."';
admToolsContent.location='" . $_GET['module'] . "';
</script>
";
}
}

View File

@@ -1,10 +1,10 @@
<?php
/**
* setupAjax.php
*
*
* ProcessMaker Open Source Edition
* Copyright (C) 2004 - 2008 Colosa Inc.23
*
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
@@ -12,30 +12,30 @@
*
* 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
* 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.,
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/
if (($RBAC_Response=$RBAC->userCanAccess("PM_SETUP"))!=1) return $RBAC_Response;
//$oSMTPJSON = new Services_JSON();
//$oSMTPData = $oSMTPJSON->decode(stripslashes($_POST['data']));
//$sOutput = '';
G::LoadClass('setup');
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;
$action = strtolower( $_GET['action'] );
$data = $_GET;
$arr = get_class_methods( get_class( $oSMTPSetup ) );
foreach ($arr as $method) {
if ($method == $action)
$oSMTPSetup->{$action}( $_GET );
}
$arr = get_class_methods( get_class($oSMTPSetup) );
foreach ($arr as $method) {
if ( $method == $action )
$oSMTPSetup->{$action} ( $_GET );
}
?>

View File

@@ -12,105 +12,104 @@
*
* 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
* 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/>.
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/
// if (($RBAC_Response = $RBAC->userCanAccess("PM_CASES"))!=1) return $RBAC_Response;
$idDecode64 = base64_decode($_GET['id']);
$idExploded = explode( '/', $idDecode64 );
if ( $idExploded[0] == '' ) array_shift($idExploded);
if ( $idExploded[0] == 'plugin' ) {
$idDecode64 = base64_decode( $_GET['id'] );
$idExploded = explode( '/', $idDecode64 );
if ($idExploded[0] == '')
array_shift( $idExploded );
if ($idExploded[0] == 'plugin') {
//Get the Plugin Folder, always the first element
$pluginFolder = $idExploded[1];
$pluginFilename = PATH_PLUGINS . $pluginFolder . PATH_SEP . 'public_html'. PATH_SEP . $idExploded[2];
if ( file_exists ( $pluginFilename ) ) {
G::streamFile ( $pluginFilename );
$pluginFolder = $idExploded[1];
$pluginFilename = PATH_PLUGINS . $pluginFolder . PATH_SEP . 'public_html' . PATH_SEP . $idExploded[2];
if (file_exists( $pluginFilename )) {
G::streamFile( $pluginFilename );
}
die;
}
die();
}
$ainfoSite = explode("/",$_SERVER["REQUEST_URI"]);
$ainfoSite = explode( "/", $_SERVER["REQUEST_URI"] );
//it was added to show the logo into management plugin add by krlos
if(isset($_GET['wsName']) && $_GET['wsName']!=''){
if (isset( $_GET['wsName'] ) && $_GET['wsName'] != '') {
$ainfoSite[1] = $_GET['wsName'];
}
}
//end add
$dir=PATH_DATA."sites".PATH_SEP.str_replace("sys","",$ainfoSite[1]).PATH_SEP."files/logos";
$imagen = $dir .PATH_SEP.$idDecode64;
$dir = PATH_DATA . "sites" . PATH_SEP . str_replace( "sys", "", $ainfoSite[1] ) . PATH_SEP . "files/logos";
$imagen = $dir . PATH_SEP . $idDecode64;
if (is_file( $imagen )) {
showLogo( $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";
$newDir = PATH_DATA."sites".PATH_SEP.str_replace("sys","",$ainfoSite[1]).PATH_SEP."files/logos";
$dir = PATH_HOME . "public_html/files/logos";
if(!is_dir($newDir)){
G::mk_dir($newDir);
}
//this function does copy all logos from public_html/files/logos to /shared/site/yourSite/files/logos
//cpyMoreLogos($dir,$newDir);
$newDir .= PATH_SEP.$idDecode64;
$dir .= PATH_SEP.$idDecode64;
copy($dir,$newDir);
showLogo($newDir);
die;
}
function showLogo($imagen){
$info = @getimagesize($imagen);
$fp = fopen($imagen, "rb");
if ($info && $fp) {
header("Content-type: {$info['mime']}");
fpassthru($fp);
exit;
} else {
throw new Exception("Image format not valid");
if (! is_dir( $newDir )) {
G::mk_dir( $newDir );
}
}
//this function does copy all logos from public_html/files/logos to /shared/site/yourSite/files/logos
//cpyMoreLogos($dir,$newDir);
$newDir .= PATH_SEP . $idDecode64;
$dir .= PATH_SEP . $idDecode64;
copy( $dir, $newDir );
showLogo( $newDir );
die();
function cpyMoreLogos($dir,$newDir){
if (file_exists($dir)) {
if ($handle = opendir($dir)) {
while (false !== ($file = readdir($handle))) {
if(($file!=".")&&($file!="..")) {
$extention=explode(".", $file);
$aImageProp=getimagesize($dir.'/'.$file, $info);
$sfileExtention = strtoupper($extention[count($extention)-1]);
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);
function showLogo ($imagen)
{
$info = @getimagesize( $imagen );
$fp = fopen( $imagen, "rb" );
if ($info && $fp) {
header( "Content-type: {$info['mime']}" );
fpassthru( $fp );
exit();
} else {
throw new Exception( "Image format not valid" );
}
}
function cpyMoreLogos ($dir, $newDir)
{
if (file_exists( $dir )) {
if ($handle = opendir( $dir )) {
while (false !== ($file = readdir( $handle ))) {
if (($file != ".") && ($file != "..")) {
$extention = explode( ".", $file );
$aImageProp = getimagesize( $dir . '/' . $file, $info );
$sfileExtention = strtoupper( $extention[count( $extention ) - 1] );
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 );
}
}
}
}
closedir($handle);
closedir( $handle );
}
}
}
}
}
die;
die();
?>
<script>
</script>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,4 +1,4 @@
<?php
<?php
/**
* pluginsList.php
*
@@ -12,142 +12,138 @@
*
* 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
* 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/>.
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/
if($RBAC->userCanAccess('PM_SETUP') != 1 && $RBAC->userCanAccess('PM_SETUP_ADVANCE') != 1){
G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels');
//G::header('location: ../login/login');
die;
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();
}
$G_MAIN_MENU = 'processmaker';
$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');
G::LoadClass( 'configuration' );
$c = new Configurations();
$configPage = $c->getConfiguration('skinList', 'pageSize','',$_SESSION['USER_LOGGED']);
$Config['pageSize'] = isset($configPage['pageSize']) ? $configPage['pageSize'] : 20;
$configPage = $c->getConfiguration( 'skinList', 'pageSize', '', $_SESSION['USER_LOGGED'] );
$Config['pageSize'] = isset( $configPage['pageSize'] ) ? $configPage['pageSize'] : 20;
$oHeadPublisher =& headPublisher::getSingleton();
$oHeadPublisher->addExtJsScript('setup/skinList', false); //adding a javascript file .js
$oHeadPublisher->addContent('setup/skinList'); //adding a html file .html.
$oHeadPublisher->assign('CONFIG', $Config);
$oHeadPublisher->assign('SYS_SKIN', SYS_SKIN);
$oHeadPublisher = & headPublisher::getSingleton();
$oHeadPublisher->addExtJsScript( 'setup/skinList', false ); //adding a javascript file .js
$oHeadPublisher->addContent( 'setup/skinList' ); //adding a html file .html.
$oHeadPublisher->assign( 'CONFIG', $Config );
$oHeadPublisher->assign( 'SYS_SKIN', SYS_SKIN );
$oHeadPublisher->assign('FORMATS',$c->getFormats());
$oHeadPublisher->assign( 'FORMATS', $c->getFormats() );
G::RenderPage('publish', 'extJs');
die;
G::RenderPage( 'publish', 'extJs' );
die();
global $RBAC;
$access = $RBAC->userCanAccess('PM_SETUP');
if( $access != 1 ){
switch ($access)
{
case -1:
G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels');
G::header('location: ../login/login');
die;
break;
case -2:
G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels');
G::header('location: ../login/login');
die;
break;
default:
G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels');
G::header('location: ../login/login');
die;
break;
}
$access = $RBAC->userCanAccess( 'PM_SETUP' );
if ($access != 1) {
switch ($access) {
case - 1:
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
G::header( 'location: ../login/login' );
die();
break;
case - 2:
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels' );
G::header( 'location: ../login/login' );
die();
break;
default:
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
G::header( 'location: ../login/login' );
die();
break;
}
}
// lets display the items
$items[] = array ( 'id' => 'char', 'title' => 'char', 'type' => 'char', 'creator' => 'char' ,
'modifiedBy' => 'char', 'filename' => 'char', 'size' => 'char', 'mime' => 'char');
// lets display the items
$items[] = array ('id' => 'char','title' => 'char','type' => 'char','creator' => 'char','modifiedBy' => 'char','filename' => 'char','size' => 'char','mime' => 'char'
);
//***************** Skins **************************
$aFiles = array ();
if ($handle = opendir( PATH_SKINS )) {
while ( false !== ($file = readdir($handle))) {
G::pr($file);
$filename = substr ( $file,0, strrpos($file, '.'));
//***************** Skins **************************
$aFiles = array ();
if ($handle = opendir( PATH_SKINS )) {
while (false !== ($file = readdir( $handle ))) {
G::pr( $file );
$filename = substr( $file, 0, strrpos( $file, '.' ) );
// list of no complete skins
$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;
// list of no complete skins
$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;
}
}
}
}
closedir($handle);
closedir( $handle );
//now walk in the array to get the .cnf file and display properties
foreach ( $aFiles as $key => $val ) {
$description = '';
$version = '';
if ( file_exists ( PATH_SKINS . $key . '.cnf' ) ) {
$serial = file_get_contents ( PATH_SKINS . $key . '.cnf' );
$previousErrorRep = ini_get("error_reporting");
error_reporting( E_ERROR ) ;
$prop = unserialize ( $serial );
error_reporting( $previousErrorRep );
if ( !is_object( $prop ) ) {
@unlink ( PATH_SKINS . $key . '.cnf');
foreach ($aFiles as $key => $val) {
$description = '';
$version = '';
if (file_exists( PATH_SKINS . $key . '.cnf' )) {
$serial = file_get_contents( PATH_SKINS . $key . '.cnf' );
$previousErrorRep = ini_get( "error_reporting" );
error_reporting( E_ERROR );
$prop = unserialize( $serial );
error_reporting( $previousErrorRep );
if (! is_object( $prop )) {
@unlink( PATH_SKINS . $key . '.cnf' );
}
if (isset( $prop ) && isset( $prop->description ))
$description = $prop->description;
if (isset( $prop ) && isset( $prop->version ))
$version = $prop->version;
}
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
);
$linkPackValue = G::LoadTranslation( 'ID_EXPORT' );
$link = 'skinsExport?id=' . $key;
$items[] = array ('id' => count( $items ),'name' => $key,'filename' => $key,'description' => $description,'version' => $version,'url' => $link,'linkPackValue' => $linkPackValue
);
}
$folders['items'] = $items;
}
$_DBArray['plugins'] = $items;
$_SESSION['_DBArray'] = $_DBArray;
}
G::LoadClass( 'ArrayPeer');
$c = new Criteria ('dbarray');
$c->setDBArrayTable('plugins');
$c->addAscendingOrderByColumn ('id');
$_DBArray['plugins'] = $items;
$_SESSION['_DBArray'] = $_DBArray;
$G_MAIN_MENU = 'processmaker';
$G_ID_MENU_SELECTED = 'SETUP';
$G_SUB_MENU = 'setup';
$G_ID_SUB_MENU_SELECTED = 'SKINS';
G::LoadClass( 'ArrayPeer' );
$c = new Criteria( 'dbarray' );
$c->setDBArrayTable( 'plugins' );
$c->addAscendingOrderByColumn( 'id' );
$G_PUBLISH = new Publisher;
$G_MAIN_MENU = 'processmaker';
$G_ID_MENU_SELECTED = 'SETUP';
$G_SUB_MENU = 'setup';
$G_ID_SUB_MENU_SELECTED = 'SKINS';
$G_PUBLISH->AddContent( 'propeltable', 'paged-table', 'setup/skinsList', $c );
$G_PUBLISH = new Publisher();
G::RenderPage('publishBlank', 'blank');
$G_PUBLISH->AddContent( 'propeltable', 'paged-table', 'setup/skinsList', $c );
G::RenderPage( 'publishBlank', 'blank' );

View File

@@ -1,58 +1,57 @@
<?php
/**
* holidayNew.php
*
* ProcessMaker Open Source Edition
* Copyright (C) 2004 - 2008 Colosa Inc.23
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/
$access = $RBAC->userCanAccess('PM_SETUP');
if( $access != 1 ){
switch ($access)
{
case -1:
G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels');
G::header('location: ../login/login');
die;
break;
case -2:
G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels');
G::header('location: ../login/login');
die;
break;
default:
G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels');
G::header('location: ../login/login');
die;
break;
}
}
if (($RBAC_Response=$RBAC->userCanAccess("PM_SETUP"))!=1) return $RBAC_Response;
$dbc = new DBConnection;
$G_PUBLISH = new Publisher;
$G_MAIN_MENU = 'processmaker';
$G_ID_MENU_SELECTED = 'SETUP';
$G_SUB_MENU = 'setup';
$G_ID_SUB_MENU_SELECTED = 'SKINS';
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', "setup/skinsNew", '', null, "skinsSave");
G::RenderPage( 'publishBlank', 'blank' );
<?php
/**
* holidayNew.php
*
* ProcessMaker Open Source Edition
* Copyright (C) 2004 - 2008 Colosa Inc.23
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*/
$access = $RBAC->userCanAccess( 'PM_SETUP' );
if ($access != 1) {
switch ($access) {
case - 1:
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
G::header( 'location: ../login/login' );
die();
break;
case - 2:
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels' );
G::header( 'location: ../login/login' );
die();
break;
default:
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
G::header( 'location: ../login/login' );
die();
break;
}
}
if (($RBAC_Response = $RBAC->userCanAccess( "PM_SETUP" )) != 1)
return $RBAC_Response;
$dbc = new DBConnection();
$G_PUBLISH = new Publisher();
$G_MAIN_MENU = 'processmaker';
$G_ID_MENU_SELECTED = 'SETUP';
$G_SUB_MENU = 'setup';
$G_ID_SUB_MENU_SELECTED = 'SKINS';
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', "setup/skinsNew", '', null, "skinsSave" );
G::RenderPage( 'publishBlank', 'blank' );

View File

@@ -1,4 +1,5 @@
<?php
/**
* skinsSave.php
*
@@ -12,84 +13,76 @@
*
* 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
* 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/>.
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/
function xcopy ( $pathSource, $pathTarget ) {
G::mk_dir ($pathTarget);
if ($handle = opendir( $pathSource )) {
while ( false !== ($file = readdir($handle))) {
if ( substr($file,0,1) != '.' && !is_dir ($file) ) {
$content = file_get_contents ( $pathSource . $file );
$filename = $pathTarget . $file ;
file_put_contents ( $filename, $content );
}
}
closedir($handle);
}
}
global $RBAC;
switch ($RBAC->userCanAccess('PM_SETUP'))
function xcopy ($pathSource, $pathTarget)
{
case -2:
G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels');
G::header('location: ../login/login');
die;
break;
case -1:
G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels');
G::header('location: ../login/login');
die;
break;
G::mk_dir( $pathTarget );
if ($handle = opendir( $pathSource )) {
while (false !== ($file = readdir( $handle ))) {
if (substr( $file, 0, 1 ) != '.' && ! is_dir( $file )) {
$content = file_get_contents( $pathSource . $file );
$filename = $pathTarget . $file;
file_put_contents( $filename, $content );
}
}
closedir( $handle );
}
}
G::LoadClass("system");
global $RBAC;
switch ($RBAC->userCanAccess( 'PM_SETUP' )) {
case - 2:
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels' );
G::header( 'location: ../login/login' );
die();
break;
case - 1:
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
G::header( 'location: ../login/login' );
die();
break;
}
$id = strip_tags ( str_replace ( ' ', '_', trim ($_POST['form']['NAME']) ) );
$desc = $_POST['form']['DESCRIPTION'];
$fileObj = PATH_SKINS . $id . '.cnf';
if ( !file_exists($fileObj) ) {
G::LoadClass( "system" );
$id = strip_tags( str_replace( ' ', '_', trim( $_POST['form']['NAME'] ) ) );
$desc = $_POST['form']['DESCRIPTION'];
$fileObj = PATH_SKINS . $id . '.cnf';
if (! file_exists( $fileObj )) {
$oConf = new stdClass();
$oConf->name = $id;
$oConf->description = $desc;
$oConf->version = 1;
file_put_contents ( $fileObj, serialize ( $oConf) );
}
$oConf->version = 1;
file_put_contents( $fileObj, serialize( $oConf ) );
}
$oConf = unserialize ( file_get_contents ( $fileObj ));
$oConf = unserialize( file_get_contents( $fileObj ) );
$contentPHP = file_get_contents ( PATH_SKINS . 'green.php' );
$contentPHP = str_replace ( 'green.html', $id.'.html', $contentPHP );
file_put_contents ( PATH_SKINS . $id . '.php', $contentPHP );
$contentHTML = file_get_contents ( PATH_SKINS . 'green.html' );
$contentHTML = str_replace ( 'green', $id , $contentHTML );
file_put_contents ( PATH_SKINS . $id . '.html', $contentHTML );
$contentPHP = file_get_contents( PATH_SKINS . 'green.php' );
$contentPHP = str_replace( 'green.html', $id . '.html', $contentPHP );
file_put_contents( PATH_SKINS . $id . '.php', $contentPHP );
$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
);
$contentHTML = file_get_contents( PATH_SKINS . 'green.html' );
$contentHTML = str_replace( 'green', $id, $contentHTML );
file_put_contents( PATH_SKINS . $id . '.html', $contentHTML );
xcopy (
PATH_HTML . 'skins' . PATH_SEP . 'green' . PATH_SEP . 'images'. PATH_SEP,
PATH_HTML . 'skins' . PATH_SEP . $id . PATH_SEP . 'images'. PATH_SEP
);
$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 . 'images' . PATH_SEP, PATH_HTML . 'skins' . PATH_SEP . $id . PATH_SEP . 'images' . PATH_SEP );
G::Header( 'Location: ../../' . $id . '/setup/skinsList' );
G::Header ( 'Location: ../../' . $id . '/setup/skinsList' );

View File

@@ -1,74 +1,72 @@
<?php
/**
* upgrade.php
*
* ProcessMaker Open Source Edition
* Copyright (C) 2004 - 2008 Colosa Inc.23
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/
global $RBAC;
$access = $RBAC->userCanAccess('PM_SETUP_ADVANCE');
if( $access != 1 ){
switch ($access)
{
case -1:
G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels');
G::header('location: ../login/login');
die;
break;
case -2:
G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels');
G::header('location: ../login/login');
die;
break;
default:
G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels');
G::header('location: ../login/login');
die;
break;
}
}
//calculating the max upload file size;
$POST_MAX_SIZE = ini_get('post_max_size');
$mul = substr($POST_MAX_SIZE, -1);
$mul = ($mul == 'M' ? 1048576 : ($mul == 'K' ? 1024 : ($mul == 'G' ? 1073741824 : 1)));
$postMaxSize = (int)$POST_MAX_SIZE * $mul;
$UPLOAD_MAX_SIZE = ini_get('upload_max_filesize');
$mul = substr($UPLOAD_MAX_SIZE, -1);
$mul = ($mul == 'M' ? 1048576 : ($mul == 'K' ? 1024 : ($mul == 'G' ? 1073741824 : 1)));
$uploadMaxSize = (int)$UPLOAD_MAX_SIZE * $mul;
if ( $postMaxSize < $uploadMaxSize ) $uploadMaxSize = $postMaxSize;
$G_MAIN_MENU = 'processmaker';
$G_SUB_MENU = 'setup';
$G_ID_MENU_SELECTED = 'SETUP';
$G_ID_SUB_MENU_SELECTED = 'UPGRADE';
G::LoadClass("system");
$Fields['PM_VERSION'] = System::getVersion();
$Fields['MAX_FILE_SIZE'] = $uploadMaxSize . " (" . $UPLOAD_MAX_SIZE . ") ";
$G_PUBLISH = new Publisher;
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'setup/upgrade', '', $Fields, 'upgrade_System');
G::RenderPage('publishBlank', 'blank');
<?php
/**
* upgrade.php
*
* ProcessMaker Open Source Edition
* Copyright (C) 2004 - 2008 Colosa Inc.23
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*/
global $RBAC;
$access = $RBAC->userCanAccess( 'PM_SETUP_ADVANCE' );
if ($access != 1) {
switch ($access) {
case - 1:
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
G::header( 'location: ../login/login' );
die();
break;
case - 2:
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels' );
G::header( 'location: ../login/login' );
die();
break;
default:
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
G::header( 'location: ../login/login' );
die();
break;
}
}
//calculating the max upload file size;
$POST_MAX_SIZE = ini_get( 'post_max_size' );
$mul = substr( $POST_MAX_SIZE, - 1 );
$mul = ($mul == 'M' ? 1048576 : ($mul == 'K' ? 1024 : ($mul == 'G' ? 1073741824 : 1)));
$postMaxSize = (int) $POST_MAX_SIZE * $mul;
$UPLOAD_MAX_SIZE = ini_get( 'upload_max_filesize' );
$mul = substr( $UPLOAD_MAX_SIZE, - 1 );
$mul = ($mul == 'M' ? 1048576 : ($mul == 'K' ? 1024 : ($mul == 'G' ? 1073741824 : 1)));
$uploadMaxSize = (int) $UPLOAD_MAX_SIZE * $mul;
if ($postMaxSize < $uploadMaxSize)
$uploadMaxSize = $postMaxSize;
$G_MAIN_MENU = 'processmaker';
$G_SUB_MENU = 'setup';
$G_ID_MENU_SELECTED = 'SETUP';
$G_ID_SUB_MENU_SELECTED = 'UPGRADE';
G::LoadClass( "system" );
$Fields['PM_VERSION'] = System::getVersion();
$Fields['MAX_FILE_SIZE'] = $uploadMaxSize . " (" . $UPLOAD_MAX_SIZE . ") ";
$G_PUBLISH = new Publisher();
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'setup/upgrade', '', $Fields, 'upgrade_System' );
G::RenderPage( 'publishBlank', 'blank' );

View File

@@ -39,4 +39,5 @@ $aRequiredPermissions = array('PM_LOGIN',
'PM_FOLDERS_VIEW',
'PM_FOLDERS_ADD_FOLDER',
'PM_FOLDERS_ADD_FILE'
);
);

View File

@@ -1,110 +1,108 @@
<?php
/**
* upgrade_System.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.
*
*/
/**
* New System Upgrade controller
*
* @author Erik A. O. <erik@colosa.com>
* @date May 12th, 2010
*/
global $RBAC;
switch ($RBAC->userCanAccess('PM_SETUP_ADVANCE'))
{
case -2:
G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels');
G::header('location: ../login/login');
die;
break;
case -1:
G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels');
G::header('location: ../login/login');
die;
break;
}
set_time_limit(0);
$G_MAIN_MENU = 'processmaker';
$G_SUB_MENU = 'setup';
$G_ID_MENU_SELECTED = 'SETUP';
$G_ID_SUB_MENU_SELECTED = 'UPGRADE';
require_once "classes/class.system.php";
$oSystem = new System();
try {
if( ! $oSystem->verifyFileForUpgrade() ){
throw ( new Exception ("There was an error uploading the file, probably the file size if greater than upload_max_filesize parameter in php.ini, please check this parameter and try again." ) );
}
$oSystem->cleanupUpgradeDirectory();
$oSystem->getUpgradedFilesList();
$ver = $oSystem->upgrade();
$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'] = '';
if ( !is_Array($oSystem->aErrors) || count($oSystem->aErrors) == 0 )
$aMessage['THEMESSAGE4'] = G::LoadTranslation('ID_NONE');
else
$aMessage['THEMESSAGE4'] = implode( "\n", $oSystem->aErrors) ;
$oHeadPublisher =& headPublisher::getSingleton();
if( file_exists(PATH_CORE . 'js' . PATH_SEP . 'setup' . PATH_SEP . 'upgrade_System.js') ){
$oHeadPublisher->addScriptFile('/jscore/setup/upgrade_System.js');
} else {
$oHeadPublisher->addScriptCode("function upgradeSystem(wsCount) {
document.getElementById('form[THETITLE3]').innerHTML = wsCount + ' workspaces to update.';
document.getElementById('form[SUBTITLE4]').innerHTML = '&nbsp;&nbsp;<img src='/images/alert.gif' width='13' height='13' border='0'> Please wait...';
updateWorkspace(wsCount);
};
function updateWorkspace(id) {
if(id < 0) return false;
var oRPC = new leimnud.module.rpc.xmlhttp({
async : true,
method: 'POST',
url: '../setup/upgrade_SystemAjax',
args : 'id=' + id
});
oRPC.callback = function(rpc) {
document.getElementById('form[SUBTITLE4]').innerHTML = rpc.xmlhttp.responseText;
updateWorkspace(id-1);
}.extend(this);
oRPC.make();
};");
}
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'login/showInfoUpdate', '', $aMessage );
G::RenderPage( 'publishBlank', 'blank' );
G::evalJScript('upgradeSystem('.count($oSystem->aWorkspaces).')');
exit(0);
}
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);
}
<?php
/**
* upgrade_System.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.
*/
/**
* New System Upgrade controller
*
* @author Erik A. O. <erik@colosa.com>
* @date May 12th, 2010
*/
global $RBAC;
switch ($RBAC->userCanAccess( 'PM_SETUP_ADVANCE' )) {
case - 2:
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels' );
G::header( 'location: ../login/login' );
die();
break;
case - 1:
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
G::header( 'location: ../login/login' );
die();
break;
}
set_time_limit( 0 );
$G_MAIN_MENU = 'processmaker';
$G_SUB_MENU = 'setup';
$G_ID_MENU_SELECTED = 'SETUP';
$G_ID_SUB_MENU_SELECTED = 'UPGRADE';
require_once "classes/class.system.php";
$oSystem = new System();
try {
if (! $oSystem->verifyFileForUpgrade()) {
throw (new Exception( "There was an error uploading the file, probably the file size if greater than upload_max_filesize parameter in php.ini, please check this parameter and try again." ));
}
$oSystem->cleanupUpgradeDirectory();
$oSystem->getUpgradedFilesList();
$ver = $oSystem->upgrade();
$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'] = '';
if (! is_Array( $oSystem->aErrors ) || count( $oSystem->aErrors ) == 0)
$aMessage['THEMESSAGE4'] = G::LoadTranslation( 'ID_NONE' );
else
$aMessage['THEMESSAGE4'] = implode( "\n", $oSystem->aErrors );
$oHeadPublisher = & headPublisher::getSingleton();
if (file_exists( PATH_CORE . 'js' . PATH_SEP . 'setup' . PATH_SEP . 'upgrade_System.js' )) {
$oHeadPublisher->addScriptFile( '/jscore/setup/upgrade_System.js' );
} else {
$oHeadPublisher->addScriptCode( "function upgradeSystem(wsCount) {
document.getElementById('form[THETITLE3]').innerHTML = wsCount + ' workspaces to update.';
document.getElementById('form[SUBTITLE4]').innerHTML = '&nbsp;&nbsp;<img src='/images/alert.gif' width='13' height='13' border='0'> Please wait...';
updateWorkspace(wsCount);
};
function updateWorkspace(id) {
if(id < 0) return false;
var oRPC = new leimnud.module.rpc.xmlhttp({
async : true,
method: 'POST',
url: '../setup/upgrade_SystemAjax',
args : 'id=' + id
});
oRPC.callback = function(rpc) {
document.getElementById('form[SUBTITLE4]').innerHTML = rpc.xmlhttp.responseText;
updateWorkspace(id-1);
}.extend(this);
oRPC.make();
};" );
}
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'login/showInfoUpdate', '', $aMessage );
G::RenderPage( 'publishBlank', 'blank' );
G::evalJScript( 'upgradeSystem(' . count( $oSystem->aWorkspaces ) . ')' );
exit( 0 );
} 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 );
}

File diff suppressed because it is too large Load Diff

View File

@@ -12,50 +12,50 @@
*
* 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
* 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/>.
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/
global $RBAC;
G::LoadClass('replacementLogo');
if($RBAC->userCanAccess('PM_SETUP') != 1 && $RBAC->userCanAccess('PM_SETUP_ADVANCE') != 1){
G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels');
die;
}
//calculating the max upload file size;
$POST_MAX_SIZE = ini_get('post_max_size');
$mul = substr($POST_MAX_SIZE, -1);
$mul = ($mul == 'M' ? 1048576 : ($mul == 'K' ? 1024 : ($mul == 'G' ? 1073741824 : 1)));
$postMaxSize = (int)$POST_MAX_SIZE * $mul;
$UPLOAD_MAX_SIZE = ini_get('upload_max_filesize');
$mul = substr($UPLOAD_MAX_SIZE, -1);
$mul = ($mul == 'M' ? 1048576 : ($mul == 'K' ? 1024 : ($mul == 'G' ? 1073741824 : 1)));
$uploadMaxSize = (int)$UPLOAD_MAX_SIZE * $mul;
global $RBAC;
G::LoadClass( 'replacementLogo' );
if ( $postMaxSize < $uploadMaxSize ) $uploadMaxSize = $postMaxSize;
$Fields['MAX_FILE_SIZE'] = $uploadMaxSize . " (" . $UPLOAD_MAX_SIZE . ") ";
if ($RBAC->userCanAccess( 'PM_SETUP' ) != 1 && $RBAC->userCanAccess( 'PM_SETUP_ADVANCE' ) != 1) {
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
die();
}
$G_MAIN_MENU = 'processmaker';
$G_SUB_MENU = 'setup';
$G_ID_MENU_SELECTED = 'SETUP';
$G_ID_SUB_MENU_SELECTED = 'LOGO';
$G_PUBLISH = new Publisher;
$oHeadPublisher =& headPublisher::getSingleton();
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'setup/uplogo', '', $Fields );
$G_PUBLISH->AddContent('view', 'setup/uplogo' );
G::RenderPage( "publishBlank", "blank");
//calculating the max upload file size;
$POST_MAX_SIZE = ini_get( 'post_max_size' );
$mul = substr( $POST_MAX_SIZE, - 1 );
$mul = ($mul == 'M' ? 1048576 : ($mul == 'K' ? 1024 : ($mul == 'G' ? 1073741824 : 1)));
$postMaxSize = (int) $POST_MAX_SIZE * $mul;
$UPLOAD_MAX_SIZE = ini_get( 'upload_max_filesize' );
$mul = substr( $UPLOAD_MAX_SIZE, - 1 );
$mul = ($mul == 'M' ? 1048576 : ($mul == 'K' ? 1024 : ($mul == 'G' ? 1073741824 : 1)));
$uploadMaxSize = (int) $UPLOAD_MAX_SIZE * $mul;
if ($postMaxSize < $uploadMaxSize)
$uploadMaxSize = $postMaxSize;
$Fields['MAX_FILE_SIZE'] = $uploadMaxSize . " (" . $UPLOAD_MAX_SIZE . ") ";
$G_MAIN_MENU = 'processmaker';
$G_SUB_MENU = 'setup';
$G_ID_MENU_SELECTED = 'SETUP';
$G_ID_SUB_MENU_SELECTED = 'LOGO';
$G_PUBLISH = new Publisher();
$oHeadPublisher = & headPublisher::getSingleton();
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'setup/uplogo', '', $Fields );
$G_PUBLISH->AddContent( 'view', 'setup/uplogo' );
G::RenderPage( "publishBlank", "blank" );
?>
<script>
@@ -63,22 +63,22 @@
* By krlos April 07, 2010
* we're going to change to the logo choosed
* parameter logo name
*/
var changeLogo= function (nameLogo){
*/
var changeLogo= function (nameLogo){
new leimnud.module.app.confirm().make({
label:G_STRINGS.ID_APPLY_LOGO,
action:function(){
ajax_function('replacementLogo','replacementLogo','NAMELOGO='+encodeURIComponent(nameLogo),'GET') ;
parent.parent.window.location = 'main?s=LOGO';
}});
}
/*
* By krlos April 07, 2010
* to delete logo choosed
* parameter logo name
*/
*/
function deleteLogo(nameLogo) {
new leimnud.module.app.confirm().make({
label:G_STRINGS.ID_REMOVE_LOGO,
@@ -95,8 +95,9 @@
* to put processmaker logo
* parameters file db and user id
*/
var restoreLogo = function (optfiledb, usrUid){
var restoreLogo = function (optfiledb, usrUid){
ajax_function('replacementLogo','restoreLogo','OPTFILEDB='+optfiledb+'&USRUID='+usrUid,'GET') ;
window.location = 'uplogo';
}
}
</script>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,10 +1,10 @@
<?php
/**
* webServicesList.php
*
*
* ProcessMaker Open Source Edition
* Copyright (C) 2004 - 2008 Colosa Inc.23
*
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
@@ -12,25 +12,25 @@
*
* 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
* 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.,
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/
if($RBAC->userCanAccess('PM_SETUP') != 1 && $RBAC->userCanAccess('PM_FACTORY') != 1){
G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels');
//G::header('location: ../login/login');
die;
if ($RBAC->userCanAccess( 'PM_SETUP' ) != 1 && $RBAC->userCanAccess( 'PM_FACTORY' ) != 1) {
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
//G::header('location: ../login/login');
die();
}
//G::genericForceLogin( 'WF_MYINFO' , 'login/noViewPage', $urlLogin = 'login/login' );
$G_PUBLISH = new Publisher;
$G_PUBLISH->AddContent('view', 'setup/webServicesTree' );
G::RenderPage( "publish-raw" , "raw" );
?>
//G::genericForceLogin( 'WF_MYINFO' , 'login/noViewPage', $urlLogin = 'login/login' );
$G_PUBLISH = new Publisher();
$G_PUBLISH->AddContent( 'view', 'setup/webServicesTree' );
G::RenderPage( "publish-raw", "raw" );

View File

@@ -12,52 +12,52 @@
*
* 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
* 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/>.
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/
if (($RBAC_Response=$RBAC->userCanAccess("PM_FACTORY"))!=1) return $RBAC_Response;
if (($RBAC_Response = $RBAC->userCanAccess( "PM_FACTORY" )) != 1)
return $RBAC_Response;
G::LoadClass('groups');
G::LoadClass( 'groups' );
$dbc = new DBConnection();
$ses = new DBSession($dbc);
$dbc = new DBConnection();
$ses = new DBSession( $dbc );
if (!isset($_SESSION['END_POINT'])) {
$aFields['WS_HOST'] = $_SERVER['HTTP_HOST'];
$aFields['WS_WORKSPACE'] = SYS_SYS;
}
else {
if (strpos($_SESSION['END_POINT'], 'https') !== false) {
preg_match('@^(?:https://)?([^/]+)@i', $_SESSION['END_POINT'], $coincidencias);
if (! isset( $_SESSION['END_POINT'] )) {
$aFields['WS_HOST'] = $_SERVER['HTTP_HOST'];
$aFields['WS_WORKSPACE'] = SYS_SYS;
} else {
if (strpos( $_SESSION['END_POINT'], 'https' ) !== false) {
preg_match( '@^(?:https://)?([^/]+)@i', $_SESSION['END_POINT'], $coincidencias );
} else {
preg_match( '@^(?:http://)?([^/]+)@i', $_SESSION['END_POINT'], $coincidencias );
}
else {
preg_match('@^(?:http://)?([^/]+)@i', $_SESSION['END_POINT'], $coincidencias);
}
$aAux = explode(':', $coincidencias[1]);
$aFields['WS_HOST'] = $aAux[0];
$aFields['WS_PORT'] = (isset($aAux[1]) ? $aAux[1] : '');
$aAux = explode($aAux[0] . (isset($aAux[1]) ? ':' . $aAux[1] : ''), $_SESSION['END_POINT']);
$aAux = explode('/', $aAux[1]);
$aFields['WS_WORKSPACE'] = substr($aAux[1], 3);
}
$aAux = explode( ':', $coincidencias[1] );
$aFields['WS_HOST'] = $aAux[0];
$aFields['WS_PORT'] = (isset( $aAux[1] ) ? $aAux[1] : '');
$aAux = explode( $aAux[0] . (isset( $aAux[1] ) ? ':' . $aAux[1] : ''), $_SESSION['END_POINT'] );
$aAux = explode( '/', $aAux[1] );
$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;
$G_PUBLISH = new Publisher();
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'setup/webServicesSetup', '', $aFields , 'webServicesSetupSave');
$G_PUBLISH = new Publisher();
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'setup/webServicesSetup', '', $aFields, 'webServicesSetupSave' );
G::RenderPage( "publish" , "raw" );
G::RenderPage( "publish", "raw" );
?>

View File

@@ -1,22 +1,16 @@
<?php
unset($_SESSION['WS_SESSION_ID']);
unset( $_SESSION['WS_SESSION_ID'] );
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';
G::header('location: webServices?x=1');
}
$_SESSION['WS_WORKSPACE']=$_POST['form']['WS_WORKSPACE'];
}
else
{
G::header('location: webServices?x=0');
}
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';
G::header( 'location: webServices?x=1' );
}
$_SESSION['WS_WORKSPACE'] = $_POST['form']['WS_WORKSPACE'];
} else {
G::header( 'location: webServices?x=0' );
}
?>

View File

@@ -1,10 +1,10 @@
<?php
/**
* weekend.php
*
*
* ProcessMaker Open Source Edition
* Copyright (C) 2004 - 2008 Colosa Inc.23
*
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
@@ -12,40 +12,43 @@
*
* 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
* 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.,
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/
if (($RBAC_Response=$RBAC->userCanAccess("PM_SETUP"))!=1) return $RBAC_Response;
G::LoadInclude('ajax');
if (($RBAC_Response = $RBAC->userCanAccess( "PM_SETUP" )) != 1)
return $RBAC_Response;
G::LoadInclude( 'ajax' );
$G_ENABLE_BLANK_SKIN = true;
$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;
$ses = new DBSession($dbc);
$dbc = new DBConnection();
$ses = new DBSession( $dbc );
$holidays=$ses->execute( "SELECT LEX_VALUE FROM LEXICO WHERE LEX_TOPIC ='NOWORKINGDAY' ");
$holidays = $ses->execute( "SELECT LEX_VALUE FROM LEXICO WHERE LEX_TOPIC ='NOWORKINGDAY' " );
$config=array();
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'];
$config = array ();
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->AddContent('xmlform', 'xmlform', 'setup/weekend', '',$config ,'' );
$G_PUBLISH = new Publisher();
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'setup/weekend', '', $config, '' );
G::RenderPage( 'publish' );
?>
<script language="JavaScript">
@@ -77,14 +80,14 @@ function on_submit(myForm)
}
function ajax_function(ajax_server, funcion, parameters)
{
objetus = get_xmlhttp();
objetus = get_xmlhttp();
var response;
try
{
if (parameters) parameters = '&' + encodeURI(parameters);
objetus.open("GET", ajax_server + "?function=" + funcion + parameters, false);
objetus.open("GET", ajax_server + "?function=" + funcion + parameters, false);
}catch(ss)
{
{
alert("error"+ss.message);
}
objetus.send(null);

View File

@@ -1,10 +1,10 @@
<?php
/**
* weekendAjax.php
*
*
* ProcessMaker Open Source Edition
* Copyright (C) 2004 - 2008 Colosa Inc.23
*
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
@@ -12,19 +12,19 @@
*
* 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
* 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.,
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/
if (($RBAC_Response=$RBAC->userCanAccess("PM_SETUP"))!=1) return $RBAC_Response;
if (($RBAC_Response = $RBAC->userCanAccess( "PM_SETUP" )) != 1)
return $RBAC_Response;
G::ForceLogin( 'WF_PROCESS' );
G::LoadInclude('ajax');
G::LoadInclude( 'ajax' );
$G_HELP_PAGE = "setup-environment-time-controls-weekend";
@@ -36,35 +36,37 @@ $G_ID_MENU_SELECTED = "SETUP";
$G_ID_SUB_MENU_SELECTED = "ENVIRONMENT";
$G_ID_THIRD_MENU_SELECTED = "WEEKEND";
$dbc = new DBConnection;
$ses = new DBSession($dbc);
$dbc = new DBConnection();
$ses = new DBSession( $dbc );
$holidays=$ses->execute('SELECT LEX_VALUE FROM LEXICO WHERE LEX_TOPIC ="HOLIDAY"');
$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.'();');
$funcion = strtolower( get_ajax_value( 'function' ) );
$funcions = get_defined_functions();
if (in_array( $funcion, $funcions['user'] ))
eval( $funcion . '();' );
function setDays()
function setDays ()
{
$days=get_ajax_value('days');
$values=get_ajax_value('values');
$days=explode(',',$days);
$values=explode(',',$values);
for($r=1;$r<sizeof($days);$r++)
setDay($days[$r],$values[$r]);
$days = get_ajax_value( 'days' );
$values = get_ajax_value( 'values' );
$days = explode( ',', $days );
$values = explode( ',', $values );
for ($r = 1; $r < sizeof( $days ); $r ++)
setDay( $days[$r], $values[$r] );
}
function setDay($day,$dayValue)
function setDay ($day, $dayValue)
{
global $ses;
$dayValue = (strcasecmp($dayValue,'true')==0)?1:0;
$res=$ses->execute(" SELECT * FROM LEXICO WHERE LEX_KEY = '$day' AND LEX_TOPIC ='HOLIDAY' ");
if ($res->count()==0)
$res=$ses->execute(" INSERT INTO LEXICO (LEX_TOPIC, LEX_KEY, LEX_VALUE) VALUES ('HOLIDAY', '$day', $dayValue) ");
else
$res=$ses->execute(" UPDATE LEXICO SET LEX_VALUE = $dayValue WHERE LEX_KEY = '$day' AND LEX_TOPIC ='HOLIDAY' ");
$res=$ses->execute(" SELECT * FROM LEXICO WHERE LEX_KEY = '$day' AND LEX_TOPIC ='HOLIDAY' ");
$res=$res->read();
echo ($res['LEX_VALUE']=='1')?'true':'false';
global $ses;
$dayValue = (strcasecmp( $dayValue, 'true' ) == 0) ? 1 : 0;
$res = $ses->execute( " SELECT * FROM LEXICO WHERE LEX_KEY = '$day' AND LEX_TOPIC ='HOLIDAY' " );
if ($res->count() == 0)
$res = $ses->execute( " INSERT INTO LEXICO (LEX_TOPIC, LEX_KEY, LEX_VALUE) VALUES ('HOLIDAY', '$day', $dayValue) " );
else
$res = $ses->execute( " UPDATE LEXICO SET LEX_VALUE = $dayValue WHERE LEX_KEY = '$day' AND LEX_TOPIC ='HOLIDAY' " );
$res = $ses->execute( " SELECT * FROM LEXICO WHERE LEX_KEY = '$day' AND LEX_TOPIC ='HOLIDAY' " );
$res = $res->read();
echo ($res['LEX_VALUE'] == '1') ? 'true' : 'false';
}
?>

View File

@@ -1,20 +1,16 @@
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 );
*/
var img = document.getElementById('workPeriodGraph');
img.src = 'workPeriodGraph?b=' + Math.random();
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 );
*/
var img = document.getElementById( 'workPeriodGraph' );
img.src = 'workPeriodGraph?b=' + Math.random() ;
// panel.clearContent();
// panel.addContent ( txt );
return false;
// panel.clearContent();
// panel.addContent ( txt );
return false;
}

View File

@@ -1,10 +1,10 @@
<?php
/**
* workPeriod.php
*
*
* ProcessMaker Open Source Edition
* Copyright (C) 2004 - 2008 Colosa Inc.23
*
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
@@ -12,38 +12,38 @@
*
* 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
* 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.,
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/
if (($RBAC_Response=$RBAC->userCanAccess("PM_SETUP"))!=1) return $RBAC_Response;
$G_ENABLE_BLANK_SKIN = true;
if (($RBAC_Response = $RBAC->userCanAccess( "PM_SETUP" )) != 1)
return $RBAC_Response;
$G_ENABLE_BLANK_SKIN = true;
G::LoadClass( "workPeriod" );
G::LoadClass( "workPeriod" );
$dbc = new DBConnection;
$ses = new DBSession( $dbc );
$obj = new workPeriod( $dbc );
$row = $obj->Load ();
$dbc = new DBConnection();
$ses = new DBSession( $dbc );
$obj = new workPeriod( $dbc );
$row['SUNDAY'] = $row['noWorkingDays'][0];
$row['MONDAY'] = $row['noWorkingDays'][1];
$row['TUESDAY'] = $row['noWorkingDays'][2];
$row['WEDNESDAY'] = $row['noWorkingDays'][3];
$row['THURSDAY'] = $row['noWorkingDays'][4];
$row['FRIDAY'] = $row['noWorkingDays'][5];
$row['SATURDAY'] = $row['noWorkingDays'][6];
$row = $obj->Load();
$G_PUBLISH = new Publisher;
$G_PUBLISH->AddContent( "image", "image", "workPeriodGraph" );
$G_PUBLISH->AddContent( "xmlform", "xmlform", "setup/workPeriod","", $row , "workPeriodSave" );
$row['SUNDAY'] = $row['noWorkingDays'][0];
$row['MONDAY'] = $row['noWorkingDays'][1];
$row['TUESDAY'] = $row['noWorkingDays'][2];
$row['WEDNESDAY'] = $row['noWorkingDays'][3];
$row['THURSDAY'] = $row['noWorkingDays'][4];
$row['FRIDAY'] = $row['noWorkingDays'][5];
$row['SATURDAY'] = $row['noWorkingDays'][6];
$G_PUBLISH = new Publisher();
$G_PUBLISH->AddContent( "image", "image", "workPeriodGraph" );
$G_PUBLISH->AddContent( "xmlform", "xmlform", "setup/workPeriod", "", $row, "workPeriodSave" );
G::RenderPage( 'publish' );
G::RenderPage( 'publish' );
?>

View File

@@ -1,10 +1,10 @@
<?php
/**
* workPeriodGraph.php
*
*
* ProcessMaker Open Source Edition
* Copyright (C) 2004 - 2008 Colosa Inc.23
*
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
@@ -12,91 +12,93 @@
*
* 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
* 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.,
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/
if (($RBAC_Response=$RBAC->userCanAccess("PM_SETUP"))!=1) return $RBAC_Response;
Header("Content-type: image/jpeg");
if (($RBAC_Response = $RBAC->userCanAccess( "PM_SETUP" )) != 1)
return $RBAC_Response;
Header( "Content-type: image/jpeg" );
G::LoadClass( "workPeriod" );
G::LoadClass( "workPeriod" );
$dbc = new DBConnection;
$ses = new DBSession( $dbc );
$obj = new workPeriod( $dbc );
$row = $obj->Load ();
$dbc = new DBConnection();
$ses = new DBSession( $dbc );
$obj = new workPeriod( $dbc );
$initPeriod1 = $row['initPeriod1']/ 60;
$endPeriod1 = $row['endPeriod1'] / 60;
$initPeriod2 = $row['initPeriod2']/ 60;
$endPeriod2 = $row['endPeriod2'] / 60;
$noWorkingDays = $row['noWorkingDays'];
$row = $obj->Load();
$cant = 7;
$initPeriod1 = $row['initPeriod1'] / 60;
$endPeriod1 = $row['endPeriod1'] / 60;
$initPeriod2 = $row['initPeriod2'] / 60;
$endPeriod2 = $row['endPeriod2'] / 60;
$noWorkingDays = $row['noWorkingDays'];
$w = 660;
$h = $cant*18 + 20;
$im= ImageCreate($w, $h);
$width = $w;
$height = $h;
$center_x = intval($width / 2);
$center_y = intval($height / 2);
$bgcolor = ImageColorAllocate($im, 250, 250, 255);
$plomo = ImageColorAllocate($im, 220, 220, 220);
$orange = ImageColorAllocate($im, 255, 64, 64);
$gris = ImageColorAllocate($im, 150, 150, 155);
$white = ImageColorAllocate($im, 255, 255, 255);
$red = ImageColorAllocate($im, 255, 0, 0);
$brown = ImageColorAllocate($im, 160, 80, 0);
$black = ImageColorAllocate($im, 0,0,0);
ImageFilledRectangle($im, 0, 0, $width-1, $height-1, $bgcolor);
ImageRectangle ($im, 0, 0, $width-1, $height-1, $black);
$cant = 7;
$w = 660;
$h = $cant * 18 + 20;
$im = ImageCreate( $w, $h );
$width = $w;
$height = $h;
$center_x = intval( $width / 2 );
$center_y = intval( $height / 2 );
$x = 10; $y = 20;
$x1 = 78;
$x2 = $x1 + 2*6;
$bgcolor = ImageColorAllocate( $im, 250, 250, 255 );
$plomo = ImageColorAllocate( $im, 220, 220, 220 );
$orange = ImageColorAllocate( $im, 255, 64, 64 );
$gris = ImageColorAllocate( $im, 150, 150, 155 );
$white = ImageColorAllocate( $im, 255, 255, 255 );
$red = ImageColorAllocate( $im, 255, 0, 0 );
$brown = ImageColorAllocate( $im, 160, 80, 0 );
$black = ImageColorAllocate( $im, 0, 0, 0 );
ImageFilledRectangle( $im, 0, 0, $width - 1, $height - 1, $bgcolor );
ImageRectangle( $im, 0, 0, $width - 1, $height - 1, $black );
$weekday[0] = 'Sunday';
$weekday[1] = 'Monday';
$weekday[2] = 'Tuesday';
$weekday[3] = 'Wednesday';
$weekday[4] = 'Thursday';
$weekday[5] = 'Friday';
$weekday[6] = 'Saturday';
for ( $day = 0; $day < count ($weekday ); $day ++ ) {
ImageString($im, 2, $x, $y, $weekday[$day], $black);
for ($i = 0; $i < 24*6; $i++) {
ImageRectangle($im, $x1+$i* 4, $y, $x1+ ($i+1)*4, $y+12, $plomo );
if ( $i >= $initPeriod1 * 6 && $i < $endPeriod2 * 6 && ( $i < $endPeriod1 * 6 || $i >= $initPeriod2 * 6 ) )
$color = $orange;
else
$color = $white;
if ( isset ( $noWorkingDays[ $day ]) && $noWorkingDays[ $day ] ) $color = $white;
ImageFillToBorder($im, $x1+$i*4+1, $y+1, $plomo, $color );
$x = 10;
$y = 20;
$x1 = 78;
$x2 = $x1 + 2 * 6;
$weekday[0] = 'Sunday';
$weekday[1] = 'Monday';
$weekday[2] = 'Tuesday';
$weekday[3] = 'Wednesday';
$weekday[4] = 'Thursday';
$weekday[5] = 'Friday';
$weekday[6] = 'Saturday';
for ($day = 0; $day < count( $weekday ); $day ++) {
ImageString( $im, 2, $x, $y, $weekday[$day], $black );
for ($i = 0; $i < 24 * 6; $i ++) {
ImageRectangle( $im, $x1 + $i * 4, $y, $x1 + ($i + 1) * 4, $y + 12, $plomo );
if ($i >= $initPeriod1 * 6 && $i < $endPeriod2 * 6 && ($i < $endPeriod1 * 6 || $i >= $initPeriod2 * 6))
$color = $orange;
else
$color = $white;
if (isset( $noWorkingDays[$day] ) && $noWorkingDays[$day])
$color = $white;
ImageFillToBorder( $im, $x1 + $i * 4 + 1, $y + 1, $plomo, $color );
}
$y+=18;
}
$y += 18;
}
$y = 20;
for ($i = 0; $i <= 24; $i++) {
ImageLine($im, $x1+$i* 4*6, $y-5, $x1+ $i*4*6, $y-5+18*$cant, $gris);
if ( $i < 24 ) {
ImageLine($im, $x2+$i* 4*6, $y-5, $x2+ $i*4*6, $y-5+18*$cant, $plomo);
ImageString($im, 1, $x1+$i* 4*6, $y-10, $i, $black);
$y = 20;
for ($i = 0; $i <= 24; $i ++) {
ImageLine( $im, $x1 + $i * 4 * 6, $y - 5, $x1 + $i * 4 * 6, $y - 5 + 18 * $cant, $gris );
if ($i < 24) {
ImageLine( $im, $x2 + $i * 4 * 6, $y - 5, $x2 + $i * 4 * 6, $y - 5 + 18 * $cant, $plomo );
ImageString( $im, 1, $x1 + $i * 4 * 6, $y - 10, $i, $black );
}
}
//ImageString($im, 2, 5, 5, $initPeriod1*6 . ", $endPeriod1, $initPeriod2, $endPeriod2 ", $black);
}
//ImageString($im, 2, 5, 5, $initPeriod1*6 . ", $endPeriod1, $initPeriod2, $endPeriod2 ", $black);
ImageJpeg( $im );
ImageJpeg($im);
?>

View File

@@ -1,10 +1,10 @@
<?php
/**
* workPeriodSave.php
*
*
* ProcessMaker Open Source Edition
* Copyright (C) 2004 - 2008 Colosa Inc.23
*
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
@@ -12,32 +12,32 @@
*
* 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
* 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.,
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/
if (($RBAC_Response=$RBAC->userCanAccess("PM_SETUP"))!=1) return $RBAC_Response;
G::LoadClass( "workPeriod" );
if (($RBAC_Response = $RBAC->userCanAccess( "PM_SETUP" )) != 1)
return $RBAC_Response;
G::LoadClass( "workPeriod" );
$frm = $_POST['form'];
$noWorkingDays[0] = isset ( $frm['SUNDAY'] ) && $frm['SUNDAY'] != '';
$noWorkingDays[1] = isset ( $frm['MONDAY'] ) && $frm['MONDAY'] != '';
$noWorkingDays[2] = isset ( $frm['TUESDAY'] ) && $frm['TUESDAY'] != '';
$noWorkingDays[3] = isset ( $frm['WEDNESDAY']) && $frm['WEDNESDAY'] != '';
$noWorkingDays[4] = isset ( $frm['THURSDAY'] ) && $frm['THURSDAY'] != '';
$noWorkingDays[5] = isset ( $frm['FRIDAY'] ) && $frm['FRIDAY'] != '';
$noWorkingDays[6] = isset ( $frm['SATURDAY'] ) && $frm['SATURDAY'] != '';
$frm = $_POST['form'];
$noWorkingDays[0] = isset( $frm['SUNDAY'] ) && $frm['SUNDAY'] != '';
$noWorkingDays[1] = isset( $frm['MONDAY'] ) && $frm['MONDAY'] != '';
$noWorkingDays[2] = isset( $frm['TUESDAY'] ) && $frm['TUESDAY'] != '';
$noWorkingDays[3] = isset( $frm['WEDNESDAY'] ) && $frm['WEDNESDAY'] != '';
$noWorkingDays[4] = isset( $frm['THURSDAY'] ) && $frm['THURSDAY'] != '';
$noWorkingDays[5] = isset( $frm['FRIDAY'] ) && $frm['FRIDAY'] != '';
$noWorkingDays[6] = isset( $frm['SATURDAY'] ) && $frm['SATURDAY'] != '';
$dbc = new DBConnection();
$obj = new workPeriod( $dbc );
$obj->Save( $frm['initPeriod1'], $frm['endPeriod1'], $frm['initPeriod2'], $frm['endPeriod2'], $noWorkingDays );
print "ok";
die();
$dbc = new DBConnection();
$obj = new workPeriod( $dbc );
$obj->Save ( $frm['initPeriod1'], $frm['endPeriod1'], $frm['initPeriod2'], $frm['endPeriod2'], $noWorkingDays );
print "ok";
die;
?>

View File

@@ -1,10 +1,10 @@
<?php
/**
* conditions_Edit.php
*
*
* ProcessMaker Open Source Edition
* Copyright (C) 2004 - 2008 Colosa Inc.23
*
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
@@ -12,39 +12,37 @@
*
* 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
* 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.,
* 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.
*
*/
try {
global $RBAC;
switch ($RBAC->userCanAccess('PM_FACTORY')) {
case -2:
G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels');
G::header('location: ../login/login');
die;
break;
case -1:
G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels');
G::header('location: ../login/login');
die;
break;
}
require_once 'classes/model/Step.php';
$oStep = new Step();
$aFields = $oStep->load($_GET['UID']);
G::LoadClass('xmlfield_InputPM');
$G_PUBLISH = new Publisher();
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'steps/conditions_Edit', '', $aFields, '../steps/conditions_Save');
G::RenderPage('publish-raw' , 'raw');
global $RBAC;
switch ($RBAC->userCanAccess( 'PM_FACTORY' )) {
case - 2:
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels' );
G::header( 'location: ../login/login' );
die();
break;
case - 1:
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
G::header( 'location: ../login/login' );
die();
break;
}
require_once 'classes/model/Step.php';
$oStep = new Step();
$aFields = $oStep->load( $_GET['UID'] );
G::LoadClass( 'xmlfield_InputPM' );
$G_PUBLISH = new Publisher();
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'steps/conditions_Edit', '', $aFields, '../steps/conditions_Save' );
G::RenderPage( 'publish-raw', 'raw' );
} catch (Exception $oException) {
die( $oException->getMessage() );
}
catch (Exception $oException) {
die($oException->getMessage());
}
?>

View File

@@ -1,10 +1,10 @@
<?php
/**
* conditions_Save.php
*
*
* ProcessMaker Open Source Edition
* Copyright (C) 2004 - 2008 Colosa Inc.23
*
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
@@ -12,42 +12,41 @@
*
* 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
* 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.,
* 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.
*
*/
try {
global $RBAC;
switch ($RBAC->userCanAccess('PM_FACTORY')) {
case -2:
G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels');
G::header('location: ../login/login');
die;
break;
case -1:
G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels');
G::header('location: ../login/login');
die;
break;
}
require_once 'classes/model/Step.php';
$oStep = new Step();
if(isset ($_POST['form']))
$value=$_POST['form'];
else
$value=$_POST;
$oStep->update(array('STEP_UID' => $value['STEP_UID'], 'STEP_CONDITION' => $value['STEP_CONDITION']));
G::LoadClass('processMap');
$oProcessMap = new ProcessMap();
$oProcessMap->getStepsCriteria($value['TAS_UID']);
global $RBAC;
switch ($RBAC->userCanAccess( 'PM_FACTORY' )) {
case - 2:
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels' );
G::header( 'location: ../login/login' );
die();
break;
case - 1:
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
G::header( 'location: ../login/login' );
die();
break;
}
require_once 'classes/model/Step.php';
$oStep = new Step();
if (isset( $_POST['form'] ))
$value = $_POST['form'];
else
$value = $_POST;
$oStep->update( array ('STEP_UID' => $value['STEP_UID'],'STEP_CONDITION' => $value['STEP_CONDITION']
) );
G::LoadClass( 'processMap' );
$oProcessMap = new ProcessMap();
$oProcessMap->getStepsCriteria( $value['TAS_UID'] );
} catch (Exception $oException) {
die( $oException->getMessage() );
}
catch (Exception $oException) {
die($oException->getMessage());
}
?>

File diff suppressed because it is too large Load Diff

View File

@@ -1,10 +1,10 @@
<?php
/**
* steps_Delete.php
*
*
* ProcessMaker Open Source Edition
* Copyright (C) 2004 - 2008 Colosa Inc.23
*
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
@@ -12,40 +12,37 @@
*
* 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
* 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.,
* 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.
*
*/
try {
global $RBAC;
switch ($RBAC->userCanAccess('PM_FACTORY'))
{
case -2:
G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels');
G::header('location: ../login/login');
die;
break;
case -1:
G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels');
G::header('location: ../login/login');
die;
break;
}
require_once 'classes/model/Step.php';
$oStep = new Step();
$oStep->reOrder($_POST['STEP_UID'], $_POST['STEP_POSITION']);
$oStep->remove($_POST['STEP_UID']);
G::LoadClass('processMap');
$oProcessMap = new ProcessMap();
$oProcessMap->getStepsCriteria($_POST['TASK']);
global $RBAC;
switch ($RBAC->userCanAccess( 'PM_FACTORY' )) {
case - 2:
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels' );
G::header( 'location: ../login/login' );
die();
break;
case - 1:
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
G::header( 'location: ../login/login' );
die();
break;
}
require_once 'classes/model/Step.php';
$oStep = new Step();
$oStep->reOrder( $_POST['STEP_UID'], $_POST['STEP_POSITION'] );
$oStep->remove( $_POST['STEP_UID'] );
G::LoadClass( 'processMap' );
$oProcessMap = new ProcessMap();
$oProcessMap->getStepsCriteria( $_POST['TASK'] );
} catch (Exception $oException) {
die( $oException->getMessage() );
}
catch (Exception $oException) {
die($oException->getMessage());
}
?>

View File

@@ -1,10 +1,10 @@
<?php
/**
* steps_Down.php
*
*
* ProcessMaker Open Source Edition
* Copyright (C) 2004 - 2008 Colosa Inc.23
*
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
@@ -12,39 +12,36 @@
*
* 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
* 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.,
* 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.
*
*/
try {
global $RBAC;
switch ($RBAC->userCanAccess('PM_FACTORY'))
{
case -2:
G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels');
G::header('location: ../login/login');
die;
break;
case -1:
G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels');
G::header('location: ../login/login');
die;
break;
}
require_once 'classes/model/Step.php';
$oStep = new Step();
$oStep->down($_POST['STEP_UID'], $_POST['TASK'] ,$_POST['STEP_POSITION']);
G::LoadClass('processMap');
$oProcessMap = new ProcessMap();
$oProcessMap->getStepsCriteria($_POST['TASK']);
global $RBAC;
switch ($RBAC->userCanAccess( 'PM_FACTORY' )) {
case - 2:
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels' );
G::header( 'location: ../login/login' );
die();
break;
case - 1:
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
G::header( 'location: ../login/login' );
die();
break;
}
require_once 'classes/model/Step.php';
$oStep = new Step();
$oStep->down( $_POST['STEP_UID'], $_POST['TASK'], $_POST['STEP_POSITION'] );
G::LoadClass( 'processMap' );
$oProcessMap = new ProcessMap();
$oProcessMap->getStepsCriteria( $_POST['TASK'] );
} catch (Exception $oException) {
die( $oException->getMessage() );
}
catch (Exception $oException) {
die($oException->getMessage());
}
?>

Some files were not shown because too many files have changed in this diff Show More