本文整理汇总了PHP中UsersPeer::DoSelectRs方法的典型用法代码示例。如果您正苦于以下问题:PHP UsersPeer::DoSelectRs方法的具体用法?PHP UsersPeer::DoSelectRs怎么用?PHP UsersPeer::DoSelectRs使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UsersPeer
的用法示例。
在下文中一共展示了UsersPeer::DoSelectRs方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: strtolower
$sDataBase = 'database_' . strtolower(DB_ADAPTER);
if (G::LoadSystemExist($sDataBase)) {
G::LoadSystem($sDataBase);
$oDataBase = new database();
$oCriteria->addAsColumn('USR_COMPLETENAME', $oDataBase->concatString("USR_LASTNAME", "' '", "USR_FIRSTNAME"));
//$oCriteria->addAsColumn('USR_PHOTO', $oDataBase->concatString("'".PATH_IMAGES_ENVIRONMENT_USERS."'", "USR_UID","'.gif'"));
}
$oCriteria->addSelectColumn(UsersPeer::USR_USERNAME);
$oCriteria->addSelectColumn(UsersPeer::USR_EMAIL);
$oCriteria->addSelectColumn(UsersPeer::USR_ROLE);
$oCriteria->addSelectColumn(UsersPeer::USR_DUE_DATE);
//$oCriteria->addAsColumn('USR_VIEW', $sDelimiter . G::LoadTranslation('ID_DETAIL') . $sDelimiter);
//$oCriteria->addAsColumn('USR_EDIT', $sDelimiter . G::LoadTranslation('ID_EDIT') . $sDelimiter);
//$oCriteria->addAsColumn('USR_DELETE', $sDelimiter . G::LoadTranslation('ID_DELETE') . $sDelimiter);
//$oCriteria->addAsColumn('USR_AUTH', $sDelimiter . G::LoadTranslation('ID_AUTHENTICATION') . $sDelimiter);
//$oCriteria->addAsColumn('USR_REASSIGN', $sDelimiter . G::LoadTranslation('ID_REASSIGN_CASES') . $sDelimiter);
$oCriteria->add(UsersPeer::USR_STATUS, array('CLOSED'), Criteria::NOT_IN);
if ($filter != '') {
$cc = $oCriteria->getNewCriterion(UsersPeer::USR_USERNAME, '%' . $filter . '%', Criteria::LIKE)->addOr($oCriteria->getNewCriterion(UsersPeer::USR_FIRSTNAME, '%' . $filter . '%', Criteria::LIKE)->addOr($oCriteria->getNewCriterion(UsersPeer::USR_LASTNAME, '%' . $filter . '%', Criteria::LIKE)));
$oCriteria->add($cc);
//echo $oCriteria->toString();
}
$rs = UsersPeer::DoSelectRs($oCriteria);
$rs->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$rows = array();
while ($rs->next()) {
$rows[] = $rs->getRow();
// if (!file_exists($aux['USR_PHOTO'])) $aux['USR_PHOTO'] = 'public_html/images/user.gif';
// $rows[] = $aux;
}
echo '{users: ' . G::json_encode($rows) . '}';
示例2: switch
*
*/
try {
global $RBAC;
if ($RBAC->userCanAccess('PM_SETUP_ADVANCE') != 1) {
G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels');
G::header('location: ../login/login');
die;
}
switch ($_REQUEST['action']) {
case 'searchUsers':
require_once 'classes/model/Users.php';
$criteria = new Criteria('workflow');
$criteria->addSelectColumn(UsersPeer::USR_USERNAME);
$criteria->add(UsersPeer::USR_STATUS, array('CLOSED'), Criteria::NOT_IN);
$dataset = UsersPeer::DoSelectRs($criteria);
$dataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$dataset->next();
$pmUsers = array();
while ($row = $dataset->getRow()) {
$pmUsers[] = $row['USR_USERNAME'];
$dataset->next();
}
$aFields = $RBAC->getAuthSource($_POST['sUID']);
G::LoadThirdParty('pear/json', 'class.json');
$oJSON = new Services_JSON();
$i = 0;
$oUser = new Users();
$aAux = $RBAC->searchUsers($_POST['sUID'], $_POST['sKeyword']);
$aUsers = array();
// note added by gustavo cruz gustavo-at-colosa.com
示例3: array
$oDataset->next();
$uUIDs = array();
while ($aRow = $oDataset->getRow()) {
$uUIDs[] = $aRow['USR_UID'];
$oDataset->next();
}
$aUsers = array();
$oCriteria = new Criteria('workflow');
$oCriteria->addSelectColumn('COUNT(*) AS CNT');
$oCriteria->add(UsersPeer::USR_STATUS, 'CLOSED', Criteria::NOT_EQUAL);
$oCriteria->add(UsersPeer::USR_UID, $uUIDs, Criteria::NOT_IN);
$filter = isset($_POST['textFilter']) ? $_POST['textFilter'] : '';
if ($filter != '') {
$oCriteria->add($oCriteria->getNewCriterion(UsersPeer::USR_USERNAME, '%' . $filter . '%', Criteria::LIKE)->addOr($oCriteria->getNewCriterion(UsersPeer::USR_FIRSTNAME, '%' . $filter . '%', Criteria::LIKE)->addOr($oCriteria->getNewCriterion(UsersPeer::USR_LASTNAME, '%' . $filter . '%', Criteria::LIKE))));
}
$oDataset = UsersPeer::DoSelectRs($oCriteria);
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$oDataset->next();
$row = $oDataset->getRow();
$totalRows = $row['CNT'];
$oCriteria = new Criteria('workflow');
$oCriteria->addSelectColumn(UsersPeer::USR_UID);
$oCriteria->addSelectColumn(UsersPeer::USR_USERNAME);
$oCriteria->addSelectColumn(UsersPeer::USR_FIRSTNAME);
$oCriteria->addSelectColumn(UsersPeer::USR_LASTNAME);
$oCriteria->addSelectColumn(UsersPeer::USR_EMAIL);
$oCriteria->addSelectColumn(UsersPeer::USR_STATUS);
$oCriteria->add(UsersPeer::USR_STATUS, 'CLOSED', Criteria::NOT_EQUAL);
$oCriteria->add(UsersPeer::USR_UID, $uUIDs, Criteria::NOT_IN);
$filter = isset($_POST['textFilter']) ? $_POST['textFilter'] : '';
if ($filter != '') {