daterangedivbasecommission.tpl.php 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <?php
  2. $honapok = array(
  3. 1 => 'Január',
  4. 2 => 'Február',
  5. 3 => 'Március',
  6. 4 => 'Április',
  7. 5 => 'Május',
  8. 6 => 'Június',
  9. 7 => 'Július',
  10. 8 => 'Augusztus',
  11. 9 => 'Szeptember',
  12. 10 => 'Október',
  13. 11 => 'November',
  14. 12 => 'December'
  15. );
  16. print isset($bigRedDiv) ? $bigRedDiv : '';
  17. print '<div id="" style="display:block;">';
  18. print '<label for="year">Év:</label>
  19. <select name="year" id="year">';
  20. $currentYear = date("Y", strtotime("-1 year"));
  21. echo '<option value="" disabled selected>Válasszon évet...</option>';
  22. for ($ev = $currentYear; $ev <= $currentYear + 7; $ev++) {
  23. $selectYear = isset($year) && $year == $ev ? 'selected' : '';
  24. print '<option value="' . $ev . '" '. $selectYear .'>' . $ev . '</option>';
  25. }
  26. print '</select>
  27. <label for="month">Hónap:</label>
  28. <select name="month" id="month">';
  29. print '<option value="" disabled selected>Válasszon hónapot...</option>';
  30. foreach ($honapok as $key => $value) {
  31. $selectMonth = isset($month) && $month == $key ? 'selected' : '';
  32. print '<option value="' . $key . '" ' . $selectMonth . '>' . $value . '</option>';
  33. }
  34. print '</select>';
  35. print '<button type="submit" style="margin-left: 20px;">' . $langs->trans('select') . '</button>';
  36. print '</div>';