示例#1
0
function get_admin_license_var()
{
    $list = get_license_resource();
    foreach ($list as &$__l) {
        $__l = "used_q_{$__l}";
    }
    $sq = new Sqlite(null, 'client');
    $res = $sq->getRowsWhere("nname = 'admin'", $list);
    return $res[0];
}
示例#2
0
文件: lxlib.php 项目: zseand/kloxo
function setLicenseTodefault()
{
    global $gbl, $sgbl, $login, $ghtml;
    $license = $login->getObject('license');
    $license->parent_clname = $login->getClName();
    $lic = $license->licensecom_b;
    $def = array("maindomain_num" => "40", "vps_num" => 5, "pserver_num" => 10, "client_num" => "Unlimited");
    $list = get_license_resource();
    foreach ($list as $l) {
        $licv = "lic_{$l}";
        $lic->{$licv} = $def[$l];
    }
    $license->setUpdateSubaction();
    $license->write();
}