1
0
mirror of https://e.coding.net/circlecloud/McAccount.git synced 2024-11-22 01:48:55 +00:00
McAccount/Model/mail_model.php

21 lines
583 B
PHP
Raw Normal View History

2015-10-13 06:26:47 +00:00
<?php
class mail_model extends AmysqlModel {
public function select($where) {
$sql = "SELECT email FROM `authme` WHERE `username` = '" . $where . "'";
2015-10-13 06:26:47 +00:00
return $this->_all ( $sql );
}
public function mail($mail, $user) {
2015-10-13 06:26:47 +00:00
$data = array (
"address" => $mail,
"statu" => '1',
"time" => date ( "Y-m-d" )
);
// var_dump($data);
return $this->_update ( 'mail', $data, "WHERE user='" . $user . "'" ) != 0;
2015-10-13 06:26:47 +00:00
}
public function status($user) {
$sql = "SELECT * FROM `mail` WHERE `user` = '" . $user . "'";
2015-10-13 06:26:47 +00:00
return $this->_all ( $sql );
}
}
?>