本文整理汇总了PHP中DataGrid::get方法的典型用法代码示例。如果您正苦于以下问题:PHP DataGrid::get方法的具体用法?PHP DataGrid::get怎么用?PHP DataGrid::get使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DataGrid
的用法示例。
在下文中一共展示了DataGrid::get方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: listByView
private function listByView($errMessage = '')
{
/* First, if we are operating in HR mode we will never see the
companies pager. Immediantly forward to My Company. */
if ($_SESSION['CATS']->isHrMode()) {
$this->internalPostings();
die;
}
$dataGridProperties = DataGrid::getRecentParamaters("companies:CompaniesListByViewDataGrid");
/* If this is the first time we visited the datagrid this session, the recent paramaters will
* be empty. Fill in some default values. */
if ($dataGridProperties == array()) {
$dataGridProperties = array('rangeStart' => 0, 'maxResults' => 15, 'filterVisible' => false);
}
$dataGrid = DataGrid::get("companies:CompaniesListByViewDataGrid", $dataGridProperties);
$this->_template->assign('active', $this);
$this->_template->assign('dataGrid', $dataGrid);
$this->_template->assign('userID', $_SESSION['CATS']->getUserID());
$this->_template->assign('errMessage', $errMessage);
if (!eval(Hooks::get('CLIENTS_LIST_BY_VIEW'))) {
return;
}
$this->_template->display('./modules/companies/Companies.tpl');
}
示例2: showList
public function showList()
{
/* Bail out if we don't have a valid candidate ID. */
if (!$this->isRequiredIDValid('savedListID', $_GET))
{
CommonErrors::fatalModal(COMMONERROR_BADINDEX, $this);
return;
//$this->fatalModal('Invalid saved list ID.');
}
//$dateAvailable = $this->getTrimmedInput('dateAvailable', $_POST);
$savedListID = $_GET['savedListID'];
$savedLists = new SavedLists($this->_siteID);
$listRS = $savedLists->get($savedListID);
if ($listRS['isDynamic'] == 0)
{
// Handle each kind of static list here:
switch($listRS['dataItemType'])
{
case DATA_ITEM_CANDIDATE:
$dataGridInstance = 'candidates:candidatesSavedListByViewDataGrid';
break;
case DATA_ITEM_COMPANY:
$dataGridInstance = 'companies:companiesSavedListByViewDataGrid';
break;
case DATA_ITEM_CONTACT:
$dataGridInstance = 'contacts:contactSavedListByViewDataGrid';
break;
case DATA_ITEM_JOBORDER:
$dataGridInstance = 'joborders:joborderSavedListByViewDataGrid';
break;
}
}
$dataGridProperties = DataGrid::getRecentParamaters($dataGridInstance, $savedListID);
/* If this is the first time we visited the datagrid this session, the recent paramaters will
* be empty. Fill in some default values. */
if ($dataGridProperties == array())
{
$dataGridProperties = array('rangeStart' => 0,
'maxResults' => 15,
'filterVisible' => false,
'savedListStatic' => true);
}
/* Add an MRU entry. */
$_SESSION['CATS']->getMRU()->addEntry(
DATA_ITEM_LIST, $savedListID, $listRS['description']
);
$dataGrid = DataGrid::get($dataGridInstance, $dataGridProperties, $savedListID);
$this->_template->assign('active', $this);
$this->_template->assign('dataGrid', $dataGrid);
$this->_template->assign('listRS', $listRS);
$this->_template->assign('userID', $_SESSION['CATS']->getUserID());
$this->_template->display('./modules/lists/List.php');
}
示例3: listByView
private function listByView($errMessage = '')
{
if (!eval(Hooks::get('CONTACTS_LIST_BY_VIEW_TOP'))) {
return;
}
$dataGridProperties = DataGrid::getRecentParamaters("contacts:ContactsListByViewDataGrid");
/* If this is the first time we visited the datagrid this session, the recent paramaters will
* be empty. Fill in some default values. */
if ($dataGridProperties == array()) {
$dataGridProperties = array('rangeStart' => 0, 'maxResults' => 15, 'filterVisible' => false);
}
$dataGrid = DataGrid::get("contacts:ContactsListByViewDataGrid", $dataGridProperties);
$this->_template->assign('active', $this);
$this->_template->assign('dataGrid', $dataGrid);
$this->_template->assign('userID', $_SESSION['CATS']->getUserID());
$this->_template->assign('errMessage', $errMessage);
$contacts = new Contacts($this->_siteID);
$this->_template->assign('totalContacts', $contacts->getCount());
if (!eval(Hooks::get('CONTACTS_LIST_BY_VIEW'))) {
return;
}
$this->_template->display('./modules/contacts/Contacts.tpl');
}
示例4: listByView
private function listByView($errMessage = '')
{
$dataGridProperties = DataGrid::getRecentParamaters("joborders:JobOrdersListByViewDataGrid");
/* If this is the first time we visited the datagrid this session, the recent paramaters will
* be empty. Fill in some default values. */
if ($dataGridProperties == array()) {
$dataGridProperties = array('rangeStart' => 0, 'maxResults' => 50, 'filter' => 'Status==Active / OnHold / Full', 'filterVisible' => false);
}
$dataGrid = DataGrid::get("joborders:JobOrdersListByViewDataGrid", $dataGridProperties);
$this->_template->assign('active', $this);
$this->_template->assign('dataGrid', $dataGrid);
$this->_template->assign('userID', $_SESSION['CATS']->getUserID());
$this->_template->assign('errMessage', $errMessage);
if (!eval(Hooks::get('JO_LIST_BY_VIEW'))) {
return;
}
$jl = new JobOrders($this->_siteID);
$this->_template->assign('totalJobOrders', $jl->getCount());
$this->_template->display('./modules/joborders/JobOrders.tpl');
}
示例5: onSearch
public function onSearch()
{
$periodString = $this->getTrimmedInput('period', $_GET);
if (!empty($periodString) &&
in_array($periodString, array('lastweek', 'lastmonth', 'lastsixmonths', 'lastyear', 'all')))
{
/* formats start and end date for searching */
switch ($periodString)
{
case 'lastweek':
$period = 'DATE_SUB(CURDATE(), INTERVAL 1 WEEK)';
break;
case 'lastmonth':
$period = 'DATE_SUB(CURDATE(), INTERVAL 1 MONTH)';
break;
case 'lastsixmonths':
$period = 'DATE_SUB(CURDATE(), INTERVAL 6 MONTH)';
break;
case 'lastyear':
$period = 'DATE_SUB(CURDATE(), INTERVAL 1 YEAR)';
break;
case 'all':
default:
$period = '';
break;
}
$startDate = '';
$endDate = '';
$startDateURLString = '';
$endDateURLString = '';
}
else
{
/* Do we have a valid starting date? */
if (!$this->isRequiredIDValid('startDay', $_GET) ||
!$this->isRequiredIDValid('startMonth', $_GET) ||
!$this->isRequiredIDValid('startYear', $_GET))
{
CommonErrors::fatal(COMMONERROR_BADFIELDS, $this, 'Invalid starting date.');
}
/* Do we have a valid ending date? */
if (!$this->isRequiredIDValid('endDay', $_GET) ||
!$this->isRequiredIDValid('endMonth', $_GET) ||
!$this->isRequiredIDValid('endYear', $_GET))
{
CommonErrors::fatal(COMMONERROR_BADFIELDS, $this, 'Invalid ending date.');
}
if (!checkdate($_GET['startMonth'], $_GET['startDay'], $_GET['startYear']))
{
CommonErrors::fatal(COMMONERROR_BADFIELDS, $this, 'Invalid starting date.');
}
if (!checkdate($_GET['endMonth'], $_GET['endDay'], $_GET['endYear']))
{
CommonErrors::fatal(COMMONERROR_BADFIELDS, $this, 'Invalid ending date.');
}
/* formats start and end date for searching */
$startDate = DateUtility::formatSearchDate(
$_GET['startMonth'], $_GET['startDay'], $_GET['startYear']
);
$endDate = DateUtility::formatSearchDate(
$_GET['endMonth'], $_GET['endDay']+1, $_GET['endYear']
);
$startDateURLString = sprintf(
'&startMonth=%s&startDay=%s&startYear=%s',
$_GET['startMonth'],
$_GET['startDay'],
$_GET['startYear']
);
$endDateURLString = sprintf(
'&endMonth=%s&endDay=%s&endYear=%s',
$_GET['endMonth'],
$_GET['endDay'],
$_GET['endYear']
);
$period = '';
}
$baseURL = sprintf(
'm=activity&a=viewByDate&getback=getback%s%s',
$startDateURLString, $endDateURLString
);
$dataGridProperties = DataGrid::getRecentParamaters("activity:ActivityDataGrid");
/* If this is the first time we visited the datagrid this session, the recent paramaters will
* be empty. Fill in some default values. */
if ($dataGridProperties == array())
//.........这里部分代码省略.........
示例6: SecureAJAXInterface
* The Original Code is "CATS Standard Edition".
*
* The Initial Developer of the Original Code is Cognizo Technologies, Inc.
* Portions created by the Initial Developer are Copyright (C) 2005 - 2007
* (or from the year in which this file was created to the year 2007) by
* Cognizo Technologies, Inc. All Rights Reserved.
*
*
* $Id: getDataGridPager.php 3078 2007-09-21 20:25:28Z will $
*/
include_once './lib/CATSUtility.php';
include_once './lib/TemplateUtility.php';
include_once './lib/DataGrid.php';
$interface = new SecureAJAXInterface();
if (!isset($_REQUEST['p']) || !isset($_REQUEST['i'])) {
$interface->outputXMLErrorPage(-1, 'Invalid input.');
die;
}
$indentifier = $_REQUEST['i'];
$parameters = unserialize($_REQUEST['p']);
/* Handle dynamicArgument if it is set. */
if (isset($_REQUEST['dynamicArgument'])) {
foreach ($parameters as $index => $data) {
if ($data === '<dynamic>') {
$parameters[$index] = $_REQUEST['dynamicArgument'];
}
}
}
$dataGrid = DataGrid::get($indentifier, $parameters);
$dataGrid->draw(true);
$dataGrid->drawUpdatedNavigation(true);
示例7: listByView
private function listByView($errMessage = '')
{
// Log message that shows up on the top of the list page
$topLog = '';
$dataGridProperties = DataGrid::getRecentParamaters("candidates:candidatesListByViewDataGrid");
/* If this is the first time we visited the datagrid this session, the recent paramaters will
* be empty. Fill in some default values. */
if ($dataGridProperties == array()) {
$dataGridProperties = array('rangeStart' => 0, 'maxResults' => 15, 'filterVisible' => false);
}
$dataGrid = DataGrid::get("candidates:candidatesListByViewDataGrid", $dataGridProperties);
$candidates = new Candidates($this->_siteID);
$this->_template->assign('totalCandidates', $candidates->getCount());
$this->_template->assign('active', $this);
$this->_template->assign('dataGrid', $dataGrid);
$this->_template->assign('userID', $_SESSION['CATS']->getUserID());
$this->_template->assign('errMessage', $errMessage);
$this->_template->assign('topLog', $topLog);
if (!eval(Hooks::get('CANDIDATE_LIST_BY_VIEW'))) {
return;
}
$this->_template->display('./modules/candidates/Candidates.tpl');
}
示例8: home
public function home()
{
if (!eval(Hooks::get('HOME'))) return;
NewVersionCheck::getNews();
$dashboard = new Dashboard($this->_siteID);
$placedRS = $dashboard->getPlacements();
$calendar = new Calendar($this->_siteID);
$upcomingEventsHTML = $calendar->getUpcomingEventsHTML(7, UPCOMING_FOR_DASHBOARD);
$calendar = new Calendar($this->_siteID);
$upcomingEventsFupHTML = $calendar->getUpcomingEventsHTML(7, UPCOMING_FOR_DASHBOARD_FUP);
/* Important cand datagrid */
$dataGridProperties = array(
'rangeStart' => 0,
'maxResults' => 15,
'filterVisible' => false
);
$dataGrid = DataGrid::get("home:ImportantPipelineDashboard", $dataGridProperties);
$this->_template->assign('dataGrid', $dataGrid);
$dataGridProperties = array(
'rangeStart' => 0,
'maxResults' => 15,
'filterVisible' => false
);
/* Only show a month of activities. */
$dataGridProperties['startDate'] = '';
$dataGridProperties['endDate'] = '';
$dataGridProperties['period'] = 'DATE_SUB(CURDATE(), INTERVAL 1 MONTH)';
$dataGrid2 = DataGrid::get("home:CallsDataGrid", $dataGridProperties);
$this->_template->assign('dataGrid2', $dataGrid2);
$this->_template->assign('active', $this);
$this->_template->assign('placedRS', $placedRS);
$this->_template->assign('upcomingEventsHTML', $upcomingEventsHTML);
$this->_template->assign('upcomingEventsFupHTML', $upcomingEventsFupHTML);
$this->_template->assign('wildCardQuickSearch', '');
$this->_template->display('./modules/home/home.php');
}