diff check_sections_details.php @ 17:2e6bf16b0be3

Commit from test site
author Calvin Yeh <cyeh@mpipw-berlin.mpg.com>
date Tue, 21 Mar 2017 18:05:52 +0100
parents 6ea0f9030f72
children a15320882b30
line wrap: on
line diff
--- a/check_sections_details.php	Wed Jul 15 12:03:22 2015 +0200
+++ b/check_sections_details.php	Tue Mar 21 18:05:52 2017 +0100
@@ -104,11 +104,11 @@
     $output = file_get_contents($lg_url);
     $user_info = json_decode($output, true);
 	$current_editor = (string)$user_info['userName'];
-
+	
 	if ($current_editor == null || $current_editor == "" || strcmp($current_editor, "") === 0 || strcmp($user_info['status'], "ok") !== 0) {
 		// redirect to LGServices homepage
-		//header("Location: http://localgazetteers.mpiwg-berlin.mpg.de/LGServices");
 		header("Location: "+$lgserver_url+"LGServices");
+		//header('Location: http://localgazetteers/LGServices');
 	}
 
 } else {
@@ -190,19 +190,19 @@
 		</div>
 		<div id="panel"></div>
 		<script>
-			var version = <?php echo $version;?>;
-			var session_id = "<?php echo $_GET['sessionId']; ?>";
+			var version=<?php echo $version;?>;
+			var session_id = "<?php echo $_GET['sessionId'];?>";
 		</script>
 
 		<script type="text/javascript">
 		function setCurrentEditor() {
 			// current_editor is gotten from LGService
 		    var current_editor = <?php echo json_encode($current_editor) ?>;
-		    if (current_editor != "") {
+		   if (current_editor != "") {
 				$("#saveBook .editor").val(current_editor);
 		    } else {
 		    	alert("Error!! You have to login from LGService!");
-				$("#loading").show();
+			$("#loading").show();
 		    }
 		}
 
@@ -244,15 +244,14 @@
 		}
 	
 
-		
 		// --- timeout reminder ---
 		var timeoutID;
 		delayedAlert();
 		function delayedAlert() {
-		 	timeoutID = window.setTimeout(slowAlert, 3600*1000);	// 1 hr
+		 	timeoutID = window.setTimeout(slowAlert, 3600*1000);
 		}
 		function slowAlert() {
-		 	if (confirm("Reminder: It's been 1 hour. Remember saving your work to prevent data lost. \n\nKeep working? \n(Press Cancel will turn off this reminder.)")) {
+		 	if (confirm("Reminder: It's been 1 hour. Remember saving your work to prevent data lost.  \n\nKeep working? \n(Press Cancel will turn off this reminder.)")) {
 		 		
 				var lg_url = "<?php echo $lgserver_url?>" + "rest/utils/getUser?sessionId=" + session_id;
 
@@ -274,8 +273,8 @@
 		 			console.log("fail to renew session.");
 		 		});
 		 	}
+	 	
 		}
-