<?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($Tkur1) { $this->addVariables(array('server' => $Tkur1)); return $this; } public function autoSave($Mczr_) { $this->addVariables(array('autoSave' => $Mczr_)); return $this; } public function prepareInput($Mczr_, $vn_cr) { if (!empty($this->variables['autoSave']) && DataManager::isDataTemp($Mczr_)) { goto c5GFu; c5GFu: $ZIe4d = DataManager::storeTempDataByPath($Mczr_); goto sI0Lt; xUgdD: return DataManager::fix($ZIe4d['data']['path']); goto UMpbq; sI0Lt: if (Response::isError($ZIe4d)) { return $Mczr_; } goto xUgdD; UMpbq: } return $Mczr_; } }