Пример #1
0
function task_select(&$state, &$HTML, $rec = -1)
{
    if ($rec < 0) {
        //checking returned
        if (!isset($_GET["row"])) {
            return;
        }
        $rec = $_GET["row"];
        //get row number
    }
    task_list($state);
    //restore the record list
    if (!array_key_exists($rec, $state->records)) {
        throw_the_bum_out(NULL, "Evicted(" . __LINE__ . "): invalid task id " . $rec, true);
    }
    $record = $state->records[$rec];
    if ($record[1] != "") {
        $inactive = new DateTime($record[1]);
        $diff = date_diff($state->from_date, $inactive)->days;
        if ($diff < $state->columns[COL_INACTIVE]) {
            $state->columns[COL_INACTIVE] = $diff;
            $state->columns[COL_AGENT] = "task";
        }
        $record[0] .= "<br>(inactive as of " . $record[1] . ")";
    }
    $state->task_id = $rec;
    $state->msgStatus = "";
    $HTML .= "cell = document.getElementById('TK_" . $state->row . "');\n";
    $HTML .= "cell.innerHTML = '" . $record[0] . "';\n";
}
Пример #2
0
function popup()
{
    $users = new usersMenus();
    if (!$users->winexe_installed) {
        $warn = Paragraphe("64-infos.png", "{APP_WINEXE_NOT_INSTALLED}", "{APP_WINEXE_NOT_INSTALLED_TEXT}", "javascript:Loadjs('setup.index.progress.php?product=APP_WINEXE&start-install=yes');") . "<br>";
    }
    $DEF_ICO_REMOTE_STORAGE = Buildicon64("DEF_ICO_REMOTE_STORAGE");
    $add = Paragraphe("software-task-64.png", "{ADD_NEW_DEPLOY_TASK}", "{ADD_NEW_DEPLOY_TASK_TEXT}", "javascript:AddRemoteTask()");
    $refresh = Paragraphe("64-refresh.png", "{refresh}", "{resfresh_tasks_list}", "javascript:RefreshTaskList()");
    $list = task_list($_GET["uid"]);
    $html = "<H1>{remote_install}::{$_GET["uid"]}</H1>\n\t<table style='width:100%'>\n\t<tr>\n\t<td valign='top' width=1%>{$warn}{$refresh}<br>{$add}<br>{$DEF_ICO_REMOTE_STORAGE}</td>\n\t<td valign='top'>\n\t\t<p class=caption>{remote_install_text}</p>\n\t\t" . RoundedLightWhite("<div id='tk_list' style='width:100%;height:250px;overflow:auto'>{$list}</div>") . "\n\t</td>\n\t</tr>\n\t</table>";
    $tpl = new templates();
    echo $tpl->_ENGINE_parse_body($html, 'storage.center.php');
}
Пример #3
0
function task_select($ID = -1)
{
    global $_STATE;
    if ($ID < 0) {
        //not yet selected
        task_list();
        //restore the record list
        if (!array_key_exists(strval($_POST["selTask"]), $_STATE->records)) {
            throw_the_bum_out(NULL, "Evicted(" . __LINE__ . "): invalid task id " . $_POST["selTask"]);
            //we're being spoofed
        }
        $ID = intval($_POST["selTask"]);
    }
    $_STATE->task_id = $ID;
}
Пример #4
0
	if($usersmenus->AsArticaAdministrator==true){}else{header('location:users.index.php');exit;}	

if(isset($_GET["PID"])){PIDInfos();exit;}
if(isset($_GET["reload"])){echo page_proc();exit;}
if(isset($_GET["KillProcessByPid"])){KillProcessByPid();exit;}
if(isset($_GET["popup"])){popup();exit;}
if(isset($_GET["getmem"])){getmem();exit;}
if(isset($_GET["getcpu"])){getCpu();exit;}
if(isset($_GET["taskslist"])){processes();exit;}
if(isset($_GET["home"])){home();exit;}
if(isset($_GET["home-b"])){home_b();exit;}
if(isset($_GET["home-c"])){home_c();exit;}
if(isset($_GET["task-m"])){tasks_start();exit;}
if(isset($_GET["clean-mem-js"])){clean_mem_js();exit;}
if(isset($_POST["clean-mem-perform"])){clean_mem_perform();exit;}
if(isset($_GET["tasks-list"])){task_list();exit;}
if(isset($_POST["kill9"])){kill9();exit;}
js();

function js(){
$page=CurrentPageName();
$prefix=str_replace(".","_",$page);	
$tpl=new templates();
$title=$tpl->_ENGINE_parse_body('{task_manager}');
$html="RTMMail(1000,'$page?popup=yes','$title');";
echo $html;

}

function clean_mem_js(){
$page=CurrentPageName();
Пример #5
0
        $result = json_decode($result, true);
    }
    return $result ? $result : array();
}
function task_list($admin_id)
{
    $url = $prefix . '/admin/' . $admin_id . '/list';
    $result = request($url);
    if (!empty($result)) {
    }
}
$redis = new RedisExt();
$admin_id = $redis->get('admin_id');
if (!$admin_id) {
    echo '没有找到admin_id,是不是sqlmapapi.py程序没有启动?';
    exit;
}
$task_list = task_list($admin_id);
echo <<<EOF
<html>
    <head>
        <meta charset="utf-8" />
        <title>sqlmap注入管理系统</title>
    </head>

    <body>

    </body>
</html>
EOF
;
Пример #6
0
function task_select(&$state, &$HTML, $rec = -1)
{
    if ($rec < 0) {
        //checking returned
        if (!isset($_GET["row"])) {
            return;
        }
        $rec = strval($_GET["row"]);
    }
    task_list($state);
    //restore the record list
    if (!array_key_exists($rec, $state->records)) {
        throw_the_bum_out(NULL, "Evicted(" . __LINE__ . "): invalid task id " . $rec, true);
    }
    $record = $state->records[$rec];
    if ($record[1] != "") {
        $inactive = new DateTime($record[1]);
        if ($inactive < $state->inactive_date) {
            $state->inactive_date = $inactive;
            $state->max_column = date_diff($state->from_date, $inactive)->days - 1;
            //0 rel
        }
        $record[0] .= "<br>(inactive as of " . $record[1] . ")";
    }
    $state->task_id = $rec;
    $state->msgStatus = "";
    $HTML .= "cell = document.getElementById('TK_0');\n";
    $HTML .= "cell.innerHTML = '" . $record[0] . "';\n";
}
include_once 'ressources/class.ini.inc';
include_once 'ressources/class.cyrus.inc';
include_once 'ressources/class.cron.inc';
$users = new usersMenus();
if (!$users->AsPostfixAdministrator) {
    $tpl = new templates();
    $error = $tpl->javascript_parse_text("{ERROR_NO_PRIVS}");
    echo "alert('{$error}')";
    die;
}
if (isset($_GET["popup"])) {
    popup();
    exit;
}
if (isset($_GET["tasks-list"])) {
    task_list();
    exit;
}
if (isset($_POST["KillTHREAD"])) {
    task_kill();
    exit;
}
js();
function js()
{
    header("content-type: application/x-javascript");
    $page = CurrentPageName();
    $tpl = new templates();
    $title = $tpl->javascript_parse_text("{processes_list}");
    $html = "YahooWin3('997.6','{$page}?popup=yes','{$title}')";
    echo $html;
Пример #8
0
<?php

require_once 'config/tank_config.php';
$getjson = file_get_contents('php://input');
$dataarr = json_decode($getjson, true);
$token = $dataarr['token'];
$tab = $dataarr['tab'];
$uid = check_token($token);
if ($uid != 3) {
    $to = 0;
    if ($tab == "mtask") {
        $to = $uid;
    }
    $from = 0;
    if ($tab == "ftask" || $tab == "etask") {
        $from = $uid;
    }
    $creat = 0;
    if ($tab == "ctask") {
        $creat = $uid;
    }
    $task_list = task_list($to, $from, $creat, "", "", "", "+", "", "", "", "", "", $multilingual_dd_status_exam, "--", "--", "csa_last_update", "DESC", "0", $tab);
    $exam = sum_exam($uid);
    $rearr = array('exam' => $exam, 'list' => $task_list);
    $redata = json_encode($rearr);
    echo $redata;
} else {
    echo 3;
}