Example #1
0
            <script type="text/javascript">var g_pageInfo = { username: '******'name']);
?>
' }</script>

            <div class="text">
                <div id="h1-icon-generic" class="h1-icon"></div>
                <script type="text/javascript">
                    $WH.ge('h1-icon-generic').appendChild(Icon.createUser(<?php 
echo (is_numeric(User::$avatar) ? 2 : 1) . ' , \'' . User::$avatar . '\'';
?>
, 1, null, <?php 
echo User::isInGroup(U_GROUP_PREMIUM) ? 0 : 2;
?>
, false, Icon.getPrivilegeBorder(<?php 
echo User::getReputation();
?>
)));
                </script>
                <h1 class="h1-icon"><?php 
echo Lang::account('myAccount');
?>
</h1>
<?php 
// Banned-Minibox
if ($b = $this->banned) {
    ?>
                <div style="max-width:300px;" class="minibox">
                    <h1 class="q10"><?php 
    echo Lang::account('accBanned');
    ?>
Example #2
0
<?php

if (User::$id) {
    echo '<a id="toplinks-user">' . User::$displayName . '</a>';
    echo '<span id="toplinks-rep" title="' . Lang::main('reputationTip') . '">(<a href="?reputation">' . User::getReputation() . '</a>)</span>';
} else {
    echo '<a href="?account=signin">' . Lang::main('signIn') . '</a>';
}
?>
|<a href="#" id="toplinks-feedback" class="icon-email"><?php 
echo Lang::main('feedback');
?>
</a>
|<a href="javascript:;" id="toplinks-language"><?php 
echo Lang::main('language');
?>
</a>
Example #3
0
 private function createDashboard()
 {
     if (!User::$id) {
         $this->forwardToSignIn('account');
     }
     $user = DB::Aowow()->selectRow('SELECT * FROM ?_account WHERE id = ?d', User::$id);
     $bans = DB::Aowow()->select('SELECT ab.*, a.displayName, ab.id AS ARRAY_KEY FROM ?_account_banned ab LEFT JOIN ?_account a ON a.id = ab.staffId WHERE ab.userId = ?d', User::$id);
     /***********/
     /* Infobox */
     /***********/
     $infobox = [];
     $infobox[] = Lang::user('joinDate') . Lang::main('colon') . '[tooltip name=joinDate]' . date('l, G:i:s', $user['joinDate']) . '[/tooltip][span class=tip tooltip=joinDate]' . date(Lang::main('dateFmtShort'), $user['joinDate']) . '[/span]';
     $infobox[] = Lang::user('lastLogin') . Lang::main('colon') . '[tooltip name=lastLogin]' . date('l, G:i:s', $user['prevLogin']) . '[/tooltip][span class=tip tooltip=lastLogin]' . date(Lang::main('dateFmtShort'), $user['prevLogin']) . '[/span]';
     $infobox[] = Lang::account('lastIP') . Lang::main('colon') . $user['prevIP'];
     $infobox[] = Lang::account('email') . Lang::main('colon') . $user['email'];
     $groups = [];
     foreach (Lang::account('groups') as $idx => $key) {
         if ($idx >= 0 && $user['userGroups'] & 1 << $idx) {
             $groups[] = (!fMod(count($groups) + 1, 3) ? '[br]' : null) . Lang::account('groups', $idx);
         }
     }
     $infobox[] = Lang::user('userGroups') . Lang::main('colon') . ($groups ? implode(', ', $groups) : Lang::account('groups', -1));
     $infobox[] = Util::ucFirst(Lang::main('siteRep')) . Lang::main('colon') . User::getReputation();
     $this->infobox = '[ul][li]' . implode('[/li][li]', $infobox) . '[/li][/ul]';
     /*************/
     /* Ban Popup */
     /*************/
     foreach ($bans as $b) {
         if (!($b['typeMask'] & (ACC_BAN_TEMP | ACC_BAN_PERM)) || $b['end'] && $b['end'] <= time()) {
             continue;
         }
         $this->banned = array('by' => [$b['staffId'], $b['displayName']], 'end' => $b['end'], 'reason' => $b['reason']);
         break;
         // one is enough
     }
     /************/
     /* Listview */
     /************/
     $this->forceTabs = true;
     // Reputation changelog (params only for comment-events)
     if ($repData = DB::Aowow()->select('SELECT action, amount, date AS \'when\', IF(action IN (3, 4, 5), sourceA, 0) AS param FROM ?_account_reputation WHERE userId = ?d', User::$id)) {
         foreach ($repData as &$r) {
             $r['when'] = date(Util::$dateFormatInternal, $r['when']);
         }
         $this->lvTabs[] = ['reputationhistory', ['data' => $repData]];
     }
     // comments
     if ($_ = CommunityContent::getCommentPreviews(['user' => User::$id, 'replies' => false])) {
         // needs foundCount for params
         // _totalCount: 377,
         // note: $WH.sprintf(LANG.lvnote_usercomments, 377),
         $this->lvTabs[] = ['commentpreview', array('data' => $_, 'hiddenCols' => ['author'], 'onBeforeCreate' => '$Listview.funcBox.beforeUserComments')];
     }
     // replies
     if ($_ = CommunityContent::getCommentPreviews(['user' => User::$id, 'replies' => true])) {
         // needs commentid (parentComment) for data
         // needs foundCount for params
         // _totalCount: 377,
         // note: $WH.sprintf(LANG.lvnote_usercomments, 377),
         $this->lvTabs[] = ['replypreview', array('data' => $_, 'hiddenCols' => ['author'])];
     }
     /*
     <div id="description" class="left"><div id="description-generic"></div>
     <script type="text/javascript">//<![CDATA[
     Markup.printHtml("description text here", "description-generic", { allow: Markup.CLASS_PREMIUM, roles: "256" });
     //]]></script>
     </div>
     <script type="text/javascript">us_addDescription()</script>
     */
     // claimed characters
     // profiles
     // own screenshots
     // own videos
     // own comments (preview)
     // articles guides..?
     // cpmsg    change pass messaeg class:failure|success, msg:blabla
 }