mirror of
https://e.coding.net/circlecloud/McAccount.git
synced 2025-12-25 02:26:25 +00:00
init project...
This commit is contained in:
34
Model/mail_model.php
Normal file
34
Model/mail_model.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
class mail_model extends AmysqlModel {
|
||||
public function select($where) {
|
||||
$sql = "SELECT password, email
|
||||
FROM `authme`
|
||||
WHERE `username` = '" . $where . "'
|
||||
LIMIT 0 , 75";
|
||||
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 . "'
|
||||
LIMIT 0 , 75";
|
||||
return $this->_all ( $sql );
|
||||
}
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user