forked from tinyspeck/hammock
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathview.php
More file actions
31 lines (22 loc) · 625 Bytes
/
Copy pathview.php
File metadata and controls
31 lines (22 loc) · 625 Bytes
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
<?php
$dir = dirname(__FILE__);
include("$dir/lib/init.php");
verify_auth();
load_plugins();
$instance = getPluginInstance($_GET['id']);
if (!is_object($instance)) die("instance not found");
if ($_POST['delete-instance']){
$instance->deleteMe();
header("location: ./");
exit;
}
if ($_POST['new-token']){
$instance->regenToken();
$instance->saveConfig();
header("location: {$instance->getViewUrl()}&newtoken=1");
exit;
}
$instance->checkRequirements();
$smarty->assign('instance', $instance);
$smarty->assign('html', $instance->onView());
$smarty->display('page_view.txt');