/
/
home
/
u523034047
/
domains
/
digilockercisceboard.org
/
public_html
Server: in-mum-web1112.main-hosting.eu (62.72.28.111)
You: 216.73.216.137
PHP 8.3.16
Dir:
/home/u523034047/domains/digilockercisceboard.org/public_html
Edit:
/home/u523034047/domains/digilockercisceboard.org/public_html/process.php
<?php if(isset($_POST['unique_id'])){ // Only numbers allow $uniqueId = preg_replace('/[^0-9]/', '', $_POST['unique_id']); // Class value $class = $_POST['class']; // File path with class filter $filePath = "pdf/" . $uniqueId . "_" . $class . ".pdf"; if(file_exists($filePath)){ $fileUrl = "https://digilockercisceboard.org/" . $filePath; $encodedUrl = urlencode($fileUrl); $random = time(); ?> <!DOCTYPE html> <html> <head> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document View</title> <style> body{ font-family: Arial; text-align:center; background:#f4f6f9; margin:0; } .box{ max-width:1000px; margin:20px auto; background:#fff; padding:20px; border-radius:10px; box-shadow:0 5px 15px rgba(0,0,0,0.1); } .pdf-view{ width:100%; height:85vh; border:none; } .btn{ display:inline-block; margin-top:20px; padding:12px 25px; background:#2f5bd3; color:#fff; text-decoration:none; border-radius:30px; } </style> </head> <body> <div class="box"> <h2> Student ID: <?php echo $uniqueId; ?> | Class: <?php echo $class; ?> </h2> <iframe src="https://docs.google.com/gview?url=<?php echo $encodedUrl; ?>&embedded=true&v=<?php echo $random; ?>" class="pdf-view"> </iframe> <a href="<?php echo $filePath; ?>" class="btn" download> Download PDF </a> </div> </body> </html> <?php } else { echo "<script>alert('Document Not Found!'); window.location='index.php';</script>"; } } ?>
Ukuran: 1.6 KB