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

核心代码

个人资料页面

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

密码修改页面

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

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

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

发表评论

!