Merge remote-tracking branch 'upstream/master' into speedy
This commit is contained in:
@@ -149,6 +149,7 @@ class Applications
|
||||
|
||||
$Criteria->addAlias( 'CU', 'USERS' );
|
||||
$Criteria->addJoin( AppCacheViewPeer::USR_UID, 'CU.USR_UID', Criteria::LEFT_JOIN );
|
||||
$Criteria->addAsColumn( 'USR_UID', 'CU.USR_UID' );
|
||||
$Criteria->addAsColumn( 'USR_FIRSTNAME', 'CU.USR_FIRSTNAME' );
|
||||
$Criteria->addAsColumn( 'USR_LASTNAME', 'CU.USR_LASTNAME' );
|
||||
$Criteria->addAsColumn( 'USR_USERNAME', 'CU.USR_USERNAME' );
|
||||
|
||||
@@ -4717,6 +4717,11 @@ class Cases
|
||||
|
||||
if ($sTo != null) {
|
||||
$oSpool = new spoolRun();
|
||||
if ($aConfiguration['MESS_RAUTH'] == false || (is_string($aConfiguration['MESS_RAUTH']) && $aConfiguration['MESS_RAUTH'] == 'false')) {
|
||||
$aConfiguration['MESS_RAUTH'] = 0;
|
||||
} else {
|
||||
$aConfiguration['MESS_RAUTH'] = 1;
|
||||
}
|
||||
|
||||
$oSpool->setConfig(array(
|
||||
"MESS_ENGINE" => $aConfiguration["MESS_ENGINE"],
|
||||
|
||||
@@ -169,7 +169,7 @@ class dynaformEditor extends WebResource
|
||||
$oHeadPublisher->addScriptCode("var TRANSLATIONS = " . G::json_encode($labesTrans) . ";");
|
||||
$oHeadPublisher->setTitle(G::LoadTranslation('ID_DYNAFORM_EDITOR') . ' - ' . $Properties['DYN_TITLE']);
|
||||
$G_PUBLISH->AddContent('blank');
|
||||
$this->panelConf['title'] = $this->title;
|
||||
$this->panelConf['title'] = '';
|
||||
$G_PUBLISH->AddContent('panel-init', 'mainPanel', $this->panelConf);
|
||||
if ($Properties['DYN_TYPE'] == 'xmlform') {
|
||||
$G_PUBLISH->AddContent('xmlform', 'toolbar', 'dynaforms/fields_Toolbar', 'display:none', $Parameters, '', '');
|
||||
|
||||
@@ -193,6 +193,7 @@ class multipleFilesBackup
|
||||
CLI::logging( "> Connecting to system database in '$dbHost'\n" );
|
||||
$link = mysql_connect( $dbHost, $dbUser, $dbPass );
|
||||
@mysql_query( "SET NAMES 'utf8';" );
|
||||
@mysql_query( "SET FOREIGN_KEY_CHECKS=0;" );
|
||||
if (! $link) {
|
||||
throw new Exception( 'Could not connect to system database: ' . mysql_error() );
|
||||
}
|
||||
|
||||
@@ -87,19 +87,13 @@ function getCurrentTime ()
|
||||
* @label User Info
|
||||
* @link http://wiki.processmaker.com/index.php/ProcessMaker_Functions#userInfo.28.29
|
||||
*
|
||||
* @param string(32) | $user_id | User ID | The user unique ID
|
||||
* @return array | $userInfo | User Info | An associative array with Information
|
||||
* @param string(32) | $userUid | User ID | The user unique ID
|
||||
* @return array | $info | User Info | An associative array with Information
|
||||
*
|
||||
*/
|
||||
function userInfo ($user_uid)
|
||||
function userInfo($userUid)
|
||||
{
|
||||
try {
|
||||
require_once 'classes/model/Users.php';
|
||||
$oUser = new Users();
|
||||
return $oUser->getAllInformation( $user_uid );
|
||||
} catch (Exception $oException) {
|
||||
throw $oException;
|
||||
}
|
||||
return PMFInformationUser($userUid);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1107,6 +1101,40 @@ function WSUpdateUser ($userUid, $userName, $firstName = null, $lastName = null,
|
||||
return $fields;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @method Retrieves information about a user with a given ID.
|
||||
*
|
||||
* @name WSInformationUser
|
||||
* @label WS Information User
|
||||
* @link http://wiki.processmaker.com/index.php/ProcessMaker_Functions#WSInformationUser.28.29
|
||||
*
|
||||
* @param string(32) | $userUid | User UID | The user UID.
|
||||
* @return array | $response | WS array | A WS Response associative array.
|
||||
*
|
||||
*/
|
||||
function WSInformationUser($userUid)
|
||||
{
|
||||
$client = WSOpen();
|
||||
|
||||
$sessionId = $_SESSION["WS_SESSION_ID"];
|
||||
|
||||
$params = array(
|
||||
"sessionId" => $sessionId,
|
||||
"userUid" => $userUid
|
||||
);
|
||||
|
||||
$result = $client->__soapCall("informationUser", array($params));
|
||||
|
||||
$response = array();
|
||||
$response["status_code"] = $result->status_code;
|
||||
$response["message"] = $result->message;
|
||||
$response["time_stamp"] = $result->timestamp;
|
||||
$response["info"] = (isset($result->info))? $result->info : null;
|
||||
|
||||
return $response;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @method Returns the unique ID for the current active session.
|
||||
@@ -1466,7 +1494,10 @@ function PMFGenerateOutputDocument ($outputID, $sApplication = null, $index = nu
|
||||
$aProperties['media'] = $aOD['OUT_DOC_MEDIA'];
|
||||
$aProperties['margins'] = array ('left' => $aOD['OUT_DOC_LEFT_MARGIN'],'right' => $aOD['OUT_DOC_RIGHT_MARGIN'],'top' => $aOD['OUT_DOC_TOP_MARGIN'],'bottom' => $aOD['OUT_DOC_BOTTOM_MARGIN']
|
||||
);
|
||||
$oOutputDocument->generate( $outputID, $Fields['APP_DATA'], $pathOutput, $sFilename, $aOD['OUT_DOC_TEMPLATE'], (boolean) $aOD['OUT_DOC_LANDSCAPE'], $aOD['OUT_DOC_GENERATE'] );
|
||||
if (isset($aOD['OUT_DOC_REPORT_GENERATOR'])) {
|
||||
$aProperties['report_generator'] = $aOD['OUT_DOC_REPORT_GENERATOR'];
|
||||
}
|
||||
$oOutputDocument->generate( $outputID, $Fields['APP_DATA'], $pathOutput, $sFilename, $aOD['OUT_DOC_TEMPLATE'], (boolean) $aOD['OUT_DOC_LANDSCAPE'], $aOD['OUT_DOC_GENERATE'], $aProperties );
|
||||
|
||||
//Plugin Hook PM_UPLOAD_DOCUMENT for upload document
|
||||
//G::LoadClass('plugin');
|
||||
@@ -1848,6 +1879,34 @@ function PMFUpdateUser ($userUid, $userName, $firstName = null, $lastName = null
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @method Retrieves information about a user with a given ID.
|
||||
*
|
||||
* @name PMFInformationUser
|
||||
* @label PMF Information User
|
||||
* @link http://wiki.processmaker.com/index.php/ProcessMaker_Functions#PMFInformationUser.28.29
|
||||
*
|
||||
* @param string(32) | $userUid | User UID | The user UID.
|
||||
* @return array | $info | Information of user | An associative array with Information.
|
||||
*
|
||||
*/
|
||||
function PMFInformationUser($userUid)
|
||||
{
|
||||
G::LoadClass("wsBase");
|
||||
|
||||
$ws = new wsBase();
|
||||
$result = $ws->informationUser($userUid);
|
||||
|
||||
$info = array();
|
||||
|
||||
if ($result->status_code == 0 && isset($result->info)) {
|
||||
$info = $result->info;
|
||||
}
|
||||
|
||||
return $info;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @method Creates a random string of letters and/or numbers of a specified length,which
|
||||
|
||||
@@ -138,6 +138,7 @@ class spoolRun
|
||||
*/
|
||||
public function create ($aData)
|
||||
{
|
||||
$aData['app_msg_show_message'] = (isset($aData['app_msg_show_message'])) ? $aData['app_msg_show_message'] : 1;
|
||||
$sUID = $this->db_insert( $aData );
|
||||
|
||||
$aData['app_msg_date'] = isset( $aData['app_msg_date'] ) ? $aData['app_msg_date'] : '';
|
||||
@@ -541,6 +542,11 @@ class spoolRun
|
||||
|
||||
if ($aConfiguration["MESS_ENABLED"] == "1") {
|
||||
require_once ("classes/model/AppMessage.php");
|
||||
if ($aConfiguration['MESS_RAUTH'] == false || (is_string($aConfiguration['MESS_RAUTH']) && $aConfiguration['MESS_RAUTH'] == 'false')) {
|
||||
$aConfiguration['MESS_RAUTH'] = 0;
|
||||
} else {
|
||||
$aConfiguration['MESS_RAUTH'] = 1;
|
||||
}
|
||||
|
||||
$this->setConfig( array ("MESS_ENGINE" => $aConfiguration["MESS_ENGINE"],"MESS_SERVER" => $aConfiguration["MESS_SERVER"],"MESS_PORT" => $aConfiguration["MESS_PORT"],"MESS_ACCOUNT" => $aConfiguration["MESS_ACCOUNT"],"MESS_PASSWORD" => $aConfiguration["MESS_PASSWORD"],"SMTPAuth" => $aConfiguration["MESS_RAUTH"],"SMTPSecure" => $aConfiguration["SMTPSecure"]
|
||||
) );
|
||||
|
||||
@@ -931,6 +931,10 @@ class System
|
||||
$skinListArray = array ();
|
||||
$customSkins = glob( PATH_CUSTOM_SKINS . "*/config.xml" );
|
||||
|
||||
if (!is_array($customSkins)) {
|
||||
$customSkins = array();
|
||||
}
|
||||
|
||||
// getting al base skins
|
||||
$baseSkins = glob( G::ExpandPath( "skinEngine" ) . '*/config.xml' );
|
||||
|
||||
|
||||
@@ -155,6 +155,29 @@ class XmlForm_Field_toolButton extends XmlForm_Field
|
||||
case 'text/image':
|
||||
$html = $this->htmlentities( $this->label, ENT_QUOTES, 'utf-8' ) . '<br/><img src="' . htmlentities( $url, ENT_QUOTES, 'utf-8' ) . '"' . (($this->style) ? ' style="' . $this->style . '"' : '') . '/>';
|
||||
break;
|
||||
case 'dropdown':
|
||||
$html = '';
|
||||
if (isset($this->owner->values['PRO_UID'])) {
|
||||
G::LoadClass('processMap');
|
||||
$criteria = processMap::getDynaformsCriteria($this->owner->values['PRO_UID']);
|
||||
$dataset = DynaformPeer::doSelectRS($criteria);
|
||||
if ($dataset->getRecordCount() > 0) {
|
||||
$html .= '<span style="font-size: 8pt;margin-left: 20px;">' . G::LoadTranslation('ID_EDITING_DYNAFORM');
|
||||
$html .= ': <select onchange="window.location = \'dynaforms_Editor?PRO_UID=' . $this->owner->values['PRO_UID'];
|
||||
$html .= '&DYN_UID=\' + this.value;" class="module_app_input___gray">';
|
||||
$dataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
$dataset->next();
|
||||
while ($row = $dataset->getRow()) {
|
||||
$html .= '<option value="' . $row['DYN_UID'] . '"';
|
||||
$html .= ($this->owner->values['DYN_UID'] == $row['DYN_UID'] ? ' selected="selected"' : '') . '>';
|
||||
$html .= htmlentities($row['DYN_TITLE'], ENT_QUOTES, 'utf-8') . '</option>';
|
||||
$dataset->next();
|
||||
}
|
||||
$html .= '</select></span>';
|
||||
}
|
||||
}
|
||||
return $html;
|
||||
break;
|
||||
case 'class':
|
||||
$html = '<a href="#" onclick="' . $this->onclick . '" onmouseover="backImage(this, \'url(/images/dynamicForm/hover.gif) no-repeat\')" onmouseout="backImage(this, \'\')" style="width:25px;height:25px;margin-bottom:3px">
|
||||
<div class="' . $this->class . '" title="' . strip_tags( $this->label ) . '" style="width:25px;height:25px;margin-bottom:3px"></div>
|
||||
|
||||
@@ -749,6 +749,11 @@ class wsBase
|
||||
}
|
||||
}
|
||||
$aSetup['MESS_PASSWORD'] = $passwd;
|
||||
if ($aSetup['MESS_RAUTH'] == false || (is_string($aSetup['MESS_RAUTH']) && $aSetup['MESS_RAUTH'] == 'false')) {
|
||||
$aSetup['MESS_RAUTH'] = 0;
|
||||
} else {
|
||||
$aSetup['MESS_RAUTH'] = 1;
|
||||
}
|
||||
|
||||
$oSpool = new spoolRun();
|
||||
$oSpool->setConfig( array ('MESS_ENGINE' => $aSetup['MESS_ENGINE'],'MESS_SERVER' => $aSetup['MESS_SERVER'],'MESS_PORT' => $aSetup['MESS_PORT'],'MESS_ACCOUNT' => $aSetup['MESS_ACCOUNT'],'MESS_PASSWORD' => $aSetup['MESS_PASSWORD'],'SMTPAuth' => $aSetup['MESS_RAUTH']
|
||||
@@ -1212,7 +1217,41 @@ class wsBase
|
||||
|
||||
return $result;
|
||||
} catch (Exception $e) {
|
||||
$result = wsResponse( 100, $e->getMessage() );
|
||||
$result = new wsResponse(100, $e->getMessage());
|
||||
|
||||
return $result;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Information User
|
||||
* @param string userUid : The user UID.
|
||||
* @return $result will return an object
|
||||
*/
|
||||
public function informationUser($userUid)
|
||||
{
|
||||
try {
|
||||
if (empty($userUid)) {
|
||||
$result = new wsResponse(100, G::LoadTranslation("ID_REQUIRED_FIELD") . " userUid");
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
$user = new Users();
|
||||
$userInfo = $user->getAllInformation($userUid);
|
||||
|
||||
//Response
|
||||
$res = new wsResponse(0, G::LoadTranslation("ID_COMMAND_EXECUTED_SUCCESSFULLY"));
|
||||
|
||||
$result = new stdClass();
|
||||
$result->status_code = $res->status_code;
|
||||
$result->message = $res->message;
|
||||
$result->timestamp = $res->timestamp;
|
||||
$result->info = $userInfo;
|
||||
|
||||
return $result;
|
||||
} catch (Exception $e) {
|
||||
$result = new wsResponse(100, $e->getMessage());
|
||||
|
||||
return $result;
|
||||
}
|
||||
@@ -1643,7 +1682,7 @@ class wsBase
|
||||
$this->originalValues['INDEX'] = $_SESSION['INDEX'];
|
||||
unset( $_SESSION['INDEX'] );
|
||||
}
|
||||
|
||||
|
||||
if (isset( $_SESSION['USER_LOGGED'] )) {
|
||||
$this->originalValues['USER_LOGGED'] = $_SESSION['USER_LOGGED'];
|
||||
unset( $_SESSION['USER_LOGGED'] );
|
||||
@@ -1659,7 +1698,7 @@ class wsBase
|
||||
unset( $_SESSION['STEP_POSITION'] );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* restore the Session variables with values of $originalValues array, if this is set.
|
||||
*
|
||||
@@ -1691,7 +1730,7 @@ class wsBase
|
||||
$_SESSION['USR_USERNAME'] = $this->originalValues['USR_USERNAME'];
|
||||
unset( $this->originalValues['USR_USERNAME']);
|
||||
}
|
||||
|
||||
|
||||
if (isset( $this->originalValues['USER_LOGGED'] )) {
|
||||
$_SESSION['USER_LOGGED'] = $this->originalValues['USER_LOGGED'];
|
||||
unset( $this->originalValues['USER_LOGGED']);
|
||||
@@ -1715,9 +1754,9 @@ class wsBase
|
||||
public function newCase ($processId, $userId, $taskId, $variables)
|
||||
{
|
||||
try {
|
||||
|
||||
|
||||
$this->saveTemporarySessionVars();
|
||||
|
||||
|
||||
$Fields = array ();
|
||||
|
||||
if (is_array( $variables ) && count( $variables ) > 0) {
|
||||
@@ -1791,7 +1830,7 @@ class wsBase
|
||||
$up_case = $oCase->updateCase( $caseId, $oldFields );
|
||||
|
||||
$this->restoreSessionVars();
|
||||
|
||||
|
||||
$result = new wsResponse( 0, G::loadTranslation( 'ID_STARTED_SUCCESSFULLY' ) );
|
||||
$result->caseId = $caseId;
|
||||
$result->caseNumber = $caseNr;
|
||||
@@ -2834,7 +2873,7 @@ class wsBase
|
||||
|
||||
return $result;
|
||||
} catch (Exception $e) {
|
||||
$result = wsResponse( 100, $e->getMessage() );
|
||||
$result = new wsResponse(100, $e->getMessage());
|
||||
|
||||
return $result;
|
||||
}
|
||||
@@ -2880,7 +2919,7 @@ class wsBase
|
||||
|
||||
return $result;
|
||||
} catch (Exception $e) {
|
||||
$result = wsResponse( 100, $e->getMessage() );
|
||||
$result = new wsResponse(100, $e->getMessage());
|
||||
|
||||
return $result;
|
||||
}
|
||||
@@ -2936,7 +2975,7 @@ class wsBase
|
||||
|
||||
return $result;
|
||||
} catch (Exception $e) {
|
||||
$result = wsResponse( 100, $e->getMessage() );
|
||||
$result = new wsResponse(100, $e->getMessage());
|
||||
|
||||
return $result;
|
||||
}
|
||||
@@ -2982,7 +3021,7 @@ class wsBase
|
||||
|
||||
return $result;
|
||||
} catch (Exception $e) {
|
||||
$result = wsResponse( 100, $e->getMessage() );
|
||||
$result = new wsResponse(100, $e->getMessage());
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
@@ -315,6 +315,8 @@ class workspaceTools
|
||||
} elseif ($first) {
|
||||
CLI::logging( "Updating XML form translations with $poName\n" );
|
||||
Language::import( $poFile, true, false );
|
||||
CLI::logging( "Updating database translations with $poName\n" );
|
||||
Language::import( $poFile, false, true );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1123,6 +1125,7 @@ class workspaceTools
|
||||
CLI::logging( "> Connecting to system database in '$dbHost'\n" );
|
||||
$link = mysql_connect( $dbHost, $dbUser, $dbPass );
|
||||
@mysql_query( "SET NAMES 'utf8';" );
|
||||
@mysql_query( "SET FOREIGN_KEY_CHECKS=0;" );
|
||||
if (! $link) {
|
||||
throw new Exception( 'Could not connect to system database: ' . mysql_error() );
|
||||
}
|
||||
|
||||
@@ -152,7 +152,6 @@ class AppFolder extends BaseAppFolder
|
||||
$Criteria->add( appFolderPeer::FOLDER_PARENT_UID, $folderID, CRITERIA::EQUAL );
|
||||
$Criteria->addAscendingOrderByColumn( AppFolderPeer::FOLDER_NAME );
|
||||
|
||||
$response['totalFoldersCount'] = AppFolderPeer::doCount( $Criteria );
|
||||
$response['folders'] = array ();
|
||||
|
||||
if ($limit != 0) {
|
||||
@@ -168,6 +167,7 @@ class AppFolder extends BaseAppFolder
|
||||
$response['folders'][] = $row;
|
||||
$rs->next();
|
||||
}
|
||||
$response['totalFoldersCount'] = count($response['folders']);
|
||||
return ($response);
|
||||
}
|
||||
|
||||
@@ -280,7 +280,6 @@ class AppFolder extends BaseAppFolder
|
||||
$oCriteria->addAscendingOrderByColumn( AppDocumentPeer::APP_DOC_INDEX );
|
||||
$oCriteria->addDescendingOrderByColumn( AppDocumentPeer::DOC_VERSION );
|
||||
|
||||
$response['totalDocumentsCount'] = AppDocumentPeer::doCount( $oCriteria );
|
||||
$response['documents'] = array ();
|
||||
|
||||
$oCriteria->setLimit( $limit );
|
||||
@@ -322,6 +321,7 @@ class AppFolder extends BaseAppFolder
|
||||
}
|
||||
$rs->next();
|
||||
}
|
||||
$response['totalDocumentsCount'] = count($response['documents']);
|
||||
return ($response);
|
||||
}
|
||||
|
||||
|
||||
@@ -217,6 +217,12 @@ class AppNotes extends BaseAppNotes
|
||||
|
||||
$sTo = ((($aUser['USR_FIRSTNAME'] != '') || ($aUser['USR_LASTNAME'] != '')) ? $aUser['USR_FIRSTNAME'] . ' ' . $aUser['USR_LASTNAME'] . ' ' : '') . '<' . $aUser['USR_EMAIL'] . '>';
|
||||
$oSpool = new spoolRun();
|
||||
if ($aConfiguration['MESS_RAUTH'] == false || (is_string($aConfiguration['MESS_RAUTH']) && $aConfiguration['MESS_RAUTH'] == 'false')) {
|
||||
$aConfiguration['MESS_RAUTH'] = 0;
|
||||
} else {
|
||||
$aConfiguration['MESS_RAUTH'] = 1;
|
||||
}
|
||||
|
||||
$oSpool->setConfig( array ('MESS_ENGINE' => $aConfiguration['MESS_ENGINE'],'MESS_SERVER' => $aConfiguration['MESS_SERVER'],'MESS_PORT' => $aConfiguration['MESS_PORT'],'MESS_ACCOUNT' => $aConfiguration['MESS_ACCOUNT'],'MESS_PASSWORD' => $aConfiguration['MESS_PASSWORD'],'SMTPAuth' => $aConfiguration['MESS_RAUTH'] == '1' ? true : false,'SMTPSecure' => isset( $aConfiguration['SMTPSecure'] ) ? $aConfiguration['SMTPSecure'] : '') );
|
||||
$oSpool->create( array ('msg_uid' => '','app_uid' => $appUid,'del_index' => 1,'app_msg_type' => 'DERIVATION','app_msg_subject' => $sSubject,'app_msg_from' => $sFrom,'app_msg_to' => $sTo,'app_msg_body' => $sBody,'app_msg_cc' => '','app_msg_bcc' => '','app_msg_attach' => '','app_msg_template' => '','app_msg_status' => 'pending') );
|
||||
if (($aConfiguration['MESS_BACKGROUND'] == '') || ($aConfiguration['MESS_TRY_SEND_INMEDIATLY'] == '1')) {
|
||||
|
||||
@@ -345,6 +345,7 @@ class Content extends BaseContent
|
||||
|
||||
mysql_select_db( $workSpace->dbName, $link );
|
||||
mysql_query( "SET NAMES 'utf8';" );
|
||||
mysql_query( "SET FOREIGN_KEY_CHECKS=0;" );
|
||||
mysql_query( 'SET OPTION SQL_BIG_SELECTS=1' );
|
||||
$result = mysql_unbuffered_query( $sql, $link );
|
||||
$list = array ();
|
||||
|
||||
@@ -704,208 +704,24 @@ class OutputDocument extends BaseOutputDocument
|
||||
/* End - Create .doc */
|
||||
|
||||
if ($sTypeDocToGener == 'BOTH' || $sTypeDocToGener == 'PDF') {
|
||||
/* Start - Create .pdf */
|
||||
$oFile = fopen($sPath . $sFilename . '.html', 'wb');
|
||||
fwrite($oFile, $sContent);
|
||||
fclose($oFile);
|
||||
|
||||
define("MAX_FREE_FRACTION", 1);
|
||||
define('PATH_OUTPUT_FILE_DIRECTORY', PATH_HTML . 'files/' . $_SESSION['APPLICATION'] . '/outdocs/');
|
||||
G::verifyPath(PATH_OUTPUT_FILE_DIRECTORY, true);
|
||||
require_once (PATH_THIRDPARTY . 'html2ps_pdf/config.inc.php');
|
||||
require_once (PATH_THIRDPARTY . 'html2ps_pdf/pipeline.factory.class.php');
|
||||
|
||||
parse_config_file(PATH_THIRDPARTY . 'html2ps_pdf/html2ps.config');
|
||||
|
||||
$GLOBALS['g_config'] = array(
|
||||
'cssmedia' => 'screen',
|
||||
'media' => 'Letter',
|
||||
'scalepoints' => false,
|
||||
'renderimages' => true,
|
||||
'renderfields' => true,
|
||||
'renderforms' => false,
|
||||
'pslevel' => 3,
|
||||
'renderlinks' => true,
|
||||
'pagewidth' => 800,
|
||||
'landscape' => $sLandscape,
|
||||
'method' => 'fpdf',
|
||||
'margins' => array('left' => 15, 'right' => 15, 'top' => 15, 'bottom' => 15,),
|
||||
'encoding' => '',
|
||||
'ps2pdf' => false,
|
||||
'compress' => false,
|
||||
'output' => 2,
|
||||
'pdfversion' => '1.3',
|
||||
'transparency_workaround' => false,
|
||||
'imagequality_workaround' => false,
|
||||
'draw_page_border' => isset($_REQUEST['pageborder']),
|
||||
'debugbox' => false,
|
||||
'html2xhtml' => true,
|
||||
'mode' => 'html',
|
||||
'smartpagebreak' => true
|
||||
);
|
||||
|
||||
$GLOBALS['g_config']= array_merge($GLOBALS['g_config'],$aProperties);
|
||||
$g_media = Media::predefined($GLOBALS['g_config']['media']);
|
||||
$g_media->set_landscape($GLOBALS['g_config']['landscape']);
|
||||
$g_media->set_margins($GLOBALS['g_config']['margins']);
|
||||
$g_media->set_pixels($GLOBALS['g_config']['pagewidth']);
|
||||
|
||||
|
||||
if (isset($GLOBALS['g_config']['pdfSecurity'])) {
|
||||
if (isset($GLOBALS['g_config']['pdfSecurity']['openPassword']) &&
|
||||
$GLOBALS['g_config']['pdfSecurity']['openPassword'] != ""
|
||||
) {
|
||||
$GLOBALS['g_config']['pdfSecurity']['openPassword'] = G::decrypt(
|
||||
$GLOBALS['g_config']['pdfSecurity']['openPassword'],
|
||||
$sUID
|
||||
);
|
||||
}
|
||||
|
||||
if (isset($GLOBALS['g_config']['pdfSecurity']['ownerPassword']) &&
|
||||
$GLOBALS['g_config']['pdfSecurity']['ownerPassword'] != ""
|
||||
) {
|
||||
$GLOBALS['g_config']['pdfSecurity']['ownerPassword'] = G::decrypt(
|
||||
$GLOBALS['g_config']['pdfSecurity']['ownerPassword'],
|
||||
$sUID
|
||||
);
|
||||
}
|
||||
|
||||
$g_media->set_security($GLOBALS['g_config']['pdfSecurity']);
|
||||
|
||||
require_once (HTML2PS_DIR . 'pdf.fpdf.encryption.php');
|
||||
}
|
||||
|
||||
$pipeline = new Pipeline();
|
||||
|
||||
if (extension_loaded('curl')) {
|
||||
require_once (HTML2PS_DIR . 'fetcher.url.curl.class.php');
|
||||
|
||||
$pipeline->fetchers = array(new FetcherURLCurl());
|
||||
|
||||
if (isset($proxy)) {
|
||||
if ($proxy != '') {
|
||||
$pipeline->fetchers[0]->set_proxy($proxy);
|
||||
}
|
||||
/* Start - Create .pdf */
|
||||
if (isset($aProperties['report_generator'])) {
|
||||
switch ($aProperties['report_generator']) {
|
||||
case 'TCPDF':
|
||||
$this->generateTcpdf($sUID, $aFields, $sPath, $sFilename, $sContent, $sLandscape, $aProperties);
|
||||
break;
|
||||
case 'HTML2PDF':
|
||||
default:
|
||||
$this->generateHtml2ps_pdf($sUID, $aFields, $sPath, $sFilename, $sContent, $sLandscape, $aProperties);
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
require_once (HTML2PS_DIR . 'fetcher.url.class.php');
|
||||
$pipeline->fetchers[] = new FetcherURL();
|
||||
$this->generateHtml2ps_pdf($sUID, $aFields, $sPath, $sFilename, $sContent, $sLandscape, $aProperties);
|
||||
}
|
||||
|
||||
$pipeline->data_filters[] = new DataFilterDoctype();
|
||||
$pipeline->data_filters[] = new DataFilterUTF8($GLOBALS['g_config']['encoding']);
|
||||
|
||||
if ($GLOBALS['g_config']['html2xhtml']) {
|
||||
$pipeline->data_filters[] = new DataFilterHTML2XHTML();
|
||||
} else {
|
||||
$pipeline->data_filters[] = new DataFilterXHTML2XHTML();
|
||||
}
|
||||
|
||||
$pipeline->parser = new ParserXHTML();
|
||||
$pipeline->pre_tree_filters = array();
|
||||
$header_html = '';
|
||||
$footer_html = '';
|
||||
$filter = new PreTreeFilterHeaderFooter($header_html, $footer_html);
|
||||
$pipeline->pre_tree_filters[] = $filter;
|
||||
|
||||
if ($GLOBALS['g_config']['renderfields']) {
|
||||
$pipeline->pre_tree_filters[] = new PreTreeFilterHTML2PSFields();
|
||||
}
|
||||
|
||||
if ($GLOBALS['g_config']['method'] === 'ps') {
|
||||
$pipeline->layout_engine = new LayoutEnginePS();
|
||||
} else {
|
||||
$pipeline->layout_engine = new LayoutEngineDefault();
|
||||
}
|
||||
|
||||
$pipeline->post_tree_filters = array();
|
||||
|
||||
if ($GLOBALS['g_config']['pslevel'] == 3) {
|
||||
$image_encoder = new PSL3ImageEncoderStream();
|
||||
} else {
|
||||
$image_encoder = new PSL2ImageEncoderStream();
|
||||
}
|
||||
|
||||
switch ($GLOBALS['g_config']['method']) {
|
||||
case 'fastps':
|
||||
if ($GLOBALS['g_config']['pslevel'] == 3) {
|
||||
$pipeline->output_driver = new OutputDriverFastPS($image_encoder);
|
||||
} else {
|
||||
$pipeline->output_driver = new OutputDriverFastPSLevel2($image_encoder);
|
||||
}
|
||||
break;
|
||||
case 'pdflib':
|
||||
$pipeline->output_driver = new OutputDriverPDFLIB16($GLOBALS['g_config']['pdfversion']);
|
||||
break;
|
||||
case 'fpdf':
|
||||
$pipeline->output_driver = new OutputDriverFPDF();
|
||||
break;
|
||||
case 'png':
|
||||
$pipeline->output_driver = new OutputDriverPNG();
|
||||
break;
|
||||
case 'pcl':
|
||||
$pipeline->output_driver = new OutputDriverPCL();
|
||||
break;
|
||||
default:
|
||||
die('Unknown output method');
|
||||
}
|
||||
|
||||
if (isset($GLOBALS['g_config']['watermarkhtml'])) {
|
||||
$watermark_text = $GLOBALS['g_config']['watermarkhtml'];
|
||||
} else {
|
||||
$watermark_text = '';
|
||||
}
|
||||
|
||||
$pipeline->output_driver->set_watermark($watermark_text);
|
||||
|
||||
if ($watermark_text != '') {
|
||||
$dispatcher =& $pipeline->getDispatcher();
|
||||
}
|
||||
|
||||
if ($GLOBALS['g_config']['debugbox']) {
|
||||
$pipeline->output_driver->set_debug_boxes(true);
|
||||
}
|
||||
|
||||
if ($GLOBALS['g_config']['draw_page_border']) {
|
||||
$pipeline->output_driver->set_show_page_border(true);
|
||||
}
|
||||
|
||||
if ($GLOBALS['g_config']['ps2pdf']) {
|
||||
$pipeline->output_filters[] = new OutputFilterPS2PDF($GLOBALS['g_config']['pdfversion']);
|
||||
}
|
||||
|
||||
if ($GLOBALS['g_config']['compress'] && $GLOBALS['g_config']['method'] == 'fastps') {
|
||||
$pipeline->output_filters[] = new OutputFilterGZip();
|
||||
}
|
||||
|
||||
if (!isset($GLOBALS['g_config']['process_mode'])) {
|
||||
$GLOBALS['g_config']['process_mode'] = '';
|
||||
}
|
||||
|
||||
if ($GLOBALS['g_config']['process_mode'] == 'batch') {
|
||||
$filename = 'batch';
|
||||
} else {
|
||||
$filename = $sFilename;
|
||||
}
|
||||
|
||||
switch ($GLOBALS['g_config']['output']) {
|
||||
case 0:
|
||||
$pipeline->destination = new DestinationBrowser($filename);
|
||||
break;
|
||||
case 1:
|
||||
$pipeline->destination = new DestinationDownload($filename);
|
||||
break;
|
||||
case 2:
|
||||
$pipeline->destination = new DestinationFile($filename);
|
||||
break;
|
||||
}
|
||||
|
||||
copy($sPath . $sFilename . '.html', PATH_OUTPUT_FILE_DIRECTORY . $sFilename . '.html');
|
||||
$status = $pipeline->process(((isset($_SERVER['HTTPS']))&&($_SERVER['HTTPS']=='on') ? 'https://' : 'http://') . $_SERVER['HTTP_HOST'] . '/files/' . $_SESSION['APPLICATION'] . '/outdocs/' . $sFilename . '.html', $g_media);
|
||||
|
||||
copy(PATH_OUTPUT_FILE_DIRECTORY . $sFilename . '.pdf', $sPath . $sFilename . '.pdf');
|
||||
unlink(PATH_OUTPUT_FILE_DIRECTORY . $sFilename . '.pdf');
|
||||
unlink(PATH_OUTPUT_FILE_DIRECTORY . $sFilename . '.html');
|
||||
}
|
||||
//end if $sTypeDocToGener
|
||||
/* End - Create .pdf */
|
||||
@@ -922,6 +738,371 @@ class OutputDocument extends BaseOutputDocument
|
||||
}
|
||||
}
|
||||
|
||||
public function generateHtml2pdf($sUID, $aFields, $sPath, $sFilename, $sContent, $sLandscape = false, $aProperties = array() )
|
||||
{
|
||||
|
||||
// define("MAX_FREE_FRACTION", 1);
|
||||
define('PATH_OUTPUT_FILE_DIRECTORY', PATH_HTML . 'files/' . $_SESSION['APPLICATION'] . '/outdocs/');
|
||||
G::verifyPath(PATH_OUTPUT_FILE_DIRECTORY, true);
|
||||
|
||||
require_once(PATH_THIRDPARTY . 'html2pdf/html2pdf.class.php');
|
||||
|
||||
// define Save file
|
||||
$sOutput = 2;
|
||||
$sOrientation = ($sLandscape == false)? 'P' : 'L';
|
||||
$sLang = (defined('SYS_LANG'))? SYS_LANG : 'en';
|
||||
$sMedia = $aProperties['media'];
|
||||
// margin define
|
||||
define("MINIMAL_MARGIN", 15);
|
||||
$marges = array(MINIMAL_MARGIN, MINIMAL_MARGIN, MINIMAL_MARGIN, MINIMAL_MARGIN);
|
||||
if (isset($aProperties['margins'])) {
|
||||
// Default marges (left, top, right, bottom)
|
||||
$margins = $aProperties['margins'];
|
||||
$margins['left'] = ($margins['left']>0)? $margins['left']: MINIMAL_MARGIN;
|
||||
$margins['top'] = ($margins['top']>0)? $margins['top']: MINIMAL_MARGIN;
|
||||
$margins['right'] = ($margins['right']>0)? $margins['right']: MINIMAL_MARGIN;
|
||||
$margins['bottom'] = ($margins['bottom']>0)? $margins['bottom']: MINIMAL_MARGIN;
|
||||
$marges = array($margins['left'], $margins['top'], $margins['right'], $margins['bottom'] );
|
||||
}
|
||||
|
||||
$html2pdf = new HTML2PDF($sOrientation, $sMedia, $sLang, true, 'UTF-8', $marges);
|
||||
|
||||
$html2pdf->pdf->SetAuthor($aFields['USR_USERNAME']);
|
||||
$html2pdf->pdf->SetTitle('Processmaker');
|
||||
$html2pdf->pdf->SetSubject($sFilename);
|
||||
|
||||
//$html2pdf->pdf->SetKeywords('HTML2PDF, TCPDF, processmaker');
|
||||
|
||||
if (isset($aProperties['pdfSecurity'])) {
|
||||
$pdfSecurity = $aProperties['pdfSecurity'];
|
||||
$userPass = G::decrypt($pdfSecurity['openPassword'], $sUID);
|
||||
$ownerPass = ($pdfSecurity['ownerPassword'] != '') ? G::decrypt($pdfSecurity['ownerPassword'], $sUID): null;
|
||||
$permissions = explode("|", $pdfSecurity['permissions']);
|
||||
$html2pdf->pdf->SetProtection($permissions, $userPass, $ownerPass);
|
||||
}
|
||||
|
||||
$html2pdf->setTestTdInOnePage(false);
|
||||
$html2pdf->setTestIsImage(false);
|
||||
$html2pdf->setTestIsDeprecated(false);
|
||||
|
||||
$html2pdf->writeHTML($html2pdf->getHtmlFromPage($sContent));
|
||||
|
||||
switch ($sOutput) {
|
||||
case 0:
|
||||
// Vrew browser
|
||||
$html2pdf->Output($sPath . $sFilename . '.pdf', 'I');
|
||||
break;
|
||||
case 1:
|
||||
// Donwnload
|
||||
$html2pdf->Output($sPath . $sFilename . '.pdf', 'D');
|
||||
break;
|
||||
case 2:
|
||||
// Save file
|
||||
$html2pdf->Output($sPath . $sFilename . '.pdf', 'F');
|
||||
break;
|
||||
}
|
||||
|
||||
copy($sPath . $sFilename . '.html', PATH_OUTPUT_FILE_DIRECTORY . $sFilename . '.html');
|
||||
|
||||
copy(PATH_OUTPUT_FILE_DIRECTORY . $sFilename . '.pdf', $sPath . $sFilename . '.pdf');
|
||||
unlink(PATH_OUTPUT_FILE_DIRECTORY . $sFilename . '.pdf');
|
||||
unlink(PATH_OUTPUT_FILE_DIRECTORY . $sFilename . '.html');
|
||||
|
||||
}
|
||||
|
||||
public function generateTcpdf($sUID, $aFields, $sPath, $sFilename, $sContent, $sLandscape = false, $aProperties = array())
|
||||
{
|
||||
require_once(PATH_THIRDPARTY . 'tcpdf/config/lang/eng.php');
|
||||
require_once(PATH_THIRDPARTY . 'tcpdf/tcpdf.php');
|
||||
// define Save file
|
||||
$sOutput = 2;
|
||||
$sOrientation = ($sLandscape == false)? PDF_PAGE_ORIENTATION : 'L';
|
||||
$sMedia = (isset($aProperties['media'])) ? $aProperties['media'] : PDF_PAGE_FORMAT;
|
||||
$sLang = (defined('SYS_LANG'))? SYS_LANG : 'en';
|
||||
// create new PDF document
|
||||
$pdf = new TCPDF($sOrientation, PDF_UNIT, $sMedia, true, 'UTF-8', false);
|
||||
|
||||
// set document information
|
||||
$pdf->SetCreator(PDF_CREATOR);
|
||||
$pdf->SetAuthor($aFields['USR_USERNAME']);
|
||||
$pdf->SetTitle('Processmaker');
|
||||
$pdf->SetSubject($sFilename);
|
||||
|
||||
$margins = $aProperties['margins'];
|
||||
$margins['left'] = ($margins['left']>0)? $margins['left']: PDF_MARGIN_LEFT;
|
||||
$margins['top'] = ($margins['top']>0)? $margins['top']: PDF_MARGIN_TOP;
|
||||
$margins['right'] = ($margins['right']>0)? $margins['right']: PDF_MARGIN_RIGHT;
|
||||
$margins['bottom'] = ($margins['bottom']>0)? $margins['bottom']: PDF_MARGIN_BOTTOM;
|
||||
|
||||
$pdf->setPrintHeader(false);
|
||||
$pdf->setPrintFooter(false);
|
||||
$pdf->SetLeftMargin($margins['left']);
|
||||
$pdf->SetTopMargin($margins['top']);
|
||||
$pdf->SetRightMargin($margins['right']);
|
||||
$pdf->SetAutoPageBreak(true, $margins['bottom']);
|
||||
|
||||
$oServerConf =& serverConf::getSingleton();
|
||||
// set some language dependent data:
|
||||
$lg = Array();
|
||||
$lg['a_meta_charset'] = 'UTF-8';
|
||||
$lg['a_meta_dir'] = ($oServerConf->isRtl($sLang)) ? 'rtl' : 'ltr' ;
|
||||
$lg['a_meta_language'] = $sLang;
|
||||
$lg['w_page'] = 'page';
|
||||
|
||||
//set some language-dependent strings
|
||||
$pdf->setLanguageArray($lg);
|
||||
|
||||
if (isset($aProperties['pdfSecurity'])) {
|
||||
$pdfSecurity = $aProperties['pdfSecurity'];
|
||||
$userPass = G::decrypt($pdfSecurity['openPassword'], $sUID);
|
||||
$ownerPass = ($pdfSecurity['ownerPassword'] != '') ? G::decrypt($pdfSecurity['ownerPassword'], $sUID): null;
|
||||
$permissions = explode("|", $pdfSecurity['permissions']);
|
||||
$pdf->SetProtection($permissions, $userPass, $ownerPass);
|
||||
}
|
||||
// ---------------------------------------------------------
|
||||
|
||||
// set default font subsetting mode
|
||||
$pdf->setFontSubsetting(true);
|
||||
|
||||
// Set font
|
||||
// dejavusans is a UTF-8 Unicode font, if you only need to
|
||||
// print standard ASCII chars, you can use core fonts like
|
||||
// helvetica or times to reduce file size.
|
||||
$pdf->SetFont('dejavusans', '', 14, '', true);
|
||||
|
||||
// Add a page
|
||||
// This method has several options, check the source code documentation for more information.
|
||||
$pdf->AddPage();
|
||||
|
||||
// set text shadow effect
|
||||
//$pdf->setTextShadow(array('enabled'=>true, 'depth_w'=>0.2, 'depth_h'=>0.2, 'color'=>array(196,196,196), 'opacity'=>1, 'blend_mode'=>'Normal'));
|
||||
|
||||
// Print text using writeHTMLCell()
|
||||
// $pdf->writeHTMLCell($w=0, $h=0, $x='', $y='', $html, $border=0, $ln=1, $fill=0, $reseth=true, $align='', $autopadding=true);
|
||||
$pdf->writeHTML($sContent);
|
||||
// ---------------------------------------------------------
|
||||
|
||||
// Close and output PDF document
|
||||
// This method has several options, check the source code documentation for more information.
|
||||
//$pdf->Output('example_00.pdf', 'I');
|
||||
//$pdf->Output('/home/hector/processmaker/example_00.pdf', 'D');
|
||||
switch ($sOutput) {
|
||||
case 0:
|
||||
// Vrew browser
|
||||
$pdf->Output($sPath . $sFilename . '.pdf', 'I');
|
||||
break;
|
||||
case 1:
|
||||
// Donwnload
|
||||
$pdf->Output($sPath . $sFilename . '.pdf', 'D');
|
||||
break;
|
||||
case 2:
|
||||
// Save file
|
||||
$pdf->Output($sPath . $sFilename . '.pdf', 'F');
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
public function generateHtml2ps_pdf($sUID, $aFields, $sPath, $sFilename, $sContent, $sLandscape = false, $aProperties = array() )
|
||||
{
|
||||
|
||||
define("MAX_FREE_FRACTION", 1);
|
||||
define('PATH_OUTPUT_FILE_DIRECTORY', PATH_HTML . 'files/' . $_SESSION['APPLICATION'] . '/outdocs/');
|
||||
G::verifyPath(PATH_OUTPUT_FILE_DIRECTORY, true);
|
||||
require_once (PATH_THIRDPARTY . 'html2ps_pdf/config.inc.php');
|
||||
require_once (PATH_THIRDPARTY . 'html2ps_pdf/pipeline.factory.class.php');
|
||||
|
||||
parse_config_file(PATH_THIRDPARTY . 'html2ps_pdf/html2ps.config');
|
||||
|
||||
$GLOBALS['g_config'] = array(
|
||||
'cssmedia' => 'screen',
|
||||
'media' => 'Letter',
|
||||
'scalepoints' => false,
|
||||
'renderimages' => true,
|
||||
'renderfields' => true,
|
||||
'renderforms' => false,
|
||||
'pslevel' => 3,
|
||||
'renderlinks' => true,
|
||||
'pagewidth' => 800,
|
||||
'landscape' => $sLandscape,
|
||||
'method' => 'fpdf',
|
||||
'margins' => array('left' => 15, 'right' => 15, 'top' => 15, 'bottom' => 15,),
|
||||
'encoding' => '',
|
||||
'ps2pdf' => false,
|
||||
'compress' => false,
|
||||
'output' => 2,
|
||||
'pdfversion' => '1.3',
|
||||
'transparency_workaround' => false,
|
||||
'imagequality_workaround' => false,
|
||||
'draw_page_border' => isset($_REQUEST['pageborder']),
|
||||
'debugbox' => false,
|
||||
'html2xhtml' => true,
|
||||
'mode' => 'html',
|
||||
'smartpagebreak' => true
|
||||
);
|
||||
|
||||
$GLOBALS['g_config']= array_merge($GLOBALS['g_config'],$aProperties);
|
||||
$g_media = Media::predefined($GLOBALS['g_config']['media']);
|
||||
$g_media->set_landscape($GLOBALS['g_config']['landscape']);
|
||||
$g_media->set_margins($GLOBALS['g_config']['margins']);
|
||||
$g_media->set_pixels($GLOBALS['g_config']['pagewidth']);
|
||||
|
||||
|
||||
if (isset($GLOBALS['g_config']['pdfSecurity'])) {
|
||||
if (isset($GLOBALS['g_config']['pdfSecurity']['openPassword']) &&
|
||||
$GLOBALS['g_config']['pdfSecurity']['openPassword'] != ""
|
||||
) {
|
||||
$GLOBALS['g_config']['pdfSecurity']['openPassword'] = G::decrypt(
|
||||
$GLOBALS['g_config']['pdfSecurity']['openPassword'],
|
||||
$sUID
|
||||
);
|
||||
}
|
||||
|
||||
if (isset($GLOBALS['g_config']['pdfSecurity']['ownerPassword']) &&
|
||||
$GLOBALS['g_config']['pdfSecurity']['ownerPassword'] != ""
|
||||
) {
|
||||
$GLOBALS['g_config']['pdfSecurity']['ownerPassword'] = G::decrypt(
|
||||
$GLOBALS['g_config']['pdfSecurity']['ownerPassword'],
|
||||
$sUID
|
||||
);
|
||||
}
|
||||
|
||||
$g_media->set_security($GLOBALS['g_config']['pdfSecurity']);
|
||||
|
||||
require_once (HTML2PS_DIR . 'pdf.fpdf.encryption.php');
|
||||
}
|
||||
|
||||
$pipeline = new Pipeline();
|
||||
|
||||
if (extension_loaded('curl')) {
|
||||
require_once (HTML2PS_DIR . 'fetcher.url.curl.class.php');
|
||||
|
||||
$pipeline->fetchers = array(new FetcherURLCurl());
|
||||
|
||||
if (isset($proxy)) {
|
||||
if ($proxy != '') {
|
||||
$pipeline->fetchers[0]->set_proxy($proxy);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
require_once (HTML2PS_DIR . 'fetcher.url.class.php');
|
||||
$pipeline->fetchers[] = new FetcherURL();
|
||||
}
|
||||
|
||||
$pipeline->data_filters[] = new DataFilterDoctype();
|
||||
$pipeline->data_filters[] = new DataFilterUTF8($GLOBALS['g_config']['encoding']);
|
||||
|
||||
if ($GLOBALS['g_config']['html2xhtml']) {
|
||||
$pipeline->data_filters[] = new DataFilterHTML2XHTML();
|
||||
} else {
|
||||
$pipeline->data_filters[] = new DataFilterXHTML2XHTML();
|
||||
}
|
||||
|
||||
$pipeline->parser = new ParserXHTML();
|
||||
$pipeline->pre_tree_filters = array();
|
||||
$header_html = '';
|
||||
$footer_html = '';
|
||||
$filter = new PreTreeFilterHeaderFooter($header_html, $footer_html);
|
||||
$pipeline->pre_tree_filters[] = $filter;
|
||||
|
||||
if ($GLOBALS['g_config']['renderfields']) {
|
||||
$pipeline->pre_tree_filters[] = new PreTreeFilterHTML2PSFields();
|
||||
}
|
||||
|
||||
if ($GLOBALS['g_config']['method'] === 'ps') {
|
||||
$pipeline->layout_engine = new LayoutEnginePS();
|
||||
} else {
|
||||
$pipeline->layout_engine = new LayoutEngineDefault();
|
||||
}
|
||||
|
||||
$pipeline->post_tree_filters = array();
|
||||
|
||||
if ($GLOBALS['g_config']['pslevel'] == 3) {
|
||||
$image_encoder = new PSL3ImageEncoderStream();
|
||||
} else {
|
||||
$image_encoder = new PSL2ImageEncoderStream();
|
||||
}
|
||||
|
||||
switch ($GLOBALS['g_config']['method']) {
|
||||
case 'fastps':
|
||||
if ($GLOBALS['g_config']['pslevel'] == 3) {
|
||||
$pipeline->output_driver = new OutputDriverFastPS($image_encoder);
|
||||
} else {
|
||||
$pipeline->output_driver = new OutputDriverFastPSLevel2($image_encoder);
|
||||
}
|
||||
break;
|
||||
case 'pdflib':
|
||||
$pipeline->output_driver = new OutputDriverPDFLIB16($GLOBALS['g_config']['pdfversion']);
|
||||
break;
|
||||
case 'fpdf':
|
||||
$pipeline->output_driver = new OutputDriverFPDF();
|
||||
break;
|
||||
case 'png':
|
||||
$pipeline->output_driver = new OutputDriverPNG();
|
||||
break;
|
||||
case 'pcl':
|
||||
$pipeline->output_driver = new OutputDriverPCL();
|
||||
break;
|
||||
default:
|
||||
die('Unknown output method');
|
||||
}
|
||||
|
||||
if (isset($GLOBALS['g_config']['watermarkhtml'])) {
|
||||
$watermark_text = $GLOBALS['g_config']['watermarkhtml'];
|
||||
} else {
|
||||
$watermark_text = '';
|
||||
}
|
||||
|
||||
$pipeline->output_driver->set_watermark($watermark_text);
|
||||
|
||||
if ($watermark_text != '') {
|
||||
$dispatcher =& $pipeline->getDispatcher();
|
||||
}
|
||||
|
||||
if ($GLOBALS['g_config']['debugbox']) {
|
||||
$pipeline->output_driver->set_debug_boxes(true);
|
||||
}
|
||||
|
||||
if ($GLOBALS['g_config']['draw_page_border']) {
|
||||
$pipeline->output_driver->set_show_page_border(true);
|
||||
}
|
||||
|
||||
if ($GLOBALS['g_config']['ps2pdf']) {
|
||||
$pipeline->output_filters[] = new OutputFilterPS2PDF($GLOBALS['g_config']['pdfversion']);
|
||||
}
|
||||
|
||||
if ($GLOBALS['g_config']['compress'] && $GLOBALS['g_config']['method'] == 'fastps') {
|
||||
$pipeline->output_filters[] = new OutputFilterGZip();
|
||||
}
|
||||
|
||||
if (!isset($GLOBALS['g_config']['process_mode'])) {
|
||||
$GLOBALS['g_config']['process_mode'] = '';
|
||||
}
|
||||
|
||||
if ($GLOBALS['g_config']['process_mode'] == 'batch') {
|
||||
$filename = 'batch';
|
||||
} else {
|
||||
$filename = $sFilename;
|
||||
}
|
||||
|
||||
switch ($GLOBALS['g_config']['output']) {
|
||||
case 0:
|
||||
$pipeline->destination = new DestinationBrowser($filename);
|
||||
break;
|
||||
case 1:
|
||||
$pipeline->destination = new DestinationDownload($filename);
|
||||
break;
|
||||
case 2:
|
||||
$pipeline->destination = new DestinationFile($filename);
|
||||
break;
|
||||
}
|
||||
|
||||
copy($sPath . $sFilename . '.html', PATH_OUTPUT_FILE_DIRECTORY . $sFilename . '.html');
|
||||
$status = $pipeline->process(((isset($_SERVER['HTTPS']))&&($_SERVER['HTTPS']=='on') ? 'https://' : 'http://') . $_SERVER['HTTP_HOST'] . '/files/' . $_SESSION['APPLICATION'] . '/outdocs/' . $sFilename . '.html', $g_media);
|
||||
|
||||
copy(PATH_OUTPUT_FILE_DIRECTORY . $sFilename . '.pdf', $sPath . $sFilename . '.pdf');
|
||||
unlink(PATH_OUTPUT_FILE_DIRECTORY . $sFilename . '.pdf');
|
||||
unlink(PATH_OUTPUT_FILE_DIRECTORY . $sFilename . '.html');
|
||||
}
|
||||
|
||||
/**
|
||||
* verify if Output row specified in [sUid] exists.
|
||||
|
||||
@@ -69,6 +69,8 @@ class OutputDocumentMapBuilder
|
||||
|
||||
$tMap->addColumn('PRO_UID', 'ProUid', 'string', CreoleTypes::VARCHAR, true, 32);
|
||||
|
||||
$tMap->addColumn('OUT_DOC_REPORT_GENERATOR', 'OutDocReportGenerator', 'string', CreoleTypes::VARCHAR, true, 10);
|
||||
|
||||
$tMap->addColumn('OUT_DOC_LANDSCAPE', 'OutDocLandscape', 'int', CreoleTypes::TINYINT, true, null);
|
||||
|
||||
$tMap->addColumn('OUT_DOC_MEDIA', 'OutDocMedia', 'string', CreoleTypes::VARCHAR, true, 10);
|
||||
|
||||
@@ -12,7 +12,7 @@ include_once 'classes/model/OutputDocumentPeer.php';
|
||||
/**
|
||||
* Base class that represents a row from the 'OUTPUT_DOCUMENT' table.
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
* @package workflow.classes.model.om
|
||||
*/
|
||||
@@ -39,6 +39,12 @@ abstract class BaseOutputDocument extends BaseObject implements Persistent
|
||||
*/
|
||||
protected $pro_uid = '';
|
||||
|
||||
/**
|
||||
* The value for the out_doc_report_generator field.
|
||||
* @var string
|
||||
*/
|
||||
protected $out_doc_report_generator = 'HTML2PDF';
|
||||
|
||||
/**
|
||||
* The value for the out_doc_landscape field.
|
||||
* @var int
|
||||
@@ -157,7 +163,7 @@ abstract class BaseOutputDocument extends BaseObject implements Persistent
|
||||
|
||||
/**
|
||||
* Get the [out_doc_uid] column value.
|
||||
*
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getOutDocUid()
|
||||
@@ -168,7 +174,7 @@ abstract class BaseOutputDocument extends BaseObject implements Persistent
|
||||
|
||||
/**
|
||||
* Get the [pro_uid] column value.
|
||||
*
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getProUid()
|
||||
@@ -177,9 +183,20 @@ abstract class BaseOutputDocument extends BaseObject implements Persistent
|
||||
return $this->pro_uid;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the [out_doc_report_generator] column value.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getOutDocReportGenerator()
|
||||
{
|
||||
|
||||
return $this->out_doc_report_generator;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the [out_doc_landscape] column value.
|
||||
*
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function getOutDocLandscape()
|
||||
@@ -190,7 +207,7 @@ abstract class BaseOutputDocument extends BaseObject implements Persistent
|
||||
|
||||
/**
|
||||
* Get the [out_doc_media] column value.
|
||||
*
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getOutDocMedia()
|
||||
@@ -201,7 +218,7 @@ abstract class BaseOutputDocument extends BaseObject implements Persistent
|
||||
|
||||
/**
|
||||
* Get the [out_doc_left_margin] column value.
|
||||
*
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function getOutDocLeftMargin()
|
||||
@@ -212,7 +229,7 @@ abstract class BaseOutputDocument extends BaseObject implements Persistent
|
||||
|
||||
/**
|
||||
* Get the [out_doc_right_margin] column value.
|
||||
*
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function getOutDocRightMargin()
|
||||
@@ -223,7 +240,7 @@ abstract class BaseOutputDocument extends BaseObject implements Persistent
|
||||
|
||||
/**
|
||||
* Get the [out_doc_top_margin] column value.
|
||||
*
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function getOutDocTopMargin()
|
||||
@@ -234,7 +251,7 @@ abstract class BaseOutputDocument extends BaseObject implements Persistent
|
||||
|
||||
/**
|
||||
* Get the [out_doc_bottom_margin] column value.
|
||||
*
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function getOutDocBottomMargin()
|
||||
@@ -245,7 +262,7 @@ abstract class BaseOutputDocument extends BaseObject implements Persistent
|
||||
|
||||
/**
|
||||
* Get the [out_doc_generate] column value.
|
||||
*
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getOutDocGenerate()
|
||||
@@ -256,7 +273,7 @@ abstract class BaseOutputDocument extends BaseObject implements Persistent
|
||||
|
||||
/**
|
||||
* Get the [out_doc_type] column value.
|
||||
*
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getOutDocType()
|
||||
@@ -267,7 +284,7 @@ abstract class BaseOutputDocument extends BaseObject implements Persistent
|
||||
|
||||
/**
|
||||
* Get the [out_doc_current_revision] column value.
|
||||
*
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function getOutDocCurrentRevision()
|
||||
@@ -278,7 +295,7 @@ abstract class BaseOutputDocument extends BaseObject implements Persistent
|
||||
|
||||
/**
|
||||
* Get the [out_doc_field_mapping] column value.
|
||||
*
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getOutDocFieldMapping()
|
||||
@@ -289,7 +306,7 @@ abstract class BaseOutputDocument extends BaseObject implements Persistent
|
||||
|
||||
/**
|
||||
* Get the [out_doc_versioning] column value.
|
||||
*
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function getOutDocVersioning()
|
||||
@@ -300,7 +317,7 @@ abstract class BaseOutputDocument extends BaseObject implements Persistent
|
||||
|
||||
/**
|
||||
* Get the [out_doc_destination_path] column value.
|
||||
*
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getOutDocDestinationPath()
|
||||
@@ -311,7 +328,7 @@ abstract class BaseOutputDocument extends BaseObject implements Persistent
|
||||
|
||||
/**
|
||||
* Get the [out_doc_tags] column value.
|
||||
*
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getOutDocTags()
|
||||
@@ -322,7 +339,7 @@ abstract class BaseOutputDocument extends BaseObject implements Persistent
|
||||
|
||||
/**
|
||||
* Get the [out_doc_pdf_security_enabled] column value.
|
||||
*
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function getOutDocPdfSecurityEnabled()
|
||||
@@ -333,7 +350,7 @@ abstract class BaseOutputDocument extends BaseObject implements Persistent
|
||||
|
||||
/**
|
||||
* Get the [out_doc_pdf_security_open_password] column value.
|
||||
*
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getOutDocPdfSecurityOpenPassword()
|
||||
@@ -344,7 +361,7 @@ abstract class BaseOutputDocument extends BaseObject implements Persistent
|
||||
|
||||
/**
|
||||
* Get the [out_doc_pdf_security_owner_password] column value.
|
||||
*
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getOutDocPdfSecurityOwnerPassword()
|
||||
@@ -355,7 +372,7 @@ abstract class BaseOutputDocument extends BaseObject implements Persistent
|
||||
|
||||
/**
|
||||
* Get the [out_doc_pdf_security_permissions] column value.
|
||||
*
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getOutDocPdfSecurityPermissions()
|
||||
@@ -366,7 +383,7 @@ abstract class BaseOutputDocument extends BaseObject implements Persistent
|
||||
|
||||
/**
|
||||
* Set the value of [out_doc_uid] column.
|
||||
*
|
||||
*
|
||||
* @param string $v new value
|
||||
* @return void
|
||||
*/
|
||||
@@ -388,7 +405,7 @@ abstract class BaseOutputDocument extends BaseObject implements Persistent
|
||||
|
||||
/**
|
||||
* Set the value of [pro_uid] column.
|
||||
*
|
||||
*
|
||||
* @param string $v new value
|
||||
* @return void
|
||||
*/
|
||||
@@ -408,9 +425,31 @@ abstract class BaseOutputDocument extends BaseObject implements Persistent
|
||||
|
||||
} // setProUid()
|
||||
|
||||
/**
|
||||
* Set the value of [out_doc_report_generator] column.
|
||||
*
|
||||
* @param string $v new value
|
||||
* @return void
|
||||
*/
|
||||
public function setOutDocReportGenerator($v)
|
||||
{
|
||||
|
||||
// Since the native PHP type for this column is string,
|
||||
// we will cast the input to a string (if it is not).
|
||||
if ($v !== null && !is_string($v)) {
|
||||
$v = (string) $v;
|
||||
}
|
||||
|
||||
if ($this->out_doc_report_generator !== $v || $v === 'HTML2PDF') {
|
||||
$this->out_doc_report_generator = $v;
|
||||
$this->modifiedColumns[] = OutputDocumentPeer::OUT_DOC_REPORT_GENERATOR;
|
||||
}
|
||||
|
||||
} // setOutDocReportGenerator()
|
||||
|
||||
/**
|
||||
* Set the value of [out_doc_landscape] column.
|
||||
*
|
||||
*
|
||||
* @param int $v new value
|
||||
* @return void
|
||||
*/
|
||||
@@ -432,7 +471,7 @@ abstract class BaseOutputDocument extends BaseObject implements Persistent
|
||||
|
||||
/**
|
||||
* Set the value of [out_doc_media] column.
|
||||
*
|
||||
*
|
||||
* @param string $v new value
|
||||
* @return void
|
||||
*/
|
||||
@@ -454,7 +493,7 @@ abstract class BaseOutputDocument extends BaseObject implements Persistent
|
||||
|
||||
/**
|
||||
* Set the value of [out_doc_left_margin] column.
|
||||
*
|
||||
*
|
||||
* @param int $v new value
|
||||
* @return void
|
||||
*/
|
||||
@@ -476,7 +515,7 @@ abstract class BaseOutputDocument extends BaseObject implements Persistent
|
||||
|
||||
/**
|
||||
* Set the value of [out_doc_right_margin] column.
|
||||
*
|
||||
*
|
||||
* @param int $v new value
|
||||
* @return void
|
||||
*/
|
||||
@@ -498,7 +537,7 @@ abstract class BaseOutputDocument extends BaseObject implements Persistent
|
||||
|
||||
/**
|
||||
* Set the value of [out_doc_top_margin] column.
|
||||
*
|
||||
*
|
||||
* @param int $v new value
|
||||
* @return void
|
||||
*/
|
||||
@@ -520,7 +559,7 @@ abstract class BaseOutputDocument extends BaseObject implements Persistent
|
||||
|
||||
/**
|
||||
* Set the value of [out_doc_bottom_margin] column.
|
||||
*
|
||||
*
|
||||
* @param int $v new value
|
||||
* @return void
|
||||
*/
|
||||
@@ -542,7 +581,7 @@ abstract class BaseOutputDocument extends BaseObject implements Persistent
|
||||
|
||||
/**
|
||||
* Set the value of [out_doc_generate] column.
|
||||
*
|
||||
*
|
||||
* @param string $v new value
|
||||
* @return void
|
||||
*/
|
||||
@@ -564,7 +603,7 @@ abstract class BaseOutputDocument extends BaseObject implements Persistent
|
||||
|
||||
/**
|
||||
* Set the value of [out_doc_type] column.
|
||||
*
|
||||
*
|
||||
* @param string $v new value
|
||||
* @return void
|
||||
*/
|
||||
@@ -586,7 +625,7 @@ abstract class BaseOutputDocument extends BaseObject implements Persistent
|
||||
|
||||
/**
|
||||
* Set the value of [out_doc_current_revision] column.
|
||||
*
|
||||
*
|
||||
* @param int $v new value
|
||||
* @return void
|
||||
*/
|
||||
@@ -608,7 +647,7 @@ abstract class BaseOutputDocument extends BaseObject implements Persistent
|
||||
|
||||
/**
|
||||
* Set the value of [out_doc_field_mapping] column.
|
||||
*
|
||||
*
|
||||
* @param string $v new value
|
||||
* @return void
|
||||
*/
|
||||
@@ -630,7 +669,7 @@ abstract class BaseOutputDocument extends BaseObject implements Persistent
|
||||
|
||||
/**
|
||||
* Set the value of [out_doc_versioning] column.
|
||||
*
|
||||
*
|
||||
* @param int $v new value
|
||||
* @return void
|
||||
*/
|
||||
@@ -652,7 +691,7 @@ abstract class BaseOutputDocument extends BaseObject implements Persistent
|
||||
|
||||
/**
|
||||
* Set the value of [out_doc_destination_path] column.
|
||||
*
|
||||
*
|
||||
* @param string $v new value
|
||||
* @return void
|
||||
*/
|
||||
@@ -674,7 +713,7 @@ abstract class BaseOutputDocument extends BaseObject implements Persistent
|
||||
|
||||
/**
|
||||
* Set the value of [out_doc_tags] column.
|
||||
*
|
||||
*
|
||||
* @param string $v new value
|
||||
* @return void
|
||||
*/
|
||||
@@ -696,7 +735,7 @@ abstract class BaseOutputDocument extends BaseObject implements Persistent
|
||||
|
||||
/**
|
||||
* Set the value of [out_doc_pdf_security_enabled] column.
|
||||
*
|
||||
*
|
||||
* @param int $v new value
|
||||
* @return void
|
||||
*/
|
||||
@@ -718,7 +757,7 @@ abstract class BaseOutputDocument extends BaseObject implements Persistent
|
||||
|
||||
/**
|
||||
* Set the value of [out_doc_pdf_security_open_password] column.
|
||||
*
|
||||
*
|
||||
* @param string $v new value
|
||||
* @return void
|
||||
*/
|
||||
@@ -740,7 +779,7 @@ abstract class BaseOutputDocument extends BaseObject implements Persistent
|
||||
|
||||
/**
|
||||
* Set the value of [out_doc_pdf_security_owner_password] column.
|
||||
*
|
||||
*
|
||||
* @param string $v new value
|
||||
* @return void
|
||||
*/
|
||||
@@ -762,7 +801,7 @@ abstract class BaseOutputDocument extends BaseObject implements Persistent
|
||||
|
||||
/**
|
||||
* Set the value of [out_doc_pdf_security_permissions] column.
|
||||
*
|
||||
*
|
||||
* @param string $v new value
|
||||
* @return void
|
||||
*/
|
||||
@@ -803,46 +842,48 @@ abstract class BaseOutputDocument extends BaseObject implements Persistent
|
||||
|
||||
$this->pro_uid = $rs->getString($startcol + 1);
|
||||
|
||||
$this->out_doc_landscape = $rs->getInt($startcol + 2);
|
||||
$this->out_doc_report_generator = $rs->getString($startcol + 2);
|
||||
|
||||
$this->out_doc_media = $rs->getString($startcol + 3);
|
||||
$this->out_doc_landscape = $rs->getInt($startcol + 3);
|
||||
|
||||
$this->out_doc_left_margin = $rs->getInt($startcol + 4);
|
||||
$this->out_doc_media = $rs->getString($startcol + 4);
|
||||
|
||||
$this->out_doc_right_margin = $rs->getInt($startcol + 5);
|
||||
$this->out_doc_left_margin = $rs->getInt($startcol + 5);
|
||||
|
||||
$this->out_doc_top_margin = $rs->getInt($startcol + 6);
|
||||
$this->out_doc_right_margin = $rs->getInt($startcol + 6);
|
||||
|
||||
$this->out_doc_bottom_margin = $rs->getInt($startcol + 7);
|
||||
$this->out_doc_top_margin = $rs->getInt($startcol + 7);
|
||||
|
||||
$this->out_doc_generate = $rs->getString($startcol + 8);
|
||||
$this->out_doc_bottom_margin = $rs->getInt($startcol + 8);
|
||||
|
||||
$this->out_doc_type = $rs->getString($startcol + 9);
|
||||
$this->out_doc_generate = $rs->getString($startcol + 9);
|
||||
|
||||
$this->out_doc_current_revision = $rs->getInt($startcol + 10);
|
||||
$this->out_doc_type = $rs->getString($startcol + 10);
|
||||
|
||||
$this->out_doc_field_mapping = $rs->getString($startcol + 11);
|
||||
$this->out_doc_current_revision = $rs->getInt($startcol + 11);
|
||||
|
||||
$this->out_doc_versioning = $rs->getInt($startcol + 12);
|
||||
$this->out_doc_field_mapping = $rs->getString($startcol + 12);
|
||||
|
||||
$this->out_doc_destination_path = $rs->getString($startcol + 13);
|
||||
$this->out_doc_versioning = $rs->getInt($startcol + 13);
|
||||
|
||||
$this->out_doc_tags = $rs->getString($startcol + 14);
|
||||
$this->out_doc_destination_path = $rs->getString($startcol + 14);
|
||||
|
||||
$this->out_doc_pdf_security_enabled = $rs->getInt($startcol + 15);
|
||||
$this->out_doc_tags = $rs->getString($startcol + 15);
|
||||
|
||||
$this->out_doc_pdf_security_open_password = $rs->getString($startcol + 16);
|
||||
$this->out_doc_pdf_security_enabled = $rs->getInt($startcol + 16);
|
||||
|
||||
$this->out_doc_pdf_security_owner_password = $rs->getString($startcol + 17);
|
||||
$this->out_doc_pdf_security_open_password = $rs->getString($startcol + 17);
|
||||
|
||||
$this->out_doc_pdf_security_permissions = $rs->getString($startcol + 18);
|
||||
$this->out_doc_pdf_security_owner_password = $rs->getString($startcol + 18);
|
||||
|
||||
$this->out_doc_pdf_security_permissions = $rs->getString($startcol + 19);
|
||||
|
||||
$this->resetModified();
|
||||
|
||||
$this->setNew(false);
|
||||
|
||||
// FIXME - using NUM_COLUMNS may be clearer.
|
||||
return $startcol + 19; // 19 = OutputDocumentPeer::NUM_COLUMNS - OutputDocumentPeer::NUM_LAZY_LOAD_COLUMNS).
|
||||
return $startcol + 20; // 20 = OutputDocumentPeer::NUM_COLUMNS - OutputDocumentPeer::NUM_LAZY_LOAD_COLUMNS).
|
||||
|
||||
} catch (Exception $e) {
|
||||
throw new PropelException("Error populating OutputDocument object", $e);
|
||||
@@ -997,7 +1038,7 @@ abstract class BaseOutputDocument extends BaseObject implements Persistent
|
||||
* an aggreagated array of ValidationFailed objects will be returned.
|
||||
*
|
||||
* @param array $columns Array of column names to validate.
|
||||
* @return mixed <code>true</code> if all validations pass;
|
||||
* @return mixed <code>true</code> if all validations pass;
|
||||
array of <code>ValidationFailed</code> objects otherwise.
|
||||
*/
|
||||
protected function doValidate($columns = null)
|
||||
@@ -1053,54 +1094,57 @@ abstract class BaseOutputDocument extends BaseObject implements Persistent
|
||||
return $this->getProUid();
|
||||
break;
|
||||
case 2:
|
||||
return $this->getOutDocLandscape();
|
||||
return $this->getOutDocReportGenerator();
|
||||
break;
|
||||
case 3:
|
||||
return $this->getOutDocMedia();
|
||||
return $this->getOutDocLandscape();
|
||||
break;
|
||||
case 4:
|
||||
return $this->getOutDocLeftMargin();
|
||||
return $this->getOutDocMedia();
|
||||
break;
|
||||
case 5:
|
||||
return $this->getOutDocRightMargin();
|
||||
return $this->getOutDocLeftMargin();
|
||||
break;
|
||||
case 6:
|
||||
return $this->getOutDocTopMargin();
|
||||
return $this->getOutDocRightMargin();
|
||||
break;
|
||||
case 7:
|
||||
return $this->getOutDocBottomMargin();
|
||||
return $this->getOutDocTopMargin();
|
||||
break;
|
||||
case 8:
|
||||
return $this->getOutDocGenerate();
|
||||
return $this->getOutDocBottomMargin();
|
||||
break;
|
||||
case 9:
|
||||
return $this->getOutDocType();
|
||||
return $this->getOutDocGenerate();
|
||||
break;
|
||||
case 10:
|
||||
return $this->getOutDocCurrentRevision();
|
||||
return $this->getOutDocType();
|
||||
break;
|
||||
case 11:
|
||||
return $this->getOutDocFieldMapping();
|
||||
return $this->getOutDocCurrentRevision();
|
||||
break;
|
||||
case 12:
|
||||
return $this->getOutDocVersioning();
|
||||
return $this->getOutDocFieldMapping();
|
||||
break;
|
||||
case 13:
|
||||
return $this->getOutDocDestinationPath();
|
||||
return $this->getOutDocVersioning();
|
||||
break;
|
||||
case 14:
|
||||
return $this->getOutDocTags();
|
||||
return $this->getOutDocDestinationPath();
|
||||
break;
|
||||
case 15:
|
||||
return $this->getOutDocPdfSecurityEnabled();
|
||||
return $this->getOutDocTags();
|
||||
break;
|
||||
case 16:
|
||||
return $this->getOutDocPdfSecurityOpenPassword();
|
||||
return $this->getOutDocPdfSecurityEnabled();
|
||||
break;
|
||||
case 17:
|
||||
return $this->getOutDocPdfSecurityOwnerPassword();
|
||||
return $this->getOutDocPdfSecurityOpenPassword();
|
||||
break;
|
||||
case 18:
|
||||
return $this->getOutDocPdfSecurityOwnerPassword();
|
||||
break;
|
||||
case 19:
|
||||
return $this->getOutDocPdfSecurityPermissions();
|
||||
break;
|
||||
default:
|
||||
@@ -1125,23 +1169,24 @@ abstract class BaseOutputDocument extends BaseObject implements Persistent
|
||||
$result = array(
|
||||
$keys[0] => $this->getOutDocUid(),
|
||||
$keys[1] => $this->getProUid(),
|
||||
$keys[2] => $this->getOutDocLandscape(),
|
||||
$keys[3] => $this->getOutDocMedia(),
|
||||
$keys[4] => $this->getOutDocLeftMargin(),
|
||||
$keys[5] => $this->getOutDocRightMargin(),
|
||||
$keys[6] => $this->getOutDocTopMargin(),
|
||||
$keys[7] => $this->getOutDocBottomMargin(),
|
||||
$keys[8] => $this->getOutDocGenerate(),
|
||||
$keys[9] => $this->getOutDocType(),
|
||||
$keys[10] => $this->getOutDocCurrentRevision(),
|
||||
$keys[11] => $this->getOutDocFieldMapping(),
|
||||
$keys[12] => $this->getOutDocVersioning(),
|
||||
$keys[13] => $this->getOutDocDestinationPath(),
|
||||
$keys[14] => $this->getOutDocTags(),
|
||||
$keys[15] => $this->getOutDocPdfSecurityEnabled(),
|
||||
$keys[16] => $this->getOutDocPdfSecurityOpenPassword(),
|
||||
$keys[17] => $this->getOutDocPdfSecurityOwnerPassword(),
|
||||
$keys[18] => $this->getOutDocPdfSecurityPermissions(),
|
||||
$keys[2] => $this->getOutDocReportGenerator(),
|
||||
$keys[3] => $this->getOutDocLandscape(),
|
||||
$keys[4] => $this->getOutDocMedia(),
|
||||
$keys[5] => $this->getOutDocLeftMargin(),
|
||||
$keys[6] => $this->getOutDocRightMargin(),
|
||||
$keys[7] => $this->getOutDocTopMargin(),
|
||||
$keys[8] => $this->getOutDocBottomMargin(),
|
||||
$keys[9] => $this->getOutDocGenerate(),
|
||||
$keys[10] => $this->getOutDocType(),
|
||||
$keys[11] => $this->getOutDocCurrentRevision(),
|
||||
$keys[12] => $this->getOutDocFieldMapping(),
|
||||
$keys[13] => $this->getOutDocVersioning(),
|
||||
$keys[14] => $this->getOutDocDestinationPath(),
|
||||
$keys[15] => $this->getOutDocTags(),
|
||||
$keys[16] => $this->getOutDocPdfSecurityEnabled(),
|
||||
$keys[17] => $this->getOutDocPdfSecurityOpenPassword(),
|
||||
$keys[18] => $this->getOutDocPdfSecurityOwnerPassword(),
|
||||
$keys[19] => $this->getOutDocPdfSecurityPermissions(),
|
||||
);
|
||||
return $result;
|
||||
}
|
||||
@@ -1180,54 +1225,57 @@ abstract class BaseOutputDocument extends BaseObject implements Persistent
|
||||
$this->setProUid($value);
|
||||
break;
|
||||
case 2:
|
||||
$this->setOutDocLandscape($value);
|
||||
$this->setOutDocReportGenerator($value);
|
||||
break;
|
||||
case 3:
|
||||
$this->setOutDocMedia($value);
|
||||
$this->setOutDocLandscape($value);
|
||||
break;
|
||||
case 4:
|
||||
$this->setOutDocLeftMargin($value);
|
||||
$this->setOutDocMedia($value);
|
||||
break;
|
||||
case 5:
|
||||
$this->setOutDocRightMargin($value);
|
||||
$this->setOutDocLeftMargin($value);
|
||||
break;
|
||||
case 6:
|
||||
$this->setOutDocTopMargin($value);
|
||||
$this->setOutDocRightMargin($value);
|
||||
break;
|
||||
case 7:
|
||||
$this->setOutDocBottomMargin($value);
|
||||
$this->setOutDocTopMargin($value);
|
||||
break;
|
||||
case 8:
|
||||
$this->setOutDocGenerate($value);
|
||||
$this->setOutDocBottomMargin($value);
|
||||
break;
|
||||
case 9:
|
||||
$this->setOutDocType($value);
|
||||
$this->setOutDocGenerate($value);
|
||||
break;
|
||||
case 10:
|
||||
$this->setOutDocCurrentRevision($value);
|
||||
$this->setOutDocType($value);
|
||||
break;
|
||||
case 11:
|
||||
$this->setOutDocFieldMapping($value);
|
||||
$this->setOutDocCurrentRevision($value);
|
||||
break;
|
||||
case 12:
|
||||
$this->setOutDocVersioning($value);
|
||||
$this->setOutDocFieldMapping($value);
|
||||
break;
|
||||
case 13:
|
||||
$this->setOutDocDestinationPath($value);
|
||||
$this->setOutDocVersioning($value);
|
||||
break;
|
||||
case 14:
|
||||
$this->setOutDocTags($value);
|
||||
$this->setOutDocDestinationPath($value);
|
||||
break;
|
||||
case 15:
|
||||
$this->setOutDocPdfSecurityEnabled($value);
|
||||
$this->setOutDocTags($value);
|
||||
break;
|
||||
case 16:
|
||||
$this->setOutDocPdfSecurityOpenPassword($value);
|
||||
$this->setOutDocPdfSecurityEnabled($value);
|
||||
break;
|
||||
case 17:
|
||||
$this->setOutDocPdfSecurityOwnerPassword($value);
|
||||
$this->setOutDocPdfSecurityOpenPassword($value);
|
||||
break;
|
||||
case 18:
|
||||
$this->setOutDocPdfSecurityOwnerPassword($value);
|
||||
break;
|
||||
case 19:
|
||||
$this->setOutDocPdfSecurityPermissions($value);
|
||||
break;
|
||||
} // switch()
|
||||
@@ -1262,71 +1310,75 @@ abstract class BaseOutputDocument extends BaseObject implements Persistent
|
||||
}
|
||||
|
||||
if (array_key_exists($keys[2], $arr)) {
|
||||
$this->setOutDocLandscape($arr[$keys[2]]);
|
||||
$this->setOutDocReportGenerator($arr[$keys[2]]);
|
||||
}
|
||||
|
||||
if (array_key_exists($keys[3], $arr)) {
|
||||
$this->setOutDocMedia($arr[$keys[3]]);
|
||||
$this->setOutDocLandscape($arr[$keys[3]]);
|
||||
}
|
||||
|
||||
if (array_key_exists($keys[4], $arr)) {
|
||||
$this->setOutDocLeftMargin($arr[$keys[4]]);
|
||||
$this->setOutDocMedia($arr[$keys[4]]);
|
||||
}
|
||||
|
||||
if (array_key_exists($keys[5], $arr)) {
|
||||
$this->setOutDocRightMargin($arr[$keys[5]]);
|
||||
$this->setOutDocLeftMargin($arr[$keys[5]]);
|
||||
}
|
||||
|
||||
if (array_key_exists($keys[6], $arr)) {
|
||||
$this->setOutDocTopMargin($arr[$keys[6]]);
|
||||
$this->setOutDocRightMargin($arr[$keys[6]]);
|
||||
}
|
||||
|
||||
if (array_key_exists($keys[7], $arr)) {
|
||||
$this->setOutDocBottomMargin($arr[$keys[7]]);
|
||||
$this->setOutDocTopMargin($arr[$keys[7]]);
|
||||
}
|
||||
|
||||
if (array_key_exists($keys[8], $arr)) {
|
||||
$this->setOutDocGenerate($arr[$keys[8]]);
|
||||
$this->setOutDocBottomMargin($arr[$keys[8]]);
|
||||
}
|
||||
|
||||
if (array_key_exists($keys[9], $arr)) {
|
||||
$this->setOutDocType($arr[$keys[9]]);
|
||||
$this->setOutDocGenerate($arr[$keys[9]]);
|
||||
}
|
||||
|
||||
if (array_key_exists($keys[10], $arr)) {
|
||||
$this->setOutDocCurrentRevision($arr[$keys[10]]);
|
||||
$this->setOutDocType($arr[$keys[10]]);
|
||||
}
|
||||
|
||||
if (array_key_exists($keys[11], $arr)) {
|
||||
$this->setOutDocFieldMapping($arr[$keys[11]]);
|
||||
$this->setOutDocCurrentRevision($arr[$keys[11]]);
|
||||
}
|
||||
|
||||
if (array_key_exists($keys[12], $arr)) {
|
||||
$this->setOutDocVersioning($arr[$keys[12]]);
|
||||
$this->setOutDocFieldMapping($arr[$keys[12]]);
|
||||
}
|
||||
|
||||
if (array_key_exists($keys[13], $arr)) {
|
||||
$this->setOutDocDestinationPath($arr[$keys[13]]);
|
||||
$this->setOutDocVersioning($arr[$keys[13]]);
|
||||
}
|
||||
|
||||
if (array_key_exists($keys[14], $arr)) {
|
||||
$this->setOutDocTags($arr[$keys[14]]);
|
||||
$this->setOutDocDestinationPath($arr[$keys[14]]);
|
||||
}
|
||||
|
||||
if (array_key_exists($keys[15], $arr)) {
|
||||
$this->setOutDocPdfSecurityEnabled($arr[$keys[15]]);
|
||||
$this->setOutDocTags($arr[$keys[15]]);
|
||||
}
|
||||
|
||||
if (array_key_exists($keys[16], $arr)) {
|
||||
$this->setOutDocPdfSecurityOpenPassword($arr[$keys[16]]);
|
||||
$this->setOutDocPdfSecurityEnabled($arr[$keys[16]]);
|
||||
}
|
||||
|
||||
if (array_key_exists($keys[17], $arr)) {
|
||||
$this->setOutDocPdfSecurityOwnerPassword($arr[$keys[17]]);
|
||||
$this->setOutDocPdfSecurityOpenPassword($arr[$keys[17]]);
|
||||
}
|
||||
|
||||
if (array_key_exists($keys[18], $arr)) {
|
||||
$this->setOutDocPdfSecurityPermissions($arr[$keys[18]]);
|
||||
$this->setOutDocPdfSecurityOwnerPassword($arr[$keys[18]]);
|
||||
}
|
||||
|
||||
if (array_key_exists($keys[19], $arr)) {
|
||||
$this->setOutDocPdfSecurityPermissions($arr[$keys[19]]);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1348,6 +1400,10 @@ abstract class BaseOutputDocument extends BaseObject implements Persistent
|
||||
$criteria->add(OutputDocumentPeer::PRO_UID, $this->pro_uid);
|
||||
}
|
||||
|
||||
if ($this->isColumnModified(OutputDocumentPeer::OUT_DOC_REPORT_GENERATOR)) {
|
||||
$criteria->add(OutputDocumentPeer::OUT_DOC_REPORT_GENERATOR, $this->out_doc_report_generator);
|
||||
}
|
||||
|
||||
if ($this->isColumnModified(OutputDocumentPeer::OUT_DOC_LANDSCAPE)) {
|
||||
$criteria->add(OutputDocumentPeer::OUT_DOC_LANDSCAPE, $this->out_doc_landscape);
|
||||
}
|
||||
@@ -1472,6 +1528,8 @@ abstract class BaseOutputDocument extends BaseObject implements Persistent
|
||||
|
||||
$copyObj->setProUid($this->pro_uid);
|
||||
|
||||
$copyObj->setOutDocReportGenerator($this->out_doc_report_generator);
|
||||
|
||||
$copyObj->setOutDocLandscape($this->out_doc_landscape);
|
||||
|
||||
$copyObj->setOutDocMedia($this->out_doc_media);
|
||||
|
||||
@@ -25,7 +25,7 @@ abstract class BaseOutputDocumentPeer
|
||||
const CLASS_DEFAULT = 'classes.model.OutputDocument';
|
||||
|
||||
/** The total number of columns. */
|
||||
const NUM_COLUMNS = 19;
|
||||
const NUM_COLUMNS = 20;
|
||||
|
||||
/** The number of lazy-loaded columns. */
|
||||
const NUM_LAZY_LOAD_COLUMNS = 0;
|
||||
@@ -37,6 +37,9 @@ abstract class BaseOutputDocumentPeer
|
||||
/** the column name for the PRO_UID field */
|
||||
const PRO_UID = 'OUTPUT_DOCUMENT.PRO_UID';
|
||||
|
||||
/** the column name for the OUT_DOC_REPORT_GENERATOR field */
|
||||
const OUT_DOC_REPORT_GENERATOR = 'OUTPUT_DOCUMENT.OUT_DOC_REPORT_GENERATOR';
|
||||
|
||||
/** the column name for the OUT_DOC_LANDSCAPE field */
|
||||
const OUT_DOC_LANDSCAPE = 'OUTPUT_DOCUMENT.OUT_DOC_LANDSCAPE';
|
||||
|
||||
@@ -99,10 +102,10 @@ abstract class BaseOutputDocumentPeer
|
||||
* e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id'
|
||||
*/
|
||||
private static $fieldNames = array (
|
||||
BasePeer::TYPE_PHPNAME => array ('OutDocUid', 'ProUid', '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_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_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, )
|
||||
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, )
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -112,10 +115,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, 'OutDocLandscape' => 2, 'OutDocMedia' => 3, 'OutDocLeftMargin' => 4, 'OutDocRightMargin' => 5, 'OutDocTopMargin' => 6, 'OutDocBottomMargin' => 7, 'OutDocGenerate' => 8, 'OutDocType' => 9, 'OutDocCurrentRevision' => 10, 'OutDocFieldMapping' => 11, 'OutDocVersioning' => 12, 'OutDocDestinationPath' => 13, 'OutDocTags' => 14, 'OutDocPdfSecurityEnabled' => 15, 'OutDocPdfSecurityOpenPassword' => 16, 'OutDocPdfSecurityOwnerPassword' => 17, 'OutDocPdfSecurityPermissions' => 18, ),
|
||||
BasePeer::TYPE_COLNAME => array (OutputDocumentPeer::OUT_DOC_UID => 0, OutputDocumentPeer::PRO_UID => 1, OutputDocumentPeer::OUT_DOC_LANDSCAPE => 2, OutputDocumentPeer::OUT_DOC_MEDIA => 3, OutputDocumentPeer::OUT_DOC_LEFT_MARGIN => 4, OutputDocumentPeer::OUT_DOC_RIGHT_MARGIN => 5, OutputDocumentPeer::OUT_DOC_TOP_MARGIN => 6, OutputDocumentPeer::OUT_DOC_BOTTOM_MARGIN => 7, OutputDocumentPeer::OUT_DOC_GENERATE => 8, OutputDocumentPeer::OUT_DOC_TYPE => 9, OutputDocumentPeer::OUT_DOC_CURRENT_REVISION => 10, OutputDocumentPeer::OUT_DOC_FIELD_MAPPING => 11, OutputDocumentPeer::OUT_DOC_VERSIONING => 12, OutputDocumentPeer::OUT_DOC_DESTINATION_PATH => 13, OutputDocumentPeer::OUT_DOC_TAGS => 14, OutputDocumentPeer::OUT_DOC_PDF_SECURITY_ENABLED => 15, OutputDocumentPeer::OUT_DOC_PDF_SECURITY_OPEN_PASSWORD => 16, OutputDocumentPeer::OUT_DOC_PDF_SECURITY_OWNER_PASSWORD => 17, OutputDocumentPeer::OUT_DOC_PDF_SECURITY_PERMISSIONS => 18, ),
|
||||
BasePeer::TYPE_FIELDNAME => array ('OUT_DOC_UID' => 0, 'PRO_UID' => 1, 'OUT_DOC_LANDSCAPE' => 2, 'OUT_DOC_MEDIA' => 3, 'OUT_DOC_LEFT_MARGIN' => 4, 'OUT_DOC_RIGHT_MARGIN' => 5, 'OUT_DOC_TOP_MARGIN' => 6, 'OUT_DOC_BOTTOM_MARGIN' => 7, 'OUT_DOC_GENERATE' => 8, 'OUT_DOC_TYPE' => 9, 'OUT_DOC_CURRENT_REVISION' => 10, 'OUT_DOC_FIELD_MAPPING' => 11, 'OUT_DOC_VERSIONING' => 12, 'OUT_DOC_DESTINATION_PATH' => 13, 'OUT_DOC_TAGS' => 14, 'OUT_DOC_PDF_SECURITY_ENABLED' => 15, 'OUT_DOC_PDF_SECURITY_OPEN_PASSWORD' => 16, 'OUT_DOC_PDF_SECURITY_OWNER_PASSWORD' => 17, 'OUT_DOC_PDF_SECURITY_PERMISSIONS' => 18, ),
|
||||
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, )
|
||||
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, )
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -220,6 +223,8 @@ abstract class BaseOutputDocumentPeer
|
||||
|
||||
$criteria->addSelectColumn(OutputDocumentPeer::PRO_UID);
|
||||
|
||||
$criteria->addSelectColumn(OutputDocumentPeer::OUT_DOC_REPORT_GENERATOR);
|
||||
|
||||
$criteria->addSelectColumn(OutputDocumentPeer::OUT_DOC_LANDSCAPE);
|
||||
|
||||
$criteria->addSelectColumn(OutputDocumentPeer::OUT_DOC_MEDIA);
|
||||
|
||||
@@ -733,6 +733,7 @@
|
||||
</vendor>
|
||||
<column name="OUT_DOC_UID" type="VARCHAR" size="32" required="true" primaryKey="true" default=""/>
|
||||
<column name="PRO_UID" type="VARCHAR" size="32" required="true" default=""/>
|
||||
<column name="OUT_DOC_REPORT_GENERATOR" type="VARCHAR" size="10" required="true" default="HTML2PDF"/>
|
||||
<column name="OUT_DOC_LANDSCAPE" type="TINYINT" required="true" default="0"/>
|
||||
<column name="OUT_DOC_MEDIA" type="VARCHAR" size="10" required="true" default="Letter"/>
|
||||
<column name="OUT_DOC_LEFT_MARGIN" type="INTEGER" default="30"/>
|
||||
|
||||
@@ -32,10 +32,16 @@ class AppProxy extends HttpProxyController
|
||||
}
|
||||
|
||||
G::LoadClass( 'case' );
|
||||
$case = new Cases();
|
||||
$case = new Cases();
|
||||
$caseLoad = '';
|
||||
|
||||
if (!isset($_SESSION['PROCESS']) && !isset($httpData->pro)) {
|
||||
$caseLoad = $case->loadCase($appUid);
|
||||
$httpData->pro = $caseLoad['PRO_UID'];
|
||||
}
|
||||
|
||||
$proUid = ($httpData->pro == '') ? $_SESSION['PROCESS'] : $httpData->pro;
|
||||
$tasUid = ($httpData->tas == '') ? $_SESSION['TASK'] : $httpData->tas;
|
||||
$proUid = (!isset($httpData->pro)) ? $_SESSION['PROCESS'] : $httpData->pro;
|
||||
$tasUid = (!isset($httpData->tas)) ? ((isset($_SESSION['TASK'])) ? $_SESSION['TASK'] : '') : $httpData->tas;
|
||||
$usrUid = $_SESSION['USER_LOGGED'];
|
||||
|
||||
$respView = $case->getAllObjectsFrom( $proUid, $appUid, $tasUid, $usrUid, 'VIEW' );
|
||||
@@ -147,6 +153,20 @@ class AppProxy extends HttpProxyController
|
||||
throw new Exception( G::LoadTranslation( 'ID_NO_PERMISSION_NO_PARTICIPATED' ) );
|
||||
}
|
||||
|
||||
if ($httpData->action == 'sent') { // Get the last valid delegation for participated list
|
||||
$criteria = new Criteria();
|
||||
$criteria->addSelectColumn(AppDelegationPeer::DEL_INDEX);
|
||||
$criteria->add(AppDelegationPeer::APP_UID, $httpData->appUid);
|
||||
$criteria->add(AppDelegationPeer::DEL_FINISH_DATE, null, Criteria::ISNULL);
|
||||
$criteria->addDescendingOrderByColumn(AppDelegationPeer::DEL_INDEX);
|
||||
if (AppDelegationPeer::doCount($criteria) > 0) {
|
||||
$dataset = AppDelegationPeer::doSelectRS($criteria);
|
||||
$dataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
$dataset->next();
|
||||
$row = $dataset->getRow();
|
||||
$httpData->delIndex = $row['DEL_INDEX'];
|
||||
}
|
||||
}
|
||||
$applicationFields = $case->loadCase( $httpData->appUid, $httpData->delIndex );
|
||||
$process = new Process();
|
||||
$processData = $process->load( $applicationFields['PRO_UID'] );
|
||||
@@ -188,6 +208,20 @@ class AppProxy extends HttpProxyController
|
||||
$processData = $_SESSION['_processData'];
|
||||
unset( $_SESSION['_processData'] );
|
||||
} else {
|
||||
if ($httpData->action == 'sent') { // Get the last valid delegation for participated list
|
||||
$criteria = new Criteria();
|
||||
$criteria->addSelectColumn(AppDelegationPeer::DEL_INDEX);
|
||||
$criteria->add(AppDelegationPeer::APP_UID, $httpData->appUid);
|
||||
$criteria->add(AppDelegationPeer::DEL_FINISH_DATE, null, Criteria::ISNULL);
|
||||
$criteria->addDescendingOrderByColumn(AppDelegationPeer::DEL_INDEX);
|
||||
if (AppDelegationPeer::doCount($criteria) > 0) {
|
||||
$dataset = AppDelegationPeer::doSelectRS($criteria);
|
||||
$dataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
$dataset->next();
|
||||
$row = $dataset->getRow();
|
||||
$httpData->delIndex = $row['DEL_INDEX'];
|
||||
}
|
||||
}
|
||||
$applicationFields = $case->loadCase( $httpData->appUid, $httpData->delIndex );
|
||||
$process = new Process();
|
||||
$processData = $process->load( $applicationFields['PRO_UID'] );
|
||||
|
||||
@@ -127,7 +127,7 @@ class Installer extends Controller
|
||||
$info->memory = new stdclass();
|
||||
|
||||
$info->php->version = phpversion();
|
||||
$info->php->result = $phpVerNum >= 5.1 ? true : false;
|
||||
$info->php->result = version_compare(phpversion(), '5.2.10') >= 0 ? true : false;
|
||||
|
||||
// MYSQL info and verification
|
||||
$info->mysql->result = false;
|
||||
|
||||
@@ -117,6 +117,7 @@ CREATE TABLE `APP_MESSAGE`
|
||||
`APP_MSG_STATUS` VARCHAR(20),
|
||||
`APP_MSG_ATTACH` MEDIUMTEXT,
|
||||
`APP_MSG_SEND_DATE` DATETIME NOT NULL,
|
||||
`APP_MSG_SHOW_MESSAGE` TINYINT default 1 NOT NULL,
|
||||
PRIMARY KEY (`APP_MSG_UID`)
|
||||
)ENGINE=MyISAM DEFAULT CHARSET='utf8' COMMENT='Messages in an Application';
|
||||
#-----------------------------------------------------------------------------
|
||||
@@ -351,6 +352,7 @@ CREATE TABLE `OUTPUT_DOCUMENT`
|
||||
(
|
||||
`OUT_DOC_UID` VARCHAR(32) default '' NOT NULL,
|
||||
`PRO_UID` VARCHAR(32) default '' NOT NULL,
|
||||
`OUT_DOC_REPORT_GENERATOR` VARCHAR(10) default 'HTML2PDF' NOT NULL,
|
||||
`OUT_DOC_LANDSCAPE` TINYINT default 0 NOT NULL,
|
||||
`OUT_DOC_MEDIA` VARCHAR(10) default 'Letter' NOT NULL,
|
||||
`OUT_DOC_LEFT_MARGIN` INTEGER default 30,
|
||||
@@ -593,6 +595,10 @@ CREATE TABLE `TASK`
|
||||
`TAS_EVN_UID` VARCHAR(32) default '' NOT NULL,
|
||||
`TAS_BOUNDARY` VARCHAR(32) default '' NOT NULL,
|
||||
`TAS_DERIVATION_SCREEN_TPL` VARCHAR(128) default '',
|
||||
`TAS_SELFSERVICE_TIMEOUT` INTEGER default 0,
|
||||
`TAS_SELFSERVICE_TIME` VARCHAR(15) default '',
|
||||
`TAS_SELFSERVICE_TIME_UNIT` VARCHAR(15) default '',
|
||||
`TAS_SELFSERVICE_TRIGGER_UID` VARCHAR(32) default '',
|
||||
PRIMARY KEY (`TAS_UID`)
|
||||
)ENGINE=MyISAM DEFAULT CHARSET='utf8' COMMENT='Task of workflow';
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
@@ -341,7 +341,7 @@ function expandNode()
|
||||
}
|
||||
//G::pr($processListTree);
|
||||
if ((isset($_POST['option'])) && ($_POST['option'] == "gridDocuments")) {
|
||||
$processListTreeTemp['totalCount']=$totalFolders+$totalDocuments;//count($processListTree);
|
||||
$processListTreeTemp['totalCount']=$totalFolders+count($processListTree);
|
||||
$processListTreeTemp['msg']='correct reload';
|
||||
$processListTreeTemp['items']=$processListTree;
|
||||
$processListTree = $processListTreeTemp;
|
||||
@@ -615,7 +615,7 @@ function uploadDocument()
|
||||
$functionsToReplace["function_standardupload_btnsave"]=' function() {
|
||||
statusBarMessage("'.G::LoadTranslation('ID_UPLOADING_FILE').'", true, true);
|
||||
form = Ext.getCmp("uploadform").getForm();
|
||||
|
||||
|
||||
//Ext.getCmp("uploadform").getForm().submit();
|
||||
//console.log(form);
|
||||
//console.log(form.url);
|
||||
@@ -623,13 +623,13 @@ function uploadDocument()
|
||||
//reset: true,
|
||||
reset: false,
|
||||
success: function(form, action) {
|
||||
|
||||
|
||||
datastore.reload();
|
||||
statusBarMessage(action.result.message, false, true);
|
||||
Ext.getCmp("dialog").destroy();
|
||||
},
|
||||
failure: function(form, action) {
|
||||
|
||||
|
||||
if(!action.result) return;
|
||||
Ext.MessageBox.alert("error", action.result.error);
|
||||
statusBarMessage(action.result.error, false, false);
|
||||
|
||||
@@ -88,7 +88,7 @@ if ($fields['AUTH_SOURCE_PROVIDER'] == 'ldap') {
|
||||
// The attributes the users
|
||||
G::loadClass('pmFunctions');
|
||||
$data = executeQuery('DESCRIBE USERS');
|
||||
$fieldSet = array('USR_UID', 'USR_USERNAME', 'USR_PASSWORD', 'USR_EMAIL', 'USR_CREATE_DATE', 'USR_UPDATE_DATE', 'USR_STATUS', 'USR_COUNTRY', 'USR_CITY', 'USR_LOCATION', 'DEP_UID', 'USR_RESUME', 'USR_ROLE', 'USR_REPORTS_TO', 'USR_REPLACED_BY', 'USR_UX');
|
||||
$fieldSet = array('USR_UID', 'USR_USERNAME', 'USR_PASSWORD', 'USR_EMAIL', 'USR_CREATE_DATE', 'USR_UPDATE_DATE', 'USR_COUNTRY', 'USR_CITY', 'USR_LOCATION', 'DEP_UID', 'USR_RESUME', 'USR_ROLE', 'USR_REPORTS_TO', 'USR_REPLACED_BY', 'USR_UX');
|
||||
$attributes = '';
|
||||
foreach ($data as $value) {
|
||||
if (!(in_array($value['Field'], $fieldSet))) {
|
||||
|
||||
@@ -72,6 +72,22 @@ foreach ($_POST['aUsers'] as $sUser) {
|
||||
foreach ($aAttributes as $value) {
|
||||
if (isset($aUser[$value['attributeUser']])) {
|
||||
$aData[$value['attributeUser']] = str_replace( "*", "'", $aUser[$value['attributeUser']] );
|
||||
if ($value['attributeUser'] == 'USR_STATUS') {
|
||||
$evalValue = $aData[$value['attributeUser']];
|
||||
|
||||
$statusValue = 'INACTIVE';
|
||||
if (is_string($evalValue) && G::toUpper($evalValue) == 'ACTIVE') {
|
||||
$statusValue = 'ACTIVE';
|
||||
}
|
||||
if (is_bool($evalValue) && $evalValue == true) {
|
||||
$statusValue = 'ACTIVE';
|
||||
}
|
||||
if ( (is_float($evalValue) || is_int($evalValue) ||
|
||||
is_integer($evalValue) || is_numeric($evalValue)) && (int)$evalValue != 0) {
|
||||
$statusValue = 'ACTIVE';
|
||||
}
|
||||
$aData[$value['attributeUser']] = $statusValue;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -159,6 +159,11 @@ if ($actionAjax == 'sendMailMessage_JXP') {
|
||||
$aConfiguration['MESS_PASSWORD'] = $passwd;
|
||||
|
||||
$oSpool = new spoolRun();
|
||||
if ($aConfiguration['MESS_RAUTH'] == false || (is_string($aConfiguration['MESS_RAUTH']) && $aConfiguration['MESS_RAUTH'] == 'false')) {
|
||||
$aConfiguration['MESS_RAUTH'] = 0;
|
||||
} else {
|
||||
$aConfiguration['MESS_RAUTH'] = 1;
|
||||
}
|
||||
$oSpool->setConfig( array ('MESS_ENGINE' => $aConfiguration['MESS_ENGINE'],'MESS_SERVER' => $aConfiguration['MESS_SERVER'],'MESS_PORT' => $aConfiguration['MESS_PORT'],'MESS_ACCOUNT' => $aConfiguration['MESS_ACCOUNT'],'MESS_PASSWORD' => $passwd,'SMTPAuth' => $aConfiguration['MESS_RAUTH']
|
||||
) );
|
||||
|
||||
|
||||
@@ -428,9 +428,6 @@ function getParticipated ()
|
||||
);
|
||||
$caseColumns[] = array ('header' => G::LoadTranslation( 'ID_TASK' ),'dataIndex' => 'APP_TAS_TITLE','width' => 120
|
||||
);
|
||||
//$caseColumns[] = array( 'header' => G::LoadTranslation('ID_SENT_BY'), 'dataIndex' => 'APP_DEL_PREVIOUS_USER', 'width' => 120 );
|
||||
$caseColumns[] = array ('header' => G::LoadTranslation( 'ID_CURRENT_USER' ),'dataIndex' => 'APP_CURRENT_USER','width' => 120,'sortable' => false
|
||||
);
|
||||
$caseColumns[] = array ('header' => G::LoadTranslation( 'ID_LAST_MODIFY' ),'dataIndex' => 'APP_UPDATE_DATE','width' => 80
|
||||
);
|
||||
$caseColumns[] = array ('header' => G::LoadTranslation( 'ID_STATUS' ),'dataIndex' => 'APP_STATUS','width' => 50
|
||||
|
||||
@@ -774,6 +774,12 @@ switch (($_POST['action']) ? $_POST['action'] : $_REQUEST['action']) {
|
||||
}
|
||||
|
||||
$oSpool = new spoolRun();
|
||||
if ($aConfiguration['MESS_RAUTH'] == false || (is_string($aConfiguration['MESS_RAUTH']) && $aConfiguration['MESS_RAUTH'] == 'false')) {
|
||||
$aConfiguration['MESS_RAUTH'] = 0;
|
||||
} else {
|
||||
$aConfiguration['MESS_RAUTH'] = 1;
|
||||
}
|
||||
|
||||
$oSpool->setConfig( array ('MESS_ENGINE' => $aConfiguration['MESS_ENGINE'],'MESS_SERVER' => $aConfiguration['MESS_SERVER'],'MESS_PORT' => $aConfiguration['MESS_PORT'],'MESS_ACCOUNT' => $aConfiguration['MESS_ACCOUNT'],'MESS_PASSWORD' => $aConfiguration['MESS_PASSWORD'],'SMTPAuth' => $aConfiguration['MESS_RAUTH']
|
||||
) );
|
||||
$passwd = $oSpool->config['MESS_PASSWORD'];
|
||||
|
||||
@@ -439,6 +439,9 @@ try {
|
||||
if ($aOD['OUT_DOC_PDF_SECURITY_ENABLED'] == '1') {
|
||||
$aProperties['pdfSecurity'] = array ('openPassword' => $aOD['OUT_DOC_PDF_SECURITY_OPEN_PASSWORD'],'ownerPassword' => $aOD['OUT_DOC_PDF_SECURITY_OWNER_PASSWORD'],'permissions' => $aOD['OUT_DOC_PDF_SECURITY_PERMISSIONS']);
|
||||
}
|
||||
if (isset($aOD['OUT_DOC_REPORT_GENERATOR'])) {
|
||||
$aProperties['report_generator'] = $aOD['OUT_DOC_REPORT_GENERATOR'];
|
||||
}
|
||||
$oOutputDocument->generate( $_GET['UID'], $Fields['APP_DATA'], $pathOutput, $sFilename, $aOD['OUT_DOC_TEMPLATE'], (boolean) $aOD['OUT_DOC_LANDSCAPE'], $aOD['OUT_DOC_GENERATE'], $aProperties );
|
||||
//$sFilename, $aOD['OUT_DOC_TEMPLATE'], (boolean)$aOD['OUT_DOC_LANDSCAPE'], $aOD['OUT_DOC_GENERATE'] );
|
||||
break;
|
||||
|
||||
@@ -55,7 +55,11 @@ if ($userData['USR_EMAIL'] != '' && $userData['USR_EMAIL'] === $data['USR_EMAIL'
|
||||
|
||||
G::LoadClass('spool');
|
||||
$oSpool = new spoolRun();
|
||||
|
||||
if ($aSetup['MESS_RAUTH'] == false || (is_string($aSetup['MESS_RAUTH']) && $aSetup['MESS_RAUTH'] == 'false')) {
|
||||
$aSetup['MESS_RAUTH'] = 0;
|
||||
} else {
|
||||
$aSetup['MESS_RAUTH'] = 1;
|
||||
}
|
||||
$oSpool->setConfig( array(
|
||||
'MESS_ENGINE' => $aSetup['MESS_ENGINE'],
|
||||
'MESS_SERVER' => $aSetup['MESS_SERVER'],
|
||||
|
||||
@@ -37,7 +37,7 @@ try {
|
||||
break;
|
||||
}
|
||||
|
||||
//default:
|
||||
//default:
|
||||
|
||||
|
||||
require_once 'classes/model/OutputDocument.php';
|
||||
@@ -46,9 +46,9 @@ try {
|
||||
$oOutputDocument = new OutputDocument();
|
||||
|
||||
if (isset( $_POST['form'] ))
|
||||
$aData = $_POST['form']; //For old process map form
|
||||
$aData = $_POST['form']; //For old process map form
|
||||
else
|
||||
$aData = $_POST; //For Extjs (Since we are not using form in ExtJS)
|
||||
$aData = $_POST; //For Extjs (Since we are not using form in ExtJS)
|
||||
|
||||
|
||||
if (isset( $aData['OUT_DOC_TITLE'] ) && $aData['OUT_DOC_TITLE'] != '') {
|
||||
@@ -80,12 +80,12 @@ try {
|
||||
}
|
||||
|
||||
if (isset( $aData['PRO_UID'] )) {
|
||||
//refresh dbarray with the last change in outputDocument
|
||||
//refresh dbarray with the last change in outputDocument
|
||||
$oMap = new processMap();
|
||||
$oCriteria = $oMap->getOutputDocumentsCriteria( $aData['PRO_UID'] );
|
||||
}
|
||||
|
||||
} catch (Exception $oException) {
|
||||
die( $oException->getMessage() );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -225,6 +225,50 @@
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:complexType name="informationUserStruct">
|
||||
<xs:sequence>
|
||||
<xs:element name="username" type="xs:string"/>
|
||||
<xs:element name="firstname" type="xs:string"/>
|
||||
<xs:element name="lastname" type="xs:string"/>
|
||||
<xs:element name="mail" type="xs:string"/>
|
||||
<xs:element name="address" type="xs:string"/>
|
||||
<xs:element name="zipcode" type="xs:string"/>
|
||||
<xs:element name="country" type="xs:string"/>
|
||||
<xs:element name="state" type="xs:string"/>
|
||||
<xs:element name="location" type="xs:string"/>
|
||||
<xs:element name="phone" type="xs:string"/>
|
||||
<xs:element name="fax" type="xs:string"/>
|
||||
<xs:element name="cellular" type="xs:string"/>
|
||||
<xs:element name="birthday" type="xs:string"/>
|
||||
<xs:element name="position" type="xs:string"/>
|
||||
<xs:element name="replacedby" type="xs:string"/>
|
||||
<xs:element name="duedate" type="xs:string"/>
|
||||
<xs:element name="calendar" type="xs:string"/>
|
||||
<xs:element name="status" type="xs:string"/>
|
||||
<xs:element name="department" type="xs:string"/>
|
||||
<xs:element name="reportsto" type="xs:string"/>
|
||||
<xs:element name="userexperience" type="xs:string"/>
|
||||
<xs:element name="photo" type="xs:string"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
<xs:element name="informationUserRequest">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="sessionId" type="xs:string"/>
|
||||
<xs:element name="userUid" type="xs:string"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="informationUserResponse">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="status_code" type="xs:integer"/>
|
||||
<xs:element name="message" type="xs:string"/>
|
||||
<xs:element name="timestamp" type="xs:string"/>
|
||||
<xs:element name="info" minOccurs="0" maxOccurs="unbounded" type="xs0:informationUserStruct"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="createGroupRequest">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
@@ -896,6 +940,12 @@
|
||||
<message name="updateUserResponse">
|
||||
<part name="parameters" element="xs0:updateUserResponse"/>
|
||||
</message>
|
||||
<message name="informationUserRequest">
|
||||
<part name="parameters" element="xs0:informationUserRequest"/>
|
||||
</message>
|
||||
<message name="informationUserResponse">
|
||||
<part name="parameters" element="xs0:informationUserResponse"/>
|
||||
</message>
|
||||
<message name="createGroupRequest">
|
||||
<part name="parameters" element="xs0:createGroupRequest"/>
|
||||
</message>
|
||||
@@ -1091,6 +1141,10 @@
|
||||
<input message="xs0:updateUserRequest"/>
|
||||
<output message="xs0:updateUserResponse"/>
|
||||
</operation>
|
||||
<operation name="informationUser">
|
||||
<input message="xs0:informationUserRequest"/>
|
||||
<output message="xs0:informationUserResponse"/>
|
||||
</operation>
|
||||
<operation name="createGroup">
|
||||
<input message="xs0:createGroupRequest"/>
|
||||
<output message="xs0:createGroupResponse"/>
|
||||
@@ -1301,6 +1355,15 @@
|
||||
<soap12:body use="literal"/>
|
||||
</output>
|
||||
</operation>
|
||||
<operation name="informationUser">
|
||||
<soap12:operation soapAction="urn:informationUser" soapActionRequired="true" style="document"/>
|
||||
<input>
|
||||
<soap12:body use="literal"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap12:body use="literal"/>
|
||||
</output>
|
||||
</operation>
|
||||
<operation name="createGroup">
|
||||
<soap12:operation soapAction="urn:createGroup" soapActionRequired="true" style="document"/>
|
||||
<input>
|
||||
|
||||
@@ -873,6 +873,26 @@ function updateUser ($params)
|
||||
return $result;
|
||||
}
|
||||
|
||||
function informationUser($params)
|
||||
{
|
||||
$result = isValidSession($params->sessionId);
|
||||
|
||||
if ($result->status_code != 0) {
|
||||
return $result;
|
||||
}
|
||||
|
||||
if (ifPermission($params->sessionId, "PM_USERS") == 0) {
|
||||
$result = new wsResponse(2, "You do not have privileges");
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
$ws = new wsBase();
|
||||
$result = $ws->informationUser($params->userUid);
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
function CreateGroup ($params)
|
||||
{
|
||||
$vsResult = isValidSession( $params->sessionId );
|
||||
@@ -1170,46 +1190,48 @@ function unpauseCase ($params)
|
||||
return $result;
|
||||
}
|
||||
|
||||
$server = new SoapServer( $wsdl );
|
||||
$server->addFunction( "Login" );
|
||||
$server->addFunction( "ProcessList" );
|
||||
$server->addFunction( "CaseList" );
|
||||
$server->addFunction( "UnassignedCaseList" );
|
||||
$server->addFunction( "RoleList" );
|
||||
$server->addFunction( "GroupList" );
|
||||
$server->addFunction( "DepartmentList" );
|
||||
$server->addFunction( "UserList" );
|
||||
$server->addFunction( "TriggerList" );
|
||||
$server->addFunction( "outputDocumentList" );
|
||||
$server->addFunction( "inputDocumentList" );
|
||||
$server->addFunction( "inputDocumentProcessList" );
|
||||
$server->addFunction( "removeDocument" );
|
||||
$server->addFunction( "SendMessage" );
|
||||
$server->addFunction( "SendVariables" );
|
||||
$server->addFunction( "GetVariables" );
|
||||
$server->addFunction( "GetVariablesNames" );
|
||||
$server->addFunction( "DerivateCase" );
|
||||
$server->addFunction( "RouteCase" );
|
||||
$server->addFunction( "executeTrigger" );
|
||||
$server->addFunction( "NewCaseImpersonate" );
|
||||
$server->addFunction( "NewCase" );
|
||||
$server->addFunction( "AssignUserToGroup" );
|
||||
$server->addFunction( "AssignUserToDepartment" );
|
||||
$server->addFunction( "CreateGroup" );
|
||||
$server->addFunction( "CreateDepartment" );
|
||||
$server->addFunction( "CreateUser" );
|
||||
$server->addFunction( "updateUser" );
|
||||
$server->addFunction( "getCaseInfo" );
|
||||
$server->addFunction( "TaskList" );
|
||||
$server->addFunction( "TaskCase" );
|
||||
$server->addFunction( "ReassignCase" );
|
||||
$server->addFunction( "systemInformation" );
|
||||
$server->addFunction( "importProcessFromLibrary" );
|
||||
$server->addFunction( "removeUserFromGroup" );
|
||||
$server->addFunction( "getCaseNotes" );
|
||||
$server->addFunction( "deleteCase" );
|
||||
$server->addFunction( "cancelCase" );
|
||||
$server->addFunction( "pauseCase" );
|
||||
$server->addFunction( "unpauseCase" );
|
||||
$server = new SoapServer($wsdl);
|
||||
|
||||
$server->addFunction("Login");
|
||||
$server->addFunction("ProcessList");
|
||||
$server->addFunction("CaseList");
|
||||
$server->addFunction("UnassignedCaseList");
|
||||
$server->addFunction("RoleList");
|
||||
$server->addFunction("GroupList");
|
||||
$server->addFunction("DepartmentList");
|
||||
$server->addFunction("UserList");
|
||||
$server->addFunction("TriggerList");
|
||||
$server->addFunction("outputDocumentList");
|
||||
$server->addFunction("inputDocumentList");
|
||||
$server->addFunction("inputDocumentProcessList");
|
||||
$server->addFunction("removeDocument");
|
||||
$server->addFunction("SendMessage");
|
||||
$server->addFunction("SendVariables");
|
||||
$server->addFunction("GetVariables");
|
||||
$server->addFunction("GetVariablesNames");
|
||||
$server->addFunction("DerivateCase");
|
||||
$server->addFunction("RouteCase");
|
||||
$server->addFunction("executeTrigger");
|
||||
$server->addFunction("NewCaseImpersonate");
|
||||
$server->addFunction("NewCase");
|
||||
$server->addFunction("AssignUserToGroup");
|
||||
$server->addFunction("AssignUserToDepartment");
|
||||
$server->addFunction("CreateGroup");
|
||||
$server->addFunction("CreateDepartment");
|
||||
$server->addFunction("CreateUser");
|
||||
$server->addFunction("updateUser");
|
||||
$server->addFunction("informationUser");
|
||||
$server->addFunction("getCaseInfo");
|
||||
$server->addFunction("TaskList");
|
||||
$server->addFunction("TaskCase");
|
||||
$server->addFunction("ReassignCase");
|
||||
$server->addFunction("systemInformation");
|
||||
$server->addFunction("importProcessFromLibrary");
|
||||
$server->addFunction("removeUserFromGroup");
|
||||
$server->addFunction("getCaseNotes");
|
||||
$server->addFunction("deleteCase");
|
||||
$server->addFunction("cancelCase");
|
||||
$server->addFunction("pauseCase");
|
||||
$server->addFunction("unpauseCase");
|
||||
$server->handle();
|
||||
|
||||
|
||||
@@ -837,7 +837,7 @@ ul.x-tab-strip li.x-tab-edge {
|
||||
}
|
||||
|
||||
.x-tab-scrolling {
|
||||
position:relative;
|
||||
position:relative;
|
||||
}
|
||||
|
||||
.x-tab-panel-bbar .x-toolbar {
|
||||
@@ -2265,7 +2265,7 @@ div.x-toolbar-no-items {
|
||||
}
|
||||
|
||||
.ext-strict .x-grid3-header-pop-inner {
|
||||
width:14px;
|
||||
width:14px;
|
||||
}
|
||||
|
||||
.x-grid3-header-inner {
|
||||
@@ -4465,7 +4465,7 @@ body.ext-ie6.x-body-masked .x-window select {
|
||||
|
||||
.x-html-editor-tb .x-edit-bold, .x-menu-item img.x-edit-bold {
|
||||
background-position:0 0;
|
||||
background-image:url(../images/default/editor/tb-sprite.gif);
|
||||
background-image:url(../images/default/editor/tb-sprite.gif);
|
||||
}
|
||||
|
||||
.x-html-editor-tb .x-edit-italic, .x-menu-item img.x-edit-italic {
|
||||
@@ -5023,7 +5023,7 @@ body.ext-ie6.x-body-masked .x-window select {
|
||||
-khtml-user-select:none;
|
||||
-webkit-user-select:ignore;
|
||||
display:block;
|
||||
overflow:hidden;
|
||||
overflow:hidden;
|
||||
}
|
||||
|
||||
/* Horizontal styles */
|
||||
@@ -5147,4 +5147,8 @@ body.ext-ie6.x-body-masked .x-window select {
|
||||
|
||||
.ext-gecko2 .ext-mb-fix-cursor {
|
||||
overflow:auto;
|
||||
}
|
||||
|
||||
.x-box-inner .x-form-check-wrap {
|
||||
text-align:center;
|
||||
}
|
||||
@@ -35,7 +35,7 @@
|
||||
#loading-msg {
|
||||
font: bold 11px arial,tahoma,sans-serif;
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
@@ -56,15 +56,9 @@
|
||||
<script type="text/javascript">document.getElementById('loading-msg').innerHTML = 'Loading UI Components...';</script>
|
||||
<script type='text/javascript' src='/js/ext/ext-all.js'></script>
|
||||
<script type="text/javascript">document.getElementById('loading-msg').innerHTML = 'Loading UI Extensions';</script>
|
||||
<!--
|
||||
<script type='text/javascript' src='/js/ext/wz_jsgraphics.js'></script>
|
||||
<script type='text/javascript' src='/js/ext/mootools.js'></script>
|
||||
<script type='text/javascript' src='/js/ext/moocanvas.js'></script>
|
||||
!-->
|
||||
<script type='text/javascript' src='/js/ext/draw2d.js'></script>
|
||||
<script type="text/javascript">document.getElementById('loading-msg').innerHTML = 'Initializing...';</script>
|
||||
{styles}
|
||||
|
||||
|
||||
{bodyTemplate}
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
#loading-msg {
|
||||
font: bold 11px arial,tahoma,sans-serif;
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
@@ -57,15 +57,9 @@
|
||||
<script type="text/javascript">document.getElementById('loading-msg').innerHTML = 'Loading UI Components...';</script>
|
||||
<script type='text/javascript' src='/js/ext/ext-all.js'></script>
|
||||
<script type="text/javascript">document.getElementById('loading-msg').innerHTML = 'Loading UI Extensions';</script>
|
||||
<!--
|
||||
<script type='text/javascript' src='/js/ext/wz_jsgraphics.js'></script>
|
||||
<script type='text/javascript' src='/js/ext/mootools.js'></script>
|
||||
<script type='text/javascript' src='/js/ext/moocanvas.js'></script>
|
||||
!-->
|
||||
<script type='text/javascript' src='/js/ext/draw2d.js'></script>
|
||||
<script type="text/javascript">document.getElementById('loading-msg').innerHTML = 'Initializing...';</script>
|
||||
{styles}
|
||||
|
||||
|
||||
{bodyTemplate}
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -837,7 +837,7 @@ ul.x-tab-strip li.x-tab-edge {
|
||||
}
|
||||
|
||||
.x-tab-scrolling {
|
||||
position:relative;
|
||||
position:relative;
|
||||
}
|
||||
|
||||
.x-tab-panel-bbar .x-toolbar {
|
||||
@@ -2265,7 +2265,7 @@ div.x-toolbar-no-items {
|
||||
}
|
||||
|
||||
.ext-strict .x-grid3-header-pop-inner {
|
||||
width:14px;
|
||||
width:14px;
|
||||
}
|
||||
|
||||
.x-grid3-header-inner {
|
||||
@@ -4465,7 +4465,7 @@ body.ext-ie6.x-body-masked .x-window select {
|
||||
|
||||
.x-html-editor-tb .x-edit-bold, .x-menu-item img.x-edit-bold {
|
||||
background-position:0 0;
|
||||
background-image:url(../images/default/editor/tb-sprite.gif);
|
||||
background-image:url(../images/default/editor/tb-sprite.gif);
|
||||
}
|
||||
|
||||
.x-html-editor-tb .x-edit-italic, .x-menu-item img.x-edit-italic {
|
||||
@@ -5023,7 +5023,7 @@ body.ext-ie6.x-body-masked .x-window select {
|
||||
-khtml-user-select:none;
|
||||
-webkit-user-select:ignore;
|
||||
display:block;
|
||||
overflow:hidden;
|
||||
overflow:hidden;
|
||||
}
|
||||
|
||||
/* Horizontal styles */
|
||||
@@ -5147,4 +5147,8 @@ body.ext-ie6.x-body-masked .x-window select {
|
||||
|
||||
.ext-gecko2 .ext-mb-fix-cursor {
|
||||
overflow:auto;
|
||||
}
|
||||
|
||||
.x-box-inner .x-form-check-wrap {
|
||||
text-align:center;
|
||||
}
|
||||
@@ -35,7 +35,7 @@
|
||||
#loading-msg {
|
||||
font: bold 11px arial,tahoma,sans-serif;
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
@@ -56,15 +56,9 @@
|
||||
<script type="text/javascript">document.getElementById('loading-msg').innerHTML = 'Loading UI Components...';</script>
|
||||
<script type='text/javascript' src='/js/ext/ext-all.js'></script>
|
||||
<script type="text/javascript">document.getElementById('loading-msg').innerHTML = 'Loading UI Extensions';</script>
|
||||
<!--
|
||||
<script type='text/javascript' src='/js/ext/wz_jsgraphics.js'></script>
|
||||
<script type='text/javascript' src='/js/ext/mootools.js'></script>
|
||||
<script type='text/javascript' src='/js/ext/moocanvas.js'></script>
|
||||
!-->
|
||||
<script type='text/javascript' src='/js/ext/draw2d.js'></script>
|
||||
<script type="text/javascript">document.getElementById('loading-msg').innerHTML = 'Initializing...';</script>
|
||||
{styles}
|
||||
|
||||
|
||||
{bodyTemplate}
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
#loading-msg {
|
||||
font: bold 11px arial,tahoma,sans-serif;
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
@@ -56,15 +56,9 @@
|
||||
<script type="text/javascript">document.getElementById('loading-msg').innerHTML = 'Loading UI Components...';</script>
|
||||
<script type='text/javascript' src='/js/ext/ext-all.js'></script>
|
||||
<script type="text/javascript">document.getElementById('loading-msg').innerHTML = 'Loading UI Extensions';</script>
|
||||
<!--
|
||||
<script type='text/javascript' src='/js/ext/wz_jsgraphics.js'></script>
|
||||
<script type='text/javascript' src='/js/ext/mootools.js'></script>
|
||||
<script type='text/javascript' src='/js/ext/moocanvas.js'></script>
|
||||
!-->
|
||||
<script type='text/javascript' src='/js/ext/draw2d.js'></script>
|
||||
<script type="text/javascript">document.getElementById('loading-msg').innerHTML = 'Initializing...';</script>
|
||||
{styles}
|
||||
|
||||
|
||||
{bodyTemplate}
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -673,6 +673,7 @@ var testEmailWindow = new Ext.Window({
|
||||
width: 470,
|
||||
closable:false,
|
||||
plain: true,
|
||||
modal: true,
|
||||
autoHeight: true,
|
||||
layout: 'fit',
|
||||
y: 82,
|
||||
@@ -683,6 +684,7 @@ var testEmailWindowMail = new Ext.Window({
|
||||
width: 470,
|
||||
closable:false,
|
||||
plain: true,
|
||||
modal: true,
|
||||
autoHeight: true,
|
||||
layout: 'fit',
|
||||
y: 82,
|
||||
|
||||
@@ -390,7 +390,7 @@ function statusBarMessage( msg, isLoading, success ) {
|
||||
/* Case Notes - End */
|
||||
|
||||
/* Case Summary - Start */
|
||||
var openSummaryWindow = function(appUid, delIndex)
|
||||
var openSummaryWindow = function(appUid, delIndex, action)
|
||||
{
|
||||
if (summaryWindowOpened) {
|
||||
return;
|
||||
@@ -400,12 +400,13 @@ var openSummaryWindow = function(appUid, delIndex)
|
||||
url : '../appProxy/requestOpenSummary',
|
||||
params : {
|
||||
appUid : appUid,
|
||||
delIndex: delIndex
|
||||
delIndex: delIndex,
|
||||
action: action
|
||||
},
|
||||
success: function (result, request) {
|
||||
var response = Ext.util.JSON.decode(result.responseText);
|
||||
if (response.success) {
|
||||
var sumaryInfPanel = PMExt.createInfoPanel('../appProxy/getSummary', {appUid: appUid, delIndex: delIndex});
|
||||
var sumaryInfPanel = PMExt.createInfoPanel('../appProxy/getSummary', {appUid: appUid, delIndex: delIndex, action: action});
|
||||
sumaryInfPanel.setTitle(_('ID_GENERATE_INFO'));
|
||||
|
||||
var summaryWindow = new Ext.Window({
|
||||
|
||||
@@ -26,7 +26,7 @@ var textJump;
|
||||
var caseSummary = function() {
|
||||
var rowModel = grid.getSelectionModel().getSelected();
|
||||
if (rowModel) {
|
||||
openSummaryWindow(rowModel.data.APP_UID, rowModel.data.DEL_INDEX);
|
||||
openSummaryWindow(rowModel.data.APP_UID, rowModel.data.DEL_INDEX, action);
|
||||
}
|
||||
else {
|
||||
msgBox(_('ID_INFORMATION'), _('ID_SELECT_ONE_AT_LEAST'));
|
||||
@@ -472,7 +472,7 @@ Ext.onReady ( function() {
|
||||
|
||||
var renderSummary = function (val, p, r) {
|
||||
var summaryIcon = '<img src="/images/ext/default/s.gif" class="x-tree-node-icon ss_layout_header" unselectable="off" id="extdd-17" ';
|
||||
summaryIcon += 'onclick="openSummaryWindow(' + "'" + r.data['APP_UID'] + "'" + ', ' + r.data['DEL_INDEX'] + ')" title="' + _('ID_SUMMARY') + '" />';
|
||||
summaryIcon += 'onclick="openSummaryWindow(' + "'" + r.data['APP_UID'] + "'" + ', ' + r.data['DEL_INDEX'] + ', action)" title="' + _('ID_SUMMARY') + '" />';
|
||||
return summaryIcon;
|
||||
};
|
||||
|
||||
@@ -491,7 +491,7 @@ Ext.onReady ( function() {
|
||||
return _FNF(s.data.USR_USERNAME, s.data.USR_FIRSTNAME, s.data.USR_LASTNAME);
|
||||
}
|
||||
else {
|
||||
return '';
|
||||
return '[' + _('ID_UNASSIGNED').toUpperCase() + ']';
|
||||
}
|
||||
};
|
||||
|
||||
@@ -808,7 +808,9 @@ Ext.onReady ( function() {
|
||||
comboProcess.getStore().loadData(processValues);
|
||||
},
|
||||
failure: function ( result, request) {
|
||||
Ext.MessageBox.alert('Failed', result.responseText);
|
||||
if (typeof(result.responseText) != 'undefined') {
|
||||
Ext.MessageBox.alert(_('ID_FAILED'), result.responseText);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -927,7 +929,9 @@ Ext.onReady ( function() {
|
||||
|
||||
},
|
||||
failure: function ( result, request) {
|
||||
Ext.MessageBox.alert('Failed', result.responseText);
|
||||
if (typeof(result.responseText) != 'undefined') {
|
||||
Ext.MessageBox.alert(_('ID_FAILED'), result.responseText);
|
||||
}
|
||||
}
|
||||
});
|
||||
}},
|
||||
@@ -1257,7 +1261,9 @@ Ext.onReady ( function() {
|
||||
}
|
||||
},
|
||||
failure: function ( result, request) {
|
||||
Ext.MessageBox.alert( _('ID_FAILED'), result.responseText);
|
||||
if (typeof(result.responseText) != 'undefined') {
|
||||
Ext.MessageBox.alert( _('ID_FAILED'), result.responseText);
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
@@ -1285,7 +1291,9 @@ Ext.onReady ( function() {
|
||||
}
|
||||
},
|
||||
failure: function ( result, request) {
|
||||
Ext.MessageBox.alert('Failed', result.responseText);
|
||||
if (typeof(result.responseText) != 'undefined') {
|
||||
Ext.MessageBox.alert(_('ID_FAILED'), result.responseText);
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
@@ -196,10 +196,15 @@ Ext.onReady(function() {
|
||||
columns:[{
|
||||
header: _('ID_DEPARTMENT_NAME'),
|
||||
dataIndex: 'DEP_TITLE',
|
||||
width: 320
|
||||
width: 380,
|
||||
tpl: new Ext.XTemplate('{DEP_TITLE:this.formatDepTitle}', {
|
||||
formatDepTitle: function(v) {
|
||||
return '<span style="white-space:normal !important;word-wrap: break-word;">' + v + '</span>';
|
||||
}
|
||||
})
|
||||
},{
|
||||
header: _('ID_STATUS'),
|
||||
width: 100,
|
||||
width: 70,
|
||||
dataIndex: 'DEP_STATUS',
|
||||
align: 'center',
|
||||
tpl: new Ext.XTemplate('{DEP_STATUS:this.formatStatus}', {
|
||||
@@ -216,7 +221,7 @@ Ext.onReady(function() {
|
||||
dataIndex: 'DEP_MANAGER_NAME'
|
||||
},{
|
||||
header: _('ID_USERS'),
|
||||
width: 80,
|
||||
width: 70,
|
||||
dataIndex: 'DEP_TOTAL_USERS',
|
||||
align: 'center',
|
||||
sortType: 'asFloat'
|
||||
|
||||
@@ -86,17 +86,17 @@ Ext.onReady(function(){
|
||||
Ext.get('pathPublicSpan').dom.innerHTML = (response.pathPublic.result ? okImage : badImage);
|
||||
Ext.get('pathSharedSpan').dom.innerHTML = (response.pathShared.result ? okImage : badImage);
|
||||
Ext.get('pathLogFileSpan').dom.innerHTML = (response.pathLogFile.result ? okImage : badImage);
|
||||
|
||||
wizard.onClientValidation(1,
|
||||
response.pathConfig.result &&
|
||||
response.pathLanguages.result &&
|
||||
response.pathPlugins.result &&
|
||||
response.pathXmlforms.result &&
|
||||
response.pathPublic.result &&
|
||||
response.pathShared.result &&
|
||||
|
||||
wizard.onClientValidation(1,
|
||||
response.pathConfig.result &&
|
||||
response.pathLanguages.result &&
|
||||
response.pathPlugins.result &&
|
||||
response.pathXmlforms.result &&
|
||||
response.pathPublic.result &&
|
||||
response.pathShared.result &&
|
||||
response.pathLogFile.result
|
||||
);
|
||||
|
||||
|
||||
wizard.showLoadMask(false);
|
||||
|
||||
permissionInfo.error1 = response.noWritableFiles
|
||||
@@ -147,10 +147,10 @@ Ext.onReady(function(){
|
||||
success: function(response){
|
||||
var response = Ext.util.JSON.decode(response.responseText);
|
||||
Ext.getCmp('db_message').setValue(getFieldOutput(response.message, response.result));
|
||||
|
||||
|
||||
if (!response.result)
|
||||
PMExt.notify('WARNING', response.message, 'warning');
|
||||
|
||||
|
||||
wizard.onClientValidation(3, response.result);
|
||||
wizard.showLoadMask(false);
|
||||
},
|
||||
@@ -216,7 +216,7 @@ Ext.onReady(function(){
|
||||
Ext.get('wfDatabaseSpan').dom.innerHTML = (response.wfDatabaseExists ? existMsg : noExistsMsg);
|
||||
Ext.get('rbDatabaseSpan').dom.innerHTML = (response.rbDatabaseExists ? existMsg : noExistsMsg);
|
||||
Ext.get('rpDatabaseSpan').dom.innerHTML = (response.rpDatabaseExists ? existMsg : noExistsMsg);
|
||||
|
||||
|
||||
var dbFlag = ((!response.wfDatabaseExists && !response.rbDatabaseExists && !response.rpDatabaseExists) || Ext.getCmp('deleteDB').getValue());
|
||||
wizard.onClientValidation(4, dbFlag);
|
||||
|
||||
@@ -270,7 +270,7 @@ Ext.onReady(function(){
|
||||
bodyStyle : 'padding:10px;font-size:1.2em;',
|
||||
html: step1_txt
|
||||
},
|
||||
|
||||
|
||||
{
|
||||
region: 'center',
|
||||
xtype : 'fieldset',
|
||||
@@ -278,7 +278,7 @@ Ext.onReady(function(){
|
||||
items:[
|
||||
{
|
||||
xtype : 'displayfield',
|
||||
fieldLabel: 'PHP Version >= 5.1',
|
||||
fieldLabel: 'PHP Version >= 5.2.10',
|
||||
id : 'php'
|
||||
},
|
||||
{
|
||||
@@ -464,7 +464,7 @@ Ext.onReady(function(){
|
||||
}
|
||||
|
||||
} );
|
||||
|
||||
|
||||
|
||||
// third card with input field email-address
|
||||
steps[setIndex++] = new Ext.ux.Wiz.Card({
|
||||
@@ -512,8 +512,8 @@ Ext.onReady(function(){
|
||||
show: function() {
|
||||
setTimeout(function(){
|
||||
var iAgree = Ext.getCmp('agreeCheckbox').getValue();
|
||||
|
||||
wizard.onClientValidation(2, iAgree);
|
||||
|
||||
wizard.onClientValidation(2, iAgree);
|
||||
}, 100);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -54,15 +54,12 @@ var deleteButton;
|
||||
var searchButton;
|
||||
var searchText;
|
||||
var contextMenu;
|
||||
var pageSize;
|
||||
|
||||
var classicSkin = '00000000000000000000000000000001';
|
||||
|
||||
Ext.onReady(function(){
|
||||
Ext.QuickTips.init();
|
||||
|
||||
pageSize = parseInt(CONFIG.pageSize);
|
||||
|
||||
newButton = new Ext.Action({
|
||||
text: _('ID_NEW'),
|
||||
iconCls: 'button_menu_ext ss_sprite ss_add',
|
||||
@@ -270,7 +267,7 @@ Ext.onReady(function(){
|
||||
align:'center',
|
||||
renderer: showdate
|
||||
},
|
||||
|
||||
|
||||
{
|
||||
header: _('ID_STATUS'),
|
||||
dataIndex: 'SKIN_STATUS',
|
||||
@@ -282,42 +279,6 @@ Ext.onReady(function(){
|
||||
]
|
||||
});
|
||||
|
||||
storePageSize = new Ext.data.SimpleStore({
|
||||
fields: ['size'],
|
||||
data: [['20'],['30'],['40'],['50'],['100']],
|
||||
autoLoad: true
|
||||
});
|
||||
|
||||
comboPageSize = new Ext.form.ComboBox({
|
||||
typeAhead : false,
|
||||
mode : 'local',
|
||||
triggerAction : 'all',
|
||||
store: storePageSize,
|
||||
valueField: 'size',
|
||||
displayField: 'size',
|
||||
width: 50,
|
||||
editable: false,
|
||||
listeners:{
|
||||
select: function(c,d,i){
|
||||
UpdatePageConfig(d.data['size']);
|
||||
bbarpaging.pageSize = parseInt(d.data['size']);
|
||||
bbarpaging.moveFirst();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
comboPageSize.setValue(pageSize);
|
||||
|
||||
bbarpaging = new Ext.PagingToolbar({
|
||||
pageSize: pageSize,
|
||||
store: store,
|
||||
displayInfo: true,
|
||||
displayMsg: _('ID_GRID_PAGE_DISPLAYING_SKIN_MESSAGE') + ' ',
|
||||
emptyMsg: _('ID_GRID_PAGE_NO_SKIN_MESSAGE')//,
|
||||
//items: ['-',_('ID_PAGE_SIZE')+':',comboPageSize]
|
||||
});
|
||||
|
||||
|
||||
infoGrid = new Ext.grid.GridPanel({
|
||||
region: 'center',
|
||||
layout: 'fit',
|
||||
@@ -341,7 +302,6 @@ Ext.onReady(function(){
|
||||
tbar: [newButton, '-', importButton,exportButton,'-',deleteButton, {
|
||||
xtype: 'tbfill'
|
||||
}, searchText,clearTextButton,searchButton],
|
||||
bbar: bbarpaging,
|
||||
listeners: {
|
||||
rowdblclick: function(grid, n,e){
|
||||
rowSelected = infoGrid.getSelectionModel().getSelected();
|
||||
@@ -817,19 +777,6 @@ deleteSkin = function(){
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
//Update Page Size Configuration
|
||||
UpdatePageConfig = function(pageSize){
|
||||
Ext.Ajax.request({
|
||||
url: 'calendar_Ajax',
|
||||
params: {
|
||||
action:'updatePageSize',
|
||||
size: pageSize
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
function changeSkin(newSkin,currentSkin){
|
||||
Ext.Ajax.request({
|
||||
url: 'clearCompiledAjax',
|
||||
|
||||
@@ -142,7 +142,7 @@ function ws_open_with_params($endpoint, $user, $pass) {
|
||||
throw (new Exception($result->message));
|
||||
}
|
||||
|
||||
function ws_sendEmailMessage($caseId, $toEmail, $sSubject, $ccEmail, $bccEmail, $sBody) {
|
||||
function ws_sendEmailMessage($caseId, $toEmail, $sSubject, $ccEmail, $bccEmail, $template) {
|
||||
global $sessionId;
|
||||
global $client;
|
||||
$params = array (
|
||||
@@ -153,7 +153,7 @@ function ws_sendEmailMessage($caseId, $toEmail, $sSubject, $ccEmail, $bccEmail,
|
||||
'cc' => $ccEmail,
|
||||
'bcc' => $bccEmail,
|
||||
'subject' => $sSubject,
|
||||
'message' => $sBody
|
||||
'template' => $template
|
||||
);
|
||||
$result = $client->__SoapCall('sendMessage', array (
|
||||
$params
|
||||
@@ -172,7 +172,7 @@ function ws_sendMessage($caseId, $toEmail, $sSubject, $ccEmail, $bccEmail, $temp
|
||||
'cc' => $ccEmail,
|
||||
'bcc' => $bccEmail,
|
||||
'subject' => $sSubject,
|
||||
'message' => $template
|
||||
'template' => $template
|
||||
);
|
||||
$result = $client->__SoapCall('sendMessage', array (
|
||||
$params
|
||||
|
||||
@@ -9,11 +9,11 @@
|
||||
<en>Enable HTML Editing</en>
|
||||
</PME_HTML_ENABLETEMPLATE>
|
||||
|
||||
<PME_RESTORE_HTML type="button" onclick="dynaformEditor.restoreHTML();">
|
||||
<PME_RESTORE_HTML type="button" onclick="dynaformEditor.restoreHTML(); this.blur();">
|
||||
<en>Restore Original HTML</en>
|
||||
</PME_RESTORE_HTML>
|
||||
|
||||
<PME_REFRESH_VIEW type="button" onclick="html2_html();">
|
||||
<PME_REFRESH_VIEW type="button" onclick="html2_html(); this.blur();">
|
||||
<en>Refresh View</en>
|
||||
</PME_REFRESH_VIEW>
|
||||
|
||||
@@ -79,13 +79,14 @@ getField("PME_HTML_ENABLETEMPLATE","dynaforms_HtmlEditor").onclick=function()
|
||||
label: "@G::LoadTranslation(ID_MSG_ENABLE_HTML_EDITING)",
|
||||
size:{ w: 350, h: 150 },
|
||||
action: function() { },
|
||||
cancel: function() {
|
||||
cancel: function () {
|
||||
getField("PME_HTML_ENABLETEMPLATE","dynaforms_HtmlEditor").checked = false;
|
||||
}
|
||||
});
|
||||
dynaformEditor.setEnableTemplate( this.checked );
|
||||
|
||||
dynaformEditor.setEnableTemplate(this.checked);
|
||||
}
|
||||
}
|
||||
]]></PME_RESIZE_JS>
|
||||
|
||||
</dynaForm>
|
||||
</dynaForm>
|
||||
@@ -1,5 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<dynaForm name="fields_Toolbar" version="1.0" type="toolbar" align="left" width="100%">
|
||||
<PRO_UID type="private" />
|
||||
<DYN_UID type="private" />
|
||||
<separator1 type="toolButton" file="images/dynamicForm/separatorTable.gif" home="public_html" buttonStyle=""/>
|
||||
<saveDyna type="toolButton" class="ss_sprite button_toolbar ss_disk" onclick="dynaformEditor.save()" home="public_html" buttonType="class">
|
||||
<en>Save</en>
|
||||
@@ -92,4 +94,6 @@
|
||||
<grid type="toolButton" class="ss_sprite button_toolbar ss_table" onclick="fieldsAdd('grid')" buttonType="class">
|
||||
<en>Grid</en>
|
||||
</grid>
|
||||
<separator10 type="toolButton" file="images/dynamicForm/separatorTable.gif" home="public_html" buttonStyle=""/>
|
||||
<dynaforms type="toolButton" class="" onclick="" buttonType="dropdown" />
|
||||
</dynaForm>
|
||||
@@ -1,5 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<dynaForm name="fields_Toolbar" version="1.0" type="toolbar" align="left" width="894px">
|
||||
<PRO_UID type="private" />
|
||||
<DYN_UID type="private" />
|
||||
<separator1 type="toolButton" file="images/dynamicForm/separatorTable.gif" home="public_html" buttonStyle=""/>
|
||||
<saveDyna type="toolButton" class="ss_sprite button_toolbar ss_disk" onclick="dynaformEditor.save()" buttonType="class">
|
||||
<en>Save</en>
|
||||
@@ -49,4 +51,6 @@
|
||||
<file type="toolButton" class="ss_sprite button_toolbar ss_upload" onclick="fieldsAdd('file')" buttonType="class">
|
||||
<en>File</en>
|
||||
</file>
|
||||
<separator10 type="toolButton" file="images/dynamicForm/separatorTable.gif" home="public_html" buttonStyle=""/>
|
||||
<dynaforms type="toolButton" class="" onclick="" buttonType="dropdown" />
|
||||
</dynaForm>
|
||||
@@ -1,4 +1,4 @@
|
||||
<form id="{$form_id}" name="{$form_name}" action="{$form_action}" class="{$form_className}" method="post" encType="multipart/form-data" style="margin:0px;" onsubmit='return validateForm("{$form_objectRequiredFields}".parseJSON());'>
|
||||
<form id="{$form_id}" name="{$form_name}" action="{$form_action}" class="{$form_className}" method="post" encType="multipart/form-data" style="margin:0px;" onsubmit='return validateForm("{$form_objectRequiredFields}".parseJSON());'>
|
||||
|
||||
<div class="borderForm" style="padding-left: 0pt; padding-right: 0pt;">
|
||||
<div class="boxTop"><div class="a"></div><div class="b"></div><div class="c"></div></div>
|
||||
@@ -33,6 +33,10 @@
|
||||
<!-- <td class='FormFieldContent' width="{$form_width}" >{$form.OUT_DOC_DESCRIPTION} </td> //-->
|
||||
<td class="FormFieldContent" width="{$form_fieldContentWidth}">{$form.OUT_DOC_DESCRIPTION}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="FormLabel" width="{$form_labelWidth}">{$OUT_DOC_REPORT_GENERATOR}</td>
|
||||
<td class="FormFieldContent" width="{$form_fieldContentWidth}">{$form.OUT_DOC_REPORT_GENERATOR}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="FormLabel" width="{$form_labelWidth}">{$OUT_DOC_MEDIA}/ {$OUT_DOC_LANDSCAPE}</td>
|
||||
<!-- <td class='FormFieldContent' width="{$form_width}" >{$form.OUT_DOC_LANDSCAPE} </td> //-->
|
||||
@@ -41,7 +45,7 @@
|
||||
<!--<tr>
|
||||
<td class="FormLabel" width="{$form_labelWidth}">{$OUT_DOC_MEDIA}</td>
|
||||
|
||||
<td class="FormFieldContent" width="{$form_fieldContentWidth}">{$form.OUT_DOC_MEDIA}</td>
|
||||
<td class="FormFieldContent" width="{$form_fieldContentWidth}">{$form.OUT_DOC_MEDIA}</td>
|
||||
</tr>
|
||||
-->
|
||||
<tr>
|
||||
@@ -58,22 +62,22 @@
|
||||
<!-- <tr>
|
||||
<td class="FormLabel" width="{$form_labelWidth}">{$OUT_DOC_LEFT_MARGIN}</td>
|
||||
|
||||
<td class="FormFieldContent" width="{$form_fieldContentWidth}">{$form.OUT_DOC_LEFT_MARGIN}</td>
|
||||
<td class="FormFieldContent" width="{$form_fieldContentWidth}">{$form.OUT_DOC_LEFT_MARGIN}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="FormLabel" width="{$form_labelWidth}">{$OUT_DOC_RIGHT_MARGIN}</td>
|
||||
|
||||
<td class="FormFieldContent" width="{$form_fieldContentWidth}">{$form.OUT_DOC_RIGHT_MARGIN}</td>
|
||||
<td class="FormFieldContent" width="{$form_fieldContentWidth}">{$form.OUT_DOC_RIGHT_MARGIN}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="FormLabel" width="{$form_labelWidth}">{$OUT_DOC_TOP_MARGIN}</td>
|
||||
|
||||
<td class="FormFieldContent" width="{$form_fieldContentWidth}">{$form.OUT_DOC_TOP_MARGIN}</td>
|
||||
<td class="FormFieldContent" width="{$form_fieldContentWidth}">{$form.OUT_DOC_TOP_MARGIN}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="FormLabel" width="{$form_labelWidth}">{$OUT_DOC_BOTTOM_MARGIN}</td>
|
||||
|
||||
<td class="FormFieldContent" width="{$form_fieldContentWidth}">{$form.OUT_DOC_BOTTOM_MARGIN}</td>
|
||||
<td class="FormFieldContent" width="{$form_fieldContentWidth}">{$form.OUT_DOC_BOTTOM_MARGIN}</td>
|
||||
</tr>
|
||||
-->
|
||||
<tr>
|
||||
@@ -83,7 +87,7 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="FormLabel" width="{$form_labelWidth}">{$OUT_DOC_PDF_SECURITY_ENABLED}</td>
|
||||
|
||||
|
||||
<td class="FormFieldContent" width="{$form_fieldContentWidth}">{$form.OUT_DOC_PDF_SECURITY_ENABLED}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -139,4 +143,4 @@
|
||||
{$form.JS}
|
||||
</script>
|
||||
|
||||
</form>
|
||||
</form>
|
||||
@@ -21,6 +21,13 @@
|
||||
<en>Description</en>
|
||||
</OUT_DOC_DESCRIPTION>
|
||||
|
||||
<OUT_DOC_REPORT_GENERATOR type="dropdown" required="0" readonly="0" mode="edit">
|
||||
<en>Report Generator
|
||||
<option name="HTML2PDF">HTML2PDF (Old Version)</option>
|
||||
<option name="TCPDF">TCPDF</option>
|
||||
</en>
|
||||
</OUT_DOC_REPORT_GENERATOR>
|
||||
|
||||
<OUT_DOC_LANDSCAPE type="dropdown">
|
||||
<en>Orientation<option name="">Portrait</option><option name="1">Landscape</option></en>
|
||||
</OUT_DOC_LANDSCAPE>
|
||||
@@ -54,18 +61,18 @@
|
||||
<option name="A10">A10</option>
|
||||
<option name="Screenshot640">Screenshot640</option>
|
||||
<option name="Screenshot800">Screenshot800</option>
|
||||
<option name="Screenshot1024">Screenshot1024</option>
|
||||
<option name="Screenshot1024">Screenshot1024</option>
|
||||
</en>
|
||||
</OUT_DOC_MEDIA>
|
||||
|
||||
<OUT_DOC_LEFT_MARGIN type="text" style="width:15%" validate="Int">
|
||||
<en>Left</en>
|
||||
<en>Left</en>
|
||||
</OUT_DOC_LEFT_MARGIN>
|
||||
<OUT_DOC_RIGHT_MARGIN type="text" style="width:15%" validate="Int">
|
||||
<en>Right</en>
|
||||
<en>Right</en>
|
||||
</OUT_DOC_RIGHT_MARGIN>
|
||||
<OUT_DOC_TOP_MARGIN type="text" style="width:15%" validate="Int">
|
||||
<en>Top</en>
|
||||
<en>Top</en>
|
||||
</OUT_DOC_TOP_MARGIN>
|
||||
<OUT_DOC_BOTTOM_MARGIN type="text" style="width:15%" validate="Int">
|
||||
<en>Bottom</en>
|
||||
@@ -174,7 +181,7 @@ var verifyTitle = function(oForm)
|
||||
var proUid = getField('PRO_UID').value;
|
||||
var OutPutID = getField('OUT_DOC_UID').value;
|
||||
if(OutPutID==''){
|
||||
reqName=ajax_function('../outputdocs/outputdocs_Ajax','lookForNameOutput','NAMEOUTPUT='+encodeURIComponent(nameOutPut)+'&proUid='+encodeURIComponent(proUid),'POST') ;
|
||||
reqName=ajax_function('../outputdocs/outputdocs_Ajax','lookForNameOutput','NAMEOUTPUT='+encodeURIComponent(nameOutPut)+'&proUid='+encodeURIComponent(proUid),'POST') ;
|
||||
if(reqName){
|
||||
outputdocsPropertiesSave(oForm);
|
||||
} else {
|
||||
@@ -214,7 +221,7 @@ if ((getField('OUT_DOC_PDF_SECURITY_ENABLED').value == '0')) {
|
||||
leimnud.event.add(getField('OUT_DOC_GENERATE'), 'change', function() {
|
||||
showPdfSecuritySwitch();
|
||||
});
|
||||
|
||||
|
||||
|
||||
leimnud.event.add(getField('OUT_DOC_PDF_SECURITY_ENABLED'), 'change', function() {
|
||||
togglePDFSecurity();
|
||||
@@ -224,4 +231,4 @@ showPdfSecuritySwitch();
|
||||
togglePDFSecurity();
|
||||
|
||||
]]></JS>
|
||||
</dynaForm>
|
||||
</dynaForm>
|
||||
@@ -605,6 +605,7 @@
|
||||
$noLoginFiles[] = 'retrivePassword';
|
||||
$noLoginFiles[] = 'defaultAjaxDynaform';
|
||||
$noLoginFiles[] = 'dynaforms_checkDependentFields';
|
||||
$noLoginFiles[] = 'genericAjax';
|
||||
|
||||
$noLoginFolders[] = 'services';
|
||||
$noLoginFolders[] = 'tracker';
|
||||
|
||||
Reference in New Issue
Block a user