/home/ploi/www.trivano.com-deploy/www.trivano.com/17032024_175339/src/Model/StockQuotation.php
public function getBreadCrumb($page = NULL)
{
$breadcrumb[0] = [
'href' => '/home/',
'name' => 'Beurs vandaag'
];
// Exchange
$stmt = $this->pdo->prepare("SELECT e.id, e.gmt_offset
FROM exchanges AS e
INNER JOIN exchange_markets AS m ON e.id = m.exchange_id
INNER JOIN company_stock_quotations AS sq ON m.id = sq.market_id
WHERE sq.id = ?
");
$stmt->execute([$this->id]);
$exchange = $stmt->fetch(PDO::FETCH_ASSOC);
$exchangeId = $exchange['id'];
$exchangeRegion = $exchange['gmt_offset'];
if ($exchangeId == 1){
$breadcrumb[1] = [
'href' => '/beurs-amsterdam/',
'name' => 'Amsterdam'
];
} elseif ($exchangeId == 2){
$breadcrumb[1] = [
'href' => '/beurs-brussel/',
'name' => 'Brussel'
];
} elseif ($exchangeRegion < 0){
$breadcrumb[1] = [
'href' => '/beurs-amerika/',
'name' => 'Amerika'
];
} else {
$breadcrumb[1] = [
'href' => '/beurs-europa/',
/home/ploi/www.trivano.com-deploy/www.trivano.com/17032024_175339/src/Model/StockQuotation.php
public function getBreadCrumb($page = NULL)
{
$breadcrumb[0] = [
'href' => '/home/',
'name' => 'Beurs vandaag'
];
// Exchange
$stmt = $this->pdo->prepare("SELECT e.id, e.gmt_offset
FROM exchanges AS e
INNER JOIN exchange_markets AS m ON e.id = m.exchange_id
INNER JOIN company_stock_quotations AS sq ON m.id = sq.market_id
WHERE sq.id = ?
");
$stmt->execute([$this->id]);
$exchange = $stmt->fetch(PDO::FETCH_ASSOC);
$exchangeId = $exchange['id'];
$exchangeRegion = $exchange['gmt_offset'];
if ($exchangeId == 1){
$breadcrumb[1] = [
'href' => '/beurs-amsterdam/',
'name' => 'Amsterdam'
];
} elseif ($exchangeId == 2){
$breadcrumb[1] = [
'href' => '/beurs-brussel/',
'name' => 'Brussel'
];
} elseif ($exchangeRegion < 0){
$breadcrumb[1] = [
'href' => '/beurs-amerika/',
'name' => 'Amerika'
];
} else {
$breadcrumb[1] = [
'href' => '/beurs-europa/',
/home/ploi/www.trivano.com-deploy/www.trivano.com/17032024_175339/src/Controller/StockPressReleaseController.php
$pressReleaseContent = $pressRelease->getPressRelease($pressReleaseId);
// Check if the slug is correct and the pressrelease and company is still active
if ($pressRelease->redirectToCorrectSlug($pressReleaseId, $pressReleaseSlug) == '404'){
\http_response_code(404);
return (new Environment(new FilesystemLoader(__DIR__ . '/../../views')))->render('/front/error/404.html.twig');
}
$user = $this->user->getUserData();
$watchlist = [];
$watchlists = (new Watchlist($this->user, $this->pdo))->getWatchlistsByUser();
$extraArticles = (new Article($this->pdo))->getPriorArticlesByCompany($pressReleaseContent['company_id'],\date('Y-m-d H:i:s', \strtotime($pressReleaseContent['published_at']. ' + 1 weekday')),0,5);
$company = (new Company($pressReleaseContent['company_id'], $this->pdo));
$stockQuotationId = $company->getPrimaryStockQuotationId();
$stockQuotation = new StockQuotation($stockQuotationId, $this->pdo);
$breadcrumb = $stockQuotation->getBreadCrumb('news');
$quoteHeader = (new Quote('sq',$stockQuotationId, $this->pdo))->getQuoteHeader();
$companyInfo['name'] = $quoteHeader['name'];
$companyInfo['name_short'] = $quoteHeader['name_short'];
if ($companyInfo['name_short']){
$companyInfo['slug'] = (new Slug())->slug($companyInfo['name_short']);
}
$tabs = $stockQuotation->getTabs();
$headerTabs = $stockQuotation->getTabHtml('news');
if ($pressReleaseContent['title'] == \strtoupper($pressReleaseContent['title'])){
$title = \ucwords(\strtolower($pressReleaseContent['title']));
} else {
$title = $pressReleaseContent['title'];
}
if (strpos($title, $companyInfo['name_short']) === false){
$title = $companyInfo['name_short'].' | '.$pressReleaseContent['title'];
}
/home/ploi/www.trivano.com-deploy/www.trivano.com/17032024_175339/public_html/artikel/pressrelease.php
<?php
namespace Trivano;
use Trivano\Controller\StockPressReleaseController;
require_once (__DIR__.'/../../src/Bootstrap.php');
echo (new StockPressReleaseController($user,$twig,$pdo))->show();