<?php
session_start();
if (isset($_SESSION['user']['id'])) {
header("Location: /profile.php");
exit;
}
require_once __DIR__ . '/scr/connect.php';
$connect = getDB();<?php
session_start();
$idUser = $_SESSION['user']['id'] ?? null;
if ($idUser === null) {
header("Location: /login.php");
exit;
}
require_once __DIR__ . '/scr/connect.php';
$connect = getDB(); typedef int (__stdcall *crsGetStringType)(void *, int, char *Destination, int Count);
Note that like fetch() itself, json() is asynchronous, as are all the other methods to access the response body content.
TCP_TABLE_OWNER_PID_CONNECTIONS.<button class="btn-chapter" data-chapter="1">Глава 1</button>
<button class="btn-chapter" data-chapter="2">Глава 2</button>
<button class="btn-chapter" data-chapter="3">Глава 3</button>
<button class="btn-chapter" data-chapter="4">Глава 4</button>
<button class="btn-chapter" data-chapter="5">Глава 5</button>
<div class="chapter" id="chapter-1"><h2>Глава 1: Основы Фотошопа - Растровая графика</h2></div>
<div class="chapter" id="chapter-2"><h2>Глава 2: Основы Фотошопа - Растровая графика</h2></div>
<div class="chapter" id="chapter-3"><h2>Глава 3: Основы Фотошопа - Растровая графика</h2></div>
<div class="chapter" id="chapter-4"><h2>Глава 4: Основы Фотошопа - Растровая графика</h2></div>
<div class="chapter" id="chapter-5"><h2>Глава 5: Основы Фотошопа - Растровая графика</h2></div>.chapter {
display: none;
}
.chapter.is-open {
display: block;
}document.addEventListener('DOMContentLoaded', function() {
const allChapters = document.querySelectorAll('.chapter');
const closeAllChapters = () => allChapters.forEach(el => el.classList.remove('is-open'));
const openChapterById = id => document.getElementById(id).classList.add('is-open');;
document.querySelectorAll('.btn-chapter').forEach(btn => {
btn.addEventListener('click', () => {
closeAllChapters();
openChapterById(`chapter-${btn.dataset.chapter}`);
});
});
}); ссылка на объект типа Element соответствующий указанному ID или null, если элемент с указанным ID не найден в документе.