本文整理汇总了PHP中settings::getMySQLDateFormat方法的典型用法代码示例。如果您正苦于以下问题:PHP settings::getMySQLDateFormat方法的具体用法?PHP settings::getMySQLDateFormat怎么用?PHP settings::getMySQLDateFormat使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类settings
的用法示例。
在下文中一共展示了settings::getMySQLDateFormat方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: listAction
public function listAction()
{
$NS = new Zend_Session_Namespace('Default');
$arrSort = array();
$params = array();
$page = $this->getRequest()->getParam('page');
$sort = $this->getRequest()->getParam('sort');
if (!empty($sort)) {
$arrSort[] = $this->SortingData($sort);
$arrSort[] = $sort;
}
$page = !empty($page) && is_numeric($page) ? $page : 1;
$params['search'][] = array('method' => 'andWhere', 'criteria' => "(c.customer_id = ? OR c.parent_id = ?)", 'value' => array($NS->customer['customer_id'], $NS->customer['customer_id']));
// $params['search'][] = array ('method' => 'whereIn', 'criteria' => "o.status_id", 'value' => array(Statuses::id('paid', 'orders'), Statuses::id('complete', 'orders')));
$data = $this->services->findAll("d.order_id, oid.relationship_id, d.description, CONCAT(dm.domain, '.', ws.tld) as domain, s.status as Status, DATE_FORMAT(d.date_start, '" . settings::getMySQLDateFormat() . "') as Creation_Date, DATEDIFF(d.date_end, CURRENT_DATE) as daysleft, DATE_FORMAT(d.date_end, '" . settings::getMySQLDateFormat() . "') as Expiring_Date, d.product_id", $page, $NS->recordsperpage, $arrSort, $params);
$data['currentpage'] = $page;
for ($i = 0; $i < count($data['records']); $i++) {
$data['records'][$i]['description'] = Shineisp_Commons_Utilities::truncate($data['records'][$i]['description'], 40);
$data['records'][$i]['daysleft'] = $data['records'][$i]['daysleft'] < 30 ? "<span class='label label-danger'>" . $data['records'][$i]['daysleft'] . "</span>" : "<span class='label label-success'>" . $data['records'][$i]['daysleft'] . "</span>";
}
$data['columns'][] = $this->translator->translate('Description');
$data['columns'][] = $this->translator->translate('Domain');
$data['columns'][] = $this->translator->translate('Status');
$data['columns'][] = $this->translator->translate('Creation Date');
$data['columns'][] = $this->translator->translate('Days left');
$data['columns'][] = $this->translator->translate('Expiry Date');
$this->view->mex = $this->getRequest()->getParam('mex');
$this->view->mexstatus = $this->getRequest()->getParam('status');
$this->view->title = $this->translator->translate("Services List");
$this->view->description = $this->translator->translate("List of all your own services subscribed");
$this->view->service = $data;
}