echo "<option selected>{$v}</option>"; } else { echo "<option>{$v}</option>"; } } ?> </select> lines of the workflow.Rout <div class="logfile"> <?php $lines = array(); if (file_exists("{$folder}/workflow.Rout")) { $tail = explode("\n", tailCustom("{$folder}/workflow.Rout", $loglines)); $lines = array_merge($lines, $tail); } if (file_exists("{$folder}/workflow2.Rout")) { $tail = explode("\n", tailCustom("{$folder}/workflow2.Rout", $loglines)); $lines = array_merge($lines, $tail); } if (count($lines) > $loglines) { $lines = array_slice($lines, -$loglines); } echo implode("<br/>\n", $lines); ?> </div> </div> <div id="footer"><?php echo get_footer(); ?> </div> </div> </body>
<?php header('Content-Type: text/html; charset=UTF-8'); //header("Cache-Control: no-store, no-cache, must-revalidate"); // HTTP/1.1 //header("Cache-Control: post-check=0, pre-check=0", false); //header("Expires: Sat, 26 Jul 1997 05:00:00 GMT"); // Date in the past //header("Pragma: no-cache"); // HTTP/1.0 //header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); include_once "config/tail.php"; //$str = exec('start /B D:\Script\scpinfrubber_get.bat'); $test = "C:\\proscp\\logerr.log"; $l = 1; echo "Hello, "; //system("ls -l"); $text = tailCustom($test, $l); echo $text; echo "world!\n"; //system("cmd /c D:\project_sps0019\scpinfcif33_get.bat"); //system("cmd /c D:\project_sps0019\scpinfcif33_send.bat"); //system("cmd /c D:\project_sps0019\scpinfrubber_get.bat"); //system("cmd /c D:\project_sps0019\scpinfrubber_send.bat"); echo "<hr>"; if ($text != '0') { echo '<html> <head> <meta http-equiv="refresh" content="5;url=reload_file.php" /> </head> <body>HI</body></html>'; } else { echo "read file = 0"; }
<?php function resolveFacebookID($id, $ifError = "") { require 'config/threadID_resolver.php'; $resolverArray = $listUsers + $listGroups; return array_key_exists($id, $resolverArray) ? $resolverArray[$id] : $ifError; } require 'lib/tailCustom.lib.php'; require 'config/self.php'; $output = array(); foreach (glob("../logs/*.log") as $file) { $pieces = explode(" | ", tailCustom($file), 6); $threadID = basename($file, ".log"); $epoch = $pieces[0]; $authorID = $pieces[1]; $authorName = $pieces[2]; $eventCategory = $pieces[3]; $eventType = $pieces[4]; $eventData = $pieces[5]; $threadName = resolveFacebookID($threadID, $threadID); $author = $myFacebookID == $authorID ? "You" : explode(" ", $authorName)[0]; switch ($eventType) { case "MESSAGE": $lastEventString = $author . ": " . str_replace('\\n', ' ', $eventData); break; case "STICKER": $lastEventString = $author . " sent a sticker."; break; case "IMAGE": $lastEventString = $author . " sent an image.";