Skip to main content
summaryrefslogtreecommitdiffstats
blob: 34b47f2a965d8b787d42ad76174f1e85a0bd56c4 (plain) (blame)
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
<?php 
require_once($_SERVER['DOCUMENT_ROOT'] . "/eclipse.org-common/system/app.class.php");
require_once($_SERVER['DOCUMENT_ROOT'] . "/eclipse.org-common/system/nav.class.php"); 
require_once($_SERVER['DOCUMENT_ROOT'] . "/eclipse.org-common/system/menu.class.php"); 

$App = new App();
$Nav = new Nav();
$Menu = new Menu();

include($App->getProjectCommon());

$pageTitle 	= "Henshin - Examples";
$pageKeywords	= "EMF, Henshin, model transformation, examples";
$pageAuthor	= "Christian Krause";

# Figure out which example should be displayed:
$example = '';
if (isset($_GET['example'])) {
    $example = preg_replace('/\W/', '', $_GET['example']);
}
if (!empty($example) && file_exists("examples/$example/index.html")) {
    $target = "examples/$example/index.html";
} else {
    $target = "examples/index.html";
}

# Display the target file:
ob_start();
include "$target";
$contents = ob_get_contents();
ob_end_clean();

# Paste your HTML content between the EOHTML markers!	
$html = <<<EOHTML

<style type="text/css">
table { 
    border-collapse:collapse;
}
td {
    border: 1px solid black;
    vertical-align:top;
    text-align:right;
    overflow:hidden;
}
th {
    border: 1px solid black;
    font-weight: bold;
    text-align: center;
}
tr {
    border: 1px solid black;
}
</style>

<div id="maincontent">
<div id="midcolumn" style="width:735px;">
$contents
</div>
</div>

<link type="text/css" rel="stylesheet" href="shjs/css/sh_ide-eclipse.css">
<script type="text/javascript" src="shjs/sh_main.js"></script>
<script type="text/javascript" src="shjs/lang/sh_java.js"></script>
<script type="text/javascript">
sh_highlightDocument();
</script>

EOHTML;

# Generate the web page
$App->generatePage($theme, $Menu, $Nav, $pageAuthor, $pageKeywords, $pageTitle, $html);

?>

Back to the top