Merge branch 'master' of bitbucket.org:colosa/processmaker

This commit is contained in:
Wendy Nestor
2014-04-02 09:35:22 -04:00
60 changed files with 597 additions and 314 deletions

View File

@@ -596,9 +596,14 @@ class Configurations // extends Configuration
break;
}
}
setlocale(LC_TIME, $langLocate . ".utf8");
$dateTime = strftime($newCreation, mktime($h, $i, $s, $m, $d, $y));
if (defined('PARTNER_FLAG')) {
setlocale(LC_TIME, $langLocate);
$dateTime = utf8_encode(strftime($newCreation, mktime($h, $i, $s, $m, $d, $y)));
} else {
setlocale(LC_TIME, $langLocate . ".utf8");
$dateTime = strftime($newCreation, mktime($h, $i, $s, $m, $d, $y));
}
if (strpos($dateTime, ' ') !== false) {
$dateTime = ucwords($dateTime);

View File

@@ -151,6 +151,39 @@ class PMScript
*/
public function setScript ($sScript = '')
{
if (!defined("T_ML_COMMENT")) {
define("T_ML_COMMENT", T_COMMENT);
} else {
define("T_DOC_COMMENT", T_ML_COMMENT);
}
$script = "<?php " . $sScript;
$tokens = token_get_all($script);
$result = "";
foreach ($tokens as $token) {
if (is_string($token)) {
$result = $result . $token;
} else {
list($id, $text) = $token;
switch ($id) {
case T_OPEN_TAG:
case T_CLOSE_TAG:
case T_COMMENT:
case T_ML_COMMENT: //we've defined this
case T_DOC_COMMENT: //and this
break;
default:
$result = $result . $text;
break;
}
}
}
$result = trim($result);
$sScript = $result;
$this->sScript = $sScript;
}
@@ -582,7 +615,7 @@ function handleFatalErrors ($buffer)
if (strpos( $_SERVER['REQUEST_URI'], '&ACTION=GENERATE' ) !== false) {
$aNextStep = $oCase->getNextStep( $_SESSION['PROCESS'], $_SESSION['APPLICATION'], $_SESSION['INDEX'], $_SESSION['STEP_POSITION'] );
if ($_SESSION['TRIGGER_DEBUG']['ISSET']) {
$_SESSION['TRIGGER_DEBUG']['TIME'] = 'AFTER';
$_SESSION['TRIGGER_DEBUG']['TIME'] = G::toUpper(G::loadTranslation('ID_AFTER'));
$_SESSION['TRIGGER_DEBUG']['BREAKPAGE'] = $aNextStep['PAGE'];
$aNextStep['PAGE'] = $aNextStep['PAGE'] . '&breakpoint=triggerdebug';
}
@@ -605,7 +638,7 @@ function handleFatalErrors ($buffer)
} else {
$aNextStep = $oCase->getNextStep( $_SESSION['PROCESS'], $_SESSION['APPLICATION'], $_SESSION['INDEX'], $_SESSION['STEP_POSITION'] );
if (isset($_SESSION['TRIGGER_DEBUG']['ISSET']) && $_SESSION['TRIGGER_DEBUG']['ISSET']) {
$_SESSION['TRIGGER_DEBUG']['TIME'] = 'AFTER';
$_SESSION['TRIGGER_DEBUG']['TIME'] = G::toUpper(G::loadTranslation('ID_AFTER'));
$_SESSION['TRIGGER_DEBUG']['BREAKPAGE'] = $aNextStep['PAGE'];
$aNextStep['PAGE'] = $aNextStep['PAGE'] . '&breakpoint=triggerdebug';
}

View File

@@ -157,6 +157,7 @@ class processMap
$oTask->position->x = (int) $aRow1['TAS_POSX'];
$oTask->position->y = (int) $aRow1['TAS_POSY'];
$oTask->derivation = new StdClass();
$oTask->derivation->type = '';
$oTask->derivation->to = array();
$oCriteria = new Criteria('workflow');
$oCriteria->add(RoutePeer::PRO_UID, $sProcessUID);
@@ -1909,7 +1910,7 @@ class processMap
$aConditions[] = array('C2.CON_LANG', $sDelimiter . SYS_LANG . $sDelimiter );
$oCriteria->addJoinMC($aConditions, Criteria::LEFT_JOIN);
$oCriteria->add(DynaformPeer::PRO_UID, $sProcessUID);
$oCriteria->addAscendingOrderByColumn('DYN_TITLE');
$oDataset = DynaformPeer::doSelectRS($oCriteria);
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$oDataset->next();

View File

@@ -1096,7 +1096,7 @@ class workspaceTools
$command = 'mysql'
. ' --host=' . $parameters['dbHost']
. ' --user=' . $parameters['dbUser']
. ' --password=' . $parameters['dbPass']
. ' --password=' . str_replace('"', '\"', str_replace("'", "\'", quotemeta($parameters['dbPass'])))//no change! supports the type passwords: .\+*?[^]($)'"\"'
. ' --database=' . mysql_real_escape_string($database)
. ' --default_character_set utf8'
. ' --execute="SOURCE '.$filename.'"';

View File

@@ -392,9 +392,21 @@ class AdditionalTables extends BaseAdditionalTables
$oCriteria = new Criteria($aData['DBS_UID']);
//eval('$oCriteria->addSelectColumn("\'1\' AS DUMMY");');
/*
* data type:
* 'INTEGER' 'BIGINT' 'SMALLINT' 'TINYINT' 'DECIMAL' 'DOUBLE' 'FLOAT' 'REAL'
* 'CHAR' 'VARCHAR' 'LONGVARCHAR' 'BOOLEAN' 'DATE' 'DATETIME' 'TIME'
*/
$types = array('DECIMAL', 'DOUBLE', 'FLOAT', 'REAL');
if ($keyOrderUppercase == true) {
foreach ($aData['FIELDS'] as $aField) {
eval('$oCriteria->addSelectColumn(' . $sClassPeerName . '::' . $aField['FLD_NAME'] . ');');
$field = '$oCriteria->addSelectColumn(' . $sClassPeerName . '::' . $aField['FLD_NAME'] . ');';
if (in_array($aField['FLD_TYPE'], $types)) {
$field = '$oCriteria->addAsColumn("' . $aField['FLD_NAME'] . '", "round(" . ' . $sClassPeerName . '::' . $aField['FLD_NAME'] . ' . ", 2)" );';
}
eval($field);
/*if ($aField['FLD_KEY'] == '1') {
eval('$oCriteria->addAscendingOrderByColumn('. $sClassPeerName . '::' . $aField['FLD_NAME'] . ');');
}*/
@@ -405,37 +417,27 @@ class AdditionalTables extends BaseAdditionalTables
eval('$count = ' . $sClassPeerName . '::doCount($oCriteria);');
if ($filter != '' && is_string($filter)) {
eval('$fieldsTable = ' . $sClassPeerName . '::getFieldNames(BasePeer::TYPE_FIELDNAME);');
$countField = count($fieldsTable);
$stringOr = '$oCriteria->add(';
$cont = 0;
$fieldAppUid = '';
foreach ($fieldsTable as $value) {
if ($value != 'APP_UID') {
if (($cont+1) == $countField) {
if ($aData['FIELDS'][$cont]['FLD_TYPE'] == 'VARCHAR') {
$stringOr .= '$oCriteria->getNewCriterion(' . $sClassPeerName . '::' . strtoupper($value) . ', "%' . $filter . '%", Criteria::LIKE)';
$closure = '';
$compare = '';
$types = array('INTEGER', 'BIGINT', 'SMALLINT', 'TINYINT', 'DECIMAL', 'DOUBLE', 'FLOAT', 'REAL');
foreach ($aData['FIELDS'] as $aField) {
if ($aField['FLD_NAME'] != 'APP_UID') {
$compare = '"%' . $filter . '%", Criteria::LIKE';
if (in_array($aField['FLD_TYPE'], $types)) {
if (is_numeric($filter)) {
$compare = '"' . $filter . '", Criteria::EQUAL';
} else {
$stringOr .= '$oCriteria->getNewCriterion(' . $sClassPeerName . '::' . strtoupper($value) . ', "' . $filter . '", Criteria::LIKE)';
}
} else {
if ($aData['FIELDS'][$cont]['FLD_TYPE'] == 'VARCHAR') {
$stringOr .= '$oCriteria->getNewCriterion(' . $sClassPeerName . '::' . strtoupper($value) . ', "%' . $filter . '%", Criteria::LIKE)->addOr(';
} else {
$stringOr .= '$oCriteria->getNewCriterion(' . $sClassPeerName . '::' . strtoupper($value) . ', "' . $filter . '", Criteria::LIKE)->addOr(';
$compare = 'null, Criteria::ISNULL';
}
}
} else {
$fieldAppUid = $cont;
}
$cont++;
}
for ($c = 0; $c < $countField-1; $c++) {
if ($fieldAppUid !== $c) {
$stringOr .= ')';
$stringOr = $stringOr . '$oCriteria->getNewCriterion(' . $sClassPeerName . '::' . $aField['FLD_NAME'] . ', ' . $compare . ')->addOr(';
$closure = $closure . ")";
}
}
$stringOr .= ');';
$stringOr = rtrim($stringOr, '->addOr(') . $closure . ';';
eval($stringOr);
$oCriteriaCount = clone $oCriteria;

View File

@@ -8,7 +8,6 @@ include_once 'creole/CreoleTypes.php';
* This class adds structure of 'OUTPUT_DOCUMENT' table to 'workflow' DatabaseMap object.
*
*
*
* These statically-built map classes are used by Propel to do runtime db structure discovery.
* For example, the createSelectSql() method checks the type of a given column used in an
* ORDER BY clause to know whether it needs to apply SQL to make the ORDER BY case-insensitive
@@ -105,6 +104,8 @@ class OutputDocumentMapBuilder
$tMap->addColumn('OUT_DOC_PDF_SECURITY_PERMISSIONS', 'OutDocPdfSecurityPermissions', 'string', CreoleTypes::VARCHAR, false, 150);
$tMap->addColumn('OUT_DOC_OPEN_TYPE', 'OutDocOpenType', 'int', CreoleTypes::INTEGER, false, null);
$tMap->addValidator('OUT_DOC_UID', 'maxLength', 'propel.validator.MaxLengthValidator', '32', 'Output Document UID can be no larger than 32 in size');
$tMap->addValidator('OUT_DOC_UID', 'required', 'propel.validator.RequiredValidator', '', 'Output Document UID is required.');

View File

@@ -4,16 +4,15 @@ require_once 'propel/om/BaseObject.php';
require_once 'propel/om/Persistent.php';
include_once 'propel/util/Criteria.php';
include_once 'classes/model/OutputDocumentPeer.php';
/**
* Base class that represents a row from the 'OUTPUT_DOCUMENT' table.
*
*
*
*
* @package workflow.classes.model.om
*/
abstract class BaseOutputDocument extends BaseObject implements Persistent
@@ -147,6 +146,12 @@ abstract class BaseOutputDocument extends BaseObject implements Persistent
*/
protected $out_doc_pdf_security_permissions = '';
/**
* The value for the out_doc_open_type field.
* @var int
*/
protected $out_doc_open_type = 0;
/**
* Flag to prevent endless save loop, if this object is referenced
* by another object which falls in this transaction.
@@ -381,6 +386,17 @@ abstract class BaseOutputDocument extends BaseObject implements Persistent
return $this->out_doc_pdf_security_permissions;
}
/**
* Get the [out_doc_open_type] column value.
*
* @return int
*/
public function getOutDocOpenType()
{
return $this->out_doc_open_type;
}
/**
* Set the value of [out_doc_uid] column.
*
@@ -821,6 +837,28 @@ abstract class BaseOutputDocument extends BaseObject implements Persistent
} // setOutDocPdfSecurityPermissions()
/**
* Set the value of [out_doc_open_type] column.
*
* @param int $v new value
* @return void
*/
public function setOutDocOpenType($v)
{
// Since the native PHP type for this column is integer,
// we will cast the input value to an int (if it is not).
if ($v !== null && !is_int($v) && is_numeric($v)) {
$v = (int) $v;
}
if ($this->out_doc_open_type !== $v || $v === 0) {
$this->out_doc_open_type = $v;
$this->modifiedColumns[] = OutputDocumentPeer::OUT_DOC_OPEN_TYPE;
}
} // setOutDocOpenType()
/**
* Hydrates (populates) the object variables with values from the database resultset.
*
@@ -878,12 +916,14 @@ abstract class BaseOutputDocument extends BaseObject implements Persistent
$this->out_doc_pdf_security_permissions = $rs->getString($startcol + 19);
$this->out_doc_open_type = $rs->getInt($startcol + 20);
$this->resetModified();
$this->setNew(false);
// FIXME - using NUM_COLUMNS may be clearer.
return $startcol + 20; // 20 = OutputDocumentPeer::NUM_COLUMNS - OutputDocumentPeer::NUM_LAZY_LOAD_COLUMNS).
return $startcol + 21; // 21 = OutputDocumentPeer::NUM_COLUMNS - OutputDocumentPeer::NUM_LAZY_LOAD_COLUMNS).
} catch (Exception $e) {
throw new PropelException("Error populating OutputDocument object", $e);
@@ -1147,6 +1187,9 @@ abstract class BaseOutputDocument extends BaseObject implements Persistent
case 19:
return $this->getOutDocPdfSecurityPermissions();
break;
case 20:
return $this->getOutDocOpenType();
break;
default:
return null;
break;
@@ -1187,6 +1230,7 @@ abstract class BaseOutputDocument extends BaseObject implements Persistent
$keys[17] => $this->getOutDocPdfSecurityOpenPassword(),
$keys[18] => $this->getOutDocPdfSecurityOwnerPassword(),
$keys[19] => $this->getOutDocPdfSecurityPermissions(),
$keys[20] => $this->getOutDocOpenType(),
);
return $result;
}
@@ -1278,6 +1322,9 @@ abstract class BaseOutputDocument extends BaseObject implements Persistent
case 19:
$this->setOutDocPdfSecurityPermissions($value);
break;
case 20:
$this->setOutDocOpenType($value);
break;
} // switch()
}
@@ -1381,6 +1428,10 @@ abstract class BaseOutputDocument extends BaseObject implements Persistent
$this->setOutDocPdfSecurityPermissions($arr[$keys[19]]);
}
if (array_key_exists($keys[20], $arr)) {
$this->setOutDocOpenType($arr[$keys[20]]);
}
}
/**
@@ -1472,6 +1523,10 @@ abstract class BaseOutputDocument extends BaseObject implements Persistent
$criteria->add(OutputDocumentPeer::OUT_DOC_PDF_SECURITY_PERMISSIONS, $this->out_doc_pdf_security_permissions);
}
if ($this->isColumnModified(OutputDocumentPeer::OUT_DOC_OPEN_TYPE)) {
$criteria->add(OutputDocumentPeer::OUT_DOC_OPEN_TYPE, $this->out_doc_open_type);
}
return $criteria;
}
@@ -1564,6 +1619,8 @@ abstract class BaseOutputDocument extends BaseObject implements Persistent
$copyObj->setOutDocPdfSecurityPermissions($this->out_doc_pdf_security_permissions);
$copyObj->setOutDocOpenType($this->out_doc_open_type);
$copyObj->setNew(true);

View File

@@ -7,9 +7,9 @@ include_once 'classes/model/OutputDocument.php';
/**
* Base static class for performing query and update operations on the 'OUTPUT_DOCUMENT' table.
*
*
*
*
* @package workflow.classes.model.om
*/
abstract class BaseOutputDocumentPeer
@@ -25,7 +25,7 @@ abstract class BaseOutputDocumentPeer
const CLASS_DEFAULT = 'classes.model.OutputDocument';
/** The total number of columns. */
const NUM_COLUMNS = 20;
const NUM_COLUMNS = 21;
/** The number of lazy-loaded columns. */
const NUM_LAZY_LOAD_COLUMNS = 0;
@@ -91,6 +91,9 @@ abstract class BaseOutputDocumentPeer
/** the column name for the OUT_DOC_PDF_SECURITY_PERMISSIONS field */
const OUT_DOC_PDF_SECURITY_PERMISSIONS = 'OUTPUT_DOCUMENT.OUT_DOC_PDF_SECURITY_PERMISSIONS';
/** the column name for the OUT_DOC_OPEN_TYPE field */
const OUT_DOC_OPEN_TYPE = 'OUTPUT_DOCUMENT.OUT_DOC_OPEN_TYPE';
/** The PHP to DB Name Mapping */
private static $phpNameMap = null;
@@ -102,10 +105,10 @@ abstract class BaseOutputDocumentPeer
* e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id'
*/
private static $fieldNames = array (
BasePeer::TYPE_PHPNAME => array ('OutDocUid', 'ProUid', 'OutDocReportGenerator', 'OutDocLandscape', 'OutDocMedia', 'OutDocLeftMargin', 'OutDocRightMargin', 'OutDocTopMargin', 'OutDocBottomMargin', 'OutDocGenerate', 'OutDocType', 'OutDocCurrentRevision', 'OutDocFieldMapping', 'OutDocVersioning', 'OutDocDestinationPath', 'OutDocTags', 'OutDocPdfSecurityEnabled', 'OutDocPdfSecurityOpenPassword', 'OutDocPdfSecurityOwnerPassword', 'OutDocPdfSecurityPermissions', ),
BasePeer::TYPE_COLNAME => array (OutputDocumentPeer::OUT_DOC_UID, OutputDocumentPeer::PRO_UID, OutputDocumentPeer::OUT_DOC_REPORT_GENERATOR, OutputDocumentPeer::OUT_DOC_LANDSCAPE, OutputDocumentPeer::OUT_DOC_MEDIA, OutputDocumentPeer::OUT_DOC_LEFT_MARGIN, OutputDocumentPeer::OUT_DOC_RIGHT_MARGIN, OutputDocumentPeer::OUT_DOC_TOP_MARGIN, OutputDocumentPeer::OUT_DOC_BOTTOM_MARGIN, OutputDocumentPeer::OUT_DOC_GENERATE, OutputDocumentPeer::OUT_DOC_TYPE, OutputDocumentPeer::OUT_DOC_CURRENT_REVISION, OutputDocumentPeer::OUT_DOC_FIELD_MAPPING, OutputDocumentPeer::OUT_DOC_VERSIONING, OutputDocumentPeer::OUT_DOC_DESTINATION_PATH, OutputDocumentPeer::OUT_DOC_TAGS, OutputDocumentPeer::OUT_DOC_PDF_SECURITY_ENABLED, OutputDocumentPeer::OUT_DOC_PDF_SECURITY_OPEN_PASSWORD, OutputDocumentPeer::OUT_DOC_PDF_SECURITY_OWNER_PASSWORD, OutputDocumentPeer::OUT_DOC_PDF_SECURITY_PERMISSIONS, ),
BasePeer::TYPE_FIELDNAME => array ('OUT_DOC_UID', 'PRO_UID', 'OUT_DOC_REPORT_GENERATOR', 'OUT_DOC_LANDSCAPE', 'OUT_DOC_MEDIA', 'OUT_DOC_LEFT_MARGIN', 'OUT_DOC_RIGHT_MARGIN', 'OUT_DOC_TOP_MARGIN', 'OUT_DOC_BOTTOM_MARGIN', 'OUT_DOC_GENERATE', 'OUT_DOC_TYPE', 'OUT_DOC_CURRENT_REVISION', 'OUT_DOC_FIELD_MAPPING', 'OUT_DOC_VERSIONING', 'OUT_DOC_DESTINATION_PATH', 'OUT_DOC_TAGS', 'OUT_DOC_PDF_SECURITY_ENABLED', 'OUT_DOC_PDF_SECURITY_OPEN_PASSWORD', 'OUT_DOC_PDF_SECURITY_OWNER_PASSWORD', 'OUT_DOC_PDF_SECURITY_PERMISSIONS', ),
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, )
BasePeer::TYPE_PHPNAME => array ('OutDocUid', 'ProUid', 'OutDocReportGenerator', 'OutDocLandscape', 'OutDocMedia', 'OutDocLeftMargin', 'OutDocRightMargin', 'OutDocTopMargin', 'OutDocBottomMargin', 'OutDocGenerate', 'OutDocType', 'OutDocCurrentRevision', 'OutDocFieldMapping', 'OutDocVersioning', 'OutDocDestinationPath', 'OutDocTags', 'OutDocPdfSecurityEnabled', 'OutDocPdfSecurityOpenPassword', 'OutDocPdfSecurityOwnerPassword', 'OutDocPdfSecurityPermissions', 'OutDocOpenType', ),
BasePeer::TYPE_COLNAME => array (OutputDocumentPeer::OUT_DOC_UID, OutputDocumentPeer::PRO_UID, OutputDocumentPeer::OUT_DOC_REPORT_GENERATOR, OutputDocumentPeer::OUT_DOC_LANDSCAPE, OutputDocumentPeer::OUT_DOC_MEDIA, OutputDocumentPeer::OUT_DOC_LEFT_MARGIN, OutputDocumentPeer::OUT_DOC_RIGHT_MARGIN, OutputDocumentPeer::OUT_DOC_TOP_MARGIN, OutputDocumentPeer::OUT_DOC_BOTTOM_MARGIN, OutputDocumentPeer::OUT_DOC_GENERATE, OutputDocumentPeer::OUT_DOC_TYPE, OutputDocumentPeer::OUT_DOC_CURRENT_REVISION, OutputDocumentPeer::OUT_DOC_FIELD_MAPPING, OutputDocumentPeer::OUT_DOC_VERSIONING, OutputDocumentPeer::OUT_DOC_DESTINATION_PATH, OutputDocumentPeer::OUT_DOC_TAGS, OutputDocumentPeer::OUT_DOC_PDF_SECURITY_ENABLED, OutputDocumentPeer::OUT_DOC_PDF_SECURITY_OPEN_PASSWORD, OutputDocumentPeer::OUT_DOC_PDF_SECURITY_OWNER_PASSWORD, OutputDocumentPeer::OUT_DOC_PDF_SECURITY_PERMISSIONS, OutputDocumentPeer::OUT_DOC_OPEN_TYPE, ),
BasePeer::TYPE_FIELDNAME => array ('OUT_DOC_UID', 'PRO_UID', 'OUT_DOC_REPORT_GENERATOR', 'OUT_DOC_LANDSCAPE', 'OUT_DOC_MEDIA', 'OUT_DOC_LEFT_MARGIN', 'OUT_DOC_RIGHT_MARGIN', 'OUT_DOC_TOP_MARGIN', 'OUT_DOC_BOTTOM_MARGIN', 'OUT_DOC_GENERATE', 'OUT_DOC_TYPE', 'OUT_DOC_CURRENT_REVISION', 'OUT_DOC_FIELD_MAPPING', 'OUT_DOC_VERSIONING', 'OUT_DOC_DESTINATION_PATH', 'OUT_DOC_TAGS', 'OUT_DOC_PDF_SECURITY_ENABLED', 'OUT_DOC_PDF_SECURITY_OPEN_PASSWORD', 'OUT_DOC_PDF_SECURITY_OWNER_PASSWORD', 'OUT_DOC_PDF_SECURITY_PERMISSIONS', 'OUT_DOC_OPEN_TYPE', ),
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, )
);
/**
@@ -115,10 +118,10 @@ abstract class BaseOutputDocumentPeer
* e.g. self::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0
*/
private static $fieldKeys = array (
BasePeer::TYPE_PHPNAME => array ('OutDocUid' => 0, 'ProUid' => 1, 'OutDocReportGenerator' => 2, 'OutDocLandscape' => 3, 'OutDocMedia' => 4, 'OutDocLeftMargin' => 5, 'OutDocRightMargin' => 6, 'OutDocTopMargin' => 7, 'OutDocBottomMargin' => 8, 'OutDocGenerate' => 9, 'OutDocType' => 10, 'OutDocCurrentRevision' => 11, 'OutDocFieldMapping' => 12, 'OutDocVersioning' => 13, 'OutDocDestinationPath' => 14, 'OutDocTags' => 15, 'OutDocPdfSecurityEnabled' => 16, 'OutDocPdfSecurityOpenPassword' => 17, 'OutDocPdfSecurityOwnerPassword' => 18, 'OutDocPdfSecurityPermissions' => 19, ),
BasePeer::TYPE_COLNAME => array (OutputDocumentPeer::OUT_DOC_UID => 0, OutputDocumentPeer::PRO_UID => 1, OutputDocumentPeer::OUT_DOC_REPORT_GENERATOR => 2, OutputDocumentPeer::OUT_DOC_LANDSCAPE => 3, OutputDocumentPeer::OUT_DOC_MEDIA => 4, OutputDocumentPeer::OUT_DOC_LEFT_MARGIN => 5, OutputDocumentPeer::OUT_DOC_RIGHT_MARGIN => 6, OutputDocumentPeer::OUT_DOC_TOP_MARGIN => 7, OutputDocumentPeer::OUT_DOC_BOTTOM_MARGIN => 8, OutputDocumentPeer::OUT_DOC_GENERATE => 9, OutputDocumentPeer::OUT_DOC_TYPE => 10, OutputDocumentPeer::OUT_DOC_CURRENT_REVISION => 11, OutputDocumentPeer::OUT_DOC_FIELD_MAPPING => 12, OutputDocumentPeer::OUT_DOC_VERSIONING => 13, OutputDocumentPeer::OUT_DOC_DESTINATION_PATH => 14, OutputDocumentPeer::OUT_DOC_TAGS => 15, OutputDocumentPeer::OUT_DOC_PDF_SECURITY_ENABLED => 16, OutputDocumentPeer::OUT_DOC_PDF_SECURITY_OPEN_PASSWORD => 17, OutputDocumentPeer::OUT_DOC_PDF_SECURITY_OWNER_PASSWORD => 18, OutputDocumentPeer::OUT_DOC_PDF_SECURITY_PERMISSIONS => 19, ),
BasePeer::TYPE_FIELDNAME => array ('OUT_DOC_UID' => 0, 'PRO_UID' => 1, 'OUT_DOC_REPORT_GENERATOR' => 2, 'OUT_DOC_LANDSCAPE' => 3, 'OUT_DOC_MEDIA' => 4, 'OUT_DOC_LEFT_MARGIN' => 5, 'OUT_DOC_RIGHT_MARGIN' => 6, 'OUT_DOC_TOP_MARGIN' => 7, 'OUT_DOC_BOTTOM_MARGIN' => 8, 'OUT_DOC_GENERATE' => 9, 'OUT_DOC_TYPE' => 10, 'OUT_DOC_CURRENT_REVISION' => 11, 'OUT_DOC_FIELD_MAPPING' => 12, 'OUT_DOC_VERSIONING' => 13, 'OUT_DOC_DESTINATION_PATH' => 14, 'OUT_DOC_TAGS' => 15, 'OUT_DOC_PDF_SECURITY_ENABLED' => 16, 'OUT_DOC_PDF_SECURITY_OPEN_PASSWORD' => 17, 'OUT_DOC_PDF_SECURITY_OWNER_PASSWORD' => 18, 'OUT_DOC_PDF_SECURITY_PERMISSIONS' => 19, ),
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, )
BasePeer::TYPE_PHPNAME => array ('OutDocUid' => 0, 'ProUid' => 1, 'OutDocReportGenerator' => 2, 'OutDocLandscape' => 3, 'OutDocMedia' => 4, 'OutDocLeftMargin' => 5, 'OutDocRightMargin' => 6, 'OutDocTopMargin' => 7, 'OutDocBottomMargin' => 8, 'OutDocGenerate' => 9, 'OutDocType' => 10, 'OutDocCurrentRevision' => 11, 'OutDocFieldMapping' => 12, 'OutDocVersioning' => 13, 'OutDocDestinationPath' => 14, 'OutDocTags' => 15, 'OutDocPdfSecurityEnabled' => 16, 'OutDocPdfSecurityOpenPassword' => 17, 'OutDocPdfSecurityOwnerPassword' => 18, 'OutDocPdfSecurityPermissions' => 19, 'OutDocOpenType' => 20, ),
BasePeer::TYPE_COLNAME => array (OutputDocumentPeer::OUT_DOC_UID => 0, OutputDocumentPeer::PRO_UID => 1, OutputDocumentPeer::OUT_DOC_REPORT_GENERATOR => 2, OutputDocumentPeer::OUT_DOC_LANDSCAPE => 3, OutputDocumentPeer::OUT_DOC_MEDIA => 4, OutputDocumentPeer::OUT_DOC_LEFT_MARGIN => 5, OutputDocumentPeer::OUT_DOC_RIGHT_MARGIN => 6, OutputDocumentPeer::OUT_DOC_TOP_MARGIN => 7, OutputDocumentPeer::OUT_DOC_BOTTOM_MARGIN => 8, OutputDocumentPeer::OUT_DOC_GENERATE => 9, OutputDocumentPeer::OUT_DOC_TYPE => 10, OutputDocumentPeer::OUT_DOC_CURRENT_REVISION => 11, OutputDocumentPeer::OUT_DOC_FIELD_MAPPING => 12, OutputDocumentPeer::OUT_DOC_VERSIONING => 13, OutputDocumentPeer::OUT_DOC_DESTINATION_PATH => 14, OutputDocumentPeer::OUT_DOC_TAGS => 15, OutputDocumentPeer::OUT_DOC_PDF_SECURITY_ENABLED => 16, OutputDocumentPeer::OUT_DOC_PDF_SECURITY_OPEN_PASSWORD => 17, OutputDocumentPeer::OUT_DOC_PDF_SECURITY_OWNER_PASSWORD => 18, OutputDocumentPeer::OUT_DOC_PDF_SECURITY_PERMISSIONS => 19, OutputDocumentPeer::OUT_DOC_OPEN_TYPE => 20, ),
BasePeer::TYPE_FIELDNAME => array ('OUT_DOC_UID' => 0, 'PRO_UID' => 1, 'OUT_DOC_REPORT_GENERATOR' => 2, 'OUT_DOC_LANDSCAPE' => 3, 'OUT_DOC_MEDIA' => 4, 'OUT_DOC_LEFT_MARGIN' => 5, 'OUT_DOC_RIGHT_MARGIN' => 6, 'OUT_DOC_TOP_MARGIN' => 7, 'OUT_DOC_BOTTOM_MARGIN' => 8, 'OUT_DOC_GENERATE' => 9, 'OUT_DOC_TYPE' => 10, 'OUT_DOC_CURRENT_REVISION' => 11, 'OUT_DOC_FIELD_MAPPING' => 12, 'OUT_DOC_VERSIONING' => 13, 'OUT_DOC_DESTINATION_PATH' => 14, 'OUT_DOC_TAGS' => 15, 'OUT_DOC_PDF_SECURITY_ENABLED' => 16, 'OUT_DOC_PDF_SECURITY_OPEN_PASSWORD' => 17, 'OUT_DOC_PDF_SECURITY_OWNER_PASSWORD' => 18, 'OUT_DOC_PDF_SECURITY_PERMISSIONS' => 19, 'OUT_DOC_OPEN_TYPE' => 20, ),
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, )
);
/**
@@ -259,6 +262,8 @@ abstract class BaseOutputDocumentPeer
$criteria->addSelectColumn(OutputDocumentPeer::OUT_DOC_PDF_SECURITY_PERMISSIONS);
$criteria->addSelectColumn(OutputDocumentPeer::OUT_DOC_OPEN_TYPE);
}
const COUNT = 'COUNT(OUTPUT_DOCUMENT.OUT_DOC_UID)';

View File

@@ -781,6 +781,7 @@
<column name="OUT_DOC_PDF_SECURITY_OPEN_PASSWORD" type="VARCHAR" size="32" required="false" default=""/>
<column name="OUT_DOC_PDF_SECURITY_OWNER_PASSWORD" type="VARCHAR" size="32" required="false" default=""/>
<column name="OUT_DOC_PDF_SECURITY_PERMISSIONS" type="VARCHAR" size="150" required="false" default=""/>
<column name="OUT_DOC_OPEN_TYPE" type="INTEGER" default="0"/>
<validator column="OUT_DOC_UID">
<rule name="maxLength" value="32" message="Output Document UID can be no larger than ${value} in size"/>
<rule name="required" message="Output Document UID is required."/>

View File

@@ -135,6 +135,7 @@ class adminProxy extends HttpProxyController
$list = $data;
}
$oRoles = new Roles();
$rows = array();
foreach ($list as $value) {
@@ -144,6 +145,13 @@ class adminProxy extends HttpProxyController
$user->save();
$row = $user->toArray(BasePeer::TYPE_FIELDNAME);
try {
$uRole = $oRoles->loadByCode($row['USR_ROLE']);
} catch (exception $oError) {
$uRole['ROL_NAME'] = G::loadTranslation( 'ID_DELETED' );
}
$row['USR_ROLE_ID'] = $row['USR_ROLE'];
$row['USR_ROLE'] = isset($uRole['ROL_NAME']) ? ($uRole['ROL_NAME'] != '' ? $uRole['ROL_NAME'] : $uRole['USR_ROLE']) : $uRole['USR_ROLE'];
$uxList = self::getUxTypesList();
$row['USR_UX'] = $uxList[$user->getUsrUx()];

View File

@@ -332,7 +332,9 @@ class Dashboard extends Controller
$users[] = array ('OWNER_UID' => $user['USR_UID'],'OWNER_NAME' => $user['USR_FIRSTNAME'] . ' ' . $user['USR_LASTNAME']
);
}
usort($users, function($str1, $str2) {
return strcmp(strtolower($str1["OWNER_NAME"]), strtolower($str2["OWNER_NAME"]));
});
$result->total = $allUsers->totalCount;
$result->owners = $users;
break;

View File

@@ -43,13 +43,13 @@ class Home extends Controller
}
public function login ($httpData)
{
{
//start new session
@session_destroy();
session_start();
session_regenerate_id();
$data = isset( $httpData->d ) ? unserialize( base64_decode( $httpData->d ) ) : '';
$data = isset( $httpData->d ) ? unserialize( base64_decode( $httpData->d ) ) : '';
$template = $this->clientBrowser['name'] == 'msie' ? 'login_ie' : 'login_standard';
$skin = $this->clientBrowser['name'] == 'msie' ? $this->lastSkin : 'simplified';
@@ -94,8 +94,20 @@ class Home extends Controller
$start = 0;
$limit = '';
$proData = $process->getAllProcesses( $start, $limit );
$processList = $case->getStartCasesPerType( $_SESSION['USER_LOGGED'], 'category' );
$proData = $process->getAllProcesses( $start, $limit, null, null, false, true );
$processList = $case->getStartCasesPerType( $_SESSION['USER_LOGGED'], 'category' );
unset( $processList[0] );
$processesList = array ();
foreach ($processList as $key => $valueProcess) {
foreach ($proData as $keyPro => $valuePro) {
if ($valueProcess['pro_uid'] == $valuePro['PRO_UID']) {
$processesList[] = $valueProcess;
}
}
}
$switchLink = $userProperty->getUserLocation( $_SESSION['USER_LOGGED'] );
if (!isset($_COOKIE['workspaceSkin'])) {
@@ -105,7 +117,13 @@ class Home extends Controller
}
}
unset( $processList[0] );
$oServerConf = & serverConf::getSingleton();
if ($oServerConf->isRtl( SYS_LANG )) {
$swRtl = 1;
} else {
$swRtl = 0;
}
//Get simplified options
global $G_TMP_MENU;
@@ -132,13 +150,14 @@ class Home extends Controller
$this->setVar( 'usrUid', $this->userID );
$this->setVar( 'userName', $this->userName );
$this->setVar( 'processList', $processList );
$this->setVar( 'processList', $processesList );
$this->setVar( 'canStartCase', $case->canStartCase( $_SESSION['USER_LOGGED'] ) );
$this->setVar( 'userUxType', $this->userUxType );
$this->setVar( 'clientBrowser', $this->clientBrowser['name'] );
$this->setVar( 'switchLink', $switchLink );
$this->setVar( 'arrayMnuOption', $arrayMnuOption );
$this->setVar( 'mnuNewCase', $mnuNewCase );
$this->setVar( 'rtl', $swRtl );
$this->render();
}
@@ -183,7 +202,7 @@ class Home extends Controller
}
public function appList ($httpData)
{
{
// setting default list applications types [default: todo]
$httpData->t = isset( $httpData->t ) ? $httpData->t : 'todo';
@@ -270,7 +289,7 @@ class Home extends Controller
}
public function getApps ($httpData)
{
{
$cases = $this->getAppsData( $httpData->t, $httpData->start, $httpData->limit );
$this->setView( $this->userUxBaseTemplate . PATH_SEP . 'applications' );
@@ -293,7 +312,7 @@ class Home extends Controller
$dir = null,
$sort = "APP_CACHE_VIEW.APP_NUMBER",
$category = null)
{
{
require_once ("classes/model/AppNotes.php");
G::LoadClass( 'applications' );
@@ -545,7 +564,7 @@ class Home extends Controller
return $status;
}
function getProcessArray($action, $userUid)
{
{
global $oAppCache;
$processes = array();
@@ -576,6 +595,7 @@ class Home extends Controller
$cProcess->addJoinMC($conds, Criteria::LEFT_JOIN);
$cProcess->add(ProcessPeer::PRO_STATUS, "ACTIVE");
$oDataset = ProcessPeer::doSelectRS($cProcess);
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$oDataset->next();

View File

@@ -199,6 +199,7 @@ class pmTablesProxy extends HttpProxyController
$result = new StdClass();
try {
$result = new stdClass();
ob_start();
$data = (array) $httpData;
$data['PRO_UID'] = trim( $data['PRO_UID'] );
@@ -327,6 +328,7 @@ class pmTablesProxy extends HttpProxyController
$result->success = true;
$result->message = $result->msg = $buildResult;
} catch (Exception $e) {
$result = new stdClass();
$buildResult = ob_get_contents();
ob_end_clean();
$result->success = false;
@@ -353,6 +355,7 @@ class pmTablesProxy extends HttpProxyController
*/
public function delete ($httpData)
{
$result = new stdClass();
$rows = G::json_decode( stripslashes( $httpData->rows ) );
$errors = '';
$count = 0;
@@ -737,6 +740,7 @@ class pmTablesProxy extends HttpProxyController
{
require_once 'classes/model/AdditionalTables.php';
try {
$result = new stdClass();
$errors = '';
$overWrite = isset( $_POST['form']['OVERWRITE'] ) ? true : false;
@@ -964,6 +968,7 @@ class pmTablesProxy extends HttpProxyController
$result->message = $msg;
} catch (Exception $e) {
$result = new stdClass();
$result->errorType = 'error';
$result->buildResult = ob_get_contents();
ob_end_clean();
@@ -995,6 +1000,7 @@ class pmTablesProxy extends HttpProxyController
$tablesToExport = G::json_decode( stripslashes( $httpData->rows ) );
try {
$result = new stdClass();
G::LoadCLass( 'net' );
$net = new NET( G::getIpAddress() );
@@ -1095,6 +1101,7 @@ class pmTablesProxy extends HttpProxyController
$result->link = $link;
$result->message = "Generated file: $filenameOnly, size: $size";
} catch (Exception $e) {
$result = new stdClass();
$result->success = false;
$result->message = $e->getMessage();
}
@@ -1227,6 +1234,7 @@ class pmTablesProxy extends HttpProxyController
public function genDataReport ($httpData)
{
$result = new stdClass();
G::loadClass( 'pmTable' );
require_once 'classes/model/AdditionalTables.php';
$result->message = '';

View File

@@ -852,6 +852,7 @@ CREATE TABLE [OUTPUT_DOCUMENT]
[OUT_DOC_PDF_SECURITY_OPEN_PASSWORD] VARCHAR(32) default '' NULL,
[OUT_DOC_PDF_SECURITY_OWNER_PASSWORD] VARCHAR(32) default '' NULL,
[OUT_DOC_PDF_SECURITY_PERMISSIONS] VARCHAR(150) default '' NULL,
[OUT_DOC_OPEN_TYPE] INT default 0 NULL,
CONSTRAINT OUTPUT_DOCUMENT_PK PRIMARY KEY ([OUT_DOC_UID])
);

View File

@@ -374,6 +374,7 @@ CREATE TABLE `OUTPUT_DOCUMENT`
`OUT_DOC_PDF_SECURITY_OPEN_PASSWORD` VARCHAR(32) default '',
`OUT_DOC_PDF_SECURITY_OWNER_PASSWORD` VARCHAR(32) default '',
`OUT_DOC_PDF_SECURITY_PERMISSIONS` VARCHAR(150) default '',
`OUT_DOC_OPEN_TYPE` INTEGER default 0,
PRIMARY KEY (`OUT_DOC_UID`)
)ENGINE=InnoDB DEFAULT CHARSET='utf8';
#-----------------------------------------------------------------------------

View File

@@ -470,7 +470,8 @@ CREATE TABLE "OUTPUT_DOCUMENT"
"OUT_DOC_PDF_SECURITY_ENABLED" NUMBER(3,0) default 0,
"OUT_DOC_PDF_SECURITY_OPEN_PASSWORD" VARCHAR2(32) default '',
"OUT_DOC_PDF_SECURITY_OWNER_PASSWORD" VARCHAR2(32) default '',
"OUT_DOC_PDF_SECURITY_PERMISSIONS" VARCHAR2(150) default ''
"OUT_DOC_PDF_SECURITY_PERMISSIONS" VARCHAR2(150) default '',
"OUT_DOC_OPEN_TYPE" NUMBER default 0
);
ALTER TABLE "OUTPUT_DOCUMENT"

View File

@@ -334,8 +334,9 @@ class Ajax
$processData['PRO_AUTHOR'] = '(USER DELETED)';
}
$processData['PRO_CREATE_DATE'] = date('F j, Y', strtotime($processData['PRO_CREATE_DATE']));
$conf = new Configurations();
$conf->getFormats();
$processData['PRO_CREATE_DATE'] = $conf->getSystemDate($processData['PRO_CREATE_DATE']);
print (G::json_encode($processData));
}

View File

@@ -461,6 +461,7 @@ if ($actionAjax == 'historyDynaformGridPreview') {
</script>
<?php
$_SESSION['CURRENT_DYN_UID'] = $_POST['DYN_UID'];
$_SESSION['DYN_UID_PRINT'] = $_POST['DYN_UID'];
$G_PUBLISH->AddContent( 'dynaform', 'xmlform', $_SESSION['PROCESS'] . '/' . $_POST['DYN_UID'], '', $Fields['APP_DATA'], '', '', 'view' );
@@ -478,6 +479,6 @@ if ($actionAjax == 'historyDynaformGridPreview') {
</script>
<?php
G::RenderPage( 'publish', 'raw' );
G::RenderPage( 'publish', 'blank' );
}

View File

@@ -56,7 +56,7 @@ $_SESSION['TRIGGER_DEBUG']['TRIGGERS_NAMES'] = Array ();
$_SESSION['TRIGGER_DEBUG']['TRIGGERS_VALUES'] = Array ();
$triggers = $oCase->loadTriggers( $_SESSION['TASK'], 'DYNAFORM', $_GET['UID'], 'AFTER' );
$_SESSION['TRIGGER_DEBUG']['NUM_TRIGGERS'] = count( $triggers );
$_SESSION['TRIGGER_DEBUG']['TIME'] = 'AFTER';
$_SESSION['TRIGGER_DEBUG']['TIME'] = G::toUpper(G::loadTranslation('ID_AFTER'));
if ($_SESSION['TRIGGER_DEBUG']['NUM_TRIGGERS'] != 0) {
$_SESSION['TRIGGER_DEBUG']['TRIGGERS_NAMES'] = $oCase->getTriggerNames( $triggers );

View File

@@ -70,7 +70,7 @@ function getProcessList ()
if (1) {
foreach ($processList as $key => $processInfo) {
$tempTree['text'] = $key;
$tempTree['id'] = preg_replace('([^A-Za-z0-9])', '', $key);
$tempTree['id'] = md5($key);
$tempTree['cls'] = 'folder';
$tempTree['draggable'] = true;
$tempTree['optionType'] = "category";
@@ -87,7 +87,7 @@ function getProcessList ()
//print_r($processInfo);
$tempTreeChild['text'] = htmlentities($keyChild, ENT_QUOTES, 'UTF-8'); //ellipsis ( $keyChild, 50 );
//$tempTree['text']=$key;
$tempTreeChild['id'] = preg_replace('([^A-Za-z0-9 ()])', '', $keyChild);
$tempTreeChild['id'] = md5($keyChild);
$tempTreeChild['draggable'] = true;
$tempTreeChild['leaf'] = true;
$tempTreeChild['icon'] = '/images/icon.trigger.png';

View File

@@ -75,7 +75,7 @@ try {
//save trigger variables for debugger
$_SESSION['TRIGGER_DEBUG']['info'][0]['NUM_TRIGGERS'] = sizeof( $triggers );
$_SESSION['TRIGGER_DEBUG']['info'][0]['TIME'] = 'BEFORE';
$_SESSION['TRIGGER_DEBUG']['info'][0]['TIME'] = G::toUpper(G::loadTranslation('ID_BEFORE'));
$_SESSION['TRIGGER_DEBUG']['info'][0]['TRIGGERS_NAMES'] = $oCase->getTriggerNames( $triggers );
$_SESSION['TRIGGER_DEBUG']['info'][0]['TRIGGERS_VALUES'] = $triggers;
}
@@ -104,7 +104,7 @@ try {
$_SESSION['TRIGGER_DEBUG']['info'][1]['NUM_TRIGGERS'] = sizeof( $triggers );
$_SESSION['TRIGGER_DEBUG']['info'][1]['TIME'] = 'AFTER';
$_SESSION['TRIGGER_DEBUG']['info'][1]['TIME'] = G::toUpper(G::loadTranslation('ID_AFTER'));
$_SESSION['TRIGGER_DEBUG']['info'][1]['TRIGGERS_NAMES'] = $oCase->getTriggerNames( $triggers );
$_SESSION['TRIGGER_DEBUG']['info'][1]['TRIGGERS_VALUES'] = $triggers;
}

View File

@@ -69,7 +69,7 @@ try {
$triggers = $oCase->loadTriggers( $_SESSION['TASK'], 'DYNAFORM', $_GET['UID'], 'AFTER' );
$_SESSION['TRIGGER_DEBUG']['NUM_TRIGGERS'] = count( $triggers );
$_SESSION['TRIGGER_DEBUG']['TIME'] = 'AFTER';
$_SESSION['TRIGGER_DEBUG']['TIME'] = G::toUpper(G::loadTranslation('ID_AFTER'));
if ($_SESSION['TRIGGER_DEBUG']['NUM_TRIGGERS'] != 0) {
$_SESSION['TRIGGER_DEBUG']['TRIGGERS_NAMES'] = $oCase->getTriggerNames( $triggers );
$_SESSION['TRIGGER_DEBUG']['TRIGGERS_VALUES'] = $triggers;

View File

@@ -33,19 +33,26 @@ if (!isset($_SESSION['USER_LOGGED'])) {
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*/
/*
* Created on 13-02-2008
*
* @author David Callizaya <davidsantos@colosa.com>
*
* Created on 13-02-2008
*
*
* @author David Callizaya <davidsantos@colosa.com>
*/
require_once ("classes/model/AppDocumentPeer.php");
require_once ("classes/model/OutputDocumentPeer.php");
$oAppDocument = new AppDocument();
$oAppDocument->Fields = $oAppDocument->load( $_GET['a'], (isset( $_GET['v'] )) ? $_GET['v'] : null );
$sAppDocUid = $oAppDocument->getAppDocUid();
$sDocUid = $oAppDocument->Fields['DOC_UID'];
$oOutputDocument = new OutputDocument();
$oOutputDocument->Fields = $oOutputDocument->getByUid( $sDocUid );
$download = $oOutputDocument->Fields['OUT_DOC_OPEN_TYPE'];
$info = pathinfo( $oAppDocument->getAppDocFilename() );
if (! isset( $_GET['ext'] )) {
$ext = $info['extension'];
@@ -58,7 +65,7 @@ if (! isset( $_GET['ext'] )) {
}
$ver = (isset( $_GET['v'] ) && $_GET['v'] != '') ? '_' . $_GET['v'] : '';
if (! $ver) //This code is in the case the outputdocument won't be versioned
if (! $ver) //This code is in the case the outputdocument won't be versioned
$ver = '_1';
$realPath = PATH_DOCUMENT . G::getPathFromUID($oAppDocument->Fields['APP_UID']) . '/outdocs/' . $sAppDocUid . $ver . '.' . $ext;
@@ -102,7 +109,7 @@ if (! $sw_file_exists) {
$res['message'] = $info['basename'] . $ver . '.' . $ext;
print G::json_encode( $res );
} else {
G::streamFile( $realPath, true, $info['basename'] . $ver . '.' . $ext );
G::streamFile( $realPath, $download, $info['basename'] . $ver . '.' . $ext );
}
}
//G::streamFile ( $realPath, true);

View File

@@ -138,7 +138,7 @@ if (! isset( $_GET['breakpoint'] )) {
$triggers = $oCase->loadTriggers( $_SESSION['TASK'], $_GET['TYPE'], $_GET['UID'], 'BEFORE' );
$_SESSION['TRIGGER_DEBUG']['NUM_TRIGGERS'] = count( $triggers );
$_SESSION['TRIGGER_DEBUG']['TIME'] = 'BEFORE';
$_SESSION['TRIGGER_DEBUG']['TIME'] = G::toUpper(G::loadTranslation('ID_BEFORE'));
if ($_SESSION['TRIGGER_DEBUG']['NUM_TRIGGERS'] != 0) {
$_SESSION['TRIGGER_DEBUG']['TRIGGERS_NAMES'] = $oCase->getTriggerNames( $triggers );
$_SESSION['TRIGGER_DEBUG']['TRIGGERS_VALUES'] = $triggers;
@@ -187,7 +187,7 @@ $oCase->updateCase( $_SESSION['APPLICATION'], $Fields );
//Obtain previous and next step - Start
try {
try {
$oCase = new Cases();
$aNextStep = $oCase->getNextStep( $_SESSION['PROCESS'], $_SESSION['APPLICATION'], $_SESSION['INDEX'], $_SESSION['STEP_POSITION'] );
$aPreviousStep = $oCase->getPreviousStep( $_SESSION['PROCESS'], $_SESSION['APPLICATION'], $_SESSION['INDEX'], $_SESSION['STEP_POSITION'] );
@@ -259,12 +259,12 @@ try {
$G_PUBLISH->AddContent( 'dynaform', 'xmlform', $_SESSION['PROCESS'] . '/' . $_GET['UID'], '', $Fields['APP_DATA'], 'cases_SaveData?UID=' . $_GET['UID'] . '&APP_UID=' . $_SESSION['APPLICATION'], '', (strtolower( $oStep->getStepMode() ) != 'edit' ? strtolower( $oStep->getStepMode() ) : '') );
break;
case 'INPUT_DOCUMENT':
case 'INPUT_DOCUMENT':
if ($noShowTitle == 0) {
$G_PUBLISH->AddContent( 'smarty', 'cases/cases_title', '', '', $array );
}
$oInputDocument = new InputDocument();
$Fields = $oInputDocument->load( $_GET['UID'] );
$Fields = $oInputDocument->load( $_GET['UID'] );
if (! $aPreviousStep) {
$Fields['__DYNAFORM_OPTIONS']['PREVIOUS_STEP_LABEL'] = '';
$Fields['PREVIOUS_STEP_LABEL'] = '';
@@ -278,13 +278,13 @@ try {
$Fields['NEXT_STEP'] = $aNextStep['PAGE'];
$Fields['NEXT_STEP_LABEL'] = G::loadTranslation( "ID_NEXT_STEP" );
switch ($_GET['ACTION']) {
case 'ATTACH':
case 'ATTACH':
switch ($Fields['INP_DOC_FORM_NEEDED']) {
case 'REAL':
$Fields['TYPE_LABEL'] = G::LoadTranslation( 'ID_NEW' );
$sXmlForm = 'cases/cases_AttachInputDocument2';
break;
case 'VIRTUAL':
case 'VIRTUAL':
$Fields['TYPE_LABEL'] = G::LoadTranslation( 'ID_ATTACH' );
$sXmlForm = 'cases/cases_AttachInputDocument1';
break;
@@ -319,8 +319,8 @@ try {
$oHeadPublisher = & headPublisher::getSingleton();
$titleDocument = "<h3>" . $Fields['INP_DOC_TITLE'] . "<br><small>" . G::LoadTranslation( 'ID_INPUT_DOCUMENT' ) . "</small></h3>";
if ($Fields['INP_DOC_DESCRIPTION']) {
$titleDocument .= " " . str_replace( "\n", "", str_replace( "'", "\'", nl2br( htmlentities( utf8_decode( $Fields['INP_DOC_DESCRIPTION'] ) ) ) ) ) . "";
if ($Fields['INP_DOC_DESCRIPTION']) {
$titleDocument .= " " . str_replace( "\n", "", str_replace( "'", "\'", nl2br( html_entity_decode($Fields['INP_DOC_DESCRIPTION'], ENT_COMPAT | ENT_HTML401, "UTF-8") ) ) ) . "";
}
$oHeadPublisher->addScriptCode( "documentName='{$titleDocument}';" );

View File

@@ -52,6 +52,7 @@ try {
$applicationFields['APP_DATA']['__DYNAFORM_OPTIONS']['PREVIOUS_STEP'] = '#';
$applicationFields['APP_DATA']['__DYNAFORM_OPTIONS']['NEXT_STEP_LABEL'] = '';
$applicationFields['APP_DATA']['__DYNAFORM_OPTIONS']['NEXT_ACTION'] = '#';
$applicationFields['APP_DATA']['__DYNAFORM_OPTIONS']['DYNUIDPRINT'] = $_REQUEST['DYN_UID'];
G::LoadClass( 'dbConnections' );
$_SESSION['PROCESS'] = $applicationFields['PRO_UID'];

View File

@@ -118,10 +118,10 @@ if (file_exists(PATH_XMLFORM . 'dynaforms/fields/' . $type . '.xml')) {
}
if ($type === 'grid') {
if (!isset($_POST['form']['PME_ADDROW']) || $_POST['form']['PME_ADDROW'] == '') {
$_POST['form']['PME_ADDROW'] = '0';
$_POST['form']['PME_ADDROW'] = 0;
}
if (!isset($_POST['form']['PME_DELETEROW']) || $_POST['form']['PME_DELETEROW'] == '') {
$_POST['form']['PME_DELETEROW'] = '0';
$_POST['form']['PME_DELETEROW'] = 0;
}
}
if ($type === 'dropdown' || $type === 'listbox') {
@@ -147,7 +147,7 @@ foreach ($_POST['form'] as $key => $value) {
$_POST['form'] = $res;
$dbc = new DBConnection(PATH_DYNAFORM . $file . '.xml', '', '', '', 'myxml');
$dbc = new DBConnection(PATH_DYNAFORM . $file . '.xml', '', '', '', 'myxml');
$ses = new DBSession($dbc);
$fields = new DynaFormField($dbc);
@@ -179,7 +179,7 @@ unset($attributes['PRO_UID']);
$options = null;
foreach ($attributes as $key => $value) {
if ($key === 'OPTIONS') {
if ($key === 'OPTIONS') {
if (is_array($value)) {
if (is_array(reset($value))) {
$langs = array();
@@ -210,7 +210,7 @@ foreach ($attributes as $key => $value) {
} */
}
}
} else {
} else {
if (is_array($value)) {
//Is a list:
if (is_string(reset($value))) {
@@ -223,14 +223,15 @@ foreach ($attributes as $key => $value) {
}
unset($attributes['VALIDATE_NAME']);
$fields->setFileName(PATH_DYNAFORM . $file . '.xml');
$FieldAttributes = $attributes;
$FieldAttrib = array();
unset($FieldAttributes['XMLNODE_NAME']);
unset($FieldAttributes['XMLNODE_NAME_OLD']);
unset($FieldAttributes['XMLNODE_VALUE']);
unset($FieldAttributes['BTN_CANCEL']);
unset($FieldAttributes['SAVELABEL']);
foreach ($FieldAttributes as $key => $value) {
switch (gettype($value)) {
case 'string':

View File

@@ -64,6 +64,7 @@ $aTriggersFileds[] = array ('TRI_UID' => 'char','TRI_TITLE' => 'char');
foreach ($aTriggersList as $i => $v) {
unset( $aTriggersList[$i]['PRO_UID'] );
unset( $aTriggersList[$i]['TRI_DESCRIPTION'] );
unset( $aTriggersList[$i]['TRI_LOCATE_WEBBOT_PARAM'] );
$aTriggersList[$i]['TRI_TITLE'] = (strlen( $aTriggersList[$i]['TRI_TITLE'] ) > 32) ? substr( $aTriggersList[$i]['TRI_TITLE'], 0, 32 ) . '...' : $aTriggersList[$i]['TRI_TITLE'];
}

View File

@@ -229,6 +229,7 @@ $_DBArray['triggers'] = $aTriggers;
$_SESSION['_DBArray'] = $_DBArray;
$aFields = array_merge($aFields, setLabels());
$G_PUBLISH = new Publisher();
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'events/eventsEditAction', '', $aFields, '../events/eventsSave' );
//$G_PUBLISH->AddContent('xmlform', 'xmlform', 'events/eventsEditAction', '', $aFields, '../events/eventsSave');
@@ -239,3 +240,15 @@ function replaceQuotes ($aData)
return str_replace( '"', '&quote;', $aData );
}
function setLabels () {
$labels = array(
'LABEL_ADD' => G::LoadTranslation( 'ID_ADD' ),
'LABEL_ADD_CURRENT' => G::LoadTranslation( 'ID_EVENT_ADD_CURRENT' ),
'LABEL_ADD_USERS' => G::LoadTranslation( 'ID_EVENT_ADD_USERS' ),
'LABEL_REMOVED_SELECTED' => G::LoadTranslation( 'ID_EVENT_REMOVE_SELECTED' ),
'LABEL_ADD_DYNAVAR' => G::LoadTranslation( 'ID_EVENT_ADD_DYNAVAR' ),
'LABEL_ADD_GROUPS' => G::LoadTranslation( 'ID_EVENT_ADD_GROUPS' )
);
return $labels;
}

View File

@@ -54,6 +54,7 @@ $aTriggersFileds[] = array ("TRI_UID" => "char", "TRI_TITLE" => "char");
foreach ($aTriggersList as $i => $v) {
unset( $aTriggersList[$i]['PRO_UID'] );
unset( $aTriggersList[$i]['TRI_DESCRIPTION'] );
unset( $aTriggersList[$i]['TRI_LOCATE_WEBBOT_PARAM'] );
$aTriggersList[$i]['TRI_TITLE'] = (strlen( $aTriggersList[$i]['TRI_TITLE'] ) > 32) ? substr( $aTriggersList[$i]['TRI_TITLE'], 0, 32 ) . '...' : $aTriggersList[$i]['TRI_TITLE'];
}

View File

@@ -144,7 +144,7 @@ switch ($_POST['action']) {
case 'saveNewGroup':
G::LoadClass( 'groups' );
$newGroup['GRP_UID'] = '';
$newGroup['GRP_STATUS'] = G::toUpper( $_POST['status'] );
$newGroup['GRP_STATUS'] = ($_POST['status'] == '1') ? 'ACTIVE' : 'INACTIVE';
$newGroup['GRP_TITLE'] = trim( $_POST['name'] );
unset( $newGroup['GRP_UID'] );
$group = new Groupwf();
@@ -154,7 +154,7 @@ switch ($_POST['action']) {
case 'saveEditGroup':
G::LoadClass( 'groups' );
$editGroup['GRP_UID'] = $_POST['grp_uid'];
$editGroup['GRP_STATUS'] = G::toUpper( $_POST['status'] );
$editGroup['GRP_STATUS'] = ($_POST['status'] == '1') ? 'ACTIVE' : 'INACTIVE';
$editGroup['GRP_TITLE'] = trim( $_POST['name'] );
$group = new Groupwf();
$group->update( $editGroup );

View File

@@ -198,7 +198,7 @@ try {
$weblog=new LoginLog();
$aLog['LOG_UID'] = G::generateUniqueID();
$aLog['LOG_STATUS'] = 'ACTIVE';
$aLog['LOG_IP'] = $_SERVER['REMOTE_ADDR'];
$aLog['LOG_IP'] = G::getIpAddress();
$aLog['LOG_SID'] = session_id();
$aLog['LOG_INIT_DATE'] = date('Y-m-d H:i:s');
//$aLog['LOG_END_DATE'] = '0000-00-00 00:00:00';

View File

@@ -552,15 +552,30 @@ try {
$aFields = getDynaformsVars($proUid, $isSystem, isset($_REQUEST['bIncMulSelFields']) ? $_REQUEST['bIncMulSelFields'] : 1);
}
$aVariables = array();
foreach ($aFields as $key => $value) {
if ($queryText != '') {
if (stristr($aFields[$key]['sName'], $queryText)) {
if ($queryText != "") {
foreach ($aFields as $key => $value) {
if (stristr($aFields[$key]["sName"], $queryText)) {
$aVariables[] = $aFields[$key];
}
} else {
$aVariables[] = $aFields[$key];
}
} else {
switch ($_REQUEST["type"]) {
case "system" :
foreach ($aFields as $key => $value) {
if ($aFields[$key]["sType"] == "system") {
$aVariables[] = $aFields[$key];
}
}
break;
default :
foreach ($aFields as $key => $value) {
$aVariables[] = $aFields[$key];
}
break;
}
}
echo Bootstrap::json_encode($aVariables);
break;
/**

View File

@@ -138,15 +138,15 @@ switch ($request) {
if (! $currentUserIsSuper && ! $result->error) {
$res = $appCache->checkGrantsForUser( true );
if (! isset( $res['error'] )) {
$result->info[] = array ('name' => 'Root User','value' => $res['user']);
$result->info[] = array ('name' => 'Root User has SUPER privilege','value' => $res['super']);
$result->info[] = array ('name' => G::LoadTranslation ( 'ID_ROOT_USER' ), 'value' => $res['user']);
$result->info[] = array ('name' => G::LoadTranslation ( 'ID_ROOT_USER_SUPER' ), 'value' => $res['super']);
} else {
$result->info[] = array ('name' => 'Error','value' => $res['msg']);
}
$res = $appCache->setSuperForUser( $currentUser );
if (! isset( $res['error'] )) {
$result->info[] = array ('name' => 'Setting SUPER privilege','value' => 'Successfully');
$result->info[] = array ('name' => G::LoadTranslation ( 'ID_SETTING_SUPER' ), 'value' => G::LoadTranslation ( 'ID_SUCCESSFULLY' ));
} else {
$result->error = true;
$result->errorMsg = $res['msg'];

View File

@@ -89,7 +89,7 @@ switch ($_POST['action']) {
G::LoadClass('calendar');
$calendar = new Calendar();
$calendarObj = $calendar->getCalendarList(true, true);
$oData[] = array('CALENDAR_UID' => '', 'CALENDAR_NAME' => '- None -');
$oData[] = array('CALENDAR_UID' => '', 'CALENDAR_NAME' => '- ' . G::LoadTranslation('ID_NONE') . ' -');
foreach ($calendarObj['array'] as $rowid => $row) {
if ($rowid > 0) {
$oData[] = array('CALENDAR_UID' => $row['CALENDAR_UID'], 'CALENDAR_NAME' => $row['CALENDAR_NAME']);

View File

@@ -390,7 +390,9 @@ try {
$oCriteria->addSelectColumn(UsersPeer::USR_FIRSTNAME);
$oCriteria->addSelectColumn(UsersPeer::USR_LASTNAME);
$oCriteria->addSelectColumn(UsersPeer::USR_EMAIL);
$oCriteria->addSelectColumn(UsersPeer::USR_ROLE);
$oCriteria->addSelectColumn(UsersPeer::USR_DUE_DATE);
$oCriteria->addSelectColumn(UsersPeer::USR_STATUS);
$oCriteria->addSelectColumn(UsersPeer::USR_UX);
@@ -438,21 +440,26 @@ try {
$uRole = Array();
while ($oDataset->next()) {
$row = $oDataset->getRow();
try {
$uRole = $oRoles->loadByCode($row['USR_ROLE']);
} catch (exception $oError) {
$uRole['ROL_NAME'] = G::loadTranslation( 'ID_DELETED' );
}
$row['USR_ROLE_ID'] = $row['USR_ROLE'];
$row['USR_ROLE'] = isset($uRole['ROL_NAME']) ? ($uRole['ROL_NAME'] != '' ? $uRole['ROL_NAME'] : $uRole['USR_ROLE']) : $uRole['USR_ROLE'];
$row['DUE_DATE_OK'] = (date('Y-m-d') > date('Y-m-d', strtotime($row['USR_DUE_DATE']))) ? 0 : 1;
$row['LAST_LOGIN'] = isset($aLogin[$row['USR_UID']]) ? $aLogin[$row['USR_UID']] : '';
$row['TOTAL_CASES'] = isset($aCases[$row['USR_UID']]) ? $aCases[$row['USR_UID']] : 0;
$row['DEP_TITLE'] = isset($aDepart[$row['USR_UID']]) ? $aDepart[$row['USR_UID']] : '';
$row['USR_UX'] = isset($uxList[$row['USR_UX']]) ? $uxList[$row['USR_UX']] : $uxList['NORMAL'];
$row['USR_AUTH_SOURCE'] = isset($aAuthSources[$row['USR_UID']]) ? $aAuthSources[$row['USR_UID']] : 'ProcessMaker (MYSQL)';
$rows[] = $row;
}
echo '{users: ' . G::json_encode($rows) . ', total_users: ' . $totalRows . '}';
break;
case 'updatePageSize':

View File

@@ -525,6 +525,9 @@ div.topbar ul.primary-nav li ul {
div.topbar ul.secondary-nav li ul {
right: 0;
}
div.topbar ul.rtl-secondary-nav li ul {
left: 0;
}
div.topbar ul li ul li {
float: none;
clear: both;

View File

@@ -78,6 +78,7 @@ Ext.onReady(function(){
{name : 'USR_LASTNAME'},
{name : 'USR_EMAIL'},
{name : 'USR_ROLE'},
{name : 'USR_ROLE_ID'},
{name : 'USR_DUE_DATE'},
{name : 'DEP_TITLE'},
{name : 'LAST_LOGIN'},
@@ -150,9 +151,9 @@ Ext.onReady(function(){
cmodel = new Ext.grid.ColumnModel({
columns: [
{id:'USR_UID', dataIndex: 'USR_UID', hidden:true, hideable:false},
//{header: '', dataIndex: 'USR_UID', width: 30, align:'center', sortable: false, renderer: photo_user},
{header: _('ID_USER_NAME'), dataIndex: 'USR_USERNAME', width: 90, hidden:false, align:'left'},
{header: _('ID_FULL_NAME'), dataIndex: 'USR_USERNAME', width: 50, align:'left', renderer: full_name},
{dataIndex: 'USR_ROLE_ID', hidden:true, hideable:false},
{header: _('ID_ROLE'), dataIndex: 'USR_ROLE', width: 50, hidden:false, align:'left'},
{header: _('ID_STATUS'), dataIndex: 'USR_STATUS', width: 50, hidden: true, align: 'center', renderer: render_status},
{
@@ -171,12 +172,12 @@ Ext.onReady(function(){
fields: ['id', 'name'],
data : uxTypes
}),
listeners: {
select: function(a, b) {
listeners: {
select: function(combo, newValue) {
var row = usersGrid.getSelectionModel().getSelected();
role = row.get('USR_ROLE');
role = row.get('USR_ROLE_ID');
if (role == 'PROCESSMAKER_ADMIN' && (this.value == 'SIMPLIFIED' || this.value == 'SINGLE')) {
if (role == 'PROCESSMAKER_ADMIN' && (combo.getValue() == 'SIMPLIFIED' || combo.getValue() == 'SINGLE')) {
PMExt.warning(_('ID_WARNING'), _('ID_ADMINS_CANT_USE_UXS'));
this.setValue('NORMAL');
}

View File

@@ -483,8 +483,10 @@ Ext.onReady ( function() {
style = style + chain;
}
}
data = Ext.util.Format.htmlEncode(data);
metadata.attr = 'ext:qtip="' + data + '" style="'+ style +' white-space: normal; "';
return Ext.util.Format.htmlEncode(data);
return data;
};
function openLink(value, p, r){
@@ -545,9 +547,9 @@ Ext.onReady ( function() {
function renderNote(val,p,r) {
pro = r.json.PRO_UID;
tas = r.json.TAS_UID;
appUid = r.data['APP_UID'];
title = r.data['APP_TITLE'];
title = Ext.util.Format.htmlEncode(r.data['APP_TITLE']);
return '<img src="/images/ext/default/s.gif" class="x-tree-node-icon ICON_CASES_NOTES" unselectable="off" id="extdd-17" onClick="openCaseNotesWindow(\''+appUid+'\', true, \''+title+'\', \''+pro+'\', \''+tas+'\')">';
}

View File

@@ -359,8 +359,8 @@ Ext.onReady(function(){
store: triggerStore,
columns: [
{id:'name',header: "Name", width: 60, sortable: true, dataIndex: 'name'},
{header: "Execution", width: 30, sortable: true, dataIndex: 'execution_time'},
{id:'name',header: _('ID_NAME'), width: 60, sortable: true, dataIndex: 'name'},
{header: _('ID_EXECUTION'), width: 30, sortable: true, dataIndex: 'execution_time'},
{header: "Code", width: 30, sortable: false, dataIndex: 'code', hidden: true}
],

View File

@@ -241,53 +241,64 @@ Ext.onReady(function(){
if (swForm == 1) {
var requiredField = "";
var swRequiredField = 1;
var dynaformChange ="";
var swDynaformChange = 0;
if (window.frames["openCaseFrame"].document.getElementsByTagName("form")) {
dynaformChange = window.frames["openCaseFrame"].document.getElementsByTagName("form").item(0);
swDynaformChange = (window.frames["openCaseFrame"].dynaFormChanged(dynaformChange))? 1 : 0;
}
if (window.frames["openCaseFrame"].document.getElementById("DynaformRequiredFields")) {
requiredField = window.frames["openCaseFrame"].document.getElementById("DynaformRequiredFields").value;
if (requiredField != "") {
swRequiredField = (window.frames["openCaseFrame"].validateForm(requiredField))? 1 : 0;
}
}
if (swRequiredField == 1) {
Ext.MessageBox.show({
title: _("ID_CONFIRM"),
msg: _("ID_DYNAFORM_SAVE_CHANGES"),
icon: Ext.MessageBox.QUESTION,
buttons: {ok: _("ID_ACCEPT"), cancel: _("ID_CANCEL")},
fn: function (btn)
{
loadMaskStep.show();
if (swRequiredField == 1){
if (swDynaformChange) {
Ext.MessageBox.show({
title: _("ID_CONFIRM"),
msg: _("ID_DYNAFORM_SAVE_CHANGES"),
icon: Ext.MessageBox.QUESTION,
buttons: {ok: _("ID_ACCEPT"), cancel: _("ID_CANCEL")},
fn: function (btn)
{
loadMaskStep.show();
if (btn == "ok") {
var frm = window.frames["openCaseFrame"].document.getElementsByTagName("form");
if (btn == "ok") {
var frm = window.frames["openCaseFrame"].document.getElementsByTagName("form");
if (frm.length > 0) {
var result = window.frames["openCaseFrame"].ajax_post(
frm[0].action.replace("cases_SaveData", "saveForm"),
frm[0],
"POST",
function (responseText)
{
//Set URL and redirect
document.getElementById("openCaseFrame").src = node.attributes.url;
},
true
);
} else {
//Set URL and redirect
document.getElementById("openCaseFrame").src = node.attributes.url;
}
} else {
//Set URL and redirect
document.getElementById("openCaseFrame").src = node.attributes.url;
}
}
});
} else {
swNodeCurrentSelect = 1;
}
if (frm.length > 0) {
var result = window.frames["openCaseFrame"].ajax_post(
frm[0].action.replace("cases_SaveData", "saveForm"),
frm[0],
"POST",
function (responseText)
{
//Set URL and redirect
document.getElementById("openCaseFrame").src = node.attributes.url;
},
true
);
} else {
//Set URL and redirect
document.getElementById("openCaseFrame").src = node.attributes.url;
}
} else {
//Set URL and redirect
document.getElementById("openCaseFrame").src = node.attributes.url;
}
}
});
} else {
loadMaskStep.show();
document.getElementById("openCaseFrame").src = node.attributes.url;
}
} else {
swNodeCurrentSelect = 1;
}
} else {
loadMaskStep.show();

View File

@@ -87,7 +87,7 @@
<table border="0" width="100%" cellpadding="0" cellspacing="0" class="fieldshandler_item">
<tr>
<td width="15%" valign="top" align="left">
<a href='#' onmouseout="parent.hideTooltip()" onmouseover="parent.showTooltip(event,document.getElementById('help').innerHTML);return false;">
<a href='#' onclick="return false;" onmouseout="parent.hideTooltip()" onmouseover="parent.showTooltip(event,document.getElementById('help').innerHTML);return false;">
<image src="/images/help4.gif" width="16" height="16" border="0"/>
</a>
</td>

View File

@@ -1,6 +1,6 @@
/*
* Autogenerated by Processmaker Daemon System
*
*
* Generic Send Message trigger
* {timestamp}
*/
@@ -9,11 +9,11 @@ $sRecipientTO = "{TO}";
$sRecipientCC = "{CC}";
$sRecipientBCC = "{BCC}";
/*Composing the message using PMFgetUserEmailAddress() PM function*/
/*Composing the message using PMFGetUserEmailAddress() PM function*/
$from = '{from}';
$to = PMFgetUserEmailAddress($sRecipientTO, @@APPLICATION);
$cc = PMFgetUserEmailAddress($sRecipientCC, @@APPLICATION);
$bcc = PMFgetUserEmailAddress($sRecipientBCC, @@APPLICATION);
$to = PMFGetUserEmailAddress($sRecipientTO, @@APPLICATION);
$cc = PMFGetUserEmailAddress($sRecipientCC, @@APPLICATION);
$bcc = PMFGetUserEmailAddress($sRecipientBCC, @@APPLICATION);
$subject = '{subject}';
$template = '{template}';

View File

@@ -144,8 +144,8 @@ Ext.onReady(function(){
});
comboStatusStore = new Ext.data.SimpleStore({
fields: ['id','value'],
data: [['1','ACTIVE'],['0','INACTIVE']]
fields: ['changeInt','value'],
data: [['1',_('ID_ACTIVE').toUpperCase()],['0', _('ID_INACTIVE').toUpperCase()]]
});
newForm = new Ext.FormPanel({
@@ -164,11 +164,11 @@ Ext.onReady(function(){
store: comboStatusStore,
listeners : {
beforerender: function(status){
status.setValue('ACTIVE');
status.setValue('1');
}
},
displayField: 'value',
valueField:'value',
valueField:'changeInt',
allowBlank: false,
triggerAction: 'all',
emptyText: _('ID_SELECT_STATUS'),
@@ -189,13 +189,15 @@ Ext.onReady(function(){
{xtype: 'textfield', fieldLabel: _('ID_GROUP_NAME'), name: 'name', width: 200, allowBlank: false},
{
xtype: 'combo',
id: 'statusEdit',
name: 'statusEdit',
fieldLabel: _('ID_STATUS'),
hiddenName: 'status',
typeAhead: true,
mode: 'local',
store: comboStatusStore,
displayField: 'value',
valueField:'value',
valueField:'changeInt',
allowBlank: false,
editable:false,
triggerAction: 'all',
@@ -409,6 +411,7 @@ DuplicateGroupName = function(){
//Save New Group
SaveNewGroup = function(){
document.getElementById('status').value = Ext.getCmp('status').getValue();
newForm.getForm().submit({
waitTitle : "&nbsp;",
success: function(f,a){
@@ -438,7 +441,8 @@ EditGroupWindow = function(){
editForm.getForm().findField('grp_uid').setValue(rowSelected.data.GRP_UID);
editForm.getForm().findField('name').setValue(strName);
editForm.getForm().findField('status').setValue(rowSelected.data.GRP_STATUS);
var valueEditChangeInt = (rowSelected.data.GRP_STATUS == 'ACTIVE') ? '1' : '0';
editForm.getForm().findField('status').setValue(valueEditChangeInt);
w = new Ext.Window({
autoHeight: true,
width: 440,
@@ -467,6 +471,7 @@ SaveEditGroupAction = function(){
//Save Edit Group
SaveEditGroup = function(){
document.getElementById('statusEdit').value = Ext.getCmp('statusEdit').getValue();
editForm.getForm().submit({
waitTitle : "&nbsp;",
success: function(f,a){

View File

@@ -136,14 +136,16 @@
</li>
{/if}
</ul>
<ul class="nav secondary-nav">
{if $rtl eq 1}
<ul class="nav rtl-secondary-nav">
{else}
<ul class="nav secondary-nav">
{/if}
<li class="account">
<a class="menu user-photo" href="javascript:;">
<img alt="user_avatar_mini" height="24" src="users/users_ViewPhotoGrid?pUID={$usrUid}" width="24" />
<span class="menu-label screen-name">{$userName}</span>
</a>
<ul class="menu-dropdown">
<!--<li><a href="#" accesskey="s" id="settings_link">Settings</a></li>
<li><a href="#" accesskey="?" id="help_link">Help</a></li>-->

View File

@@ -210,6 +210,9 @@ Ext.onReady(function(){
sm = new Ext.grid.RowSelectionModel({
selectSingle: false,
listeners:{
rowselect: function(sm) {
validateFieldSizeAutoincrement(assignedGrid.getSelectionModel().getSelected().get('field_type'), false);
},
selectionchange: function(sm){
switch(sm.getCount()){
case 0:
@@ -250,7 +253,12 @@ Ext.onReady(function(){
nanText: 'This field should content a number',
minValue: 1,
maxValue: 99,
minLength: 0
minLength: 0,
listeners:{
render:function(){
validateFieldSizeAutoincrement(assignedGrid.getSelectionModel().getSelected().get('field_type'), false);
}
}
});
@@ -356,65 +364,12 @@ Ext.onReady(function(){
}
},
'select': function(combo, row, index) {
if( cm && cm instanceof Ext.grid.ColumnModel) {
if(selCombo != combo.getValue()) {
Ext.getCmp('sizeEdit').setValue('');
}
selCombo = combo.getValue();
var swSize = 1; //Enable
var swAI = 1;
//Date
if (selCombo == "TIME" || selCombo == "DATE" || selCombo == "DATETIME") {
swSize = 0; //Disable
swAI = 0;
}
//Numbers
if (selCombo == "BIGINT" || selCombo == "INTEGER" || selCombo == "SMALLINT" || selCombo == "TINYINT") {
//Enable All
}
if (selCombo == "DECIMAL" || selCombo == "FLOAT" || selCombo == "REAL" || selCombo == "DOUBLE") {
swSize = 0;
swAI = 0;
}
if (selCombo == "CHAR" || selCombo =="VARCHAR" || selCombo == "LONGVARCHAR") {
var swAI = 0;
}
//Boolean
if (selCombo == "BOOLEAN") {
swSize = 0;
swAI = 0;
}
if (swAI == 1) {
Ext.getCmp("field_incre").enable();
} else {
Ext.getCmp("field_incre").disable();
Ext.getCmp("field_incre").setValue(false);
}
if (swSize == 1) {
Ext.getCmp("sizeEdit").enable();
if (selCombo == "CHAR" || selCombo =="VARCHAR" || selCombo == "LONGVARCHAR") {
Ext.getCmp("sizeEdit").setMaxValue(((selCombo == "CHAR") ? 255 : 999));
sizeField.getEl().dom.maxLength = 3;
} else {
Ext.getCmp("sizeEdit").setMaxValue(99);
sizeField.getEl().dom.maxLength = 2;
}
} else {
Ext.getCmp("sizeEdit").disable();
Ext.getCmp("sizeEdit").setValue("");
}
flagShowMessageError = 1;
}
if (cm && cm instanceof Ext.grid.ColumnModel) {
var valueCombo = combo.getValue();
var changeValue = !(valueCombo === assignedGrid.getSelectionModel().getSelected().get('field_type'));
validateFieldSizeAutoincrement(valueCombo, changeValue);
flagShowMessageError = 1;
}
}//select
}
})
@@ -442,6 +397,45 @@ Ext.onReady(function(){
}
}
];
function validateFieldSizeAutoincrement(valueType, defaultValue) {
if (Ext.getCmp("sizeEdit").getEl()) {
if (valueType === 'INTEGER' || valueType === 'BIGINT' || valueType === 'SMALLINT' || valueType === 'TINYINT') {
Ext.getCmp("sizeEdit").enable();
Ext.getCmp("sizeEdit").setMaxValue(99);
Ext.getCmp("sizeEdit").getEl().dom.maxLength = 2;
if (defaultValue) {
Ext.getCmp("sizeEdit").setValue('');
}
Ext.getCmp("field_incre").enable();
if (defaultValue) {
Ext.getCmp("field_incre").setValue(false);
}
}
if (valueType === 'CHAR' || valueType === 'VARCHAR' || valueType === 'LONGVARCHAR') {
Ext.getCmp("sizeEdit").enable();
Ext.getCmp("sizeEdit").setMaxValue(((valueType === 'CHAR') ? 255 : 999));
Ext.getCmp("sizeEdit").getEl().dom.maxLength = 3;
if (defaultValue) {
Ext.getCmp("sizeEdit").setValue('');
}
Ext.getCmp("field_incre").disable();
Ext.getCmp("field_incre").setValue(false);
}
if (valueType === 'BOOLEAN' || valueType === 'DATE' || valueType === 'DATETIME' || valueType === 'TIME' || valueType === 'DECIMAL' || valueType === 'DOUBLE' || valueType === 'FLOAT' || valueType === 'REAL') {
Ext.getCmp("sizeEdit").disable();
Ext.getCmp("sizeEdit").setValue('');
Ext.getCmp("field_incre").disable();
Ext.getCmp("field_incre").setValue(false);
}
}
}
//if permissions plugin is enabled
if (TABLE !== false && TABLE.ADD_TAB_TAG == 'plugin@simplereport') {
@@ -536,6 +530,7 @@ Ext.onReady(function(){
beforeedit: function(roweditor, rowIndex) {
row = assignedGrid.getSelectionModel().getSelected();
if (row.get('field_name') == 'APP_UID' || row.get('field_name') == 'APP_NUMBER' || row.get('field_name') == 'ROW') {
editor.stopEditing();
return false;
}
}

View File

@@ -15,10 +15,10 @@
</TAS_TITLE>
<SCH_TIME_NEXT_RUN type="text" titlealign="left" align="left" colWidth="120">
<en>Time next run</en>
<en>Next execution time</en>
</SCH_TIME_NEXT_RUN>
<SCH_LAST_RUN_TIME type="text" titlealign="left" align="left" colWidth="120">
<en>Last run time</en>
<en>Last execution time</en>
</SCH_LAST_RUN_TIME>
<SCH_STATUS_LNK type="link" align="left" titlealign="left" colWidth="50" value="@G::LoadTranslation(ID_@#SCH_STATE)" link="cases_Scheduler_ChangeStatus?SCH_UID=@#SCH_UID">

View File

@@ -9,11 +9,11 @@
<en>User</en>
</USER>
<INIT_DATE type="date" mode="view">
<INIT_DATE type="text" mode="view">
<en>Init Date</en>
</INIT_DATE>
<DUE_DATE type="date" mode="view">
<DUE_DATE type="text" mode="view">
<en>Due date</en>
</DUE_DATE>
@@ -25,4 +25,4 @@
<en>Duration</en>
</DURATION>
</dynaForm>
</dynaForm>

View File

@@ -60,14 +60,14 @@
<table>
<tr>
<td rowspan="3">{$form.EVN_MESSAGE_TO_TO_SIMPLEADD}<br/>{$form.EVN_MESSAGE_TO_TO}</td>
<td><a title="Add" href="#" onclick="e=new EventCompose('EVN_MESSAGE_TO_TO');e.add();return false;"><img src="/images/addc.png" width="15px" height="15px" border="0"/></a></td>
<td><a title="Add current task user" href="#" onclick="e=new EventCompose('EVN_MESSAGE_TO_TO');e.toAdd('-1', '(Current Task User)', 'usr'); return false;"><img src="/images/user-id-32x32.png" width="15px" height="15px" border="0"/></a></td>
<td><a title="Add users" href="#" onclick="e=new EventCompose('EVN_MESSAGE_TO_TO');e.showUsers(event); return false;"><img src="/images/add-user-32x32.png" width="15px" height="15px" border="0"/></a></td>
<td><a name="labelAdd" href="#" onclick="e=new EventCompose('EVN_MESSAGE_TO_TO');e.add();return false;"><img src="/images/addc.png" width="15px" height="15px" border="0"/></a></td>
<td><a name="labelAddCurrent" title="Add current task user" href="#" onclick="e=new EventCompose('EVN_MESSAGE_TO_TO');e.toAdd('-1', '(Current Task User)', 'usr'); return false;"><img src="/images/user-id-32x32.png" width="15px" height="15px" border="0"/></a></td>
<td><a name="labelAddUsers" title="Add users" href="#" onclick="e=new EventCompose('EVN_MESSAGE_TO_TO');e.showUsers(event); return false;"><img src="/images/add-user-32x32.png" width="15px" height="15px" border="0"/></a></td>
</tr>
<tr>
<td><a title="Remove selected" href="#" onclick="e=new EventCompose('EVN_MESSAGE_TO_TO');e.dropSel();return false;"><img src="/images/delete-icon.png" width="15px" height="15px" border="0"/></a></td>
<td><a title="Add dynavar" href="#" onclick="e=new EventCompose('EVN_MESSAGE_TO_TO');e.showDynavars(event); return false;"><img src="/images/dynavars.png" width="18px" height="15px" border="0"/></a></td>
<td><a title="Add groups" href="#" onclick="e=new EventCompose('EVN_MESSAGE_TO_TO');e.showGroups(event); return false;"><img src="/images/group_add.png" width="15px" height="15px" border="0"/></a></td>
<td><a name="labelRemoved" title="Remove selected" href="#" onclick="e=new EventCompose('EVN_MESSAGE_TO_TO');e.dropSel();return false;"><img src="/images/delete-icon.png" width="15px" height="15px" border="0"/></a></td>
<td><a name="labelAddDynavar" title="Add dynavar" href="#" onclick="e=new EventCompose('EVN_MESSAGE_TO_TO');e.showDynavars(event); return false;"><img src="/images/dynavars.png" width="18px" height="15px" border="0"/></a></td>
<td><a name="labelAddGroup" title="Add groups" href="#" onclick="e=new EventCompose('EVN_MESSAGE_TO_TO');e.showGroups(event); return false;"><img src="/images/group_add.png" width="15px" height="15px" border="0"/></a></td>
</tr>
<tr>
<td>&nbsp;</td>
@@ -86,14 +86,14 @@
<table>
<tr>
<td rowspan="3">{$form.EVN_MESSAGE_TO_CC_SIMPLEADD}<br/>{$form.EVN_MESSAGE_TO_CC}</td>
<td><a title="Add" href="#" onclick="e=new EventCompose('EVN_MESSAGE_TO_CC');e.add();return false;"><img src="/images/addc.png" width="15px" height="15px" border="0"/></a></td>
<td><a title="Add current task user" href="#" onclick="e=new EventCompose('EVN_MESSAGE_TO_CC');e.toAdd('-1', '(Current Task User)', 'usr'); return false;"><img src="/images/user-id-32x32.png" width="15px" height="15px" border="0"/></a></td>
<td><a title="Add users" href="#" onclick="e=new EventCompose('EVN_MESSAGE_TO_CC');e.showUsers(event); return false;"><img src="/images/add-user-32x32.png" width="15px" height="15px" border="0"/></a></td>
<td><a name="labelAdd" href="#" onclick="e=new EventCompose('EVN_MESSAGE_TO_CC');e.add();return false;"><img src="/images/addc.png" width="15px" height="15px" border="0"/></a></td>
<td><a name="labelAddCurrent" title="Add current task user" href="#" onclick="e=new EventCompose('EVN_MESSAGE_TO_CC');e.toAdd('-1', '(Current Task User)', 'usr'); return false;"><img src="/images/user-id-32x32.png" width="15px" height="15px" border="0"/></a></td>
<td><a name="labelAddUsers" title="Add users" href="#" onclick="e=new EventCompose('EVN_MESSAGE_TO_CC');e.showUsers(event); return false;"><img src="/images/add-user-32x32.png" width="15px" height="15px" border="0"/></a></td>
</tr>
<tr>
<td><a title="Remove selected" href="#" onclick="e=new EventCompose('EVN_MESSAGE_TO_CC');e.dropSel();return false;"><img src="/images/delete-icon.png" width="15px" height="15px" border="0"/></a></td>
<td><a title="Add dynavar" href="#" onclick="e=new EventCompose('EVN_MESSAGE_TO_CC');e.showDynavars(event); return false;"><img src="/images/dynavars.png" width="18px" height="15px" border="0"/></a></td>
<td><a title="Add groups" href="#" onclick="e=new EventCompose('EVN_MESSAGE_TO_CC');e.showGroups(event); return false;"><img src="/images/group_add.png" width="15px" height="15px" border="0"/></a></td>
<td><a name="labelRemoved" title="Remove selected" href="#" onclick="e=new EventCompose('EVN_MESSAGE_TO_CC');e.dropSel();return false;"><img src="/images/delete-icon.png" width="15px" height="15px" border="0"/></a></td>
<td><a name="labelAddDynavar" title="Add dynavar" href="#" onclick="e=new EventCompose('EVN_MESSAGE_TO_CC');e.showDynavars(event); return false;"><img src="/images/dynavars.png" width="18px" height="15px" border="0"/></a></td>
<td><a name="labelAddGroup" title="Add groups" href="#" onclick="e=new EventCompose('EVN_MESSAGE_TO_CC');e.showGroups(event); return false;"><img src="/images/group_add.png" width="15px" height="15px" border="0"/></a></td>
</tr>
<tr>
<td>&nbsp;</td>
@@ -111,14 +111,14 @@
<table>
<tr>
<td rowspan="3">{$form.EVN_MESSAGE_TO_BCC_SIMPLEADD}<br/>{$form.EVN_MESSAGE_TO_BCC}</td>
<td><a title="Add" href="#" onclick="e=new EventCompose('EVN_MESSAGE_TO_BCC');e.add();return false;"><img src="/images/addc.png" width="15px" height="15px" border="0"/></a></td>
<td><a title="Add current task user" href="#" onclick="e=new EventCompose('EVN_MESSAGE_TO_BCC');e.toAdd('-1', '(Current Task User)', 'usr'); return false;"><img src="/images/user-id-32x32.png" width="15px" height="15px" border="0"/></a></td>
<td><a title="Add users" href="#" onclick="e=new EventCompose('EVN_MESSAGE_TO_BCC');e.showUsers(event); return false;"><img src="/images/add-user-32x32.png" width="15px" height="15px" border="0"/></a></td>
<td><a name="labelAdd" href="#" onclick="e=new EventCompose('EVN_MESSAGE_TO_BCC');e.add();return false;"><img src="/images/addc.png" width="15px" height="15px" border="0"/></a></td>
<td><a name="labelAddCurrent" title="Add current task user" href="#" onclick="e=new EventCompose('EVN_MESSAGE_TO_BCC');e.toAdd('-1', '(Current Task User)', 'usr'); return false;"><img src="/images/user-id-32x32.png" width="15px" height="15px" border="0"/></a></td>
<td><a name="labelAddUsers" title="Add users" href="#" onclick="e=new EventCompose('EVN_MESSAGE_TO_BCC');e.showUsers(event); return false;"><img src="/images/add-user-32x32.png" width="15px" height="15px" border="0"/></a></td>
</tr>
<tr>
<td><a title="Remove selected" href="#" onclick="e=new EventCompose('EVN_MESSAGE_TO_BCC');e.dropSel();return false;"><img src="/images/delete-icon.png" width="15px" height="15px" border="0"/></a></td>
<td><a title="Add dynavar" href="#" onclick="e=new EventCompose('EVN_MESSAGE_TO_BCC');e.showDynavars(event); return false;"><img src="/images/dynavars.png" width="18px" height="15px" border="0"/></a></td>
<td><a title="Add groups" href="#" onclick="e=new EventCompose('EVN_MESSAGE_TO_BCC');e.showGroups(event); return false;"><img src="/images/group_add.png" width="15px" height="15px" border="0"/></a></td>
<td><a name="labelRemoved" title="Remove selected" href="#" onclick="e=new EventCompose('EVN_MESSAGE_TO_BCC');e.dropSel();return false;"><img src="/images/delete-icon.png" width="15px" height="15px" border="0"/></a></td>
<td><a name="labelAddDynavar" title="Add dynavar" href="#" onclick="e=new EventCompose('EVN_MESSAGE_TO_BCC');e.showDynavars(event); return false;"><img src="/images/dynavars.png" width="18px" height="15px" border="0"/></a></td>
<td><a name="labelAddGroup" title="Add groups" href="#" onclick="e=new EventCompose('EVN_MESSAGE_TO_BCC');e.showGroups(event); return false;"><img src="/images/group_add.png" width="15px" height="15px" border="0"/></a></td>
</tr>
<tr>
<td>&nbsp;</td>
@@ -141,6 +141,14 @@
</td>
</tr>
</table>
<div style="display:none;">
{$form.LABEL_ADD}
{$form.LABEL_ADD_CURRENT}
{$form.LABEL_ADD_USERS}
{$form.LABEL_REMOVED_SELECTED}
{$form.LABEL_ADD_DYNAVAR}
{$form.LABEL_ADD_GROUPS}
</div>
<div class="FormRequiredTextMessage"><font color="red">* </font>{php}echo (G::LoadTranslation('ID_REQUIRED_FIELD'));{/php}</div> </div>
<div class="boxBottom"><div class="a"></div><div class="b"></div><div class="c"></div></div>
</div>

View File

@@ -83,6 +83,14 @@ SELECT TRI_UID, TRI_TITLE FROM triggers
<en>Save</en>
</SAVE>
<LABEL_ADD type="hidden" />
<LABEL_ADD_CURRENT type="hidden" />
<LABEL_ADD_USERS type="hidden" />
<LABEL_REMOVED_SELECTED type="hidden" />
<LABEL_ADD_DYNAVAR type="hidden" />
<LABEL_ADD_GROUPS type="hidden" />
<JS type="javascript"><![CDATA[
@@ -151,6 +159,37 @@ function cancel(){
currentPopupWindow.remove();
}
var lAdd = document.getElementsByName("labelAdd");
for(var i=0; i<lAdd.length; i++) {
lAdd[i].title = getField('LABEL_ADD').value;
}
var lAddCur = document.getElementsByName("labelAddCurrent");
for(var i=0; i<lAddCur.length; i++) {
lAddCur[i].title = getField('LABEL_ADD_CURRENT').value;
}
var lAddCur = document.getElementsByName("labelAddUsers");
for(var i=0; i<lAddCur.length; i++) {
lAddCur[i].title = getField('LABEL_ADD_USERS').value;
}
var lRemo = document.getElementsByName("labelRemoved");
for(var i=0; i<lRemo.length; i++) {
lRemo[i].title = getField('LABEL_REMOVED_SELECTED').value;
}
var lAddDyn = document.getElementsByName("labelAddDynavar");
for(var i=0; i<lAddDyn.length; i++) {
lAddDyn[i].title = getField('LABEL_ADD_DYNAVAR').value;
}
var lAddGro = document.getElementsByName("labelAddGroup");
for(var i=0; i<lAddGro.length; i++) {
lAddGro[i].title = getField('LABEL_ADD_GROUPS').value;
}
]]></JS>
</dynaForm>

View File

@@ -124,6 +124,10 @@
<!-- <td class='FormFieldContent' width="{$form_width}" >{$form.OUT_DOC_TAGS} </td> //-->
<td class="FormFieldContent" width="{$form_fieldContentWidth}">{$form.OUT_DOC_TAGS}</td>
</tr>
<tr>
<td class="FormLabel" width="{$form_labelWidth}">{$OUT_DOC_OPEN_TYPE}</td>
<td class="FormFieldContent" width="{$form_fieldContentWidth}">{$form.OUT_DOC_OPEN_TYPE}</td>
</tr>
<tr>
<td class="FormButton" colspan="2" align="center"></td>
</tr>

View File

@@ -103,6 +103,9 @@
</en>
</OUT_DOC_PDF_SECURITY_PERMISSIONS>
<OUT_DOC_OPEN_TYPE type="dropdown">
<en>By clicking on the generated file link<option name="0">Download the file</option><option name="1">Open the file</option></en>
</OUT_DOC_OPEN_TYPE>
<BTN_CANCEL type="button" onclick="cancel();">
<en>Cancel</en>
@@ -194,7 +197,6 @@ var verifyTitle = function(oForm)
}
function cancel(){
currentPopupWindow.remove();
}

View File

@@ -72,6 +72,11 @@ function transactionLog($transactionName){
}
}
// Validating if exists 'HTTP_USER_AGENT' key in $_SERVER array
if (!isset($_SERVER['HTTP_USER_AGENT'])) {
$_SERVER['HTTP_USER_AGENT'] = '';
}
// Defining the PATH_SEP constant, he we are defining if the the path separator symbol will be '\\' or '/'
define( 'PATH_SEP', '/' );