Added custom properties and backup settings
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user