From af845190bd26c5a24a5a2eae2c3fd20b95dc1793 Mon Sep 17 00:00:00 2001 From: wlx Date: Sat, 14 Mar 2009 07:01:11 +0000 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E4=B8=8B=E8=BD=BD=E8=AE=A1?= =?UTF-8?q?=E6=95=B0=E5=99=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/default/controllers/DataController.php | 2 +- application/models/G6ftp.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/application/default/controllers/DataController.php b/application/default/controllers/DataController.php index 1bae8c02..091edb83 100755 --- a/application/default/controllers/DataController.php +++ b/application/default/controllers/DataController.php @@ -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); diff --git a/application/models/G6ftp.php b/application/models/G6ftp.php index c589a14e..7c646f2b 100644 --- a/application/models/G6ftp.php +++ b/application/models/G6ftp.php @@ -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));