1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49: 50: 51: 52: 53: 54: 55: 56: 57: 58: 59: 60: 61: 62: 63: 64: 65: 66: 67: 68: 69: 70: 71: 72: 73: 74: 75: 76: 77: 78: 79: 80: 81: 82: 83: 84: 85: 86:
<?php
function template_edit_holiday()
{
global $context, $scripturl, $txt, $modSettings;
echo '
<form action="', $scripturl, '?action=admin;area=managecalendar;sa=editholiday" method="post" accept-charset="', $context['character_set'], '">
<div class="cat_bar">
<h3 class="catbg">', $context['page_title'], '</h3>
</div>
<div class="windowbg">
<dl class="settings">
<dt>
<strong>', $txt['holidays_title_label'], ':</strong>
</dt>
<dd>
<input type="text" name="title" value="', $context['holiday']['title'], '" size="55" maxlength="60">
</dd>
<dt>
<strong>', $txt['calendar_year'], '</strong>
</dt>
<dd>
<select name="year" id="year" onchange="generateDays();">
<option value="0000"', $context['holiday']['year'] == '0000' ? ' selected' : '', '>', $txt['every_year'], '</option>';
for ($year = $modSettings['cal_minyear']; $year <= $modSettings['cal_maxyear']; $year++)
echo '
<option value="', $year, '"', $year == $context['holiday']['year'] ? ' selected' : '', '>', $year, '</option>';
echo '
</select>
<label for="month">', $txt['calendar_month'], '</label>
<select name="month" id="month" onchange="generateDays();">';
for ($month = 1; $month <= 12; $month++)
echo '
<option value="', $month, '"', $month == $context['holiday']['month'] ? ' selected' : '', '>', $txt['months'][$month], '</option>';
echo '
</select>
<label for="day">', $txt['calendar_day'], '</label>
<select name="day" id="day" onchange="generateDays();">';
for ($day = 1; $day <= $context['holiday']['last_day']; $day++)
echo '
<option value="', $day, '"', $day == $context['holiday']['day'] ? ' selected' : '', '>', $day, '</option>';
echo '
</select>
</dd>
</dl>';
if ($context['is_new'])
echo '
<input type="submit" value="', $txt['holidays_button_add'], '" class="button">';
else
echo '
<input type="submit" name="edit" value="', $txt['holidays_button_edit'], '" class="button">
<input type="submit" name="delete" value="', $txt['holidays_button_remove'], '" class="button">
<input type="hidden" name="holiday" value="', $context['holiday']['id'], '">';
echo '
<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '">
<input type="hidden" name="' . $context['admin-eh_token_var'] . '" value="' . $context['admin-eh_token'] . '">
</div><!-- .windowbg -->
</form>';
}
?>