PageRenderTime 45ms CodeModel.GetById 19ms RepoModel.GetById 1ms app.codeStats 0ms

/views/members/member.php

https://github.com/Ramir1/esoTalk
PHP | 40 lines | 22 code | 10 blank | 8 comment | 3 complexity | 17bfda60d9008a6c2fcbacb91a68ecd6 MD5 | raw file
Possible License(s): GPL-2.0
  1. <?php
  2. // Copyright 2011 Toby Zerner, Simon Zerner
  3. // This file is part of esoTalk. Please see the included license file for usage information.
  4. if (!defined("IN_ESOTALK")) exit;
  5. /**
  6. * Displays a list of members in the context of the member list.
  7. *
  8. * @package esoTalk
  9. */
  10. $member = $data["member"];
  11. ?>
  12. <li data-index='<?php echo ctype_alpha($letter = strtolower($member["username"][0])) ? $letter : "0"; ?>'>
  13. <div class='col-member'>
  14. <?php echo avatar($member, "thumb"); ?>
  15. <strong><?php echo memberLink($member["memberId"], $member["username"]); ?></strong>
  16. <?php
  17. // Online indicator.
  18. $lastAction = ET::memberModel()->getLastActionInfo($member["lastActionTime"], $member["lastActionDetail"]);
  19. if ($lastAction) echo "<".(!empty($lastAction[1]) ? "a href='{$lastAction[1]}'" : "span")." class='online' title='".T("Online").($lastAction[0] ? " (".sanitizeHTML($lastAction[0]).")" : "")."'>".T("Online")."</".(!empty($lastAction[1]) ? "a" : "span").">";
  20. ?>
  21. <span class='group subText'><?php echo memberGroup($member["account"], $member["groups"]); ?></span>
  22. <?php if (ET::$session->user): ?><a href='<?php echo URL("conversation/start/".urlencode($member["username"])."?token=".ET::$session->token); ?>' class='controls label label-private'><?php echo T("label.private"); ?></a><?php endif; ?>
  23. </div>
  24. <div class='col-lastActive'>
  25. <span class='subText'><?php printf(T("Last active %s"), "<span title='".date(T("date.full"), $member["lastActionTime"])."'>".relativeTime($member["lastActionTime"], true)."</span>"); ?></span>
  26. </div>
  27. <div class='col-replies'>
  28. <span class='subText'><?php echo Ts("%s post", "%s posts", $member["countPosts"]); ?></span>
  29. </div>
  30. </li>