pile/www/_templates/admin_doc_edit.php

28 lines
1.3 KiB
PHP
Raw Normal View History

2017-03-07 09:38:47 +01:00
<div class="text document edit-form">
2018-07-31 15:58:23 +02:00
<form method="post" id="form" action="admin.php?action=edit_item<?= empty($doc) ? "" : "&item=" . $doc["ID"] ?>"
enctype="multipart/form-data">
2017-03-07 09:38:47 +01:00
<strong>Title:</strong> <input type="text" name="Title" value="<?= empty($doc) ? "" : $doc["Title"] ?>"><br>
<strong>Author:</strong> <input type="text" name="Author" value="<?= empty($doc) ? "" : $doc["Author"] ?>"><br>
2018-07-31 15:58:23 +02:00
<strong>Date published:</strong> <input type="text" name="Published"
value="<?= empty($doc) ? "" : $doc["Published"] ?>"><br>
2017-03-07 09:38:47 +01:00
<strong>Description:</strong><br>
2018-07-31 15:58:23 +02:00
<textarea name="Description" cols="120" rows="20">
2017-03-07 09:38:47 +01:00
<?= empty($doc) ? "" : $doc["Description"] ?>
</textarea><br>
<strong>File:</strong> <input type="file" name="upfile"><br>
<strong>URL:</strong> <input type="text" name="URL" value="<?= empty($doc) ? "" : $doc["URL"] ?>"><br>
2018-09-17 11:25:56 +02:00
<strong>Tags:</strong> <input type="text" name="Tags" value="<?php
2018-07-31 15:58:23 +02:00
if (!empty($doc)) {
$tags = [];
foreach ($doc["tags"] as $tag) {
array_push($tags, $tag["Name"]);
}
echo implode(", ", $tags);
} else if (!empty($_GET["tag"])) {
2019-05-05 13:00:39 +02:00
echo $tag["Name"];
2018-07-31 15:58:23 +02:00
}
2017-03-07 09:38:47 +01:00
?>"><br>
2018-07-31 15:58:23 +02:00
<input type="submit">
2017-03-07 09:38:47 +01:00
</form>
</div>