昨天 GOOCAO搞活动 报名可获得免费上机
把报名的系统完成后需要对积分和上机时间进行计算;写了个function 收藏以后可能用的到
/**
     * 积分
     * 表:userbonus
     * */
$ChannelIntegralArr=array(
'threads'=>4,
'comments'=>4
);
function IntagralConsersionTime($Integral,$disinfo=''){
    $AccordTime=30;
    $result=$Integral-$AccordTime;
    if ($result>0){
        $OnlineTime=1;
        for ($i=1;$i            if ($result-$AccordTime                break;
            }
            $result=$result-$AccordTime;
            $OnlineTime++;
        }
        $infos="当前积分:$Integral
可换得上机时间:$OnlineTime 小时
剩余积分:$result";
        if ($disinfo==1){
            echo $infos;
        }else{
            $infos=ereg_replace(' ',' ',$infos);
            echo $infos;
        }
    }else{
        echo "目前积分无法满足条件,不能换算";
    }
}
 
                        
                        每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。
 
                Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号