in['path'])){ show_tips(LNG('explorer.share.errorParam')); } $this->checkAccessToken(); $this->setIdentify(); } private function setIdentify(){ if(!Session::get('accessPlugin')){ Session::set('accessPlugin', 'ok'); } } public function checkAccessToken(){ $config = Model('Plugin')->getConfig('fileView'); if(!$config || !$config['apiKey']){ show_tips('fileView not open ,or apiKey is empty!'); } $timeTo = isset($this->in['timeTo'])?intval($this->in['timeTo']):''; $token = md5($this->in['path'].$timeTo.$config['apiKey']); if($token != $this->in['token']){ show_tips('token ' . LNG('common.error')); } if($timeTo != '' && $timeTo <= time()){ show_tips('token ' . LNG('common.expired')); } } }