Capitan Cloud 2 жил өмнө
parent
commit
25a2f8e689

+ 179 - 0
CONFVW_css/style.css

@@ -0,0 +1,179 @@
+/*
+ * Copyright (c) 2016, 2024, 5 Mode
+ * All rights reserved.
+ * 
+ * This file is part of www-conf-viewer.
+ * 
+ * www-conf-viewer is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ * 
+ * www-conf-viewer is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.  
+ * 
+ * You should have received a copy of the GNU General Public License
+ * along with www-conf-viewer. If not, see <https://www.gnu.org/licenses/>.
+ * config.inc
+ * 
+ * www-conf-viewer style sheet.
+ *
+ * @author Daniele Bonini <my25mb@aol.com>
+ * @copyrights (c) 2021, 2024, 5 Mode 
+ */
+
+body {
+}
+.aaa {
+  font-weight:900;
+  color:#000000;
+}
+#directive {
+  text-decoration: underline dotted greenyellow;
+}
+#directive-desc {
+  font-size: 8px;
+  text-decoration: underline dotted greenyellow;
+  padding-left:0px;
+}
+#directive-desc2 {
+  font-size: 8px;
+  text-decoration: underline dotted greenyellow;
+  padding-left:0px;
+}
+#footerCont {
+  position: fixed; 
+  top: 2000px; 
+  left:-10px;
+  width: 102%; 
+  border: 1px solid #C2DBF2; 
+  padding: 7px; 
+  background: white; 
+  opacity: 0.3;
+  color:white; 
+  font-family: Arial,Sans,Vardana;
+  font-size: 12px; 
+  text-align: center; 
+  z-index: 99998;
+}
+#footer {
+  position: fixed;
+  float: right;
+  top: 2000px; 
+  left:-10px;
+  width: 100%; 
+  border: 0px solid #C2DBF2; 
+  padding: 7px; 
+  opacity: 1.0;
+  color:black; 
+  font-family: Arial,Sans,Vardana;
+  font-size: 12px; 
+  font-weight: 400;
+  text-align: right; 
+  z-index: 99999;
+}
+table {
+  width:100%;
+  max-width:950px;
+  background:#e9eef8; 
+  box-shadow:0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
+  clear:both;
+  margin:auto;
+}
+#hashMe {
+  position:relative; 
+  left:-2px; 
+  top:+5px; 
+  font-size:18px; 
+  font-weight:900; 
+  color:#000000;
+}
+#Password {
+  font-size:18px;  
+  background:transparent; 
+  width: 60%; 
+  border-radius:3px; 
+  font-weight:900;
+}
+#passworddisplay {
+  float:left;
+  position:fixed;
+  top:680px;
+  left:50px;
+  width:255px;
+  height:120px;
+  background:darkgray;
+  text-align:left;
+  white-space:nowrap; 
+  font-family:Arial,Sans,Verdana; 
+  color:#000000; 
+  font-weight:900;
+  z-index:99999;
+}
+#Salt {
+  position:relative; 
+  top:+5px; 
+  font-size:18px; 
+  background:transparent;
+  width: 90%; 
+  border-radius:3px; 
+  font-weight:900;
+}
+.td-caption {
+  width: 350px;
+  background-color:#01963a;
+  color: #FFFFFF;
+  padding:8px;
+  padding-top:4px;
+  padding-bottom:4px;
+}
+.td-caption:hover {
+  background-color:#39b455;
+}
+.td-caption2 {
+  width: 350px;
+  background-color: #67b168;
+  color: #FFFFFF;
+  padding:8px;
+  padding-left:32px;
+  padding-top:4px;
+  padding-bottom:4px;
+}
+.td-caption2:hover {
+  background-color: #87d287;
+}  
+.td-tab {
+  width: 25px;
+  background-color: #67b168;
+  padding:8px;
+  padding-top:4px;
+  padding-bottom:4px;
+}
+.td-full-opts {
+  width: 600px;
+  background-color: #ebebeb;
+  padding:8px;
+  padding-top:4px;
+  padding-bottom:4px;
+  border-top: 1px dotted gray; 
+}
+.td-server-spec {
+  width: 100%;
+  background-color: #01963a;
+  color:#FFFFFF;
+  padding:8px;
+  padding-top:4px;
+  padding-bottom:4px;
+  border-top: 1px dotted gray;   
+}
+.td-server-spec-php {
+  width: 100%;
+  background-color: #7a86b8;
+  color:#FFFFFF;
+  padding:8px;
+  padding-top:4px;
+  padding-bottom:4px;
+  border-top: 1px dotted gray;   
+}

+ 125 - 0
CONFVW_examples/nginx.conf

@@ -0,0 +1,125 @@
+# Take note of http://wiki.nginx.org/Pitfalls
+
+user  www;
+worker_processes  1;
+
+#load_module "modules/ngx_stream_module.so";
+
+#error_log  logs/error.log;
+#error_log  logs/error.log  notice;
+#error_log  logs/error.log  info;
+#error_log  syslog:server=unix:/dev/log,severity=notice;
+
+pid        logs/nginx.pid;
+
+worker_rlimit_nofile 1024;
+events {
+    worker_connections  800;
+}
+
+
+http {
+    include       mime.types;
+    default_type  application/octet-stream;
+    index         index.html index.htm;
+
+    #log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
+    #                  '$status $body_bytes_sent "$http_referer" '
+    #                  '"$http_user_agent" "$http_x_forwarded_for"';
+
+    #access_log  logs/access.log  main;
+    #access_log  syslog:server=unix:/dev/log,severity=notice main;
+
+    #tcp_nopush     on;
+
+    #keepalive_timeout  0;
+    keepalive_timeout  65;
+
+    #gzip  on;
+
+    server_tokens off;
+
+    server {
+        listen       80;
+        listen       [::]:80;
+        server_name  localhost;
+        root         /var/www/htdocs;
+
+        #charset koi8-r;
+
+        #access_log  logs/host.access.log  main;
+
+        #error_page  404              /404.html;
+
+        # redirect server error pages to the static page /50x.html
+        #
+        error_page   500 502 503 504  /50x.html;
+        location = /50x.html {
+            root  /var/www/htdocs;
+        }
+
+        # FastCGI to CGI wrapper server
+        #
+        #location /cgi-bin/ {
+        #    fastcgi_pass   unix:run/slowcgi.sock;
+        #    fastcgi_split_path_info ^(/cgi-bin/[^/]+)(.*);
+        #    fastcgi_param  PATH_INFO $fastcgi_path_info;
+        #    include        fastcgi_params;
+        #}
+
+        # proxy the PHP scripts to Apache listening on 127.0.0.1:80
+        #
+        #location ~ \.php$ {
+        #    proxy_pass   http://127.0.0.1;
+        #}
+
+        # pass the PHP scripts to FastCGI server listening on unix socket
+        #
+        #location ~ \.php$ {
+        #    try_files      $uri $uri/ =404;
+        #    fastcgi_pass   unix:run/php-fpm.sock;
+        #    fastcgi_index  index.php;
+        #    fastcgi_param  SCRIPT_FILENAME $document_root$fastcgi_script_name;
+        #    include        fastcgi_params;
+        #}
+
+        # deny access to .htaccess files, if Apache's document root
+        # concurs with nginx's one
+        #
+        #location ~ /\.ht {
+        #    deny  all;
+        #}
+    }
+
+
+    # another virtual host using mix of IP-, name-, and port-based configuration
+    #
+    #server {
+    #    listen       8000;
+    #    listen       somename:8080;
+    #    server_name  somename  alias  another.alias;
+    #    root         /var/www/htdocs;
+    #}
+
+
+    # HTTPS server
+    #
+    #server {
+    #    listen       443;
+    #    server_name  localhost;
+    #    root         /var/www/htdocs;
+
+    #    ssl                  on;
+    #    ssl_certificate      /etc/ssl/server.crt;
+    #    ssl_certificate_key  /etc/ssl/private/server.key;
+
+    #    ssl_session_timeout  5m;
+    #    ssl_session_cache    shared:SSL:1m;
+
+    #    ssl_ciphers  HIGH:!aNULL:!MD5:!RC4;
+    #    ssl_prefer_server_ciphers   on;
+    #}
+
+    include /etc/nginx/conf.d/*.conf;
+
+}

+ 599 - 0
CONFVW_examples/php-fpm.conf

@@ -0,0 +1,599 @@
+;;;;;;;;;;;;;;;;;;;;;
+; FPM Configuration ;
+;;;;;;;;;;;;;;;;;;;;;
+
+; All relative paths in this configuration file are relative to PHP's install
+; prefix (/usr/local). This prefix can be dynamically changed by using the
+; '-p' argument from the command line.
+
+;;;;;;;;;;;;;;;;;;
+; Global Options ;
+;;;;;;;;;;;;;;;;;;
+
+[global]
+; Pid file
+; Note: the default prefix is /var
+; Default Value: none
+;pid = run/php-fpm.pid
+
+; Error log file
+; If it's set to "syslog", log is sent to syslogd instead of being written
+; into a local file.
+; Note: the default prefix is /var
+; Default Value: log/php-fpm.log
+;error_log = log/php-fpm.log
+
+; syslog_facility is used to specify what type of program is logging the
+; message. This lets syslogd specify that messages from different facilities
+; will be handled differently.
+; See syslog(3) for possible values (ex daemon equiv LOG_DAEMON)
+; Default Value: daemon
+;syslog.facility = daemon
+
+; syslog_ident is prepended to every message. If you have multiple FPM
+; instances running on the same server, you can change the default value
+; which must suit common needs.
+; Default Value: php-fpm
+;syslog.ident = php-fpm
+
+; Log level
+; Possible Values: alert, error, warning, notice, debug
+; Default Value: notice
+;log_level = notice
+
+; Log limit on number of characters in the single line (log entry). If the
+; line is over the limit, it is wrapped on multiple lines. The limit is for
+; all logged characters including message prefix and suffix if present. However
+; the new line character does not count into it as it is present only when
+; logging to a file descriptor. It means the new line character is not present
+; when logging to syslog.
+; Default Value: 1024
+;log_limit = 4096
+
+; Log buffering specifies if the log line is buffered which means that the
+; line is written in a single write operation. If the value is false, then the
+; data is written directly into the file descriptor. It is an experimental
+; option that can potentionaly improve logging performance and memory usage
+; for some heavy logging scenarios. This option is ignored if logging to syslog
+; as it has to be always buffered.
+; Default value: yes
+;log_buffering = no
+
+; If this number of child processes exit with SIGSEGV or SIGBUS within the time
+; interval set by emergency_restart_interval then FPM will restart. A value
+; of '0' means 'Off'.
+; Default Value: 0
+;emergency_restart_threshold = 0
+
+; Interval of time used by emergency_restart_interval to determine when
+; a graceful restart will be initiated.  This can be useful to work around
+; accidental corruptions in an accelerator's shared memory.
+; Available Units: s(econds), m(inutes), h(ours), or d(ays)
+; Default Unit: seconds
+; Default Value: 0
+;emergency_restart_interval = 0
+
+; Time limit for child processes to wait for a reaction on signals from master.
+; Available units: s(econds), m(inutes), h(ours), or d(ays)
+; Default Unit: seconds
+; Default Value: 0
+;process_control_timeout = 0
+
+; The maximum number of processes FPM will fork. This has been designed to control
+; the global number of processes when using dynamic PM within a lot of pools.
+; Use it with caution.
+; Note: A value of 0 indicates no limit
+; Default Value: 0
+; process.max = 128
+
+; Specify the nice(2) priority to apply to the master process (only if set)
+; The value can vary from -19 (highest priority) to 20 (lowest priority)
+; Note: - It will only work if the FPM master process is launched as root
+;       - The pool process will inherit the master process priority
+;         unless specified otherwise
+; Default Value: no set
+; process.priority = -19
+
+; Send FPM to background. Set to 'no' to keep FPM in foreground for debugging.
+; Default Value: yes
+;daemonize = yes
+
+; Set open file descriptor rlimit for the master process.
+; Default Value: system defined value
+;rlimit_files = 1024
+
+; Set max core size rlimit for the master process.
+; Possible Values: 'unlimited' or an integer greater or equal to 0
+; Default Value: system defined value
+;rlimit_core = 0
+
+; Specify the event mechanism FPM will use. The following is available:
+; - select     (any POSIX os)
+; - poll       (any POSIX os)
+; - epoll      (linux >= 2.5.44)
+; - kqueue     (FreeBSD >= 4.1, OpenBSD >= 2.9, NetBSD >= 2.0)
+; - /dev/poll  (Solaris >= 7)
+; - port       (Solaris >= 10)
+; Default Value: not set (auto detection)
+;events.mechanism = epoll
+
+; When FPM is built with systemd integration, specify the interval,
+; in seconds, between health report notification to systemd.
+; Set to 0 to disable.
+; Available Units: s(econds), m(inutes), h(ours)
+; Default Unit: seconds
+; Default value: 10
+;systemd_interval = 10
+
+;;;;;;;;;;;;;;;;;;;;
+; Pool Definitions ;
+;;;;;;;;;;;;;;;;;;;;
+
+; Multiple pools of child processes may be started with different listening
+; ports and different management options.  The name of the pool will be
+; used in logs and stats. There is no limitation on the number of pools which
+; FPM can handle. Your system will tell you anyway :)
+
+; Include one or more files. If glob(3) exists, it is used to include a bunch of
+; files from a glob(3) pattern. This directive can be used everywhere in the
+; file.
+; Relative path can also be used. They will be prefixed by:
+;  - the global prefix if it's been set (-p argument)
+;  - /usr/local otherwise
+include=/etc/php-fpm.d/*.conf
+; Start a new pool named 'www'.
+; the variable $pool can be used in any directive and will be replaced by the
+; pool name ('www' here)
+[www]
+
+; Per pool prefix
+; It only applies on the following directives:
+; - 'access.log'
+; - 'slowlog'
+; - 'listen' (unixsocket)
+; - 'chroot'
+; - 'chdir'
+; - 'php_values'
+; - 'php_admin_values'
+; When not set, the global prefix (or /usr/local) applies instead.
+; Note: This directive can also be relative to the global prefix.
+; Default Value: none
+;prefix = /path/to/pools/$pool
+
+; Unix user/group of processes
+; Note: The user is mandatory. If the group is not set, the default user's group
+;       will be used.
+user = www
+group = www
+
+; The address on which to accept FastCGI requests.
+; Valid syntaxes are:
+;   'ip.add.re.ss:port'    - to listen on a TCP socket to a specific IPv4 address on
+;                            a specific port;
+;   '[ip:6:addr:ess]:port' - to listen on a TCP socket to a specific IPv6 address on
+;                            a specific port;
+;   'port'                 - to listen on a TCP socket to all addresses
+;                            (IPv6 and IPv4-mapped) on a specific port;
+;   '/path/to/unix/socket' - to listen on a unix socket.
+; Note: This value is mandatory.
+; If using a TCP port, never expose this to a public network.
+listen = /var/www/run/php-fpm.sock
+
+; Set listen(2) backlog.
+; Default Value: 511 (-1 on FreeBSD and OpenBSD)
+;listen.backlog = 511
+
+; Set permissions for unix socket, if one is used. In Linux, read/write
+; permissions must be set in order to allow connections from a web server. Many
+; BSD-derived systems allow connections regardless of permissions. The owner
+; and group can be specified either by name or by their numeric IDs.
+; Default Values: user and group are set as the running user
+;                 mode is set to 0660
+listen.owner = www
+listen.group = www
+listen.mode = 0660
+; When POSIX Access Control Lists are supported you can set them using
+; these options, value is a comma separated list of user/group names.
+; When set, listen.owner and listen.group are ignored
+;listen.acl_users =
+;listen.acl_groups =
+
+; List of addresses (IPv4/IPv6) of FastCGI clients which are allowed to connect.
+; Equivalent to the FCGI_WEB_SERVER_ADDRS environment variable in the original
+; PHP FCGI (5.2.2+). Makes sense only with a tcp listening socket. Each address
+; must be separated by a comma. If this value is left blank, connections will be
+; accepted from any ip address.
+; Default Value: any
+;listen.allowed_clients = 127.0.0.1
+
+; Specify the nice(2) priority to apply to the pool processes (only if set)
+; The value can vary from -19 (highest priority) to 20 (lower priority)
+; Note: - It will only work if the FPM master process is launched as root
+;       - The pool processes will inherit the master process priority
+;         unless it specified otherwise
+; Default Value: no set
+; process.priority = -19
+
+; Set the process dumpable flag (PR_SET_DUMPABLE prctl) even if the process user
+; or group is different than the master process user. It allows to create process
+; core dump and ptrace the process for the pool user.
+; Default Value: no
+; process.dumpable = yes
+
+; Choose how the process manager will control the number of child processes.
+; Possible Values:
+;   static  - a fixed number (pm.max_children) of child processes;
+;   dynamic - the number of child processes are set dynamically based on the
+;             following directives. With this process management, there will be
+;             always at least 1 children.
+;             pm.max_children      - the maximum number of children that can
+;                                    be alive at the same time.
+;             pm.start_servers     - the number of children created on startup.
+;             pm.min_spare_servers - the minimum number of children in 'idle'
+;                                    state (waiting to process). If the number
+;                                    of 'idle' processes is less than this
+;                                    number then some children will be created.
+;             pm.max_spare_servers - the maximum number of children in 'idle'
+;                                    state (waiting to process). If the number
+;                                    of 'idle' processes is greater than this
+;                                    number then some children will be killed.
+;  ondemand - no children are created at startup. Children will be forked when
+;             new requests will connect. The following parameter are used:
+;             pm.max_children           - the maximum number of children that
+;                                         can be alive at the same time.
+;             pm.process_idle_timeout   - The number of seconds after which
+;                                         an idle process will be killed.
+; Note: This value is mandatory.
+pm = dynamic
+
+; The number of child processes to be created when pm is set to 'static' and the
+; maximum number of child processes when pm is set to 'dynamic' or 'ondemand'.
+; This value sets the limit on the number of simultaneous requests that will be
+; served. Equivalent to the ApacheMaxClients directive with mpm_prefork.
+; Equivalent to the PHP_FCGI_CHILDREN environment variable in the original PHP
+; CGI. The below defaults are based on a server without much resources. Don't
+; forget to tweak pm.* to fit your needs.
+; Note: Used when pm is set to 'static', 'dynamic' or 'ondemand'
+; Note: This value is mandatory.
+pm.max_children = 5
+
+; The number of child processes created on startup.
+; Note: Used only when pm is set to 'dynamic'
+; Default Value: (min_spare_servers + max_spare_servers) / 2
+pm.start_servers = 2
+
+; The desired minimum number of idle server processes.
+; Note: Used only when pm is set to 'dynamic'
+; Note: Mandatory when pm is set to 'dynamic'
+pm.min_spare_servers = 1
+
+; The desired maximum number of idle server processes.
+; Note: Used only when pm is set to 'dynamic'
+; Note: Mandatory when pm is set to 'dynamic'
+pm.max_spare_servers = 3
+
+; The number of seconds after which an idle process will be killed.
+; Note: Used only when pm is set to 'ondemand'
+; Default Value: 10s
+;pm.process_idle_timeout = 10s;
+
+; The number of requests each child process should execute before respawning.
+; This can be useful to work around memory leaks in 3rd party libraries. For
+; endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS.
+; Default Value: 0
+;pm.max_requests = 500
+
+; The URI to view the FPM status page. If this value is not set, no URI will be
+; recognized as a status page. It shows the following information:
+;   pool                 - the name of the pool;
+;   process manager      - static, dynamic or ondemand;
+;   start time           - the date and time FPM has started;
+;   start since          - number of seconds since FPM has started;
+;   accepted conn        - the number of request accepted by the pool;
+;   listen queue         - the number of request in the queue of pending
+;                          connections (see backlog in listen(2));
+;   max listen queue     - the maximum number of requests in the queue
+;                          of pending connections since FPM has started;
+;   listen queue len     - the size of the socket queue of pending connections;
+;   idle processes       - the number of idle processes;
+;   active processes     - the number of active processes;
+;   total processes      - the number of idle + active processes;
+;   max active processes - the maximum number of active processes since FPM
+;                          has started;
+;   max children reached - number of times, the process limit has been reached,
+;                          when pm tries to start more children (works only for
+;                          pm 'dynamic' and 'ondemand');
+; Value are updated in real time.
+; Example output:
+;   pool:                 www
+;   process manager:      static
+;   start time:           01/Jul/2011:17:53:49 +0200
+;   start since:          62636
+;   accepted conn:        190460
+;   listen queue:         0
+;   max listen queue:     1
+;   listen queue len:     42
+;   idle processes:       4
+;   active processes:     11
+;   total processes:      15
+;   max active processes: 12
+;   max children reached: 0
+;
+; By default the status page output is formatted as text/plain. Passing either
+; 'html', 'xml' or 'json' in the query string will return the corresponding
+; output syntax. Example:
+;   http://www.foo.bar/status
+;   http://www.foo.bar/status?json
+;   http://www.foo.bar/status?html
+;   http://www.foo.bar/status?xml
+;
+; By default the status page only outputs short status. Passing 'full' in the
+; query string will also return status for each pool process.
+; Example:
+;   http://www.foo.bar/status?full
+;   http://www.foo.bar/status?json&full
+;   http://www.foo.bar/status?html&full
+;   http://www.foo.bar/status?xml&full
+; The Full status returns for each process:
+;   pid                  - the PID of the process;
+;   state                - the state of the process (Idle, Running, ...);
+;   start time           - the date and time the process has started;
+;   start since          - the number of seconds since the process has started;
+;   requests             - the number of requests the process has served;
+;   request duration     - the duration in µs of the requests;
+;   request method       - the request method (GET, POST, ...);
+;   request URI          - the request URI with the query string;
+;   content length       - the content length of the request (only with POST);
+;   user                 - the user (PHP_AUTH_USER) (or '-' if not set);
+;   script               - the main script called (or '-' if not set);
+;   last request cpu     - the %cpu the last request consumed
+;                          it's always 0 if the process is not in Idle state
+;                          because CPU calculation is done when the request
+;                          processing has terminated;
+;   last request memory  - the max amount of memory the last request consumed
+;                          it's always 0 if the process is not in Idle state
+;                          because memory calculation is done when the request
+;                          processing has terminated;
+; If the process is in Idle state, then informations are related to the
+; last request the process has served. Otherwise informations are related to
+; the current request being served.
+; Example output:
+;   ************************
+;   pid:                  31330
+;   state:                Running
+;   start time:           01/Jul/2011:17:53:49 +0200
+;   start since:          63087
+;   requests:             12808
+;   request duration:     1250261
+;   request method:       GET
+;   request URI:          /test_mem.php?N=10000
+;   content length:       0
+;   user:                 -
+;   script:               /home/fat/web/docs/php/test_mem.php
+;   last request cpu:     0.00
+;   last request memory:  0
+;
+; Note: There is a real-time FPM status monitoring sample web page available
+;       It's available in: /usr/local/share/php/fpm/status.html
+;
+; Note: The value must start with a leading slash (/). The value can be
+;       anything, but it may not be a good idea to use the .php extension or it
+;       may conflict with a real PHP file.
+; Default Value: not set
+;pm.status_path = /status
+
+; The address on which to accept FastCGI status request. This creates a new
+; invisible pool that can handle requests independently. This is useful
+; if the main pool is busy with long running requests because it is still possible
+; to get the status before finishing the long running requests.
+;
+; Valid syntaxes are:
+;   'ip.add.re.ss:port'    - to listen on a TCP socket to a specific IPv4 address on
+;                            a specific port;
+;   '[ip:6:addr:ess]:port' - to listen on a TCP socket to a specific IPv6 address on
+;                            a specific port;
+;   'port'                 - to listen on a TCP socket to all addresses
+;                            (IPv6 and IPv4-mapped) on a specific port;
+;   '/path/to/unix/socket' - to listen on a unix socket.
+; Default Value: value of the listen option
+;pm.status_listen = 127.0.0.1:9001
+
+; The ping URI to call the monitoring page of FPM. If this value is not set, no
+; URI will be recognized as a ping page. This could be used to test from outside
+; that FPM is alive and responding, or to
+; - create a graph of FPM availability (rrd or such);
+; - remove a server from a group if it is not responding (load balancing);
+; - trigger alerts for the operating team (24/7).
+; Note: The value must start with a leading slash (/). The value can be
+;       anything, but it may not be a good idea to use the .php extension or it
+;       may conflict with a real PHP file.
+; Default Value: not set
+;ping.path = /ping
+
+; This directive may be used to customize the response of a ping request. The
+; response is formatted as text/plain with a 200 response code.
+; Default Value: pong
+;ping.response = pong
+
+; The access log file
+; Default: not set
+;access.log = log/$pool.access.log
+
+; The access log format.
+; The following syntax is allowed
+;  %%: the '%' character
+;  %C: %CPU used by the request
+;      it can accept the following format:
+;      - %{user}C for user CPU only
+;      - %{system}C for system CPU only
+;      - %{total}C  for user + system CPU (default)
+;  %d: time taken to serve the request
+;      it can accept the following format:
+;      - %{seconds}d (default)
+;      - %{milliseconds}d
+;      - %{mili}d
+;      - %{microseconds}d
+;      - %{micro}d
+;  %e: an environment variable (same as $_ENV or $_SERVER)
+;      it must be associated with embraces to specify the name of the env
+;      variable. Some examples:
+;      - server specifics like: %{REQUEST_METHOD}e or %{SERVER_PROTOCOL}e
+;      - HTTP headers like: %{HTTP_HOST}e or %{HTTP_USER_AGENT}e
+;  %f: script filename
+;  %l: content-length of the request (for POST request only)
+;  %m: request method
+;  %M: peak of memory allocated by PHP
+;      it can accept the following format:
+;      - %{bytes}M (default)
+;      - %{kilobytes}M
+;      - %{kilo}M
+;      - %{megabytes}M
+;      - %{mega}M
+;  %n: pool name
+;  %o: output header
+;      it must be associated with embraces to specify the name of the header:
+;      - %{Content-Type}o
+;      - %{X-Powered-By}o
+;      - %{Transfert-Encoding}o
+;      - ....
+;  %p: PID of the child that serviced the request
+;  %P: PID of the parent of the child that serviced the request
+;  %q: the query string
+;  %Q: the '?' character if query string exists
+;  %r: the request URI (without the query string, see %q and %Q)
+;  %R: remote IP address
+;  %s: status (response code)
+;  %t: server time the request was received
+;      it can accept a strftime(3) format:
+;      %d/%b/%Y:%H:%M:%S %z (default)
+;      The strftime(3) format must be encapsuled in a %{<strftime_format>}t tag
+;      e.g. for a ISO8601 formatted timestring, use: %{%Y-%m-%dT%H:%M:%S%z}t
+;  %T: time the log has been written (the request has finished)
+;      it can accept a strftime(3) format:
+;      %d/%b/%Y:%H:%M:%S %z (default)
+;      The strftime(3) format must be encapsuled in a %{<strftime_format>}t tag
+;      e.g. for a ISO8601 formatted timestring, use: %{%Y-%m-%dT%H:%M:%S%z}t
+;  %u: remote user
+;
+; Default: "%R - %u %t \"%m %r\" %s"
+;access.format = "%R - %u %t \"%m %r%Q%q\" %s %f %{mili}d %{kilo}M %C%%"
+
+; The log file for slow requests
+; Default Value: not set
+; Note: slowlog is mandatory if request_slowlog_timeout is set
+;slowlog = log/$pool.log.slow
+
+; The timeout for serving a single request after which a PHP backtrace will be
+; dumped to the 'slowlog' file. A value of '0s' means 'off'.
+; Available units: s(econds)(default), m(inutes), h(ours), or d(ays)
+; Default Value: 0
+;request_slowlog_timeout = 0
+
+; Depth of slow log stack trace.
+; Default Value: 20
+;request_slowlog_trace_depth = 20
+
+; The timeout for serving a single request after which the worker process will
+; be killed. This option should be used when the 'max_execution_time' ini option
+; does not stop script execution for some reason. A value of '0' means 'off'.
+; Available units: s(econds)(default), m(inutes), h(ours), or d(ays)
+; Default Value: 0
+;request_terminate_timeout = 0
+
+; The timeout set by 'request_terminate_timeout' ini option is not engaged after
+; application calls 'fastcgi_finish_request' or when application has finished and
+; shutdown functions are being called (registered via register_shutdown_function).
+; This option will enable timeout limit to be applied unconditionally
+; even in such cases.
+; Default Value: no
+;request_terminate_timeout_track_finished = no
+
+; Set open file descriptor rlimit.
+; Default Value: system defined value
+;rlimit_files = 1024
+
+; Set max core size rlimit.
+; Possible Values: 'unlimited' or an integer greater or equal to 0
+; Default Value: system defined value
+;rlimit_core = 0
+
+; Chroot to this directory at the start. This value must be defined as an
+; absolute path. When this value is not set, chroot is not used.
+; Note: you can prefix with '$prefix' to chroot to the pool prefix or one
+; of its subdirectories. If the pool prefix is not set, the global prefix
+; will be used instead.
+; Note: chrooting is a great security feature and should be used whenever
+;       possible. However, all PHP paths will be relative to the chroot
+;       (error_log, sessions.save_path, ...).
+; Default Value: not set
+chroot = /var/www
+
+; Chdir to this directory at the start.
+; Note: relative path can be used.
+; Default Value: current directory or / when chroot
+;chdir = /var/www
+
+; Redirect worker stdout and stderr into main error log. If not set, stdout and
+; stderr will be redirected to /dev/null according to FastCGI specs.
+; Note: on highloaded environment, this can cause some delay in the page
+; process time (several ms).
+; Default Value: no
+;catch_workers_output = yes
+
+; Decorate worker output with prefix and suffix containing information about
+; the child that writes to the log and if stdout or stderr is used as well as
+; log level and time. This options is used only if catch_workers_output is yes.
+; Settings to "no" will output data as written to the stdout or stderr.
+; Default value: yes
+;decorate_workers_output = no
+
+; Clear environment in FPM workers
+; Prevents arbitrary environment variables from reaching FPM worker processes
+; by clearing the environment in workers before env vars specified in this
+; pool configuration are added.
+; Setting to "no" will make all environment variables available to PHP code
+; via getenv(), $_ENV and $_SERVER.
+; Default Value: yes
+;clear_env = no
+
+; Limits the extensions of the main script FPM will allow to parse. This can
+; prevent configuration mistakes on the web server side. You should only limit
+; FPM to .php extensions to prevent malicious users to use other extensions to
+; execute php code.
+; Note: set an empty value to allow all extensions.
+; Default Value: .php
+;security.limit_extensions = .php .php3 .php4 .php5 .php7
+
+; Pass environment variables like LD_LIBRARY_PATH. All $VARIABLEs are taken from
+; the current environment.
+; Default Value: clean env
+;env[HOSTNAME] = $HOSTNAME
+;env[PATH] = /usr/local/bin:/usr/bin:/bin
+;env[TMP] = /tmp
+;env[TMPDIR] = /tmp
+;env[TEMP] = /tmp
+
+; Additional php.ini defines, specific to this pool of workers. These settings
+; overwrite the values previously defined in the php.ini. The directives are the
+; same as the PHP SAPI:
+;   php_value/php_flag             - you can set classic ini defines which can
+;                                    be overwritten from PHP call 'ini_set'.
+;   php_admin_value/php_admin_flag - these directives won't be overwritten by
+;                                     PHP call 'ini_set'
+; For php_*flag, valid values are on, off, 1, 0, true, false, yes or no.
+
+; Defining 'extension' will load the corresponding shared extension from
+; extension_dir. Defining 'disable_functions' or 'disable_classes' will not
+; overwrite previously defined php.ini values, but will append the new value
+; instead.
+
+; Note: path INI options can be relative and will be expanded with the prefix
+; (pool, global or /usr/local)
+
+; Default Value: nothing is defined by default except the values in php.ini and
+;                specified at startup with the -d argument
+;php_admin_value[sendmail_path] = /usr/sbin/sendmail -t -i -f www@my.domain.com
+;php_flag[display_errors] = off
+;php_admin_value[error_log] = /var/log/fpm-php.www.log
+;php_admin_flag[log_errors] = on
+;php_admin_value[memory_limit] = 32M

+ 5 - 0
CONFVW_examples/site.com.conf

@@ -0,0 +1,5 @@
+server {
+    listen       80;
+    server_name  site.com;
+    root         /var/www/htdocs;
+}

+ 637 - 0
CONFVW_func/func.string.inc

@@ -0,0 +1,637 @@
+<?php
+
+/**
+ * Copyright (c) 2016, 2024 5 Mode
+ * 
+ * This file is part of www-conf-viewer.
+ * 
+ * www-conf-viewer is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ * 
+ * www-conf-viewer is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.  
+ * 
+ * You should have received a copy of the GNU General Public License
+ * along with www-conf-viewer. If not, see <https://www.gnu.org/licenses/>.
+ * 
+ * func.string.inc
+ * 
+ * www-conf-viewer string related functions.
+ *
+ * @author Daniele Bonini <danielemi@hotmail.com>
+ * @copyrights (c) 2016, 2018, the Open Gallery's contributors     
+ * @license https://opensource.org/licenses/BSD-3-Clause 
+ */
+
+
+/**
+ * Check if the given word is a contraction 
+ * 
+ * @param string $w the word being checked
+ * @return bool if the word is a contraction, true/false
+ */
+function is_contraction(?string $w): bool 
+{
+  $retval = false;
+  if (!isset($w)) {
+    return $retval;
+  }
+  if ($w === mb_strtoupper($w)) {
+    $retval = true;
+  }
+  return $retval;
+}
+
+/**
+ * Check if the passed word is a given name 
+ * 
+ * @param string $w the word being checked
+ * @return bool if the word is a given name, true/false
+ */
+function is_givenName(?string $w): bool 
+{
+  $retval = false;
+  if (!isset($w)) {
+    return $retval;
+  }
+  if (is_ucfirst($w) && !is_contraction($w)) {
+    $retval = true;
+  }
+  return $retval;
+}
+
+
+/**
+ * Check if the given string start with a capital letter
+ * 
+ * @param string $s the string being checked
+ * @return bool if the string starts with a capital letter , true/false
+ */
+function is_ucfirst(?string $s): bool 
+{
+  $retval = false;
+  if (!isset($s)) {
+    return $retval;
+  }
+  if (ucfirst(mb_substr($s,0,1)) === mb_substr($s,0,1)) {
+    $retval = true;
+  }
+  return $retval;
+}
+
+/**
+ * Check if the letter is a vowel
+ * 
+ * @param char $letter the letter to check
+ * @return bool if the letter is vowel, true/false
+ */
+function is_vowel(string $letter): bool 
+{
+  $vowels = ['a','e','i','o','u'];
+  return in_array($letter, $vowels);
+}
+
+/**
+ * Check if the given url is a valid Facebook page
+ * 
+ * Eg:
+ * http://facebook.com/mrdanielebeta                                   
+ * http://facebook.com/pg/makeiteasyforabird
+ * 
+ * @param string $url the url to check
+ * @return bool if the url is Facebook url, true/false
+ */
+function isFacebookUrl(string $url): bool 
+{
+  $retval=false;
+  $maxLength = 60;
+  if (strlen($url)>60) {
+    return $retval;    
+  }
+  $url= strtolower($url);
+  $pattern1 = "/^http(s)?\:\/\/(www\.)?facebook\.com\/[\w\.]+$/";
+  $pattern2 = "/^http(s)?\:\/\/(www\.)?facebook\.com\/pg\/[\w\.]+$/";
+  if (preg_match($pattern1, $url) || preg_match($pattern2, $url)) {
+    $retval=true;
+  } else {
+    $retval=false;
+  }  
+  return $retval;
+}  
+
+/**
+ * Check if the given url is a valid domain url
+ * 
+ * Eg:
+ * http://danielebonini.com
+  * 
+ * @param string $url the url to check
+ * @return bool if the url is a valid domain url, true/false
+ */
+function isUrl(string $url): bool
+{
+  $retval=false;
+  $maxLength = 45;
+  if (strlen($url)>45) {
+    return $retval;    
+  }
+  $url= strtolower($url);
+  $pattern1 = "/^http(s)?\:\/\/(www\.)?\w+\.\w+$/";
+  $pattern2 = "/^http(s)?\:\/\/(www\.)?\w+\.\w+.\w+$/";
+  if (preg_match($pattern1, $url) || preg_match($pattern2, $url)) {
+    $retval=true;
+  } else {
+    $retval=false;
+  }  
+  return $retval;
+}  
+
+/**
+ * Check if the given url is a valid Youtube page
+ * 
+ * Eg:
+ * http://youtube.com/watch?v=eeerwr24334 
+ * 
+ * @param string $url the url to check
+ * @return bool if the url is Youtube url, true/false
+ */
+function isYoutubeUrl(string $url): bool 
+{
+  $retval=false;
+  $maxLength = 50;
+  if (strlen($url)>50) {
+    return $retval;    
+  }
+  $url= strtolower($url);
+  $pattern1 = "/^http(s)?\:\/\/(www\.)?youtube\.com\/watch\?v\=[\w]+$/";
+  if (preg_match($pattern1, $url)) {
+    $retval=true;
+  } else {
+    $retval=false;
+  }  
+  return $retval;
+}  
+
+/**
+ * Test if a word is of a latin language
+ * 
+ * @param string  $word the string to test
+ * @return bool  if $word is of a latin language, true/false
+ */
+function isLatinLang(string $word): bool 
+{
+  
+  //$char = mb_substr($word, 0, 1);
+  //return !preg_match("/[\x{31C0}-\x{31EF}\x{3300}-\x{33FF}\x{3400}-\x{4DBF}\x{4E00}-\x{9FFF}\x{F900}-\x{FAFF}\x{FE30}-\x{FE4F}]{1}/u", $char);
+  
+  $isNonLatinLang = preg_match("/^[\w-]+[\x{31C0}-\x{31EF}\x{3300}-\x{33FF}\x{3400}-\x{4DBF}\x{4E00}-\x{9FFF}\x{F900}-\x{FAFF}\x{FE30}-\x{FE4F}]+$/u", $word) ||
+                    preg_match("/^[\x{31C0}-\x{31EF}\x{3300}-\x{33FF}\x{3400}-\x{4DBF}\x{4E00}-\x{9FFF}\x{F900}-\x{FAFF}\x{FE30}-\x{FE4F}]+$/u", $word) ||
+                    preg_match("/^[\x{31C0}-\x{31EF}\x{3300}-\x{33FF}\x{3400}-\x{4DBF}\x{4E00}-\x{9FFF}\x{F900}-\x{FAFF}\x{FE30}-\x{FE4F}]+[\w-]+$/u", $word) ||
+                    preg_match("/^[\w-]+[\x{31C0}-\x{31EF}\x{3300}-\x{33FF}\x{3400}-\x{4DBF}\x{4E00}-\x{9FFF}\x{F900}-\x{FAFF}\x{FE30}-\x{FE4F}]+[\w-]+$/u", $word);
+  
+  return !$isNonLatinLang;
+}
+
+/*
+ * Check if the given string is specified in json format
+ * 
+ * @param string  $s the string being checked 
+ * @return bool  if $s is in json format, true/false 
+ */
+function is_json(string $s): bool 
+{
+  if (left($s,1)==="{" && right($s,1)==="}" && stripos($s,":")!==false) {
+    return true;    
+  } else {
+    return false;
+  }
+}
+
+/*
+ * Check if the given string is specified in json format
+ * 
+ * @param string  $s the string being checked 
+ * @return bool  if $s is in json format, true/false 
+ */
+function is_listformat(string $s): bool
+{
+  $val = $s;
+  $val = str_replace("'","\'", $val);
+  $val = str_replace('"',"\"", $val);
+  $cmd = "return is_array(".$val.");";
+  $ret = eval($cmd);
+  return $ret;    
+}
+
+
+function json_decode_from_db(string $json, bool $assoc = false) 
+{
+  $temp = $json;
+  $temp = str_replace('\"', '"', $temp);
+  $temp = str_replace("\'", "'", $temp);
+  $temp = str_replace("\\\\", "\\", $temp);
+  
+  return json_decode($temp, $assoc);
+}
+
+/**
+ * Left cut the given substring for the specified length 
+ * 
+ * @param string $string the string being cut on the left
+ * @param int $length the length of the substring to return
+ * @return string the resulting substring    
+ */
+function left(?string $string, int $length): string 
+{
+  if (!isset($string) || $string === PHP_STR) {
+    return PHP_STR;
+  }
+  return mb_substr($string, 0, $length);
+}
+
+/**
+ * Right cut the given string for the specified length 
+ * 
+ * @param string $string the string being cut on the right
+ * @param int $length the length of the substring to return
+ * @return string the resulting substring    
+ */
+function right(?string $string, int $length): string 
+{
+  if (!isset($string) || $string === PHP_STR) {
+    return PHP_STR;
+  }  
+  return mb_substr($string, mb_strlen($string) - $length);
+}
+
+/**
+ * Get the left word of the given sentence 
+ * 
+ * @param string $phrase  the sentence being processed
+ * @return string the first word    
+ */
+function leftWord(?string $phrase): string 
+{
+  if (isset1($phrase, PHP_STR)===PHP_STR) {
+    return PHP_STR;
+  }  
+
+  $aWords = explode(PHP_SPACE, $phrase);
+  return $aWords[0]; 
+}
+
+/**
+ * Get the right word of the given sentence 
+ * 
+ * @param string $phrase  the sentence being processed
+ * @return string the last word    
+ */
+function rightWord(?string $phrase): string 
+{
+  if (isset1($phrase, PHP_STR)===PHP_STR) {
+    return PHP_STR;
+  }  
+
+  $aWords = explode(PHP_SPACE, $phrase);
+  return $aWords[count($aWords)-1];
+}
+
+
+/**
+ * Return the number of words of the given phrase
+ * 
+ * @param string $phrase
+ * @return int the number of words of the phrase
+ */
+function mb_str_word_count(string $phrase): int 
+{
+  $aWords = explode(PHP_SPACE, $phrase);
+  return count($aWords);
+}
+
+/**
+ * Finds the position of first occurrence of a string within another, 
+ * result safe (excluding 0), case insensitive
+ * 
+ * @param string $string the string being searched
+ * @param string $needle the string searched
+ * @param int $offset the position in string to start the search 
+ * @return mixed the position of the needle or False
+ */
+function mb_stripos1(string $string, string $needle, int $offset = 0) 
+{
+  return mb_stripos(PHP_TILDE . $string, $needle, $offset);
+}  
+
+/**
+ * Normalize the case of the given text 
+ * 
+ * @param string $text text to case normalize
+ * @return string the normalized text
+ */
+function str_case_normalize(?string $text): string 
+{
+  $retval = $text;
+  
+  if (!isset($text) || $text === PHP_STR) {
+    return $retval;
+  }
+  
+  $aWords = explode(PHP_SPACE, $text);
+  
+  foreach($aWords as & $word) {
+    if (strtoupper(substr($word,0,1)) === substr($word,0,1)) {
+      $word = ucfirst(strtolower($word));
+    } else {  
+      $word = strtolower($word);
+    }  
+  }
+    
+  $retval = implode(" ", $aWords);
+  
+  return $retval;
+}  
+
+/**
+ * Clean a phase removing repeated spaces and trimming it  
+ * 
+ * @param string $string the string being cleaned
+ * @return string the cleaned string
+ */
+function str_cleanphrase(string $string): string 
+{
+  //return trim(str_replace("  ", PHP_SPACE, str_replace("  ", PHP_SPACE, $string)));
+  
+  //hypen
+  $retval = str_replace(" -", PHP_HYPHEN, $string);
+  $retval = str_replace("- ", PHP_HYPHEN, $retval);
+  $retval = ltrim($retval, PHP_HYPHEN);
+  $retval = rtrim($retval, PHP_HYPHEN);
+  //space
+  $retval = trim(str_replace("  ", PHP_SPACE, str_replace("  ", PHP_SPACE, $retval)));
+  
+  return $retval;
+}  
+
+/**
+ * Clean a phase removing repeated spaces and trimming it  
+ * 
+ * @param string $string the string being cleaned
+ * @return string the cleaned string
+ */
+function str_cleanphrase_M(string $string): string 
+{
+  //return trim(str_replace("  ", PHP_SPACE, str_replace("  ", PHP_SPACE, $string)));
+  
+  //hypen
+  $retval = str_replace(" -", PHP_HYPHEN, $string);
+  $retval = str_replace("- ", PHP_HYPHEN, $retval);
+  $retval = ltrim($retval, PHP_HYPHEN);
+  $retval = rtrim($retval, PHP_HYPHEN);
+  //axterix
+  //$retval = trim(str_replace("**", "*", str_replace("**", "*", $retval)));
+  $retval = str_replace("*", PHP_SPACE, $retval);
+  //space
+  $retval = trim(str_replace("  ", PHP_SPACE, str_replace("  ", PHP_SPACE, $retval)));
+  
+  return $retval;
+}  
+
+/**
+ * Clean a phase removing the plurals  
+ * 
+ * @param string $string the string being cleaned
+ * @return string the cleaned string
+ */
+function str_cleanplurals(string $string): string 
+{
+  $aWords = explode(PHP_SPACE, $string);
+  
+  foreach($aWords as &$word) {
+    if (right($word,3)==="ies") {
+      $word = left($word, strlen($word)-3) . "y";
+    }  
+    if (right($word,3)==="hes" || right($word,3)==="xes") {
+      $word = left($word, strlen($word)-2);
+    }  
+    if (right($word,2)==="es") {
+      $word = left($word, strlen($word)-2) . "e";
+    }  
+    if (right($word,2)!=="ss" && right($word,1)==="s") {
+      $word = left($word, strlen($word)-1);
+    }  
+  }
+  
+  return implode(PHP_SPACE, $aWords);
+}  
+
+/**
+ * Break the given phrase by a word separator
+ * 
+ * @param string $phrase the phrase being broken
+ * @param string $word_separetor the word at which beginning break the phrase
+ * @param string $retFirstPart the resulting broken first part of the phrase 
+ * @param string $retReminder the remaining part of the phrase
+ * @return void
+ */
+function str_phrasebrk(string $phrase, string $word_separetor, & $retFirstPart, & $retRemainder = null): void 
+{
+  $phrase = PHP_SPACE . $phrase . PHP_SPACE;
+  $i = mb_stripos1($phrase, PHP_SPACE . $word_separetor . PHP_SPACE);
+  if ($i) {
+    $retFirstPart = trim(mb_substr($phrase, 0, $i));
+    if (isset($retRemainder)) {
+      $retRemainder = trim(mb_substr($phrase, $i));
+    }
+  } else {  
+    $retFirstPart = trim($phrase);
+    if (isset($retRemainder)) {
+      $retRemainder = PHP_STR;
+    }     
+  }
+}
+
+/**
+ * Return the given needle only if not already present in string
+ * 
+ * @param string $string
+ * @param string $needle
+ * @return string
+ */
+function str_place(string $string, string $needle): string  
+{
+   if (mb_stripos(PHP_TILDE . $string, $needle)) {
+     return PHP_STR;
+   } else {
+     return $needle;
+   }
+}
+
+/**
+ * Replace a pattern in the given string
+ * 
+ * @param string $needle the pattern searched for
+ * @param string $replace the replacement
+ * @param string $string the string being searched
+ * @param int $replacements the number of replacements to perform
+ * @return string the replaced string
+ */
+function str_replace1(string $needle, string $replace, ?string $string, int $replacements = 1): string 
+{
+  if (!isset($string) || $replacements === 0) {
+    return $string;
+  }
+  
+  if ($replacements < 0 ) {
+    $string = implode(PHP_SPACE, array_reverse(explode(PHP_SPACE, $string)));
+    $replace = implode(PHP_SPACE, array_reverse(explode(PHP_SPACE, $replace)));
+    $string = preg_replace("/$needle/i", $replace, $string, abs($replacements));
+    $string = implode(PHP_SPACE, array_reverse(explode(PHP_SPACE, $string)));
+  } else {
+    $string = preg_replace("/$needle/i", $replace, $string, abs($replacements));
+  }
+  
+  return $string;
+}
+
+/**
+ * Reverse the words in the given phrase
+ * 
+ * @param string $string the string being reversed
+ * @return string the resulting reversed string
+ */
+function str_phrase_reverse(string $string): string 
+{
+  settype($aWords, "array");
+  $aWords = explode(PHP_SPACE, $string);
+  $aWords = array_reverse($aWords);
+  return implode(PHP_SPACE, $aWords);
+}
+
+/**
+ * Finds the position of the first occurance of a word 
+ * in the given string, result safe (excluding 0), case insensitive
+ * 
+ * @param string $phrase the phrase being searched
+ * @param string $word the searched word
+ * @param int $offset the position in string to start the search 
+ * @return mixed the position of the searched word, otherwise false 
+ */
+function str_wordipos(string $phrase, string $word, int $offset = 0) 
+{
+  if ($offset<0) {
+    $offset=0;
+  }
+  $word = strtolower($word);
+  $phrase = strtolower($phrase);
+  $aWords = explode(" ", $phrase);
+  $max = count($aWords) - 1;
+  $i = $offset; 
+  while ($i <= $max) {
+    $word2 = $aWords[$i];
+    if ($word === $word2) {
+      return $i + 1;
+    }
+    $i++;
+  }
+  return false;
+}
+
+/**
+ * Remove duplicate words from a phrase
+ * 
+ * @param string $phrase the string being processed
+ * @param bool $removeRightMost if remove the right-most duplicates, true/false
+ * @return string the resulting string
+ */
+function str_word_unique(string $phrase, bool $removeRightMost = true) 
+{
+  settype($aWords, "array");
+  $aWords = explode(PHP_SPACE, $phrase);
+  if ($removeRightMost) {
+    // Remove right-most duplicates from the given string..
+    $aWords = array_unique($aWords);
+  } else {
+    // Remove left-most duplicates from the given string..
+    $aWords = array_reverse($aWords);
+    $aWords = array_unique($aWords);
+    $aWords = array_reverse($aWords);
+  }  
+  return implode(PHP_SPACE, $aWords);
+}  
+
+/**
+ * Short words by the given char limit
+ * 
+ * @param string $phrase the phrase being parsed 
+ * @param int $wordLength the word limit to set
+ * @return string  the resulting phrase
+ */
+function str_word_length(string $phrase, int $wordLength): string 
+{
+  $aWords = explode(PHP_SPACE, $phrase);
+  foreach($aWords as & $word) {
+    $word = mb_substr($word, 0, $wordLength);
+  }
+  return implode(PHP_SPACE, $aWords);
+}
+
+/**
+ * Right trim a word from the given string
+ * 
+ * @param string $phrase the string being trimmed
+ * @param array $aWords the words to remove
+ * @return string the resulting right trimmed phrase 
+ */
+function rtrim_word(string $phrase, array $aWords): string 
+{
+  $retval = PHP_SPACE . $phrase . PHP_SPACE;
+  
+  foreach ($aWords as $word) {
+    if (right($retval, mb_strlen($word) + 2) === (PHP_SPACE . $word . PHP_SPACE)) {
+      $retval = left($retval, mb_strlen($retval) - (mb_strlen($word) + 1));
+    }  
+  }  
+  
+  return str_cleanphrase($retval);
+}
+
+/*
+ * Convert a string in json format to a list
+ * 
+ * @param string $json the string being converted
+ * @return string the resulting list
+ */
+function jsontolist($json) {
+  
+  $ret = $json;
+  if (left($ret,1) === "{" && right($ret,1) === "}") {
+    $ret = str_replace("{", "[", $ret);    
+    $ret = str_replace("}", "]", $ret);
+    $ret = str_replace(":", "=>", $ret);
+  }
+  return $ret;
+  
+}
+
+/**
+ * Trim a word from the given string
+ * 
+ * @param string $phrase the string being trimmed
+ * @param array $aWords the words to remove
+ * @return string the resulting trimmed phrase 
+ */
+function trim_word(string $phrase, array $aWords) {
+
+  $retval = PHP_SPACE . $phrase . PHP_SPACE;
+  
+  foreach ($aWords as $word) {
+    $retval = str_ireplace(PHP_SPACE . $word . PHP_SPACE, PHP_SPACE, $retval);
+  }  
+  
+  return str_cleanphrase($retval);
+}

+ 240 - 0
CONFVW_func/func.various.inc

@@ -0,0 +1,240 @@
+<?PHP
+/**
+ * Copyright (c) 2016, 2024 5 Mode
+ * 
+ * This file is part of www-conf-viewer.
+ * 
+ * www-conf-viewer is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ * 
+ * www-conf-viewer is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.  
+ * 
+ * You should have received a copy of the GNU General Public License
+ * along with www-conf-viewer. If not, see <https://www.gnu.org/licenses/>.
+ *
+ * func.various.inc
+ * 
+ * www-conf-viewer various useful functions.
+ *
+ * @author Daniele Bonini <my25mb@aol.com>
+ * @copyrights (c) 2016, 2024, 5 Mode
+ */
+
+if (!function_exists("enableEmoticons")) { 
+/**
+ * Enable the emoticons of the given text
+ * 
+ * @param string $text the text being parsed for emoticons
+ * @return the text with enabled emoticons
+ */
+function enableEmoticons(string $text): string
+{ 
+  global $EMOTICONS;
+  
+  if ($EMOTICONS) {
+    return str_ireplace(array_keys($EMOTICONS),array_values($EMOTICONS), $text);
+  }  
+}  
+}
+
+if (!function_exists("getResource0")) { 
+/**
+ * Get a resource translated 
+ * 
+ * @param string $resource the string to get translated
+ * @param string $destLocale the destination locale
+ * @param string $localeKey the locale key
+ * @return string the translated resource    
+ */  
+function getResource0(string $resource, string $destLocale = "en-US", string $localeKey = "/".SCRIPT_FILENAME): string
+{
+  
+  global $LOCALE;
+  
+  if ($destLocale === "en-US") {
+    return $resource; 
+  }    
+
+  if (($LOCALE[$destLocale][$localeKey]['ping']??PHP_STR)==PHP_STR) {
+    return $resource; 
+  }    
+
+  if (($LOCALE[$destLocale][$localeKey][$resource]??PHP_STR)==PHP_STR) {
+    return $resource; 
+  }    
+  
+  return $LOCALE[$destLocale][$localeKey][$resource];
+}
+}
+
+
+/**
+ * Replacement for echo with debug checking
+ * 
+ * @param boolean $debug_var a debug value, if true the echo will be executed 
+ * @param list $args a variable argument list
+ * @return void
+ */
+function echo_ifdebug($debug_var, ...$args) {
+  if (!DEBUG || !$debug_var) {
+    return;
+  }
+  foreach($args as $arg) {
+    echo $arg;
+  }
+}
+
+/**
+ * Get an integer result for a division
+ * 
+ * @param mixed $a first operand
+ * @param mixed $b second operand
+ * @return int the integer result
+ */
+function intdiv_1($a, $b) {
+  return ($a - $a % $b) / $b;
+}
+
+/**
+ * Check if the number is odd
+ * 
+ * @param mixed $a first operand
+ * @return bool if the number is odd, true/false
+ */
+function is_odd($a) {
+  return ($a % 2) > 0;
+}
+
+/**
+ * Check if the number is pair
+ * 
+ * @param mixed $a first operand
+ * @return bool if the number is pair, true/false
+ */
+function is_pair($a) {
+  return ($a % 2) === 0;
+}
+
+/**
+ * Check if a variable is set with a default return
+ * 
+ * @param mixed $var the variable to check
+ * @param mixed $default the default value
+ * @return mixed the return value
+ */
+function isset1(&$var, $default=false) {
+  if (isset($var)) {
+    return $var;
+  } else {
+    return $default;
+  }
+}
+
+
+if (!function_exists("fixMultipleFileUpload")) { 
+/**
+ * Fix multiple file uploaded array ($_FILE)
+ * 
+ * @param array $f the $_FILE array
+ * @return array the array fixed
+ */
+function fixMultipleFileUpload(&$f): array
+{
+    $files = array();
+    $count = count($f['name']);
+    $keys = array_keys($f);
+   
+    for($i=0;$i<$count;$i++)
+    {
+        foreach($keys as $key)
+        {
+            $files[$i][$key] = $f[$key][$i];
+        }
+    }
+    return $files;
+}
+}
+
+
+/**
+ * Replacement for var_dump with debug checking
+ * 
+ * @param boolean $debug_var a debug value, if true the var_dump will be executed 
+ * @param list $args a variable argument list
+ * @return void
+ */
+function var_dump_ifdebug($debug_var, ...$args) {
+  if (!DEBUG || !$debug_var) {
+    return;
+  }
+  foreach($args as $arg) {
+    var_dump($arg);
+  }
+}
+
+
+if (!function_exists("enableLinks")) { 
+/**
+ * Enable the links of the given text
+ * 
+ * @param string $text the text being parsed for links
+ * @return the text with enabled links
+ */
+function enableLinks(string $text): string
+{
+  //return preg_replace("/(https?:\/\/)([\da-z\.-]+)\.([a-z\.]{2,8})(\/?.+)?/", "<a href='\\0' target=\"_blank\">\\0</a>", $text);
+  return preg_replace("/(https?:\/\/)([\da-z\.-]+)\.([a-z\.]{2,8})(\/?[\da-zA-Z\-\_\?\/\&\#\=]+)?/i", "<a href='\\0' target=\"_blank\">\\0</a>", $text);
+}  
+}
+
+if (!function_exists("HTMLencode")) { 
+/**
+ * Encode any HTML of a given string
+ * 
+ * @param string $s the string to encode
+ * @param bool $withBR keep the BR tag, true/false
+ * @return string the string encoded
+ */
+function HTMLencode(?string $s, bool $withBR = false): string 
+{
+    
+  if (!isset($s)) {
+    return PHP_STR;
+  }
+    
+  $s = str_ireplace("&#39;", "'", $s); 
+  $s = str_ireplace("&#34;", "\"", $s);
+  $s = str_ireplace("\\n", "", $s);
+
+  $s = htmlspecialchars($s, ENT_QUOTES |ENT_IGNORE | ENT_HTML5, "UTF-8");
+  
+  if ($withBR) {
+    $s = str_ireplace(chr(10), PHP_BR, $s);
+  }  
+    
+  //$s = enableLinks($s);
+  
+  return $s;
+} 
+}
+
+if (!function_exists("getShortLang")) { 
+/**
+ * Get a the short of the language code 
+ * 
+ * @param string $lang the language code to short
+ * @return string the short lang  
+ */  
+function getShortLang($lang) {
+  if ($lang == PHP_CN) {
+    return "cn";
+  } else { 
+    return left($lang, 2);
+  }
+}
+}

+ 121 - 0
CONFVW_js/common.js

@@ -0,0 +1,121 @@
+
+/*
+ * Copyright (c) 2016, 2024, 5 Mode
+ * All rights reserved.
+ * 
+ * This file is part of Avatar Free.
+ * 
+ * Avatar Free is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ * 
+ * Avatar Free is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.  
+ * 
+ * You should have received a copy of the GNU General Public License
+ * along with Avatar Free. If not, see <https://www.gnu.org/licenses/>.
+ * config.inc
+ * 
+ * Avatar Free common javascript code.
+ *
+ * @author Daniele Bonini <my25mb@aol.com>
+ * @copyrights (c) 2021, 2024, 5 Mode 
+ */
+
+function closeMe(tthis) {
+  $(tthis).parent().hide();
+}
+
+/**
+ * Encrypt the given string
+ * 
+ * @param {string} string - The string to encrypt
+ * @returns {string} the encrypted string
+ */
+function encryptSha2(string) {
+  var jsSHAo = new jsSHA("SHA-256", "TEXT", 1);
+  jsSHAo.update(string);
+  return jsSHAo.getHash("HEX");
+}
+
+/**
+ * Get the height of the whole document
+ * 
+ * @param {none} 
+ * @returns {int} the document height
+ */
+function getDocHeight() {
+  var D = document;
+  return Math.max(
+      D.body.scrollHeight, D.documentElement.scrollHeight,
+      D.body.offsetHeight, D.documentElement.offsetHeight,
+      D.body.clientHeight, D.documentElement.clientHeight
+  );
+}
+
+function getDocHeight2() {
+  var D = document;
+  var scrollMaxY;
+  if (window.scrollMaxY) {
+    scrollMaxY = window.scrollMaxY;
+  } else {
+    scrollMaxY = D.documentElement.scrollHeight;
+  }
+  var height = Math.max(
+      D.body.scrollHeight, scrollMaxY,    
+      D.body.offsetHeight, D.documentElement.offsetHeight,
+      D.body.clientHeight, D.documentElement.clientHeight
+  );
+  return height;
+}
+
+
+/**
+ * Get the width of the whole document
+ * 
+ * @param {none} 
+ * @returns {int} the document width
+ */
+function getDocWidth() {
+  var D = document;
+  return Math.max(
+      D.body.scrollWidth, D.documentElement.scrollWidth,
+      D.body.offsetWidth, D.documentElement.offsetWidth,
+      D.body.clientWidth, D.documentElement.clientWidth
+  );
+}
+
+function getDocWidth2() {
+  var D = document;
+  var scrollMaxX;
+  if (window.scrollMaxX) {
+    scrollMaxX = window.scrollMaxX;
+  } else {
+    scrollMaxX = D.documentElement.scrollWidth;
+  }
+  return Math.max(
+      D.body.scrollWidth, scrollMaxX,
+      D.body.offsetWidth, D.documentElement.offsetWidth,
+      D.body.clientWidth, D.documentElement.clientWidth
+  );
+}
+
+function rnd(min, max) {
+  min = Math.ceil(min);
+  max = Math.floor(max);
+  return Math.floor(Math.random() * (max - min +1)) + min;
+}
+
+/**
+  * Open a link from any event handler
+  * 
+  * @param {string} href the link to open
+  * @param {string} target the frame target
+  * @returns {none}
+  */
+function openLink(href, target) {
+  window.open(href, target);
+}

+ 150 - 0
CONFVW_js/home.js

@@ -0,0 +1,150 @@
+ 
+ var myToolsOnIntID;
+
+function settingsOn() {
+  $(".settingson").hide();
+  $(".magicjar1").show();
+  $(".magicjar2").show();
+  $(".magicjar3").show();
+  $(".settingsoff").show();
+  setTimeout("settingsOff()",6000);
+}  
+
+function settingsOff() {
+  $(".settingsoff").hide("slow");
+  $(".magicjar1").hide("slow");
+  $(".magicjar2").hide("slow");
+  $(".magicjar3").hide("slow");
+  $(".settingson").show();
+}  
+
+function toolsOn() {
+  settingsOn();
+  $(".tools").show("slow");
+    
+  clearInterval(myToolsOnIntID);
+}  
+
+function setJar1On() {
+  $(".magicjar1").css("background","url(/res/magicjar1.png)");
+  $(".magicjar1").css("background-size","120px 120px");
+  document.getElementsByClassName("magicjar1")[0].onclick=setJar1Off;
+  document.getElementById("txtMagicJar1").value="1";
+  document.getElementById("frmUpload").submit();
+}
+
+function setJar1Off() {
+  $(".magicjar1").css("background","url(/res/magicjar1dis.png)");
+  $(".magicjar1").css("background-size","120px 120px");
+  document.getElementsByClassName("magicjar1")[0].onclick=setJar1On;
+  document.getElementById("txtMagicJar1").value="0"; 
+  document.getElementById("frmUpload").submit();
+}
+
+function setJar2On() {
+  $(".magicjar2").css("background","url(/res/magicjar2.png)");
+  $(".magicjar2").css("background-size","120px 120px");
+  document.getElementsByClassName("magicjar2")[0].onclick=setJar2Off;
+  document.getElementById("txtMagicJar2").value="1"; 
+  document.getElementById("frmUpload").submit();
+}
+
+function setJar2Off() {
+  $(".magicjar2").css("background","url(/res/magicjar2dis.png)");
+  $(".magicjar2").css("background-size","120px 120px");
+  document.getElementsByClassName("magicjar2")[0].onclick=setJar2On;
+  document.getElementById("txtMagicJar2").value="0";
+  document.getElementById("frmUpload").submit();
+}
+
+function setJar3On() {
+  $(".magicjar3").css("background","url(/res/magicjar3.png)");
+  $(".magicjar3").css("background-size","120px 120px");
+  document.getElementsByClassName("magicjar3")[0].onclick=setJar3Off;
+  document.getElementById("txtMagicJar3").value="1";
+  document.getElementById("frmUpload").submit();
+}
+
+function setJar3Off() {
+  $(".magicjar3").css("background","url(/res/magicjar3dis.png)");
+  $(".magicjar3").css("background-size","120px 120px");
+  document.getElementsByClassName("magicjar3")[0].onclick=setJar3On;
+  document.getElementById("txtMagicJar3").value="0";
+}
+ 
+ function startApp() {
+
+   hidePassword();
+   
+ }			
+
+ function hidePassword() {
+   $("#passworddisplay").css("visibility","hidden");
+ }  
+
+ /*
+  * call to startApp
+  * 
+  * @returns void
+  */
+ function _startApp() {
+   
+   setTimeout("startApp()", 1000);    
+ }
+ 
+/*
+ *  Display the current hash for the config file
+ *  
+ *  @returns void
+ */
+function showEncodedPassword() {
+  if ($("#Password").val() === "") {
+    $("#Password").addClass("emptyfield");
+    return;  
+  }
+  //if ($("#Salt").val() === "") {
+  //  $("#Salt").addClass("emptyfield");
+  //  return;  
+  //}	   	
+  passw = encryptSha2( $("#Password").val() + $("#Salt").val());
+  msg = "Please set your hash in the config file with this value:";
+  alert(msg + "\n\n" + passw);	
+}
+
+function reload() {
+  //window.location.reload(); 
+  document.getElementById("frmUpload").submit();
+}
+
+function setContentPos() {                    
+  h=parseInt(window.innerHeight);
+  w=parseInt(window.innerWidth);
+
+  mytop = parseInt(h - ($("#passworddisplay").height() + 60));
+  $("#passworddisplay").css("top", mytop+"px");
+} 
+
+function setFooterPos() {
+  if (document.getElementById("footerCont")) {
+    tollerance = 16;
+    $("#footerCont").css("top", parseInt( window.innerHeight - $("#footerCont").height() - tollerance ) + "px");
+    $("#footer").css("top", parseInt( window.innerHeight - $("#footer").height() - tollerance ) + "px");
+  }
+}
+
+window.addEventListener("load", function() {
+
+  setTimeout("setContentPos()", 500);
+  setTimeout("setFooterPos()", 1000);
+
+  setTimeout("_startApp()", 10000);
+
+}, true);
+
+window.addEventListener("resize", function() {
+
+  setTimeout("setContentPos()", 500);
+  setTimeout("setFooterPos()", 1000);
+
+}, true);
+  

Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 1 - 0
CONFVW_js/jquery-3.6.0.min.js


+ 45 - 0
CONFVW_js/sha.js

@@ -0,0 +1,45 @@
+/*
+ A JavaScript implementation of the SHA family of hashes, as
+ defined in FIPS PUB 180-4 and FIPS PUB 202, as well as the corresponding
+ HMAC implementation as defined in FIPS PUB 198a
+
+ Copyright Brian Turek 2008-2016
+ Distributed under the BSD License
+ See http://caligatio.github.com/jsSHA/ for more information
+
+ Several functions taken from Paul Johnston
+*/
+'use strict';(function(Y){function C(b,a,c){var g=0,d=[],n=0,h,l,e,f,m,q,u,r,I=!1,v=[],w=[],t,y=!1,A=!1,x=-1;c=c||{};h=c.encoding||"UTF8";t=c.numRounds||1;if(t!==parseInt(t,10)||1>t)throw Error("numRounds must a integer >= 1");if("SHA-1"===b)m=512,q=K,u=Z,f=160,r=function(a){return a.slice()};else if(0===b.lastIndexOf("SHA-",0))if(q=function(a,c){return L(a,c,b)},u=function(a,c,g,d){var k,f;if("SHA-224"===b||"SHA-256"===b)k=(c+65>>>9<<4)+15,f=16;else if("SHA-384"===b||"SHA-512"===b)k=(c+129>>>10<<
+5)+31,f=32;else throw Error("Unexpected error in SHA-2 implementation");for(;a.length<=k;)a.push(0);a[c>>>5]|=128<<24-c%32;c=c+g;a[k]=c&4294967295;a[k-1]=c/4294967296|0;g=a.length;for(c=0;c<g;c+=f)d=L(a.slice(c,c+f),d,b);if("SHA-224"===b)a=[d[0],d[1],d[2],d[3],d[4],d[5],d[6]];else if("SHA-256"===b)a=d;else if("SHA-384"===b)a=[d[0].a,d[0].b,d[1].a,d[1].b,d[2].a,d[2].b,d[3].a,d[3].b,d[4].a,d[4].b,d[5].a,d[5].b];else if("SHA-512"===b)a=[d[0].a,d[0].b,d[1].a,d[1].b,d[2].a,d[2].b,d[3].a,d[3].b,d[4].a,
+d[4].b,d[5].a,d[5].b,d[6].a,d[6].b,d[7].a,d[7].b];else throw Error("Unexpected error in SHA-2 implementation");return a},r=function(a){return a.slice()},"SHA-224"===b)m=512,f=224;else if("SHA-256"===b)m=512,f=256;else if("SHA-384"===b)m=1024,f=384;else if("SHA-512"===b)m=1024,f=512;else throw Error("Chosen SHA variant is not supported");else if(0===b.lastIndexOf("SHA3-",0)||0===b.lastIndexOf("SHAKE",0)){var F=6;q=D;r=function(a){var b=[],d;for(d=0;5>d;d+=1)b[d]=a[d].slice();return b};x=1;if("SHA3-224"===
+b)m=1152,f=224;else if("SHA3-256"===b)m=1088,f=256;else if("SHA3-384"===b)m=832,f=384;else if("SHA3-512"===b)m=576,f=512;else if("SHAKE128"===b)m=1344,f=-1,F=31,A=!0;else if("SHAKE256"===b)m=1088,f=-1,F=31,A=!0;else throw Error("Chosen SHA variant is not supported");u=function(a,b,d,c,g){d=m;var k=F,f,h=[],n=d>>>5,l=0,e=b>>>5;for(f=0;f<e&&b>=d;f+=n)c=D(a.slice(f,f+n),c),b-=d;a=a.slice(f);for(b%=d;a.length<n;)a.push(0);f=b>>>3;a[f>>2]^=k<<f%4*8;a[n-1]^=2147483648;for(c=D(a,c);32*h.length<g;){a=c[l%
+5][l/5|0];h.push(a.b);if(32*h.length>=g)break;h.push(a.a);l+=1;0===64*l%d&&D(null,c)}return h}}else throw Error("Chosen SHA variant is not supported");e=M(a,h,x);l=B(b);this.setHMACKey=function(a,d,c){var k;if(!0===I)throw Error("HMAC key already set");if(!0===y)throw Error("Cannot set HMAC key after calling update");if(!0===A)throw Error("SHAKE is not supported for HMAC");h=(c||{}).encoding||"UTF8";d=M(d,h,x)(a);a=d.binLen;d=d.value;k=m>>>3;c=k/4-1;if(k<a/8){for(d=u(d,a,0,B(b),f);d.length<=c;)d.push(0);
+d[c]&=4294967040}else if(k>a/8){for(;d.length<=c;)d.push(0);d[c]&=4294967040}for(a=0;a<=c;a+=1)v[a]=d[a]^909522486,w[a]=d[a]^1549556828;l=q(v,l);g=m;I=!0};this.update=function(a){var b,c,k,f=0,h=m>>>5;b=e(a,d,n);a=b.binLen;c=b.value;b=a>>>5;for(k=0;k<b;k+=h)f+m<=a&&(l=q(c.slice(k,k+h),l),f+=m);g+=f;d=c.slice(f>>>5);n=a%m;y=!0};this.getHash=function(a,c){var k,h,e,m;if(!0===I)throw Error("Cannot call getHash after setting HMAC key");e=N(c);if(!0===A){if(-1===e.shakeLen)throw Error("shakeLen must be specified in options");
+f=e.shakeLen}switch(a){case "HEX":k=function(a){return O(a,f,x,e)};break;case "B64":k=function(a){return P(a,f,x,e)};break;case "BYTES":k=function(a){return Q(a,f,x)};break;case "ARRAYBUFFER":try{h=new ArrayBuffer(0)}catch(p){throw Error("ARRAYBUFFER not supported by this environment");}k=function(a){return R(a,f,x)};break;default:throw Error("format must be HEX, B64, BYTES, or ARRAYBUFFER");}m=u(d.slice(),n,g,r(l),f);for(h=1;h<t;h+=1)!0===A&&0!==f%32&&(m[m.length-1]&=16777215>>>24-f%32),m=u(m,f,
+0,B(b),f);return k(m)};this.getHMAC=function(a,c){var k,h,e,p;if(!1===I)throw Error("Cannot call getHMAC without first setting HMAC key");e=N(c);switch(a){case "HEX":k=function(a){return O(a,f,x,e)};break;case "B64":k=function(a){return P(a,f,x,e)};break;case "BYTES":k=function(a){return Q(a,f,x)};break;case "ARRAYBUFFER":try{k=new ArrayBuffer(0)}catch(v){throw Error("ARRAYBUFFER not supported by this environment");}k=function(a){return R(a,f,x)};break;default:throw Error("outputFormat must be HEX, B64, BYTES, or ARRAYBUFFER");
+}h=u(d.slice(),n,g,r(l),f);p=q(w,B(b));p=u(h,f,m,p,f);return k(p)}}function c(b,a){this.a=b;this.b=a}function O(b,a,c,g){var d="";a/=8;var n,h,e;e=-1===c?3:0;for(n=0;n<a;n+=1)h=b[n>>>2]>>>8*(e+n%4*c),d+="0123456789abcdef".charAt(h>>>4&15)+"0123456789abcdef".charAt(h&15);return g.outputUpper?d.toUpperCase():d}function P(b,a,c,g){var d="",n=a/8,h,e,p,f;f=-1===c?3:0;for(h=0;h<n;h+=3)for(e=h+1<n?b[h+1>>>2]:0,p=h+2<n?b[h+2>>>2]:0,p=(b[h>>>2]>>>8*(f+h%4*c)&255)<<16|(e>>>8*(f+(h+1)%4*c)&255)<<8|p>>>8*(f+
+(h+2)%4*c)&255,e=0;4>e;e+=1)8*h+6*e<=a?d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(p>>>6*(3-e)&63):d+=g.b64Pad;return d}function Q(b,a,c){var g="";a/=8;var d,e,h;h=-1===c?3:0;for(d=0;d<a;d+=1)e=b[d>>>2]>>>8*(h+d%4*c)&255,g+=String.fromCharCode(e);return g}function R(b,a,c){a/=8;var g,d=new ArrayBuffer(a),e;e=-1===c?3:0;for(g=0;g<a;g+=1)d[g]=b[g>>>2]>>>8*(e+g%4*c)&255;return d}function N(b){var a={outputUpper:!1,b64Pad:"=",shakeLen:-1};b=b||{};a.outputUpper=b.outputUpper||
+!1;!0===b.hasOwnProperty("b64Pad")&&(a.b64Pad=b.b64Pad);if(!0===b.hasOwnProperty("shakeLen")){if(0!==b.shakeLen%8)throw Error("shakeLen must be a multiple of 8");a.shakeLen=b.shakeLen}if("boolean"!==typeof a.outputUpper)throw Error("Invalid outputUpper formatting option");if("string"!==typeof a.b64Pad)throw Error("Invalid b64Pad formatting option");return a}function M(b,a,c){switch(a){case "UTF8":case "UTF16BE":case "UTF16LE":break;default:throw Error("encoding must be UTF8, UTF16BE, or UTF16LE");
+}switch(b){case "HEX":b=function(a,b,e){var h=a.length,l,p,f,m,q,u;if(0!==h%2)throw Error("String of HEX type must be in byte increments");b=b||[0];e=e||0;q=e>>>3;u=-1===c?3:0;for(l=0;l<h;l+=2){p=parseInt(a.substr(l,2),16);if(isNaN(p))throw Error("String of HEX type contains invalid characters");m=(l>>>1)+q;for(f=m>>>2;b.length<=f;)b.push(0);b[f]|=p<<8*(u+m%4*c)}return{value:b,binLen:4*h+e}};break;case "TEXT":b=function(b,d,e){var h,l,p=0,f,m,q,u,r,t;d=d||[0];e=e||0;q=e>>>3;if("UTF8"===a)for(t=-1===
+c?3:0,f=0;f<b.length;f+=1)for(h=b.charCodeAt(f),l=[],128>h?l.push(h):2048>h?(l.push(192|h>>>6),l.push(128|h&63)):55296>h||57344<=h?l.push(224|h>>>12,128|h>>>6&63,128|h&63):(f+=1,h=65536+((h&1023)<<10|b.charCodeAt(f)&1023),l.push(240|h>>>18,128|h>>>12&63,128|h>>>6&63,128|h&63)),m=0;m<l.length;m+=1){r=p+q;for(u=r>>>2;d.length<=u;)d.push(0);d[u]|=l[m]<<8*(t+r%4*c);p+=1}else if("UTF16BE"===a||"UTF16LE"===a)for(t=-1===c?2:0,f=0;f<b.length;f+=1){h=b.charCodeAt(f);"UTF16LE"===a&&(m=h&255,h=m<<8|h>>>8);r=
+p+q;for(u=r>>>2;d.length<=u;)d.push(0);d[u]|=h<<8*(t+r%4*c);p+=2}return{value:d,binLen:8*p+e}};break;case "B64":b=function(a,b,e){var h=0,l,p,f,m,q,u,r,t;if(-1===a.search(/^[a-zA-Z0-9=+\/]+$/))throw Error("Invalid character in base-64 string");p=a.indexOf("=");a=a.replace(/\=/g,"");if(-1!==p&&p<a.length)throw Error("Invalid '=' found in base-64 string");b=b||[0];e=e||0;u=e>>>3;t=-1===c?3:0;for(p=0;p<a.length;p+=4){q=a.substr(p,4);for(f=m=0;f<q.length;f+=1)l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(q[f]),
+m|=l<<18-6*f;for(f=0;f<q.length-1;f+=1){r=h+u;for(l=r>>>2;b.length<=l;)b.push(0);b[l]|=(m>>>16-8*f&255)<<8*(t+r%4*c);h+=1}}return{value:b,binLen:8*h+e}};break;case "BYTES":b=function(a,b,e){var h,l,p,f,m,q;b=b||[0];e=e||0;p=e>>>3;q=-1===c?3:0;for(l=0;l<a.length;l+=1)h=a.charCodeAt(l),m=l+p,f=m>>>2,b.length<=f&&b.push(0),b[f]|=h<<8*(q+m%4*c);return{value:b,binLen:8*a.length+e}};break;case "ARRAYBUFFER":try{b=new ArrayBuffer(0)}catch(g){throw Error("ARRAYBUFFER not supported by this environment");}b=
+function(a,b,e){var h,l,p,f,m;b=b||[0];e=e||0;l=e>>>3;m=-1===c?3:0;for(h=0;h<a.byteLength;h+=1)f=h+l,p=f>>>2,b.length<=p&&b.push(0),b[p]|=a[h]<<8*(m+f%4*c);return{value:b,binLen:8*a.byteLength+e}};break;default:throw Error("format must be HEX, TEXT, B64, BYTES, or ARRAYBUFFER");}return b}function y(b,a){return b<<a|b>>>32-a}function S(b,a){return 32<a?(a-=32,new c(b.b<<a|b.a>>>32-a,b.a<<a|b.b>>>32-a)):0!==a?new c(b.a<<a|b.b>>>32-a,b.b<<a|b.a>>>32-a):b}function w(b,a){return b>>>a|b<<32-a}function t(b,
+a){var k=null,k=new c(b.a,b.b);return k=32>=a?new c(k.a>>>a|k.b<<32-a&4294967295,k.b>>>a|k.a<<32-a&4294967295):new c(k.b>>>a-32|k.a<<64-a&4294967295,k.a>>>a-32|k.b<<64-a&4294967295)}function T(b,a){var k=null;return k=32>=a?new c(b.a>>>a,b.b>>>a|b.a<<32-a&4294967295):new c(0,b.a>>>a-32)}function aa(b,a,c){return b&a^~b&c}function ba(b,a,k){return new c(b.a&a.a^~b.a&k.a,b.b&a.b^~b.b&k.b)}function U(b,a,c){return b&a^b&c^a&c}function ca(b,a,k){return new c(b.a&a.a^b.a&k.a^a.a&k.a,b.b&a.b^b.b&k.b^a.b&
+k.b)}function da(b){return w(b,2)^w(b,13)^w(b,22)}function ea(b){var a=t(b,28),k=t(b,34);b=t(b,39);return new c(a.a^k.a^b.a,a.b^k.b^b.b)}function fa(b){return w(b,6)^w(b,11)^w(b,25)}function ga(b){var a=t(b,14),k=t(b,18);b=t(b,41);return new c(a.a^k.a^b.a,a.b^k.b^b.b)}function ha(b){return w(b,7)^w(b,18)^b>>>3}function ia(b){var a=t(b,1),k=t(b,8);b=T(b,7);return new c(a.a^k.a^b.a,a.b^k.b^b.b)}function ja(b){return w(b,17)^w(b,19)^b>>>10}function ka(b){var a=t(b,19),k=t(b,61);b=T(b,6);return new c(a.a^
+k.a^b.a,a.b^k.b^b.b)}function G(b,a){var c=(b&65535)+(a&65535);return((b>>>16)+(a>>>16)+(c>>>16)&65535)<<16|c&65535}function la(b,a,c,g){var d=(b&65535)+(a&65535)+(c&65535)+(g&65535);return((b>>>16)+(a>>>16)+(c>>>16)+(g>>>16)+(d>>>16)&65535)<<16|d&65535}function H(b,a,c,g,d){var e=(b&65535)+(a&65535)+(c&65535)+(g&65535)+(d&65535);return((b>>>16)+(a>>>16)+(c>>>16)+(g>>>16)+(d>>>16)+(e>>>16)&65535)<<16|e&65535}function ma(b,a){var e,g,d;e=(b.b&65535)+(a.b&65535);g=(b.b>>>16)+(a.b>>>16)+(e>>>16);d=(g&
+65535)<<16|e&65535;e=(b.a&65535)+(a.a&65535)+(g>>>16);g=(b.a>>>16)+(a.a>>>16)+(e>>>16);return new c((g&65535)<<16|e&65535,d)}function na(b,a,e,g){var d,n,h;d=(b.b&65535)+(a.b&65535)+(e.b&65535)+(g.b&65535);n=(b.b>>>16)+(a.b>>>16)+(e.b>>>16)+(g.b>>>16)+(d>>>16);h=(n&65535)<<16|d&65535;d=(b.a&65535)+(a.a&65535)+(e.a&65535)+(g.a&65535)+(n>>>16);n=(b.a>>>16)+(a.a>>>16)+(e.a>>>16)+(g.a>>>16)+(d>>>16);return new c((n&65535)<<16|d&65535,h)}function oa(b,a,e,g,d){var n,h,l;n=(b.b&65535)+(a.b&65535)+(e.b&
+65535)+(g.b&65535)+(d.b&65535);h=(b.b>>>16)+(a.b>>>16)+(e.b>>>16)+(g.b>>>16)+(d.b>>>16)+(n>>>16);l=(h&65535)<<16|n&65535;n=(b.a&65535)+(a.a&65535)+(e.a&65535)+(g.a&65535)+(d.a&65535)+(h>>>16);h=(b.a>>>16)+(a.a>>>16)+(e.a>>>16)+(g.a>>>16)+(d.a>>>16)+(n>>>16);return new c((h&65535)<<16|n&65535,l)}function z(b){var a=0,e=0,g;for(g=0;g<arguments.length;g+=1)a^=arguments[g].b,e^=arguments[g].a;return new c(e,a)}function B(b){var a=[],e;if("SHA-1"===b)a=[1732584193,4023233417,2562383102,271733878,3285377520];
+else if(0===b.lastIndexOf("SHA-",0))switch(a=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428],e=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],b){case "SHA-224":break;case "SHA-256":a=e;break;case "SHA-384":a=[new c(3418070365,a[0]),new c(1654270250,a[1]),new c(2438529370,a[2]),new c(355462360,a[3]),new c(1731405415,a[4]),new c(41048885895,a[5]),new c(3675008525,a[6]),new c(1203062813,a[7])];break;case "SHA-512":a=[new c(e[0],
+4089235720),new c(e[1],2227873595),new c(e[2],4271175723),new c(e[3],1595750129),new c(e[4],2917565137),new c(e[5],725511199),new c(e[6],4215389547),new c(e[7],327033209)];break;default:throw Error("Unknown SHA variant");}else if(0===b.lastIndexOf("SHA3-",0)||0===b.lastIndexOf("SHAKE",0))for(b=0;5>b;b+=1)a[b]=[new c(0,0),new c(0,0),new c(0,0),new c(0,0),new c(0,0)];else throw Error("No SHA variants supported");return a}function K(b,a){var c=[],e,d,n,h,l,p,f;e=a[0];d=a[1];n=a[2];h=a[3];l=a[4];for(f=
+0;80>f;f+=1)c[f]=16>f?b[f]:y(c[f-3]^c[f-8]^c[f-14]^c[f-16],1),p=20>f?H(y(e,5),d&n^~d&h,l,1518500249,c[f]):40>f?H(y(e,5),d^n^h,l,1859775393,c[f]):60>f?H(y(e,5),U(d,n,h),l,2400959708,c[f]):H(y(e,5),d^n^h,l,3395469782,c[f]),l=h,h=n,n=y(d,30),d=e,e=p;a[0]=G(e,a[0]);a[1]=G(d,a[1]);a[2]=G(n,a[2]);a[3]=G(h,a[3]);a[4]=G(l,a[4]);return a}function Z(b,a,c,e){var d;for(d=(a+65>>>9<<4)+15;b.length<=d;)b.push(0);b[a>>>5]|=128<<24-a%32;a+=c;b[d]=a&4294967295;b[d-1]=a/4294967296|0;a=b.length;for(d=0;d<a;d+=16)e=
+K(b.slice(d,d+16),e);return e}function L(b,a,k){var g,d,n,h,l,p,f,m,q,u,r,t,v,w,y,z,A,x,F,B,C,D,E=[],J;if("SHA-224"===k||"SHA-256"===k)u=64,t=1,D=Number,v=G,w=la,y=H,z=ha,A=ja,x=da,F=fa,C=U,B=aa,J=e;else if("SHA-384"===k||"SHA-512"===k)u=80,t=2,D=c,v=ma,w=na,y=oa,z=ia,A=ka,x=ea,F=ga,C=ca,B=ba,J=V;else throw Error("Unexpected error in SHA-2 implementation");k=a[0];g=a[1];d=a[2];n=a[3];h=a[4];l=a[5];p=a[6];f=a[7];for(r=0;r<u;r+=1)16>r?(q=r*t,m=b.length<=q?0:b[q],q=b.length<=q+1?0:b[q+1],E[r]=new D(m,
+q)):E[r]=w(A(E[r-2]),E[r-7],z(E[r-15]),E[r-16]),m=y(f,F(h),B(h,l,p),J[r],E[r]),q=v(x(k),C(k,g,d)),f=p,p=l,l=h,h=v(n,m),n=d,d=g,g=k,k=v(m,q);a[0]=v(k,a[0]);a[1]=v(g,a[1]);a[2]=v(d,a[2]);a[3]=v(n,a[3]);a[4]=v(h,a[4]);a[5]=v(l,a[5]);a[6]=v(p,a[6]);a[7]=v(f,a[7]);return a}function D(b,a){var e,g,d,n,h=[],l=[];if(null!==b)for(g=0;g<b.length;g+=2)a[(g>>>1)%5][(g>>>1)/5|0]=z(a[(g>>>1)%5][(g>>>1)/5|0],new c(b[g+1],b[g]));for(e=0;24>e;e+=1){n=B("SHA3-");for(g=0;5>g;g+=1)h[g]=z(a[g][0],a[g][1],a[g][2],a[g][3],
+a[g][4]);for(g=0;5>g;g+=1)l[g]=z(h[(g+4)%5],S(h[(g+1)%5],1));for(g=0;5>g;g+=1)for(d=0;5>d;d+=1)a[g][d]=z(a[g][d],l[g]);for(g=0;5>g;g+=1)for(d=0;5>d;d+=1)n[d][(2*g+3*d)%5]=S(a[g][d],W[g][d]);for(g=0;5>g;g+=1)for(d=0;5>d;d+=1)a[g][d]=z(n[g][d],new c(~n[(g+1)%5][d].a&n[(g+2)%5][d].a,~n[(g+1)%5][d].b&n[(g+2)%5][d].b));a[0][0]=z(a[0][0],X[e])}return a}var e,V,W,X;e=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,
+2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,
+2428436474,2756734187,3204031479,3329325298];V=[new c(e[0],3609767458),new c(e[1],602891725),new c(e[2],3964484399),new c(e[3],2173295548),new c(e[4],4081628472),new c(e[5],3053834265),new c(e[6],2937671579),new c(e[7],3664609560),new c(e[8],2734883394),new c(e[9],1164996542),new c(e[10],1323610764),new c(e[11],3590304994),new c(e[12],4068182383),new c(e[13],991336113),new c(e[14],633803317),new c(e[15],3479774868),new c(e[16],2666613458),new c(e[17],944711139),new c(e[18],2341262773),new c(e[19],
+2007800933),new c(e[20],1495990901),new c(e[21],1856431235),new c(e[22],3175218132),new c(e[23],2198950837),new c(e[24],3999719339),new c(e[25],766784016),new c(e[26],2566594879),new c(e[27],3203337956),new c(e[28],1034457026),new c(e[29],2466948901),new c(e[30],3758326383),new c(e[31],168717936),new c(e[32],1188179964),new c(e[33],1546045734),new c(e[34],1522805485),new c(e[35],2643833823),new c(e[36],2343527390),new c(e[37],1014477480),new c(e[38],1206759142),new c(e[39],344077627),new c(e[40],
+1290863460),new c(e[41],3158454273),new c(e[42],3505952657),new c(e[43],106217008),new c(e[44],3606008344),new c(e[45],1432725776),new c(e[46],1467031594),new c(e[47],851169720),new c(e[48],3100823752),new c(e[49],1363258195),new c(e[50],3750685593),new c(e[51],3785050280),new c(e[52],3318307427),new c(e[53],3812723403),new c(e[54],2003034995),new c(e[55],3602036899),new c(e[56],1575990012),new c(e[57],1125592928),new c(e[58],2716904306),new c(e[59],442776044),new c(e[60],593698344),new c(e[61],3733110249),
+new c(e[62],2999351573),new c(e[63],3815920427),new c(3391569614,3928383900),new c(3515267271,566280711),new c(3940187606,3454069534),new c(4118630271,4000239992),new c(116418474,1914138554),new c(174292421,2731055270),new c(289380356,3203993006),new c(460393269,320620315),new c(685471733,587496836),new c(852142971,1086792851),new c(1017036298,365543100),new c(1126000580,2618297676),new c(1288033470,3409855158),new c(1501505948,4234509866),new c(1607167915,987167468),new c(1816402316,1246189591)];
+X=[new c(0,1),new c(0,32898),new c(2147483648,32906),new c(2147483648,2147516416),new c(0,32907),new c(0,2147483649),new c(2147483648,2147516545),new c(2147483648,32777),new c(0,138),new c(0,136),new c(0,2147516425),new c(0,2147483658),new c(0,2147516555),new c(2147483648,139),new c(2147483648,32905),new c(2147483648,32771),new c(2147483648,32770),new c(2147483648,128),new c(0,32778),new c(2147483648,2147483658),new c(2147483648,2147516545),new c(2147483648,32896),new c(0,2147483649),new c(2147483648,
+2147516424)];W=[[0,36,3,41,18],[1,44,10,45,2],[62,6,43,15,61],[28,55,25,21,56],[27,20,39,8,14]];"function"===typeof define&&define.amd?define(function(){return C}):"undefined"!==typeof exports?("undefined"!==typeof module&&module.exports&&(module.exports=C),exports=C):Y.jsSHA=C})(this);

BIN
CONFVW_res/404bg.jpg


BIN
CONFVW_res/5mode.png


BIN
CONFVW_res/logo.png


BIN
CONFVW_res/nginx.png


BIN
CONFVW_res/php.png


+ 0 - 0
conf_copy/empty.html


+ 214 - 0
config.inc.sample

@@ -0,0 +1,214 @@
+<?php
+
+/**
+ * Copyright 2021, 2024 5 Mode
+ *
+ * This file is part of www-conf-viewer.
+ * 
+ * www-conf-viewer is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ * 
+ * www-conf-viewer is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.  
+ * 
+ * You should have received a copy of the GNU General Public License
+ * along with www-conf-viewer. If not, see <https://www.gnu.org/licenses/>.
+ *
+ * config.inc
+ * 
+ * www-conf-viewer configuration settings.
+ *
+ * @author Daniele Bonini <my25mb@aol.com>
+ * @copyrights (c) 2021, 2024, 5 Mode     
+ */
+
+define('DEBUG', true);
+
+define('MAX_SECURITY', true);
+
+define('APP_NAME', "www-conf-viewer");
+define('APP_TITLE', "www-conf-viewer: everyone its web config.");
+
+// password: jungle75
+// salt: 18001800
+define('APP_HASH', "");
+define('APP_SALT', "");
+
+define('APP_HOST', "conf-viewer.yoursite.com");
+define('APP_PATH', "/var/www/www-conf-viewer");
+define('APP_NGINX_CONF_PATH' , "/etc/nginx/nginx.conf"); 
+define('APP_NGINX_SERVER_CONF_PATH', "/etc/nginx/conf.d/yoursite.com.conf");
+define('APP_PHPFPM_CONF_PATH' , "/etc/php-fpm.conf"); 
+define('APP_EXAMPLE_PATH' , "/var/www/www-conf-viewer/CONFVW_examples"); 
+define('APP_LICENSE', <<<LICENSETEXT
+Copyright (c) 2016, 2024, 5 Mode
+All rights reserved.
+
+This file is part of www-conf-viewer.
+
+www-conf-viewer is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+www-conf-viewer is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.  
+
+You should have received a copy of the GNU General Public License
+along with www-conf-viewer. If not, see <https://www.gnu.org/licenses/>.
+
+https://opensource.org/licenses/GPL-3.0
+LICENSETEXT
+);
+// Default Locale, in two letters format
+define('APP_DEF_LANG', "en-US");
+
+
+$CONFIG = [
+
+   'DEBUG' => true,
+ 
+   'MAX_SECURITY' => true, 
+    
+   'APP' => [
+      'NAME' => "www-conf-viewer",
+      'TITLE' => "www-conf-viewer: everyone its web config.",
+      // password: jungle75
+      // salt: 18001800
+      'HASH' => "",
+      'SALT' => "",        
+      'HOST' => "conf-viewer.yoursite.com", 
+      'PATH' => "/var/www/www-conf-viewer",
+      'NGINX_CONF_PATH' => "/etc/nginx/nginx.conf",
+      'NGINX_SERVER_CONF_PATH' => "/etc/nginx/conf.d/yoursite.com.conf",       
+      'PHPFPM_CONF_PATH' => "/etc/php-fpm.conf", 
+      'EXAMPLE_PATH' => "/var/www/www-conf-viewer/CONFVW_examples", 
+      'LICENSE' => <<<LICENSETEXT
+Copyright (c) 2016, 2024, 5 Mode
+All rights reserved.
+
+This file is part of www-conf-viewer.
+
+www-conf-viewer is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+www-conf-viewer is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.  
+
+You should have received a copy of the GNU General Public License
+along with www-conf-viewer. If not, see <https://www.gnu.org/licenses/>.
+
+https://opensource.org/licenses/GPL-3.0 
+LICENSETEXT
+             ,
+      'DEF_LANG' => "en-US"
+      ]
+    
+    ];  
+
+$LOCALE = [
+
+  'it-IT' => [
+    
+    '/home.php' => [        
+      'ping' => "pong",
+      'How-to: Manage your avatars in Avatar Free' => "How-to: Gestire i tuoi avatar in Avatar Free",  
+      'CV' => "CV",  
+      'Sample' => "Esempio",   
+      'My Network' => "Network",
+      'Hello from 5 Mode' => "Ciao da 5 Mode",  
+      'This is just an example of blog entry' => "Questo e' giusto un esempio di post nel blog",  
+      'Go' => "Vai",  
+      'Hash Me' => "Codificami",  
+      'Some rights reserved' => "Alcuni diritti riservati"  
+         ],
+     
+    '/js/home-js.php' => [
+      'ping' => "pong",
+      'Please set your hash in the config file with this value' => "Puoi impostare il tuo hash nel file config con questo valore"   
+         ]  
+      
+      ],
+
+  'zh-CN' => [
+    
+    '/home.php' => [        
+      'ping' => "pong",
+      'How-to: Manage your avatars in Avatar Free' => "HOW-TO: 免费管理您的化身",    
+      'CV' => "简历",  
+      'Sample' => "样本",  
+      'My Network' => "我的网络",  
+      'Hello from 5 Mode' => "您好5 MODE",  
+      'This is just an example of blog entry' => "这只是博客条目的一个例子",    
+      'Go' => "去",  
+      'Hash Me' => "哈希我",  
+      'Some rights reserved' => "保留一些权利"  
+         ],
+     
+    '/js/home-js.php' => [
+      'ping' => "pong",
+      'Please set your hash in the config file with this value' => "请在配置文件中设置您的哈希"     
+         ]  
+      
+      ]
+    
+  ];
+
+
+$NGINX_DIRECTIVES = [
+    'access_log' => "Sets the path, format, and configuration for a buffered log",
+    'accept_mutex' => "When enabled worker processes will accept new connections by turn.",
+    'aio' => "Enables or disables the use of asynchronous file I/O",
+    'client_body_timeout' => "Defines a timeout for reading client request body.",
+    'client_header_timeout' => "Defines a timeout for reading client request header.",
+    'default_type' => "Defines the default MIME type of a response.",
+    'directio' => "Enables the use of the O_DIRECT flag (FreeBSD, Linux), the F_NOCACHE flag (macOS), or the directio() function (Solaris), when reading files that are larger than or equal to the specified size.",
+    'error_log' => "Configures logging",
+    'events' => "Defines the configuration file context for the directives that affect connection processing.",
+    'gzip' => "Enables or disables compression of responses.",
+    'gzip_comp_level' => "Sets a gzip compression level of a response (1-9).",
+    'gzip_min_length' => "Sets the minimum length of a response that will be compressed.",
+    'gzip_types' => "Enables compression of responses for the specified MIME types",
+    'include' => "Includes another file, or files matching the specified mask",
+    'index' => "Defines files that will be used as an index.",
+    'keepalive_disable' => "Disables keep-alive connections with misbehaving browsers",
+    'keepalive_requests' => "Sets the maximum number of requests that can be served through one keep-alive connection. ",
+    'keepalive_timeout' => "Sets a timeout during which a keep-alive client connection will stay open on the server side. A zero value disables keep-alive client connections.",
+    'limit_conn' => "Sets the shared memory zone and the maximum allowed number of connections for a given key value.",
+    'limit_conn_zone' => "Sets parameters for a shared memory zone that will keep states for various keys",
+    'log_format' => "Specifies the log format.",
+    'open_file_cache' => "Configures a cache",
+    'open_file_cache_errors' => "Enables or disables caching of file lookup errors",
+    'open_file_cache_min_uses' => "Sets the minimum number of file accesses during the period configured",
+    'open_file_cache_valid' => "Sets a time after which open_file_cache elements should be validated.",
+    'output_buffers' => "Sets the number and size of the buffers used for reading a response from a disk.",
+    'pid' => "Defines a file that will store the process ID of the main process.",
+    'proxy_cache_methods' => "Cached requested methods",
+    'proxy_cache_path' => "Sets the path and other parameters of a cache. Cache data are stored in files",
+    'proxy_cache_valid' => "Sets caching time for different response codes",
+    'proxy_temp_path' => "Defines a directory for storing temporary files with data received from proxied servers.",
+    'reset_timedout_connection' => "Enables or disables resetting timed out connections and connections closed.",
+    'sendfile' => "Enables or disables the use of sendfile().",
+    'sendfile_max_chunk' => "Limits the amount of data that can be transferred in a single sendfile() call. Without the limit, one fast connection may seize the worker process entirely.",
+    'send_timeout' => "Send timeout set only between two successive write operations, not for the transmission of the whole response.",
+    'server_tokens' => "Enables or disables emitting nginx version on error pages and in the 'server' response header field.",
+    'tcp_nodelay' => "Enables or disables the use of the TCP_NODELAY option",
+    'tcp_nopush' => "Enables or disables the use of the TCP_NOPUSH socket option on FreeBSD or the TCP_CORK socket option on Linux.",
+    'types_hash_max_size' => "Sets the maximum size of the types hash tables.",
+    'client_max_body_size' => "Sets the maximum allowed size of the client request body.",
+    'use' => "Specifies the connection processing method to use.",
+    'user' => "Defines user and group credentials used by worker processes.",  
+    'worker_connections' => "Defines the maximum number of simultaneous connections that can be opened by a worker process.",
+    'worker_processes' => "Defines the number of worker processes. When one is in doubt, setting it to the number of available CPU cores would be a good start (the value “auto” will try to autodetect it).",
+    'worker_rlimit_nofile' => "Defines the limit of the maximum number of open files for worker process. "
+  ];

BIN
favicon.ico


+ 477 - 0
index.php

@@ -0,0 +1,477 @@
+<?php
+
+/**
+ * Copyright 2021, 2024 5 Mode
+ *
+ * This file is part of www-conf-viewer.
+ *
+ * www-conf-viewer is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * www-conf-viewer is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.  
+ * 
+ * You should have received a copy of the GNU General Public License
+ * along with www-conf-viewer. If not, see <https://www.gnu.org/licenses/>.
+ *
+ * home.php
+ * 
+ * www-conf-viewer home page.
+ *
+ * @author Daniele Bonini <my25mb@aol.com>
+ * @copyrights (c) 2016, 2024, 5 Mode
+ */
+
+ // CONFIGURATION
+ error_reporting(E_ALL | E_STRICT);  
+ ini_set('display_startup_errors',1);  
+ ini_set('display_errors',1);
+ ini_set('log_errors',1); 
+
+ require "config.inc";
+ define('PHP_BR', "<br>");
+ define('PHP_SPACE', " "); 
+ define('PHP_STR', "");
+ 
+ define("FUNCTIONS_PATH", APP_PATH . DIRECTORY_SEPARATOR . "CONFVW_func");
+
+ require FUNCTIONS_PATH . DIRECTORY_SEPARATOR . "func.string.inc";
+ require FUNCTIONS_PATH . DIRECTORY_SEPARATOR . "func.various.inc";
+
+ $password = filter_input(INPUT_POST, "Password");
+ if ($password !== PHP_STR) {	
+   $hash = hash("sha256", $password . APP_SALT, false);
+
+   if ($hash !== APP_HASH) {
+     $password=PHP_STR;	
+   }	 
+ } 
+ 
+ if ($password == PHP_STR) {
+   $NGINX_CONF_PATH = APP_EXAMPLE_PATH . DIRECTORY_SEPARATOR . "nginx.conf";
+   $NGINX_SERVER_CONF_PATH = APP_EXAMPLE_PATH . DIRECTORY_SEPARATOR . "site.com.conf";
+   $PHPFPM_CONF_PATH = APP_EXAMPLE_PATH . DIRECTORY_SEPARATOR . "php-fpm.conf";
+ } else {  
+   $NGINX_CONF_PATH = APP_NGINX_CONF_PATH;
+   $NGINX_SERVER_CONF_PATH = APP_NGINX_SERVER_CONF_PATH;
+   $PHPFPM_CONF_PATH = APP_PHPFPM_CONF_PATH;
+ }
+ 
+ //echo("NGINX_CONF_PATH=$NGINX_CONF_PATH<br>");
+ //echo("NGINX_SERVER_CONF_PATH=$NGINX_SERVER_CONF_PATH<br>");
+ //echo("PHPFPM_CONF_PATH=$PHPFPM_CONF_PATH<br>");
+ 
+ ?>
+
+<!DOCTYPE html>
+<html lang="en-US" xmlns="http://www.w3.org/1999/xhtml">
+<head>
+
+  <meta name="viewport" content="width=device-width, initial-scale=1"/>
+   
+<!--<?PHP echo(APP_LICENSE);?>-->  
+  
+  <title><?PHP echo(APP_TITLE);?></title>
+
+  <link rel="shortcut icon" href="/favicon.ico" />
+
+  <meta name="description" content="Welcome to www-conf-viewer! Everyone its web config."/>
+  <meta name="keywords" content="www-conf-viewer,web,configuration,viewer,on,premise,solution"/>
+  <meta name="robots" content="index,follow"/>
+  <meta name="author" content="5 Mode"/>
+  
+  <script src="/CONFVW_js/jquery-3.6.0.min.js" type="text/javascript"></script>
+  <script src="/CONFVW_js/sha.js" type="text/javascript"></script>
+  <script src="/CONFVW_js/common.js" type="text/javascript"></script>  
+    
+  <link href="/CONFVW_css/style.css?r=<?PHP echo(time());?>" type="text/css" rel="stylesheet">
+  
+</head>
+
+  <body style="background:#dadada no-repeat; background-size: cover; background-attachment: fixed; background-position: center;">
+
+  <div class="header" style="margin-top:18px;margin-bottom:18px;">
+        <a href="http://www-conf-viewer.5mode-lab.com" target="_self" style="color:#000000; text-decoration: none;">&nbsp;<img src="/CONFVW_res/logo.png" align="middle" style="position:relative;top:-5px;width:22px;">&nbsp;www-conf-viewer</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="https://github.com/par7133/www-conf-viewer" style="color:#000000;"><span style="color:#119fe2">on</span> github</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="mailto:my25mb@aol.com" style="color:#000000;"><span style="color:#119fe2">for</span> feedback</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="tel:+39-331-4029415" style="font-size:13px;background-color:lightcyan;border:2px solid lightcyan;color:#000000;height:27px;text-decoration:none;">&nbsp;&nbsp;get support&nbsp;&nbsp;</a>
+   </div>
+  
+   <form id="frmUpload" role="form" method="post" action="/" target="_self" enctype="multipart/form-data">  
+   
+  <?PHP if (!MAX_SECURITY || (MAX_SECURITY && ($password != PHP_STR))) :?>
+     
+   <table style="width:100%">
+      <tr>
+         <td colspan="3" style="width:100%;padding:10px;padding-bottom:7px;">
+               <div style="float:left;font-weight:900;font-size:12px;">NGINX (Core configuration)</div>
+               <div style="float:right"><img src="/CONFVW_res/nginx.png" style="width:48px;" slt="Nginx logo"></div>
+         </td>
+      </tr>  
+     
+        <?PHP
+     $aNginxConf = file($NGINX_CONF_PATH, FILE_SKIP_EMPTY_LINES);                
+     if (!empty($aNginxConf)) {
+       
+       $nested = false;
+       foreach($aNginxConf as $line) {
+         $line = trim($line, " \n\r\t\v\x00"); 
+         $line = trim($line, "\x00..\x1F");
+         
+         if (((mb_strlen($line) < 4) && ($line!="}")) || (left($line,1)=="#")) { 
+           continue;           
+         }
+         
+         $directive = explode(PHP_SPACE, $line)[0]??null;
+         
+         if (isset($directive) && strtolower(left($directive,4)=="http")) {
+           break;
+         }
+         
+         if (right($line,1)=="{") { ?>
+     
+                             <tr>
+                                 <td class="td-caption" colspan="2">
+                                      <?PHP echo($directive); ?><br>
+                                      <span id="directive-desc2">
+                                          <?PHP echo($NGINX_DIRECTIVES[$directive]??PHP_STR);?>
+                                      </span>
+                                 </td>
+                                 <td class="td-full-opts">
+                                       &nbsp;
+                                  </td> 
+                              </tr>   
+                                 
+     <?PHP    $nested = true;
+           continue;
+         }
+
+         if ($directive=="}") {
+           $nested = false;
+           continue;
+         }
+         
+         if (isset($directive) && (left($directive,1)!="#") && ($directive!="}")) {
+           
+           $fullopts = substr($line, mb_strlen($directive)+1); 
+           $fullopts = rtrim($fullopts,";") ?? PHP_STR;
+           
+           ?>
+     
+                              <tr>
+                                  <?PHP if ($nested): ?>
+                                  <!--<td class="td-tab">
+                   &nbsp;
+                 </td> -->
+                                 <td class="td-caption2" colspan="2">
+                                  <?PHP else: ?> 
+                                   <td class="td-caption" colspan="2">
+                                  <?PHP endif; ?>
+                                     <span id="directive"><?PHP echo($directive); ?></span><br>
+                                     <span id="directive-desc">
+                                    <?PHP echo($NGINX_DIRECTIVES[$directive]??PHP_STR);?>
+                                     </span>
+                                  </td> 
+                                 <td class="td-full-opts">
+                                         <?PHP echo($fullopts); ?>
+                                  </td> 
+                              </tr>   
+       <?PHP 
+         }         
+       } 
+     }  
+   ?>
+     
+      <tr>
+         <td colspan="3" style="width:100%;padding:8px;padding-top:12px;border-top: 1px dotted gray;">
+               <div style="float:left;font-weight:900;font-size:12px;">This is www-conf-viewer, a 5 Mode software.<br>Copyright 2021, 2024 5 Mode - GPL License<br>Authors: Daniele Bonini</div>
+               <div style="float:right"><a href="https://5mode.com"><img src="/CONFVW_res/5mode.png" style="width:48px;" alt="5 Mode"></a>&nbsp;&nbsp;&nbsp;</div>
+         </td>
+      </tr>  
+     
+  </table>   
+ 
+ <br><br>    
+      
+ <table style="width:100%">
+      <tr>
+         <td colspan="3" style="width:100%;padding:10px;padding-bottom:7px;">
+               <div style="float:left;font-weight:900;font-size:12px;">NGINX (HTTP configuration)</div>
+               <div style="float:right"><img src="/CONFVW_res/nginx.png" style="width:48px;" slt="Nginx logo"></div>
+         </td>
+      </tr>  
+     
+        <?PHP
+     //$aNginxConf = file($NGINX_CONF_PATH, FILE_SKIP_EMPTY_LINES);                
+     if (!empty($aNginxConf)) {
+       
+       $found_http = false;
+       $line_buff = "";
+       $nested = false;
+       foreach($aNginxConf as $line) {
+         $line = trim($line, " \n\r\t\v\x00"); 
+         $line = trim($line, "\x00..\x1F");
+         
+         if (((mb_strlen($line) < 4) && ($line!="}")) || (left($line,1)=="#")) { 
+           continue;           
+         }
+         
+         $directive = explode(PHP_SPACE, $line)[0]??null;
+         
+         // searching the initial token 'http'..
+         if (isset($directive) && (strtolower($directive)!="http")) {
+           if (!$found_http) {
+             continue;
+           }  
+         } else {
+           $found_http = true;
+           continue;
+         }
+
+         // exiting on the server token.. 
+         if (isset($directive) && (strtolower($directive)=="map")) {
+           break;
+         }        
+         
+         // exiting on the server token.. 
+         if (isset($directive) && (strtolower($directive)=="server")) {
+           break;
+         }
+
+         //echo("<tr><td>$directive (debug)</td><td>$line</td></tr>");
+         
+         if (right($line,1)!=";") {
+           $line_buff .= $line . "|||||";
+           continue;
+         } else {
+           if ($line_buff!=PHP_STR) {
+             $line_buff .= $line . "|||||";
+             $directive = explode(PHP_SPACE, $line_buff)[0]??null;
+           }
+         }
+         
+         if (right($line,1)=="{" || ($line_buff!=PHP_STR && !$nested)) { ?>
+     
+                             <tr>
+                                 <td class="td-caption" colspan="2">
+                                      <?PHP echo($directive); ?><br>
+                                      <span id="directive-desc2">
+                                          <?PHP echo($NGINX_DIRECTIVES[$directive]??PHP_STR);?>
+                                      </span>
+                                 </td>
+                                 <td class="td-full-opts">
+                                       &nbsp;
+                                  </td> 
+                              </tr>   
+                                 
+     <?PHP    $nested = true;
+     
+           if ($line_buff==PHP_STR) {
+             continue;
+           }  
+         }
+         
+         if ($line_buff!=PHP_STR && $nested) {
+           
+           $ipos = stripos($line_buff, PHP_SPACE);
+           $s = substr($line_buff,$ipos+1);
+           
+           $buffLines = explode("|||||", $s);
+           
+           foreach($buffLines as $buffLine) { 
+             
+             if ($buffLine==PHP_STR) {
+               continue;
+             }
+?>
+                                         <tr>
+                                         <td class="td-caption2" colspan="2">
+                                             <span id="directive">&nbsp;</span>
+                                          </td> 
+                                         <td class="td-full-opts">
+                                                 <?PHP echo(trim($buffLine,";")); ?>
+                                          </td> 
+                                      </tr>   
+<?PHP
+          }
+          
+          $nested = false;
+          $line_buff = PHP_STR;           
+          
+         } else {
+
+            if ($directive=="}") {
+              $nested = false;
+              continue;
+            }
+
+            if (isset($directive) && (left($directive,1)!="#") && ($directive!="}")) {
+
+              $fullopts = substr($line, mb_strlen($directive)+1); 
+              $fullopts = rtrim($fullopts,";") ?? PHP_STR;
+
+              ?>
+
+                                      <tr>
+                                          <?PHP if ($nested): ?>
+                                         <td class="td-caption2" colspan="2">
+                                          <?PHP else: ?> 
+                                           <td class="td-caption" colspan="2">
+                                          <?PHP endif; ?>
+                                             <span id="directive"><?PHP echo($directive); ?></span><br>
+                                             <span id="directive-desc">
+                                            <?PHP echo($NGINX_DIRECTIVES[$directive]??PHP_STR);?>
+                                             </span>
+                                          </td> 
+                                         <td class="td-full-opts">
+                                                 <?PHP echo($fullopts); ?>
+                                          </td> 
+                                      </tr>   
+            <?PHP               
+            }
+         } 
+       } 
+     }  
+   ?>
+     
+      <tr>
+         <td colspan="3" style="width:100%;padding:8px;padding-top:12px;border-top: 1px dotted gray;">
+               <div style="float:left;font-weight:900;font-size:12px;">This is www-conf-viewer, a 5 Mode software.<br>Copyright 2021, 2024 5 Mode - GPL License<br>Authors: Daniele Bonini</div>
+               <div style="float:right"><a href="https://5mode.com"><img src="/CONFVW_res/5mode.png" style="width:48px;" alt="5 Mode"></a>&nbsp;&nbsp;&nbsp;</div>
+         </td>
+      </tr>  
+     
+  </table>       
+ 
+  <br><br>   
+     
+   <table style="width:100%">
+      <tr>
+         <td colspan="3" style="width:100%;padding:10px;padding-bottom:7px;">
+               <div style="float:left;font-weight:900;font-size:12px;">NGINX (SERVER configuration)</div>
+               <div style="float:right"><img src="/CONFVW_res/nginx.png" style="width:48px;" slt="Nginx logo"></div>
+         </td>
+      </tr>     
+     
+     <?PHP
+    $serverConf = file($NGINX_SERVER_CONF_PATH);
+  ?>   
+     
+    <tr>
+        <td class="td-server-spec" style="white-space:pre;">
+<?PHP
+  $blank_lines = 0;
+  foreach($serverConf as $line) {
+    $sample = left($line,10);
+    $sample = ltrim($sample);
+    
+    if ((mb_strlen(trim($line))<3) && (trim($line)!="}")) {
+      $blank_lines++;
+      continue;
+    }
+    
+    if (left($sample, 1) != "#") {
+      if ($blank_lines>0) {
+        echo("\n");
+      }
+      echo(HTMLencode($line, true));
+      $blank_lines = 0;
+    }  
+  }
+?>
+        </td>
+     </tr>   
+
+      <tr>
+         <td colspan="3" style="width:100%;padding:8px;padding-top:12px;border-top: 1px dotted gray;">
+               <div style="float:left;font-weight:900;font-size:12px;">This is www-conf-viewer, a 5 Mode software.<br>Copyright 2021, 2024 5 Mode - GPL License<br>Authors: Daniele Bonini</div>
+               <div style="float:right"><a href="https://5mode.com"><img src="/CONFVW_res/5mode.png" style="width:48px;" alt="5 Mode"></a>&nbsp;&nbsp;&nbsp;</div>
+         </td>
+      </tr>  
+     
+  </table> 
+     
+  <br><br>      
+
+   <table style="width:100%">
+      <tr>
+         <td colspan="3" style="width:100%;padding:10px;padding-bottom:7px;">
+               <div style="float:left;font-weight:900;font-size:12px;">PHPFPM</div>
+               <div style="float:right"><img src="/CONFVW_res/php.png" style="width:48px;" slt="Nginx logo"></div>
+         </td>
+      </tr>     
+     
+     <?PHP
+    if ($PHPFPM_CONF_PATH != PHP_STR) {  
+      $serverConf = file($PHPFPM_CONF_PATH);
+    } else {
+      $serverConf = [PHP_STR];
+    }  
+  ?>   
+     
+    <tr>
+        <td class="td-server-spec-php" style="white-space:pre;">
+<?PHP
+  $blank_lines = 0;
+  foreach($serverConf as $line) {
+    $sample = left($line,10);
+    $sample = ltrim($sample);
+    
+    if ((mb_strlen(trim($line))<3) && (trim($line)!="}")) {
+      $blank_lines++;
+      continue;
+    }
+    
+    if (left($sample, 1) != "#") {
+      if ($blank_lines>0) {
+        echo("\n");
+      }
+      echo(HTMLencode($line, true));
+      $blank_lines = 0;
+    }  
+  }
+?>
+        </td>
+     </tr>   
+
+      <tr>
+         <td colspan="3" style="width:100%;padding:8px;padding-top:12px;border-top: 1px dotted gray;">
+               <div style="float:left;font-weight:900;font-size:12px;">This is www-conf-viewer, a 5 Mode software.<br>Copyright 2021, 2024 5 Mode - GPL License<br>Authors: Daniele Bonini</div>
+               <div style="float:right"><a href="https://5mode.com"><img src="/CONFVW_res/5mode.png" style="width:48px;" alt="5 Mode"></a>&nbsp;&nbsp;&nbsp;</div>
+         </td>
+      </tr>  
+     
+  </table> 
+ 
+ <?PHP else: 
+      
+    echo("<div style='width:250px;padding-top:250px;font-weight:400;margin:auto;text-align:center;'>Login required.</div>"); 
+      
+  endif; ?>     
+      
+  <br><br>       
+      
+  <div id="passworddisplay">
+       <br>  
+        &nbsp;&nbsp;<input type="password" id="Password" name="Password" placeholder="password" value="<?php echo($password);?>" autocomplete="off">&nbsp;<input type="submit" value="Go" style="text-align:left;width:25%;color:#000000;"><br>
+        &nbsp;&nbsp;<input type="text" id="Salt" placeholder="salt" autocomplete="off"><br>
+        <div style="text-align:center;">
+           <a id="hashMe" href="#" onclick="showEncodedPassword();">Hash Me!</a>
+        </div>
+ </div> 
+
+ </form>       
+     
+  <div id="footerCont">&nbsp;</div>
+  <div id="footer"><span style="background:#FFFFFF; opacity:0.7;">&nbsp;&nbsp;A <a href="http://5mode.com" class="aaa">5 Mode</a> project and <a href="http://demo.5mode.com" class="aaa">WYSIWYG</a> system. Some rights reserved.</span></div>
+  
+ <script src="/CONFVW_js/home.js" type="text/javascript"></script>
+
+<!-- METRICS CODE -->
+<?php if (file_exists(APP_PATH . DIRECTORY_SEPARATOR . "metrics.html")): ?>
+<?php include(APP_PATH . DIRECTORY_SEPARATOR . "metrics.html"); ?> 
+<?php endif; ?>
+    
+  </body>
+  </html>

Энэ ялгаанд хэт олон файл өөрчлөгдсөн тул зарим файлыг харуулаагүй болно