From: Jean-Marc Pigeon Date: Fri, 5 Sep 2025 11:07:17 +0000 (-0400) Subject: Improving screen display X-Git-Tag: end-0.15~27 X-Git-Url: https://jmp-git.ovh.safe.ca/?a=commitdiff_plain;h=f10b94f92f6c9a41e071996a5f9058fdb568ca2c;p=jmp%2Fmailleur Improving screen display --- diff --git a/mailleur.spec.in b/mailleur.spec.in index a688c84..d55e892 100644 --- a/mailleur.spec.in +++ b/mailleur.spec.in @@ -139,7 +139,7 @@ if [ ! "$(getent passwd %{name})" ]; then %post OS=`%{_libdir}/%{name}/shell/getsysos.sh` ln -nsf \ - ./home.php \ + ./login.php \ %{_var}/www/%{name}/index.php \ if [ "$1" = 1 ]; then diff --git a/www/login.php b/www/login.php index 95a519c..3b1f4dd 100644 --- a/www/login.php +++ b/www/login.php @@ -10,14 +10,17 @@ include_once "unienv.php"; include_once "unidis.php"; include_once "gessql.php"; -//section to generate the main screen body +//============================================================== +// +// To display login screen body // +//============================================================== function body() { -//including screen function -// +global $isadmin; +$top=topper($isadmin,NULL,"login"); $footer=footer("login"); $login=login(); @@ -31,7 +34,7 @@ $STR = <<
-Mailleur +$top
$login $footer diff --git a/www/mailleur.php b/www/mailleur.php index 2bf06f9..a477d07 100644 --- a/www/mailleur.php +++ b/www/mailleur.php @@ -16,8 +16,12 @@ function body($logname) { global $isadmin; -$footer=footer(getenv("APPNAME")); -$cook=$_COOKIE[getenv("APPNAME")]; +$scrname=getenv("APPNAME"); +$top=topper($isadmin,$logname,$scrname); +$footer=footer($scrname); +$cook="???"; +if (isset($_COOKIE[getenv("APPNAME")])==true) + $cook=$_COOKIE[getenv("APPNAME")]; $STR = << @@ -28,6 +32,7 @@ $STR = <<
+$top Within mailleur
LOGNAME=$logname diff --git a/www/release.in b/www/release.in index d83c45d..ca4995e 100644 --- a/www/release.in +++ b/www/release.in @@ -8,6 +8,6 @@ $m_branch=BRANCH; $m_release=MAILREL; //constant -$copyright="© 2005-2025 S.A.F.E. Inc." +$copyright="© 2025 GPL_V3 (info@safe.ca)" ?> diff --git a/www/unidis.php b/www/unidis.php index 65cba96..f42e5ef 100644 --- a/www/unidis.php +++ b/www/unidis.php @@ -12,10 +12,36 @@ // To display header screeen part // //============================================================== -function topper($admin,$pageref) +function topper($isadmin,$logname,$pageref) { -return ""; +$data=""; +$color="black"; +switch ($pageref) { + case "login" : + $data="Authentication"; + break; + case "mailleur" : + if ($isadmin==true) + $color="red"; + $data=$logname; + break; + default : + $color="red"; + $data="???"; + break; + } + +$STR = << +
+$data +
+
+
+EOT; + +return $STR; } //==============================================================