table_common_seccheck.php
1.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<?php
/**
* [Discuz!] (C)2001-2099 Comsenz Inc.
* This is NOT a freeware, use is subject to license terms
*
* $Id: table_common_seccheck.php 33625 2013-07-19 06:03:49Z nemohou $
*/
if(!defined('IN_DISCUZ')) {
exit('Access Denied');
}
class table_common_seccheck extends discuz_table
{
private $_uids = array();
public function __construct() {
$this->_table = 'common_seccheck';
$this->_pk = 'ssid';
parent::__construct();
}
public function delete_expiration($ssid = 0) {
if($ssid) {
$ssid = dintval($ssid);
DB::delete($this->_table, "ssid='$ssid'");
}
DB::delete($this->_table, TIMESTAMP."-dateline>600");
DB::delete($this->_table, "verified>4");
DB::delete($this->_table, "succeed>1");
}
public function update_verified($ssid) {
DB::query("UPDATE %t SET verified=verified+1 WHERE ssid=%d", array($this->_table, $ssid));
}
public function update_succeed($ssid) {
DB::query("UPDATE %t SET verified=verified+1,succeed=succeed+1 WHERE ssid=%d", array($this->_table, $ssid));
}
public function truncate() {
DB::query("TRUNCATE %t", array($this->_table));
}
}
?>