本文整理汇总了PHP中Tool::getDate方法的典型用法代码示例。如果您正苦于以下问题:PHP Tool::getDate方法的具体用法?PHP Tool::getDate怎么用?PHP Tool::getDate使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Tool
的用法示例。
在下文中一共展示了Tool::getDate方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: setLoginDetails
public function setLoginDetails()
{
$where = array("user='{$this->R['user']}'");
$updateData['login_count'] = array('login_count+1');
$updateData['last_ip'] = Tool::getIP();
$updateData['last_time'] = Tool::getDate();
parent::update($where, $updateData);
}
示例2: countLogin
public function countLogin()
{
$_where = array("user='{$this->_R['user']}'");
$_updateData['login_count'] = array('login_count+1');
$_updateData['last_ip'] = Tool::getIP();
$_updateData['last_time'] = Tool::getDate();
parent::update($_where, $_updateData);
}
示例3: add
public function add()
{
//$_where = array("name='{$this->_R['name']}'");
//if (!$this->_check->addCheck($this, $_where)) $this->_check->error();
$_addData = $this->getRequest()->filter($this->_fields);
$_addData['user'] = $_COOKIE['user'];
$_addData['date'] = Tool::getDate();
return parent::add($_addData);
}
示例4: add
public function add()
{
$where = array("name='{$this->R['name']}'");
if (!$this->check->checkAdd($this, $where)) {
$this->check->showError();
}
$addData = $this->getRequest()->filter($this->fields);
$addData['reg_time'] = Tool::getDate();
return parent::add($addData);
}
示例5: add
public function add()
{
$_where = array("name='{$this->_R['name']}'");
if (!$this->_check->addCheck($this, $_where)) {
$this->_check->error();
}
$_addData = $this->getRequest()->filter($this->_fields);
$_addData['reg_time'] = Tool::getDate();
return parent::add($_addData);
}
示例6: frontReg
public function frontReg()
{
$_where = array("user='{$this->_R['user']}'");
if (!$this->_check->regCheck($this, $_where)) {
$this->_check->error();
}
$_addData = $this->getRequest()->filter($this->_fields);
$_addData['pass'] = sha1($_addData['pass']);
$_addData['date'] = Tool::getDate();
return parent::add($_addData);
}
示例7: runAdd
public function runAdd()
{
$where = array("goods_id='{$this->R['id']}'", "user='{$_COOKIE['user']}'");
if (!$this->check->checkAdd($this, $where)) {
$this->check->showError();
}
$addData = $this->getRequest()->filter($this->fields);
$addData['user'] = $_COOKIE['user'];
$addData['goods_id'] = $this->R['id'];
$addData['date'] = Tool::getDate();
return parent::add($addData);
}
示例8: update
public function update()
{
$where = array("id='{$this->R['id']}'");
if (!$this->check->checkOne($this, $where)) {
$this->check->showError();
}
if (!$this->check->checkUpdate()) {
$this->check->showError();
}
$updateData = $this->getRequest()->filter($this->fields);
$updateData['re_date'] = Tool::getDate();
return parent::update($where, $updateData);
}
示例9: add
public function add()
{
$_where = array("name='{$this->_R['name']}'");
if (!$this->_check->addCheck($this, $_where)) {
$this->_check->error();
}
if ($this->_R['first'] == 1) {
$_where2 = array("first=1");
$_updateData['first'] = 0;
parent::update($_where2, $_updateData);
}
$_addData = $this->getRequest()->filter($this->_fields);
$_addData['date'] = Tool::getDate();
return parent::add($_addData);
}
示例10: add
public function add()
{
$where = array("name='{$this->R['name']}'");
if (!$this->check->checkAdd($this, $where)) {
$this->check->showError();
}
$addData = $this->getRequest()->filter($this->fields);
$addData['date'] = Tool::getDate();
$attr = '';
if ($addData['attr']) {
foreach ($addData['attr'] as $key => $value) {
$attr .= $key . ':';
foreach ($value as $v) {
$attr .= $v . '|';
}
$attr = substr($attr, 0, '-1') . ';';
}
$addData['attr'] = substr($attr, 0, -1);
}
return parent::add($addData);
}
示例11: setLoginDetails
public function setLoginDetails($userid)
{
$where = array("user='{$this->R['user']}'");
if (isset($_POST['keep'])) {
setcookie('user', $this->R['user'], time() + 604800);
setcookie('userid', $userid, time() + 604800);
} else {
setcookie('user', $this->R['user']);
setcookie('userid', $userid);
}
$updateData['last_ip'] = Tool::getIP();
$updateData['login_time'] = Tool::getDate();
parent::update($where, $updateData);
}
示例12: add
public function add()
{
$_where = array("sn='{$this->_R['sn']}'");
if (!$this->_check->addCheck($this, $_where)) {
$this->_check->error();
}
$_addData = $this->getRequest()->filter($this->_fields);
$_addData['date'] = Tool::getDate();
$_attr = '';
foreach ($_addData['attr'] as $_key => $_value) {
$_attr .= $_key . ':';
foreach ($_value as $_v) {
$_attr .= $_v . '|';
}
$_attr = substr($_attr, 0, -1) . ';';
}
$_attr = substr($_attr, 0, -1);
$_addData['attr'] = $_attr;
return parent::add($_addData);
}
示例13: record
public function record()
{
$_where = array("id='{$this->_R['id']}'");
$_goods = array();
$_obj = parent::select(array('goods'), array('where' => $_where));
$_goods = unserialize(htmlspecialchars_decode($_obj[0]->goods));
$this->_tables = array(DB_PREFIX . 'record');
foreach ($_goods as $_key => $_value) {
$_temp = unserialize($_value);
$_addData['goods_id'] = $_temp['id'];
$_addData['name'] = $_temp['name'];
$_addData['num'] = $_temp['num'];
$_addData['price'] = $_temp['price_sale'];
$_addData['attr'] = '';
foreach ($_temp['attr'] as $_key2 => $_value2) {
$_addData['attr'] .= $_key2 . ':';
foreach ($_value2 as $_key3 => $_value3) {
$_addData['attr'] .= $_value3 . ',';
}
}
$_addData['attr'] = substr($_addData['attr'], 0, -1) . ';';
$_addData['user'] = $this->_R['user'];
$_addData['date'] = Tool::getDate();
parent::add($_addData);
}
$this->_tables = array(DB_PREFIX . 'order');
}