]> SAFE projects GIT repository - jmp/mailleur/commitdiff
Loading all JS file
authorJean-Marc Pigeon <jmp@safe.c>
Sun, 14 Dec 2025 00:33:40 +0000 (19:33 -0500)
committerJean-Marc Pigeon <jmp@safe.c>
Sun, 14 Dec 2025 00:33:40 +0000 (19:33 -0500)
www/gesdis.php
www/lvllog.php
www/lvlmai.php
www/lvlrmt.php
www/lvlusr.php
www/translations.js

index 0f3d92f1b8090903c72084e3456e6a634c9a761e..8dc3cd08c25370f953cf578a1146bbd90ec992dd 100644 (file)
@@ -42,15 +42,16 @@ switch ($pageref) {
     $entete="<span class=\"translatable\" trkey=\"Main screen\">Main screen</span>";
     $out="<span class=\"translatable\" trkey=\"Logout\">Logout</span>";
     if ($isadmin==true) {
-      $remotes=gettranslate($userlang,"SMTP server");
-      $users=gettranslate($userlang,"User Management");
+      $remotes="<span class=\"translatable\" trkey=\"SMTP servers\">SMTP servers</span>";
+      $users="<span class=\"translatable\" trkey=\"Users management\">Users management</span>";
       $click1="<a href='/lvlrmt.php'>$remotes</a>";
       $click2="<a href='/lvlusr.php'>$users</a>";
       }
     $click3="<a href='/lvllog.php'>$out</a>";
     break;
   case "lvlusr"        :
-    $entete=gettranslate($userlang,"User Management");
+    $entete="<span class=\"translatable\" trkey=\"Users management\">Users management</span>";
+    //$entete=gettranslate($userlang,"User Management");
     $main=gettranslate($userlang,"Main screen");
     $out=gettranslate($userlang,"Logout");
     $click2="<a href='/lvlmai.php'>$main</a>";
@@ -173,26 +174,19 @@ return $STR;
 //     To generate the HTML starter
 //
 //==============================================================
-function starthtml($js)
+function starthtml()
 
 {
 $curtime=time();        //Loading time stamp
 
-$JSTR=NULL;
-if ($js!=NULL) {
-  $JSTR = <<<EOT
-  <script defer src="$js.js?v={$curtime}"></script>
-  EOT;
-  }
-
 $STR  = <<<EOT
-
 <!DOCTYPE html>
 <HTML>
 <HEAD>
 <TITLE>Mailleur WEB Interface</TITLE>
 <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
-$JSTR
+<script defer src="translations.js?v={$curtime}"></script>
+<script defer src="directives.js?v={$curtime}"></script>
 </HEAD>
 <BODY>
 EOT;
index d0f465ab9397e7a5a4a993268f4baa9aeb90ef60..0750badeae6eed4fc7b8965bd2c2a53747764f2b 100644 (file)
@@ -99,7 +99,7 @@ function body()
 {
 global $isadmin;
 
-$start=starthtml("translations");
+$start=starthtml();
 $stop=endhtml();
 $top=topper($isadmin,NULL,"lvllog");
 $footer=footer("lvllog");
index 45d52a6b0aed1e1fbaa5d68f6c7c790f629cd16a..6eb3053142fdc1dc4d9b059960089a7ef45e1b2e 100644 (file)
@@ -25,7 +25,6 @@ global $userlang;
 global $myfilename;
 
 $debut=$offset+1;
-$search=gettranslate($userlang,"Search");
 $originator=gettranslate($userlang,"Originator");
 $recipient=gettranslate($userlang,"Recipient");
 $date=gettranslate($userlang,"Date");
@@ -64,7 +63,7 @@ $STR  = <<<EOT
 <TD align=left>
 <FORM action="{$myfilename}.php" method="post">
 <FONT SIZE=+1>
-$search:
+<span class="translatable" trkey="Search">Search</span>
 <input type="text" value="$dsearch" name="dsearch" size=20 style="font-size: 100%;">
 <select name="filterfield" style="font-size:100%;">
     <option value="smtpfrom"   EOT . (($selectedField==='smtpfrom')?'selected':'') . EOT>$originator</option>
@@ -221,7 +220,7 @@ foreach($actions as $action) {
 $rqst->release();
 unset($rqst);
 
-$start=starthtml("translations");
+$start=starthtml();
 $stop=endhtml();
 $top=topper($isadmin,$logname,"$myfilename");
 $footer=footer("$myfilename");
index c4474b4125caa19e323e562f49771b15a6008747..6b9cf99d1f1b03f09c19df5806b42b68747386f2 100644 (file)
@@ -148,7 +148,7 @@ foreach($remotes as $remote) {
   }
 $rqst->close();
 
-$start=starthtml("directives");
+$start=starthtml();
 $stop=endhtml();
 $top=topper($isadmin,$logname,"lvlrmt");
 $footer=footer("lvlrmt");
index 5a14b68b86fcc40d4cc6c99b4446708a19f86d40..6d8389466c938880fbfbbaea29403aba9bba2b80 100644 (file)
@@ -146,9 +146,11 @@ foreach($emails as $email) {
   $line=$line."<TD align=center>$lock</TD>\r\n";
   $line=$line."</TR>";
   }
-$rqst->close();
+//connection to database not needed anymore
+$rqst->release();
+unset($rqst);
 
-$start=starthtml("directives");
+$start=starthtml();
 $stop=endhtml();
 $top=topper($isadmin,$logname,"lvlusr");
 $footer=footer("lvlusr");
index 8998f0abc771849dbfe8b66792ee947197bcca07..6f3ac80ecb15cac53310102c78cc2b914d7c6f84 100644 (file)
@@ -11,7 +11,10 @@ const TR =
     ["Originator",      "Expediteur"],
     ["Password",        "Mot de passe"],
     ["Recipient",       "Destinataire"],
+    ["SMTP servers",    "Serveurs SMTP"],
+    ["Search",          "Recherche"],
     ["Show",            "Afficher"],
+    ["Users management","Gestion des usagers"],
     [null,              null]
   ];