From: Jean-Marc Pigeon Date: Sun, 7 Sep 2025 15:35:00 +0000 (-0400) Subject: starting to work on lvlusr.php X-Git-Tag: end-0.15~14 X-Git-Url: https://jmp-git.ovh.safe.ca/?a=commitdiff_plain;h=cdafacd11055e48cb0ea3633f5a635091c0ccdbc;p=jmp%2Fmailleur starting to work on lvlusr.php --- diff --git a/www/gesdis.php b/www/gesdis.php index f9f547f..1423a16 100644 --- a/www/gesdis.php +++ b/www/gesdis.php @@ -36,8 +36,9 @@ switch ($pageref) { $click3="logout"; break; case "lvlusr" : - $entete="user management"; - $click3="Main screen"; + $entete=gettranslate(lng::fr,"User Management"); + $click2="Main screen"; + $click3="logout"; break; default : $color="red"; @@ -99,6 +100,7 @@ $STR = << + @@ -108,6 +110,7 @@ $copyright +
Version: $m_release, ($pageref) $today

@@ -139,7 +142,7 @@ $STR = << $JSTR - + EOT; return $STR; diff --git a/www/lvllog.php b/www/lvllog.php index e536cd5..1ad364e 100644 --- a/www/lvllog.php +++ b/www/lvllog.php @@ -25,11 +25,13 @@ $STR = << - + + Authentication + @@ -76,7 +78,6 @@ $STR = <<
- @@ -118,7 +119,6 @@ EOT; return $STR; } -$userlang=lng::fra; if ($_SERVER["REQUEST_METHOD"] == "POST") { $pass=$_POST["passwd"]; $logname=$_POST["email"]; diff --git a/www/lvlmai.php b/www/lvlmai.php index 1ade263..0b7bdd0 100644 --- a/www/lvlmai.php +++ b/www/lvlmai.php @@ -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 = << - - -Mailleur - - - +$start $top
Within mailleur @@ -44,8 +40,7 @@ The cookies=$cook

$footer - - +$stop EOT; return $STR; diff --git a/www/lvlusr.php b/www/lvlusr.php index 1de95a8..b61530b 100644 --- a/www/lvlusr.php +++ b/www/lvlusr.php @@ -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 = << - - -Mailleur - - - +$start $top
Within LVLUSR -
+
$footer - - +$stop EOT; return $STR; diff --git a/www/unilng.php b/www/unilng.php index b2fc022..466247a 100644 --- a/www/unilng.php +++ b/www/unilng.php @@ -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; }