本文整理汇总了PHP中MG::dateConvert方法的典型用法代码示例。如果您正苦于以下问题:PHP MG::dateConvert方法的具体用法?PHP MG::dateConvert怎么用?PHP MG::dateConvert使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MG
的用法示例。
在下文中一共展示了MG::dateConvert方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: saveOrder
/**
* Сохраняет и обновляет параметры заказа.
* @return type
*/
public function saveOrder()
{
$this->messageSucces = $this->lang['ACT_SAVE_ORD'];
$this->messageError = $this->lang['ACT_SAVE_ORDER'];
if (count($_POST['order_content']) != $_POST['orderPositionCount']) {
$this->messageError = 'Невозможно передать столь большой заказ на ваш сервер. Необходимо изменить настройки web-сервера!';
return false;
}
unset($_POST['orderPositionCount']);
// Cобираем воедино все параметры от юр. лица если они были переданы, для записи в информацию о заказе.
$_POST['yur_info'] = '';
$informUser = $_POST['inform_user'];
unset($_POST['inform_user']);
if (!empty($_POST['inn'])) {
$_POST['yur_info'] = array('email' => htmlspecialchars($_POST['orderEmail']), 'name' => htmlspecialchars($_POST['orderBuyer']), 'address' => htmlspecialchars($_POST['orderAddress']), 'phone' => htmlspecialchars($_POST['orderPhone']), 'inn' => htmlspecialchars($_POST['inn']), 'kpp' => htmlspecialchars($_POST['kpp']), 'nameyur' => htmlspecialchars($_POST['nameyur']), 'adress' => htmlspecialchars($_POST['adress']), 'bank' => htmlspecialchars($_POST['bank']), 'bik' => htmlspecialchars($_POST['bik']), 'ks' => htmlspecialchars($_POST['ks']), 'rs' => htmlspecialchars($_POST['rs']));
}
$model = new Models_Order();
// Обновление.
if (!empty($_POST['id'])) {
unset($_POST['inn']);
unset($_POST['kpp']);
unset($_POST['nameyur']);
unset($_POST['adress']);
unset($_POST['bank']);
unset($_POST['bik']);
unset($_POST['ks']);
unset($_POST['rs']);
unset($_POST['ogrn']);
if (!empty($_POST['yur_info'])) {
$_POST['yur_info'] = addslashes(serialize($_POST['yur_info']));
}
foreach ($_POST['order_content'] as &$item) {
foreach ($item as &$v) {
$v = rawurldecode($v);
}
}
$_POST['delivery_cost'] = MG::numberDeFormat($_POST['delivery_cost']);
$_POST['order_content'] = addslashes(serialize($_POST['order_content']));
$model->refreshCountAfterEdit($_POST['id'], $_POST['order_content']);
$model->updateOrder($_POST, $informUser);
} else {
$newUserData = array('email' => htmlspecialchars($_POST['user_email']), 'role' => 2, 'name' => htmlspecialchars($_POST['name_buyer']), 'pass' => crypt(time()), 'address' => htmlspecialchars($_POST['address']), 'phone' => htmlspecialchars($_POST['phone']), 'inn' => htmlspecialchars($_POST['inn']), 'kpp' => htmlspecialchars($_POST['kpp']), 'nameyur' => htmlspecialchars($_POST['nameyur']), 'adress' => htmlspecialchars($_POST['adress']), 'bank' => htmlspecialchars($_POST['bank']), 'bik' => htmlspecialchars($_POST['bik']), 'ks' => htmlspecialchars($_POST['ks']), 'rs' => htmlspecialchars($_POST['rs']));
if ($_POST['user_email'] != '') {
USER::add($newUserData);
}
$orderArray = $model->addOrder($_POST);
$id = $orderArray['id'];
$orderNumber = $orderArray['orderNumber'];
$this->messageSucces = $this->lang['ACT_SAVE_ORD'] . ' № ' . $orderNumber;
$_POST['id'] = $id;
$_POST['newId'] = $id;
$_POST['number'] = $orderNumber;
$_POST['date'] = MG::dateConvert(date('d.m.Y H:i'));
}
$_POST['count'] = $model->getNewOrdersCount();
$_POST['date'] = MG::dateConvert(date('d.m.Y H:i'));
$this->data = $_POST;
return true;
}
示例2: strtotime
<tr class="" order_id="<?php
echo $order['id'];
?>
" >
<td class="check-align"><input type="checkbox" name="order-check"></td>
<td > <?php
echo $order['id'];
?>
</td>
<td > <?php
echo $order['number'] != '' ? $order['number'] : $order['id'];
?>
</td>
<td class="add_date"> <?php
echo MG::dateConvert(date('d.m.Y H:i', strtotime($order['add_date']))) . ' г. в ' . date('H:i', strtotime($order['add_date']));
?>
</td>
<td > <?php
echo $order['name_buyer'];
?>
</td>
<td > <?php
echo $order['user_email'];
?>
</td>
<td > <?php
echo $assocDelivery[$order['delivery_id']];
?>
</td>
<td ><span class="icon-payment-<?php
示例3: trim
</tr>
<tr>
<td class="nowrap">Сч. №</td>
<td><?php
echo $data['propertyOrder']['ks'];
?>
</td>
</tr>
</table>
<h1 class="title">
Счет <strong>№ <?php
echo $data['propertyOrder']['prefix'] . $data['order']['number'] != '' ? $data['order']['number'] : $data['order']['id'];
?>
</strong>
от <?php
echo MG::dateConvert($data['order']['add_date'], true);
?>
г.
</h1>
<table class="who-pay">
<tr>
<td class="name" width="100">Плательщик:</td>
<td width="760"><?php
echo trim(trim($data['customerInfo'], ' '), ',');
?>
</td>
</tr>
</table>
<br />
<br />
<table class="form-table">