/** * This function is called automatically by saveLabbook(). * The output won't be ideal, because paths to linked items will be broken. */ function saveLabbookHTML($bookData) { $file = $_SESSION['dataDir'] . "/" . MP_DIR_SYSTEM . "/labbook.html"; // Write the notebook data if ($fp = @fopen($file, "wb")) { fwrite($fp, mpPageHeader("Lab notebook")); fwrite($fp, "<a name='top'>\n<ul>\n"); foreach ($bookData as $num => $entry) { $title = $entry['title']; if ($title == "") { $title = "(no title)"; } fwrite($fp, "<li><a href='#entry{$num}'</a>{$title} [" . formatDayTime($entry['modtime']) . "]</li>\n"); } fwrite($fp, "</ul>\n<br clear='all' />\n"); foreach ($bookData as $num => $entry) { fwrite($fp, "<hr>\n"); fwrite($fp, "<a name='entry{$num}'>\n"); fwrite($fp, formatLabbookEntry($entry)); fwrite($fp, "</a>\n"); fwrite($fp, "<p><a href='#top'>Top</a>\n"); } fwrite($fp, mpPageFooter()); @fclose($fp); return true; } else { return false; } }
// 4. For pages that want to see the session but not change it, such as // pages that are refreshing periodically to monitor a background job. #mpSessReadOnly(); # MAIN - the beginning of execution for this page ############################################################################ if ($_POST['confirm']) { // Must log first or we lose our session ID for the log! mpLog("logout-session:User cleaned up all session files and left the site"); mpDestroySession(); } // Start the page: produces <HTML>, <HEAD>, <BODY> tags echo mpPageHeader("Thanks!"); ############################################################################ ?> <center> Thanks for using MolProbity! All your data files have been erased. <br> <br> <br> <br> <a href="index.php"><img src="img/mplogo_clear.png"><br>Start another MolProbity session</a> <br> <br> <br> <br> <a href="http://kinemage.biochem.duke.edu/"><img src="img/kinhome.gif"><br>Return to the Richardson lab (Kinemage) home page</a> </center> <?php echo mpPageFooter();
function pageFooter() { return mpPageFooter(); }