<?php /* Template Name: InfobriefPage */?>
<?php
get_header();
//LOAD LETTERS:
global $wpdb;
$table_name = $wpdb->prefix . 'custom_infobriefe';
$id = $_GET["l"];
if($id) {
$sql = "SELECT * FROM $table_name WHERE id=$id ORDER BY date DESC";
$single_letter = $wpdb->get_results($sql)[0];
$sql = "SELECT id, title, thumbnail_url FROM $table_name WHERE recommended = 1 AND thumbnail_url IS NOT NULL AND id != '$id' ORDER BY RAND() LIMIT 8";
$recommendations = $wpdb->get_results($sql);
?>
<div class="infobriefe-container">
<?php
$tempDate = date_create($single_letter->date);
$transformed_date = date_format($tempDate, "d.m.Y");
if(current_user_can("edit_posts")) { ?>
<a href="https://www.mein-persoenliches-konzept.com/wp-admin/admin.php?page=infobriefAdminPage.php"><div class="back-to-admin-page-link">
<p>--> Zurück zur Adminseite <--</p>
</div></a>
<?php }
?>
<div class="infobrief-wrapper">
<h1><?php echo $single_letter->title; ?></h1>
<p><?php echo apply_filters('the_content', $single_letter->content); ?></p>
<span class="infobrief-date"><?php echo $transformed_date; ?></span>
</div>
<div class="clearfix"></div>
<?php if($recommendations) { ?>
<div class="infobrief-recommendations-container">
<h3>Auch lesenswert:</h3>
<div class="infobrief-recommendations-wrapper">
<?php foreach($recommendations as $recom) {
$title = $recom->title; //maybe shorten
if(strlen($title) > 30) {
$title = substr($title, 0, 30) . "...";
}
$thumbnail_url = $recom->thumbnail_url;
$recom_id = $recom->id;
<?php /* Template Name: InfobriefPage */?>
<?php
get_header();
//LOAD LETTERS:
global $wpdb;
$table_name = $wpdb->prefix . 'custom_infobriefe';
$id = $_GET["l"];
if($id) {
$sql = "SELECT * FROM $table_name WHERE id=$id ORDER BY date DESC";
$single_letter = $wpdb->get_results($sql)[0];
$sql = "SELECT id, title, thumbnail_url FROM $table_name WHERE recommended = 1 AND thumbnail_url IS NOT NULL AND id != '$id' ORDER BY RAND() LIMIT 8";
$recommendations = $wpdb->get_results($sql);
?>
<div class="infobriefe-container">
<?php
$tempDate = date_create($single_letter->date);
$transformed_date = date_format($tempDate, "d.m.Y");
if(current_user_can("edit_posts")) { ?>
<a href="https://www.mein-persoenliches-konzept.com/wp-admin/admin.php?page=infobriefAdminPage.php"><div class="back-to-admin-page-link">
<p>--> Zurück zur Adminseite <--</p>
</div></a>
<?php }
?>
<div class="infobrief-wrapper">
<h1><?php echo $single_letter->title; ?></h1>
<p><?php echo apply_filters('the_content', $single_letter->content); ?></p>
<span class="infobrief-date"><?php echo $transformed_date; ?></span>
</div>
<div class="clearfix"></div>
<?php if($recommendations) { ?>
<div class="infobrief-recommendations-container">
<h3>Auch lesenswert:</h3>
<div class="infobrief-recommendations-wrapper">
<?php foreach($recommendations as $recom) {
$title = $recom->title; //maybe shorten
if(strlen($title) > 30) {
$title = substr($title, 0, 30) . "...";
}
$thumbnail_url = $recom->thumbnail_url;
$recom_id = $recom->id;
}
break;
}
}
if ( ! $template ) {
$template = get_index_template();
}
/**
* Filters the path of the current template before including it.
*
* @since 3.0.0
*
* @param string $template The path of the template to include.
*/
$template = apply_filters( 'template_include', $template );
if ( $template ) {
include $template;
} elseif ( current_user_can( 'switch_themes' ) ) {
$theme = wp_get_theme();
if ( $theme->errors() ) {
wp_die( $theme->errors() );
}
}
return;
}
<?php
/**
* Loads the WordPress environment and template.
*
* @package WordPress
*/
if ( ! isset( $wp_did_header ) ) {
$wp_did_header = true;
// Load the WordPress library.
require_once __DIR__ . '/wp-load.php';
// Set up the WordPress query.
wp();
// Load the theme template.
require_once ABSPATH . WPINC . '/template-loader.php';
}
<?php
/**
* Front to the WordPress application. This file doesn't do anything, but loads
* wp-blog-header.php which does and tells WordPress to load the theme.
*
* @package WordPress
*/
/**
* Tells WordPress to load the WordPress theme and output it.
*
* @var bool
*/
define( 'WP_USE_THEMES', true );
/** Loads the WordPress Environment and Template */
require __DIR__ . '/wp-blog-header.php';
Key | Value |
cP | 15 |
Key | Value |
SERVER_SOFTWARE | Apache |
REQUEST_URI | /infobriefe/?cP=15 |
PHPRC | /usr/local/php81/etc |
PATH | /sbin:/bin:/usr/sbin:/usr/bin |
SCRIPT_NAME | /index.php |
QUERY_STRING | cP=15 |
REQUEST_METHOD | GET |
SERVER_PROTOCOL | HTTP/1.1 |
GATEWAY_INTERFACE | CGI/1.1 |
REDIRECT_QUERY_STRING | cP=15 |
REDIRECT_URL | /infobriefe/ |
REMOTE_PORT | 11372 |
SCRIPT_FILENAME | /home/konzept/www/wp.konzept/wp/index.php |
SERVER_ADMIN | webmaster@mein-persoenliches-konzept.com |
CONTEXT_DOCUMENT_ROOT | /home/konzept/www/wp.konzept/wp |
CONTEXT_PREFIX | |
REQUEST_SCHEME | https |
DOCUMENT_ROOT | /home/konzept/www/wp.konzept/wp |
REMOTE_ADDR | 44.192.79.149 |
SERVER_PORT | 443 |
SERVER_ADDR | 127.0.0.2 |
SERVER_NAME | www.mein-persoenliches-konzept.com |
SERVER_SIGNATURE | |
LD_LIBRARY_PATH | /usr/local/lib:/usr/local/lib |
HTTP_CONNECTION | Keep-Alive |
HTTP_HOST | www.mein-persoenliches-konzept.com |
HTTP_ACCEPT_ENCODING | br,gzip |
HTTP_IF_MODIFIED_SINCE | Tue, 31 Jan 2023 19:31:46 GMT |
HTTP_ACCEPT_LANGUAGE | en-US,en;q=0.5 |
HTTP_ACCEPT | text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 |
HTTP_USER_AGENT | CCBot/2.0 (https://commoncrawl.org/faq/) |
SSL_SESSION_RESUMED | Resumed |
SSL_SESSION_ID | 8d91e2335f6e54ac77e229628861a69861dd67540b7569455d9a06b6aea37aa9 |
SSL_SERVER_A_SIG | sha256WithRSAEncryption |
SSL_SERVER_A_KEY | rsaEncryption |
SSL_SERVER_I_DN | CN=R3,O=Let\'s Encrypt,C=US |
SSL_SERVER_S_DN | CN=www.mein-persoenliches-konzept.com |
SSL_SERVER_V_END | Aug 29 11:53:54 2023 GMT |
SSL_SERVER_V_START | May 31 11:53:55 2023 GMT |
SSL_SERVER_M_SERIAL | 039D98F707EF64DEA6ECB8970DB3EC879249 |
SSL_SERVER_M_VERSION | 3 |
SSL_CLIENT_VERIFY | NONE |
SSL_CIPHER_ALGKEYSIZE | 256 |
SSL_CIPHER_USEKEYSIZE | 256 |
SSL_CIPHER_EXPORT | false |
SSL_CIPHER | TLS_AES_256_GCM_SHA384 |
SSL_COMPRESS_METHOD | NULL |
SSL_SECURE_RENEG | false |
SSL_PROTOCOL | TLSv1.3 |
SSL_VERSION_LIBRARY | OpenSSL/1.1.1t |
SSL_VERSION_INTERFACE | mod_ssl/2.4.57 |
SSL_SERVER_SAN_DNS_0 | www.mein-persoenliches-konzept.com |
SSL_SERVER_I_DN_CN | R3 |
SSL_SERVER_I_DN_O | Let\'s Encrypt |
SSL_SERVER_I_DN_C | US |
SSL_SERVER_S_DN_CN | www.mein-persoenliches-konzept.com |
SSL_TLS_SNI | www.mein-persoenliches-konzept.com |
HTTPS | on |
HTTP_AUTHORIZATION | |
W3TC_ENC | _gzip |
UNIQUE_ID | ZIAN3aB7q2ASC6xOUKuDdwAAB8E |
REDIRECT_STATUS | 200 |
REDIRECT_SSL_TLS_SNI | www.mein-persoenliches-konzept.com |
REDIRECT_HTTPS | on |
REDIRECT_HTTP_AUTHORIZATION | |
REDIRECT_W3TC_ENC | _gzip |
REDIRECT_UNIQUE_ID | ZIAN3aB7q2ASC6xOUKuDdwAAB8E |
FCGI_ROLE | RESPONDER |
PHP_SELF | /index.php |
REQUEST_TIME_FLOAT | 1686113757.4015 |
REQUEST_TIME | 1686113757 |