コード例 #1
0
ファイル: logfile.php プロジェクト: Silicondust/dvr_install
function getLogFileList($logPath)
{
    $listStr = '';
    $logList = new DVRUI_Engine_LogList($logPath);
    $logListEntry = file_get_contents('style/loglist_entry.html');
    if ($logList->pathExists()) {
        $listStr = '<ul>';
        for ($i = $logList->getListLength() - 1; $i >= 0; $i--) {
            $logfile = basename($logList->getNextLogFile($i), '.log');
            $logfullname = basename($logList->getNextLogFile($i));
            $logEntry = str_replace('<!--logfile-name -->', $logfile, $logListEntry);
            $logEntry = str_replace('<!--logfile-fname -->', $logfullname, $logEntry);
            $listStr .= $logEntry;
        }
        $listStr .= '</ul>';
    } else {
        $listStr = "ERROR: recording path is invalid";
    }
    return $listStr;
}