private function getDetail()
{
if (!$this->detailCache) {
// Здесь запрос к API который возвращает JSON с информацией о товаре.
$this->detailCache = $data;
}
return $this->detailCache;
}
public function loadConfig(string $path) {
if (!file_exists($path)) {
throw new InvalidArgumentException('bad path');
}
$this->config = include($path);
}
public function saveConfig(string $path) { // test/1.cnf
file_put_contents($path, "<?php\n\n" . 'return ' . var_export($this->config, true) . ";\n");
}
<?php
$id = $_COOKIE["auth_id"];
require("../connect.php");
$query_lobby = mysqli_query($connection, "SELECT * FROM lobby WHERE id_taker='$id' and status = 1");
while ($row_send = mysqli_fetch_assoc($query_lobby)){
$query = "SELECT * FROM users WHERE id='" . $row_send['id_sender'] . "'";
$result = mysqli_query($connection, $query) or die(mysqli_error($connection));
$row = $result->fetch_assoc();
$sender_name = $row['username'];
$sender_id = $row['id'];
$sender_avatar = $row['avatar'];
print_r("$sender_id");
?>
<div class="accountFriendlist" style="justify-content:center; display:flex;">
<div class="friendsList" style="width:500px;">
<div class="friend">
<div class="friendInfo" style="cursor:auto;">
<?php
if (isset($row['avatar'])) { ?>
<div class="avatar" style="width:75px;height:75px"><img style="width: 75px;
height: 75px; border-radius: 50%;" src="/avatars/'.$sender_avatar.'" alt=""></div>
<?php
} else { ?>
<div class="avatar"><?php
printf($sender_name[0]) ?></div>
<?php } ?>
<div class="nickname">
<?= $sender_name?> id <?= $sender_id?>
</div>
<div class="inviteDate" style="padding-left:10px;">
<?= $row_send['date']?>
</div>
</div>
<div class="actions" style="cursor: pointer;">
<div class="acceptLobby"><a style="font-weight: 600;
font-size: 18px;
color: #4994e1;
cursor: pointer;
text-align: center;" onclick="acceptLobby(<?= $sender_id?>, <?= $id?>);">
<i class="fas fa-plus"></i>Join</a></div>
<div class="cancelLobby">
<a style="
font-weight: 500;
font-size: 12px;
opacity: .5;
letter-spacing: 1.5px;
text-transform: uppercase;
color: #4994e1;
cursor: pointer;
text-align: center;" onclick="cancelLobby(<?= $sender_id?>, <?= $id?>);">Cancel</a></div>
</div>
</div>
</div>
</div>
<?php } ?>
$pdf->AddPage();
$pdf->Cell(58, 10, $time, 1, 0, 'C', false);
$pdf->Ln(10);
$pdf->Cell(38, 10, ..., 1, 0, 'C', false);
$pdf->Cell(20, 10, ..., 1, 0, 'C', false);
$pdf->Ln(20);
$pdf->MultiCell(55, 5, $adr, 0, 'C', false);
SELECT
`messages`.`id` AS `messages_id`, `money_box`.`id` AS `money_box_id`
FROM `messages` JOIN `money_box`
PHP-страницу upload.php с формой загрузки CSV-файла
Рядом с файлом upload.php требуется создать папку /upload/
прочитав CSV-файл.
и создать в ней файлы
соответствующим содержимым