调整下载计数器
This commit is contained in:
parent
b2f3c1f3ec
commit
af845190bd
|
@ -562,7 +562,7 @@ class DataController extends Zend_Controller_Action
|
|||
$this->view->ftptime=date('Y-m-d H:i:s', strtotime('+1 week'));
|
||||
$sql=$this->db->quoteInto("select * from ftpuser where userid=?",$userid);
|
||||
$row=$this->db->fetchRow($sql);
|
||||
$datacount=$row['datacount']+1;
|
||||
$datacount=$row['datacount'];
|
||||
foreach ($rows as $row) {
|
||||
$url=$row['linkage'];
|
||||
$p=parse_url($url);
|
||||
|
|
|
@ -101,7 +101,7 @@ class G6ftp
|
|||
$sql="insert into ftpuser (userid,pwd,ts_created,ts_invalid,datacount) values(?,?,now(),?,1)";
|
||||
$this->db->query($sql,array($user->id,$user->password,$user->time));
|
||||
return true;
|
||||
} elseif (strtotime($u['ts_invalid'])<=time() or $u['datacount']<2) {
|
||||
} elseif (strtotime($u['ts_invalid'])<=time() or $u['datacount']<1) {
|
||||
//更新用户密码、数据地址和数据计数
|
||||
//数据地址覆盖原来的信息
|
||||
$sql=$this->db->quoteInto("update g6ftpusersettings set configvalue=? where configname='Password' and userid=".$userid,strtoupper('MD5:'.md5($user->password)));
|
||||
|
@ -123,7 +123,7 @@ class G6ftp
|
|||
$sql=$this->db->quoteInto("update g6ftpusersettings set configvalue=configvalue||'\n'||? where configname='AccessList' and userid=".$userid,$this->getuserpath1($user->path));
|
||||
$this->db->query($sql);
|
||||
$sql="update ftpuser set ts_invalid=?,datacount=? where userid=?";
|
||||
$this->db->query($sql,array($user->time,$user->datacount,$user->id));
|
||||
$this->db->query($sql,array($user->time,$user->datacount+1,$user->id));
|
||||
} else {
|
||||
$sql="select pwd,ts_invalid from ftpuser where userid=?";
|
||||
$u=$this->db->fetchRow($sql,array($user->id));
|
||||
|
|
Loading…
Reference in New Issue