Added custom properties and backup settings

This commit is contained in:
2026-09-25 17:36:11 +02:00
parent 53ea5af9e7
commit 99df0287be
9 changed files with 84 additions and 5 deletions
+15
View File
@@ -316,6 +316,21 @@ echo '<tr><th scope="row">', _('Costs plan'),"</th><td>", format_currency($proje
echo '<tr><th scope="row">', _('Costs final'),"</th><td>", format_currency($project->costs_final), "</td></tr>\n";
echo '<tr><th scope="row">', _('State'),"</th><td>", get_enum($project->projstate), "</td></tr>\n";
echo '<tr><th scope="row">', _('Remarks'),"</th><td>", h($project->remarks, br:true), "</td></tr>\n";
// Custom properties go here
$sql = "SELECT keyname, valstr, valint FROM property WHERE objtype='proj' AND objid=?";
$sth = $pdo->prepare($sql);
$sth->execute([$id]);
foreach ($sth->fetchAll() as $row) {
echo "<tr><th>{$row['keyname']}</th><td>";
if (isset($row['valstr'])) {
echo $row['valstr'];
} else {
echo $row['valint'];
}
echo "</td></tr>\n";
}
echo "</table>\n";
form_view_buttons($g_scriptname, $id);