dbxapp 4.1.3
CMS, Shop, Workflows und modulare Geschäftsanwendungen
Loading...
Searching...
No Matches
activate_home_tvspot_v4_20260731.php File Reference

Go to the source code of this file.

Variables

 $repoRoot = dirname(__DIR__, 4)
 $dbFile = $repoRoot . '/dbx/modules/dbx/db/dbxMedia.db3'
 $videoFile = $repoRoot . '/files/media/video/dbxapp-tvspot-20260731-v4.mp4'
 $posterFile = $repoRoot . '/files/media/img/images/dbxapp-tvspot-poster-20260731-v4.webp'
 $backupDir = $repoRoot . '/files/tmp'
 $mediaId = 442
foreach(array($dbFile, $videoFile, $posterFile) as $requiredFile) $posterInfo = @getimagesize($posterFile)
if(!is_array( $posterInfo)||(int)( $posterInfo[0] ?? 0) !==1024||(int)( $posterInfo[1] ?? 0) !==576) if(!is_dir($backupDir) &&!mkdir($backupDir, 0775, true) &&!is_dir($backupDir)) $backupFile = $backupDir . '/dbxMedia-before-tvspot-v4-' . date('Ymd-His') . '.db3'
if(!copy($dbFile, $backupFile)) $base = $repoRoot
 $_SERVER ['REQUEST_URI'] = '/dbxapp/'
 $_SERVER ['HTTP_HOST'] = 'localhost'
 $_SERVER ['SCRIPT_NAME'] = '/dbxapp/index.php'
const dbxSystem 'dbxWebApp'
const dbxRunAsAdmin 1
 $db = dbx()->get_system_obj('dbxDB')
 $mediaDd = 'dbx|dbxMedia'
 try
if(!is_array( $before)||(int)( $before[ 'id'] ?? 0) !==$mediaId) if((string)($before['media_type'] ?? '') !=='video') $updated
if($updated !==1) $after = $db->select1($mediaDd, $mediaId, '*', 0)
if(!is_array($after)||(string)($after['file_name'] ?? '') !==basename($videoFile)) if( $db->commit( $mediaDd) !==1) catch (Throwable $exception)

Variable Documentation

◆ $_SERVER [1/3]

$_SERVER[ 'HTTP_HOST'] = 'localhost'

Definition at line 39 of file activate_home_tvspot_v4_20260731.php.

◆ $_SERVER [2/3]

$_SERVER[ 'REQUEST_URI'] = '/dbxapp/'

Definition at line 38 of file activate_home_tvspot_v4_20260731.php.

◆ $_SERVER [3/3]

$_SERVER[ 'SCRIPT_NAME'] = '/dbxapp/index.php'

Definition at line 40 of file activate_home_tvspot_v4_20260731.php.

◆ $after

if ( $updated !==1) $after = $db->select1($mediaDd, $mediaId, '*', 0)

Definition at line 87 of file activate_home_tvspot_v4_20260731.php.

◆ $backupDir

$backupDir = $repoRoot . '/files/tmp'

Definition at line 9 of file activate_home_tvspot_v4_20260731.php.

◆ $backupFile

if(!is_array($posterInfo)||(int)($posterInfo[0] ?? 0) !==1024||(int)($posterInfo[1] ?? 0) !==576) if (!is_dir( $backupDir) &&!mkdir( $backupDir, 0775, true) &&!is_dir( $backupDir)) $backupFile = $backupDir . '/dbxMedia-before-tvspot-v4-' . date('Ymd-His') . '.db3'

Definition at line 30 of file activate_home_tvspot_v4_20260731.php.

◆ $base

if (!copy( $dbFile, $backupFile)) $base = $repoRoot

Definition at line 36 of file activate_home_tvspot_v4_20260731.php.

◆ $db

$db = dbx()->get_system_obj('dbxDB')

Definition at line 48 of file activate_home_tvspot_v4_20260731.php.

◆ $dbFile

$dbFile = $repoRoot . '/dbx/modules/dbx/db/dbxMedia.db3'

Definition at line 6 of file activate_home_tvspot_v4_20260731.php.

◆ $mediaDd

$mediaDd = 'dbx|dbxMedia'

Definition at line 49 of file activate_home_tvspot_v4_20260731.php.

◆ $mediaId

◆ $posterFile

$posterFile = $repoRoot . '/files/media/img/images/dbxapp-tvspot-poster-20260731-v4.webp'

Definition at line 8 of file activate_home_tvspot_v4_20260731.php.

◆ $posterInfo

foreach (array( $dbFile, $videoFile, $posterFile) as $requiredFile) $posterInfo = @getimagesize($posterFile)

Definition at line 19 of file activate_home_tvspot_v4_20260731.php.

◆ $repoRoot

$repoRoot = dirname(__DIR__, 4)

Definition at line 5 of file activate_home_tvspot_v4_20260731.php.

◆ $updated

if(!is_array($before)||(int)($before['id'] ?? 0) !==$mediaId) if ((string)( $before[ 'media_type'] ?? '') !=='video') $updated
Initial value:
= $db->update($mediaDd, array(
'update_date' => date('Y-m-d H:i:s.v'),
'update_uid' => 1,
'active' => 1,
'title' => 'dbxapp TV-Spot – Event-Choreografie',
'alt' => 'Dynamischer dbxapp TV-Spot mit eingeblendeten Statuskarten, UI-Ereignissen und klaren Zustandswechseln',
'file_name' => basename($videoFile),
'file_path' => 'media/video/' . basename($videoFile),
'mime' => 'video/mp4',
'size' => filesize($videoFile),
'width' => 1024,
'height' => 576,
'thumb_file_path' => 'media/img/images/' . basename($posterFile),
'thumb_width' => 1024,
'thumb_height' => 576,
'media_type' => 'video',
'storage_type' => 'local',
'media_folder' => 'video',
), $mediaId, 0, 1, 0, 1)

Definition at line 64 of file activate_home_tvspot_v4_20260731.php.

◆ $videoFile

$videoFile = $repoRoot . '/files/media/video/dbxapp-tvspot-20260731-v4.mp4'

Definition at line 7 of file activate_home_tvspot_v4_20260731.php.

◆ catch

if(!is_array( $after)||(string)( $after[ 'file_name'] ?? '') !==basename( $videoFile)) if($db->commit($mediaDd) !==1) catch(Throwable $exception) ( Throwable $exception)

Definition at line 95 of file activate_home_tvspot_v4_20260731.php.

◆ dbxRunAsAdmin

const dbxRunAsAdmin 1

Definition at line 43 of file activate_home_tvspot_v4_20260731.php.

◆ dbxSystem

const dbxSystem 'dbxWebApp'

Definition at line 42 of file activate_home_tvspot_v4_20260731.php.

◆ try

try
Initial value:
{
if ($db->begin($mediaDd) !== 1) {
throw new RuntimeException('Die Medientransaktion konnte nicht gestartet werden.');
}
$before = $db->select1($mediaDd, $mediaId, '*', 0)

Definition at line 51 of file activate_home_tvspot_v4_20260731.php.