Пример #1
0
<?php

if ($BILLEVEL < 5) {
    return;
}
$BILL = new CBilling($GV["dbhost"], $GV["dbname"], $GV["dblogin"], $GV["dbpassword"]);
$BILL->KillInactiveUsers();
$list = $BILL->GetOnlineUsersData();
if (!isset($action)) {
    $action = "";
}
if ($action == "save") {
    $error = "";
    $GV['max_month_traffic'] = mb2bytes($max_month_traffic);
    $GV['start_year'] = $start_year;
    $res = "<?php\r\n";
    $res .= "\$GV['start_year']=" . $GV['start_year'] . ";\r\n";
    $res .= "\$GV['max_month_traffic']=" . $GV['max_month_traffic'] . ";\r\n";
    $res .= "\$GV['max_month_time']=" . $GV['max_month_time'] . ";\r\n";
    $res .= "?>";
    $fp = fopen($GV["modules_conf_dir"] . "/smadbisext.conf.php", "w+");
    if (!$fp) {
        $error .= "<b>Ошибка:</b> Невозможно открыть файл!";
    }
    if (!$error) {
        fwrite($fp, $res);
        fclose($fp);
    }
    if (!$error) {
        OUT("<div align=center>Сохранено!</div><br><div align=center><a href=\"?p={$p}&act={$act}\">назад</a></div>");
    } else {
Пример #2
0
<?php

if ($BILLEVEL < 3) {
    return;
}
$BILL = new CBilling($GV["dbhost"], $GV["dbname"], $GV["dblogin"], $GV["dbpassword"]);
$BILL->KillInactiveUsers();
if (!isset($sort)) {
    $sort = "start_time";
}
$list = $BILL->GetOnlineUsersData($sort);
if (!isset($action)) {
    $action = "";
}
if ($action == "message") {
    if ($sure == "true") {
        $klmessage = str_replace("'", "", $klmessage);
        $klmessage = $FLTR->DirectProcessString($klmessage);
        $prg = $GV["send_program"] . " " . $klip . " '" . $klmessage . "'" . " &";
        //die($prg);
        //$res=shell_exec("nohup $prg> /dev/null 2>&1 &");
        $res = shell_exec("{$prg}");
        //echo($prg.":<br>".$res."<br>");
        //exec($GV["kill_program"]." ".$user." ".$server." ".$ip." ".$port);
        //$BILL->KillUser($port);
        //$list=$BILL->GetOnlineUsersData();
        setpage("?p={$p}&act={$act}");
    } else {
        ?>
     <div align=center><b>Напишите сообщение следующим пользователям:</b></div>
     <table width=100% align=center class=tbl2><td>