htmly/system/admin/views/delete-page.html.php
Danang Probo Sayekti 36f4c2d4df Various improvements
Various improvements
2014-02-07 07:14:05 +07:00

24 lines
No EOL
624 B
PHP

<?php
$destination = $_GET['destination'];
$url = $p->file;
$dir = substr($url, 0, strrpos($url, '/'));
$oldurl = str_replace($dir . '/','',$url);
$oldmd = str_replace('.md','',$oldurl);
$post = site_url() . $oldmd;
if($destination == 'post') {
$back = $post;
}
else {
$back = site_url() . $destination;
}
?>
<?php echo '<p>Are you sure want to delete <strong>' . $p->title . '</strong>?</p>';?>
<form method="POST">
<input type="hidden" name="file" value="<?php echo $p->file ?>"/><br>
<input type="submit" name="submit" value="Delete"/>
<span><a href="<?php echo $back ?>">Cancel</a></span>
</form>