mirror of
https://github.com/danpros/htmly.git
synced 2026-04-19 20:16:22 +05:30
Add category
Add category feature to the core.
This commit is contained in:
parent
eb2e5320e4
commit
a4b6fe18db
26 changed files with 1282 additions and 159 deletions
30
system/admin/views/delete-category.html.php
Normal file
30
system/admin/views/delete-category.html.php
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
<?php
|
||||
if (isset($_GET['destination'])) {
|
||||
$destination = $_GET['destination'];
|
||||
}
|
||||
$url = $p->file;
|
||||
|
||||
$dir = substr($url, 0, strrpos($url, '/'));
|
||||
$oldurl = str_replace($dir . '/', '', $url);
|
||||
$oldmd = str_replace('.md', '', $oldurl);
|
||||
|
||||
$post = $p->url;
|
||||
|
||||
if (isset($destination)) {
|
||||
|
||||
if ($destination == 'post') {
|
||||
$back = $post;
|
||||
} else {
|
||||
$back = site_url() . $destination;
|
||||
}
|
||||
} else {
|
||||
$back = site_url();
|
||||
}
|
||||
?>
|
||||
<p>Are you sure want to delete <strong><?php echo $p->title; ?></strong>?</p>
|
||||
<form method="POST">
|
||||
<input type="hidden" name="file" value="<?php echo $p->file ?>"/><br>
|
||||
<input type="hidden" name="csrf_token" value="<?php echo get_csrf() ?>">
|
||||
<input type="submit" name="submit" value="Delete"/>
|
||||
<span><a href="<?php echo $back ?>">Cancel</a></span>
|
||||
</form>
|
||||
Loading…
Add table
Add a link
Reference in a new issue