<?php
if($_COOKIE['iQQol_Administrator']!=IQQOL_SPPASS)
{
    $style->assign("state",'COOKIE失效');
    $style->display('admin/index.html');exit();
}
else {
$_admincp_power[maxqq] = mysql_fetch_array(mysql_query("SELECT * FROM {$table}admincp_power
WHERE name='initialmaxqq'"));
$_admincp_power[group] = mysql_fetch_array(mysql_query("SELECT * FROM {$table}admincp_power
WHERE name='initialgroup'"));
$_admincp_power[integral] = mysql_fetch_array(mysql_query("SELECT * FROM {$table}admincp_power
WHERE name='initialintegral'"));
$_admincp_power[buyqq] = mysql_fetch_array(mysql_query("SELECT * FROM {$table}admincp_power
WHERE name='buyqq'"));
    if($_GET['edit']=='yes'){
        $edit=mysql_query("UPDATE ".IQQOL_SQLTABLE."admincp_power
 SET power='{$_POST['integral']}' 
 WHERE name='initialintegral'");
        $edit.=mysql_query("UPDATE ".IQQOL_SQLTABLE."admincp_power
 SET power='{$_POST['maxqq']}' 
 WHERE name='initialmaxqq'");
        $edit.=mysql_query("UPDATE ".IQQOL_SQLTABLE."admincp_power
 SET power='{$_POST['status']}' 
 WHERE name='initialgroup'");
        $edit.=mysql_query("UPDATE ".IQQOL_SQLTABLE."admincp_power
 SET power='{$_POST['buyqq']}' 
 WHERE name='buyqq'");
    if($edit){
        $tem_url_return=$_SERVER["PHP_SELF"].'?action=setting&operation=credits';
        $state='修改成功'.$field;
        $style->display('admin/status.html');
        exit();
    }else{
        $tem_url_return=$_SERVER["PHP_SELF"].'?action=setting&operation=credits';
        $state='修改失败';
        $style->display('admin/status.html');
        exit();
    }
    }
    if(IN_IQQOL){
        $style->display('admin/setting/credits.html');
    }
}