typecho前台修改个人设置(二)

核心代码

个人资料页面

<?php Typecho_Widget::widget('Widget_Security')->to($security); ?>
<form action="<?php $security->index('/action/users-profile'); ?>" method="post" enctype="application/x-www-form-urlencoded">
<label>用户ID</label>
<?php $this->user->uid() ?>
<label>昵称</label>
<input type="text" name="screenName" value="<?php $this->user->screenName(); ?>"/>
<label>邮箱</label>
<input type="text" name="mail" value="<?php $this->user->mail(); ?>"/>
<label>网站</label>
<input type="text" name="url" value="<?php $this->user->url(); ?>"/>
<input name="do" type="hidden" value="profile">
<button type="submit">确定</button>
</form> 

密码修改页面

<?php Typecho_Widget::widget('Widget_Security')->to($security); ?>
<form action="<?php $security->index('/action/users-profile'); ?>" method="post" enctype="application/x-www-form-urlencoded">
<label><font style="vertical-align: inherit;">密码</label>
<input type="password" name="password"/>
<label>重复密码</label>
<inputtype="password" name="confirm"/>
<input name="do" type="hidden" value="password">
<button type="submit">确定</button>
</form>

html结构根据自己写的样式调整美化即可

文章由官网发布,如若转载,请注明出处:https://www.veimoz.com/50
0 评论
2.9k

发表评论

!