File "content.phtml"
Full Path: /www/wwwroot/turbocarclub.com/themes/asur/layout/user-profile/content.phtml
File size: 12.02 KB
MIME-type: --
Charset: utf-8
<?php global $zon, $site_url, $socket;
if (isset($_GET) && isset($_GET['token'])) {
$token = mysqli_real_escape_string($socket, $_GET['token']);
if (mysqli_query($socket, "DELETE FROM zon_comments WHERE id=$token")) {
echo "<script>window.location.href = '?'</script>";
}
}
?>
<div class="zon-game-container">
<?php if ($zon['page'][1] == 'comments') { ?>
<h1 class="text-3xl mb-8 mt-3 block page-heading">Your Comments</h1>
<div class="mt-2">
<?php
if (getUserComments($zon['user']['id'])) {
foreach (getUserComments($zon['user']['id']) as $comment) {
?>
<div class="comment-card mb-6 w-full">
<div class="flex w-full items-center gap-4">
<img class="w-20 h-8 rounded-full"
src="<?php echo $site_url . 'static/img/' . $comment['user_pic'] ?>" />
<div class="uc-meta">
<div class="flex gap-4">
<span class="font-semibold ">
<?= $comment['username'] ?>
</span>
<a class="text-red-600 text-sm" href="?token=<?= $comment['id'] ?>">Delete</a>
</div>
<p class="text-xs " style="color: var(--zon-muted-color);">
<?= $comment['date'] ?>
</p>
<p>
<?= $comment['subject'] ?>
</p>
</div>
</div>
</div>
<?php }
} else {
echo "You haven't commented in any games yet.";
} ?>
</div>
<?php }
?>
<?php if ($zon['page'][1] == 'likes') { ?>
<!-- <h1 class="text-3xl mb-8 mt-3 block page-heading">Your Liked Games</h1>
<div class="game__grid home__game__grid">
<?php
if (getUserGame($zon['user']['id'])) {
foreach (getUserGame($zon['user']['id']) as $game) { ?>
<div class="game new__badges wow <?php echo $zon['config']['animate_class'] ?>">
<a href="<?= $site_url . 'game/' . makeSlug($game['game_name']) . '/' . $game['id'] ?>" class="game__thumb">
<img src="<?= $game['game_image_url'] ?>" alt="<?= $game['game_name'] ?>" />
</a>
<a href="<?= $site_url . 'game/' . makeSlug($game['game_name']) . '/' . $game['id'] ?>" class="game_name">
<?= $game['game_name'] ?>
</a>
</div>
<?php }
} else {
echo "You haven't liked any games yet";
} ?>
</div> -->
<div class="layout-section">
<div class="container">
<div class="row gx-lg-5">
<div class="col-lg-3">
<div class="card mb-4">
<div class="card-body text-center py-lg-6">
<div class="avatar avatar-2xl rounded-circle text-white fs-lg mb-3">
<img
src="<?= $site_url ?>static/img/<?= $zon['user']['user_pic'] != '' ? $zon['user']['user_pic'] : 'user_pic.png' ?>" />
</div>
<h1 class="h4 mb-2"><?= $zon['user']['username'] ?></h1>
</div>
</div>
</div>
<div class="col-lg-9">
<div class="layout-section">
<div class="layout-heading mb-3 text-muted d-flex align-items-center">
<h3 class="fs-lg fw-bold mb-0">
Liked games </h3>
</div>
<div class="card-masonry">
<?php
if (getUserGame($zon['user']['id'])) {
foreach (getUserGame($zon['user']['id']) as $game) { ?>
<a href="<?= $site_url . 'game/' . makeSlug($game['game_name']) . '/' . $game['id'] ?>"
class="card wow <?php echo $zon['config']['animate_class'] ?> <?= isFeaturedGame($game['id']) ? 'large' : '' ?>">
<picture>
<source data-srcset="<?= $game['game_image_url'] ?>" type="image/webp"
class="img-fluid" srcset="<?= $game['game_image_url'] ?>">
<source data-srcset="<?= $game['game_image_url'] ?>" type="image/png"
class="img-fluid" srcset="<?= $game['game_image_url'] ?>">
<img data-src="<?= $game['game_image_url'] ?>" alt="Fidget Spinner Creator"
class="lazyload img-fluid" width="500" height="500">
</picture>
<div class="card-body">
<h3><?= $game['game_name'] ?></h3>
</div>
</a>
<?php }
} else {
echo "You haven't liked any games yet";
} ?>
</div>
</div>
</div>
</div>
</div>
</div>
<?php } ?>
<?php if ($zon['page'][1] == 'settings') { ?>
<div class="layout-section">
<div class="container form-start">
<form id="update-info" method="post" class="update-info-form" enctype="multipart/form-data">
<div class="row gx-xl-5 h-100 justify-content-center">
<div class="col-xl-auto">
<div class="h-100 w-xl-250">
<div class="mb-3">
<div class="ratio-select ratio rounded position-relative input-cover"
style="--bs-aspect-ratio: 100%;background-image: url(">
<div
class="ratio-preview text-muted d-flex align-items-center justify-content-center">
<div class="text-center text-body">
<svg width="34" height="34" fill="none" stroke="currentColor"
stroke-width="1.75">
<use xlink:href="<?= $site_url ?>/static/sprite.svg#upload">
</use>
</svg>
<div class="fs-base mt-3 text-body">
Select image </div>
<div class="fs-xs text-muted">
Allow image type jpg, png, webp </div>
</div>
</div>
<div class="ratio-btn p-3">
<div class="btn btn-square p-0 rounded-circle btn-theme mx-1 btn-upload"
data-id="input-cover">
<svg width="16" height="16" stroke="currentColor" stroke-width="2"
fill="none">
<use xlink:href="<?= $site_url ?>/static/sprite.svg#upload">
</use>
</svg>
</div>
<div class="btn btn-square p-0 rounded-circle btn-light mx-1 btn-clear d-none"
data-id="input-cover">
<svg width="18" height="18" stroke="currentColor" stroke-width="2"
fill="none">
<use xlink:href="<?= $site_url ?>/static/sprite.svg#close">
</use>
</svg>
</div>
</div>
</div>
<input type="file" name="avatar_img" class="ratio-input d-none" id="file-input-cover"
data-preview="ratio-select" accept="image/*">
</div>
</div>
</div>
<div class="col-lg-7">
<div class="mb-3">
<label for="name" class="form-label text-body">
Name</label>
<input type="text" name="name" placeholder="Name"
class="form-control fs-sm bg-gray-200 border-0" id="name" tabindex="1" required="true"
value="<?= $zon['user']['name'] ?>">
</div>
<div class="mb-3">
<label for="username" class="form-label text-body">
Username</label>
<input type="text" name="username" placeholder="Username"
class="form-control fs-sm bg-gray-200 border-0" id="username" tabindex="2"
required="true" value="<?= $zon['user']['username'] ?>">
</div>
<div class="mb-3">
<label for="email" class="form-label text-body">
Email</label>
<input type="email" name="email" placeholder="Email"
class="form-control fs-sm bg-gray-200 border-0" id="email" tabindex="3" required="true"
value="<?= $zon['user']['email'] ?>">
</div>
<div class="mb-3">
<label for="password" class="form-label text-body">
New password</label>
<input type="password" name="new_password" placeholder="New password"
class="form-control fs-sm text-body bg-gray-200 border-0" id="password" minlength="5"
tabindex="4">
</div>
<input type="hidden" name="change_settings" value="<?php echo $zon['user']['id'] ?>" />
<button type="submit" class="btn btn-theme py-3 w-lg-300">
Save changes</button>
</div>
</div>
</form>
</div>
</div>
<?php } ?>
</div>