本文整理汇总了PHP中defCmdT函数的典型用法代码示例。如果您正苦于以下问题:PHP defCmdT函数的具体用法?PHP defCmdT怎么用?PHP defCmdT使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了defCmdT函数的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: defCmdT
defCmdT("last 1000 NTP log entries", "/usr/local/sbin/clog /var/log/ntpd.log 2>&1 | tail -n 1000");
defCmdT("last 1000 OpenVPN log entries", "/usr/local/sbin/clog /var/log/openvpn.log 2>&1 | tail -n 1000");
defCmdT("last 1000 Captive Portal auth log entries", "/usr/local/sbin/clog /var/log/portalauth.log 2>&1 | tail -n 1000");
defCmdT("last 1000 PPP log entries", "/usr/local/sbin/clog /var/log/poes.log 2>&1 | tail -n 1000");
defCmdT("last 1000 relayd log entries", "/usr/local/sbin/clog /var/log/relayd.log 2>&1 | tail -n 1000");
defCmdT("last 1000 resolver log entries", "/usr/local/sbin/clog /var/log/resolver.log 2>&1 | tail -n 1000");
defCmdT("last 1000 routing log entries", "/usr/local/sbin/clog /var/log/routing.log 2>&1 | tail -n 1000");
defCmdT("last 1000 wireless log entries", "/usr/local/sbin/clog /var/log/wireless.log 2>&1 | tail -n 1000");
if (file_exists("/tmp/PHP_errors.log")) {
defCmdT("PHP Error Log", "/bin/cat /tmp/PHP_errors.log");
}
defCmdT("System Message Buffer", "/sbin/dmesg -a");
defCmdT("System Message Buffer (Boot)", "/bin/cat /var/log/dmesg.boot");
defCmdT("sysctl values", "/sbin/sysctl -a");
defCmdT("Kernel Environment", "/bin/kenv");
defCmdT("Installed OS Packages", "/usr/sbin/pkg info");
exec("/bin/date", $dateOutput, $dateStatus);
$currentDate = $dateOutput[0];
$pgtitle = array("{$g['product_name']}", "Status");
include "head.inc";
print_info_box(gettext("Make sure all sensitive information is removed! (Passwords, etc.) before posting " . "information from this page in public places (like mailing lists).") . '<br />' . gettext("Common password fields in config.xml have been automatically redacted.") . '<br />' . gettext("When the page has finished loading, the output will be stored in {$output_file}. It may be downloaded via scp or ") . "<a href=\"/exec.php?dlPath={$output_file}\">" . gettext("Diagnostics > Command Prompt.") . '</a>');
listCmds();
execCmds();
print gettext("Saving output to archive...");
if (is_dir($output_path)) {
mwexec("/usr/bin/tar czpf " . escapeshellarg($output_file) . " -C " . escapeshellarg(dirname($output_path)) . " " . escapeshellarg(basename($output_path)));
unlink_if_exists("{$output_path}/*");
@rmdir($output_path);
}
print gettext("Done.");
include "foot.inc";
示例2: display_top_tabs
display_top_tabs($tab_array);
?>
</td></tr>
<tr>
<td>
<div id="mainarea">
<table class="tabcont" width="100%" border="0" cellpadding="6" cellspacing="0">
<tr>
<td>
<?php
defCmdT("OpenOSPFd Summary", "/usr/local/sbin/ospfctl show summary");
defCmdT("OpenOSPFd Neighbors", "/usr/local/sbin/ospfctl show neighbor");
defCmdT("OpenOSPFd FIB", "/usr/local/sbin/ospfctl show fib");
defCmdT("OpenOSPFd RIB", "/usr/local/sbin/ospfctl show rib");
defCmdT("OpenOSPFd Interfaces", "/usr/local/sbin/ospfctl show interfaces");
defCmdT("OpenOSPFD Database", "/usr/local/sbin/ospfctl show database");
?>
<div id="cmdspace" style="width:100%">
<?php
listCmds();
?>
<?php
execCmds();
?>
</div>
</td>
</tr>
</table>
</div>
</td>
示例3: defCmd
function defCmd($command)
{
defCmdT($command, $command);
}
示例4: defCmdT
defCmdT("last 1000 L2TP log entries", "/usr/local/sbin/clog /var/log/l2tps.log 2>&1 | tail -n 1000");
defCmdT("last 1000 NTP log entries", "/usr/local/sbin/clog /var/log/ntpd.log 2>&1 | tail -n 1000");
defCmdT("last 1000 OpenVPN log entries", "/usr/local/sbin/clog /var/log/openvpn.log 2>&1 | tail -n 1000");
defCmdT("last 1000 Captive Portal auth log entries", "/usr/local/sbin/clog /var/log/portalauth.log 2>&1 | tail -n 1000");
defCmdT("last 1000 PPP log entries", "/usr/local/sbin/clog /var/log/poes.log 2>&1 | tail -n 1000");
defCmdT("last 1000 relayd log entries", "/usr/local/sbin/clog /var/log/relayd.log 2>&1 | tail -n 1000");
defCmdT("last 1000 resolver log entries", "/usr/local/sbin/clog /var/log/resolver.log 2>&1 | tail -n 1000");
defCmdT("last 1000 routing log entries", "/usr/local/sbin/clog /var/log/routing.log 2>&1 | tail -n 1000");
defCmdT("last 1000 wireless log entries", "/usr/local/sbin/clog /var/log/wireless.log 2>&1 | tail -n 1000");
}
if (file_exists("/tmp/PHP_errors.log")) {
defCmdT("PHP Error Log", "/bin/cat /tmp/PHP_errors.log");
}
defCmdT("System Message Buffer", "/sbin/dmesg -a");
defCmdT("System Message Buffer (Boot)", "/bin/cat /var/log/dmesg.boot");
defCmdT("sysctl values", "/sbin/sysctl -a");
exec("/bin/date", $dateOutput, $dateStatus);
$currentDate = $dateOutput[0];
$pgtitle = array("{$g['product_name']}", "status");
include "head.inc";
print_info_box(gettext("Make sure all sensitive information is removed! (Passwords, etc.) before posting " . "information from this page in public places (like mailing lists)") . '<br />' . gettext("Common password fields in config.xml have been automatically redacted.") . '<br />' . gettext("When the page has finished loading, the output will be stored in {$output_file}. It may be downloaded via scp or ") . "<a href=\"/exec.php?dlPath={$output_file}\">" . gettext("Diagnostics > Command Prompt") . '</a>');
listCmds();
execCmds();
print gettext("Saving output to archive...");
if (is_dir($output_path)) {
mwexec("/usr/bin/tar czpf " . escapeshellarg($output_file) . " -C " . escapeshellarg(dirname($output_path)) . " " . escapeshellarg(basename($output_path)));
unlink_if_exists("{$output_path}/*");
@rmdir($output_path);
}
print gettext("Done.");
include "foot.inc";
示例5: array
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr><td class="tabnavtbl">
<?php
$tab_array = array();
$tab_array[] = array(gettext("General"), false, "/pkg_edit.php?xml=ladvd.xml&id=0");
$tab_array[] = array(gettext("Status"), true, "/status_ladvd.php");
display_top_tabs($tab_array);
?>
</td></tr>
<tr><td>
<div id="mainarea">
<table class="tabcont" width="100%" border="0" cellpadding="6" cellspacing="0">
<tr><td>
<?php
defCmdT("LADVD Devices", "{$control_script}");
defCmdT("LADVD Detailed decode", "{$control_script} -f");
?>
<div id="cmdspace" style="width:100%">
<?php
listCmds();
?>
<?php
execCmds();
?>
</div>
</td></tr>
</table>
</div>
</td></tr>
</table>
<?php
示例6: defCmdT
<div id="mainarea">
<table class="tabcont" width="100%" border="0" cellpadding="6" cellspacing="0">
<tr>
<td>
<?php
defCmdT("Quagga OSPF General", "{$control_script} ospf general");
defCmdT("Quagga OSPF Neighbors", "{$control_script} ospf neighbor");
defCmdT("Quagga OSPF Database", "{$control_script} ospf database");
defCmdT("Quagga OSPF Router Database", "{$control_script} ospf database router");
defCmdT("Quagga OSPF Routes", "{$control_script} ospf route");
defCmdT("Quagga Zebra Routes", "{$control_script} zebra route");
defCmdT("Quagga OSPF Interfaces", "{$control_script} ospf interfaces");
defCmdT("Quagga OSPF CPU Usage", "{$control_script} ospf cpu");
defCmdT("Quagga OSPF Memory", "{$control_script} ospf mem");
defCmdT("Quagga ospfd.conf", "/bin/cat {$pkg_homedir}/ospfd.conf");
defCmdT("Quagga zebra.conf", "/bin/cat {$pkg_homedir}/zebra.conf");
?>
<div id="cmdspace" style="width:100%">
<?php
listCmds();
?>
<?php
execCmds();
?>
</div>
</td>
</tr>
</table>
</div>
</td>
</tr>
示例7: defCmdT
defCmdT("last 1000 Captive Portal auth log entries", "/usr/local/sbin/clog /var/log/portalauth.log 2>&1 | tail -n 1000");
defCmdT("last 1000 PPP log entries", "/usr/local/sbin/clog /var/log/poes.log 2>&1 | tail -n 1000");
defCmdT("last 1000 relayd log entries", "/usr/local/sbin/clog /var/log/relayd.log 2>&1 | tail -n 1000");
defCmdT("last 1000 resolver log entries", "/usr/local/sbin/clog /var/log/resolver.log 2>&1 | tail -n 1000");
defCmdT("last 1000 routing log entries", "/usr/local/sbin/clog /var/log/routing.log 2>&1 | tail -n 1000");
defCmdT("last 1000 wireless log entries", "/usr/local/sbin/clog /var/log/wireless.log 2>&1 | tail -n 1000");
if (file_exists("/tmp/PHP_errors.log")) {
defCmdT("PHP Error Log", "/bin/cat /tmp/PHP_errors.log");
}
defCmdT("System Message Buffer", "/sbin/dmesg -a");
defCmdT("System Message Buffer (Boot)", "/bin/cat /var/log/dmesg.boot");
defCmdT("sysctl values", "/sbin/sysctl -a");
defCmdT("Kernel Environment", "/bin/kenv");
defCmdT("Installed OS Packages", "/usr/sbin/pkg info");
defCmdT("System Devices-PCI", "/usr/sbin/pciconf -lvb");
defCmdT("System Devices-USB", "/usr/sbin/usbconfig dump_device_desc");
exec("/bin/date", $dateOutput, $dateStatus);
$currentDate = $dateOutput[0];
$pgtitle = array("{$g['product_name']}", "Status");
include "head.inc";
print_info_box(gettext("Make sure all sensitive information is removed! (Passwords, etc.) before posting " . "information from this page in public places (like mailing lists).") . '<br />' . gettext("Common password fields in config.xml have been automatically redacted.") . '<br />' . gettext("When the page has finished loading, the output will be stored in {$output_file}. It may be downloaded via scp or ") . "<a href=\"/diag_command.php?dlPath={$output_file}\">" . gettext("Diagnostics > Command Prompt.") . '</a>');
listCmds();
execCmds();
print gettext("Saving output to archive...");
if (is_dir($output_path)) {
mwexec("/usr/bin/tar czpf " . escapeshellarg($output_file) . " -C " . escapeshellarg(dirname($output_path)) . " " . escapeshellarg(basename($output_path)));
unlink_if_exists("{$output_path}/*");
@rmdir($output_path);
}
print gettext("Done.");
include "foot.inc";
示例8: TORT
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
require "guiconfig.inc";
$commands = array();
defCmdT("summary", "OpenBGPD Summary", "/usr/local/sbin/bgpctl show summary");
defCmdT("interfaces", "OpenBGPD Interfaces", "/usr/local/sbin/bgpctl show interfaces");
defCmdT("routing", "OpenBGPD Routing", "/usr/local/sbin/bgpctl show rib", true, 4);
defCmdT("forwarding", "OpenBGPD Forwarding", "/usr/local/sbin/bgpctl show fib", true, 5);
defCmdT("network", "OpenBGPD Network", "/usr/local/sbin/bgpctl show network");
defCmdT("nexthops", "OpenBGPD Nexthops", "/usr/local/sbin/bgpctl show nexthop");
defCmdT("ip", "OpenBGPD IP", "/usr/local/sbin/bgpctl show ip bgp", true, 4);
defCmdT("neighbors", "OpenBGPD Neighbors", "/usr/local/sbin/bgpctl show neighbor");
if (isset($_REQUEST['isAjax'])) {
if (isset($_REQUEST['cmd']) && isset($commands[$_REQUEST['cmd']])) {
echo "{$_REQUEST['cmd']}\n";
if (isset($_REQUEST['count'])) {
echo " of " . countCmdT($commands[$_REQUEST['cmd']]['command']) . " items";
} else {
echo htmlspecialchars_decode(doCmdT($commands[$_REQUEST['cmd']]['command'], $_REQUEST['limit'], $_REQUEST['filter'], $_REQUEST['header_size']));
}
}
exit;
}
$pgtitle = array("OpenBGPD", "Status");
include "head.inc";
function doCmdT($command, $limit = "all", $filter = "", $header_size = 0)
{
示例9: defCmdT
<tr>
<td>
<div id="mainarea">
<table class="tabcont" width="100%" border="0" cellpadding="6" cellspacing="0">
<tr>
<td>
<?php
defCmdT("Quagga OSPF General", "{$control_script} ospf general");
defCmdT("Quagga OSPF Neighbors", "{$control_script} ospf neighbor");
defCmdT("Quagga OSPF Database", "{$control_script} ospf database");
defCmdT("Quagga OSPF Router Database", "{$control_script} ospf database router");
defCmdT("Quagga OSPF Routes", "{$control_script} ospf route");
defCmdT("Quagga Zebra Routes", "{$control_script} zebra route");
defCmdT("Quagga OSPF Interfaces", "{$control_script} ospf interfaces");
defCmdT("Quagga OSPF CPU Usage", "{$control_script} ospf cpu");
defCmdT("Quagga OSPF Memory", "{$control_script} ospf mem");
?>
<div id="cmdspace" style="width:100%">
<?php
listCmds();
?>
<?php
execCmds();
?>
</div>
</td>
</tr>
</table>
</div>
</td>
</tr>