<?php
if(IN_IQQOL){
if($_COOKIE['iQQol_Administrator']!=IQQOL_SPPASS)
{
    $style->assign("state",'COOKIE失效');
    $style->display('admin/index.html');exit();
}
    $uc_search=mysql_query("SELECT * FROM ".UC_DBTABLEPRE."members 
WHERE `uid`='{$_GET['uid']}'",$ucon);
    $info=mysql_fetch_array($uc_search);
        if($_GET['act']=='delete'){
            $i=mysql_query("DELETE FROM {$table}members
WHERE uid='{$_GET['uid']}'",$con);echo mysql_error();
            $i.=uc_user_delete($info[uid]);
            if($i){
                $state=$info[username].' 删除成功';
                $tem_url_return="admin.php?action=members&operation=guaqinfo";
                $style->display('admin/status.html');
                }
            else{
                $state=$info[username].' 删除失败';
                $tem_url_return="admin.php?action=members&operation=guaqinfo";
                $style->display('admin/status.html');
            }
        }

        if($_GET['act']=='group'){
            $i=mysql_query("SELECT * FROM {$table}members
WHERE uid='{$_GET['uid']}'",$con);echo mysql_error();
            if($_GET['edit']=='yes'){
                $i=mysql_query("UPDATE ".IQQOL_SQLTABLE."members
 SET `group`='{$_POST['group']}' 
 WHERE uid = '{$_GET['uid']}'",$con);echo mysql_error();
                if($i){
                    $state=$info[username].' 修改成功';
                    $tem_url_return="admin.php?action=members&operation=guaqinfo";
                    $style->display('admin/status.html');
                    }
                else{
                    $state=$info[username].' 修改失败';
                    $tem_url_return="admin.php?action=members&operation=guaqinfo";
                    $style->display('admin/status.html');
                }
            }
            else{
                $style->display('admin/edit/group.html');
            }
        }

        if($_GET['act']=='credits'){
            $i=mysql_query("SELECT * FROM {$table}members
WHERE uid='{$_GET['uid']}'",$con);echo mysql_error();
            if($_GET['edit']=='yes'){
                $i=mysql_query("UPDATE ".IQQOL_SQLTABLE."members
 SET `integral`='{$_POST['integral']}' 
 WHERE uid = '{$_GET['uid']}'",$con);
                $i.=mysql_query("UPDATE ".IQQOL_SQLTABLE."members
 SET `largest`='{$_POST['largest']}' 
 WHERE uid = '{$_GET['uid']}'",$con);
                echo mysql_error();
                if($i){
                    $state=$info[username].' 修改成功';
                    $tem_url_return="admin.php?action=members&operation=guaqinfo";
                    $style->display('admin/status.html');
                    }
                else{
                    $state=$info[username].' 修改失败';
                    $tem_url_return="admin.php?action=members&operation=guaqinfo";
                    $style->display('admin/status.html');
                }
            }
            else{
                $style->display('admin/edit/credits.html');
            }
        }

        if($_GET['act']=='ban'){
            $i=mysql_query("UPDATE ".IQQOL_SQLTABLE."members
 SET `status`='0' 
 WHERE uid = '{$_GET['uid']}'",$con);echo mysql_error();
            if($i){
                $state=$info[username].' 冻结成功';
                $tem_url_return="admin.php?action=members&operation=guaqinfo";
                $style->display('admin/status.html');
                }
            else{
                $state=$info[username].' 冻结失败';
                $tem_url_return="admin.php?action=members&operation=guaqinfo";
                $style->display('admin/status.html');
            }
        }

        if($_GET['act']=='recovery'){
            $i=mysql_query("UPDATE ".IQQOL_SQLTABLE."members
 SET `status`='1' 
 WHERE uid = '{$_GET['uid']}'",$con);echo mysql_error();
            if($i){
                $state=$info[username].' 恢复成功';
                $tem_url_return="admin.php?action=members&operation=guaqinfo";
                $style->display('admin/status.html');
                }
            else{
                $state=$info[username].' 恢复失败';
                $tem_url_return="admin.php?action=members&operation=guaqinfo";
                $style->display('admin/status.html');
            }
        }
}
?>