2015-10-13 06:26:47 +00:00
|
|
|
<?php
|
|
|
|
class mail_model extends AmysqlModel {
|
|
|
|
public function select($where) {
|
2015-10-14 13:07:36 +00:00
|
|
|
$sql = "SELECT email FROM `authme` WHERE `username` = '" . $where . "'";
|
2015-10-13 06:26:47 +00:00
|
|
|
return $this->_all ( $sql );
|
|
|
|
}
|
2015-11-01 14:29:21 +00:00
|
|
|
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);
|
2015-11-01 14:29:21 +00:00
|
|
|
return $this->_update ( 'mail', $data, "WHERE user='" . $user . "'" ) != 0;
|
2015-10-13 06:26:47 +00:00
|
|
|
}
|
|
|
|
public function status($user) {
|
2015-10-14 13:07:36 +00:00
|
|
|
$sql = "SELECT * FROM `mail` WHERE `user` = '" . $user . "'";
|
2015-10-13 06:26:47 +00:00
|
|
|
return $this->_all ( $sql );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
?>
|