/** * 表单提交密码验证 * @param $str * @return bool */ public function oldpwd_check($str) { if (get_admin_field('password') != md5($this->input->post('oldpwd'))) { return FALSE; } return TRUE; }
<div class="row large-8 small-10"> <br><br><br><br><br> <?php echo form_open(''); ?> <fieldset> <legend>用户[<?php echo get_admin_field('username'); ?> ]密码修改</legend> <?php echo form_hidden('id', get_admin_field('id')); ?> <div class="row"> <div class="large-10 large-offset-2 columns"> <div class="row collapse prefix-radius"> <div class="small-2 columns"> <span class="prefix">旧密码</span> </div> <div class="small-8 columns"> <input type="password" name="oldpwd" value="<?php echo set_value('oldpwd'); ?> " placeholder="请输入旧密码"> </div> <div class="small-2 small-offset-0 text-center columns"> <?php echo form_error('oldpwd'); ?> </div>