-
Notifications
You must be signed in to change notification settings - Fork 0
/
imghelper_menu.php
55 lines (40 loc) · 1.21 KB
/
imghelper_menu.php
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
<?php
require_once("auth.php");
?>
<?php
$rp=realpath('');
include_once($rp.'/cbsd_cmd.php');
function jail_menu()
{
global $jname;
# $str = <<<EOF
# <a href="javascript:location.reload(true)">[ Refresh Page ]</a> | <a href="jconfig.php?jname=$jname">[ Config ]</a> |
# <a href="jclone.php?jname=$jname">[ Clone ]</a> | <a href="jrename.php?jname=$jname">[ Rename ]</a> | <a href="jexport.php?jname=$jname">[ Export ]</a> |
# <a href="jdescr.php?jname=$jname">[ Descr ]</a> |
# <a href="imghelper.php?jname=$jname">[ Helpers ]</a> |
#
#EOF;
# echo $str;
# echo "<hr>";
$str = <<<EOF
<a href="javascript:location.reload(true)">[ Refresh Page ]</a> | <a href="jconfig.php?jname=$jname">[ Config ]</a> |
EOF;
//$fp=popen("env NOCOLOR=1 /usr/local/bin/sudo /usr/local/bin/cbsd imghelper header=0", "r");
$res=cbsd_cmd('env NOCOLOR=1 /usr/local/bin/sudo /usr/local/bin/cbsd imghelper header=0');
if ($res['retval'] != 0 ) {
if (!empty($res['error_message']))
echo $res['error_message'];
exit(1);
}
$lst=explode("\n",$res['message']);
$n=0;
if(!empty($lst)) foreach($lst as $item)
{
$str .= <<<EOF
<a href="img_helper_cfg.php?jname=$jname&helper=$item">[ $item ]</a> |
EOF;
}
echo $str;
echo "<hr>";
}
?>