mirror of
https://e.coding.net/circlecloud/McAccount.git
synced 2024-11-23 01:58:54 +00:00
21 lines
599 B
PHP
21 lines
599 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, $user) {
|
|
$data = array (
|
|
"address" => $mail,
|
|
"statu" => '1',
|
|
"time" => date ( "Y-m-d" )
|
|
);
|
|
// var_dump($data);
|
|
return $this->_update ( 'mail', $data, "WHERE user='" . $user . "'" ) != 0;
|
|
}
|
|
public function status($user) {
|
|
$sql = "SELECT * FROM `mail` WHERE `user` = '" . $user . "' and `statu` = 1";
|
|
return $this->_all ( $sql );
|
|
}
|
|
}
|
|
?>
|