mirror of
https://e.coding.net/circlecloud/McAccount.git
synced 2024-11-17 00:58:57 +00:00
ec7a26a582
Signed-off-by: 502647092 <jtb1@163.com>
28 lines
707 B
PHP
28 lines
707 B
PHP
<?php
|
|
class mail_model extends AmysqlModel {
|
|
public function select($where) {
|
|
$sql = "SELECT email FROM `authme` WHERE `username` = '" . $where . "'";
|
|
return $this->_all ( $sql );
|
|
}
|
|
public function mail($mail, $verify, $user) {
|
|
$data = array (
|
|
"address" => $mail,
|
|
"verify" => $verify,
|
|
"statu" => '1',
|
|
"time" => date ( "Y-m-d" )
|
|
);
|
|
// var_dump($data);
|
|
$num = $this->_update ( 'mail', $data, "WHERE user='" . $user . "'" );
|
|
// var_dump($num);
|
|
if ($num == 0) {
|
|
return false;
|
|
} else {
|
|
return true;
|
|
}
|
|
}
|
|
public function status($user) {
|
|
$sql = "SELECT * FROM `mail` WHERE `user` = '" . $user . "'";
|
|
return $this->_all ( $sql );
|
|
}
|
|
}
|
|
?>
|