diff options
Diffstat (limited to 'tpl/image')
-rw-r--r-- | tpl/image/folder.php | 52 | ||||
-rw-r--r-- | tpl/image/index.php | 26 |
2 files changed, 73 insertions, 5 deletions
diff --git a/tpl/image/folder.php b/tpl/image/folder.php new file mode 100644 index 0000000..5d5e57b --- /dev/null +++ b/tpl/image/folder.php @@ -0,0 +1,52 @@ +<?php +require("tpl/general/top.php"); + +if ($can_edit) { + echo '<div class="small_right"><a href="editfld-image-' . $fldid . '">edit folder info</a> | '; + echo '<a href="delfld-image-' . $fldid . '">delete folder</a></div>'; +} + +echo $fld['comment_html']; + +if (count($images) == 0) { + echo '<div class="message">This folder has no images.</div>'; +} else { + echo '<div class="ordering_links">' . filters_html_full() . '</div>'; + echo '<table><tr><th width="' . ($miniature_width) . 'px">Preview</th><th>Info</th><th>Date</th></tr>'; + foreach ($images as $img) { + $min = $baseurl . $img['id'] . "-min." . $img['extension']; + $imgf = $baseurl . $img['id'] . "." . $img['extension']; + echo '<tr><td><a href="' . $imgf . '"><img src="' . $min . '" /></a></td>'; + echo '<td><strong>' . $img['name'] . '</strong>'; + echo '<br />' . $img['comment_html'] . '<br />'; + /*echo '<strong>Miniature:</strong> <a href="' . $min . '">' . $min . '</a><br />'; + echo '<strong>Image:</strong> <a href="' . $imgf . '">' . $imgf . '</a><br />'; */ + echo '</td>'; + echo '<td>' . $img['upl_date'] . '<br />'; + if ($can_edit) echo '<br /><a href="delete-image-' . $img['id'] . '">delete</a>'; + if ($can_edit) echo '<br /><a href="editinfo-image-' . $img['id'] . '">edit info</a>'; + echo '</td></tr>'; + } + echo '</table>'; +} + +echo '</div><div class="contents-left">'; +if ($is_owner) { + echo '<h1>Your folders</h1>'; +} else { + echo '<h1>' . $fld["ownername"] . "'s folders</h1>"; +} +echo '<ul>'; +foreach ($folders as $f) { + if ($f['id'] == $fldid) { + echo '<li>' . $f['name'] . '</li>'; + } else { + echo '<li><a href="folder-image-' . $f['id'] . '">' . $f['name'] . '</a></li>'; + } +} +if ($is_owner) { + echo '<li><a class="tool_link" href="newfld-image">[+] New folder</a></li>'; +} +echo '</ul>'; + +require("tpl/general/bottom.php"); diff --git a/tpl/image/index.php b/tpl/image/index.php index 4f9db8e..a89d024 100644 --- a/tpl/image/index.php +++ b/tpl/image/index.php @@ -11,13 +11,18 @@ if (count($images) == 0) { $min = $baseurl . $img['id'] . "-min." . $img['extension']; $imgf = $baseurl . $img['id'] . "." . $img['extension']; echo '<tr><td><a href="' . $imgf . '"><img src="' . $min . '" /></a></td>'; - echo '<td><strong>' . $img['name'] . '</strong><br /><br />'; - echo '<strong>Miniature:</strong> <a href="' . $min . '">' . $min . '</a><br />'; - echo '<strong>Image:</strong> <a href="' . $imgf . '">' . $imgf . '</a><br />'; - echo '<strong>Markdown:</strong> <code>!['.$img['name'].']('.$imgf.')</code></td>'; + echo '<td><strong>' . $img['name'] . '</strong>'; + if ($img['folder_id'] != 0) { + echo ' (in folder: <a href="folder-image-' . $img['folder_id'] . '">' . $img['folder_name'] . '</a>)'; + } + echo '<br /><strong>MD:</strong> <code>!['.$img['name'].']('.$imgf.')</code>'; + echo '<br />' . $img['comment_html'] . '<br />'; + /*echo '<strong>Miniature:</strong> <a href="' . $min . '">' . $min . '</a><br />'; + echo '<strong>Image:</strong> <a href="' . $imgf . '">' . $imgf . '</a><br />'; */ + echo '</td>'; echo '<td>' . $img['upl_date'] . '<br />'; if ($can_delete) echo '<br /><a href="delete-image-' . $img['id'] . '">delete</a>'; - if ($can_rename) echo '<br /><a href="rename-image-' . $img['id'] . '">rename</a>'; + if ($can_rename) echo '<br /><a href="editinfo-image-' . $img['id'] . '">edit info</a>'; echo '</td></tr>'; } echo '</table>'; @@ -33,6 +38,17 @@ A <?php echo $miniature_width; ?>px preview will be created.<br /><br /> Title : <input type="text" name="name" style="width: 200px;" ><br /> <input type="file" name="image" /><br /> <input type="submit" value="Upload" /></form> + +<br /><br /> +<h1>Your folders</h1> +<ul> +<?php +foreach ($folders as $f) { + echo '<li><a href="folder-image-' . $f['id'] . '">' . $f['name'] . '</a></li>'; +} +?> +<li><a class="tool_link" href="newfld-image">[+] New folder</a></li> +</ul> <?php } |