From: Jean-Marc Pigeon Date: Sat, 6 Sep 2025 09:26:51 +0000 (-0400) Subject: Trying to standardize php names X-Git-Tag: end-0.15~23 X-Git-Url: https://jmp-git.ovh.safe.ca/?a=commitdiff_plain;h=b3b7ddd98acd99ba63b21f19e9aee6c5a5b9ecfe;p=jmp%2Fmailleur Trying to standardize php names --- diff --git a/mailleur.spec.in b/mailleur.spec.in index 486fed8..299d844 100644 --- a/mailleur.spec.in +++ b/mailleur.spec.in @@ -76,10 +76,10 @@ search about email exchange within time and transaction context. %attr(0750,%{name},mail) %dir %{spooldir}/%{name}/mails %attr(0750,%{name},apache) %dir %{wwwdir}/%{name}/ %{wwwdir}/%{name}/index.php -%attr(0750,%{name},apache) %{wwwdir}/%{name}/%{name}.php +%attr(0750,%{name},apache) %{wwwdir}/%{name}/lvlmai.php %attr(0750,%{name},apache) %{wwwdir}/%{name}/devsql.php %attr(0750,%{name},apache) %{wwwdir}/%{name}/gessql.php -%attr(0750,%{name},apache) %{wwwdir}/%{name}/login.php +%attr(0750,%{name},apache) %{wwwdir}/%{name}/lvllog.php %attr(0750,%{name},apache) %{wwwdir}/%{name}/release.php %attr(0750,%{name},apache) %{wwwdir}/%{name}/unidis.php %attr(0750,%{name},apache) %{wwwdir}/%{name}/unienv.php @@ -138,7 +138,7 @@ if [ ! "$(getent passwd %{name})" ]; then %post OS=`%{_libdir}/%{name}/shell/getsysos.sh` ln -nsf \ - ./login.php \ + ./lvllog.php \ %{_var}/www/%{name}/index.php \ if [ "$1" = 1 ]; then diff --git a/www/index.php b/www/index.php index ce0cbc5..336b484 120000 --- a/www/index.php +++ b/www/index.php @@ -1 +1 @@ -login.php \ No newline at end of file +lvllog.php \ No newline at end of file diff --git a/www/login.php b/www/login.php deleted file mode 100644 index 8a7336e..0000000 --- a/www/login.php +++ /dev/null @@ -1,71 +0,0 @@ - - - -Starting - - - - -
-$top -
-$login -$footer - - -EOT; - -return $STR; -} - -if ($_SERVER["REQUEST_METHOD"] == "POST") { - $pass=$_POST["passwd"]; - $logname=$_POST["email"]; - $dbsql=sql_connect(); - $isok=sql_checkpassword($dbsql,$logname,$pass); - sql_close($dbsql); - switch ($isok) { - case false : //trouble report - echo ""; - break; - default : - header('Location: lvldis.php'); - break; - } - } - -//display main screen -echo body(); -?> - - - diff --git a/www/lvllog.php b/www/lvllog.php new file mode 100644 index 0000000..5c38cfd --- /dev/null +++ b/www/lvllog.php @@ -0,0 +1,160 @@ + +//============================================================== +//function to show password contents +//============================================================== +function showpass() + +{ +var datain; + +datain=document.getElementById("myInput"); +if (datain.type==="password") { + datain.type="text"; + } +else { + datain.type = "password"; + } +} + + + + + + + + + + +
+ + + + + +
+
+ + + + + + + + + + +
Email: + +
Password: + + Show +
+ + + + + +
+ + + + + +
+ +
+
+
+
+
+
+ +EOT; + +return $STR; +} + +//============================================================== +// +// To display login screen body +// +//============================================================== +function body() + +{ +global $isadmin; + +$top=topper($isadmin,NULL,"lvllog"); +$footer=footer("lvllog"); +$login=login(); + +$STR = << + + +Starting + + + + +
+$top +
+$login +$footer + + +EOT; + +return $STR; +} + +if ($_SERVER["REQUEST_METHOD"] == "POST") { + $pass=$_POST["passwd"]; + $logname=$_POST["email"]; + $dbsql=sql_connect(); + $isok=sql_checkpassword($dbsql,$logname,$pass); + sql_close($dbsql); + switch ($isok) { + case false : //trouble report + echo ""; + break; + default : + header('Location: lvlmai.php'); + break; + } + } + +//display main screen +echo body(); +?> + + + diff --git a/www/lvldis.php b/www/lvlmai.php similarity index 91% rename from www/lvldis.php rename to www/lvlmai.php index cfaf63c..accc9de 100644 --- a/www/lvldis.php +++ b/www/lvlmai.php @@ -16,8 +16,8 @@ function body($logname) { global $isadmin; -$top=topper($isadmin,$logname,"lvldis"); -$footer=footer("lvldis"); +$top=topper($isadmin,$logname,"lvlmai"); +$footer=footer("lvlmai"); $cook="???"; if (isset($_COOKIE[getenv("APPNAME")])==true) $cook=$_COOKIE[getenv("APPNAME")]; @@ -60,7 +60,7 @@ if ($logname!=NULL) { echo body($logname); } else { - header('Location: login.php'); + header('Location: lvllog.php'); } ?> diff --git a/www/lvlusr.php b/www/lvlusr.php index 0d49ca1..1de95a8 100644 --- a/www/lvlusr.php +++ b/www/lvlusr.php @@ -53,7 +53,7 @@ if ($logname!=NULL) { echo body($logname); } else { - header('Location: login.php'); + header('Location: lvllog.php'); } ?> diff --git a/www/unidis.php b/www/unidis.php index 91b4006..609e5d5 100644 --- a/www/unidis.php +++ b/www/unidis.php @@ -23,10 +23,10 @@ $click3=""; if ($isadmin==true) $admcolor="red"; switch ($pageref) { - case "login" : + case "lvllog" : $entete="Authentication"; break; - case "lvldis" : + case "lvlmai" : $entete="main"; if ($isadmin==true) { $click2="Remotes"; @@ -35,7 +35,7 @@ switch ($pageref) { break; case "lvlusr" : $entete="user management"; - $click3="Main screen"; + $click3="Main screen"; break; default : $color="red"; @@ -108,93 +108,4 @@ EOT; return $STR; } -//============================================================== -// -// To display the login screen -// -//============================================================== -function login() - -{ -$STR = << -//============================================================== -//function to show password contents -//============================================================== -function showpass() - -{ -var datain; - -datain=document.getElementById("myInput"); -if (datain.type==="password") { - datain.type="text"; - } -else { - datain.type = "password"; - } -} - - - - - - - - - - -
- - - - - -
-
- - - - - - - - - - -
Email: - -
Password: - - Show -
- - - - - -
- - - - - -
- -
-
-
-
-
-
- -EOT; - -return $STR; -} - ?>