diff --git a/public_html/pictures/front/female/1.jpg b/public_html/pictures/front/female/1.jpg new file mode 100755 index 0000000..d8809cc Binary files /dev/null and b/public_html/pictures/front/female/1.jpg differ diff --git a/public_html/pictures/front/male/1.jpg b/public_html/pictures/front/male/1.jpg new file mode 100755 index 0000000..b8d6d11 Binary files /dev/null and b/public_html/pictures/front/male/1.jpg differ diff --git a/public_html/pictures/front/male/2.jpg b/public_html/pictures/front/male/2.jpg new file mode 100755 index 0000000..c3b2dc4 Binary files /dev/null and b/public_html/pictures/front/male/2.jpg differ diff --git a/public_html/pictures/front/male/3.png b/public_html/pictures/front/male/3.png new file mode 100755 index 0000000..bfd8ac6 Binary files /dev/null and b/public_html/pictures/front/male/3.png differ diff --git a/public_html/pictures/front/male/4.jpg b/public_html/pictures/front/male/4.jpg new file mode 100755 index 0000000..b4b0c4c Binary files /dev/null and b/public_html/pictures/front/male/4.jpg differ diff --git a/public_html/pictures/index.php b/public_html/pictures/index.php new file mode 100755 index 0000000..5ff0fff --- /dev/null +++ b/public_html/pictures/index.php @@ -0,0 +1,57 @@ +$fname ){ + + // {0} Avoid . and .. // + if( in_array($fname, ['.', '..']) ) + continue; + + + $element = "$directory/$fname"; + + // {1} If subdir (excepted . and ..)-> applying recursivly // + if( is_dir($element) ) + $fetched[$fname] = getImages($element); + + // {2} If not picture -> unset // + else if( !preg_match($checker, $fname) ) + $fetched[] = $fname; + + } + + /* (3) Returning result */ + return $fetched; + + } + + + + /* [2] On affiche le résultat + =========================================================*/ + + header('Content-Type: application/json'); + echo json_encode( getImages($dir) ); diff --git a/public_html/pictures/profile/female/1.png b/public_html/pictures/profile/female/1.png new file mode 100755 index 0000000..467b45a Binary files /dev/null and b/public_html/pictures/profile/female/1.png differ diff --git a/public_html/pictures/profile/male/1.jpg b/public_html/pictures/profile/male/1.jpg new file mode 100755 index 0000000..dc6d1e9 Binary files /dev/null and b/public_html/pictures/profile/male/1.jpg differ