<?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($KJqKC, $pZ_lR = null) { goto VMDf8; zUJvs: return self::show($g3uu_, $pZ_lR); goto VNQCw; VMDf8: if (!$KJqKC) { return AutoRenderedFieldValue::make('<span class="ub-text-muted">-</span>'); } goto tKhPq; tKhPq: $g3uu_ = ModelUtil::getWithCache('member_user', array('id' => $KJqKC)); goto zUJvs; VNQCw: } public static function show($g3uu_, $pZ_lR = null) { if (!empty($g3uu_)) { goto tWpls; DQUNM: if (!is_array($pZ_lR)) { $pZ_lR = array($pZ_lR); } goto tpeAF; hoyNo: return AutoRenderedFieldValue::make('<a href="javascript:;" class="ub-icon-text" data-dialog-request="' . action('\\Module\\Member\\Admin\\Controller\\MemberController@show', array('_id' => $g3uu_['id'])) . '">
            <img class="icon" src="' . AssetsUtil::fixOrDefault($g3uu_['avatar'], 'asset/image/avatar.svg') . '" />
            <span class="text">' . htmlspecialchars($ev9nD) . '</span></a>'); goto NDTnt; tpeAF: if ($g3uu_['isDeleted']) { $ev9nD = '<已删除用户>'; } else { $ev9nD = '<未知用户>'; foreach ($pZ_lR as $A1G3_) { if (!empty($g3uu_[$A1G3_])) { $ev9nD = $g3uu_[$A1G3_]; break; } } } goto hoyNo; tWpls: if (null === $pZ_lR) { $pZ_lR = array('username'); } goto DQUNM; NDTnt: } return AutoRenderedFieldValue::make(''); } }