<?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($GBwzV) { $this->addVariables(array('server' => $GBwzV)); return $this; } public function autoSave($mdHu1) { $this->addVariables(array('autoSave' => $mdHu1)); return $this; } public function prepareInput($mdHu1, $DRh9Q) { if (!empty($this->variables['autoSave']) && DataManager::isDataTemp($mdHu1)) { goto ObwYa; ChzO8: return DataManager::fix($N2Xaa['data']['path']); goto Ney_s; ObwYa: $N2Xaa = DataManager::storeTempDataByPath($mdHu1); goto jUnhD; jUnhD: if (Response::isError($N2Xaa)) { return $mdHu1; } goto ChzO8; Ney_s: } return $mdHu1; } }