]> SAFE projects GIT repository - jmp/mailleur/commitdiff
starting to work on lvlusr.php
authorJean-Marc Pigeon <jmp@safe.c>
Sun, 7 Sep 2025 15:35:00 +0000 (11:35 -0400)
committerJean-Marc Pigeon <jmp@safe.c>
Sun, 7 Sep 2025 15:35:00 +0000 (11:35 -0400)
www/gesdis.php
www/lvllog.php
www/lvlmai.php
www/lvlusr.php
www/unilng.php

index f9f547fd85564410bd6b2ea906da996fd59b7c45..1423a1651c814da2104e8b589ff9aacfc9aa25e4 100644 (file)
@@ -36,8 +36,9 @@ switch ($pageref) {
     $click3="<a href='/lvllog.php'>logout</a>";
     break;
   case "lvlusr"        :
-    $entete="user management";
-    $click3="<a href='/lvlmai.php'>Main screen</a>";
+    $entete=gettranslate(lng::fr,"User Management");
+    $click2="<a href='/lvlmai.php'>Main screen</a>";
+    $click3="<a href='/lvllog.php'>logout</a>";
     break;
   default      :
     $color="red";
@@ -99,6 +100,7 @@ $STR  = <<<EOT
 
 <hr width="100%" size="8" color="black" noshade>
 <TABLE WIDTH=100% BORDER=0 CELLPADDING=0 CELLSPACING=0>
+<TR>
 <TD width="30%" align="left"  valign="top" class="smalltxt10">
 Version: $m_release, ($pageref)
 </TD>
@@ -108,6 +110,7 @@ $copyright
 <TD width="30%" align="right"  valign="top" class="smalltxt10">
 $today
 </TD>
+</TR>
 </TABLE>
 <hr width="100%" size="8" color="black" noshade>
 
@@ -139,7 +142,7 @@ $STR  = <<<EOT
 <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
 $JSTR
 </HEAD>
-<BODY="white">
+<BODY>
 EOT;
 
 return $STR;
index e536cd5a354af647bd3ef2484f6a6f2a3ffc8cde..1ad364eb48ff039070eceb15592c2e93da3f7e1a 100644 (file)
@@ -25,11 +25,13 @@ $STR  = <<<EOT
     <tr>
       <td><img src="/reg-icons/login.gif" alt="" border="0" /></td>
     </tr>
-      <td align="center" nowrap="nowrap">
+    <tr>
+      <td align="center">
       <FONT SIZE=+2><STRONG>
       <span class="translatable" trkey="Authentication">Authentication</span>
       </STRONG></FONT>
       </td>
+    </tr>
     <tr>
       <td align="center" bgcolor="#000000">
         <table width="100%" cellpadding="0" cellspacing="1" border="0">
@@ -76,7 +78,6 @@ $STR  = <<<EOT
                   </td>
                 </tr>
               </table>
-            </td>
            </form>
           </tr>
         </table>
@@ -118,7 +119,6 @@ EOT;
 return $STR;
 }
 
-$userlang=lng::fra;
 if ($_SERVER["REQUEST_METHOD"] == "POST") {
   $pass=$_POST["passwd"];
   $logname=$_POST["email"];
index 1ade263adaf0a5f6f88c61fbf3ef0b09e910c4c8..0b7bdd035f0381bb1f4beb3afcdca3a7697387a2 100644 (file)
@@ -16,6 +16,8 @@ function body($logname)
 {
 global $isadmin;
 
+$start=starthtml(NULL);
+$stop=endhtml();
 $top=topper($isadmin,$logname,"lvlmai");
 $footer=footer("lvlmai");
 $cook="???";
@@ -23,14 +25,8 @@ if (isset($_COOKIE[getenv("APPNAME")])==true)
   $cook=$_COOKIE[getenv("APPNAME")];
 
 $STR  = <<<EOT
-<!DOCTYPE html>
-<HTML>    
-<HEAD>
-<TITLE>Mailleur</TITLE>
-<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
-</HEAD>
-<BODY="white">
 
+$start
 $top
 <CENTER><FONT SIZE=+2 color=red>
 Within mailleur
@@ -44,8 +40,7 @@ The cookies=$cook
 </FONT></STRONG></CENTER>
 <BR>
 $footer
-</BODY>
-</HTML>
+$stop
 EOT;
 
 return $STR;
index 1de95a883780fc6e16495e093a24262732bae6d5..b61530becccfdc78c17acd22b4c7a9fc4e7a22f8 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
@@ -16,28 +16,20 @@ function body($logname)
 {
 global $isadmin;
 
+$start=starthtml(NULL);
+$stop=endhtml();
 $top=topper($isadmin,$logname,"lvlusr");
 $footer=footer("lvlusr");
-$cook="???";
-if (isset($_COOKIE[getenv("APPNAME")])==true)
-  $cook=$_COOKIE[getenv("APPNAME")];
 
 $STR  = <<<EOT
-<!DOCTYPE html>
-<HTML>    
-<HEAD>
-<TITLE>Mailleur</TITLE>
-<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
-</HEAD>
-<BODY="white">
+$start
 $top
 <CENTER><FONT SIZE=+2 color=red>
 Within LVLUSR
-</FONT></STRONG></CENTER>
+</FONT></CENTER>
 <BR>
 $footer
-</BODY>
-</HTML>
+$stop
 EOT;
 
 return $STR;
index b2fc022887e0d8ccee788087cc2e6b1cf867c2c8..466247a3de14218d64f181dd86ef81b9c497a292 100644 (file)
@@ -8,18 +8,15 @@
 //list of available word
 
 enum lng {
-  case eng;    //English default language
-  case fra;    //French
-  case unk;    //Unk language (english)
+  case en    //English default language
+  case fr    //French
+  case un;     //Unknown language (english)
   }
 
-$userlang=lng::eng;
+$userlang=lng::en;
 
-
-function gettranslate(lng $lang,$mot)
-
-{
 $english =array        (
+               "User Management",
                "Show",
                "Password",
                "Email",
@@ -27,20 +24,28 @@ $english =array     (
                );
 
 $francais=array        (
+               "Gestion des Utilisateurs",
                "Afficher",
                "Mot de Passe",
                "Courriel",
                "Authentification"
                );
 
+
+function gettranslate(lng $lang,$mot)
+
+{
+global $english;
+global $francais;
+
 $translate=$mot;
 $num=array_search($mot,$english,true);
 if ($num!='') {
   switch ($lang) {
-    case lng::fra:     //French
+    case lng::fr     //French
       $translate=$francais[$num];
       break;
-    case lng::eng:     //English
+    case lng::en     //English
     default    :       //No break;
       break;
     }