<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace ModStart\Admin\Controller; use Illuminate\Routing\Controller; use ModStart\Admin\Auth\Admin; use ModStart\Admin\Auth\AdminPermission; use ModStart\Core\Input\Request; use ModStart\Core\Input\Response; use ModStart\Data\FileManager; use ModStart\Data\UeditorManager; class DataController extends Controller { public function fileManager($KD2ht) { if (Request::isPost()) { return FileManager::handle($KD2ht, 'admin_upload', 'admin_upload_category', Admin::id(), null, function ($TFjGK) { switch ($TFjGK) { case 'categoryDelete': case 'fileDelete': goto i9aiM; r2mMq: AdminPermission::permitCheck('DataFileManagerDelete'); goto aVwGk; aVwGk: break; goto cFN2h; i9aiM: AdminPermission::demoCheck(); goto r2mMq; cFN2h: case 'init': case 'upload': case 'save': case 'uploadAndSaveBase64': case 'uploadDirect': case 'uploadDirectRaw': goto SGiRE; SGiRE: AdminPermission::demoCheck(); goto QSp6z; QSp6z: AdminPermission::permitCheck('DataFileManagerUpload'); goto to67E; to67E: break; goto ybv3Q; ybv3Q: case 'fileEdit': case 'categoryEdit': goto smoqq; smoqq: AdminPermission::demoCheck(); goto cmphY; LgTwD: break; goto g8uNV; cmphY: AdminPermission::permitCheck('DataFileManagerAdd/Edit'); goto LgTwD; g8uNV: case 'list': case 'category': AdminPermission::permitCheck('DataFileManagerView'); break; default: Response::quit(-1, 'Data Permit Denied'); break; } }); } return view('modstart::admin.data.fileManager', array('category' => $KD2ht, 'pageTitle' => L('Select ' . ucfirst($KD2ht)))); } public function ueditor() { return UeditorManager::handle('admin_upload', 'admin_upload_category', Admin::id()); } }