<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace Module\Member\Util; use ModStart\Core\Assets\AssetsUtil; use ModStart\Core\Dao\ModelUtil; use ModStart\Field\AutoRenderedFieldValue; class MemberCmsUtil { public static function showFromId($nlOSA, $Wvq57 = null) { goto KOIph; KOIph: if (!$nlOSA) { return AutoRenderedFieldValue::make('<span class="ub-text-muted">-</span>'); } goto Sz0S6; Sz0S6: $KAIwS = ModelUtil::getWithCache('member_user', array('id' => $nlOSA)); goto RCPAm; RCPAm: return self::show($KAIwS, $Wvq57); goto AB2UC; AB2UC: } public static function show($KAIwS, $Wvq57 = null) { if (!empty($KAIwS)) { goto Tle3q; gdxj5: if (!is_array($Wvq57)) { $Wvq57 = array($Wvq57); } goto ku7f8; now3e: return AutoRenderedFieldValue::make('<a href="javascript:;" class="ub-icon-text" data-dialog-request="' . action('\\Module\\Member\\Admin\\Controller\\MemberController@show', array('_id' => $KAIwS['id'])) . '">
            <img class="icon" src="' . AssetsUtil::fixOrDefault($KAIwS['avatar'], 'asset/image/avatar.svg') . '" />
            <span class="text">' . htmlspecialchars($jzB3x) . '</span></a>'); goto shwAG; ku7f8: if ($KAIwS['isDeleted']) { $jzB3x = '<已删除用户>'; } else { $jzB3x = '<未知用户>'; foreach ($Wvq57 as $dZDNw) { if (!empty($KAIwS[$dZDNw])) { $jzB3x = $KAIwS[$dZDNw]; break; } } } goto now3e; Tle3q: if (null === $Wvq57) { $Wvq57 = array('username'); } goto gdxj5; shwAG: } return AutoRenderedFieldValue::make(''); } }