Unraid-SlackPack/source/shellinabox-plugin/usr/local/emhttp/plugins/shellinabox-plugin/CommandLine.page
2016-01-07 14:17:06 -07:00

31 lines
839 B
Plaintext

Menu="UNRAID-OS"
Title="Command Line"
Type="xmenu"
---
<?php
$sName = "shellinaboxd";
$shellinabox_cfg = parse_plugin_cfg("shellinabox-plugin");
$shellinabox_ipaddr = isset($shellinabox_cfg['IPADDR']) ? $shellinabox_cfg['IPADDR'] : "disable";
$shellinabox_host = ($shellinabox_ipaddr == "disable") ? $var['NAME'] : $var['IPADDR'];
$shellinabox_port = (isset($shellinabox_cfg['PORT']) && is_numeric($shellinabox_cfg['PORT']) && $shellinabox_cfg['PORT'] > 0 && $shellinabox_cfg['PORT'] < 65535 ) ? $shellinabox_cfg['PORT'] : "4200";
?>
<style>
iframe {
height: 600px;
width: 100%;
resize: both;
overflow: auto;
border: 0px;
}
</style>
<div>
<iframe id="shell" src="http://<?=$shellinabox_host?>:<?=$shellinabox_port;?>">
</iframe>
</div>
<script type="text/javascript">
$(function(){
showStatus('<?=$sName;?>');
});
</script>