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/plugins/dgt-verkehrsmonitor/includes/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/clients/client2/web20/web/wp-content/plugins/dgt-verkehrsmonitor/includes/db.php
<?php
/**
 * Datenbank-Schema & Tabellennamen.
 *
 * @package dgt-verkehrsmonitor
 */

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

function dgt_vm_table( $name = 'incidents' ) {
	global $wpdb;
	return $wpdb->prefix . 'vm_' . $name;
}

function dgt_vm_create_tables() {
	global $wpdb;
	$charset = $wpdb->get_charset_collate();

	$t_incidents  = dgt_vm_table( 'incidents' );
	$t_daily      = dgt_vm_table( 'daily_stats' );
	$t_substance  = dgt_vm_table( 'substance_stats' );
	$t_sources    = dgt_vm_table( 'sources' );
	$t_reports    = dgt_vm_table( 'reports' );

	$sql = "
CREATE TABLE {$t_incidents} (
	id               bigint(20) unsigned NOT NULL AUTO_INCREMENT,
	source_url       varchar(500)   NOT NULL,
	source_hash      char(64)       NOT NULL,
	polizei_behoerde varchar(200)   NOT NULL DEFAULT '',
	bundesland       varchar(30)    NOT NULL,
	stadt            varchar(120)   NOT NULL DEFAULT '',
	plz              varchar(10)    NOT NULL DEFAULT '',
	original_titel   varchar(500)   NOT NULL,
	original_text    mediumtext     NOT NULL,
	source_date      date           NOT NULL,
	ai_headline      varchar(300)   NOT NULL DEFAULT '',
	ai_summary       text           NOT NULL,
	ai_slug          varchar(200)   NOT NULL DEFAULT '',
	ai_rechtsinfo    text           NOT NULL,
	delikt           varchar(20)    NOT NULL DEFAULT 'sonstiges',
	hat_alkohol      tinyint(1)     NOT NULL DEFAULT 0,
	hat_drogen       tinyint(1)     NOT NULL DEFAULT 0,
	substanzen       varchar(300)   NOT NULL DEFAULT '',
	bak_wert         decimal(3,2)   DEFAULT NULL,
	thc_wert         decimal(6,1)   DEFAULT NULL,
	alter_fahrer     tinyint(3) unsigned DEFAULT NULL,
	geschlecht       varchar(12)    NOT NULL DEFAULT 'unbekannt',
	hat_unfall       tinyint(1)     NOT NULL DEFAULT 0,
	unfall_schwere   varchar(20)    NOT NULL DEFAULT 'keine',
	fs_sichergestellt tinyint(1)    NOT NULL DEFAULT 0,
	fahrzeugart      varchar(60)    NOT NULL DEFAULT 'pkw',
	anzahl_alkohol   smallint(5) unsigned NOT NULL DEFAULT 1,
	anzahl_drogen    smallint(5) unsigned NOT NULL DEFAULT 1,
	images           text           NOT NULL DEFAULT '[]',
	highlight_until  datetime       DEFAULT NULL,
	status           varchar(20)    NOT NULL DEFAULT 'entwurf',
	published_at     datetime       DEFAULT NULL,
	created_at       datetime       NOT NULL,
	updated_at       datetime       NOT NULL,
	PRIMARY KEY  (id),
	UNIQUE KEY source_hash (source_hash),
	KEY idx_bundesland  (bundesland, published_at),
	KEY idx_delikt      (delikt, published_at),
	KEY idx_source_date (source_date),
	KEY idx_status      (status, published_at),
	KEY idx_stadt       (bundesland, stadt),
	KEY idx_slug        (ai_slug)
) {$charset};

CREATE TABLE {$t_daily} (
	stat_date       date           NOT NULL,
	bundesland      varchar(30)    NOT NULL DEFAULT '_all',
	total           smallint(5) unsigned NOT NULL DEFAULT 0,
	alkohol         smallint(5) unsigned NOT NULL DEFAULT 0,
	drogen          smallint(5) unsigned NOT NULL DEFAULT 0,
	beides          smallint(5) unsigned NOT NULL DEFAULT 0,
	unfaelle        smallint(5) unsigned NOT NULL DEFAULT 0,
	unfaelle_person smallint(5) unsigned NOT NULL DEFAULT 0,
	unfaelle_tod    smallint(5) unsigned NOT NULL DEFAULT 0,
	fs_entzogen     smallint(5) unsigned NOT NULL DEFAULT 0,
	avg_bak         decimal(3,2)   DEFAULT NULL,
	max_bak         decimal(3,2)   DEFAULT NULL,
	ai_fazit        text           NOT NULL,
	PRIMARY KEY  (stat_date, bundesland)
) {$charset};

CREATE TABLE {$t_substance} (
	stat_date        date           NOT NULL,
	substanz         varchar(40)    NOT NULL,
	bundesland       varchar(30)    NOT NULL DEFAULT '_all',
	anzahl           smallint(5) unsigned NOT NULL DEFAULT 0,
	avg_alter        decimal(4,1)   DEFAULT NULL,
	anteil_maennlich decimal(5,2)   DEFAULT NULL,
	mit_unfall       smallint(5) unsigned NOT NULL DEFAULT 0,
	PRIMARY KEY  (stat_date, substanz, bundesland)
) {$charset};

CREATE TABLE {$t_sources} (
	id               int(10) unsigned NOT NULL AUTO_INCREMENT,
	name             varchar(200)   NOT NULL,
	bundesland       varchar(30)    NOT NULL,
	feed_url         varchar(500)   NOT NULL,
	feed_type        varchar(10)    NOT NULL DEFAULT 'rss',
	selector         varchar(300)   NOT NULL DEFAULT '',
	aktiv            tinyint(1)     NOT NULL DEFAULT 1,
	last_fetch       datetime       DEFAULT NULL,
	last_count       smallint(5) unsigned NOT NULL DEFAULT 0,
	created_at       datetime       NOT NULL,
	PRIMARY KEY  (id)
) {$charset};

CREATE TABLE {$t_reports} (
	report_date      date           NOT NULL,
	total_incidents  smallint(5) unsigned NOT NULL DEFAULT 0,
	html_content     mediumtext     NOT NULL,
	meta_title       varchar(200)   NOT NULL DEFAULT '',
	meta_description varchar(300)   NOT NULL DEFAULT '',
	social_text      text           NOT NULL,
	created_at       datetime       NOT NULL,
	PRIMARY KEY  (report_date)
) {$charset};
";

	require_once ABSPATH . 'wp-admin/includes/upgrade.php';
	dbDelta( $sql );
}

Youez - 2016 - github.com/yon3zu
LinuXploit