<?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($shbIl, $jJyrp = null) { goto r1Cqu; bSHW_: $QqUVI = ModelUtil::getWithCache('member_user', array('id' => $shbIl)); goto JLYZb; r1Cqu: if (!$shbIl) { return AutoRenderedFieldValue::make('<span class="ub-text-muted">-</span>'); } goto bSHW_; JLYZb: return self::show($QqUVI, $jJyrp); goto dHNsC; dHNsC: } public static function show($QqUVI, $jJyrp = null) { if (!empty($QqUVI)) { goto EOiOS; feQDa: if ($QqUVI['isDeleted']) { $JfgpO = '<已删除用户>'; } else { $JfgpO = '<未知用户>'; foreach ($jJyrp as $OCvfG) { if (!empty($QqUVI[$OCvfG])) { $JfgpO = $QqUVI[$OCvfG]; break; } } } goto HIvNl; EOiOS: if (null === $jJyrp) { $jJyrp = array('username'); } goto K9GvM; HIvNl: return AutoRenderedFieldValue::make('<a href="javascript:;" class="ub-icon-text" data-dialog-request="' . action('\\Module\\Member\\Admin\\Controller\\MemberController@show', array('_id' => $QqUVI['id'])) . '">
            <img class="icon" src="' . AssetsUtil::fixOrDefault($QqUVI['avatar'], 'asset/image/avatar.svg') . '" />
            <span class="text">' . htmlspecialchars($JfgpO) . '</span></a>'); goto g67Tu; K9GvM: if (!is_array($jJyrp)) { $jJyrp = array($jJyrp); } goto feQDa; g67Tu: } return AutoRenderedFieldValue::make(''); } }