Beispiel #1
0
$path = array("./dest/a", "./dest/b");
// 解压路径
$ret = array("./dest/result/ret_one.txt", "./dest/result/ret_two.txt");
$output = array();
// 存放解压后的文件名称
$pathone = "";
$pathtwo = "";
$storezipone = array();
// 保存压缩包有区别的文件名
$storeziptwo = array();
// 提取文件名称
extractfile($dir, $path, $output);
// 比较MD5码
comparefile($path[0], $path[1], $output[0], $output[1], $storezipone, $storeziptwo);
// 显示对比结果
showresult($output, $storezipone, $storeziptwo);
function showresult($output, $storezipone, $storeziptwo)
{
    echo "<table align='center' border='1'>";
    echo "<tr><td>压缩包1内容</td\\><td>压缩包2内容</td>";
    for ($i = 0, $j = 0; $i < count($output[0]) || $j < count($output[1]);) {
        echo "<tr>";
        echo "<td>";
        if (isset($output[0][$i])) {
            if (in_array($output[0][$i], $storezipone)) {
                echo "<p style='color:red'>";
            }
            echo $output[0][$i];
            echo "</p>";
            ++$i;
        }
        $g_array["Num"] = $g_opnum;
    }
    $g_mr = 'Y';
    $g_array["MR"] = $g_mr;
    showresult($g_array);
} elseif ($input == 'MC') {
    if ($g_isNum == 'Y') {
        $g_array["Num"] = $g_result;
    } else {
        $g_array["Num"] = $g_opnum;
    }
    $g_mrnum = 0;
    $g_mr = 'N';
    $g_array["MR"] = $g_mr;
    showresult($g_array);
} else {
    $g_array["Num"] = "0.";
    showresult($g_array);
    $g_result = 0;
    $g_opt = '';
    $g_opnum = 0;
    $g_isNum = '';
    $g_dec = 0;
}
$_SESSION['result'] = $g_result;
$_SESSION['operator'] = $g_opt;
$_SESSION['operand'] = $g_opnum;
$_SESSION['isNum'] = $g_isNum;
$_SESSION['decimal'] = $g_dec;
$_SESSION['MR'] = $g_mr;
$_SESSION['mrnum'] = $g_mrnum;
Beispiel #3
0
\t\t\t\tparent.document.getElementById("message").innerHTML = '';
\t\t\t\tth_upload = parent.document.getElementById("tr_upload").getElementsByTagName("th")[0];
\t\t\t\tth_upload.innerHTML += '<input type="hidden" name="getimages" value="{$getimages}">';
\t\t\t\tfunction init() {
\t\t\t\t\tparent.et = new parent.word("message", "{$string}", 0, {$pagebreak});
\t\t\t\t}
\t\t\t\tinit();
\t\t\t\t</script>
EOF;
            showresult($blang['remote_download_complete_picture'], 'ok');
        } else {
            showresult($blang['not_in_keeping_with_the_long_range_picture']);
        }
    }
} else {
    showresult($blang['uploading_files_failure']);
}
//函数
function showresult($message, $type = 'error')
{
    global $hash, $noinsert, $aid;
    $attacharr = empty($hash) ? array() : selecttable('attachments', array(), array('hash' => $hash), 'ORDER BY dateline');
    $listtext = getuploadinserthtml($attacharr, $noinsert, $aid);
    $listtext = addcslashes($listtext, '"');
    $message = addcslashes($message, '"');
    if (empty($message)) {
        $typestr = 'if(msg != null)msg.style.display = "none";
					if(msgok != null)msgok.style.display = "none";';
    } else {
        if ($type == 'ok') {
            $typestr = 'if(msg != null)msg.style.display = "none";
Beispiel #4
0
        print "</TD>";
        print "</TR>";
    }
    print "</TABLE>";
}
// showresult()
?>

<?php 
/* Skriva ut HTML-dokumentet */
?>
<head>
	<title>Sök användare</title>
</head>
<body bgcolor="#ffffff" text="#000000">
<?php 
meny();
searchform();
// skriv ut sökfältet
if ($namn) {
    search();
}
if ($mi) {
    showresult();
}
print "<br><br>";
meny();
?>
</body></html>
<?php 
mysql_close($link);