diff --git a/header.php b/header.php index 4e44d7d..b1cb5c5 100644 --- a/header.php +++ b/header.php @@ -85,10 +85,12 @@
  • - +
    + +
  • diff --git a/index.php b/index.php index 4d3d628..8d07c1e 100644 --- a/index.php +++ b/index.php @@ -4,13 +4,30 @@
    + $imagesArray = []; + $newsArray = []; + $timesArray = []; + $counter = 0; + foreach ($newsFile as $news) { + $nesto = str_getcsv($news); + $timesArray[$counter] = $nesto[0]; + $imagesArray[$counter] = $nesto[1]; + $newsArray[$counter] = $nesto[2]; + $counter++; + } + if(isset($_POST['sort'])) { + if($_POST['sort']=='alpha') { + print_r('alpha'); + array_multisort($newsArray, SORT_STRING, $imagesArray, $timesArray); + } + } + for($i = 0; $i < $counter; $i++) { + ?>

    diff --git a/js.js b/js.js index d971972..04830fc 100644 --- a/js.js +++ b/js.js @@ -89,6 +89,10 @@ function onFilter(select) { } } +function onSortChanged(thisThing) { + thisThing.parentElement.submit(); +} + function validateCountry(countryCodeField) { var ajax = new XMLHttpRequest(); ajax.onreadystatechange = function() { diff --git a/no_image.ong.png b/no_image.ong.png deleted file mode 100644 index 6e1ebff..0000000 Binary files a/no_image.ong.png and /dev/null differ diff --git a/stil.css b/stil.css index 828c737..b8729a1 100644 --- a/stil.css +++ b/stil.css @@ -104,6 +104,11 @@ border-color: transparent transparent transparent #1199CC; margin: auto; } +.headerItem form { + display: inline-block; + margin: auto; +} + .logoLinl { text-decoration: none; }