-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathfiles.php
More file actions
62 lines (56 loc) · 1.48 KB
/
Copy pathfiles.php
File metadata and controls
62 lines (56 loc) · 1.48 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
<?PHP
include 'header.php';
include 'language.php';
$uname=$_SESSION['uname'];
$admin=$_SESSION['admin'];
$pword=$_SESSION['password'];
exec('getent passwd '.$uname.' | cut -d: -f6', $r, $errno);
if ($errno==0)
$olpath=$r[0];
else
$olpath='/tmp';
exec("ps -ef |grep webssh | grep -v grep", $r, $errno);
if ( $errno == 0)
$ssh = true;
else
$ssh = false;
?>
<!DOCTYPE html>
<html>
<?php include('header.html');?>
<body class="hold-transition <?PHP echo $skin;?> sidebar-mini">
<div class="wrapper">
<!-- Navigation -->
<?PHP include 'navigation.php';?>
<div class="content-wrapper">
<section class="content-header">
<h1 class="page-header">
<?PHP echo $lang['MY_FILES'];?>
</h1>
</section>
<section class="content">
<div class="row">
<div class="col-md-12">
<div class="box box-solid">
<div class="box-body">
<?php
if ($ssh) {
echo '<a target="_blank" href="http://'.$_SERVER['SERVER_ADDR'].':2222/ssh/host/'.$_SERVER['SERVER_ADDR'].'">';
echo '<button type="button" class="btn btn-info">ssh</button></a>';
}
?>
</div>
<div class="box-body">
<div id="elfinder"></div>
</div>
</div>
</div>
</div>
</section>
</div>
</div>
<?PHP include('js.html');?>
<!-- elFinder JS (REQUIRED) -->
<?PHP include 'elFinderInit.php';?>
</body>
</html>