Prüfen, ob Datei bei Anzeige existiert

This commit is contained in:
aschwarz
2023-04-26 07:40:33 +02:00
parent e8da596859
commit de6abfa26c
6 changed files with 54 additions and 22 deletions

View File

@ -58,6 +58,11 @@ if($action == ''){
or die ("Cannot execute query1");
while ($row = $result->fetch_array()){
if (file_exists($row['filename'])) {
$row['file_exists'] = '1';
} else {
$row['file_exists'] = '0';
}
$value[] = $row;
}
$smarty->assign('table_data', $value);

View File

@ -51,6 +51,11 @@ while ($row = $result->fetch_array())
$inner1[$ln2]['id'] = $row2['id'];
$inner1[$ln2]['filename'] = $row2['filename'];
if (file_exists($row2['filename'])) {
$inner1[$ln2]['file_exists'] = '1';
} else {
$inner1[$ln2]['file_exists'] = '0';
}
$inner1[$ln2]['originalname'] = $row2['originalname'];
$dateiarray = explode(".",$row2['originalname']);

View File

@ -37,6 +37,11 @@ require_once "../language/german.inc.php";
or die ("Cannot execute query1");
while ($row = $result->fetch_array()){
if (file_exists($row['filename'])) {
$row['file_exists'] = '1';
} else {
$row['file_exists'] = '0';
}
$value[] = $row;
}
$smarty->assign('table_data', $value);