-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsamba1.php
More file actions
113 lines (101 loc) · 4.18 KB
/
samba1.php
File metadata and controls
113 lines (101 loc) · 4.18 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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
<?php
include("header.php");
if($_SESSION['flag']=="allowed")
{
$action=$_POST['samba1'];
if($action=="convert")
{
echo '
<ol class="breadcrumb">
<li><a href="home.php">Home</a></li>
<li><a href="server.php">Servers</a></li>
<li><a href="samba.php">Setup Samba</a></li>
<li class="active">Convert User</li>
</ol>';
echo '
<div class="container">
<form class="form-signin" role="form" action="samba2.php" method="post">
<h2 class="form-signin-heading">Convert Unix User to Samba User</h2>
<input type="text" name="name" class="form-control" placeholder="Enter Name of the User to Convert" required>
<div>
<br>
<button class="btn btn-primary" name="samba2" value="convert">Convert</button>
</div>
</form>';
}
if($action=="create")
{
echo '
<ol class="breadcrumb">
<li><a href="home.php">Home</a></li>
<li><a href="server.php">Servers</a></li>
<li><a href="samba.php">Setup Samba</a></li>
<li class="active">Create New Share</li>
</ol>';
echo '
<div class="container">
<form action="samba2.php" method="post">
<h2 class="form-signin-heading">Create New Share</h2>
<input type="text" name="name" class="form-control" placeholder="Share Name" required>
<input type="text" name="dir" class="form-control" placeholder="Directory Name to be Shared" required>
<input type="text" name="writable" class="form-control" placeholder="Writable(Specify in yes/no)" required>
<input type="text" name="printable" class="form-control" placeholder="Printable(Specify in yes/no)" required>
<input type="text" name="path" class="form-control" placeholder="Enter Path" required>
<input type="text" name="owner" class="form-control" placeholder="Enter Owner of the Shared File">
<input type="text" name="gowner" class="form-control" placeholder="Enter Group Owner of the Shared FIle">
<input type="text" name="vusers" class="form-control" placeholder="Enter Valid Users(seperated by comma(,))">
<input type="text" name="iusers" class="form-control" placeholder="Enter Invalid Users (seperated by comma(,))">
<input type="text" name="vgroups" class="form-control" placeholder="Enter Valid Groups" >
<input type="text" name="igroups" class="form-control" placeholder="Enter Invalid Groups" >
<input type="text" name="comment" class="form-control" placeholder="Enter Comment required">
<div>
<br>
<button class="btn btn-primary" name="samba2" value="create">Create</button>
</div>
</form>';
}
if($action=="undo")
{
echo '
<ol class="breadcrumb">
<li><a href="home.php">Home</a></li>
<li><a href="server.php">Servers</a></li>
<li><a href="samba.php">Setup Samba</a></li>
<li class="active">Undo Samba Share</li>
</ol>';
echo '
<div class="container">
<form class="form-signin" role="form" action="samba2.php" method="post">
<h2 class="form-signin-heading">Undo Samba Share</h2>
<input type="text" name="name" class="form-control" placeholder="Enter Share Name" required><br>
<input type="text" name="path" class="form-control" placeholder="Enter Share Path" required>
<div>
<br>
<button class="btn btn-primary" name="samba2" value="undo">Undo</button>
</div>
</form>';
}
if($action=="change")
{
echo '
<ol class="breadcrumb">
<li><a href="home.php">Home</a></li>
<li><a href="server.php">Servers</a></li>
<li><a href="samba.php">Setup Samba</a></li>
<li class="active">Change Password</li>
</ol>';
echo '
<div class="container">
<form class="form-signin" role="form" action="samba2.php" method="post">
<h2 class="form-signin-heading">Change Password</h2>
<input type="text" name="name" class="form-control" placeholder="Enter Share Name required><br>
<input type="password" name="pass" class="form-control" placeholder="Enter New Password" required>
<div>
<br>
<button class="btn btn-primary" name="samba2" value="change">Change</button>
</div>
</form>';
}
}
else
header("location:index.php");