forked from thexerteproject/xerteonlinetoolkits
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
339 lines (284 loc) · 13.8 KB
/
index.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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
<?php
/**
* Licensed to The Apereo Foundation under one or more contributor license
* agreements. See the NOTICE file distributed with this work for
* additional information regarding copyright ownership.
* The Apereo Foundation licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at:
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Load the plugin files and fire a startup action
require_once(dirname(__FILE__) . "/plugins.php");
startup();
require_once(dirname(__FILE__) . "/config.php");
_load_language_file("/index.inc");
/**
*
* Login page, self posts to become management page
*
* @author Patrick Lockley
* @version 1.0
* @package
*/
include $xerte_toolkits_site->php_library_path . "display_library.php";
require_once(dirname(__FILE__) . "/website_code/php/login_library.php");
login_processing();
login_processing2();
/*If the authentication method isn't set to Moodle
* the code in the required file below is simply skipped
*/
require_once(dirname(__FILE__) . "/moodle_restrictions.php");
recycle_bin();
/*
* Output the main page, including the user's and blank templates
*/
?>
<!DOCTYPE html>
<html>
<head>
<?php head_start(); ?>
<!--
HTML to use to set up the template management page
Version 1.0
-->
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title><?PHP echo apply_filters("head_title", $xerte_toolkits_site->site_title); ?></title>
<link rel="stylesheet" href="editor/css/jquery-ui.css">
<link rel="stylesheet" href="editor/js/vendor/themes/default/style.css" />
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script>window.jQuery || document.write('<script src="editor/js/vendor/jquery-1.9.1.min.js"><\/script>')</script>
<script type="text/javascript" src="editor/js/vendor/jquery.ui-1.10.4.js"></script>
<script type="text/javascript" src="editor/js/vendor/jquery.layout-1.3.0-rc30.79.min.js"></script>
<script type="text/javascript" src="editor/js/vendor/jquery.ui.touch-punch.min.js"></script>
<script type="text/javascript" src="editor/js/vendor/modernizr-latest.js"></script>
<script type="text/javascript" src="editor/js/vendor/jstree.js"></script>
<link rel="icon" href="favicon.ico" type="image/x-icon"/>
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon"/>
<link href='https://fonts.googleapis.com/css?family=Cabin' rel='stylesheet' type='text/css'>
<link href="website_code/styles/folder_popup.css" media="screen" type="text/css" rel="stylesheet"/>
<link href="website_code/styles/jquery-ui-layout.css" media="screen" type="text/css" rel="stylesheet"/>
<link href="website_code/styles/xerte_buttons.css" media="screen" type="text/css" rel="stylesheet"/>
<link href="website_code/styles/frontpage.css" media="screen" type="text/css" rel="stylesheet"/>
<link rel="stylesheet" type="text/css" href="modules/xerte/parent_templates/Nottingham/common_html5/font-awesome/css/font-awesome.min.css">
<link rel="stylesheet" type="text/css" href="modules/xerte/parent_templates/Nottingham/common_html5/font-awesome-4.3.0/css/font-awesome.min.css">
<link href='https://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css'>
<?PHP
echo "
<script type=\"text/javascript\"> // JAVASCRIPT library for fixed variables\n // management of javascript is set up here\n // SITE SETTINGS
var site_url = \"{$xerte_toolkits_site->site_url}\";
var site_apache = \"{$xerte_toolkits_site->apache}\";
var properties_ajax_php_path = \"website_code/php/properties/\";
var management_ajax_php_path = \"website_code/php/management/\";
var ajax_php_path = \"website_code/php/\";
</script>";
?>
<script type="text/javascript" language="javascript" src="website_code/scripts/validation.js"></script>
<?php
_include_javascript_file("website_code/scripts/file_system.js");
_include_javascript_file("website_code/scripts/screen_display.js");
_include_javascript_file("website_code/scripts/ajax_management.js");
_include_javascript_file("website_code/scripts/folders.js");
_include_javascript_file("website_code/scripts/template_management.js");
_include_javascript_file("website_code/scripts/logout.js");
_include_javascript_file("website_code/scripts/import.js");
?>
<?php head_end(); ?></head>
<!--
code to sort out the javascript which prevents the text selection of the templates (allowing drag and drop to look nicer
body_scroll handles the calculation of the documents actual height in IE.
-->
<body >
<?php body_start(); ?>
<!--
Folder popup is the div that appears when creating a new folder
-->
<div class="folder_popup" id="message_box">
<div class="main_area" id="dynamic_section">
<p style="color:white"><?PHP echo INDEX_FOLDER_PROMPT; ?></p>
<form id="foldernamepopup" action="javascript:create_folder()" method="post" enctype="text/plain">
<input type="text" width="200" id="foldername" name="foldername"
style="margin:0px; margin-right:5px; padding:3px"/>
<button type="submit" class="xerte_button_c">
<img src="website_code/images/Icon_Folder_15x12.gif"/>
<?php echo INDEX_BUTTON_NEWFOLDER_CREATE; ?>
</button>
<button type="button" class="xerte_button_c"
onclick="javascript:popup_close()"><?php echo INDEX_BUTTON_CANCEL; ?>
</button>
</form>
<p><span id="folder_feedback"></span></p>
</div>
</div>
<div class="ui-layout-north">
<div class="content" id="mainHeader">
<div class="topbar">
<?php
if (file_exists($xerte_toolkits_site->root_file_path . "branding/logo_right.png"))
{
?>
<div
style="width:50%; height:100%; float:right; position:relative; background-image:url(branding/logo_right.png); background-repeat:no-repeat; background-position:right; margin-right:10px; float:right">
</div>
<?php
}
else {
?>
<div
style="width:50%; height:100%; float:right; position:relative; background-image:url(website_code/images/apereoLogo.png); background-repeat:no-repeat; background-position:right; margin-right:10px; float:right">
</div>
<?php
}
if (file_exists($xerte_toolkits_site->root_file_path . "branding/logo_left.png"))
{
?>
<img src="branding/logo_left.png" style="margin-left:10px; float:left"/>
<?php
}
else {
?>
<img src="website_code/images/logo.png" style="margin-left:10px; float:left"/>
<?php
}
?>
</div>
<div class="buttonbar">
<div class="file_mgt_area_top">
</div>
<div class="userbar">
<?PHP //echo " " . INDEX_LOGGED_IN_AS . " " .;
echo $_SESSION['toolkits_firstname'] . " " . $_SESSION['toolkits_surname']; ?>
<div style="display: inline-block"><?php display_language_selectionform("general"); ?></div>
<button title="<?PHP echo INDEX_BUTTON_LOGOUT; ?>" type="button" class="xerte_button_c_no_width"
onclick="javascript:logout(<?php echo($xerte_toolkits_site->authentication_method == "Saml2" ? "true" : "false"); ?>)">
<i class="fa fa-sign-out xerte-icon"></i><?PHP echo INDEX_BUTTON_LOGOUT; ?>
</button>
</div>
<div style="clear:both;"></div>
<div class="separator"></div>
</div>
</div>
</div>
<!--
Main part of the page
-->
<div class="ui-layout-center" id="pagecontainer">
<div class="ui-layout-west" id="workspace_layout">
<div class="header" id="inner_left_header">
<div class="file_mgt_area_buttons">
<!--Workspace buttons-->
<div class="file_mgt_area_middle_button_left">
<button title="<?php echo INDEX_BUTTON_EDIT; ?>"type="button" class="xerte_workspace_button disabled" disabled="disabled"
id="edit"><i class="fa fa-pencil-square-o xerte-icon"></i></button>
<button title="<?php echo INDEX_BUTTON_PROPERTIES; ?>"type="button" class="xerte_workspace_button disabled" disabled="disabled"
id="properties"><i class="fa fa-info-circle xerte-icon"></i></button>
<button title="<?php echo INDEX_BUTTON_PREVIEW; ?>" type="button" class="xerte_workspace_button disabled" disabled="disabled"
id="preview"><i class="fa fa-play xerte-icon"></i></button>
</div>
<div class="file_mgt_area_middle_button_left">
<button title="<?php echo INDEX_BUTTON_NEWFOLDER; ?>" type="button" class="xerte_workspace_button" id="newfolder" onClick="javascript:make_new_folder()">
<i class="fa fa-folder xerte-icon"></i>
</button>
</div>
<div class="file_mgt_area_middle_button_right">
<button title="<?php echo INDEX_BUTTON_DELETE; ?>" type="button" class="xerte_workspace_button disabled" disabled="disabled"
id="delete"><i class="fa fa-trash xerte-icon"></i></button>
<button title="<?php echo INDEX_BUTTON_DUPLICATE; ?>"type="button" class="xerte_workspace_button disabled" disabled="disabled"
id="duplicate"><i class="fa fa-copy xerte-icon"></i></button>
<button title="<?php echo INDEX_BUTTON_PUBLISH; ?>" type="button" class="xerte_workspace_button disabled" disabled="disabled"
id="publish"><i class="fa fa-share xerte-icon"></i></button>
</div>
</div>
</div>
<div class="content">
<div id="workspace"></div>
</div>
<div class="footer" id="sortContainer">
<div class="file_mgt_area_bottom">
<div class="sorter">
<form name="sorting" style="float:left;margin:7px 5px 5px 10px;">
<i class="fa fa-sort xerte-icon"></i> <?PHP echo INDEX_SORT; ?>
<select id="sort-selector" name="type" onChange="refresh_workspace()">>
<option value="alpha_up"><?PHP echo INDEX_SORT_A; ?></option>
<option value="alpha_down"><?PHP echo INDEX_SORT_Z; ?></option>
<option value="date_down" selected><?PHP echo INDEX_SORT_NEW; ?></option>
<option value="date_up"><?PHP echo INDEX_SORT_OLD; ?></option>
</select>
</form>
</div>
<div class="workspace_search_outer">
<div class="workspace_search">
<i class="fa fa-search"></i> <?PHP echo INDEX_SEARCH; ?>
<input type="text" id="workspace_search" label="Search">
</div>
</div>
</div>
</div>
</div>
<div class="ui-layout-center">
<div class="header" id="inner_center_header">
<p class="heading"><i class="fa icon-info-sign xerte-icon"></i> <?PHP echo INDEX_DETAILS; ?></p>
</div>
<div class="content">
<div class="projectInformationContainer" id="project_information">
</div>
</div>
<div class="footer" id="inner_center_footer"></div>
</div>
<div class="ui-layout-east">
<div class="header" id="inner_right_header">
<p class="heading"><i class="fa icon-wrench xerte-icon"></i> <?PHP echo INDEX_CREATE; ?></p>
</div>
<div class="content">
<div class="new_template_area_middle">
<div id="new_template_area_middle_ajax" class="new_template_area_middle_scroll"><?PHP
list_blank_templates();
?>
</div>
</div>
</div>
<div class="footer" id="inner_right_footer"></div>
</div>
</div>
<div class="ui-layout-south">
<div class="content">
<!-- <div class="border" style="margin:10px"></div> -->
<div class="help" style="width:31%;float:left;">
<?PHP echo apply_filters('editor_pod_one', $xerte_toolkits_site->pod_one); ?>
</div>
<div class="help" style="width:31%;float:left;">
<?PHP echo apply_filters('editor_pod_two', $xerte_toolkits_site->pod_two); ?>
</div>
<div class="highlightbox" style="width:31%;float:right;">
<?PHP
//echo $xerte_toolkits_site->demonstration_page;
echo $xerte_toolkits_site->news_text;
//echo $xerte_toolkits_site->tutorial_text;
//echo $xerte_toolkits_site->site_text;
?>
</div>
<div class="border"></div>
<p class="copyright">
<!--<img src="website_code/images/lt_logo.gif" /><br/>-->
<?PHP
echo $xerte_toolkits_site->copyright;
?></p><div class="footerlogos"><a href="http://opensource.org/" target="_blank" title="Open Source Initiative: http://opensource.org/"><img src="website_code/images/osiFooterLogo.png" border="0"></a> <a href="https://www.apereo.org" target="_blank" title="Apereo: https://www.apereo.org"><img src="website_code/images/apereoFooterLogo.png" border="0"></a> <a href="http://xerte.org.uk" target="_blank" title="Xerte: http://xerte.org.uk"><img src="website_code/images/xerteFooterLogo.png" border="0"></a></div>
<div style="clear:both;"></div>
</div>
</div>
<script>
$(document).ready(function () {
setupMainLayout();
refresh_workspace();
});
</script>
<?php body_end(); ?></body>
</html>
<?php shutdown(); ?>