示例#1
0
			<h1>0x<?php 
echo dechex($module->Address);
?>
 (<?php 
echo $types[$module->Type];
?>
): <?php 
echo $module->Description;
?>
</h1>
			<p>&nbsp;</p>
			<p>This page lets you test the module via basic commands.</p>

<?php 
$data = icc_sendreceive("GET_STATUS " . dechex($addr) . "\n");
if ($data === "") {
    redirect($g_root . '/error_connect.php');
}
if (substr($data, 0, 3) === "-KO") {
    redirect($g_root . '/error_comm.php');
}
$status = array();
sscanf($data, "+OK %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d", $status[0], $status[1], $status[2], $status[3], $status[4], $status[5], $status[6], $status[7], $status[8], $status[9], $status[10], $status[11], $status[12], $status[13], $status[14], $status[15]);
?>

<?php 
if ($module->Type === 0x20) {
    ?>
			<form method="post" id="frm">
			<table border="0" cellspacing="0">
示例#2
0
                    $data = icc_sendreceive("DO_HARDRESET " . dechex($address) . "\n");
                    if ($data[0] === '-') {
                        $err = 2;
                    }
                    sleep(4);
                    $data = icc_sendreceive("DO_RESCAN\n");
                    if ($data[0] === '-') {
                        $err = 2;
                    }
                    sleep(2);
                }
            }
        }
    }
}
$data = icc_sendreceive("GET_MODULELIST\n");
//echo $data; /////////////////////////////////////////////////// DEBUG
if ($data === "") {
    redirect($g_root . '/error_connect.php');
}
$modules = read_moduleident_list($data);
require '../header.php';
?>
<section class="content">
	<div class="wrapper">
		<article class="article page">
<?php 
if ($err === 1) {
    ?>
			<p class="invalid"><strong>Error:</strong> Please select an address other than 0x77 and a valid type!</p>
<?php