<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace ModStart\Field; use ModStart\Core\Input\Response; use ModStart\Data\DataManager; class FileTemp extends AbstractField { protected $width = 80; protected static $js = array('asset/common/uploadButton.js'); protected function setup() { $this->addVariables(array('autoSave' => true, 'server' => modstart_admin_url('data/file_manager/file'))); } public function server($YSNPl) { $this->addVariables(array('server' => $YSNPl)); return $this; } public function autoSave($HDpl6) { $this->addVariables(array('autoSave' => $HDpl6)); return $this; } public function prepareInput($HDpl6, $xTADA) { if (!empty($this->variables['autoSave']) && DataManager::isDataTemp($HDpl6)) { goto exWkZ; exWkZ: $Z5nZL = DataManager::storeTempDataByPath($HDpl6); goto qUDaL; VD1vO: return DataManager::fix($Z5nZL['data']['path']); goto GT2gj; qUDaL: if (Response::isError($Z5nZL)) { return $HDpl6; } goto VD1vO; GT2gj: } return $HDpl6; } }