'Failed to fetch data from external API', 'details' => curl_error($ch)]);
} else {
$decoded_response = json_decode($response, true);
if (json_last_error() !== JSON_ERROR_NONE) {
error_log('JSON decode error (AJAX request): ' . json_last_error_msg() . ' for response: ' . $response);
http_response_code(500);
echo json_encode(['error' => 'Invalid JSON response from external API', 'raw_response' => $response]);
} else {
echo json_encode($decoded_response);
}
}
curl_close($ch);
exit(); // IMPORTANT: Stop script execution after handling AJAX request
}
// If not an AJAX request, proceed with normal page load (HTML output)
// Log the specific action here when the tool is accessed (normal page load)
logActivity("Action 789Club - Tool FlashLight", $logged_in_key);
// Key validation for normal page load
if (file_exists($json_file)) {
$json_data = file_get_contents($json_file);
$keys = json_decode($json_data, true);
if (json_last_error() !== JSON_ERROR_NONE) {
error_log("Error decoding keyUserccv.json: " . json_last_error_msg());
logActivity("System error - Invalid JSON data", $logged_in_key);
redirectAndClearSession("Lỗi dữ liệu hệ thống key. Vui lòng thử lại sau.");
}
} else {
logActivity("System error - Key file not found", $logged_in_key);
redirectAndClearSession("Không tìm thấy dữ liệu key người dùng. Vui lòng liên hệ Admin.");
}
$user_key_info = null;
$key_found = false;
$updated_keys = [];
foreach ($keys as $key_data) {
if (isset($key_data['key']) && $key_data['key'] === $logged_in_key) {
$key_found = true;
$user_key_info = $key_data;
if (isset($user_key_info['ngay_het_han'])) {
$expiration_date = new DateTime($user_key_info['ngay_het_han']);
$current_date = new DateTime();
if ($current_date > $expiration_date) {
logActivity("Attempted access with expired key", $logged_in_key);
redirectAndClearSession("Key của bạn đã hết hạn. Vui lòng mua key mới.");
}
}
if (isset($user_key_info['ban']) && $user_key_info['ban'] === true) {
logActivity("Attempted access with banned key", $logged_in_key);
redirectAndClearSession("Key của bạn đã bị cấm. Vui lòng liên hệ Admin.");
}
$updated_keys[] = $key_data;
} else {
$updated_keys[] = $key_data;
}
}
if (!$key_found) {
logActivity("Attempted access with invalid key", $logged_in_key);
redirectAndClearSession("Key của bạn không còn tồn tại trong hệ thống. Vui lòng đăng nhập lại.");
}
if ($keys !== $updated_keys) {
if (!file_put_contents($json_file, json_encode($updated_keys, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE))) {
error_log("Error writing updated keys to keyUserccv.json");
logActivity("System error - Failed to update key file", $logged_in_key);
}
}
// --- END: Key Validation and Authentication Logic ---
?>
789Club - Chiếu Sáng
body {
font-family: 'Inter', sans-serif;
overflow: hidden;
background-color: #f3f4f6;
min-height: 100vh;
position: relative;
}
#backgroundIframe {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
border: none;
z-index: 1;
}
#gifContainer {
position: absolute;
cursor: grab;
touch-action: none;
left: 100vw;
top: calc(50vh - 75px);
animation: slideAndRotateIn 1s ease-out forwards;
transform-origin: center center;
z-index: 10;
}
#movableGif {
width: 150px;
height: auto;
border-radius: 8px;
}
#messageBox {
position: absolute;
top: 20px;
left: 50%;
transform: translateX(-50%);
z-index: 10;
display: none;
}
#counterDisplay {
position: absolute;
top: 20px;
left: 20px;
background-color: rgba(0, 0, 0, 0.7);
color: white;
padding: 8px 12px;
border-radius: 8px;
font-size: 1.1rem;
z-index: 10;
display: none; /* Keep hidden if not used for general counter */
}
#sessionDisplay {
position: absolute;
top: 20px;
right: 20px; /* Positioned to the right */
background-color: rgba(0, 0, 0, 0.7);
color: white;
padding: 8px 12px;
border-radius: 8px;
font-size: 1.1rem;
z-index: 10;
}
#linearElement {
position: absolute;
width: 60px;
height: 60px;
background-color: transparent;
transform: rotate(90deg); /* linearElement itself is rotated 90deg */
display: flex;
justify-content: center;
align-items: center;
border-radius: 4px;
box-shadow: none;
text-align: center;
padding: 0;
box-sizing: border-box;
z-index: 5;
border: 2px solid transparent;
border-image: linear-gradient(to right, red, pink) 1;
border-image-slice: 1;
opacity: 1;
transition: opacity 0.3s ease-out;
}
/* Style for the text inside linearElement */
#linearElement .rotated-text {
color: black; /* Or any color you prefer for the text */
font-size: 12px;
white-space: nowrap;
transform: rotate(-90deg); /* Counter-rotate the text to make it readable */
position: absolute; /* Allows precise positioning within the rotated parent */
top: 50%;
left: 50%;
transform: translate(-50%, -50%) rotate(-90deg); /* Center and counter-rotate */
}
#imageDisplay {
position: absolute;
width: 60px;
height: 60px;
display: flex;
justify-content: center;
align-items: center;
opacity: 0;
transition: opacity 0.7s ease-out;
z-index: 6;
border-radius: 4px;
overflow: visible;
}
#imageDisplay img {
max-width: 100%;
max-height: 100%;
object-fit: contain;
transform: rotate(90deg);
border: none; /* Explicitly remove border from image */
}
#imageDisplay.activated {
position: relative;
}
/* REMOVED: The CSS rule that added the blue/white gradient border */
/*
#imageDisplay.activated::before {
content: '';
position: absolute;
top: -2px;
left: -2px;
right: -2px;
bottom: -2px;
border: 2px solid transparent;
border-image: linear-gradient(to right, seagreen, white) 1;
border-image-slice: 1;
border-radius: 4px;
z-index: -1;
}
*/
@keyframes slideAndRotateIn {
from {
left: 100vw;
transform: rotate(0deg);
}
to {
left: calc(50vw - 75px);
transform: rotate(20deg);
}
}
Phiên:
Phiên: Đang tải...