From c406e838f0e89113086088f44943ad33f202f37c Mon Sep 17 00:00:00 2001 From: Goeran Heinemann Date: Fri, 6 Mar 2020 00:03:29 +0100 Subject: [PATCH] =?UTF-8?q?index=20seite=20l=C3=A4sst=20daten=20durchst?= =?UTF-8?q?=C3=B6bern?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.php | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 index.php diff --git a/index.php b/index.php new file mode 100644 index 0000000..e44446b --- /dev/null +++ b/index.php @@ -0,0 +1,35 @@ +'; +foreach ($pdo->query($sql) as $row){ + echo ''.$row['title'].''.$row['link'].''; +} + +if (isset($_GET['source'])){ + if (!isset($_GET['time'])){ + $sql = "SELECT * FROM scans WHERE site=?"; + $stmt = $pdo->prepare($sql); + $stmt->bindParam(1, $_GET['source']); + $stmt->execute(); + $data = $stmt->fetchAll(PDO::FETCH_ASSOC); + echo ''; + foreach ($data as $row){ + echo ''; + } + echo '
'.$row['time'].'
'; + }else{ + $sql = "SELECT * FROM data WHERE scan=?"; + $stmt = $pdo->prepare($sql); + $stmt->bindParam(1, $_GET['time']); + $stmt->execute(); + $data = $stmt->fetchAll(PDO::FETCH_ASSOC); + echo ''; + foreach ($data as $row){ + echo ''; + } + echo '
'.$row['place'].''.$row['amount'].'
'; + } +} \ No newline at end of file