From 43a5948850962ddba67b3c478514ec4cb85173b4 Mon Sep 17 00:00:00 2001 From: "Jean-Marc Pigeon (Delson)" Date: Wed, 27 Aug 2025 13:59:03 -0400 Subject: [PATCH] Starting to investiguate devsql.php --- mailleur.spec.in | 4 ++++ www/devsql.php | 26 ++++++++++++++++++++++++++ www/mailleur.php | 7 +++++-- www/unienv.php | 4 ++-- www/unimar.php | 9 +++++++++ www/unipos.php | 9 +++++++++ 6 files changed, 55 insertions(+), 4 deletions(-) create mode 100644 www/devsql.php create mode 100644 www/unimar.php create mode 100644 www/unipos.php diff --git a/mailleur.spec.in b/mailleur.spec.in index 142e959..4ac9bb3 100644 --- a/mailleur.spec.in +++ b/mailleur.spec.in @@ -77,6 +77,8 @@ search about email exchange within time and transaction context. %attr(0640,root,root) %{_datadir}/%{name}/sql/Makefile %attr(0644,root,root) %{_datadir}/%{name}/sql/datatest.def %attr(0644,root,root) %{_datadir}/%{name}/sql/*.sql +%exclude %{wwwdir}/%{name}/unipos.php +%exclude %{wwwdir}/%{name}/unimar.php %exclude %{_datadir}/%{name}/sql/%{name}.mysql %exclude %{_datadir}/%{name}/sql/%{name}.postg #----------------------------------------------------------------------------- @@ -179,6 +181,7 @@ Obsoletes : %{name}-mysql <= %{version}-%{release} %files postgresql %defattr(-,root,root,-) %attr(0755,%{name},mail) %{_libexecdir}/%{name}/bin-posql/* +%attr(0750,%{name},apache) %{wwwdir}/%{name}/unipos.php #----------------------------------------------------------------------------- %post postgresql @@ -250,6 +253,7 @@ Obsoletes : %{name}-postgresql <= %{version}-%{release} %files mysql %defattr(-,root,root,-) %attr(0755,%{name},mail) %{_libexecdir}/%{name}/bin-mysql/* +%attr(0750,%{name},apache) %{wwwdir}/%{name}/unimar.php #----------------------------------------------------------------------------- diff --git a/www/devsql.php b/www/devsql.php new file mode 100644 index 0000000..9058775 --- /dev/null +++ b/www/devsql.php @@ -0,0 +1,26 @@ + diff --git a/www/mailleur.php b/www/mailleur.php index ff76b1e..becfb20 100644 --- a/www/mailleur.php +++ b/www/mailleur.php @@ -4,13 +4,15 @@ function body($action,$logname,$pass) { -include "unienv.php"; -include "scrfun.php"; +include_once "unienv.php"; +include_once "scrfun.php"; +include_once "devsql.php"; loadenv(); $footer=footer("mailleur"); $dbtype=getenv("DB_TYPE"); $dbport=getenv("DB_PORT"); + $STR = << @@ -29,6 +31,7 @@ Login=$logname Password=$pass
DBTYPE=$dbtype; DBPORT=$dbport +sql_connect(); $footer diff --git a/www/unienv.php b/www/unienv.php index 4d22745..35ce6b8 100644 --- a/www/unienv.php +++ b/www/unienv.php @@ -16,14 +16,14 @@ while ($proceed==true) { switch ($phase) { case 0 : //checking if file exist if(!is_file($env_file_path)){ - throw new ErrorException("Environment File is Missing."); + throw new ErrorException("File <".$env_file_path."> is Missing!"); $phase=999; //no need to go further } break; case 1 : //opening file $fopen=fopen($env_file_path,'r'); if (!$fopen) { - throw new ErrorException("Unable to read file <".($env_file_path).">"); + throw new ErrorException("Unable to read file <".($env_file_path).">!"); $phase=999; } break; diff --git a/www/unimar.php b/www/unimar.php new file mode 100644 index 0000000..144a44e --- /dev/null +++ b/www/unimar.php @@ -0,0 +1,9 @@ + diff --git a/www/unipos.php b/www/unipos.php new file mode 100644 index 0000000..23f6294 --- /dev/null +++ b/www/unipos.php @@ -0,0 +1,9 @@ + -- 2.47.3