fix pager and dates
This commit is contained in:
parent
e53df98880
commit
1f56e6df3c
2 changed files with 18 additions and 5 deletions
|
@ -70,7 +70,6 @@ pre {
|
|||
|
||||
.avatar {
|
||||
display: flex;
|
||||
width: 200px;
|
||||
align-items: center;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
|
|
@ -11,15 +11,29 @@
|
|||
array('key' => '','type' => 'hidden','name' => 'type', 'default' => $typer),
|
||||
array('key' => '','type' => 'hidden','name' => 'id', 'default' => $idr),
|
||||
array('key' => 'Attachments', 'type' => 'file', 'name' => 'file', 'default' => '')
|
||||
),'/index.php');
|
||||
),'/index.php');
|
||||
}
|
||||
|
||||
$qs = parse_url($_SERVER['REQUEST_URI']);
|
||||
|
||||
if (is_null($qs)) $qs = array('query' => '?');
|
||||
$qsq = $qs['query'];
|
||||
|
||||
$qss = array();
|
||||
|
||||
parse_str($qsq,$qss);
|
||||
|
||||
$qss['page'] = $page + 1;
|
||||
$qs_next = http_build_query($qss);
|
||||
$qss['page'] = $page - 1;
|
||||
$qs_prev = http_build_query($qss);
|
||||
?>
|
||||
|
||||
<div>
|
||||
<?php if ($page > 0) { ?>
|
||||
<a class="form-button" href="?id=<?php echo htmlspecialchars($_GET['id'])?>&page=<?php echo $page - 1 ?>">Previous</a>
|
||||
<a class="form-button" href="?<?php echo $qs_prev ?>">Previous</a>
|
||||
<?php } ?>
|
||||
<a class="form-button" href="?id=<?php echo htmlspecialchars($_GET['id'])?>&page=<?php echo $page + 1 ?>">Next</a>
|
||||
<a class="form-button" href="?<?php echo $qs_next ?>">Next</a>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
|
@ -44,7 +58,7 @@
|
|||
</a>
|
||||
</b></div>
|
||||
<div><b>
|
||||
<?php echo date(DATE_ATOM,$post['date'] + $ref) ?>
|
||||
<?php echo date(DATE_RFC2822,$post['date'] + $ref) ?>
|
||||
</b></div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue