Changes.
This commit is contained in:
parent
4a5e5d224a
commit
70c8a87e15
25 changed files with 508 additions and 187 deletions
42
dj.php
42
dj.php
|
@ -2,6 +2,7 @@
|
|||
|
||||
require_once 'includes/globals.php';
|
||||
require_once 'vendor/autoload.php';
|
||||
|
||||
use DJMixHosting\Database;
|
||||
use DJMixHosting\DJ;
|
||||
use DJMixHosting\Genre;
|
||||
|
@ -13,11 +14,12 @@ $db = new Database($config);
|
|||
$djFound = false;
|
||||
if (isset($_GET['dj']) && $_GET['dj'] != "") {
|
||||
$dj = new DJ($_GET['dj'], $db);
|
||||
if ($dj->get_name() != "") {
|
||||
if ($dj->getName() != "") {
|
||||
$djFound = true;
|
||||
$title = $dj->getName();
|
||||
}
|
||||
}
|
||||
$title = $dj->get_name();
|
||||
|
||||
require_once 'includes/header.php';
|
||||
?>
|
||||
<section>
|
||||
|
@ -27,13 +29,15 @@ require_once 'includes/header.php';
|
|||
<nav aria-label="breadcrumb" class="bg-body-tertiary rounded-3 p-3 mb-4">
|
||||
<ol class="breadcrumb mb-0">
|
||||
<li class="breadcrumb-item"><a href="/"><?php echo $locale['home']; ?></a></li>
|
||||
<li class="breadcrumb-item"><a href="/djs.php"><?php echo $locale['djs']; ?></a></li>
|
||||
<li class="breadcrumb-item"><a href="/djs"><?php echo $locale['djs']; ?></a></li>
|
||||
<li class="breadcrumb-item active"
|
||||
aria-current="page"><?php
|
||||
if ($dj && $dj->get_name() != "") {
|
||||
echo $dj->get_name();
|
||||
} else {
|
||||
echo $locale['notfound'];
|
||||
if (isset($dj)) {
|
||||
if ($dj->getName() != "") {
|
||||
echo $dj->getName();
|
||||
} else {
|
||||
echo $locale['notfound'];
|
||||
}
|
||||
}
|
||||
?></li>
|
||||
</ol>
|
||||
|
@ -46,14 +50,14 @@ require_once 'includes/header.php';
|
|||
<div class="col-lg-4">
|
||||
<div class="card mb-4">
|
||||
<div class="card-body bg-body-secondary text-center">
|
||||
<img src="<?php echo $dj->get_img(); ?>"
|
||||
<img src="<?php echo $dj->getImg(); ?>"
|
||||
alt="avatar"
|
||||
class="rounded-circle img-fluid" style="width: 150px;">
|
||||
<h5 class="my-3"><?php echo $dj->get_name();
|
||||
<h5 class="my-3"><?php echo $dj->getName();
|
||||
?></h5>
|
||||
<?php
|
||||
|
||||
if ($dj->get_claimed()) {
|
||||
if ($dj->getClaimed()) {
|
||||
echo '<p class="text-muted mb-1">';
|
||||
echo "<i class='fa fa-user-shield' style='color: gold'>Claimed</i>";
|
||||
echo "</p>";
|
||||
|
@ -71,13 +75,13 @@ require_once 'includes/header.php';
|
|||
</div>
|
||||
</div>
|
||||
<?php
|
||||
if ($dj->get_socials() != []) {
|
||||
if ($dj->getSocials() != []) {
|
||||
?>
|
||||
<div class="card mb-4 mb-lg-0">
|
||||
<div class="card-body p-0 ">
|
||||
<ul class="list-group list-group-flush rounded-3">
|
||||
<?php
|
||||
$socials = $dj->get_socials();
|
||||
$socials = $dj->getSocials();
|
||||
foreach ($socials as $key => $value) {
|
||||
echo social_line($key, $value);
|
||||
}
|
||||
|
@ -95,14 +99,14 @@ require_once 'includes/header.php';
|
|||
<p class="mb-0"><?php echo $locale['djName']; ?></p>
|
||||
</div>
|
||||
<div class="col-sm-9">
|
||||
<p class="text-muted mb-0"><?php echo $dj->get_name(); ?></p>
|
||||
<p class="text-muted mb-0"><?php echo $dj->getName(); ?></p>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
if ($dj->get_bio() != "") {
|
||||
echo box_line($locale['bio'], $dj->get_bio());
|
||||
if ($dj->getBio() != "") {
|
||||
echo box_line($locale['bio'], $dj->getBio());
|
||||
}
|
||||
echo box_line($locale['lastupdated'], $dj->get_updated());
|
||||
echo box_line($locale['lastupdated'], $dj->getUpdated());
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -112,7 +116,7 @@ require_once 'includes/header.php';
|
|||
<div class="card mb-4">
|
||||
<div class="card-body bg-body-secondary">
|
||||
<?php
|
||||
$mixes = $dj->get_dj_mixes();
|
||||
$mixes = $dj->getDJMixes();
|
||||
$count = 0;
|
||||
|
||||
foreach ($mixes as $mix) {
|
||||
|
@ -130,7 +134,7 @@ require_once 'includes/header.php';
|
|||
// Column for mix name and link
|
||||
echo '<div class="col-md text-truncate" >';
|
||||
echo '<p class="mb-0 " >';
|
||||
echo '<a title="' . $output->get_name() . '" href="/mix.php?mix=' . $output->get_slug() . '">';
|
||||
echo '<a title="' . $output->get_name() . '" href="/mix/' . $output->get_slug() . '">';
|
||||
echo $output->get_name();
|
||||
echo '</a>';
|
||||
echo '</p>';
|
||||
|
@ -140,7 +144,7 @@ require_once 'includes/header.php';
|
|||
echo '<div class="col-md ">';
|
||||
echo '<p class="mb-0">';
|
||||
foreach ($genrelist as $slug => $name) {
|
||||
echo ' <a href="/genre.php?genre=' . $slug . '">';
|
||||
echo ' <a href="/genre/' . $slug . '">';
|
||||
// ellipse the genre name if it's too long
|
||||
echo '<span class="">' . $name . '</span>';
|
||||
echo '</a>';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue