comparison check_sections_details.php @ 12:7e04cbe8b2a0

add required libraries to server
author Zoe Hong <zhong@mpiwg-berlin.mpg.de>
date Wed, 24 Jun 2015 11:11:31 +0200
parents 0a03c75499e6
children 3d206aa0c77d
comparison
equal deleted inserted replaced
11:0a03c75499e6 12:7e04cbe8b2a0
103 //$lg_url = "http://localgazetteers-dev/LGServices/rest/utils/getUser?sessionId=".$session_id; // url to get username from LGService 103 //$lg_url = "http://localgazetteers-dev/LGServices/rest/utils/getUser?sessionId=".$session_id; // url to get username from LGService
104 $output = file_get_contents($lg_url); 104 $output = file_get_contents($lg_url);
105 $user_info = json_decode($output, true); 105 $user_info = json_decode($output, true);
106 $current_editor = (string)$user_info['userName']; 106 $current_editor = (string)$user_info['userName'];
107 107
108 if ($current_editor == null) { 108 if ($current_editor == null || strcmp($user_info['status'], "error") == 0) {
109 // redirect to LGServices homepage 109 // redirect to LGServices homepage
110 header("Location: "+$lgserver_url+"LGServices"); 110 header("Location: "+$lgserver_url+"LGServices");
111 //header('Location: http://localgazetteers/LGServices'); 111 //header('Location: http://localgazetteers/LGServices');
112 } 112 }
113 113
116 // redirect to LGServices homepage 116 // redirect to LGServices homepage
117 header("Location: "+$lgserver_url+"LGServices"); 117 header("Location: "+$lgserver_url+"LGServices");
118 //header('Location: http://localgazetteers/LGServices'); 118 //header('Location: http://localgazetteers/LGServices');
119 } 119 }
120 120
121
121 ?> 122 ?>
122 123
123 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> 124 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
124 <html> 125 <html>
125 <head> 126 <head>
126 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> 127 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
127 <link href="https://code.jquery.com/ui/1.10.4/themes/smoothness/jquery-ui.css" type="text/css" rel="stylesheet"/> 128
129 <link href="css/jquery-ui/jquery-ui.css" type="text/css" rel="stylesheet"/>
130 <script src="js/jquery/1.6.2/jquery.min.js" type="text/javascript"></script>
131 <script src="js/jquery/jquery-ui.js" type="text/javascript"></script>
132
128 <link href="css/check_sections.css" type="text/css" rel="stylesheet"/> 133 <link href="css/check_sections.css" type="text/css" rel="stylesheet"/>
129 <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js" type="text/javascript"></script>
130 <script src="js/check_sections_details.js" type="text/javascript"></script> 134 <script src="js/check_sections_details.js" type="text/javascript"></script>
135
136 <!--
137 <link href="https://code.jquery.com/ui/1.10.4/themes/smoothness/jquery-ui.css" type="text/css" rel="stylesheet"/>
138 <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js" type="text/javascript"></script>
131 <script src="https://code.jquery.com/ui/1.10.4/jquery-ui.js" type="text/javascript"></script> 139 <script src="https://code.jquery.com/ui/1.10.4/jquery-ui.js" type="text/javascript"></script>
140 -->
132 <!--<script src="js/check_sections.js" charset="utf-8"></script>!--> 141 <!--<script src="js/check_sections.js" charset="utf-8"></script>!-->
142
133 </head> 143 </head>
134 <body> 144 <body>
135 <div id="loading">...</div> 145 <div id="loading">...</div>
136 <div id="container"> 146 <div id="container">
137 <?php 147 <?php
231 document.getElementById("editor").innerHTML = ""; 241 document.getElementById("editor").innerHTML = "";
232 document.getElementById("date").innerHTML = ""; 242 document.getElementById("date").innerHTML = "";
233 } 243 }
234 244
235 245
246 /*
247 // --- timeout reminder ---
248 var timeoutID;
249 delayedAlert();
250 function delayedAlert() {
251 timeoutID = window.setTimeout(slowAlert, 4000);
252 }
253 function slowAlert() {
254 if (confirm("Reminder: It's been 30 mins. Don't forget to save your work. \n\nKeep working? \n(Press Cancel will turn off this reminder.)")) {
255 timeoutID = window.setTimeout(slowAlert, 4000);
256 // renew session?
257
258 var lg_url = "<?php echo $lgserver_url?>" + "rest/utils/getUser?sessionId=" + session_id;
259 console.log(lg_url);
260
261 $.post(lg_url, function(data) {
262
263 ///console.log(data);
264
265 });
266 }
267 }
268 */
269
270
271
236 </script> 272 </script>
237 273
238 274
239 </body> 275 </body>
240 276