示例#1
0
function printProperty($class, $type)
{
    $r = new ReflectionClass($class);
    foreach ($r->getProperties() as $s) {
        if ($type === 'action') {
            $istr = "__acdesc_";
            if (!csb($s->name, "__acdesc_")) {
                continue;
            }
        }
        if ($type === 'property') {
            $istr = "__desc_";
            if (!csb($s->name, "__desc_")) {
                continue;
            }
        }
        $descr = get_classvar_description($class, $s->name);
        $name = strfrom($s->name, $istr);
        if (csa($descr[0], "q")) {
            continue;
        }
        if (cse($name, "_f")) {
            continue;
        }
        if (cse($name, "_l")) {
            continue;
        }
        if (cse($name, "_o")) {
            continue;
        }
        printf("%30s %s\n", $name, $descr['help']);
    }
}
示例#2
0
 static function add($parent, $class, $param)
 {
     if (!csb($param['nname'], "lvm:") && !csb($param['nname'], "/")) {
         throw new lxexception('location_is_either_full_path_or_lvm', 'nname', '');
     }
     return $param;
 }
示例#3
0
function process_main()
{
    global $gbl, $sgbl, $login, $ghtml;
    global $argv;
    $list = parse_opt($argv);
    $exitchar = $sgbl->__var_exit_char;
    $res = new Remote();
    $res->exception = null;
    $res->ddata = "hello";
    $res->message = "hello";
    $total = file_get_contents($list['temp-input-file']);
    @lunlink($list['temp-input-file']);
    $string = explode("\n", $total);
    if (csb($total, "__file::")) {
        ob_end_clean();
        file_server(null, $total);
    } else {
        $reply = process_server_input($total);
        //fprint(unserialize(base64_decode($reply)));
        ob_end_clean();
        print "{$reply}\n{$exitchar}\n";
        flush();
    }
    exit;
}
示例#4
0
 static function checkIfUserExists($name, $id)
 {
     if (posix_getpwnam($name)) {
         $username = $name;
         $list = lfile("/etc/passwd");
         $comment = null;
         foreach ($list as $l) {
             $l = trim($l);
             if (csb($l, "{$username}:")) {
                 $useri = explode(":", $l);
                 $comment = $useri[4];
                 break;
             }
         }
         //dprint($comment . "Hello\n");
         if ($comment === uuser::getUserDescription($id)) {
             log_error("User {$name} Already Exists. But is of the same domain");
             return true;
         } else {
             log_error("User {$name} Already Exists. But is of NOT of the same domain");
             throw new lxexception("User_Exist", 'web_s_uuser_nname', $name);
         }
     }
     return false;
 }
示例#5
0
 static function mail_parse($file)
 {
     $fp = fopen($file, "r");
     $ret['header'] = null;
     $name = str_replace(",", "_s_coma_s_", $file);
     $name = str_replace(":", "_s_colon_s_", $name);
     $ret['nname'] = $name;
     while (!feof($fp)) {
         $l = fgets($fp);
         if ($l === "\n") {
             fclose($fp);
             break;
         }
         if (csb($l, "From:")) {
             $ret['from'] = strfrom($l, "From:");
         }
         if (csb($l, "Subject:")) {
             $ret['subject'] = strfrom($l, "Subject:");
         }
         if (csb($l, "Date:")) {
             $ret['date'] = strfrom($l, "Date:");
         }
         $ret['location'] = basename(dirname(dirname($file)));
         $ret['header'] .= $l;
     }
     if (!isset($ret['subject'])) {
         $ret['subject'] = '[no subject]';
     }
     return $ret;
 }
示例#6
0
function moveToClient()
{
    global $gbl, $sgbl, $login, $ghtml;
    $login->loadAllObjects('ftpuser');
    $l = $login->getList('ftpuser');
    foreach ($l as $b) {
        if (csb($b->parent_clname, 'web-')) {
            list($parentclass, $parentname) = getParentNameAndClass($b->parent_clname);
            $d = new Domain(null, null, $parentname);
            $d->get();
            $b->parent_clname = $d->parent_clname;
            $w = $d->getObject('web');
            $b->directory = "{$w->docroot}/{$b->directory}";
            $b->directory = remove_extra_slash($b->directory);
            $b->setUpdateSubaction();
            $b->write();
        }
    }
    $login->loadAllObjects('mysqldb');
    $l = $login->getList('mysqldb');
    foreach ($l as $b) {
        if (csb($b->parent_clname, 'domain-')) {
            list($parentclass, $parentname) = getParentNameAndClass($b->parent_clname);
            $d = new Domain(null, null, $parentname);
            $d->get();
            $b->parent_clname = $d->parent_clname;
            $b->setUpdateSubaction();
            $b->write();
        }
    }
}
示例#7
0
 static function ConvertToMESMTPAddress($MEAddress)
 {
     if (!csb($MEAddress, "[SMTP:")) {
         return "[SMTP:" . $MEAddress . "]";
     } else {
         return $MEAddress;
     }
 }
示例#8
0
 static function getVersion($list, $name)
 {
     foreach ($list as $v) {
         if (csb($v, $name) || csa($v, " {$name} ")) {
             $ret[] = $v;
         }
     }
     return implode(", ", $ret);
 }
示例#9
0
function check_if_skip($l)
{
    $vlist = array("server-id", "master-host", "master-user", "master-password");
    foreach ($vlist as $v) {
        if (csb($l, $v)) {
            return true;
        }
    }
    return false;
}
示例#10
0
文件: weblib.php 项目: zseand/kloxo
 static function add($parent, $class, $param)
 {
     $ttype = $param['ttype'];
     $redirect = $param['redirect'];
     if ($ttype == 'remote') {
         if (!csb($redirect, "http")) {
             $redirect = "http://" . $redirect;
         }
     }
     $param['redirect'] = $redirect;
     return $param;
 }
示例#11
0
 static function check_for_break($root, $path)
 {
     if (lis_link($path)) {
         $rpath = lreadlink($path);
     } else {
         $rpath = $path;
     }
     dprint("{$rpath} {$root}\n");
     if (!csb($rpath, $root)) {
         throw new lxException("you_are_trying_to_go_outside_your_root", '', '');
     }
 }
 function check_xen_dirlocation()
 {
     $diro = getFirstFromList($this->main->__t_new_xen_location_a_list);
     $dirlocation = $diro->nname;
     if (!csb($dirlocation, "lvm:")) {
         return;
     }
     $dirlocation = fix_vgname($dirlocation);
     $ret = exec_with_all_closed_output("vgdisplay -c {$dirlocation}");
     if (!csa($ret, ":")) {
         throw new lxException("the_lvm_doesnt_exist", 'nname', $dirlocation);
     }
 }
示例#13
0
function get_local_application_version_list()
{
    $list = allinstallapp__linux::getListofApps();
    $list = get_namelist_from_arraylist($list);
    foreach ($list as $k => $v) {
        if (csb($v, "__title")) {
            continue;
        }
        $info = allinstallapp::getAllInformation($v);
        $ret[$v] = $info['pversion'];
    }
    $loc = new Remote();
    $loc->applist = $ret;
    return $loc;
}
示例#14
0
 static function readProcessList()
 {
     $list = lscandir("/proc");
     foreach ($list as $pid) {
         if (is_numeric($pid) && $pid[0] != ".") {
             $cmdlinearr = lfile("/proc/" . $pid . "/cmdline");
             $return[$pid]['nname'] = $pid;
             if (!$cmdlinearr) {
                 unset($return[$pid]);
                 continue;
             }
             $cmdline = $cmdlinearr[0];
             $cmdline = preg_replace('+\\0+i', " ", $cmdline);
             $return[$pid]["command"] = substr($cmdline, 0, 100);
             if (csa($cmdline, "display.php") && csa($cmdline, "kloxo")) {
                 unset($return[$pid]);
                 continue;
             }
             $arr = lfile("/proc/" . $return[$pid]["nname"] . "/status");
             foreach ($arr as $a) {
                 if (csb($a, "State:")) {
                     $a = trim($a);
                     $a = strtil($a, "(");
                     $a = strfrom($a, "State:");
                     $a = trim($a);
                     $return[$pid]["state"] = $a;
                     $return[$pid]["state"] = $return[$pid]["state"] === "S" ? "ZZ" : $return[$pid]["state"];
                 }
                 if (csa($a, "Uid")) {
                     $uidarr = explode(":", $a);
                     $value = trimSpaces($uidarr[1]);
                     $uidarr2 = explode(" ", $value);
                     $uid = trim($uidarr2[1]);
                     $pwd = posix_getpwuid($uid);
                     $username = $pwd['name'];
                     $return[$pid]["username"] = $username;
                 }
                 if (csa($a, "VmSize")) {
                     $uidarr = explode(":", $a);
                     $uidarr = trimSpaces($uidarr[1]);
                     $uidarr = strtilfirst($uidarr, " ");
                     $return[$pid]['memory'] = round($uidarr / 1024, 2);
                 }
             }
         }
     }
     return $return;
 }
示例#15
0
 static function generateGraph($oldtime, $newtime)
 {
     $convertedfile = self::convertfile($oldtime, $newtime);
     if (!$convertedfile) {
         return;
     }
     $list = lscandir("__path_mail_root/domains");
     foreach ($list as $l) {
         if (csb($l, "lists.")) {
             continue;
         }
         $total = self::getmail_usage($convertedfile, $l, $oldtime, $newtime);
         execRrdSingle("mailtraffic", "ABSOLUTE", $l, $total * 1024 * 1024);
     }
     lunlink($convertedfile);
 }
示例#16
0
function __xenimport_get_data()
{
    lxfile_mkdir("/home/oldxenconfig-hypervm");
    $list = lscandir_without_dot("/etc/xen");
    foreach ($list as $l) {
        if (!csb($l, "xm")) {
            continue;
        }
        if (csb($l, "xmexample")) {
            continue;
        }
        $vm[] = __xenimport_parse_config("/etc/xen/{$l}");
        //lxfile_mv("/etc/xen/$l", "/home/oldxenconfig-hypervm");
        lunlink("/etc/xen/auto/{$l}");
    }
    dprintr($vm);
    return $vm;
}
示例#17
0
function isXencfgSkip($l)
{
    if (is_dir("/etc/xen/{$l}")) {
        return true;
    }
    if (csb($l, "xend-")) {
        return true;
    }
    if (csb($l, "xmexample")) {
        return true;
    }
    if (csb($l, "qemu-")) {
        return true;
    }
    if (csa($l, "windows.hvm")) {
        return true;
    }
}
示例#18
0
 function __call($m, $arg)
 {
     $strarg = var_export($arg, true);
     $strarg = str_replace("\n", " ", $strarg);
     $existing = var_export($this->__varlist, true);
     $existing = str_replace("\n", " ", $existing);
     $call = "{$m} {$strarg} on {$this->__name} (existing {$existing})";
     if ($this->__notreal) {
         log_log("com_error", "unreal {$call}");
         return;
     }
     $comerr = false;
     $retcom = false;
     if (csb($m, "com_")) {
         $m = strfrom($m, "com_");
         $retcom = true;
     }
     try {
         //$ret = call_user_func_array(array($this->__com, $m), $arg);
         $string = null;
         for ($i = 0; $i < count($arg); $i++) {
             $string[] = "\$arg[{$i}]";
         }
         if ($string) {
             $string = implode(", ", $string);
         }
         $func = "return \$this->__com->{$m}({$string});";
         dprint("{$func} \n");
         $ret = eval($func);
     } catch (exception $e) {
         log_log("com_error", "Exception: {$e->getMessage()}: {$call}");
         $ret = null;
         $call = "Exception: {$call}";
         $comerr = true;
     }
     if (!$comerr) {
         $call = "Success..: {$call}";
     }
     log_log("com_call", $call);
     if ($retcom) {
         return create_lxcom($ret);
     }
     return $ret;
 }
示例#19
0
function database_main()
{
    global $argc, $argv;
    global $gbl, $login, $ghtml;
    initProgram('admin');
    if ($argv[1] == 'exec') {
        $db = new Sqlite(null, 'client');
        $res = $db->rawQuery($argv[2]);
        foreach ($res as &$r) {
            foreach ($r as $k => &$__r) {
                if (csb($k, "ser_")) {
                    $__r = unserialize(base64_decode($__r));
                }
            }
        }
        print_r($res);
        exit;
    }
}
示例#20
0
function __xenimport_parsedisk(&$ret, $val)
{
    preg_match("/\\['phy:([^']*)'.*'phy:([^']*)'\\]/i", $val, $matches);
    $ret['type'] = 'lvm';
    if (!isset($matches[0])) {
        $ret['type'] = 'file';
        preg_match("/\\['file:([^']*)'.*'file:([^']*)'\\]/i", $val, $matches);
    }
    if (!isset($matches[0])) {
        throw new lxException("could_not_parse_disk_string");
    }
    $diskstring = $matches[1];
    $disk = explode(",", $matches[1]);
    if (csb($disk[0], "/dev/")) {
        $disk[0] = strfrom($disk[0], "/dev/");
    }
    if ($ret['type'] === 'file') {
        $location = "/home/xen";
        $mdn = explode("/", $disk[0]);
        $maindiskname = array_pop($mdn);
    } else {
        list($location, $maindiskname) = explode("/", $disk[0]);
    }
    $ret['location'] = $location;
    $ret['maindiskname'] = $maindiskname;
    $swap = explode(",", $matches[2]);
    if (csb($swap[0], "/dev/")) {
        $swap[0] = strfrom($swap[0], "/dev/");
    }
    if ($ret['type'] === 'file') {
        $location = "/home/xen";
        $swp = explode("/", $swap[0]);
        $swapdiskname = array_pop($swp);
    } else {
        list($location, $swapdiskname) = explode("/", $swap[0]);
    }
    if ($location !== $ret['location']) {
        throw new lxException("swap_disk_location_not_same", 'nname', "{$ret['name']}: {$ret['location']}");
    }
    $ret['swapdiskname'] = $swapdiskname;
}
示例#21
0
 function createVlistDriver(&$vlist, $driver)
 {
     foreach ($driver as $k => $v) {
         $descr = get_classvar_description($k);
         if (!$descr) {
             continue;
         }
         if (!is_array($v) && csb($v, "__v")) {
             continue;
         }
         if (is_array($driver[$k])) {
             $v = "pg_{$k}";
             $ar = implode(", ", $driver[$k]);
             $vlist["driver_b_s_pg_{$k}"] = array('M', create_simpleObject(array('descr' => $descr, 'value' => "{$this->driver_b->{$v}} ({$ar})")));
         } else {
             $v = "pg_{$k}";
             $vlist["driver_b_s_pg_{$k}"] = array('M', create_simpleObject(array('descr' => $descr, 'value' => "{$this->driver_b->{$v}} ({$driver[$k]})")));
         }
     }
     $vlist['__v_button'] = array();
 }
示例#22
0
 function updateUpdate($param)
 {
     // This is sort of a hack... The ssl configuration of the ipaddress has to be reflected properly in the domain too. So the web objects are initialized, the ssl parameters are changed on the fly and synced again. All this is because, apache will refuse to start if the ssl files are missing, which is f*****g terrible. (later)... Apache is actually ok. The whole damn problem is with iis. Be careful about the createExtraVariables. As for now, the web object doesn't create objects from the parent domain object, and thus web object will work indepnednely without the help of the domain parent object. Thus the parent of the web can anything. But if in the at any time in the future the web object starts needing any parameter from the domain, then this will have to be rewritten. Then the domain objects have to initialized first, then the web objects are initialized, and the web can be created only UNDER the domain, and not directly under this object.
     global $gbl, $sgbl, $login, $ghtml;
     $driverapp = $gbl->getSyncClass($this->__masterserver, $this->__readserver, 'web');
     $olddom = $this->domain;
     $newdom = $param['domain'];
     if (!csb($newdom, "lxdummy") && !is_disabled($newdom)) {
         $ip = gethostbyname($newdom);
         if ($ip != $this->getParentO()->ipaddr) {
             throw new lxexception("this_domain_does_not_resolve_to_this_ip", 'domain', $newdom);
         }
     }
     $this->domain = $param['domain'];
     $this->ipaddr = $this->getParentO()->ipaddr;
     $this->setUpdateSubaction();
     $this->write();
     if ($olddom) {
         $odo = new Web(null, $this->syncserver, $olddom);
         $odo->get();
         // Need to get the client here itself so that it won't run into problems later. You don't need the client anymore...
         //$odo->getParentO()->getParentO();
         if ($odo->dbaction !== 'add') {
             $odo->setUpdateSubaction('fixipdomain');
             $odo->was();
         }
     }
     if ($olddom === $newdom) {
         return;
     }
     if (is_disabled($newdom)) {
         return;
     }
     $ndo = new Web(null, $this->syncserver, $newdom);
     $ndo->get();
     //$ndo->getParentO()->getParentO(); //you don't need client anymore..
     $ndo->setUpdateSubaction('fixipdomain');
     $ndo->was();
 }
 static function createPaymentDetail($list)
 {
     $ret['amount'] = $list['mc_gross'];
     $ret['info'] = $list['payer_email'];
     $ret['transactionid'] = $list['txn_id'];
     $id = $list['item_name'];
     if (!csb($id, "lx_")) {
         log_log("paypal_billing", "Not lx_, skipping... {$id}\n");
         return;
     }
     $cllist = explode("_", $id);
     $ret['month'] = $cllist[1];
     array_shift($cllist);
     array_shift($cllist);
     $ret['client'] = implode("_", $cllist);
     if (!$ret['client']) {
         log_log("paypal_billing", "No client for transactionid {$ret['transactionid']}.. Exiting...\n");
         return;
     }
     $ret['ddate'] = time();
     return $ret;
 }
示例#24
0
function checkRestart()
{
    if (if_demo()) {
        return;
    }
    $res = lscandir_without_dot("__path_program_etc/.restart");
    if ($res === false) {
        dprint(".restart does not exist... Creating\n");
        lxfile_mkdir("__path_program_etc/.restart");
        lxfile_generic_chown("__path_program_etc/.restart", "lxlabs");
    }
    foreach ((array) $res as $r) {
        if (csb($r, "._restart_")) {
            $cmd = strfrom($r, "._restart_");
        }
        lunlink("__path_program_etc/.restart/{$r}");
        dprint("Restarting {$cmd}\n");
        // THe 3,4 etc are the tcp ports of this program, and it should be closed, else some programs will grab it.
        //exec("/etc/init.d/$cmd restart  </dev/null >/dev/null 2>&1 3</dev/null 4</dev/null 5</dev/null 6</dev/null &");
        switch ($cmd) {
            case 'lxcollectquota':
                exec_justdb_collectquota();
                break;
            case 'openvz_tc':
                exec_openvz_tc();
                break;
            default:
                exec_with_all_closed("/etc/init.d/{$cmd} restart");
                break;
        }
    }
}
示例#25
0
 function getSyncClass($master, $syncserver, $class)
 {
     global $gbl, $sgbl, $login, $ghtml;
     if (!$login) {
         return;
     }
     if (isLocalhost($master)) {
         $master = 'localhost';
     }
     if ($login->isSuperadmin() && $master === 'localhost') {
         return null;
     }
     if (isLocalhost($syncserver)) {
         $syncserver = 'localhost';
     }
     //Dynamically load the syncserver info....
     if (!isset($this->driver) || !isset($this->driver[$master])) {
         $this->loaddriverappInfo($master);
     }
     if (!isset($this->driver[$master][$syncserver])) {
         $this->loaddriverappInfo($master);
     }
     $class_var = strtolower("pg_" . $class);
     //debugBacktrace();
     $pgm = $this->driver[$master][$syncserver]->driver_b;
     if (isset($pgm->{$class_var})) {
         $str = $pgm->{$class_var};
         if (csb($str, "__v_")) {
             $class_var = "pg_" . strtolower(strfrom($str, "__v_"));
         }
         return $pgm->{$class_var};
     }
     return null;
 }
示例#26
0
 function isSelect()
 {
     return !csb($this->nname, "postmaster@");
 }
示例#27
0
 function createExtraVariables()
 {
     if (csb($this->subaction, 'graph_')) {
         $res = vps::findVpsGraph($this->nname, strfrom($this->subaction, "graph_"));
         $this->__var_graph_list = $res;
     }
 }
示例#28
0
 function getDomainAlist(&$alist)
 {
     $rd = null;
     if ($this->default_domain && !$this->isDisabled('default_domain')) {
         $d = new Domain(null, null, $this->default_domain);
         $d->get();
         if ($d->dbaction === 'clean' && $d->parent_clname === $this->getClName()) {
             $rd = $d;
         }
     }
     if (!$rd) {
         $sq = new Sqlite(null, 'domain');
         $list = $sq->getRowsWhere("parent_clname = '{$this->getClName()}'", array('nname'));
         if ($list) {
             $list = get_namelist_from_arraylist($list);
             $dname = getFirstFromList($list);
             $d = new Domain(null, null, $dname);
             $d->get();
             $rd = $d;
         }
     }
     if (!$rd) {
         return;
     }
     $this->getAlistFromChild($rd, $alist);
     try {
         $m = $this->getFromList('mailaccount', "postmaster@{$rd->nname}");
     } catch (exception $e) {
         return;
     }
     $alist['__title_mailaccount'] = "Mailaccount {$m->nname}";
     //$alist[] =   "a=addform&c=mailaccount";
     $malist = $m->createShowAlist($rslist);
     foreach ($malist as $k => $a) {
         if (csb($k, "__title")) {
             //$alist[$k] = $a;
         } else {
             if (is_string($a)) {
                 $alist[] = "j[class]=mailaccount&j[nname]={$m->nname}&{$a}";
             } else {
                 if (!csb($a->url, "http")) {
                     $a->url = "j[class]=mailaccount&j[nname]={$m->nname}&{$a->url}";
                 }
                 $alist[] = $a;
             }
         }
     }
 }
示例#29
0
function iptraffic_main_v6()
{
    global $global_dontlogshell;
    $res = lxshell_output("ip6tables", "-nvx", "-L", "FORWARD");
    $res = explode("\n", $res);
    $outgoing = null;
    foreach ($res as $r) {
        // First column may have spaces because of the number of digits in the column
        $r = trim($r, ' ');
        // Trim internal spaces
        $r = trimSpaces($r);
        $list = explode(' ', $r);
        if (stripos($r, "source") !== false && stripos($r, "destination") !== false) {
            // header, get important columns number
            for ($i = 0; $i < count($list); $i++) {
                if ($list[$i] == "bytes") {
                    $byteIdx = $i;
                }
                // Removing 1, because the header has an extra field cause of 'target' column
                // FIXME: any better idea?
                if ($list[$i] == "source") {
                    $srcIdx = $i - 1;
                }
                if ($list[$i] == "destination") {
                    $dstIdx = $i - 1;
                }
            }
        }
        if (count($list) != 7) {
            continue;
        }
        $list[$dstIdx] = explode("/", $list[$dstIdx])[0];
        $list[$srcIdx] = explode("/", $list[$srcIdx])[0];
        if (csb($list[$dstIdx], "::")) {
            // Just make sure that we don't calculate this goddamn thing twice, which would happen if there are multiple copies of the same rule. So mark that we have already read it in the sourcelist.
            // OA: Since we dont care lines that have a rule set (fixed above), this wont happen
            if (!isset($sourcelist[$list[$srcIdx]])) {
                $outgoing[$list[$srcIdx]][] = $list[$byteIdx];
                $sourcelist[$list[$srcIdx]] = true;
            }
        } else {
            if (csb($list[$srcIdx], "::")) {
                if (!isset($dstlist[$list[$dstIdx]])) {
                    $incoming[$list[$dstIdx]][] = $list[$byteIdx];
                    $dstlist[$list[$dstIdx]] = true;
                }
            }
        }
    }
    if (!$outgoing) {
        return;
    }
    if (!isset($incoming)) {
        return;
    }
    $realtotalincoming = calculateRealTotal($incoming);
    $realtotaloutgoing = calculateRealTotal($outgoing);
    foreach ($realtotaloutgoing as $k => $v) {
        $vpsid = get_vpsid_from_ipaddress($k);
        if ($vpsid === 0) {
            continue;
        }
        if (!isset($vpsoutgoing[$vpsid])) {
            $vpsoutgoing[$vpsid] = 0;
        }
        if (!isset($vpsincoming[$vpsid])) {
            $vpsincoming[$vpsid] = 0;
        }
        $vpsoutgoing[$vpsid] += $realtotaloutgoing[$k];
        $vpsincoming[$vpsid] += $realtotalincoming[$k];
    }
    $ret = array();
    foreach ($vpsincoming as $k => $v) {
        $ret[$k]['in'] = $vpsincoming[$k];
        $ret[$k]['out'] = $vpsoutgoing[$k];
        $tot = $vpsincoming[$k] + $vpsoutgoing[$k];
        execRrdTraffic("openvzv6-{$k}", $tot, "-{$vpsincoming[$k]}", $vpsoutgoing[$k]);
        $stringa[] = time() . " " . date("d-M-Y:H:i") . " openvzv6-{$k} {$tot} {$vpsincoming[$k]} {$vpsoutgoing[$k]}";
    }
    if ($stringa) {
        $string = implode("\n", $stringa);
        lfile_put_contents("__path_iptraffic_file" . "v6", "{$string}\n", FILE_APPEND);
    }
    lxshell_return("ip6tables", "-Z", "FORWARD");
    return $ret;
}
示例#30
0
 function getLxclientActions(&$alist)
 {
     global $gbl, $sgbl, $login, $ghtml;
     if (!$this->isLogin() && !$this->isLteAdmin() && csb($this->nname, "demo_")) {
         $alist[] = "o=sp_specialplay&a=updateform&sa=demo_status";
     }
 }