| 1 |
<?php |
|---|
| 2 |
|
|---|
| 3 |
require("config.php"); |
|---|
| 4 |
require("tools.php"); |
|---|
| 5 |
require("module.php"); |
|---|
| 6 |
|
|---|
| 7 |
header("Content-Type: application/xhtml+xml; charset=UTF-8"); |
|---|
| 8 |
header("Content-Type: text/html; charset=UTF-8"); |
|---|
| 9 |
header("Cache-Control: no-cache, must-revalidate"); |
|---|
| 10 |
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); |
|---|
| 11 |
|
|---|
| 12 |
if (isset($_GET["minimal"])) { |
|---|
| 13 |
if ($_GET["minimal"]) $minimal = $_GET["minimal"]; |
|---|
| 14 |
else $minimal = true; |
|---|
| 15 |
unset($_GET["minimal"]); |
|---|
| 16 |
} else $minimal = false; |
|---|
| 17 |
|
|---|
| 18 |
|
|---|
| 19 |
if ($minimal) { |
|---|
| 20 |
switch ($minimal) { |
|---|
| 21 |
case "nosource": |
|---|
| 22 |
$allowed_modules = false; |
|---|
| 23 |
$displayed_popups = array("controls"); |
|---|
| 24 |
$CONTROLS = array("export", "aggregator", "searchtab"); |
|---|
| 25 |
$allowed_popups = array("source"); |
|---|
| 26 |
|
|---|
| 27 |
$no_header = false; |
|---|
| 28 |
$no_search = false; |
|---|
| 29 |
break; |
|---|
| 30 |
case "nomenu": |
|---|
| 31 |
$allowed_modules = false; |
|---|
| 32 |
$displayed_popups = array(); |
|---|
| 33 |
$allowed_popups = array("source", "export"); |
|---|
| 34 |
$no_header = false; |
|---|
| 35 |
$no_search = true; |
|---|
| 36 |
$no_menu = true; |
|---|
| 37 |
break; |
|---|
| 38 |
|
|---|
| 39 |
case "search": |
|---|
| 40 |
$config_module = "graph"; |
|---|
| 41 |
$allowed_modules = array("graph"); |
|---|
| 42 |
|
|---|
| 43 |
$displayed_popups = array("controls"); |
|---|
| 44 |
$allowed_popups = array("source", "export"); |
|---|
| 45 |
$CONTROLS = array("searchtab"); |
|---|
| 46 |
|
|---|
| 47 |
$no_header = false; |
|---|
| 48 |
$no_search = false; |
|---|
| 49 |
break; |
|---|
| 50 |
case "wiki": |
|---|
| 51 |
$config_module = "wiki"; |
|---|
| 52 |
$allowed_modules = array("graph", "wiki"); |
|---|
| 53 |
$displayed_popups = array(); |
|---|
| 54 |
$allowed_popups = array("source", "export"); |
|---|
| 55 |
$no_header = false; |
|---|
| 56 |
$no_search = true; |
|---|
| 57 |
break; |
|---|
| 58 |
default: |
|---|
| 59 |
$config_module = "graph"; |
|---|
| 60 |
$allowed_modules = array($config_module); |
|---|
| 61 |
$allowed_popups = array("source", "export"); |
|---|
| 62 |
$displayed_popups = array(); |
|---|
| 63 |
$no_header = true; |
|---|
| 64 |
} |
|---|
| 65 |
|
|---|
| 66 |
if ($no_header) { |
|---|
| 67 |
$no_menu = true; |
|---|
| 68 |
$no_search = true; |
|---|
| 69 |
} |
|---|
| 70 |
} else { |
|---|
| 71 |
$allowed_popups = false; |
|---|
| 72 |
$allowed_modules = false; |
|---|
| 73 |
$no_header = false; |
|---|
| 74 |
$no_menu = false; |
|---|
| 75 |
$no_search = false; |
|---|
| 76 |
|
|---|
| 77 |
if (isset($_GET["module"])) $config_module = $_GET["module"]; |
|---|
| 78 |
else $config_module = $DEFAULT_MODULE; |
|---|
| 79 |
|
|---|
| 80 |
} |
|---|
| 81 |
|
|---|
| 82 |
|
|---|
| 83 |
$config_options = &$_GET; |
|---|
| 84 |
if (sizeof($config_options)) $config_options["apply"] = 1; |
|---|
| 85 |
|
|---|
| 86 |
session_start(); |
|---|
| 87 |
if (isset($_SESSION['setup'])) { |
|---|
| 88 |
if ($_SESSION['setup'] != $ADEI_SETUP) { |
|---|
| 89 |
session_regenerate_id(); |
|---|
| 90 |
$_SESSION['setup'] = $ADEI_SETUP; |
|---|
| 91 |
} |
|---|
| 92 |
} else { |
|---|
| 93 |
$_SESSION['setup'] = $ADEI_SETUP; |
|---|
| 94 |
} |
|---|
| 95 |
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> |
|---|
| 96 |
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:xf="http://www.w3.org/2002/xforms" xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> |
|---|
| 97 |
<head> |
|---|
| 98 |
<title>ADEI (Advanced Data Extraction Infrastructure) </title> |
|---|
| 99 |
<meta name = "viewport" content = "user-scalable=no, initial-scale = 1.0, maximum-scale = 1.0, minimum-scale = 1.0" /> |
|---|
| 100 |
<meta name = "apple-mobile-web-app-capable" content = "yes" /> |
|---|
| 101 |
<link rel="stylesheet" type="text/css" href="adei.css"/> <??> |
|---|
| 102 |
<? if (file_exists($SETUP_CSS)) {?> |
|---|
| 103 |
<link rel="stylesheet" type="text/css" href="<?echo $SETUP_CSS;?>"/> |
|---|
| 104 |
<? }?> |
|---|
| 105 |
<link rel="stylesheet" type="text/css" href="includes/dhtmlx/skins/dhtmlxmenu_<?=$DHTMLX_SKIN;?>.css"/> |
|---|
| 106 |
<link rel="stylesheet" type="text/css" href="includes/dhtmlx/dhtmlxtree.css"/> |
|---|
| 107 |
|
|---|
| 108 |
<script type="text/javascript" src="includes/date.format.js"></script> |
|---|
| 109 |
<script type="text/javascript" src="includes/datetimepicker.js"></script> |
|---|
| 110 |
<script type="text/javascript" src="includes/rsh.js"></script> |
|---|
| 111 |
|
|---|
| 112 |
<script type="text/javascript" src="includes/prototype.js"></script> |
|---|
| 113 |
<script type="text/javascript" src="includes/scriptaculous/scriptaculous.js?load=builder,effects,dragdrop"></script> |
|---|
| 114 |
<script type="text/javascript" src="includes/cropper/cropper.js"></script> |
|---|
| 115 |
|
|---|
| 116 |
<? |
|---|
| 117 |
This causes Ajax.Request (prototype) to return on 'onSuccess' handler |
|---|
| 118 |
status=0 (should be 200) and undefined responseText. |
|---|
| 119 |
This happens ocassionally (not always). Could be stimulated by openning |
|---|
| 120 |
current ADEI page in the new tab. Occurce much rare if reloaded in the |
|---|
| 121 |
same tab and even more rare than just pressing Apply button. However, still |
|---|
| 122 |
happens sometimes. |
|---|
| 123 |
|
|---|
| 124 |
<script type="text/javascript" src="includes/ext/adapter/prototype/ext-prototype-adapter.js"></script> |
|---|
| 125 |
<script type="text/javascript" src="includes/ext/ext-all.js"></script> |
|---|
| 126 |
*/?> |
|---|
| 127 |
|
|---|
| 128 |
<script type="text/javascript" src="includes/dhtmlx/dhtmlxcommon.js"></script> |
|---|
| 129 |
<script type="text/javascript" src="includes/dhtmlx/dhtmlxmenu.js"></script> |
|---|
| 130 |
<script type="text/javascript" src="includes/dhtmlx/dhtmlxtree.js"></script> |
|---|
| 131 |
|
|---|
| 132 |
<? |
|---|
| 133 |
if ($ADEI_RELEASE) { |
|---|
| 134 |
echo "<script type=\"text/javascript\" src=\"adei.js\"></script>\n"; |
|---|
| 135 |
if (file_exists("setups/$ADEI_SETUP/$ADEI_SETUP.js")) { |
|---|
| 136 |
echo "<script type=\"text/javascript\" src=\"setups/$ADEI_SETUP/$ADEI_SETUP.js\"></script>\n"; |
|---|
| 137 |
} |
|---|
| 138 |
} else { |
|---|
| 139 |
$dir = opendir("js"); |
|---|
| 140 |
while ($file = readdir($dir)) { |
|---|
| 141 |
if (preg_match("/\.js$/", $file)) { |
|---|
| 142 |
echo "<script type=\"text/javascript\" src=\"js/$file\"></script>\n"; |
|---|
| 143 |
} |
|---|
| 144 |
} |
|---|
| 145 |
closedir($dir); |
|---|
| 146 |
|
|---|
| 147 |
$dir = opendir("js/xmlmodule"); |
|---|
| 148 |
while ($file = readdir($dir)) { |
|---|
| 149 |
if (preg_match("/\.js$/", $file)) { |
|---|
| 150 |
echo "<script type=\"text/javascript\" src=\"js/xmlmodule/$file\"></script>\n"; |
|---|
| 151 |
} |
|---|
| 152 |
} |
|---|
| 153 |
closedir($dir); |
|---|
| 154 |
|
|---|
| 155 |
$dir = opendir("setups/$ADEI_SETUP/js"); |
|---|
| 156 |
if ($dir) { |
|---|
| 157 |
while ($file = readdir($dir)) { |
|---|
| 158 |
if (preg_match("/\.js$/", $file)) { |
|---|
| 159 |
echo "<script type=\"text/javascript\" src=\"setups/$ADEI_SETUP/js/$file\"></script>\n"; |
|---|
| 160 |
} |
|---|
| 161 |
} |
|---|
| 162 |
closedir($dir); |
|---|
| 163 |
|
|---|
| 164 |
$dir = opendir("setups/$ADEI_SETUP/js/xmlmodule"); |
|---|
| 165 |
if ($dir) { |
|---|
| 166 |
while ($file = readdir($dir)) { |
|---|
| 167 |
if (preg_match("/\.js$/", $file)) { |
|---|
| 168 |
echo "<script type=\"text/javascript\" src=\"setups/$ADEI_SETUP/js/xmlmodule/$file\"></script>\n"; |
|---|
| 169 |
} |
|---|
| 170 |
} |
|---|
| 171 |
closedir($dir); |
|---|
| 172 |
} |
|---|
| 173 |
} |
|---|
| 174 |
} |
|---|
| 175 |
?> |
|---|
| 176 |
<script type="text/javascript" ev:event="onload"> |
|---|
| 177 |
//<![CDATA[ |
|---|
| 178 |
function Geometry() { |
|---|
| 179 |
var new_width = windowGetWidth(); |
|---|
| 180 |
var new_height = windowGetHeight(); |
|---|
| 181 |
<?moduleAdjustGeometry("new_width", "new_height");?> |
|---|
| 182 |
} |
|---|
| 183 |
|
|---|
| 184 |
function Startup() { |
|---|
| 185 |
var adei_options = new Object(); |
|---|
| 186 |
<?foreach ($config_options as $key => $value) { |
|---|
| 187 |
echo "adei_options." . $key . "=\"" . $value . "\";\n"; |
|---|
| 188 |
}?> |
|---|
| 189 |
|
|---|
| 190 |
<?if ($minimal) { |
|---|
| 191 |
if ($no_menu) $menuid = "false"; |
|---|
| 192 |
else $menuid="\"menu_zone\""; |
|---|
| 193 |
|
|---|
| 194 |
if ($displayed_popups) $sidebarid="\"main_sidebar\""; |
|---|
| 195 |
else $sidebarid = "false"; |
|---|
| 196 |
?> |
|---|
| 197 |
adei = new ADEI("main_div", <?=$sidebarid?>, "main_statusbar", <?=$menuid?>, "<?echo session_id();?>"); |
|---|
| 198 |
<?} else {?> |
|---|
| 199 |
adei = new ADEI("main_div", "main_sidebar", "main_statusbar", "menu_zone", "<?echo session_id();?>"); |
|---|
| 200 |
<?}?> |
|---|
| 201 |
adei.SetOptions(adei_options); |
|---|
| 202 |
|
|---|
| 203 |
adei.SetProperty('window_border', <?echo $AJAX_WINDOW_BORDER;?>); |
|---|
| 204 |
adei.SetProperty('parse_delay', <?echo $AJAX_PARSE_DELAY;?>); |
|---|
| 205 |
adei.SetProperty('subsecond_threshold', <?echo $GRAPH_SUBSECOND_THRESHOLD;?>); |
|---|
| 206 |
adei.SetProperty('zoom_ratio', <?echo $GRAPH_ZOOM_RATIO;?>); |
|---|
| 207 |
adei.SetProperty('step_ratio', <?echo $GRAPH_STEP_RATIO;?>); |
|---|
| 208 |
adei.SetProperty('deepzoom_area', <?echo $GRAPH_DEEPZOOM_AREA;?>); |
|---|
| 209 |
adei.SetProperty('edge_ratio', <?echo $GRAPH_EDGE_RATIO;?>); |
|---|
| 210 |
adei.SetProperty('default_status_duration', <?echo $STATUS_DEFAULT_DURATION;?>); |
|---|
| 211 |
adei.SetProperty('menu_scroll_limit', <?= $MENU_SCROLL_LIMIT?>); |
|---|
| 212 |
adei.SetProperty('export_formats',<?= json_encode($EXPORT_FORMATS)?>); |
|---|
| 213 |
|
|---|
| 214 |
<?if ($SETUP_MULTI_MODE) {?> |
|---|
| 215 |
adei.AddToQuery('setup=<?echo $ADEI_SETUP?>'); |
|---|
| 216 |
<?}?> |
|---|
| 217 |
|
|---|
| 218 |
<?modulePlaceJS(($allowed_popups===false)?false:array_merge($allowed_popups, $displayed_popups), $allowed_modules);?> |
|---|
| 219 |
|
|---|
| 220 |
Geometry(); |
|---|
| 221 |
|
|---|
| 222 |
adei.Start('<?echo $config_module;?>', <?echo $AJAX_UPDATE_RATE;?>); |
|---|
| 223 |
} |
|---|
| 224 |
//]]> |
|---|
| 225 |
</script> |
|---|
| 226 |
</head> |
|---|
| 227 |
|
|---|
| 228 |
<body onload="javascript:Startup()" onresize="Geometry()"> |
|---|
| 229 |
<div class="all ales"> |
|---|
| 230 |
<?if (!$no_menu) {?> |
|---|
| 231 |
<div class="menu_button"><div id="menu_zone"></div></div> |
|---|
| 232 |
<?}?> |
|---|
| 233 |
<?if (!$no_header) {?> |
|---|
| 234 |
<div id="header_div" class="header"> |
|---|
| 235 |
<table width="100%" cellspacing="0" cellpadding="0"><tr> |
|---|
| 236 |
<td class="title"> |
|---|
| 237 |
<b><?echo $TITLE;?></b> |
|---|
| 238 |
</td><td class="right"> |
|---|
| 239 |
<? if (!$no_search) {?> |
|---|
| 240 |
<div class="search"><form action="javascript:nope()" onsubmit="javascript:adei.Search(this.search.value);"><input name="search" id="search"/></form></div> |
|---|
| 241 |
<? }?> |
|---|
| 242 |
<div class="links"><table width="100%" height="100%" cellspacing="0" cellpadding="0"><tr><td> |
|---|
| 243 |
<?moduleLinkModules($allowed_modules);?> |
|---|
| 244 |
</td></tr></table></div> |
|---|
| 245 |
</td> |
|---|
| 246 |
</tr></table> |
|---|
| 247 |
</div> |
|---|
| 248 |
<?}?> |
|---|
| 249 |
<div><table align="center" cellspacing="0" cellpadding="0"> |
|---|
| 250 |
<??> |
|---|
| 251 |
<tr><td id="main_sidebar"><div> |
|---|
| 252 |
<?if ($minimal) { |
|---|
| 253 |
foreach ($allowed_popups as $popup) { |
|---|
| 254 |
?><div class="popup" id="popup_<?echo $popup;?>" style="display: none;"><? |
|---|
| 255 |
if (function_exists($popup . "Page")) call_user_func($popup . "Page"); |
|---|
| 256 |
?></div><? |
|---|
| 257 |
} |
|---|
| 258 |
moduleLinkPopups($displayed_popups); |
|---|
| 259 |
} else {?> |
|---|
| 260 |
<?moduleLinkPopups();?> |
|---|
| 261 |
<?}?> |
|---|
| 262 |
</div></td><td width="100%"><div id="main_div"> |
|---|
| 263 |
<?modulePlacePages($allowed_modules);?> |
|---|
| 264 |
</div></td></tr> |
|---|
| 265 |
</table></div> |
|---|
| 266 |
<div id="main_statusbar" class="statusbar"> |
|---|
| 267 |
<div>I'm a status bar</div> |
|---|
| 268 |
</div> |
|---|
| 269 |
</div> |
|---|
| 270 |
</body> |
|---|
| 271 |
</html> |
|---|
| 272 |
|
|---|