コード例 #1
0
ファイル: categories.php プロジェクト: SongPhi/spdownload
 public function __construct()
 {
     $checkpermissions = new SPDOWNLOAD_CLASS_Permissions();
     $checkpermissions->getInstance()->checkpageurl('create_category');
     $arrayCheck = $checkpermissions->getInstance()->checkpageclick('create_category');
     $this->assign('addNew_promoted', $arrayCheck['promoted']);
     $this->assign('addNew_isAuthorized', $arrayCheck['isAuthorized']);
 }
コード例 #2
0
ファイル: downloads.php プロジェクト: SongPhi/spdownload
 public function getlatestfile($params)
 {
     $checkpermissions = new SPDOWNLOAD_CLASS_Permissions();
     $checkpermissions->getInstance()->checkpageurl('download');
     $arrayCheck = $checkpermissions->getInstance()->checkpageclick('download');
     $this->assign('addNew_promoted', $arrayCheck['promoted']);
     $this->assign('addNew_isAuthorized', $arrayCheck['isAuthorized']);
     $params['fileId'] = substr($params['fileId'], 0, stripos($params['fileId'], "-"));
     $filevernew = SPDOWNLOAD_BOL_VersionService::getInstance()->getFileVerNew($params['fileId']);
     $params['versionId'] = $filevernew[0]->id;
     $params['vFileName'] = $filevernew[0]->filename;
     $this->getfile($params);
 }