40 lines
1.9 KiB
PHP
40 lines
1.9 KiB
PHP
<?php
|
|
require_once("config.php.inc");
|
|
require_once("newsLib.php.inc");
|
|
|
|
require_once( $basePath."/bonus/db.inc" );
|
|
|
|
$mysqlConn = @new mysqli($db_server, $db_user, $db_password, $db_name);
|
|
if($mysqlConn->connect_error){
|
|
// @ToDo: bessere Fehlerbehandlung
|
|
die("Datenbankverbindung fehlgeschlagen: " . $mysqlConn->connect_error . "\n");
|
|
//$message['error'] += "Datenbankverbindung fehlgeschlagen: " . $mysqlConn->connect_error . "<br />";
|
|
}
|
|
|
|
$newsId = isset($_GET["newsId"]) ? $_GET["newsId"] : "";
|
|
//$newsDate = empty($_GET['date']) ? date("Y-m-d") : $_GET['date'];
|
|
$newsById = array();
|
|
$prevNewsId = "";
|
|
$postNewsId = "";
|
|
|
|
|
|
$news = getNewsById($mysqlConn);
|
|
|
|
?>
|
|
<!doctype html>
|
|
<html amp lang="de">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<script async src="https://cdn.ampproject.org/v0.js"></script>
|
|
<title><?php echo($news['betreff']);?></title>
|
|
<link rel="canonical" href="http://example.ampproject.org/article-metadata.html">
|
|
<meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1">
|
|
<script type="application/ld+json"><?php echo(news2json( $news ));?></script>
|
|
<style amp-boilerplate>body{-webkit-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-moz-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-ms-animation:-amp-start 8s steps(1,end) 0s 1 normal both;animation:-amp-start 8s steps(1,end) 0s 1 normal both}@-webkit-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-moz-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-ms-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-o-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}</style><noscript><style amp-boilerplate>body{-webkit-animation:none;-moz-animation:none;-ms-animation:none;animation:none}</style></noscript>
|
|
</head>
|
|
<body>
|
|
<h1>cwsvJudo - News</h1>
|
|
<?php echo(getAmpNews($news));?>
|
|
</body>
|
|
</html>
|