123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- <?php
- include "auth.php";
- include "qrcode.php";
- if (isset($_POST['format']) && $_POST['format'] =='png') {
- $machineid = htmlentities(mysqli_real_escape_string($link, $_POST['machine']));
- $filelist = glob($PNG_WEB_DIR .$machineid. "/"."*.png");
- for ($i = 0; $i < count($filelist); $i++) {
- echo "<a href=" . "$filelist[$i]" . "><img src=" . "$filelist[$i]" . ">" . "</a>";
- if ($i % 3 == 0)
- echo "<br>";
- }
- }
- if (isset($_POST['format']) && $_POST['format'] =='php') {
- $machineid = htmlentities(mysqli_real_escape_string($link, $_POST['machine']));
- $filelist = glob($PNG_WEB_DIR .$machineid. "/"."*.php");
- for ($i = 0; $i < count($filelist); $i++) {
- // echo $filelist[$i];
- echo "<a href=" . "$filelist[$i]" . ">" . $filelist[$i] . "</a>";
- echo "<br>";
- }
- }
- if (isset($_POST['format']) && $_POST['format'] =='txt') {
- $machineid = htmlentities(mysqli_real_escape_string($link, $_POST['machine']));
- $filelist = glob($PNG_WEB_DIR .$machineid. "/"."*.txt");
- for ($i = 0; $i < count($filelist); $i++) {
- // echo $filelist[$i];
- echo "<a href=" . "$filelist[$i]" . ">" . $filelist[$i] . "</a>";
- echo "<br>";
- }
- }
- if (isset($_POST['format']) && $_POST['format'] =='all') {
- $machineid = htmlentities(mysqli_real_escape_string($link, $_POST['machine']));
- $filelist = glob($PNG_WEB_DIR .$machineid. "/"."*.*");
- for ($i = 0; $i < count($filelist); $i++) {
- // echo $filelist[$i];
- echo "<a href=" . "$filelist[$i]" . ">" . $filelist[$i] . "</a>";
- echo "<br>";
- }
- }
- ?>
|