]> SAFE projects GIT repository - jmp/mailleur/commitdiff
added logout within main screen
authorJean-Marc Pigeon <jmp@safe.c>
Sun, 7 Sep 2025 10:52:54 +0000 (06:52 -0400)
committerJean-Marc Pigeon <jmp@safe.c>
Sun, 7 Sep 2025 10:52:54 +0000 (06:52 -0400)
www/gesdis.php
www/lvllog.php
www/lvlmai.php
www/translations.js

index 8f2851d942c1b0ddf2d02bd67e72bf6dbbea4f2f..2b6bd3bae131b6ea0bf9126f7ff74ec4e0266aba 100644 (file)
@@ -18,10 +18,10 @@ function topper($isadmin,$logname,$pageref)
 global $userlang;
 
 $entete="";
-$admcolor="black";
 $click1="";
 $click2="";
 $click3="";
+$admcolor="black";
 if ($isadmin==true) 
   $admcolor="red";
 switch ($pageref) {
@@ -30,10 +30,10 @@ switch ($pageref) {
     //$entete=gettranslate(lng::fra,"nuts");
     break;
   case "lvlmai"        :
-    $entete="main";
     if ($isadmin==true) {
-      $click2="<a href='/lvlusr.php'>Remotes</a>";
-      $click3="<a href='/lvlusr.php'>Users</a>";
+      $click1="<a href='/lvlusr.php'>Remotes</a>";
+      $click2="<a href='/lvlusr.php'>Users</a>";
+      $click3="<a href='/lvllog.php'>logout</a>";
       }
     break;
   case "lvlusr"        :
@@ -52,20 +52,26 @@ $entete
 </FONT>
 <table cellpadding="0" cellspacing="0" width="100%" border="0">
 <tr>
-  <td width="25%">
+  <td width="70%">
   <FONT COLOR=$admcolor>$logname</FONT>
   </td>
-  <td width="75%">
+  <td width="30%">
   <table cellpadding="0" cellspacing="0" width="100%" border="0">
     <tr>
     <td width="33%">
-    <FONT CENTER>$click1</FONT>
+    <p align="right"><strong>
+    $click1
+    </strong></p>
     </td>
     <td width="33%">
-    <FONT CENTER>$click2</FONT>
+    <p align="right"><strong>
+    $click2
+    </strong></p>
     </td>
     <td width="33%">
-    <FONT CENTER>$click3</FONT>
+    <p align="right"><strong>
+    $click3
+    </strong></p>
     </td>
     </tr>
   </table>
index daa4041659a8ce875738d68cf1b4a84074764ac3..3e9b64d298002d971015fe4583699df6d46e7d69 100644 (file)
@@ -19,12 +19,6 @@ include_once "gessql.php";
 function login()
 
 {
-global  $userlang;
-
-$lngemail=gettranslate($userlang,"Email");
-$lngpass=gettranslate($userlang,"Password");
-$lngshow=gettranslate($userlang,"Show");
-
 $STR  = <<<EOT
 
 <table border="0" align="center" width="500" cellpadding="0" cellspacing="0">
index accc9de1837da5f5edbc8c7d9052f71053f606c6..249bb553133e503fe01072b65653598307cb7ce1 100644 (file)
@@ -7,7 +7,7 @@
 //==============================================================
 include_once "subrou.php";
 include_once "unienv.php";
-include_once "unidis.php";
+include_once "gesdis.php";
 include_once "gessql.php";
 
 //section to generate the main screen body
index fffb2dbbcf0a9d72cae3237d453c15ad72eb136c..ae1f66303261eb919b5636390606c40f90acc542 100644 (file)
@@ -1,3 +1,5 @@
+// vim: smarttab tabstop=8 shiftwidth=2 expandtab
+
 var translationMap = new Map();
 
 var translationEn = new Map();
@@ -10,7 +12,7 @@ var translationFr = new Map();
 translationFr.set("Email", "Courriel");
 translationFr.set("Password","Mot de passe");
 translationFr.set("Show","Afficher");
-translationFr.set("Login","Action");
+translationFr.set("Login","Connexion");
 
 translationMap.set("fr", translationFr);
 translationMap.set("en", translationEn);
@@ -21,9 +23,7 @@ translationMap.set("en", translationEn);
 function showpass()
 
 {
-var datain;
-  
-datain=document.getElementById("myInput");
+let datain=document.getElementById("myInput");
 if (datain.type==="password") {
   datain.type="text";
   }
@@ -32,22 +32,25 @@ else {
   }
 }
 
+//==============================================================
+//function to translate login screen
+//==============================================================
 function updateTranslations()
-{
- let translationLng = document.getElementById("first-choice").value;
-
- let translatables = document.getElementsByClassName("translatable");
- for(var i of translatables){
-       let key = i.getAttribute("trkey");
-        if (i.tagName === 'INPUT')
-        {
-        i.value = translationMap.get(translationLng).get(key);
-        }
-        else {
-        i.innerHTML = translationMap.get(translationLng).get(key);
-        }
- }
 
+{
+let translationLng = document.getElementById("first-choice").value;
+let translatables = document.getElementsByClassName("translatable");
+for (var i of translatables) {
+  let key = i.getAttribute("trkey");
+  if (i.tagName === 'INPUT') {
+    i.value = translationMap.get(translationLng).get(key);
+    }
+  else {
+    i.innerHTML = translationMap.get(translationLng).get(key);
+    }
+  }
 }
 
+//execute function at first display
 updateTranslations();
+//==============================================================