From ccfeba6a0b7cb8f37dec30381112bac5dd4f1bce Mon Sep 17 00:00:00 2001 From: romain coquery Date: Tue, 17 Apr 2018 17:02:02 +0200 Subject: [PATCH 1/9] add .gitignore --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..4c0c12a --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +/.idea/ + From 7f7449eb480103faffaf542552e7bcf5b4403074 Mon Sep 17 00:00:00 2001 From: romain coquery Date: Tue, 17 Apr 2018 23:37:59 +0200 Subject: [PATCH 2/9] arbo ok --- assets/custom.css | 15 ++++++++++++++ index.php | 51 ++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 65 insertions(+), 1 deletion(-) diff --git a/assets/custom.css b/assets/custom.css index 8b58628..47b518c 100644 --- a/assets/custom.css +++ b/assets/custom.css @@ -19,4 +19,19 @@ strong{ .navbar-brand{ height: auto; +} + +.niv1 { + /*margin-left: 10px;*/ + color: #2a9fd6; +} + +.niv2 { + /*margin-left: 20px;*/ + color: #9933cc; +} + +.niv3 { + /*margin-left: 30px;*/ + color: #a85a00; } \ No newline at end of file diff --git a/index.php b/index.php index c53783a..febc041 100644 --- a/index.php +++ b/index.php @@ -1,5 +1,54 @@ - C'est ici que tu vas devoir afficher le contenu de tes repertoires et fichiers. +
+ $value) { + + if (!in_array($value,array(".",".."))) { + + if (is_dir($dir . DIRECTORY_SEPARATOR . $value)) { + $result[$value] = searchFiles($dir . DIRECTORY_SEPARATOR . $value); + } else { + $result[] = $value; + } + } + } + return $result; + } + + function afficher_tablo($tableau, $i = -1) { + $i++; + foreach ($tableau as $key => $value) { + $txt ='|'; + for ($j=1; $j<=$i; $j++) { + $txt .='-'; + } + $txt .=' '; + + if (is_array($value)) { + + echo '
' . $txt . $key . '
'; + + afficher_tablo($value, $i); + + } else { + echo '
' . $txt . $value . '
'; + } + } + } + + ?> + +
+ \ No newline at end of file From 01115887ec1bb9e70acbb7cd65484a9fe18b8c75 Mon Sep 17 00:00:00 2001 From: romain coquery Date: Wed, 18 Apr 2018 00:33:59 +0200 Subject: [PATCH 3/9] suppr files and folder --- assets/custom.css | 2 +- index.php | 39 ++++++++++++++++++++++++++++++++++----- 2 files changed, 35 insertions(+), 6 deletions(-) diff --git a/assets/custom.css b/assets/custom.css index 47b518c..fa9814a 100644 --- a/assets/custom.css +++ b/assets/custom.css @@ -34,4 +34,4 @@ strong{ .niv3 { /*margin-left: 30px;*/ color: #a85a00; -} \ No newline at end of file +} diff --git a/index.php b/index.php index febc041..f528005 100644 --- a/index.php +++ b/index.php @@ -3,8 +3,8 @@
$value) { + //mise en forme style |- (avec autant de - qu'il y a de profondeur de fichier $i) $txt ='|'; for ($j=1; $j<=$i; $j++) { $txt .='-'; } $txt .=' '; + //si une valeur alors on a un sous fichier ou sous dossier if (is_array($value)) { - echo '
' . $txt . $key . '
'; + echo '
X' . $txt . $key . '*
'; + //on relance la fonction pour définir les élements constituant les niveaux inférieurs afficher_tablo($value, $i); - } else { - echo '
' . $txt . $value . '
'; + } else { //pas de niv inférieur, on affiche le resultat + echo '
X' . $txt . $value . '
'; } } } From 7b6f505589389bbc6107505037a310fcfabd3cdb Mon Sep 17 00:00:00 2001 From: romain coquery Date: Wed, 18 Apr 2018 14:17:59 +0200 Subject: [PATCH 4/9] arbo ok + jquery --- assets/custom.css | 8 +++++ inc/head.php | 1 + index.php | 84 +++++++++++++++++++++++++++++++++++++---------- 3 files changed, 76 insertions(+), 17 deletions(-) diff --git a/assets/custom.css b/assets/custom.css index fa9814a..04ebfcd 100644 --- a/assets/custom.css +++ b/assets/custom.css @@ -21,6 +21,14 @@ strong{ height: auto; } +ul li { + +} +li { + list-style: none; + /*margin-left: 20px;*!*/ +} + .niv1 { /*margin-left: 10px;*/ color: #2a9fd6; diff --git a/inc/head.php b/inc/head.php index 9356b88..7d60717 100644 --- a/inc/head.php +++ b/inc/head.php @@ -5,6 +5,7 @@ FBI | X-Files archives +
+ \ No newline at end of file From 85068b63a0007fa67ec2c4844804d6133ac978e8 Mon Sep 17 00:00:00 2001 From: romain coquery Date: Wed, 18 Apr 2018 23:59:10 +0200 Subject: [PATCH 5/9] jquery --- assets/custom.css | 8 ++-- inc/head.php | 1 + index.php | 106 +++++++++++++++++----------------------------- 3 files changed, 43 insertions(+), 72 deletions(-) diff --git a/assets/custom.css b/assets/custom.css index 04ebfcd..289ce29 100644 --- a/assets/custom.css +++ b/assets/custom.css @@ -26,20 +26,20 @@ ul li { } li { list-style: none; - /*margin-left: 20px;*!*/ } .niv1 { - /*margin-left: 10px;*/ color: #2a9fd6; } .niv2 { - /*margin-left: 20px;*/ color: #9933cc; } .niv3 { - /*margin-left: 30px;*/ color: #a85a00; } + +.fa-times { + color: #a84a43; +} diff --git a/inc/head.php b/inc/head.php index 7d60717..4605381 100644 --- a/inc/head.php +++ b/inc/head.php @@ -6,6 +6,7 @@ +