db = $db; } //检查前台用户对某条数据的权限 function checkAuthor($uuid,$uid=0) { if(empty($uid)) { $auth = Zend_Auth::getInstance(); if($auth->hasIdentity()) { $user = $auth->getIdentity(); $uid = $user->id; } } if(!empty($uid)) { $sql = "SELECT * FROM ".$this->tbl_author." WHERE uuid='$uuid' AND userid=$uid"; }else{ return false; } $rs = $this->db->query($sql); $row = $rs->fetch(PDO::FETCH_BOTH); if($row['status']>0) { return true; }else{ return false; } } }