<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace ModStart\Field; use ModStart\Core\Input\Response; use ModStart\Core\Util\ConvertUtil; use ModStart\Data\DataManager; class ImagesTemp extends AbstractField { protected $width = 80; protected static $js = array('asset/common/uploadButton.js'); protected function setup() { $this->addVariables(array('server' => modstart_admin_url('data/file_manager/image'))); } public function server($vhuku) { $this->addVariables(array('server' => $vhuku)); return $this; } public function unserializeValue($FT9zA, AbstractField $SQ6_6) { return ConvertUtil::toArray($FT9zA); } public function serializeValue($FT9zA, $TAWWJ) { return json_encode($FT9zA); } public function prepareInput($FT9zA, $TAWWJ) { goto lA3uV; sc1n_: if (is_array($FT9zA)) { foreach ($FT9zA as $kh68j => $tHq0l) { if (DataManager::isDataTemp($tHq0l)) { goto DhRD6; dh0a5: if (Response::isError($JOw_A)) { continue; } goto oBJM4; oBJM4: $FT9zA[$kh68j] = DataManager::fix($JOw_A['data']['path']); goto UwgZS; DhRD6: $JOw_A = DataManager::storeTempDataByPath($tHq0l); goto dh0a5; UwgZS: } } } goto WUGSy; lA3uV: $FT9zA = ConvertUtil::toArray($FT9zA); goto sc1n_; WUGSy: return $FT9zA; goto xpQyu; xpQyu: } }