<table width="100%" class="table_form"> <input type="hidden" name="uid" value="<?php echo $userinfo['uid']; ?> "> <?php if ($userinfo['avatar']) { ?> <tr> <th><?php echo L('avatar'); ?> £º</th> <td class="y-bg"> <img src="<?php echo ps_getavatar($userinfo['uid']); ?> "> <input type="checkbox" name="avatar" id="avatar" class="input-text" value="1" ><label for="avatar"><?php echo L('delete') . L('avatar'); ?> </label> </td> </tr> <?php } ?> <tr> <th width="80" ><?php echo L('username'); ?>
/** * 删除会员 */ public function delete() { $uidarr = isset($_POST['uid']) ? $_POST['uid'] : showmessage(L('illegal_parameters'), HTTP_REFERER); $new_arr = array(); foreach ($uidarr as $v) { $v = intval($v); $new_arr[] = $v; //删除头像 $dir = ps_getavatar($v, 1); ps_unlink($dir); } $where = to_sqls($new_arr, '', 'uid'); //ucenter部份 if ($this->config['ucuse']) { pc_base::load_config('uc_config'); include PHPCMS_PATH . 'api/uc_client/client.php'; $s = $this->db->select($where, 'ucuserid'); if ($s) { $uc_data = array(); foreach ($s as $k => $v) { $uc_data[$k] = $v['ucuserid']; } if (!empty($uc_data)) { $r = uc_user_delete($uc_data); } if (!$r) { showmessage(L('operation_failure'), HTTP_REFERER); } } else { showmessage(L('operation_failure'), HTTP_REFERER); } } if ($this->db->delete($where)) { /*插入消息队列*/ $noticedata = array('uids' => $new_arr); messagequeue::add('member_delete', $noticedata); showmessage(L('operation_success'), HTTP_REFERER); } else { showmessage(L('operation_failure'), HTTP_REFERER); } }
foreach ($memberlist as $k => $v) { ?> <tr> <td align="left" width="40"><input type="checkbox" value="<?php echo $v['uid']; ?> " name="uid[]"></td> <td align="left" width="60"><?php echo $v['uid']; ?> </td> <td align="left"><?php if ($v['avatar']) { ?> <img src="<?php echo ps_getavatar($v['uid']); ?> " height=18 width=18><?php } echo $v['username']; ?> </td> <td align="left"><?php echo $v['email']; ?> </td> <td align="left"><?php echo $v['appname']; ?> </td> <td align="left"><?php