query($updateUserQuery, array('si', $text, $id)); } if ($_POST['listaid'] && isset($_POST['CbBoxValue'])) { $listaid = substr($_POST['listaid'], 5); $updateUserQuery = "UPDATE `www_archline_hu`.`crash` SET eredmeny = ? WHERE id = ? LIMIT 1;"; Database::getInstance()->query($updateUserQuery, array('ii', $_POST['CbBoxValue'], $listaid)); } } function downloadFile($filename) { if ($f = fopen($filename, "rb")) { $content_len = (int) filesize($filename); //@ini_set('zlib.output_compression', 'Off'); header('Pragma: public'); //header('Last-Modified: '.gmdate('D, d M Y H(idea)(worry)') . ' GMT'); header('Cache-Control: no-store, no-cache, must-revalidate'); // HTTP/1.1 header('Cache-Control: pre-check=0, post-check=0, max-age=0'); // HTTP/1.1 header('Content-Transfer-Encoding: none'); header('Content-Type: plain/text'); header('Content-Disposition: inline; filename="' . $filename . '"'); header("Content-length: $content_len"); while (!feof($f)) { echo fread($f, 2 << 20); } fclose($f); } else { print "error opening file"; } exit(); } if (isset($_GET) && !empty($_GET)) { $filepath = "/home/vendeg/crash/"; $filepath .= $_GET["guid"]; if (!file_exists($filepath)) $filepath = "../webdav/crash/" . $_GET['guid']; downloadFile($filepath); } else { ?> '; if (isset($_SESSION["maxdate"]) || isset($_SESSION["mindate"]) || isset($_SESSION["lista"])) { echo 'Dátum szűrés
-tól     -ig'; } else { echo 'Dátum szűrés
-tól     -ig'; } ?>

Eredmény szűrő:




= ? "; $bind .= 's'; } if (isset($_POST['datemax'])) { array_push($feltetel, $_POST['datemax']); $query .= "AND left(datum, 10) <= ? "; $bind .= 's'; } if (isset($_POST['lista']) && $_POST['lista'] != "%") { array_push($feltetel, $_POST['lista']); $query .= "AND eredmeny = ? "; $bind .= 'i'; } if (isset($_POST['prod']) && $_POST['prod'] != "") { array_push($feltetel, $_POST['prod']); $query .= "AND prod = ? "; $bind .= 's'; } $query .= "ORDER BY id DESC LIMIT 500;"; array_unshift($feltetel, $bind); Database::getInstance()->query($query, $feltetel); $results = Database::getInstance()->fetchAssoc(); print "
"; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print ""; foreach ($results as $result) { $r = (object)$result; $filepathFtp = "/home/vendeg/crash/"; $filepathFtp .= $r->guid; $filepathFtp .= ".DMP"; $filepathWebdav = "../webdav/crash/"; $filepathWebdav .= $r->guid; $filepathWebdav .= ".DMP"; $crashFile = "../webdav/crash/" . $r->guid . ".crh"; if (!file_exists($filepathFtp) && !file_exists($filepathWebdav) && !file_exists($crashFile)) continue; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print ""; print ""; } print ''; print ''; print ''; print ''; print ''; print "
EmailÜzenetDátumDmp fájlInfo fájlCrash fájlMegjegyzésEredmény
"; print $r->email; print ""; print $r->info; print ""; //print substr($r->datum,0,10); print $r->datum; print ""; if (file_exists($filepathFtp) || file_exists($filepathWebdav)) { echo '' . $r->guid . ''; } print ""; $infoPath = '/home/vendeg/crash/' . $r->guid . '.TXT'; $infoPathWebdav = '../webdav/crash/' . $r->guid . '.TXT'; $logPath = '/home/vendeg/crash/' . $r->guid . '.LOG'; $logPathWebdav = '../webdav/crash/' . $r->guid . '.LOG'; $crashPath = '../webdav/crash/' . $r->guid . '.crh'; $logExtension = '.LOG'; $infoExtension = '.TXT'; $crashExtension = '.crh'; if (!file_exists($infoPath) && !file_exists($infoPathWebdav)) { $infoPath = '/home/vendeg/crash/' . $r->guid . '.XML'; $infoExtension = '.XML'; } if (file_exists($infoPath) || file_exists($infoPathWebdav)) { echo 'Info'; } if (file_exists($logPath) || file_exists($logPathWebdav)) { echo ' Log'; } if (file_exists($infoPath)) { $file = '/home/vendeg/crash/' . $r->guid . '.TXT'; if (!file_exists($file)) $file = $infoPathWebdav; $searchfor = 'developer'; $contents = file_get_contents($file); $pattern = preg_quote($searchfor, '/'); $pattern = "/^.*$pattern.*\$/m"; if (preg_match_all($pattern, $contents, $matches)) echo "developer"; $searchfor = 'Product: render'; $contents = file_get_contents($file); $pattern = preg_quote($searchfor, '/'); $pattern = "/^.*$pattern.*\$/m"; if (preg_match_all($pattern, $contents, $matches)) { echo "render"; } } print ""; if (file_exists($crashPath)) { echo ' Crash'; } print ""; echo ""; print ""; switch ($r->eredmeny) { case '0': echo ' '; break; case '1': echo ' '; break; case '2': echo ' '; break; case '3': echo ' '; break; case '4': echo ' '; break; case '5': echo ' '; break; case '6': echo ' '; break; case '7': echo ' '; break; } print "
"; ?>