?>
					<?php 
    foreach ($torrent_info as $key => $val) {
        ?>
					<?php 
        if ($globalinfo["isGaya"] && is_array($val)) {
            continue;
        }
        ?>
					<tr>
						<td nowrap="nowrap" class="txt"><?php 
        echo htmlspecialchars(ucfirst(strtolower($key)));
        ?>
:</td>
						<td class="txt"><?php 
        echo is_array($val) ? tor_getContentAsHtmlList($val) : tor_parseContentAsHtml($key, $val);
        ?>
</td>
					</tr>
					<?php 
    }
    ?>
				<?php 
} else {
    ?>
				<tr>
						<td class="txt">Error:</td>
						<td class="txt">Cannot find torrent file.</td>
					</tr>
				<?php 
}
예제 #2
0
function tor_getContentAsHtmlList($t)
{
    if (!is_array($t)) {
        return;
    }
    $result = "<ul>";
    foreach ($t as $key => $val) {
        $result .= "<li>" . htmlspecialchars(ucfirst(strtolower($key))) . ":";
        $result .= is_array($val) ? tor_getContentAsHtmlList($val) : tor_parseContentAsHtml($key, $val);
    }
    $result .= "</ul>";
    return $result;
}