diff --git a/images/favicon-cockpit.png b/images/favicon-cockpit.png new file mode 100644 index 0000000..28f0f27 Binary files /dev/null and b/images/favicon-cockpit.png differ diff --git a/images/favicon_emby.png b/images/favicon_emby.png new file mode 100644 index 0000000..4815a92 Binary files /dev/null and b/images/favicon_emby.png differ diff --git a/images/favicon_guacamole.png b/images/favicon_guacamole.png new file mode 100644 index 0000000..99aaf3e Binary files /dev/null and b/images/favicon_guacamole.png differ diff --git a/images/favicon_omv.png b/images/favicon_omv.png new file mode 100644 index 0000000..69f2cce Binary files /dev/null and b/images/favicon_omv.png differ diff --git a/images/favicon_proxmox.png b/images/favicon_proxmox.png new file mode 100644 index 0000000..7a01d37 Binary files /dev/null and b/images/favicon_proxmox.png differ diff --git a/images/favicon_roundcube.svg b/images/favicon_roundcube.svg new file mode 100644 index 0000000..e3ee3fe --- /dev/null +++ b/images/favicon_roundcube.svg @@ -0,0 +1,11 @@ + + + + + + + + + diff --git a/images/qbittorrent-tray.svg b/images/qbittorrent-tray.svg new file mode 100644 index 0000000..7bbcf9b --- /dev/null +++ b/images/qbittorrent-tray.svg @@ -0,0 +1,16 @@ + + + qbittorrent-new-light + + + + + + + + + + + + + diff --git a/images/qbittorrent32.png b/images/qbittorrent32.png new file mode 100644 index 0000000..e3e2c32 Binary files /dev/null and b/images/qbittorrent32.png differ diff --git a/index.php b/index.php index a6fc415..402260c 100644 --- a/index.php +++ b/index.php @@ -6,39 +6,72 @@ ini_set('display_startup_errors', TRUE); $domaines = array( array( - 'id' => 'ORION', - 'protocol' => 'https', - 'proxy' => 'orion.netdldata.net/', - 'name' => 'orion.lan', - 'port' => 5001 + 'name' => 'Local Transfer', + 'url' => '/transfer/', + 'img' => 'favicon_transfer.png' ), array( - 'id' => 'Nextcloud', - 'protocol' => 'http', - 'proxy' => 'cloud.netdldata.net/', - 'name' => 'nextcloud.lan', - 'port' => 80 + 'name' => 'Emby', + 'url' => 'https://emby.netdldata.net/', + 'real' => 'emby.lan', + 'port' => 8096, + 'img' => 'favicon_emby.png' ), array( - 'id' => 'Gitea', - 'protocol' => 'http', - 'proxy' => 'git.netdldata.net', - 'name' => '192.168.110.1', - 'port' => 3000 + 'name' => 'Nextcloud', + 'url' => 'https://cloud.netdldata.net/', + 'real' => 'nextcloud.lan', + 'port' => 443, + 'img' => 'favicon_Nextcloud.svg' ), array( - 'id' => 'Transmission', - 'protocol' => 'http', - 'proxy' => 'torrent.netdldata.net', - 'name' => '192.168.110.1', - 'port' => 9091 + 'name' => 'Orion', + 'url' => 'https://orion.netdldata.net/', + 'real' => 'orion.lan', + 'port' => 80, + 'img' => 'favicon_omv.png' ), array( - 'id' => 'Webmin', - 'protocol' => 'https', - 'proxy' => 'webmin.netdldata.net', - 'name' => '192.168.110.53', - 'port' => 10000 + 'name' => 'Gitea', + 'url' => 'https://git.netdldata.net', + 'real' => 'git.lan', + 'port' => 3000, + 'img' => 'favicon-gitea.png' + ), + array( + 'name' => 'qBittorrent', + 'url' => 'https://torrent.netdldata.net', + 'real' => 'torrent.lan', + 'port' => 8080, + 'img' => 'qbittorrent-tray.svg' + ), + array( + 'name' => 'Webmin', + 'url' => 'https://webmin.netdldata.net', + 'real' => '192.168.110.74', + 'port' => 10000, + 'img' => 'favicon_webmin.png' + ), + array( + 'name' => 'Proxmox', + 'url' => 'https://proxmox.netdldata.net', + 'real' => 'proxmox.lan', + 'port' => 8006, + 'img' => 'favicon_proxmox.png' + ), + array( + 'name' => 'Guacamole', + 'url' => 'https://guacamole.netdldata.net', + 'real' => 'guacamole.lan', + 'port' => 8080, + 'img' => 'favicon_guacamole.png' + ), + array( + 'name' => 'Mail', + 'url' => 'https://mail.netdldata.net', + 'real' => 'mail.lan', + 'port' => 80, + 'img' => 'favicon_roundcube.svg' ), ); if (isset($_COOKIE['socket'])) { @@ -46,14 +79,16 @@ if (isset($_COOKIE['socket'])) { } else { for ($i = 0; $i < sizeof($domaines); $i ++) { - $domaines[$i]['host'] = gethostbyname($domaines[$i]['name']); - $fp = @fsockopen($domaines[$i]['name'], $domaines[$i]['port'], $errno, $errstr, 0.1); - if ($fp) { - $domaines[$i]['running'] = true; - } - else { - $domaines[$i]['running'] = false; + if(array_key_exists('real', $domaines[$i])){ + #$domaines[$i]['host'] = gethostbyname($domaines[$i]['real']); + $fp = @fsockopen($domaines[$i]['real'], $domaines[$i]['port'], $errno, $errstr, 0.1); + if ($fp) { + $domaines[$i]['running'] = true; + } + else { + $domaines[$i]['running'] = false; + } } } } @@ -61,8 +96,6 @@ $cookie = serialize($domaines); $temps = 60*60*2; //2 heures setcookie ("socket", $cookie, time() + $temps); -$browser = get_browser(null, true); - ?> - + NetDLData @@ -91,73 +120,18 @@ $browser = get_browser(null, true); -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -Télécharger le Certificat SSL NetDLData +

".$_SERVER['HTTP_USER_AGENT']; -echo "

You use navigator ".$browser["browser"]; -echo "
By ".$browser["browser_maker"]; -echo "
In Version ".$browser["version"]; -echo "
On system ".$browser["platform"]; -echo "
Your IP is ".$_SERVER['REMOTE_ADDR']; +#$browser = get_browser(null, true); +#echo "

You use navigator ".$browser["browser"]; +#echo "
By ".$browser["browser_maker"]; +#echo "
In Version ".$browser["version"]; +#echo "
On system ".$browser["platform"]; +#echo "
Your IP is ".$_SERVER['REMOTE_ADDR']; ?> @@ -167,32 +141,32 @@ var servers = ; console.log(servers); -var host = document.location.hostname; -var domaine; - -if(host.includes("netdldata")) { - domaine = "LOCAL_NAME"; -} -if(host.includes("192.168.110.")) { - domaine = "LOCAL_IP"; -} -if(host.includes("192.168.1.")) { - domaine = "LIVEBOX_IP"; -} -if(host.includes("liolo70.ddns.net")) { - domaine = "INTERNET"; -} - -console.log(domaine); +var orientation_etat = true; for (var key in servers) { + orientation_etat = !orientation_etat; var server = servers[key]; - var button = document.getElementById(server.id); - if (server.running) { - button.disabled = false; - button.className += " allumer"; + var div = $('
', { + class: 'button ' + orientation(orientation_etat) + }); + var button = $('