-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathcppheader.php
More file actions
32 lines (21 loc) · 748 Bytes
/
cppheader.php
File metadata and controls
32 lines (21 loc) · 748 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<?php
include_once "./html/header.html";
include_once "./lib/libatm.php";
session_start();
if ( !$_SESSION["ATM_COLLECTION"] ) return( header( "Location: index.php" ) );
include_once "./navigation.php";
if ( $sm->hash() !== $_SESSION['HASH'] ) {
file_put_contents( "machines/". session_id(). "/new.atml", $sm->as_xml() );
$r = shell_exec( "./scripts/update.sh machines ". session_id() );
$_SESSION['HASH'] = $sm->hash();
}
echo "<pre><code class='cpp'>\n";
echo htmlentities( file_get_contents( "machines/". session_id(). "/work/Machine.h" ) );
?>
/*
Automaton::ATML::begin - Automaton Markup Language
<?php echo htmlentities( $sm->as_xml() ) ?>
Automaton::ATML::end
*/
</code></pre>
<?php include_once "./html/footer.html" ?>