mirror of
https://github.com/Fluffy-Bean/image-gallery.git
synced 2025-06-18 16:13:11 +00:00
Finish writing README and fix table names
This commit is contained in:
parent
4005bc2d87
commit
6fee1e3b57
5 changed files with 66 additions and 45 deletions
13
image.php
13
image.php
|
@ -23,9 +23,11 @@
|
|||
|
||||
use App\Account;
|
||||
use App\Image;
|
||||
use App\Diff;
|
||||
|
||||
$image_info = new Image;
|
||||
$user_info = new Account;
|
||||
$diff = new Diff();
|
||||
|
||||
/*
|
||||
|-------------------------------------------------------------
|
||||
|
@ -186,13 +188,12 @@
|
|||
echo "<p>ID: ".$image['id']."</p>";
|
||||
}
|
||||
|
||||
// Last time image was updated
|
||||
$update_time = new DateTime($image['upload']);
|
||||
echo "<p id='updateTime'>Last updated: ".$update_time->format('d/m/Y H:i:s T')."</p>";
|
||||
$upload_time = new DateTime($image['upload_date']);
|
||||
echo "<p id='updateTime'>Uploaded at: ".$upload_time->format('d/m/Y H:i:s T')."</p>";
|
||||
?>
|
||||
<script>
|
||||
// Updating time to Viewers local
|
||||
var updateDate = new Date('<?php echo $update_time->format('m/d/Y H:i:s T'); ?>');
|
||||
var updateDate = new Date('<?php echo $upload_time->format('m/d/Y H:i:s T'); ?>');
|
||||
var format = {year: 'numeric',
|
||||
month: 'short',
|
||||
day: 'numeric',
|
||||
|
@ -202,8 +203,10 @@
|
|||
|
||||
updateDate = updateDate.toLocaleDateString('en-GB', format);
|
||||
|
||||
$("#updateTime").html("Last updated: "+updateDate);
|
||||
$("#updateTime").html("Uploaded at: "+updateDate);
|
||||
</script>
|
||||
|
||||
<p>Last Modified: <?php echo $diff->time($image['last_modified']); ?></p>
|
||||
</div>
|
||||
<div>
|
||||
<?php
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue