本文整理汇总了PHP中DBAdapter::getStringDelimiter方法的典型用法代码示例。如果您正苦于以下问题:PHP DBAdapter::getStringDelimiter方法的具体用法?PHP DBAdapter::getStringDelimiter怎么用?PHP DBAdapter::getStringDelimiter使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DBAdapter
的用法示例。
在下文中一共展示了DBAdapter::getStringDelimiter方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: existsTitle
/**
* Verify if exists the title of a Group
*
* @param string $groupTitle Title
* @param string $groupUidExclude Unique id of Group to exclude
*
* return bool Return true if exists the title of a Group, false otherwise
*/
public function existsTitle($groupTitle, $groupUidExclude = "")
{
try {
$delimiter = \DBAdapter::getStringDelimiter();
$criteria = new \Criteria("workflow");
$criteria->addSelectColumn(\GroupwfPeer::GRP_UID);
$criteria->addAlias("CT", \ContentPeer::TABLE_NAME);
$arrayCondition = array();
$arrayCondition[] = array(\GroupwfPeer::GRP_UID, "CT.CON_ID", \Criteria::EQUAL);
$arrayCondition[] = array("CT.CON_CATEGORY", $delimiter . "GRP_TITLE" . $delimiter, \Criteria::EQUAL);
$arrayCondition[] = array("CT.CON_LANG", $delimiter . SYS_LANG . $delimiter, \Criteria::EQUAL);
$criteria->addJoinMC($arrayCondition, \Criteria::LEFT_JOIN);
if ($groupUidExclude != "") {
$criteria->add(\GroupwfPeer::GRP_UID, $groupUidExclude, \Criteria::NOT_EQUAL);
}
$criteria->add("CT.CON_VALUE", $groupTitle, \Criteria::EQUAL);
$rsCriteria = \GroupwfPeer::doSelectRS($criteria);
if ($rsCriteria->next()) {
return true;
} else {
return false;
}
} catch (\Exception $e) {
throw $e;
}
}
示例2: getTriggerCriteria
/**
* Get criteria for Trigger
*
* return object
*/
public function getTriggerCriteria()
{
try {
$delimiter = \DBAdapter::getStringDelimiter();
$criteria = new \Criteria("workflow");
$criteria->addSelectColumn(\TriggersPeer::TRI_UID);
$criteria->addAsColumn("TRI_TITLE", "CT.CON_VALUE");
$criteria->addAsColumn("TRI_DESCRIPTION", "CD.CON_VALUE");
$criteria->addSelectColumn(\TriggersPeer::TRI_TYPE);
$criteria->addSelectColumn(\TriggersPeer::TRI_WEBBOT);
$criteria->addSelectColumn(\TriggersPeer::TRI_PARAM);
$criteria->addAlias("CT", \ContentPeer::TABLE_NAME);
$criteria->addAlias("CD", \ContentPeer::TABLE_NAME);
$arrayCondition = array();
$arrayCondition[] = array(\TriggersPeer::TRI_UID, "CT.CON_ID", \Criteria::EQUAL);
$arrayCondition[] = array("CT.CON_CATEGORY", $delimiter . "TRI_TITLE" . $delimiter, \Criteria::EQUAL);
$arrayCondition[] = array("CT.CON_LANG", $delimiter . SYS_LANG . $delimiter, \Criteria::EQUAL);
$criteria->addJoinMC($arrayCondition, \Criteria::LEFT_JOIN);
$arrayCondition = array();
$arrayCondition[] = array(\TriggersPeer::TRI_UID, "CD.CON_ID", \Criteria::EQUAL);
$arrayCondition[] = array("CD.CON_CATEGORY", $delimiter . "TRI_DESCRIPTION" . $delimiter, \Criteria::EQUAL);
$arrayCondition[] = array("CD.CON_LANG", $delimiter . SYS_LANG . $delimiter, \Criteria::EQUAL);
$criteria->addJoinMC($arrayCondition, \Criteria::LEFT_JOIN);
return $criteria;
} catch (\Exception $e) {
throw $e;
}
}
示例3: getEvents
/**
* Get list for Events
* @var string $pro_uid. Uid for Process
* @var string $filter.
* @var string $evn_uid. Uid for Process
*
* @access public
* @author Brayan Pereyra (Cochalo) <brayan@colosa.com>
* @copyright Colosa - Bolivia
*
* @return array
*/
public function getEvents($pro_uid, $filter = '', $evn_uid = '')
{
$pro_uid = $this->validateProUid($pro_uid);
if ($evn_uid != '') {
$evn_uid = $this->validateEvnUid($evn_uid);
}
$oProcess = new \Process();
if (!$oProcess->processExists($pro_uid)) {
throw new \Exception(\G::LoadTranslation("ID_PROCESS_NOT_EXIST", array('pro_uid', $pro_uid)));
}
$sDelimiter = \DBAdapter::getStringDelimiter();
$oCriteria = new \Criteria('workflow');
$oCriteria->addSelectColumn(\EventPeer::EVN_UID);
$oCriteria->addSelectColumn(\EventPeer::EVN_ACTION);
$oCriteria->addSelectColumn(\EventPeer::EVN_STATUS);
$oCriteria->addSelectColumn(\EventPeer::EVN_WHEN_OCCURS);
$oCriteria->addSelectColumn(\EventPeer::EVN_RELATED_TO);
$oCriteria->addAsColumn('EVN_DESCRIPTION', \ContentPeer::CON_VALUE);
$aConditions = array();
$aConditions[] = array(\EventPeer::EVN_UID, \ContentPeer::CON_ID);
$aConditions[] = array(\ContentPeer::CON_CATEGORY, $sDelimiter . 'EVN_DESCRIPTION' . $sDelimiter);
$aConditions[] = array(\ContentPeer::CON_LANG, $sDelimiter . SYS_LANG . $sDelimiter);
$oCriteria->addJoinMC($aConditions, \Criteria::LEFT_JOIN);
$oCriteria->add(\EventPeer::PRO_UID, $pro_uid);
if ($evn_uid != '') {
$oCriteria->add(\EventPeer::EVN_UID, $evn_uid);
}
switch ($filter) {
case 'message':
$oCriteria->add(\EventPeer::EVN_ACTION, "SEND_MESSAGE");
break;
case 'conditional':
$oCriteria->add(\EventPeer::EVN_ACTION, "EXECUTE_CONDITIONAL_TRIGGER");
break;
case 'multiple':
$oCriteria->add(\EventPeer::EVN_ACTION, "EXECUTE_TRIGGER");
break;
}
$eventsArray = array();
$oDataset = \EventPeer::doSelectRS($oCriteria);
$oDataset->setFetchmode(\ResultSet::FETCHMODE_ASSOC);
$oDataset->next();
while ($aRow = $oDataset->getRow()) {
$oEvent = new \Event();
$aFields = $oEvent->load($aRow['EVN_UID']);
$aRow = array_merge($aRow, $aFields);
$eventsArray[] = array_change_key_case($aRow, CASE_LOWER);
$oDataset->next();
}
if ($evn_uid != '' && empty($eventsArray)) {
throw new \Exception(\G::LoadTranslation("ID_ROW_DOES_NOT_EXIST"));
} elseif ($evn_uid != '' && !empty($eventsArray)) {
return current($eventsArray);
}
return $eventsArray;
}
示例4: loadByCategoryId
public function loadByCategoryId($sCategoryUid)
{
$c = new Criteria('workflow');
$del = DBAdapter::getStringDelimiter();
$c->clearSelectColumns();
$c->addSelectColumn(ProcessCategoryPeer::CATEGORY_NAME);
$c->add(ProcessCategoryPeer::CATEGORY_UID, $sCategoryUid);
$dataset = ProcessCategoryPeer::doSelectRS($c);
$dataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$dataset->next();
$aRow = $dataset->getRow();
return $aRow['CATEGORY_NAME'];
}
示例5: loadDefaultAccount
/**
* Get the evn_description column value.
*
* @return string
*/
public function loadDefaultAccount()
{
$c = new Criteria('workflow');
$del = DBAdapter::getStringDelimiter();
$c->clearSelectColumns();
$c->addSelectColumn(EmailServerPeer::MESS_ACCOUNT);
$c->add(EmailServerPeer::MESS_DEFAULT, 1);
$rs = EmailServerPeer::doSelectRS($c, Propel::getDBConnection('workflow_ro'));
$rs->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$rs->next();
$row = $rs->getRow();
$response = $row;
return $response;
}
示例6: getCriteriaDBSList
public function getCriteriaDBSList($sProcessUID)
{
$sDelimiter = DBAdapter::getStringDelimiter();
$oCriteria = new Criteria('workflow');
$oCriteria->addSelectColumn(DbSourcePeer::DBS_UID);
$oCriteria->addSelectColumn(DbSourcePeer::PRO_UID);
$oCriteria->addSelectColumn(DbSourcePeer::DBS_TYPE);
$oCriteria->addAsColumn("DBS_SERVER", "CASE WHEN " . DbSourcePeer::DBS_TYPE . " = 'oracle' AND " . DbSourcePeer::DBS_CONNECTION_TYPE . " = 'TNS' THEN CONCAT('[', " . DbSourcePeer::DBS_TNS . ", ']') ELSE " . DbSourcePeer::DBS_SERVER . " END");
$oCriteria->addAsColumn("DBS_DATABASE_NAME", "CASE WHEN " . DbSourcePeer::DBS_TYPE . " = 'oracle' AND " . DbSourcePeer::DBS_CONNECTION_TYPE . " = 'TNS' THEN CONCAT('[', " . DbSourcePeer::DBS_TNS . ", ']') ELSE " . DbSourcePeer::DBS_DATABASE_NAME . " END");
$oCriteria->addSelectColumn(DbSourcePeer::DBS_USERNAME);
$oCriteria->addSelectColumn(DbSourcePeer::DBS_PASSWORD);
$oCriteria->addSelectColumn(DbSourcePeer::DBS_PORT);
$oCriteria->addAsColumn('DBS_DESCRIPTION', 'C.CON_VALUE');
$oCriteria->addAlias('C', 'CONTENT');
$aConditions = array();
$aConditions[] = array(DbSourcePeer::DBS_UID, 'C.CON_ID');
$aConditions[] = array('C.CON_CATEGORY', $sDelimiter . 'DBS_DESCRIPTION' . $sDelimiter);
$aConditions[] = array('C.CON_LANG', $sDelimiter . SYS_LANG . $sDelimiter);
$oCriteria->addJoinMC($aConditions, Criteria::LEFT_JOIN);
$oCriteria->add(DbSourcePeer::PRO_UID, $sProcessUID);
return $oCriteria;
}
示例7: getCriteriaDBSList
public function getCriteriaDBSList($sProcessUID)
{
$sDelimiter = DBAdapter::getStringDelimiter();
$oCriteria = new Criteria('workflow');
$oCriteria->addSelectColumn(DbSourcePeer::DBS_UID);
$oCriteria->addSelectColumn(DbSourcePeer::PRO_UID);
$oCriteria->addSelectColumn(DbSourcePeer::DBS_TYPE);
$oCriteria->addSelectColumn(DbSourcePeer::DBS_SERVER);
$oCriteria->addSelectColumn(DbSourcePeer::DBS_DATABASE_NAME);
$oCriteria->addSelectColumn(DbSourcePeer::DBS_USERNAME);
$oCriteria->addSelectColumn(DbSourcePeer::DBS_PASSWORD);
$oCriteria->addSelectColumn(DbSourcePeer::DBS_PORT);
$oCriteria->addAsColumn('DBS_DESCRIPTION', 'C.CON_VALUE');
$oCriteria->addAlias('C', 'CONTENT');
$aConditions = array();
$aConditions[] = array(DbSourcePeer::DBS_UID, 'C.CON_ID');
$aConditions[] = array('C.CON_CATEGORY', $sDelimiter . 'DBS_DESCRIPTION' . $sDelimiter);
$aConditions[] = array('C.CON_LANG', $sDelimiter . SYS_LANG . $sDelimiter);
$oCriteria->addJoinMC($aConditions, Criteria::LEFT_JOIN);
$oCriteria->add(DbSourcePeer::PRO_UID, $sProcessUID);
return $oCriteria;
}
示例8: getSubprocesss
/**
* Get SubProcess in Process
*
* return object
*/
public function getSubprocesss($pro_uid, $tas_uid)
{
try {
$pro_uid = $this->validateProUid($pro_uid);
$tas_uid = $this->validateTasUid($tas_uid);
$oCriteria = new \Criteria('workflow');
$del = \DBAdapter::getStringDelimiter();
$oCriteria->add(SubProcessPeer::PRO_PARENT, $pro_uid);
$oCriteria->add(SubProcessPeer::TAS_PARENT, $tas_uid);
$oCriteria->addAsColumn('CON_VALUE', 'C1.CON_VALUE', 'CON_TITLE');
$oCriteria->addAlias("C1", 'CONTENT');
$tasTitleConds = array();
$tasTitleConds[] = array(SubProcessPeer::TAS_PARENT, 'C1.CON_ID');
$tasTitleConds[] = array('C1.CON_CATEGORY', $del . 'TAS_TITLE' . $del);
$tasTitleConds[] = array('C1.CON_LANG', $del . SYS_LANG . $del);
$oCriteria->addJoinMC($tasTitleConds, \Criteria::LEFT_JOIN);
$oDataset = SubProcessPeer::doSelectRS($oCriteria);
$oDataset->setFetchmode(\ResultSet::FETCHMODE_ASSOC);
$oDataset->next();
$aRow = $oDataset->getRow();
$aRow = array_change_key_case($aRow, CASE_LOWER);
$response['spr_uid'] = $aRow['sp_uid'];
$response['spr_pro_parent'] = $aRow['pro_parent'];
$response['spr_tas_parent'] = $aRow['tas_parent'];
$response['spr_pro'] = $aRow['pro_uid'];
$response['spr_tas'] = $aRow['tas_uid'];
$response['spr_name'] = $aRow['con_value'];
$response['spr_synchronous'] = $aRow['sp_synchronous'];
$response['spr_variables_out'] = unserialize($aRow['sp_variables_out']);
if ((int) $response['spr_synchronous'] === 1) {
$response['spr_variables_in'] = unserialize($aRow['sp_variables_in']);
}
return $response;
} catch (\Exception $e) {
throw $e;
}
}
示例9: switch
$req = $_POST['request'];
switch ($req) {
case 'showUsers':
/*
$sql = "SELECT USR_UID, USR_EMAIL, CONCAT(USR_FIRSTNAME, ' ' , USR_LASTNAME) AS USR_FULLNAME FROM USERS WHERE USR_STATUS = 'ACTIVE' AND USR_EMAIL <> ''";
*/
$sDataBase = 'database_' . strtolower(DB_ADAPTER);
if (G::LoadSystemExist($sDataBase)) {
G::LoadSystem($sDataBase);
$oDataBase = new database();
$sConcat = $oDataBase->concatString("USR_FIRSTNAME", "' '", "USR_LASTNAME");
}
$sql = " SELECT USR_UID, USR_EMAIL, " . $sConcat . " AS USR_FULLNAME FROM USERS " . " WHERE USR_STATUS = 'ACTIVE' AND USR_EMAIL <> ''";
$oCriteria = new Criteria('workflow');
$del = DBAdapter::getStringDelimiter();
$con = Propel::getConnection("workflow");
$stmt = $con->prepareStatement($sql);
$rs = $stmt->executeQuery();
$aRows[] = array('USR_UID' => 'char', 'USR_EMAIL' => 'char', 'USR_FULLNAME' => 'char');
while ($rs->next()) {
$aRows[] = array('USR_UID' => $rs->getString('USR_UID'), 'USR_EMAIL' => $rs->getString('USR_EMAIL'), 'USR_FULLNAME' => $rs->getString('USR_FULLNAME'));
}
//echo '<pre>'; print_r($aRows);
global $_DBArray;
$_DBArray['virtualtable'] = $aRows;
$_SESSION['_DBArray'] = $_DBArray;
G::LoadClass('ArrayPeer');
$oCriteria = new Criteria('dbarray');
$oCriteria->setDBArrayTable('virtualtable');
$G_PUBLISH = new Publisher();
示例10: getWebEntryCriteria
/**
* Get criteria for Web Entry
*
* return object
*/
public function getWebEntryCriteria()
{
try {
$delimiter = \DBAdapter::getStringDelimiter();
$criteria = new \Criteria("workflow");
$criteria->addSelectColumn(\WebEntryPeer::WE_UID);
$criteria->addSelectColumn(\WebEntryPeer::PRO_UID);
$criteria->addSelectColumn(\WebEntryPeer::TAS_UID);
$criteria->addSelectColumn(\WebEntryPeer::DYN_UID);
$criteria->addSelectColumn(\WebEntryPeer::USR_UID);
$criteria->addAsColumn("WE_TITLE", "CT.CON_VALUE");
$criteria->addAsColumn("WE_DESCRIPTION", "CD.CON_VALUE");
$criteria->addSelectColumn(\WebEntryPeer::WE_METHOD);
$criteria->addSelectColumn(\WebEntryPeer::WE_INPUT_DOCUMENT_ACCESS);
$criteria->addSelectColumn(\WebEntryPeer::WE_DATA);
$criteria->addSelectColumn(\WebEntryPeer::WE_CREATE_USR_UID);
$criteria->addSelectColumn(\WebEntryPeer::WE_UPDATE_USR_UID);
$criteria->addSelectColumn(\WebEntryPeer::WE_CREATE_DATE);
$criteria->addSelectColumn(\WebEntryPeer::WE_UPDATE_DATE);
$criteria->addAlias("CT", \ContentPeer::TABLE_NAME);
$criteria->addAlias("CD", \ContentPeer::TABLE_NAME);
$arrayCondition = array();
$arrayCondition[] = array(\WebEntryPeer::WE_UID, "CT.CON_ID", \Criteria::EQUAL);
$arrayCondition[] = array("CT.CON_CATEGORY", $delimiter . "WE_TITLE" . $delimiter, \Criteria::EQUAL);
$arrayCondition[] = array("CT.CON_LANG", $delimiter . SYS_LANG . $delimiter, \Criteria::EQUAL);
$criteria->addJoinMC($arrayCondition, \Criteria::LEFT_JOIN);
$arrayCondition = array();
$arrayCondition[] = array(\WebEntryPeer::WE_UID, "CD.CON_ID", \Criteria::EQUAL);
$arrayCondition[] = array("CD.CON_CATEGORY", $delimiter . "WE_DESCRIPTION" . $delimiter, \Criteria::EQUAL);
$arrayCondition[] = array("CD.CON_LANG", $delimiter . SYS_LANG . $delimiter, \Criteria::EQUAL);
$criteria->addJoinMC($arrayCondition, \Criteria::LEFT_JOIN);
return $criteria;
} catch (\Exception $e) {
throw $e;
}
}
示例11: getInputDocumentCriteria
/**
* Get criteria for InputDocument
*
* return object
*/
public function getInputDocumentCriteria()
{
try {
$delimiter = \DBAdapter::getStringDelimiter();
$criteria = new \Criteria("workflow");
$criteria->addSelectColumn(\InputDocumentPeer::INP_DOC_UID);
$criteria->addAsColumn("INP_DOC_TITLE", "CT.CON_VALUE");
$criteria->addAsColumn("INP_DOC_DESCRIPTION", "CD.CON_VALUE");
$criteria->addSelectColumn(\InputDocumentPeer::INP_DOC_FORM_NEEDED);
$criteria->addSelectColumn(\InputDocumentPeer::INP_DOC_ORIGINAL);
$criteria->addSelectColumn(\InputDocumentPeer::INP_DOC_PUBLISHED);
$criteria->addSelectColumn(\InputDocumentPeer::INP_DOC_VERSIONING);
$criteria->addSelectColumn(\InputDocumentPeer::INP_DOC_DESTINATION_PATH);
$criteria->addSelectColumn(\InputDocumentPeer::INP_DOC_TAGS);
$criteria->addSelectColumn(\InputDocumentPeer::INP_DOC_TYPE_FILE);
$criteria->addSelectColumn(\InputDocumentPeer::INP_DOC_MAX_FILESIZE);
$criteria->addSelectColumn(\InputDocumentPeer::INP_DOC_MAX_FILESIZE_UNIT);
$criteria->addAlias("CT", \ContentPeer::TABLE_NAME);
$criteria->addAlias("CD", \ContentPeer::TABLE_NAME);
$arrayCondition = array();
$arrayCondition[] = array(\InputDocumentPeer::INP_DOC_UID, "CT.CON_ID", \Criteria::EQUAL);
$arrayCondition[] = array("CT.CON_CATEGORY", $delimiter . "INP_DOC_TITLE" . $delimiter, \Criteria::EQUAL);
$arrayCondition[] = array("CT.CON_LANG", $delimiter . SYS_LANG . $delimiter, \Criteria::EQUAL);
$criteria->addJoinMC($arrayCondition, \Criteria::LEFT_JOIN);
$arrayCondition = array();
$arrayCondition[] = array(\InputDocumentPeer::INP_DOC_UID, "CD.CON_ID", \Criteria::EQUAL);
$arrayCondition[] = array("CD.CON_CATEGORY", $delimiter . "INP_DOC_DESCRIPTION" . $delimiter, \Criteria::EQUAL);
$arrayCondition[] = array("CD.CON_LANG", $delimiter . SYS_LANG . $delimiter, \Criteria::EQUAL);
$criteria->addJoinMC($arrayCondition, \Criteria::LEFT_JOIN);
return $criteria;
} catch (\Exception $e) {
throw $e;
}
}
示例12: array
if (strpos($_POST['server'], "\\")) {
$_POST['port'] = 'none';
}
$aData = array('DBS_UID' => $_POST['dbs_uid'], 'PRO_UID' => $_SESSION['PROCESS'], 'DBS_TYPE' => $_POST['type'], 'DBS_SERVER' => $_POST['server'], 'DBS_DATABASE_NAME' => $_POST['db_name'], 'DBS_USERNAME' => $_POST['user'], 'DBS_PASSWORD' => ($_POST['passwd'] == 'none' ? "" : G::encrypt($_POST['passwd'], $_POST['db_name'])) . "_2NnV3ujj3w", 'DBS_PORT' => $_POST['port'] == 'none' ? "" : $_POST['port'], 'DBS_ENCODE' => $_POST['enc']);
$oDBSource->update($aData);
$oContent->addContent('DBS_DESCRIPTION', '', $_POST['dbs_uid'], SYS_LANG, $_POST['desc']);
break;
case 'saveConnection':
$oDBSource = new DbSource();
$oContent = new Content();
if (strpos($_POST['server'], "\\")) {
$_POST['port'] = 'none';
}
$aData = array('PRO_UID' => $_SESSION['PROCESS'], 'DBS_TYPE' => $_POST['type'], 'DBS_SERVER' => $_POST['server'], 'DBS_DATABASE_NAME' => $_POST['db_name'], 'DBS_USERNAME' => $_POST['user'], 'DBS_PASSWORD' => ($_POST['passwd'] == 'none' ? "" : G::encrypt($_POST['passwd'], $_POST['db_name'])) . "_2NnV3ujj3w", 'DBS_PORT' => $_POST['port'] == 'none' ? "" : $_POST['port'], 'DBS_ENCODE' => $_POST['enc']);
$newid = $oDBSource->create($aData);
$sDelimiter = DBAdapter::getStringDelimiter();
$oContent->addContent('DBS_DESCRIPTION', '', $newid, SYS_LANG, $_POST['desc']);
break;
case 'deleteDbConnection':
try {
$oDBSource = new DbSource();
$oContent = new Content();
$DBS_UID = $_POST['dbs_uid'];
$PRO_UID = $_SESSION['PROCESS'];
$oDBSource->remove($DBS_UID, $PRO_UID);
$oContent->removeContent('DBS_DESCRIPTION', "", $DBS_UID);
$result->success = true;
$result->msg = G::LoadTranslation('ID_DBCONNECTION_REMOVED');
} catch (Exception $e) {
$result->success = false;
$result->msg = $e->getMessage();
示例13: reportsPatch
/**
* Patch for reports by The Answer (17-10-2k8)
*
*
* @name reportsPatch
*
* param
* @return void
*/
function reportsPatch()
{
require_once 'classes/model/AppDelegation.php';
$oCriteria = new Criteria('workflow');
$del = DBAdapter::getStringDelimiter();
$oCriteria->addSelectColumn(AppDelegationPeer::APP_UID);
$oCriteria->addSelectColumn(AppDelegationPeer::DEL_INDEX);
$oCriteria->addSelectColumn(AppDelegationPeer::TAS_UID);
$oCriteria->addSelectColumn(AppDelegationPeer::DEL_DELEGATE_DATE);
$oCriteria->addSelectColumn(AppDelegationPeer::DEL_INIT_DATE);
$oCriteria->addSelectColumn(AppDelegationPeer::DEL_FINISH_DATE);
$oCriteria->addSelectColumn(AppDelegationPeer::DEL_DURATION);
$oDataset = AppDelegationPeer::doSelectRS($oCriteria);
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$oDataset->next();
while ($aRow = $oDataset->getRow()) {
$oAppDelegation = new AppDelegation();
$aData['APP_UID'] = $aRow['APP_UID'];
$aData['DEL_INDEX'] = $aRow['DEL_INDEX'];
$aData['DEL_DELEGATE_DATE'] = $aRow['DEL_DELEGATE_DATE'];
if ($aRow['DEL_INIT_DATE'] == NULL) {
$aData['DEL_INIT_DATE'] = $aRow['DEL_DELEGATE_DATE'];
} else {
$aData['DEL_INIT_DATE'] = $aRow['DEL_INIT_DATE'];
}
//$aData['DEL_FINISH_DATE']=$aRow['DEL_FINISH_DATE'];
if ($aRow['DEL_DURATION'] != 0) {
G::LoadClass('dates');
$oDates = new dates();
$aData['DEL_DURATION'] = $oDates->calculateDuration($aData['DEL_INIT_DATE'], $aRow['DEL_FINISH_DATE'], null, null, $aRow['TAS_UID']);
}
$oAppDelegation->update($aData);
$oDataset->next();
}
return;
}
示例14: forwardMail
/**
*
* @url POST /forwardMail
*/
public function forwardMail($params)
{
if (!isset($_REQUEST['REQ_UID'])) {
$_REQUEST['REQ_UID'] = '';
}
$criteria = new Criteria();
$criteria->addSelectColumn(AbeConfigurationPeer::ABE_UID);
$criteria->addSelectColumn(AbeConfigurationPeer::PRO_UID);
$criteria->addSelectColumn(AbeConfigurationPeer::TAS_UID);
$criteria->addSelectColumn(AbeRequestsPeer::ABE_REQ_UID);
$criteria->addSelectColumn(AbeRequestsPeer::APP_UID);
$criteria->addSelectColumn(AbeRequestsPeer::DEL_INDEX);
$criteria->addSelectColumn(AbeRequestsPeer::ABE_REQ_SENT_TO);
$criteria->addSelectColumn(AbeRequestsPeer::ABE_REQ_SUBJECT);
$criteria->addSelectColumn(AbeRequestsPeer::ABE_REQ_BODY);
$criteria->addSelectColumn(AbeRequestsPeer::ABE_REQ_ANSWERED);
$criteria->addSelectColumn(AbeRequestsPeer::ABE_REQ_STATUS);
$criteria->addSelectColumn(AppDelegationPeer::DEL_FINISH_DATE);
$criteria->add(AbeRequestsPeer::ABE_REQ_UID, $_REQUEST['REQ_UID']);
$criteria->addJoin(AbeRequestsPeer::ABE_UID, AbeConfigurationPeer::ABE_UID);
$criteria->addJoin(AppDelegationPeer::APP_UID, AbeRequestsPeer::APP_UID);
$criteria->addJoin(AppDelegationPeer::DEL_INDEX, AbeRequestsPeer::DEL_INDEX);
$resultRes = AbeRequestsPeer::doSelectRS($criteria);
$resultRes->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$resultRes->next();
$dataRes = Array();
if ($dataRes = $resultRes->getRow()) {
if (is_null($dataRes['DEL_FINISH_DATE'])) {
require_once 'classes/model/Configuration.php';
G::LoadClass('spool');
$configuration = new Configuration();
$sDelimiter = DBAdapter::getStringDelimiter();
$criteria = new Criteria('workflow');
$criteria->add(ConfigurationPeer::CFG_UID, 'Emails');
$criteria->add(ConfigurationPeer::OBJ_UID, '');
$criteria->add(ConfigurationPeer::PRO_UID, '');
$criteria->add(ConfigurationPeer::USR_UID, '');
$criteria->add(ConfigurationPeer::APP_UID, '');
if (ConfigurationPeer::doCount($criteria) == 0) {
$configuration->create(array('CFG_UID' => 'Emails', 'OBJ_UID' => '', 'CFG_VALUE' => '', 'PRO_UID' => '', 'USR_UID' => '', 'APP_UID' => ''));
$newConfiguration = array();
} else {
$newConfiguration = $configuration->load('Emails', '', '', '', '');
if ($newConfiguration['CFG_VALUE'] != '') {
$newConfiguration = unserialize($newConfiguration['CFG_VALUE']);
} else {
$newConfiguration = array();
}
}
$spool = new spoolRun();
$spool->setConfig(array(
'MESS_ENGINE' => $newConfiguration['MESS_ENGINE'],
'MESS_SERVER' => $newConfiguration['MESS_SERVER'],
'MESS_PORT' => $newConfiguration['MESS_PORT'],
'MESS_ACCOUNT' => $newConfiguration['MESS_ACCOUNT'],
'MESS_PASSWORD' => $newConfiguration['MESS_PASSWORD'],
'SMTPAuth' => $newConfiguration['MESS_RAUTH']
));
$spool->create(array(
'msg_uid' => '',
'app_uid' => $dataRes['APP_UID'],
'del_index' => $dataRes['DEL_INDEX'],
'app_msg_type' => 'TEST',
'app_msg_subject' => $dataRes['ABE_REQ_SUBJECT'],
'app_msg_from' => $newConfiguration['MESS_ACCOUNT'],
'app_msg_to' => $dataRes['ABE_REQ_SENT_TO'],
'app_msg_body' => $dataRes['ABE_REQ_BODY'],
'app_msg_cc' => '',
'app_msg_bcc' => '',
'app_msg_attach' => '',
'app_msg_template' => '',
'app_msg_status' => 'pending'
));
if ($spool->sendMail()) {
$dataRes['ABE_REQ_STATUS'] = 'SENT';
$message = 'The email was resend to: ' . $dataRes['ABE_REQ_SENT_TO'];
} else {
$dataRes['ABE_REQ_STATUS'] = 'ERROR';
$message = 'There was a problem sending the email to: ' . $dataRes['ABE_REQ_SENT_TO'] . ', please try later.';
}
try {
$abeRequestsInstance = new AbeRequests();
//.........这里部分代码省略.........
示例15: Publisher
$oCriteria->addAscendingOrderByColumn('TAS_TITLE');
global $G_PUBLISH;
$G_PUBLISH = new Publisher();
$G_PUBLISH->AddContent('propeltable', 'paged-table', 'tracker/tracker_StageTasks', $oCriteria, array('PRO_UID' => $oData->pro_uid, 'STG_UID' => $oData->stg_uid));
G::RenderPage('publish', 'raw');
break;
case 'availableTasksForTheStage':
require_once 'classes/model/Process.php';
require_once 'classes/model/Task.php';
$oCriteria = new Criteria('workflow');
$oCriteria->addSelectColumn(TaskPeer::TAS_UID);
$oCriteria->addAsColumn('TAS_TITLE', ContentPeer::CON_VALUE);
$aConditions = array();
$aConditions[] = array(0 => TaskPeer::TAS_UID, 1 => ContentPeer::CON_ID);
$aConditions[] = array(0 => ContentPeer::CON_CATEGORY, 1 => DBAdapter::getStringDelimiter() . 'TAS_TITLE' . DBAdapter::getStringDelimiter());
$aConditions[] = array(0 => ContentPeer::CON_LANG, 1 => DBAdapter::getStringDelimiter() . SYS_LANG . DBAdapter::getStringDelimiter());
$oCriteria->addJoinMC($aConditions, Criteria::LEFT_JOIN);
$oCriteria->add(TaskPeer::PRO_UID, $_POST['PRO_UID']);
$oCriteria->add(TaskPeer::STG_UID, '');
$oCriteria->addAscendingOrderByColumn('TAS_TITLE');
global $G_PUBLISH;
$G_PUBLISH = new Publisher();
$G_PUBLISH->AddContent('propeltable', 'paged-table', 'tracker/tracker_AvailableStageTasks', $oCriteria, array('STG_UID' => $_POST['STG_UID']));
G::RenderPage('publish', 'raw');
break;
case 'assignTaskToStage':
require_once 'classes/model/Task.php';
$oCriteria1 = new Criteria('workflow');
$oCriteria1->add(TaskPeer::TAS_UID, $_POST['TAS_UID']);
$oCriteria2 = new Criteria('workflow');
$oCriteria2->add(TaskPeer::STG_UID, $_POST['STG_UID']);