本文整理汇总了PHP中Criteria::setDBArrayTable方法的典型用法代码示例。如果您正苦于以下问题:PHP Criteria::setDBArrayTable方法的具体用法?PHP Criteria::setDBArrayTable怎么用?PHP Criteria::setDBArrayTable使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Criteria
的用法示例。
在下文中一共展示了Criteria::setDBArrayTable方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getUsersFromDepartment
public function getUsersFromDepartment($sDepUid, $sManagerUid)
{
try {
$oCriteria = new Criteria('workflow');
$oCriteria->addSelectColumn(UsersPeer::USR_UID);
$oCriteria->addSelectColumn(UsersPeer::USR_REPORTS_TO);
$oCriteria->add(UsersPeer::USR_STATUS, 'CLOSED', Criteria::NOT_EQUAL);
$oCriteria->add(UsersPeer::DEP_UID, $sDepUid);
$rs = UsersPeer::doSelectRS($oCriteria);
$rs->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$oUser = new Users();
$aUsers[] = array('USR_UID' => 'char', 'USR_USERNAME' => 'char', 'USR_FULLNAME' => 'char', 'USR_REPORTS_TO' => 'char', 'USR_MANAGER' => 'char');
$rs->next();
$row = $rs->getRow();
while (is_array($row)) {
$usrFields = $oUser->LoadDetails($row['USR_UID']);
$row['USR_USERNAME'] = $usrFields['USR_USERNAME'];
$row['USR_FULLNAME'] = $usrFields['USR_FULLNAME'];
$row['USR_MANAGER'] = $row['USR_UID'] == $sManagerUid ? G::loadTranslation("ID_YES") : G::loadTranslation("ID_NO");
$row['DEP_UID'] = $sDepUid;
if ($row['USR_REPORTS_TO'] != '') {
try {
$managerFields = $oUser->LoadDetails($row['USR_REPORTS_TO']);
$row['USR_REPORTS_NAME'] = $managerFields['USR_FULLNAME'];
} catch (exception $e) {
$row['USR_REPORTS_NAME'] = '.';
}
} else {
$row['USR_REPORTS_NAME'] = '.';
}
$aUsers[] = $row;
$rs->next();
$row = $rs->getRow();
}
G::LoadClass('ArrayPeer');
global $_DBArray;
$_DBArray['DepartmentUserList'] = $aUsers;
$_SESSION['_DBArray'] = $_DBArray;
$oCriteriaT = new Criteria('dbarray');
$oCriteriaT->setDBArrayTable('DepartmentUserList');
return $oCriteriaT;
} catch (exception $e) {
throw $e;
}
}
示例2: getHistoryMessagesTrackerExt
public function getHistoryMessagesTrackerExt($sApplicationUID)
{
G::LoadClass('ArrayPeer');
global $_DBArray;
$oAppDocument = new AppDocument();
$oCriteria = new Criteria('workflow');
$oCriteria->add(AppMessagePeer::APP_UID, $sApplicationUID);
$oCriteria->addAscendingOrderByColumn(AppMessagePeer::APP_MSG_DATE);
$oDataset = AppMessagePeer::doSelectRS($oCriteria);
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$oDataset->next();
$aMessages = array();
while ($aRow = $oDataset->getRow()) {
$aMessages[] = array('APP_MSG_UID' => $aRow['APP_MSG_UID'], 'APP_UID' => $aRow['APP_UID'], 'DEL_INDEX' => $aRow['DEL_INDEX'], 'APP_MSG_TYPE' => $aRow['APP_MSG_TYPE'], 'APP_MSG_SUBJECT' => $aRow['APP_MSG_SUBJECT'], 'APP_MSG_FROM' => $aRow['APP_MSG_FROM'], 'APP_MSG_TO' => $aRow['APP_MSG_TO'], 'APP_MSG_BODY' => $aRow['APP_MSG_BODY'], 'APP_MSG_DATE' => $aRow['APP_MSG_DATE'], 'APP_MSG_CC' => $aRow['APP_MSG_CC'], 'APP_MSG_BCC' => $aRow['APP_MSG_BCC'], 'APP_MSG_TEMPLATE' => $aRow['APP_MSG_TEMPLATE'], 'APP_MSG_STATUS' => $aRow['APP_MSG_STATUS'], 'APP_MSG_ATTACH' => $aRow['APP_MSG_ATTACH'], 'APP_MSG_SHOW_MESSAGE' => $aRow['APP_MSG_SHOW_MESSAGE']);
$oDataset->next();
}
$_DBArray['messages'] = $aMessages;
$_SESSION['_DBArray'] = $_DBArray;
$oCriteria = new Criteria('dbarray');
$oCriteria->setDBArrayTable('messages');
return $aMessages;
}
示例3: getExtTaskUsersAdHocCriteria
public function getExtTaskUsersAdHocCriteria($start, $limit, $sTaskUID = '', $iType = 1)
{
try {
$aUsers = array();
$aUsers[] = array('LABEL' => 'char', 'TAS_UID' => 'char', 'USR_UID' => 'char', 'TU_TYPE' => 'integer', 'TU_RELATION' => 'integer');
$sDelimiter = DBAdapter::getStringDelimiter();
$oCriteria = new Criteria('workflow');
$oCriteria->addAsColumn('GRP_TITLE', 'C.CON_VALUE');
$oCriteria->addSelectColumn(TaskUserPeer::TAS_UID);
$oCriteria->addSelectColumn(TaskUserPeer::USR_UID);
$oCriteria->addSelectColumn(TaskUserPeer::TU_TYPE);
$oCriteria->addSelectColumn(TaskUserPeer::TU_RELATION);
$oCriteria->addAlias('C', 'CONTENT');
$aConditions = array();
$aConditions[] = array(TaskUserPeer::USR_UID, 'C.CON_ID');
$aConditions[] = array('C.CON_CATEGORY', $sDelimiter . 'GRP_TITLE' . $sDelimiter);
$aConditions[] = array('C.CON_LANG', $sDelimiter . SYS_LANG . $sDelimiter);
$oCriteria->addJoinMC($aConditions, Criteria::LEFT_JOIN);
$oCriteria->add(TaskUserPeer::TAS_UID, $sTaskUID);
$oCriteria->add(TaskUserPeer::TU_TYPE, $iType);
$oCriteria->add(TaskUserPeer::TU_RELATION, 2);
$this->tmpCriteria = clone $oCriteria;
if ($start != '') {
$oCriteria->setOffset($start);
}
if ($limit != '') {
$oCriteria->setLimit($limit);
}
$oDataset = TaskUserPeer::doSelectRS($oCriteria);
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$oDataset->next();
$c = 0;
while ($aRow = $oDataset->getRow()) {
$c++;
$oGroup = new Groupwf();
$aFields = $oGroup->load($aRow['USR_UID']);
if ($aFields['GRP_STATUS'] == 'ACTIVE') {
$oCriteria = new Criteria('workflow');
$oCriteria->addSelectColumn('COUNT(*) AS MEMBERS_NUMBER');
$oCriteria->add(GroupUserPeer::GRP_UID, $aRow['USR_UID']);
$oDataset2 = GroupUserPeer::doSelectRS($oCriteria);
$oDataset2->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$oDataset2->next();
$aRow2 = $oDataset2->getRow();
} else {
$aRow2['GROUP_INACTIVE'] = '<strong>(' . G::LoadTranslation('ID_GROUP_INACTIVE') . ')</strong>';
}
$aUsers[] = array('LABEL' => !isset($aRow2['GROUP_INACTIVE']) ? $aRow['GRP_TITLE'] . ' <a href="#" onclick="usersGroup(\'' . $aRow['USR_UID'] . '\', \'' . $c . '\');return false;"><font color="green"><strong>(' . $aRow2['MEMBERS_NUMBER'] . ' ' . ((int) $aRow2['MEMBERS_NUMBER'] == 1 ? G::LoadTranslation('ID_USER') : G::LoadTranslation('ID_USERS')) . ')</strong></font></a> <br /><div id="users' . $c . '" style="display: none"></div>' : $aRow['GRP_TITLE'] . ' ' . $aRow2['GROUP_INACTIVE'], 'TAS_UID' => $aRow['TAS_UID'], 'USR_UID' => $aRow['USR_UID'], 'TU_TYPE' => $aRow['TU_TYPE'], 'TU_RELATION' => $aRow['TU_RELATION']);
$oDataset->next();
}
$oCriteria = new Criteria('workflow');
$oCriteria->addSelectColumn(UsersPeer::USR_FIRSTNAME);
$oCriteria->addSelectColumn(UsersPeer::USR_LASTNAME);
$oCriteria->addSelectColumn(TaskUserPeer::TAS_UID);
$oCriteria->addSelectColumn(TaskUserPeer::USR_UID);
$oCriteria->addSelectColumn(TaskUserPeer::TU_TYPE);
$oCriteria->addSelectColumn(TaskUserPeer::TU_RELATION);
$oCriteria->addJoin(TaskUserPeer::USR_UID, UsersPeer::USR_UID, Criteria::LEFT_JOIN);
$oCriteria->add(TaskUserPeer::TAS_UID, $sTaskUID);
$oCriteria->add(TaskUserPeer::TU_TYPE, $iType);
$oCriteria->add(TaskUserPeer::TU_RELATION, 1);
$oDataset = TaskUserPeer::doSelectRS($oCriteria);
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$oDataset->next();
while ($aRow = $oDataset->getRow()) {
$aUsers[] = array('LABEL' => $aRow['USR_FIRSTNAME'] . ' ' . $aRow['USR_LASTNAME'], 'TAS_UID' => $aRow['TAS_UID'], 'USR_UID' => $aRow['USR_UID'], 'TU_TYPE' => $aRow['TU_TYPE'], 'TU_RELATION' => $aRow['TU_RELATION']);
$oDataset->next();
}
global $_DBArray;
$_DBArray = isset($_SESSION['_DBArray']) ? $_SESSION['_DBArray'] : '';
$_DBArray['taskUsers'] = $aUsers;
$_SESSION['_DBArray'] = $_DBArray;
G::LoadClass('ArrayPeer');
$oCriteria = new Criteria('dbarray');
$oCriteria->setDBArrayTable('taskUsers');
$oCriteria->addDescendingOrderByColumn(TaskUserPeer::TU_RELATION);
$oCriteria->addAscendingOrderByColumn('LABEL');
return $oCriteria;
} catch (Exception $oError) {
throw $oError;
}
}
示例4: _render
/**
* Prints the DynaformEditor
*
* @return void
*/
public function _render()
{
global $G_PUBLISH;
$script = '';
/* Start Block: Load (Create if doesn't exist) the xmlform */
$Parameters = array('SYS_LANG' => SYS_LANG, 'URL' => G::encrypt($this->file, URL_KEY), 'DYN_UID' => $this->dyn_uid, 'PRO_UID' => $this->pro_uid, 'DYNAFORM_NAME' => $this->dyn_title, 'FILE' => $this->file, 'DYN_EDITOR' => $this->dyn_editor);
$_SESSION['Current_Dynafom']['Parameters'] = $Parameters;
$XmlEditor = array('URL' => G::encrypt($this->file, URL_KEY), 'XML' => '');
$JSEditor = array('URL' => G::encrypt($this->file, URL_KEY));
$A = G::encrypt($this->file, URL_KEY);
try {
$openDoc = new Xml_Document();
$fileName = $this->home . $this->file . '.xml';
if (file_exists($fileName)) {
$openDoc->parseXmlFile($fileName);
} else {
$this->_createDefaultXmlForm($fileName);
$openDoc->parseXmlFile($fileName);
}
//$form = new Form( $this->file , $this->home, SYS_LANG, true );
$Properties = dynaformEditorAjax::get_properties($A, $this->dyn_uid);
/* Start Block: Prepare the XMLDB connection */
define('DB_XMLDB_HOST', PATH_DYNAFORM . $this->file . '.xml');
define('DB_XMLDB_USER', '');
define('DB_XMLDB_PASS', '');
define('DB_XMLDB_NAME', '');
define('DB_XMLDB_TYPE', 'myxml');
/* Start Block: Prepare the dynaformEditor */
$G_PUBLISH = new Publisher();
$sName = 'dynaformEditor';
$G_PUBLISH->publisherId = $sName;
$oHeadPublisher =& headPublisher::getSingleton();
$oHeadPublisher->setTitle(G::LoadTranslation('ID_DYNAFORM_EDITOR') . ' - ' . $Properties['DYN_TITLE']);
$G_PUBLISH->AddContent('blank');
$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, '', '');
} else {
$G_PUBLISH->AddContent('xmlform', 'toolbar', 'dynaforms/fields_ToolbarGrid', 'display:none', $Parameters, '', '');
}
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'dynaforms/dynaforms_Editor', 'display:none', $Parameters, '', '');
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'dynaforms/dynaforms_XmlEditor', 'display:none', $XmlEditor, '', '');
$G_PUBLISH->AddContent('blank');
$i = 0;
$aFields = array();
$aFields[] = array('XMLNODE_NAME' => 'char', 'TYPE' => 'char', 'UP' => 'char', 'DOWN' => 'char');
$oSession = new DBSession(new DBConnection(PATH_DYNAFORM . $this->file . '.xml', '', '', '', 'myxml'));
$oDataset = $oSession->Execute('SELECT * FROM dynaForm WHERE NOT( XMLNODE_NAME = "" ) AND TYPE <> "pmconnection"');
$iMaximun = $oDataset->count();
while ($aRow = $oDataset->Read()) {
$aFields[] = array('XMLNODE_NAME' => $aRow['XMLNODE_NAME'], 'TYPE' => $aRow['TYPE'], 'UP' => $i > 0 ? G::LoadTranslation('ID_UP') : '', 'DOWN' => $i < $iMaximun - 1 ? G::LoadTranslation('ID_DOWN') : '', 'row__' => $i + 1);
$i++;
break;
}
global $_DBArray;
$_DBArray['fields'] = $aFields;
$_SESSION['_DBArray'] = $_DBArray;
G::LoadClass('ArrayPeer');
$oCriteria = new Criteria('dbarray');
$oCriteria->setDBArrayTable('fields');
/**
* *@Erik-> this is deprecated,.
* (unuseful) $G_PUBLISH->AddContent('propeltable', 'paged-table', 'dynaforms/fields_List', $oCriteria, $Parameters, '', SYS_URI.'dynaforms/dynaforms_PagedTableAjax');**
*/
$G_PUBLISH->AddContent('blank');
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'dynaforms/dynaforms_JSEditor', 'display:none', $JSEditor, '', '');
} catch (Exception $e) {
}
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'dynaforms/dynaforms_Properties', 'display:none', $Properties, '', '');
//for showHide tab option @Neyek
$G_PUBLISH->AddContent('blank');
$G_PUBLISH->AddContent('panel-tab', G::LoadTranslation("ID_PREVIEW"), $sName . '[3]', 'dynaformEditor.changeToPreview', 'dynaformEditor.saveCurrentView');
$G_PUBLISH->AddContent('panel-tab', G::LoadTranslation("ID_XML"), $sName . '[4]', 'dynaformEditor.changeToXmlCode', 'dynaformEditor.saveCurrentView');
if ($Properties['DYN_TYPE'] != 'grid') {
$G_PUBLISH->AddContent('panel-tab', G::LoadTranslation("ID_HTML"), $sName . '[5]', 'dynaformEditor.changeToHtmlCode', 'dynaformEditor.saveCurrentView');
}
$G_PUBLISH->AddContent('panel-tab', G::LoadTranslation("ID_FIELDS_LIST"), $sName . '[6]', 'dynaformEditor.changeToFieldsList', 'dynaformEditor.saveCurrentView');
if ($Properties["DYN_TYPE"] != "grid") {
$G_PUBLISH->AddContent('panel-tab', G::LoadTranslation("ID_JAVASCRIPTS"), $sName . '[7]', 'dynaformEditor.changeToJavascripts', 'dynaformEditor.saveCurrentView');
}
$G_PUBLISH->AddContent('panel-tab', G::LoadTranslation("ID_PROPERTIES"), $sName . '[8]', 'dynaformEditor.changeToProperties', 'dynaformEditor.saveCurrentView');
//for showHide tab option @Neyek
if ($Properties["DYN_TYPE"] != "grid") {
$G_PUBLISH->AddContent("panel-tab", G::LoadTranslation("ID_CONDITIONS_EDITOR"), $sName . "[9]", "dynaformEditor.changeToShowHide", "dynaformEditor.saveShowHide");
}
$G_PUBLISH->AddContent('panel-close');
$oHeadPublisher->addScriptFile("/js/maborak/core/maborak.loader.js", 2);
$oHeadPublisher->addScriptFile('/jscore/dynaformEditor/core/dynaformEditor.js');
//$oHeadPublisher->addScriptFile('/js/dveditor/core/dveditor.js');
//$oHeadPublisher->addScriptFile('/codepress/codepress.js',1);
$oHeadPublisher->addScriptFile('/js/codemirrorOld/js/codemirror.js', 1);
$oHeadPublisher->addScriptFile('/js/grid/core/grid.js');
$oHeadPublisher->addScriptCode('
var DYNAFORM_URL="' . $Parameters['URL'] . '";
//.........这里部分代码省略.........
示例5: getDynaformHistory
//.........这里部分代码省略.........
$aObjectPermissions['INPUT_DOCUMENTS'] = array(-1);
}
}
if (!isset($aObjectPermissions['OUTPUT_DOCUMENTS'])) {
$aObjectPermissions['OUTPUT_DOCUMENTS'] = array(-1);
} else {
if (!is_array($aObjectPermissions['OUTPUT_DOCUMENTS'])) {
$aObjectPermissions['OUTPUT_DOCUMENTS'] = array(-1);
}
}
$c = new Criteria('workflow');
$c->addSelectColumn(AppHistoryPeer::APP_UID);
$c->addSelectColumn(AppHistoryPeer::DEL_INDEX);
$c->addSelectColumn(AppHistoryPeer::PRO_UID);
$c->addSelectColumn(AppHistoryPeer::TAS_UID);
$c->addSelectColumn(AppHistoryPeer::DYN_UID);
$c->addSelectColumn(AppHistoryPeer::USR_UID);
$c->addSelectColumn(AppHistoryPeer::APP_STATUS);
$c->addSelectColumn(AppHistoryPeer::HISTORY_DATE);
$c->addSelectColumn(AppHistoryPeer::HISTORY_DATA);
$c->addSelectColumn(UsersPeer::USR_FIRSTNAME);
$c->addSelectColumn(UsersPeer::USR_LASTNAME);
$c->addAsColumn('USR_NAME', "CONCAT(USR_LASTNAME, ' ', USR_FIRSTNAME)");
$c->addJoin(AppHistoryPeer::USR_UID, UsersPeer::USR_UID, Criteria::LEFT_JOIN);
//WHERE
$c->add(AppHistoryPeer::DYN_UID, $aObjectPermissions['DYNAFORMS'], Criteria::IN);
$c->add(AppHistoryPeer::PRO_UID, $PRO_UID);
$c->add(AppHistoryPeer::APP_UID, $APP_UID);
if (isset($DYN_UID) && $DYN_UID != "") {
$c->add(AppHistoryPeer::DYN_UID, $DYN_UID);
}
//ORDER BY
$c->clearOrderByColumns();
$c->addDescendingOrderByColumn(AppHistoryPeer::HISTORY_DATE);
//Execute
$oDataset = AppHistoryPeer::doSelectRS($c);
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$oDataset->next();
$aDynHistory = array();
$aDynHistory[] = array('DYN_TITLE' => 'char');
while ($aRow = $oDataset->getRow()) {
$o = new Dynaform();
$o->setDynUid($aRow['DYN_UID']);
$aRow['DYN_TITLE'] = $o->getDynTitle();
$changedValues = unserialize($aRow['HISTORY_DATA']);
$html = "<table border='0' cellpadding='0' cellspacing='0'>";
$sw_add = false;
foreach ($changedValues as $key => $value) {
if ($value != null && !is_array($value)) {
$sw_add = true;
$html .= "<tr>";
$html .= "<td><b>{$key}:</b> </td>";
$html .= "<td>{$value}</td>";
$html .= "</tr>";
}
if (is_array($value)) {
$html .= "<tr>";
$html .= "<td><b>{$key} (grid):</b> </td>";
$html .= "<td>";
$html .= "<table>";
foreach ($value as $key1 => $value1) {
$html .= "<tr>";
$html .= "<td><b>{$key1}</b></td>";
$html .= "<td>";
if (is_array($value1)) {
$sw_add = true;
$html .= "<table>";
foreach ($value1 as $key2 => $value2) {
$html .= "<tr>";
$html .= "<td><b>{$key2}</b></td>";
$html .= "<td>{$value2}</td>";
$html .= "</tr>";
}
$html .= "</table>";
}
$html .= "</td>";
$html .= "</tr>";
}
$html .= "</table>";
$html .= "</td>";
$html .= "</tr>";
$html .= "</td>";
}
}
$html .= "</table>";
$aRow['FIELDS'] = $html;
if ($sw_add) {
$aDynHistory[] = $aRow;
}
$oDataset->next();
}
global $_DBArray;
$_DBArray['DynaformsHistory'] = $aDynHistory;
$_SESSION['_DBArray'] = $_DBArray;
G::LoadClass('ArrayPeer');
$oCriteria = new Criteria('dbarray');
$oCriteria->setDBArrayTable('DynaformsHistory');
$oCriteria->addDescendingOrderByColumn(AppHistoryPeer::HISTORY_DATE);
return $oCriteria;
}
示例6: Criteria
/**
* This function generates a filter to report 5
*
*
* @name generatedReport5_filter
*
* @param string process
* @param string task
* @return object
*/
function generatedReport5_filter($process, $task)
{
$this->reportsPatch();
require_once 'classes/model/AppDelegation.php';
require_once 'classes/model/Application.php';
require_once 'classes/model/Process.php';
require_once 'classes/model/Users.php';
$oCriteria = new Criteria('workflow');
$del = DBAdapter::getStringDelimiter();
if ($process == '') {
$var = " WHERE AD.DEL_FINISH_DATE IS NULL";
} else {
if ($task == '') {
$var = " LEFT JOIN TASK AS T ON (AD.TAS_UID = T.TAS_UID)\n WHERE AD.PRO_UID='" . $process . "' AND AD.DEL_FINISH_DATE IS NULL";
} else {
$var = " LEFT JOIN TASK AS T ON (AD.TAS_UID = T.TAS_UID)\n WHERE AD.PRO_UID='" . $process . "' AND AD.TAS_UID='" . $task . "' ";
}
}
$sql = "SELECT CONCAT(U.USR_LASTNAME,' ',USR_FIRSTNAME) AS USER,\n COUNT(*) AS CANTCASES,\n MIN(AD.DEL_DURATION) AS MIN,\n MAX(AD.DEL_DURATION) AS MAX,\n SUM(AD.DEL_DURATION) AS TOTALDUR,\n AVG(AD.DEL_DURATION) AS PROMEDIO\n FROM APP_DELEGATION AS AD\n LEFT JOIN PROCESS AS P ON (P.PRO_UID = AD.PRO_UID)\n LEFT JOIN USERS AS U ON(U.USR_UID = AD.USR_UID)\n " . $var . "\n GROUP BY USER";
$con = Propel::getConnection("workflow");
$stmt = $con->prepareStatement($sql);
$rs = $stmt->executeQuery();
$ROW[] = array('USER' => 'char', 'CANTCASES' => 'integer', 'MIN' => 'float', 'MAX' => 'float', 'TOTALDUR' => 'float', 'PROMEDIO' => 'float');
while ($rs->next()) {
$ROW[] = array('USER' => $rs->getString('USER'), 'CANTCASES' => $rs->getString('CANTCASES'), 'MIN' => number_format($rs->getString('MIN'), 2), 'MAX' => number_format($rs->getString('MAX'), 2), 'TOTALDUR' => number_format($rs->getString('TOTALDUR'), 2), 'PROMEDIO' => number_format($rs->getString('PROMEDIO'), 2));
}
global $_DBArray;
$_DBArray['reports'] = $ROW;
$_SESSION['_DBArray'] = $_DBArray;
G::LoadClass('ArrayPeer');
$oCriteria = new Criteria('dbarray');
$oCriteria->setDBArrayTable('reports');
return $oCriteria;
}
示例7: addslashes
// add replace to change D'Souza to D*Souza by krlos
$sCheckbox = '<div align="center"><input type="checkbox" name="aUsers[' . $i . ']" id="aUsers[' . $i . ']" value=\'' . str_replace("\\'", "*", addslashes($oJSON->encode($aUser))) . '\' /></div>';
$i++;
} else {
$sCheckbox = G::LoadTranslation('ID_USER_REGISTERED') . ':<br />(' . $aUser['sUsername'] . ')';
}
// note added by gustavo cruz gustavo-at-colosa.com
// assign the user data to the DBArray variable.
$aUsers[] = array('Checkbox' => $sCheckbox, 'Username' => $aUser['sUsername'], 'FullName' => $aUser['sFullname'], 'FirstName' => $aUser['sFirstname'], 'LastName' => $aUser['sLastname'], 'Email' => $aUser['sEmail'], 'DistinguishedName' => $aUser['sDN']);
}
global $_DBArray;
$_DBArray['users'] = $aUsers;
$_SESSION['_DBArray'] = $_DBArray;
G::LoadClass('ArrayPeer');
$oCriteria = new Criteria('dbarray');
$oCriteria->setDBArrayTable('users');
$aData = array('Checkbox' => '0', 'FullName' => '0');
global $G_PUBLISH;
$G_PUBLISH = new Publisher();
if ($aFields['AUTH_SOURCE_PROVIDER'] != 'ldap') {
$G_PUBLISH->AddContent('propeltable', 'pagedTableLdap', 'authSources/ldapSearchResults', $oCriteria, ' ', array('Checkbox' => G::LoadTranslation('ID_MSG_CONFIRM_DELETE_CASE_SCHEDULER')));
} else {
if (file_exists(PATH_XMLFORM . 'authSources/' . $aFields['AUTH_SOURCE_PROVIDER'] . 'Edit.xml')) {
$G_PUBLISH->AddContent('propeltable', 'pagedTableLdap', 'authSources/' . $aFields['AUTH_SOURCE_PROVIDER'] . 'SearchResults', $oCriteria, ' ', array('Checkbox' => G::LoadTranslation('ID_MSG_CONFIRM_DELETE_CASE_SCHEDULER')));
} else {
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'login/showMessage', '', array('MESSAGE' => 'File: ' . $aFields['AUTH_SOURCE_PROVIDER'] . 'SearchResults.xml' . ' doesn\'t exist.'));
}
}
G::RenderPage('publish', 'raw');
break;
case 'authSourcesList':
示例8: getDynaformHistory
//.........这里部分代码省略.........
$c->addSelectColumn(AppHistoryPeer::TAS_UID);
$c->addSelectColumn(AppHistoryPeer::DYN_UID);
$c->addSelectColumn(AppHistoryPeer::OBJ_TYPE);
$c->addSelectColumn(AppHistoryPeer::USR_UID);
$c->addSelectColumn(AppHistoryPeer::APP_STATUS);
$c->addSelectColumn(AppHistoryPeer::HISTORY_DATE);
$c->addSelectColumn(AppHistoryPeer::HISTORY_DATA);
$c->addSelectColumn(UsersPeer::USR_FIRSTNAME);
$c->addSelectColumn(UsersPeer::USR_LASTNAME);
$c->addAsColumn('USR_NAME', "CONCAT(USR_LASTNAME, ' ', USR_FIRSTNAME)");
$c->addJoin(AppHistoryPeer::USR_UID, UsersPeer::USR_UID, Criteria::LEFT_JOIN);
//WHERE
$c->add($c->getNewCriterion(AppHistoryPeer::DYN_UID, $aObjectPermissions["DYNAFORMS"], Criteria::IN)->addOr($c->getNewCriterion(AppHistoryPeer::DYN_UID, $aObjectPermissions["INPUT_DOCUMENTS"], Criteria::IN))->addOr($c->getNewCriterion(AppHistoryPeer::DYN_UID, $aObjectPermissions["OUTPUT_DOCUMENTS"], Criteria::IN)));
$c->add(AppHistoryPeer::PRO_UID, $PRO_UID);
$c->add(AppHistoryPeer::APP_UID, $APP_UID);
$c->add(AppHistoryPeer::TAS_UID, $TAS_UID);
if (isset($DYN_UID) && $DYN_UID != "") {
$c->add(AppHistoryPeer::DYN_UID, $DYN_UID);
}
//Execute
$oDataset = AppHistoryPeer::doSelectRS($c);
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$aDynHistory = array();
$aDynHistory[] = array('DYN_TITLE' => 'char');
while ($oDataset->next()) {
$aRow = $oDataset->getRow();
$title = "";
switch ($aRow["OBJ_TYPE"]) {
case "DYNAFORM":
$arrayDynaFormData = $dynaForm->Load($aRow["DYN_UID"]);
$title = $arrayDynaFormData["DYN_TITLE"] . " (" . G::LoadTranslation("ID_DYNAFORM") . ")";
break;
case "INPUT_DOCUMENT":
$arrayInputDocumentData = $inputDocument->load($aRow["DYN_UID"]);
$title = $arrayInputDocumentData["INP_DOC_TITLE"] . " (" . G::LoadTranslation("ID_INPUT_DOCUMENT") . ")";
break;
case "OUTPUT_DOCUMENT":
$arrayOutputDocumentData = $outputDocument->load($aRow["DYN_UID"]);
$title = $arrayOutputDocumentData["OUT_DOC_TITLE"] . " (" . G::LoadTranslation("ID_OUTPUT_DOCUMENT") . ")";
break;
case "ASSIGN_TASK":
$title = G::LoadTranslation("ID_ASSIGN_TASK") . " (" . G::LoadTranslation("ID_TRIGGERS") . ")";
break;
}
$aRow["DYN_TITLE"] = $title;
$changedValues = unserialize($aRow['HISTORY_DATA']);
$html = "<table border='0' cellpadding='0' cellspacing='0'>";
$sw_add = false;
foreach ($changedValues as $key => $value) {
if ($value != null && !is_array($value)) {
$sw_add = true;
$html .= "<tr>";
$html .= "<td><b>{$key}:</b> </td>";
$html .= "<td>{$value}</td>";
$html .= "</tr>";
}
if (is_array($value)) {
$html .= "<tr>";
$html .= "<td><b>{$key} (grid):</b> </td>";
$html .= "<td>";
$html .= "<table>";
foreach ($value as $key1 => $value1) {
$html .= "<tr>";
$html .= "<td><b>{$key1}</b></td>";
$html .= "<td>";
if (is_array($value1)) {
$sw_add = true;
$html .= "<table>";
foreach ($value1 as $key2 => $value2) {
$html .= "<tr>";
$html .= "<td><b>{$key2}</b></td>";
$html .= "<td>{$value2}</td>";
$html .= "</tr>";
}
$html .= "</table>";
}
$html .= "</td>";
$html .= "</tr>";
}
$html .= "</table>";
$html .= "</td>";
$html .= "</tr>";
$html .= "</td>";
}
}
$html .= "</table>";
$aRow['FIELDS'] = $html;
if ($sw_add) {
$aDynHistory[] = $aRow;
}
}
global $_DBArray;
$_DBArray['DynaformsHistory'] = $aDynHistory;
$_SESSION['_DBArray'] = $_DBArray;
G::LoadClass('ArrayPeer');
$oCriteria = new Criteria('dbarray');
$oCriteria->setDBArrayTable('DynaformsHistory');
$oCriteria->addAscendingOrderByColumn(AppHistoryPeer::HISTORY_DATE);
return $oCriteria;
}
示例9: isset
$sFilter = isset($_POST['filter']) ? $_POST['filter'] : '';
$oDynaformHandler = new dynaFormHandler(PATH_DYNAFORM . $_DYN_FILENAME . '.xml');
$aFilter = explode(',', $sFilter);
$aAvailableFields = $oDynaformHandler->getFieldNames($aFilter);
$aFieldNames = array('id' => 'char', 'name' => 'char');
$aRows = array();
foreach ($aAvailableFields as $sFieldname) {
array_push($aRows, array('id' => $sFieldname, 'name' => $sFieldname));
}
$rows = array_merge(array($aFieldNames), $aRows);
global $_DBArray;
$_DBArray['DYNAFIELDS'] = $rows;
$_SESSION['_DBArray'] = $_DBArray;
G::LoadClass('ArrayPeer');
$oCriteria = new Criteria('dbarray');
$oCriteria->setDBArrayTable('DYNAFIELDS');
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'dynaforms/dynaforms_vars', '', '');
G::RenderPage('publish', 'raw');
break;
case 'testSetup':
$sFields = $_POST['sFields'];
$aFields = array();
$aFieldsTmp = $sFields == '' ? array() : explode(',', $sFields);
$i = 1;
foreach ($aFieldsTmp as $aField) {
$aFields['gFields'][$i++] = array('dynaid' => $aField, 'dynafield' => $aField, 'dynavalue' => '');
}
if (sizeof($aFields) > 0) {
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'dynaforms/dynaforms_ConditionalShowHideTest', '', $aFields);
G::RenderPage('publish', 'raw');
} else {
示例10: array
$rows[] = array('uid' => 11, 'name' => 'john', 'age' => 44, 'balance' => 123423);
$rows[] = array('uid' => 22, 'name' => 'bobby', 'age' => 33, 'balance' => 23456);
$rows[] = array('uid' => 33, 'name' => 'Dan', 'age' => 22, 'balance' => 34567);
$rows[] = array('uid' => 33, 'name' => 'Mike', 'age' => 21, 'balance' => 4567);
$rows[] = array('uid' => 44, 'name' => 'Paul', 'age' => 22, 'balance' => 567);
$rows[] = array('uid' => 55, 'name' => 'Will', 'age' => 23, 'balance' => 67);
$rows[] = array('uid' => 66, 'name' => 'Ernest', 'age' => 24, 'balance' => 7);
$rows[] = array('uid' => 77, 'name' => 'Albert', 'age' => 25, 'balance' => 84567);
$rows[] = array('uid' => 88, 'name' => 'Sue', 'age' => 26, 'balance' => 94567);
$rows[] = array('uid' => 99, 'name' => 'Freddy', 'age' => 22, 'balance' => 04567);
$_DBArray['user'] = $rows;
$_SESSION['_DBArray'] = $_DBArray;
//krumo ( $_DBArray );
G::LoadClass('ArrayPeer');
$c = new Criteria('dbarray');
$c->setDBArrayTable('user');
// $c->add ( 'user.age', 22 , Criteria::GREATER_EQUAL );
// $c->add ( 'user.age', 22 , Criteria::EQUAL );
$c->add('user.name', '%au%', Criteria::LIKE);
// $c->add ( 'user.balance', 3456 , Criteria::GREATER_EQUAL );
$c->addAscendingOrderByColumn('name');
$G_MAIN_MENU = 'processmaker';
$G_ID_MENU_SELECTED = 'CASES';
$G_PUBLISH = new Publisher();
// $G_PUBLISH->AddContent( 'propeltable', 'paged-table', 'cases/casesDemo', $c );
//$G_PUBLISH->AddContent('smarty', 'cases/casesDemo', '', '', $Fields);
// G::RenderPage( "publish" );
//die;
/* Includes */
G::LoadClass('pmScript');
G::LoadClass('case');
示例11: CaseScheduler
$oCaseScheduler = new CaseScheduler();
$aRows = $oCaseScheduler->getAllByProcess($process);
//$oCaseScheduler->caseSchedulerCron();
// g::pr($aRows); die;
$fieldNames = array('SCH_UID' => 'char', 'SCH_NAME' => 'char', 'PRO_UID' => 'char', 'TAS_UID' => 'char', 'SCH_TIME_NEXT_RUN' => 'char', 'SCH_LAST_RUN_TIME' => 'char', 'SCH_STATE' => 'char', 'SCH_LAST_STATE' => 'char', 'USR_UID' => 'char', 'SCH_OPTION' => 'char', 'SCH_START_TIME' => 'char', 'SCH_START_DATE' => 'char', 'SCH_DAYS_PERFORM_TASK' => 'char', 'SCH_EVERY_DAYS' => 'char', 'SCH_WEEK_DAYS' => 'char', 'SCH_START_DAY' => 'char', 'SCH_MONTHS' => 'char', 'SCH_END_DATE' => 'char', 'SCH_REPEAT_EVERY' => 'char', 'SCH_REPEAT_UNTIL' => 'char', 'SCH_REPEAT_STOP_IF_RUNNING' => 'char', 'PRO_PARENT' => 'char', 'PRO_TIME' => 'char', 'PRO_TIMEUNIT' => 'char', 'PRO_STATUS' => 'char', 'PRO_TYPE_DAY' => 'char', 'PRO_TYPE' => 'char', 'PRO_ASSIGNMENT' => 'char', 'PRO_SHOW_MAP' => 'char', 'PRO_SHOW_MESSAGE' => 'char', 'PRO_SUBPROCESS' => 'char', 'PRO_TRI_DELETED' => 'char', 'PRO_TRI_CANCELED' => 'char', 'PRO_TRI_PAUSED' => 'char', 'PRO_TRI_REASSIGNED' => 'char', 'PRO_SHOW_DELEGATE' => 'char', 'PRO_SHOW_DYNAFORM' => 'char', 'PRO_CATEGORY' => 'char', 'PRO_SUB_CATEGORY' => 'char', 'PRO_INDUSTRY' => 'char', 'PRO_UPDATE_DATE' => 'char', 'PRO_CREATE_DATE' => 'char', 'PRO_CREATE_USER' => 'char', 'PRO_HEIGHT' => 'char', 'PRO_WIDTH' => 'char', 'PRO_TITLE_X' => 'char', 'PRO_TITLE_Y' => 'char', 'PRO_DEBUG' => 'char', 'PRO_TITLE' => 'char', 'PRO_DESCRIPTION' => 'char', 'TAS_TYPE' => 'char', 'TAS_DURATION' => 'char', 'TAS_DELAY_TYPE' => 'char', 'TAS_TEMPORIZER' => 'char', 'TAS_TYPE_DAY' => 'char', 'TAS_TIMEUNIT' => 'char', 'TAS_ALERT' => 'char', 'TAS_PRIORITY_VARIABLE' => 'char', 'TAS_ASSIGN_TYPE' => 'char', 'TAS_ASSIGN_VARIABLE' => 'char', 'TAS_ASSIGN_LOCATION' => 'char', 'TAS_ASSIGN_LOCATION_ADHOC' => 'char', 'TAS_TRANSFER_FLY' => 'char', 'TAS_LAST_ASSIGNED' => 'char', 'TAS_USER' => 'char', 'TAS_CAN_UPLOAD' => 'char', 'TAS_VIEW_UPLOAD' => 'char', 'TAS_VIEW_ADDITIONAL_DOCUMENTATION' => 'char', 'TAS_CAN_CANCEL' => 'char', 'TAS_OWNER_APP' => 'char', 'STG_UID' => 'char', 'TAS_CAN_PAUSE' => 'char', 'TAS_CAN_SEND_MESSAGE' => 'char', 'TAS_CAN_DELETE_DOCS' => 'char', 'TAS_SELF_SERVICE' => 'char', 'TAS_START' => 'char', 'TAS_TO_LAST_USER' => 'char', 'TAS_SEND_LAST_EMAIL' => 'char', 'TAS_DERIVATION' => 'char', 'TAS_POSX' => 'char', 'TAS_POSY' => 'char', 'TAS_COLOR' => 'char', 'TAS_TITLE' => 'char', 'TAS_DESCRIPTION' => 'char', 'TAS_DEF_TITLE' => 'char', 'TAS_DEF_DESCRIPTION' => 'char', 'TAS_DEF_PROC_CODE' => 'char', 'TAS_DEF_MESSAGE' => 'char');
$aRows = array_merge(array($fieldNames), $aRows);
//krumo ($aRows);
for ($j = 0; $j < count($aRows); $j++) {
if ($aRows[$j]['SCH_STATE'] == 'PROCESSED') {
$aRows[$j]['SCH_TIME_NEXT_RUN'] = '';
}
}
// g::pr($aRows); die;
global $_DBArray;
$_DBArray['cases_scheduler'] = $aRows;
$_SESSION['_DBArray'] = $_DBArray;
G::LoadClass('ArrayPeer');
$oCriteria = new Criteria('dbarray');
$oCriteria->setDBArrayTable('cases_scheduler');
//krumo ($oCriteria);
//var_dump ($oCriteria);
//$oCriteria->add('PRO_UID', $_SESSION['PROCESS']);
//krumo($_SESSION);
$G_PUBLISH = new Publisher();
$G_PUBLISH->ROWS_PER_PAGE = 10;
$G_PUBLISH->AddContent('propeltable', 'paged-table', 'cases/cases_Scheduler_List', $oCriteria, array('CONFIRM' => G::LoadTranslation('ID_MSG_CONFIRM_DELETE_CASE_SCHEDULER')));
if (!isset($G_PUBLISH->oPropelTable) || !is_object($G_PUBLISH->oPropelTable)) {
$G_PUBLISH->oPropelTable = new stdclass();
}
$G_PUBLISH->oPropelTable->rowsPerPage = 10;
G::RenderPage('publishBlank', 'blank');
示例12: getAllGeneratedDocumentsCriteria
//.........这里部分代码省略.........
$filePdfLabel = " ";
if (is_array($listing)) {
foreach ($listing as $folderitem) {
if (($folderitem->filename == $aRow['APP_DOC_UID']) && ($folderitem->type == "DOC")) {
$fileDocLabel = \G::LoadTranslation('ID_GET_EXTERNAL_FILE') . " .doc";
$fileDoc = $folderitem->downloadScript;
continue;
}
}
}
break;
case "BOTH":
$fileDoc = 'cases_ShowOutputDocument?a=' .
$aRow['APP_DOC_UID'] . '&v=' . $aRow['DOC_VERSION'] . '&ext=doc&random=' . rand();
$fileDocLabel = ".doc";
if (is_array($listing)) {
foreach ($listing as $folderitem) {
if (($folderitem->filename == $aRow['APP_DOC_UID']) && ($folderitem->type == "DOC")) {
$fileDocLabel = G::LoadTranslation('ID_GET_EXTERNAL_FILE') . " .doc";
$fileDoc = $folderitem->downloadScript;
continue;
}
}
}
$filePdf = 'cases_ShowOutputDocument?a=' .
$aRow['APP_DOC_UID'] . '&v=' . $aRow['DOC_VERSION'] . '&ext=pdf&random=' . rand();
$filePdfLabel = ".pdf";
if (is_array($listing)) {
foreach ($listing as $folderitem) {
if (($folderitem->filename == $aRow['APP_DOC_UID']) && ($folderitem->type == "PDF")) {
$filePdfLabel = \G::LoadTranslation('ID_GET_EXTERNAL_FILE') . " .pdf";
$filePdf = $folderitem->downloadScript;
continue;
}
}
}
break;
}
try {
$aAux1 = $oUser->load($aAux['USR_UID']);
$sUser = $conf->usersNameFormatBySetParameters($confEnvSetting["format"], $aAux1["USR_USERNAME"], $aAux1["USR_FIRSTNAME"], $aAux1["USR_LASTNAME"]);
} catch (\Exception $oException) {
$sUser = '(USER DELETED)';
}
//if both documents were generated, we choose the pdf one, only if doc was
//generate then choose the doc file.
$firstDocLink = $filePdf;
$firstDocLabel = $filePdfLabel;
if ($aGields['OUT_DOC_GENERATE'] == 'DOC') {
$firstDocLink = $fileDoc;
$firstDocLabel = $fileDocLabel;
}
$aFields = array(
'APP_DOC_UID' => $aAux['APP_DOC_UID'],
'DOC_UID' => $aAux['DOC_UID'],
'APP_DOC_COMMENT' => $aAux['APP_DOC_COMMENT'],
'APP_DOC_FILENAME' => $aAux['APP_DOC_FILENAME'],
'APP_DOC_INDEX' => $aAux['APP_DOC_INDEX'],
'ORIGIN' => $aTask['TAS_TITLE'],
'CREATE_DATE' => $aAux['APP_DOC_CREATE_DATE'],
'CREATED_BY' => $sUser,
'FILEDOC' => $fileDoc,
'FILEPDF' => $filePdf,
'OUTDOCTITLE' => $outDocTitle,
'DOC_VERSION' => $aAux['DOC_VERSION'],
'TYPE' => $aAux['APP_DOC_TYPE'] . ' ' . $aGields['OUT_DOC_GENERATE'],
'DOWNLOAD_LINK' => $firstDocLink,
'DOWNLOAD_FILE' => $aAux['APP_DOC_FILENAME'] . $firstDocLabel
);
if (trim($fileDocLabel) != '') {
$aFields['FILEDOCLABEL'] = $fileDocLabel;
}
if (trim($filePdfLabel) != '') {
$aFields['FILEPDFLABEL'] = $filePdfLabel;
}
if ($aFields['APP_DOC_FILENAME'] != '') {
$aFields['TITLE'] = $aFields['APP_DOC_FILENAME'];
} else {
$aFields['TITLE'] = $aFields['APP_DOC_COMMENT'];
}
//$aFields['POSITION'] = $_SESSION['STEP_POSITION'];
$aFields['CONFIRM'] = \G::LoadTranslation('ID_CONFIRM_DELETE_ELEMENT');
if (in_array($aRow['APP_DOC_UID'], $aObjectPermissions['OUTPUT_DOCUMENTS'])) {
if (in_array($aRow['APP_DOC_UID'], $aDelete['OUTPUT_DOCUMENTS'])) {
$aFields['ID_DELETE'] = \G::LoadTranslation('ID_DELETE');
}
}
$aOutputDocuments[] = $aFields;
}
$oDataset->next();
}
global $_DBArray;
$_DBArray['outputDocuments'] = $aOutputDocuments;
\G::LoadClass('ArrayPeer');
$oCriteria = new \Criteria('dbarray');
$oCriteria->setDBArrayTable('outputDocuments');
$oCriteria->addDescendingOrderByColumn('CREATE_DATE');
return $oCriteria;
}
示例13: documentVersionHistory
function documentVersionHistory()
{
$folderID = $_POST ['folderID'] != '0' ? $_POST ['folderID'] == 'NA' ? "" : $_POST ['folderID'] : $rootFolder;
$folderContent = $oPMFolder->getFolderContent ($folderID, array ($_POST ['appDocId']));
array_unshift ($folderContent, array ('id' => 'char'));
if (! is_array ($folderContent)) {
echo $folderContent;
exit ();
}
$_DBArray ['PM_FOLDER_DOC_HISTORY'] = $folderContent;
$_SESSION ['_DBArray'] = $_DBArray;
G::LoadClass ('ArrayPeer');
$c = new Criteria ('dbarray');
$c->setDBArrayTable ('PM_FOLDER_DOC_HISTORY');
$c->addAscendingOrderByColumn ('id');
$G_PUBLISH = new Publisher ();
require_once ('classes/class.xmlfield_InputPM.php');
$G_PUBLISH->AddContent ('propeltable', 'paged-table', 'appFolder/appFolderDocumentListHistory', $c,
array ('folderID' => $_POST ['folderID'] != '0' ? $_POST ['folderID'] == 'NA' ?
"/" : $_POST ['folderID'] : $rootFolder));
G::RenderPage ('publish', 'raw');
}
示例14: Menu
global $G_TMP_MENU;
$oMenu = new Menu();
$oMenu->load('cases');
$rowsCasesMenu[] = array('id' => 'char', 'name' => 'char');
foreach ($oMenu->Id as $i => $item) {
if ($oMenu->Types[$i] != 'blockHeader') {
$rowsCasesMenu[] = array('id' => $item, 'name' => $oMenu->Labels[$i]);
}
}
//G::pr($rows); die;
global $_DBArray;
$_DBArray['menutab'] = $rows;
$_SESSION['_DBArray'] = $_DBArray;
$_DBArray['CASES_MENU'] = $rowsCasesMenu;
$_SESSION['_DBArray'] = $_DBArray;
G::LoadClass('ArrayPeer');
$oCriteria = new Criteria('dbarray');
$oCriteria->setDBArrayTable('menutab');
$oCriteria2 = new Criteria('dbarray');
$oCriteria2->setDBArrayTable('CASES_MENU');
if ($RBAC->userCanAccess('PM_EDITPERSONALINFO') == 1) {
//he has permitions for edit his profile
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'users/myInfo.xml', '', $aFields, 'myInfo_Save');
} else {
//he has not permitions for edit his profile, so just view mode will be displayed
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'users/myInfo2.xml', '', $aFields, '');
}
G::RenderPage('publish');
} catch (Exception $oException) {
die($oException->getMessage());
}
示例15: array
$aDynaformFields = array();
foreach ($aDynaforms as $dyn) {
if ($dyn['DYN_TYPE'] == 'xmlform') {
if (is_file(PATH_DYNAFORM . "{$_SESSION['PROCESS']}/{$dyn['DYN_UID']}" . '.xml')) {
$oDynaformHandler = new dynaFormHandler(PATH_DYNAFORM . "{$_SESSION['PROCESS']}/{$dyn['DYN_UID']}" . '.xml');
$aDynaformFields[$dyn['DYN_TITLE']] = $oDynaformHandler->getFieldNames();
} else {
continue;
}
}
}
//G::pr($aDynaformFields); die;
$aRows = array();
$aRows[0] = array('id' => 'char', 'dynaform' => 'char', 'name' => 'char');
foreach ($aDynaformFields as $dynName => $aFields) {
foreach ($aFields as $sField) {
array_push($aRows, array('id' => $sField, 'dynaform' => $dynName, 'name' => $sField));
}
}
//g::pr($aRows); die;
global $_DBArray;
$_DBArray['virtualtable'] = $aRows;
$_SESSION['_DBArray'] = $_DBArray;
G::LoadClass('ArrayPeer');
$oCriteria = new Criteria('dbarray');
$oCriteria->setDBArrayTable('virtualtable');
$G_PUBLISH = new Publisher();
$G_PUBLISH->AddContent('propeltable', 'paged-table', 'events/dynavarsList', $oCriteria);
G::RenderPage('publish', 'raw');
break;
}