⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.124
Server IP:
50.28.103.30
Server:
Linux host.jcukjv-lwsites.com 4.18.0-553.22.1.el8_10.x86_64 #1 SMP Tue Sep 24 05:16:59 EDT 2024 x86_64
Server Software:
nginx/1.28.0
PHP Version:
8.3.12
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
www
/
wwwroot
/
food.electronharmony.com
/
php
/
View File Name :
update-settings.php
<?php require_once '../database/sql.php'; // 上传目录 $uploadDir = '../uploads/'; if (!is_dir($uploadDir)) mkdir($uploadDir, 0777, true); // 获取 POST 数据 $id = $_POST['id'] ?? 0; $websitename = $_POST['websitename'] ?? ''; $keywords = $_POST['keywords'] ?? ''; $description = $_POST['description'] ?? ''; // 处理 favicon 上传 $faviconPath = $_POST['existing_favicon'] ?? ''; if (!empty($_FILES['favicon']['name'])) { $faviconName = time() . '_favicon_' . basename($_FILES['favicon']['name']); move_uploaded_file($_FILES['favicon']['tmp_name'], $uploadDir . $faviconName); $faviconPath = $faviconName; // 只保存文件名 } // 处理 logo 上传 $logoPath = $_POST['existing_logo'] ?? ''; if (!empty($_FILES['logo']['name'])) { $logoName = time() . '_logo_' . basename($_FILES['logo']['name']); move_uploaded_file($_FILES['logo']['tmp_name'], $uploadDir . $logoName); $logoPath = $logoName; // 只保存文件名 } // 执行更新 $stmt = $conn->prepare("UPDATE system_settings SET websitename=?, keywords=?, description=?, favicon=?, logo=? WHERE id=?"); $stmt->bind_param("sssssi", $websitename, $keywords, $description, $faviconPath, $logoPath, $id); if ($stmt->execute()) { echo "Update successful."; } else { echo "Error: " . $stmt->error; } $stmt->close(); $conn->close(); ?>