user limit
This commit is contained in:
parent
b458cc9f8b
commit
33fd6621a2
|
@ -353,10 +353,15 @@ if (isset($_SESSION['username'])){
|
||||||
}
|
}
|
||||||
|
|
||||||
if(($mode!="newvm")&&($mode!="editvm")&&($mode!='usermgmt')){
|
if(($mode!="newvm")&&($mode!="editvm")&&($mode!='usermgmt')){
|
||||||
echo "</br><a class=\"btn btn-primary\" href=# onclick=\"post('?', {newvm: 'newvm'});\">Create a new VM</a></br></br>";
|
if ($_SESSION['isadmin']=="1"){
|
||||||
|
$sqllimit="";
|
||||||
|
echo "</br><a class=\"btn btn-primary\" href=# onclick=\"post('?', {newvm: 'newvm'});\">Create a new VM</a></br></br>";
|
||||||
|
} else {
|
||||||
|
$sqllimit="WHERE user='$_SESSION[username]'";
|
||||||
|
}
|
||||||
|
|
||||||
//getting vms from DB
|
//getting vms from DB
|
||||||
$sql="SELECT * FROM vms";
|
$sql="SELECT * FROM vms $sqllimit";
|
||||||
$res = $db_handle->query($sql);
|
$res = $db_handle->query($sql);
|
||||||
echo "<div class=row>";
|
echo "<div class=row>";
|
||||||
while ($row = $res->fetchArray(SQLITE3_ASSOC)){
|
while ($row = $res->fetchArray(SQLITE3_ASSOC)){
|
||||||
|
|
Loading…
Reference in New Issue