-
Notifications
You must be signed in to change notification settings - Fork 5
/
SharedHTMLHeader.php
executable file
·118 lines (99 loc) · 3.8 KB
/
SharedHTMLHeader.php
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
<html>
<head>
<title><?php if($nid>-1){
echo htmlentities(strip_tags($node->title))." | Insight Maker";
}else{
echo "Insight Maker";
}?></title>
<link rel="stylesheet" type="text/css" href="/builder/js/ext/resources/css/ext-all.css" />
<link rel="stylesheet" type="text/css" href="/builder/css/BoxSelect.css" />
<meta name="keywords" content="system dynamics, systems thinking, simulation, complexity, visual modeling, environment, modeling, modelling, model, simulate" />
<meta name="description" content="<?php if($nid>-1){
echo htmlentities(strip_tags($node->body));
}else{
echo "Develop and run systems thinking and system dynamics models on the internet. Open and powerful simulation tool.";
}?>" />
<link rel="shortcut icon" href="/builder/favicon.ico" type="image/x-icon" />
<script type="text/javascript" src="http://w.sharethis.com/button/buttons.js"></script><script type="text/javascript">try{stLight.options({publisher:'da2cd4bd-9b31-489c-90a9-64291ed98633'});}catch(err){}</script>
<link rel="stylesheet" type="text/css" href="/builder/css/insighteditor.css" />
</head>
<body onbeforeunload="return confirmClose();">
<div id="loading-mask"></div>
<div id="loading">
<div class="loading-indicator">
Loading Insight Maker...<br>
(This may take a few moments)
</div>
</div>
<div id="toplinks-holder" name="toplinks-holder"></div>
<script type="text/javascript" src="/builder/js/ext/ext-all-debug.js"></script>
<script type="text/javascript" src="/builder/js/SharedJS.js"></script>
<script type="text/javascript">
<?php
echo "var logged_in = ".json_encode($logged_in).";\n";
echo "var is_viewer = ".json_encode($is_viewer).";\n";
if ($nid>-1 && $is_viewer){
echo "var drupal_node_ID = ".$nid.";\n";
echo "var graph_source_data = ".json_encode($node->field_modeldata[0]['value']).";\n";
echo "var graph_title = ".json_encode($node->title).";\n";
echo "var graph_description = ".json_encode($node->body).";\n";
echo "var graph_tags = ".json_encode(insightica_get_tags_csv($node->nid)).";\n";
if ($is_editor) {
echo "var saved_enabled = true;\n";
echo "var is_editor = true;\n";
}else{
echo "var saved_enabled = false;\n";
echo "var is_editor = false;\n";
}
}else{
echo "var drupal_node_ID = -1;\n";
echo "var graph_source_data = \"\";\n";
echo "var graph_title = \"\";\n";
echo "var graph_description = \"\";\n";
echo "var graph_tags = \"\";\n";
echo "var saved_enabled = true;\n";
echo "var is_editor = true;\n";
}
if($is_embed){
echo "var is_embed = true;\n";
}else{
echo "var is_embed = false;\n";
}
if($is_topBar){
echo "var is_topBar = true;\n";
}else{
echo "var is_topBar = false;\n";
}
if($is_sideBar){
echo "var is_sideBar = true;\n";
}else{
echo "var is_sideBar = false;\n";
}
if($is_zoom){
echo "var is_zoom = true;\n";
}else{
echo "var is_zoom = false;\n";
}
if($is_deleted){
echo "var is_deleted = true;\n";
}else{
echo "var is_deleted = false;\n";
}
?>
</script>
<?php if(!is_embed){?>
<script type="text/javascript" charset="utf-8">
var is_ssl = ("https:" == document.location.protocol);
var asset_host = is_ssl ? "https://s3.amazonaws.com/getsatisfaction.com/" : "http://s3.amazonaws.com/getsatisfaction.com/";
document.write(unescape("%3Cscript src='" + asset_host + "javascripts/feedback-v2.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript" charset="utf-8">
var feedback_widget_options = {};
feedback_widget_options.display = "overlay";
feedback_widget_options.company = "insightmaker";
feedback_widget_options.placement = "left";
feedback_widget_options.color = "Navy";
feedback_widget_options.style = "idea";
var feedback_widget = new GSFN.feedback_widget(feedback_widget_options);
</script>
<?php }?>