$tab[] = parseentry($pattern); $del = preg_replace("/\\//", "\\/", quotemeta($pattern)); $str = preg_replace("/{$del}/msi", "", $str); } return $tab; } print "<table >"; print "<tr><td class=\"formtitle\">"; print "Journal des événements"; print "</td></tr><tr><td>"; if (!$del) { if ($fp = fopen($logfile, 'r')) { $str = fread($fp, filesize($logfile)); fclose($fp); // récupération du tableau des entrées $entry = parselog($str); if (sizeof($entry) && filesize($logfile) > 0) { $entry = array_reverse($entry); print "<a href='./admin.php?categ=log&del=1'>vider le journal</a>"; print "<table border='0' cellspacing='1'>"; while (list($cle, $valeur) = each($entry)) { switch ($valeur['errornum']) { case E_CORE_ERROR: case E_COMPILE_ERROR: case E_USER_ERROR: case E_ERROR: $evt_icon = "<img src='./images/alert.gif' align='left'>"; $bgcolor = '#ffffff'; break; case E_PARSE: case E_COMPILE_WARNING:
} fclose($fp); $count = count($lines); swritefile($tmpfile, implode(';', $lines)); } if ($fromcache) { $data = explode(';', sreadfile($tmpfile)); $count = count($data); $lines = array_slice($data, $start, $perpage); if ($lines) { $fp = fopen(S_ROOT . './data/log/' . $_GET['file'], 'r'); foreach ($lines as $line) { list($l, $o, $n) = explode('-', $line); fseek($fp, $o); $line = $n ? fread($fp, $n) : ''; $loginfo = parselog($line); $loginfo['line'] = $l; $uids[] = $loginfo['uid']; $list[] = $loginfo; } fclose($fp); } } if ($uids) { $query = $_SGLOBAL['db']->query('SELECT * FROM ' . tname('space') . ' WHERE uid IN (' . simplode($uids) . ')'); while ($value = $_SGLOBAL['db']->fetch_array($query)) { realname_set($value['uid'], $value['username']); } realname_get(); } $multi = multi($count, $perpage, $page, $mpurl);
</td> <td><?php echo endTime("FINISHED"); ?> </td> <td><?php echo status("FINISHED"); ?> </td> </tr> </table> <hr/> <h2>Output from PEcAn</h2> <textarea id="log" cols="80" rows="10" readonly="readonly"> <?php parselog($folder . DIRECTORY_SEPARATOR . "workflow.Rout"); ?> </textarea> </div> <div id="footer"> The <a href="http://pecanproject.org">PEcAn project</a> is supported by the National Science Foundation (ABI #1062547, ARC #1023477) and the <a href="http://www.energybiosciencesinstitute.org/">Energy Biosciences Institute</a>. </div> </div> <script> var logtext = document.getElementById('log'); logtext.scrollTop = logtext.scrollHeight; //This forces the log scroll bar to begin at the bottom for the most recent printout </script> <body>