public function updateUser(User $user) { $where = "KD_USER = "******"") { $data = array('NIP_USER' => $user->get_nip(), 'NM_USER' => $user->get_nmUser(), 'PASS_USER' => Hash::create('sha1', $user->get_pass(), HASH_SALT_KEY), 'AKSES_USER' => $user->get_akses()); } else { $data = array('NIP_USER' => $user->get_nip(), 'NM_USER' => $user->get_nmUser(), 'PASS_USER' => Hash::create('sha1', $user->get_pass(), HASH_SALT_KEY), 'AKSES_USER' => $user->get_akses(), 'FOTO_USER' => $user->get_foto()); } $this->_db->update($this->_table, $data, $where); }
" method="post" name="frm" enctype="multipart/form-data" > <table width="600px"> <tr> <td class="title">Tài Khoản </td> <td class="info"><h3><?php echo $username; ?> </h3></td> </tr> <tr> <td class="title">Mật khẩu</td> <td class="info"> <fieldset> <legend>Đổi mật khẩu</legend> <label>MK hiện tại </label><input type="password" name="txtpass" size="20" value="<?php if ($a->get_pass() != "") { echo "******"; } ?> " /><br /> <label>MK mới </label><input type="password" name="txtpass1" size="20" /><br /> <label>Đánh lại MK mới </label><input type="password" name="txtpass2" size="20" /> </fieldset> </td> </tr> <tr> <td class="title">Họ Tên</td> <td class="info"><input type="text" name="txthoten" size="30" value="<?php echo $hoten; ?>