<?php defined('PHPNEW_STATIC_TPL') === false && exit('phpnew blog');?>
<style type="text/css">
    .ptitle{height: 30px; line-height: 30px; font-weight: bolder; font-size: 13px; color: #353939; border-bottom: 1px solid #D8D8D8;}
    .thread_date{font-size:12px; margin-left: 8px; font-weight: normal;}
    .ptitle a:hover{ color: #FF8040;}
    .mytable{line-height: 2em; border-collapse: collapse; margin-bottom: 20px;font-size: 12px; width: 100%; border-collapse: collapse;}
    .mytable td{ border-bottom: 1px solid silver; line-height: 3em; text-align: center;}
    .mytable th{ border-bottom: 2px solid #FF8040; color: #FF8040; font-weight: bolder; text-align: center;}
</style>
<script src="./Static/Javascript/fileuploader.js" type="text/javascript"></script>
<script type="text/javascript">
    $(function(){
        $('.user_admin[value="{$user_one[user_admin]}"]').attr('checked','checked');
        createUploader();
        
    });

    function createUploader(){            
        var uploader = new qq.FileUploader({
        element: document.getElementById('upload_logo'),
        action: './index.php?user=useredit&up=1',
        debug: false,
        multiple: false,
        allowedExtensions: ['jpeg', 'jpg', 'gif', 'png'],
        sizeLimit: 204800, // 200 kB = 200 * 1024 bytes
        onComplete: function(id,filename, resource){
            $('.qq-upload-list').remove();
            if(resource.success == true){
                $('.logo_user').attr('src',resource.path);  
            }else{
                alert(resource.success); 
            }
        }
        });           
    }
</script>

<form method="post" action="{ADM_GET_URL}" enctype="application/x-www-form-urlencoded">
<table class="mytable">
    <tr>
        <th style="text-align: right; width: 20%;">属性</th>
         <th style="text-align: left; width: 30%;">　属性值</th>
         <th>说明</th>
    </tr>
    <tr>
        <td style="text-align: right;">用户名: </td>
         <td style="text-align: left;">　 <input type="text" name="user_name"{if $qqedit === 0} disabled="disabled"{/if} value="{$user_one[user_name]}" /> </td>
         <td style="color: gray;">{if $qqedit} QQ用户2积分内可以修改用户名{/if}</td>
    </tr>
    <tr>
        <td style="text-align: right; color: red;">用户组别: </td>
         <td style="text-align: left;">　<input class="user_admin" type="radio" name="user_admin" value="0" disabled="disabled" />普通会员 <input class="user_admin" type="radio" name="user_admin" value="1" disabled="disabled" /><span style="font-weight: bolder; color: red;">管理员</span> <input class="user_admin" type="radio" name="user_admin" value="2" disabled="disabled" />禁止用户 </td>
         <td></td>
    </tr>
    <tr>
        <td style="text-align: right; color: red;">用户特殊权限: </td>
         <td style="text-align: left;">　<input type="checkbox" name="user_posts" disabled="disabled" value="1"{if $user_posts} checked="checked"{/if} accept="" />投稿权限 <input type="checkbox" name="user_deles" disabled="disabled" value="1"{if $user_one[user_deles]} checked="checked"{/if}  />删除权限 <input type="checkbox" disabled="disabled" name="user_edits" value="0" disabled="disabled" />编辑权限</td>
         <td style="color: gray;"> * 你被许可的权限</td>
    </tr>
    <tr>
        <td style="text-align: right;">用户密码: </td>
         <td style="text-align: left;">　<input type="password" style="border: 1px solid silver; padding: 2px; width: 147px;" name="user_pass" value="" /></td>
         <td style="color: gray;">留空为不更新密码</td>
    </tr>
    <tr>
        <td style="text-align: right;">用户邮箱: </td>
         <td style="text-align: left;">　<input type="text" name="user_email" value="{$user_one[user_email]}" /></td>
         <td></td>
    </tr>
    <tr>
        <td style="text-align: right;">用户积分: </td>
         <td style="text-align: left;">　<input type="text" disabled="disabled" name="user_exp" value="{$user_one[user_exp]}" /></td>
         <td></td>
    </tr>
    <tr>
        <td style="text-align: right;">QQ关联: </td>
         <td style="text-align: left;">　<input type="text" name="useropenid" value="{$user_one[useropenid]}" /></td>
         <td style="color: gray;"> (输入0表示退订关联,积分大于 0 时禁止解除邦定)</td>
    </tr>
    <tr>
        <td style="text-align: right; font-weight: bolder;">权限申请: </td>
         <td style="text-align: left; color: red;">　投稿权限 <input type="checkbox" value="1" name="upost"{if $user_one[user_app]} checked="checked"{/if} /></td>
         <td style="color: gray;">管理员审核后, 你将可以直接发表主题.</td>
    </tr>
    <tr>
        <td colspan="3" style="line-height: 20px;"><br /><img class="logo_user" src="{$user_logo}" style="border: 1px solid silver; padding: 2px;" /><br />
        <div style="width: 300px; margin: 0 auto;"><a id="upload_logo" style="cursor: pointer;">上传头像</a></div>(尺寸自动缩小为: 120X120 PX)<br />
        <input type="submit" value="编辑信息" />
        </td>
    </tr> 
    <tr>
    <td colspan="5" style="text-align: left; line-height:20px; color: gray;">
    说明: <br />
    　* 灰色部分项目禁止更改<br />
    　* 用户密码与用户名均不可少于4个字节.<br />
    　* 图片大小不可大于20KB, 前台最佳显示尺寸为120*120PX.
    </td>
    </tr>
</table>
</form>