Пример #1
0
 }
 $filename = $env['output_path'] . "/hive_res." . $str . ".csv";
 if ($_SESSION['role'] != "superadmin") {
     $logfile = $env['logs_path'] . $_SESSION['username'] . "_" . $str . ".log";
 } else {
     if (is_numeric(substr($_GET['str'], 0, 1))) {
         $logfile = $env['logs_path'] . $_SESSION['username'] . "_" . $_GET['str'] . ".log";
     } else {
         $logfile = $env['logs_path'] . $_GET['str'];
     }
 }
 if (file_exists($filename)) {
     if (filesize($filename) != 0) {
         echo "<input type=button class=\"btn btn-success\" name=download value=\"" . $lang['downloadResultFile'] . "\" onclick=\"window.open('download.php?str=" . $str . "');\"><br><br>";
         $etc = new Etc();
         $array_column = $etc->SplitSqlColumn($logfile);
         $array = $etc->GetResult($filename);
         $array = explode("\n", substr($array, 0, -1));
         //stop at last return
         $i = 0;
         echo "<table class=\"table table-striped table-hover table-bordered table-condensed\">\n";
         echo "<tr class=\"info\">";
         foreach ($array_column as $ka => $va) {
             echo "<td>";
             echo $va;
             echo "</td>";
         }
         echo "</tr>";
         foreach ($array as $k => $v) {
             $arr = explode(",", $v);
             echo "<tr " . $color . ">\n";