forked from featherbb/featherbb
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdelete.php
More file actions
71 lines (64 loc) · 2.87 KB
/
Copy pathdelete.php
File metadata and controls
71 lines (64 loc) · 2.87 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
<?php
/**
* Copyright (C) 2015-2016 FeatherBB
* based on code by (C) 2008-2015 FluxBB
* and Rickard Andersson (C) 2002-2008 PunBB
* License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher
*/
use FeatherBB\Core\Url;
use FeatherBB\Core\Utils;
// Make sure no one attempts to run this script "directly"
if (!isset($feather)) {
exit;
}
Container::get('hooks')->fire('view.delete.start');
?>
<div class="linkst">
<div class="inbox">
<ul class="crumbs">
<li><a href="<?= Url::base() ?>"><?php _e('Index') ?></a></li>
<li><span>» </span><a href="<?= Router::pathFor('Forum', ['id' => $cur_post['fid'], 'name' => Url::url_friendly($cur_post['forum_name'])]) ?>"><?= Utils::escape($cur_post['forum_name']) ?></a></li>
<li><span>» </span><a href="<?= Router::pathFor('viewPost', ['pid' => $id]).'#p'.$id ?>"><?= Utils::escape($cur_post['subject']) ?></a></li>
<li><span>» </span><strong><?php _e('Delete post') ?></strong></li>
</ul>
</div>
</div>
<div class="blockform">
<h2><span><?php _e('Delete post') ?></span></h2>
<div class="box">
<form method="post" action="<?= Router::pathFor('deletePost', array('id'=>$id)) ?>">
<input type="hidden" name="csrf_name" value="<?= $csrf_name; ?>"><input type="hidden" name="csrf_value" value="<?= $csrf_value; ?>">
<div class="inform">
<div class="forminfo">
<h3><span><?php printf($is_topic_post ? __('Topic by') : __('Reply by'), '<strong>'.Utils::escape($cur_post['poster']).'</strong>', Utils::format_time($cur_post['posted'])) ?></span></h3>
<p><?= ($is_topic_post) ? '<strong>'.__('Topic warning').'</strong>' : '<strong>'.__('Warning').'</strong>' ?><br /><?php _e('Delete info') ?></p>
</div>
</div>
<p class="buttons"><input type="submit" name="delete" value="<?php _e('Delete') ?>" /> <a href="javascript:history.go(-1)"><?php _e('Go back') ?></a></p>
</form>
</div>
</div>
<div id="postreview">
<div class="blockpost">
<div class="box">
<div class="inbox">
<div class="postbody">
<div class="postleft">
<dl>
<dt><strong><?= Utils::escape($cur_post['poster']) ?></strong></dt>
<dd><span><?= Utils::format_time($cur_post['posted']) ?></span></dd>
</dl>
</div>
<div class="postright">
<div class="postmsg">
<?= $cur_post['message']."\n" ?>
</div>
</div>
</div>
<div class="clearer"></div>
</div>
</div>
</div>
</div>
<?php
Container::get('hooks')->fire('view.delete.end');