xiuno首页登陆口折腾代码 折腾教程

站长 折腾 2022-9-4 3428


登录前


登录后


折腾代码:

<?php if(empty($uid)) { ?>
<div class="card">
    <div class="card-header">
        <?php echo lang('user_login');?>
        <!--{hook user_login_title_after.htm}-->
    </div>
    <div class="card-body ajax_modal_body">
        <form action="<?php echo url('user-login');?>" method="post" id="form">
            <div class="form-group input-group">
                <div class="input-group-prepend">
                    <span class="input-group-text"><i class="icon icon-user icon-fw"></i></span>
                </div>
                <input type="text" class="form-control"
                    placeholder="<?php echo lang('email');?> / <?php echo lang('username');?>" id="email" name="email">
                <div class="invalid-feedback"></div>
            </div>
            <!--{hook user_login_email_after.htm}-->
            <div class="form-group input-group">
                <div class="input-group-prepend">
                    <span class="input-group-text"><i class="icon icon-lock icon-fw"></i></span>
                </div>
                <input type="password" class="form-control" placeholder="<?php echo lang('password');?>" id="password"
                    name="password">
                <div class="invalid-feedback"></div>
            </div>
            <!--{hook user_login_password_after.htm}-->
            <div class="form-group">
                <button type="submit" class="btn btn-primary btn-block" id="submit"
                    data-loading-text="<?php echo lang('submiting');?>...">
                    <?php echo lang('login');?>
                </button>
            </div>
            <!--{hook user_login_submit_after.htm}-->
            <div class="media">
                <div>
                    <!--{hook user_login_form_footer_left.htm}-->
                </div>
                <div class="media-body text-right">
                    <!--{hook user_login_form_footer_right_start.htm}-->
                    <a href="<?php echo url('user-create');?>" class="text-muted"><small>
                            <?php echo lang('user_create');?>
                        </small></a>
                    <?php if(!empty($conf['user_resetpw_on'])) { ?>
                    <a href="<?php echo url('user-resetpw');?>" class="text-muted ml-3"><small>
                            <?php echo lang('forgot_pw');?>
                        </small></a>
                    <?php } ?>
                    <!--{hook user_login_form_footer_right_end.htm}-->
                </div>
            </div>
        </form>
    </div>
</div>
<?php } else { 
$uid = intval($uid);
$user = user__read($uid);
user_format($user);
?>
<style>
    .avatar-b {
        float: left;
    }

    .avatar-b a,
    .avatar-user a {
        color: #5188a6;
    }

    .avatar-b img {
        border-radius: 50%;
        width: 70px;
        height: 70px;
    }

    .avatar-user {
        float: left;
    }

    .avatar-user .username {
        font-size: 16px;
    }

    .avatar-b a,
    .avatar-user a {
        color: #5188a6;
    }
</style>
<div class="card">
    <div class="card-body" style="padding:1.0rem;">
        <div class="mb-3" style="overflow:hidden;">
            <div class="avatar-b mr-3"><a href="<?php echo url(" user-".$user['uid']);?>"><img
                        src="<?php echo $user['avatar_url'];?>"></a></div>
            <div class="avatar-user">
                <div class="username">
                    <?php echo $user['username'];?>
                </div>
                <div class="mt-2 mb-2">用户等级:
                    <?php echo $user['groupname'];?>
                </div>
                <div>最后登录:
                    <?php echo $user['login_date_fmt'];?>
                </div>
            </div>
        </div>
        <div><a role="button" class="btn btn-primary btn-block" href="<?php echo url('thread-create-'.$fid);?>">
                <?php echo lang('thread_create_new');?>
            </a></div>
    </div>
</div>
<?php }
?>​



──── 1人觉得很赞 ────
最新回复 (1)
  • Lv.2 lv1314521 2022-11-11
    0 2
    学习学习!
返回