multiple paths in one divided by pipes after a loooong discussion
This commit is contained in:
parent
5f8bb4be78
commit
23a5af48ae
|
@ -85,14 +85,29 @@ for ($col=0; $col <count($arrColnames); $col++){
|
||||||
} elseif ($arrColnames[$col] == "cdrom"){
|
} elseif ($arrColnames[$col] == "cdrom"){
|
||||||
echo "<div class=row><div class=col-md-1 style=text-align:right>cdrom</div><div class=col-md-2><div class=dropdown><button class=\"btn btn-secondary dropdown-toggle\" type=button id=cdrombutton data-toggle=dropdown aria-haspopup=true aria-expanded=false>$val</button>";
|
echo "<div class=row><div class=col-md-1 style=text-align:right>cdrom</div><div class=col-md-2><div class=dropdown><button class=\"btn btn-secondary dropdown-toggle\" type=button id=cdrombutton data-toggle=dropdown aria-haspopup=true aria-expanded=false>$val</button>";
|
||||||
echo "<div class=dropdown-menu aria-labelledby=cdrombutton>";
|
echo "<div class=dropdown-menu aria-labelledby=cdrombutton>";
|
||||||
$files = array_diff(scandir($config['ISODIRECTORY']), array('.', '..'));
|
$isodirs = explode('|', $config['ISODIRECTORY']);
|
||||||
$files = array_values(array_filter($files));
|
foreach($isodirs as $isodir){
|
||||||
for ($f=0; $f<count($files); $f++){
|
$files = array_diff(scandir($isodir), array('.', '..'));
|
||||||
if ((preg_match('/iso/', $files[$f]))||(preg_match('/ISO/', $files[$f]))){
|
$files = array_values(array_filter($files));
|
||||||
echo "<a class=dropdown-item href=\"javascript:dropdown('cdrombutton','$files[$f]')\">$files[$f]</a>";
|
for ($f=0; $f<count($files); $f++){
|
||||||
|
if ((preg_match('/iso/', $files[$f]))||(preg_match('/ISO/', $files[$f]))){
|
||||||
|
echo "<a class=dropdown-item href=\"javascript:dropdown('cdrombutton','$isodir/$files[$f]')\">$isodir/$files[$f]</a>";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
echo "</div></div></div></div><input type=hidden id=cdrombuttonh name=cdrom value=$val>";
|
echo "</div></div></div></div><input type=hidden id=cdrombuttonh name=cdrom value=$val>";
|
||||||
|
} elseif (preg_match('/drive/', $arrColnames[$col])){
|
||||||
|
echo "<div class=row><div class=col-md-1 style=text-align:right>$arrColnames[$col]</div><div class=col-md-2><div class=dropdown><button class=\"btn btn-secondary dropdown-toggle\" type=button id=$arrColnames[$col]button data-toggle=dropdown aria-haspopup=true aria-expanded=false>$val</button>";
|
||||||
|
echo "<div class=dropdown-menu aria-labelledby=$arrColnames[$col]button>";
|
||||||
|
$vmdirs = explode('|', $config['VMDIRECTORY']);
|
||||||
|
foreach($vmdirs as $vmdir){
|
||||||
|
$files = array_diff(scandir($vmdir), array('.', '..'));
|
||||||
|
$files = array_values(array_filter($files));
|
||||||
|
for ($f=0; $f<count($files); $f++){
|
||||||
|
echo "<a class=dropdown-item href=\"javascript:dropdown('$arrColnames[$col]button','$vmdir/$files[$f]')\">$vmdir/$files[$f]</a>";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
echo "</div></div></div></div><input type=hidden id=$arrColnames[$col]buttonh name=$arrColnames[$col] value=$val>";
|
||||||
} else {
|
} else {
|
||||||
echo "<div class=row><div class=col-md-1 style=text-align:right>$arrColnames[$col]</div><div class=col-md-2><input class=form-control type=text name=$arrColnames[$col] value=$val></div></div>";
|
echo "<div class=row><div class=col-md-1 style=text-align:right>$arrColnames[$col]</div><div class=col-md-2><input class=form-control type=text name=$arrColnames[$col] value=$val></div></div>";
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue