/**
 * Show an interface to ask the user the options for split topics.
 */
function template_ask()
{
    global $context, $txt, $scripturl;
    echo '
	<div id="split_topics">
		<form action="', $scripturl, '?action=splittopics;sa=execute;topic=', $context['current_topic'], '.0" method="post" accept-charset="UTF-8">
			<input type="hidden" name="at" value="', $context['message']['id'], '" />
			<h2 class="category_header">', $txt['split_topic'], '</h2>
			<div class="windowbg">
				<div class="content">
					<div class="split_topics">
						<p>
							<strong><label for="subname">', $txt['subject_new_topic'], '</label>:</strong>
							<input type="text" name="subname" id="subname" value="', $context['message']['subject'], '" size="25" class="input_text" autofocus="autofocus" />
						</p>
						<ul class="split_topics">
							<li>
								<input type="radio" id="onlythis" name="step2" value="onlythis" checked="checked" class="input_radio" /> <label for="onlythis">', $txt['split_this_post'], '</label>
							</li>
							<li>
								<input type="radio" id="afterthis" name="step2" value="afterthis" class="input_radio" /> <label for="afterthis">', $txt['split_after_and_this_post'], '</label>
							</li>
							<li>
								<input type="radio" id="selective" name="step2" value="selective" class="input_radio" /> <label for="selective">', $txt['select_split_posts'], '</label>
							</li>
						</ul>
						<hr />
						<label for="messageRedirect"><input type="checkbox" name="messageRedirect" id="messageRedirect" onclick="document.getElementById(\'reasonArea\').style.display = this.checked ? \'block\' : \'none\';" class="input_check" /> ', $txt['splittopic_notification'], '.</label>
						<fieldset id="reasonArea" style="display: none;', '">
							<dl class="settings">
								<dt>
									', $txt['moved_why'], '
								</dt>
								<dd>
									<textarea name="reason" rows="4" cols="40">', $txt['splittopic_default'], '</textarea>
								</dd>
							</dl>
						</fieldset>';
    if (!empty($context['can_move'])) {
        echo '
						<p>
							<label for="move_new_topic"><input type="checkbox" name="move_new_topic" id="move_new_topic" onclick="document.getElementById(\'board_list\').style.display = this.checked ? \'\' : \'none\';" class="input_check" /> ', $txt['splittopic_move'], '.</label>', template_select_boards('move_to_board'), '
							<script><!-- // --><![CDATA[
								document.getElementById(\'board_list\').style.display = \'none\';
							// ]]></script>
						</p>';
    }
    echo '
						<div class="submitbutton">
							<input type="submit" value="', $txt['split_topic'], '" class="button_submit" />
							<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
						</div>
					</div>
				</div>
			</div>
		</form>
	</div>';
}
/**
 * Editing an individual message icon.
 */
function template_editicon()
{
    global $context, $scripturl, $txt;
    echo '
	<div id="admincenter">
		<form action="', $scripturl, '?action=admin;area=smileys;sa=editicon;icon=', $context['new_icon'] ? '0' : $context['icon']['id'], '" method="post" accept-charset="UTF-8">
			<h2 class="category_header">
				', $context['new_icon'] ? $txt['icons_new_icon'] : $txt['icons_edit_icon'], '
			</h2>
			<div class="windowbg">
				<div class="content">
					<dl class="settings">';
    if (!$context['new_icon']) {
        echo '
						<dt>
							<strong>', $txt['smiley_preview'], ': </strong>
						</dt>
						<dd>
							<img src="', $context['icon']['image_url'], '" alt="', $context['icon']['title'], '" />
						</dd>';
    }
    echo '
						<dt>
							<strong><label for="icon_filename">', $txt['smileys_filename'], '</label>: </strong><br /><span class="smalltext">', $txt['icons_filename_all_png'], '</span>
						</dt>
						<dd>
							<input type="text" name="icon_filename" id="icon_filename" value="', !empty($context['icon']['filename']) ? $context['icon']['filename'] . '.png' : '', '" class="input_text" />
						</dd>
						<dt>
							<strong><label for="icon_description">', $txt['smileys_description'], '</label>: </strong>
						</dt>
						<dd>
							<input type="text" name="icon_description" id="icon_description" value="', !empty($context['icon']['title']) ? $context['icon']['title'] : '', '" class="input_text" />
						</dd>
						<dt>
							<strong><label for="icon_board_select">', $txt['icons_board'], '</label>: </strong>
						</dt>
						<dd>', template_select_boards('icon_board', '', '', true), '
						</dd>
						<dt>
							<strong><label for="icon_location">', $txt['smileys_location'], '</label>: </strong>
						</dt>
						<dd>
							<select name="icon_location" id="icon_location">
								<option value="0"', empty($context['icon']['after']) ? ' selected="selected"' : '', '>', $txt['icons_location_first_icon'], '</option>';
    // Print the list of all the icons it can be put after...
    foreach ($context['icons'] as $id => $data) {
        if (empty($context['icon']['id']) || $id != $context['icon']['id']) {
            echo '
								<option value="', $id, '"', !empty($context['icon']['after']) && $id == $context['icon']['after'] ? ' selected="selected"' : '', '>', $txt['icons_location_after'], ': ', $data['title'], '</option>';
        }
    }
    echo '
							</select>
						</dd>
					</dl>';
    if (!$context['new_icon']) {
        echo '
					<input type="hidden" name="icon" value="', $context['icon']['id'], '" />';
    }
    echo '
					<hr />
					<input type="submit" name="icons_save" value="', $txt['smileys_save'], '" class="right_submit" />
					<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
				</div>
			</div>
		</form>
	</div>';
}
/**
 * Template for posting a calendar event.
 */
function template_unlinked_event_post()
{
    global $context, $txt, $scripturl, $modSettings;
    // Start the javascript for drop down boxes...
    echo '
		<form action="', $scripturl, '?action=calendar;sa=post" method="post" name="postevent" accept-charset="UTF-8" onsubmit="submitonce(this);smc_saveEntities(\'postevent\', [\'evtitle\']);">';
    if (!empty($context['event']['new'])) {
        echo '
			<input type="hidden" name="eventid" value="', $context['event']['eventid'], '" />';
    }
    // Start the main table.
    echo '
			<div id="post_event">
				<h2 class="category_header">', $context['page_title'], '</h2>';
    if (!empty($context['post_error']['messages'])) {
        echo '
				<div class="errorbox">
					<dl class="event_error">
						<dt>
							', $context['error_type'] == 'serious' ? '<strong>' . $txt['error_while_submitting'] . '</strong>' : '', '
						</dt>
						<dt class="error">
							', implode('<br />', $context['post_error']['messages']), '
						</dt>
					</dl>
				</div>';
    }
    echo '
				<div id="event_main" class="roundframe">
					<label for="evtitle"', isset($context['post_error']['no_event']) ? ' class="error"' : '', ' id="caption_evtitle">', $txt['calendar_event_title'], '</label>
					<input type="text" id="evtitle" name="evtitle" maxlength="255" size="55" value="', $context['event']['title'], '" tabindex="', $context['tabindex']++, '" class="input_text" />
					<div id="datepicker">
						<input type="hidden" name="calendar" value="1" /><label for="year">', $txt['calendar_year'], '</label>
						<select name="year" id="year" tabindex="', $context['tabindex']++, '" onchange="generateDays();">';
    // Show a list of all the years we allow...
    for ($year = $modSettings['cal_minyear']; $year <= $modSettings['cal_maxyear']; $year++) {
        echo '
							<option value="', $year, '"', $year == $context['event']['year'] ? ' selected="selected"' : '', '>', $year, '</option>';
    }
    echo '
						</select>
						<label for="month">', $txt['calendar_month'], '</label>
						<select name="month" id="month" onchange="generateDays();">';
    // There are 12 months per year - ensure that they all get listed.
    for ($month = 1; $month <= 12; $month++) {
        echo '
							<option value="', $month, '"', $month == $context['event']['month'] ? ' selected="selected"' : '', '>', $txt['months'][$month], '</option>';
    }
    echo '
						</select>
						<label for="day">', $txt['calendar_day'], '</label>
						<select name="day" id="day">';
    // This prints out all the days in the current month - this changes dynamically as we switch months.
    for ($day = 1; $day <= $context['event']['last_day']; $day++) {
        echo '
							<option value="', $day, '"', $day == $context['event']['day'] ? ' selected="selected"' : '', '>', $day, '</option>';
    }
    echo '
						</select>
					</div>';
    if (!empty($modSettings['cal_allowspan']) || $context['event']['new']) {
        echo '
					<ul class="event_options">';
    }
    // If events can span more than one day then allow the user to select how long it should last.
    if (!empty($modSettings['cal_allowspan'])) {
        echo '
						<li>
							<label for="span">', $txt['calendar_numb_days'], '</label>
							<select id="span" name="span">';
        for ($days = 1; $days <= $modSettings['cal_maxspan']; $days++) {
            echo '
								<option value="', $days, '"', $context['event']['span'] == $days ? ' selected="selected"' : '', '>', $days, '</option>';
        }
        echo '
							</select>
						</li>';
    }
    // If this is a new event let the user specify which board they want the linked post to be put into.
    if ($context['event']['new']) {
        echo '
						<li>
							<label for="link_to_board">', $txt['calendar_link_event'], '</label>
							<input type="checkbox" class="input_check" id="link_to_board" name="link_to_board" checked="checked" onclick="toggleLinked(this.form);" />
						</li>
						<li>
							', template_select_boards('board', $txt['calendar_post_in'], 'onchange="this.form.submit();"'), '
						</li>';
    }
    if (!empty($modSettings['cal_allowspan']) || $context['event']['new']) {
        echo '
					</ul>';
    }
    echo '
					<input type="submit" value="', empty($context['event']['new']) ? $txt['save'] : $txt['post'], '" class="right_submit" />';
    // Delete button?
    if (empty($context['event']['new'])) {
        echo '
					<input type="submit" name="deleteevent" value="', $txt['event_delete'], '" onclick="return confirm(\'', $txt['calendar_confirm_delete'], '\');" class="right_submit" />';
    }
    echo '
					<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
					<input type="hidden" name="eventid" value="', $context['event']['eventid'], '" />

				</div>
			</div>
		</form>';
}
Пример #4
0
/**
 * Area above the event box
 */
function template_make_event_above()
{
    global $context, $txt, $modSettings;
    // Are you posting a calendar event?
    echo '
					<hr class="clear" />
					<div id="post_event">
						<fieldset id="event_main">
							<legend>', $txt['calendar_event_options'], '</legend>
							<label for="evtitle"', isset($context['post_error']['no_event']) ? ' class="error"' : '', ' id="caption_evtitle">', $txt['calendar_event_title'], ':</label>
							<input type="text" id="evtitle" name="evtitle" maxlength="255" size="55" value="', $context['event']['title'], '" tabindex="', $context['tabindex']++, '" class="input_text" />
							<div id="datepicker">
								<input type="hidden" name="calendar" value="1" /><label for="year">', $txt['calendar_year'], '</label>
								<select name="year" id="year" tabindex="', $context['tabindex']++, '" onchange="generateDays();">';
    // Show a list of all the years we allow...
    for ($year = $modSettings['cal_minyear']; $year <= $modSettings['cal_maxyear']; $year++) {
        echo '
									<option value="', $year, '"', $year == $context['event']['year'] ? ' selected="selected"' : '', '>', $year, '&nbsp;</option>';
    }
    echo '
								</select>
								<label for="month">', $txt['calendar_month'], '</label>
								<select name="month" id="month" onchange="generateDays();">';
    // There are 12 months per year - ensure that they all get listed.
    for ($month = 1; $month <= 12; $month++) {
        echo '
									<option value="', $month, '"', $month == $context['event']['month'] ? ' selected="selected"' : '', '>', $txt['months'][$month], '&nbsp;</option>';
    }
    echo '
								</select>
								<label for="day">', $txt['calendar_day'], '</label>
								<select name="day" id="day">';
    // This prints out all the days in the current month - this changes dynamically as we switch months.
    for ($day = 1; $day <= $context['event']['last_day']; $day++) {
        echo '
									<option value="', $day, '"', $day == $context['event']['day'] ? ' selected="selected"' : '', '>', $day, '&nbsp;</option>';
    }
    echo '
								</select>
							</div>';
    if (!empty($modSettings['cal_allowspan']) || $context['event']['new'] && $context['is_new_post']) {
        echo '
							<ul class="event_options">';
        // If events can span more than one day then allow the user to select how long it should last.
        if (!empty($modSettings['cal_allowspan'])) {
            echo '
								<li>
									<label for="span">', $txt['calendar_numb_days'], '</label>
									<select id="span" name="span">';
            for ($days = 1; $days <= $modSettings['cal_maxspan']; $days++) {
                echo '
										<option value="', $days, '"', $days == $context['event']['span'] ? ' selected="selected"' : '', '>', $days, '&nbsp;</option>';
            }
            echo '
									</select>
								</li>';
        }
        // If this is a new event let the user specify which board they want the linked post to be put into.
        if ($context['event']['new'] && $context['is_new_post']) {
            echo '
								<li>
									', template_select_boards('board', $txt['calendar_post_in']), '
								</li>';
        }
        echo '
							</ul>';
    }
    if ($context['make_event'] && (!$context['event']['new'] || !empty($context['current_board']))) {
        echo '
							<input type="hidden" name="eventid" value="', $context['event']['id'], '" />';
    }
    echo '
						</fieldset>
					</div>';
}
/**
 * Template for the extra options for a topics merge.
 */
function template_merge_extra_options()
{
    global $context, $txt, $scripturl;
    echo '
	<div id="merge_topics">
		<form action="', $scripturl, '?action=mergetopics;sa=execute;" method="post" accept-charset="UTF-8">
			<h2 class="category_header">', $txt['merge_topic_list'], '</h2>
			<table class="bordercolor table_grid">
				<thead>
					<tr class="table_head">
						<th scope="col" style="width: 6em;">', $txt['merge_check'], '</th>
						<th scope="col" class="lefttext">', $txt['subject'], '</th>
						<th scope="col" class="lefttext">', $txt['started_by'], '</th>
						<th scope="col" class="lefttext">', $txt['last_post'], '</th>
						<th scope="col" style="width: 10em;">' . $txt['merge_include_notifications'] . '</th>
					</tr>
				</thead>
				<tbody>';
    foreach ($context['topics'] as $topic) {
        echo '
					<tr class="windowbg2">
						<td class="centertext">
							<input type="checkbox" class="input_check" name="topics[]" value="', $topic['id'], '" checked="checked" />
						</td>
						<td>
							<a href="', $scripturl, '?topic=', $topic['id'], '.0" target="_blank" class="new_win">', $topic['subject'] . '</a>
						</td>
						<td>
							', $topic['started']['link'], '<br />
							<span class="smalltext">', $topic['started']['time'], '</span>
						</td>
						<td>
							' . $topic['updated']['link'] . '<br />
							<span class="smalltext">', $topic['updated']['time'], '</span>
						</td>
						<td class="centertext">
							<input type="checkbox" class="input_check" name="notifications[]" value="' . $topic['id'] . '" checked="checked" />
						</td>
					</tr>';
    }
    echo '
				</tbody>
			</table>
			<br />
			<div class="windowbg">
				<div class="content">';
    echo '
					<fieldset id="merge_subject" class="merge_options">
						<legend>', $txt['merge_select_subject'], '</legend>
						<select name="subject" onchange="this.form.custom_subject.style.display = (this.options[this.selectedIndex].value != 0) ? \'none\': \'\' ;">';
    foreach ($context['topics'] as $topic) {
        echo '
							<option value="', $topic['id'], '"' . ($topic['selected'] ? ' selected="selected"' : '') . '>', $topic['subject'], '</option>';
    }
    echo '
							<option value="0">', $txt['merge_custom_subject'], ':</option>
						</select>
						<br /><input type="text" name="custom_subject" size="60" id="custom_subject" class="input_text custom_subject" style="display: none;" />
						<br />
						<label for="enforce_subject"><input type="checkbox" class="input_check" name="enforce_subject" id="enforce_subject" value="1" /> ', $txt['merge_enforce_subject'], '</label>
					</fieldset>';
    if (!empty($context['boards']) && count($context['boards']) > 1) {
        echo '
					<fieldset id="merge_board" class="merge_options">
						<legend>', $txt['merge_select_target_board'], '</legend>';
        template_select_boards('board');
        echo '
					</fieldset>';
    }
    if (!empty($context['polls'])) {
        echo '
					<fieldset id="merge_poll" class="merge_options">
						<legend>', $txt['merge_select_poll'], '</legend>
						<ul>';
        foreach ($context['polls'] as $poll) {
            echo '
							<li>
								<input type="radio" id="poll', $poll['id'], '" name="poll" value="', $poll['id'], '"', $poll['selected'] ? ' checked="checked"' : '', ' class="input_radio" /> <label for="poll', $poll['id'], '">', $poll['question'], '</label> (', $txt['topic'], ': <a href="', $scripturl, '?topic=', $poll['topic']['id'], '.0" target="_blank" class="new_win">', $poll['topic']['subject'], '</a>)
							</li>';
        }
        echo '
							<li>
								<input type="radio" id="nopoll" name="poll" value="-1" class="input_radio" /> <label for="nopoll">', $txt['merge_no_poll'], '</label>
							</li>
						</ul>
					</fieldset>';
    }
    echo '
					<div class="submitbutton">
						<input type="submit" value="' . $txt['merge'] . '" class="button_submit" />
						<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
						<input type="hidden" name="sa" value="execute" />
					</div>
				</div>
			</div>
		</form>
	</div>';
}
/**
 * Template for the topic maintenance tasks.
 */
function template_maintain_topics()
{
    global $scripturl, $txt, $context, $settings, $modSettings;
    // If maintenance has finished tell the user.
    template_show_error('maintenance_finished');
    // Bit of javascript for showing which boards to prune in an otherwise hidden list.
    echo '
	<script><!-- // --><![CDATA[
		var rotSwap = false;
			maintain_old_choose = ', JavaScriptEscape($txt['maintain_old_choose']), ',
			maintain_old_all = ', JavaScriptEscape($txt['maintain_old_all']), ';
	// ]]></script>';
    echo '
	<div id="manage_maintenance">
		<h2 class="category_header">', $txt['maintain_old'], '</h2>
		<div class="windowbg">
			<div class="content flow_auto">
				<form action="', $scripturl, '?action=admin;area=maintain;sa=topics;activity=pruneold" method="post" accept-charset="UTF-8">';
    // The otherwise hidden "choose which boards to prune".
    echo '
					<p>
						<a id="rotLink"></a><label for="maxdays">', sprintf($txt['maintain_old_since_days'], '<input type="text" id="maxdays" name="maxdays" value="30" size="3" />'), '</label>
					</p>
					<p>
						<label for="delete_type_nothing"><input type="radio" name="delete_type" id="delete_type_nothing" value="nothing" class="input_radio" /> ', $txt['maintain_old_nothing_else'], '</label><br />
						<label for="delete_type_moved"><input type="radio" name="delete_type" id="delete_type_moved" value="moved" class="input_radio" checked="checked" /> ', $txt['maintain_old_are_moved'], '</label><br />
						<label for="delete_type_locked"><input type="radio" name="delete_type" id="delete_type_locked" value="locked" class="input_radio" /> ', $txt['maintain_old_are_locked'], '</label><br />
					</p>';
    if (!empty($modSettings['enableStickyTopics'])) {
        echo '
					<p>
						<label for="delete_old_not_sticky"><input type="checkbox" name="delete_old_not_sticky" id="delete_old_not_sticky" class="input_check" checked="checked" /> ', $txt['maintain_old_are_not_stickied'], '</label><br />
					</p>';
    }
    echo '
					<p>
						<a href="#rotLink" onclick="swapRot();"><img src="', $settings['images_url'], '/selected.png" alt="+" id="rotIcon" /></a> <a href="#rotLink" onclick="swapRot();" id="rotText">', $txt['maintain_old_all'], '</a>
					</p>
					<div style="display: none;" id="rotPanel" class="flow_hidden">
						<div class="floatleft grid50">';
    // This is the "middle" of the list.
    $middle = ceil(count($context['categories']) / 2);
    $i = 0;
    foreach ($context['categories'] as $category) {
        echo '
							<fieldset>
								<legend>', $category['name'], '</legend>
								<ul>';
        // Display a checkbox with every board.
        foreach ($category['boards'] as $board) {
            echo '
									<li style="margin-', $context['right_to_left'] ? 'right' : 'left', ': ', $board['child_level'] * 1.5, 'em;">
										<label for="boards_', $board['id'], '"><input type="checkbox" name="boards[', $board['id'], ']" id="boards_', $board['id'], '" checked="checked" class="input_check" />', $board['name'], '</label>
									</li>';
        }
        echo '
								</ul>
							</fieldset>';
        // Increase $i, and check if we're at the middle yet.
        if (++$i == $middle) {
            echo '
						</div>
						<div class="floatright grid50">';
        }
    }
    echo '
						</div>
					</div>
					<div class="submitbutton">
						<input type="submit" value="', $txt['maintain_old_remove'], '" onclick="return confirm(\'', $txt['maintain_old_confirm'], '\');" class="button_submit" />
						<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
						<input type="hidden" name="', $context['admin-maint_token_var'], '" value="', $context['admin-maint_token'], '" />
					</div>
				</form>
			</div>
		</div>
		<h3 class="category_header">', $txt['maintain_old_drafts'], '</h3>
		<div class="windowbg">
			<div class="content">
				<form action="', $scripturl, '?action=admin;area=maintain;sa=topics;activity=olddrafts" method="post" accept-charset="UTF-8">
					<p>
						<label for="draftdays">', sprintf($txt['maintain_old_drafts_days'], ' <input type="text" id="draftdays" name="draftdays" value="' . (!empty($modSettings['drafts_keep_days']) ? $modSettings['drafts_keep_days'] : 30) . '" size="3" /> '), '</label>
					</p>
					<div class="submitbutton">
						<input type="submit" value="', $txt['maintain_old_remove'], '" onclick="return confirm(\'', $txt['maintain_old_drafts_confirm'], '\');" class="button_submit" />
						<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
						<input type="hidden" name="', $context['admin-maint_token_var'], '" value="', $context['admin-maint_token'], '" />
					</div>
				</form>
			</div>
		</div>
		<h3 class="category_header">', $txt['move_topics_maintenance'], '</h3>
		<div class="windowbg">
			<div class="content">
				<form action="', $scripturl, '?action=admin;area=maintain;sa=topics;activity=massmove" method="post" accept-charset="UTF-8">
					<p>';
    template_select_boards('id_board_from', $txt['move_topics_from']);
    template_select_boards('id_board_to', $txt['move_topics_to']);
    echo '
					</p>
					<div class="submitbutton">
						<input type="submit" value="', $txt['move_topics_now'], '" onclick="return confirmMoveTopics(', JavaScriptEscape($txt['move_topics_confirm']), ');" class="button_submit" />
						<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
						<input type="hidden" name="', $context['admin-maint_token_var'], '" value="', $context['admin-maint_token'], '" />
					</div>
				</form>
			</div>
		</div>
	</div>';
}
/**
 * Show an interface for selecting which board to move a post to.
 */
function template_move_topic()
{
    global $context, $txt, $scripturl;
    echo '
	<div id="move_topic">
		<form action="', $scripturl, '?action=movetopic2;current_board=' . $context['current_board'] . ';topic=', $context['current_topic'], '.0" method="post" accept-charset="UTF-8" onsubmit="submitonce(this);">
			<h2 class="category_header">', $txt['move_topic'], '</h2>
			<div class="windowbg centertext">
				<div class="content">
					<div class="move_topic">
						<dl class="settings">
							<dt>
								<strong>', $txt['move_to'], ':</strong>
							</dt>
							<dd>', template_select_boards('toboard'), '
							</dd>';
    // Disable the reason textarea when the postRedirect checkbox is unchecked...
    echo '
						</dl>
						<label for="reset_subject"><input type="checkbox" name="reset_subject" id="reset_subject" onclick="document.getElementById(\'subjectArea\').style.display = this.checked ? \'block\' : \'none\';" class="input_check" /> ', $txt['moveTopic2'], '.</label><br />
						<fieldset id="subjectArea" style="display: none;">
							<dl class="settings">
								<dt><strong><label for="custom_subject">', $txt['moveTopic3'], '</label>:</strong></dt>
								<dd><input type="text" id="custom_subject" name="custom_subject" size="30" value="', $context['subject'], '" class="input_text" /></dd>
							</dl>
							<label for="enforce_subject"><input type="checkbox" name="enforce_subject" id="enforce_subject" class="input_check" /> ', $txt['moveTopic4'], '.</label>
						</fieldset>
						<label for="postRedirect"><input type="checkbox" name="postRedirect" id="postRedirect" ', $context['is_approved'] ? 'checked="checked"' : '', ' onclick="', $context['is_approved'] ? '' : 'if (this.checked && !confirm(\'' . $txt['move_topic_unapproved_js'] . '\')) return false; ', 'document.getElementById(\'reasonArea\').style.display = this.checked ? \'block\' : \'none\';" class="input_check" /> ', $txt['moveTopic1'], '.</label>
						<fieldset id="reasonArea" style="', $context['is_approved'] ? '' : 'display: none;', '">
							<dl class="settings">
								<dt>
									<label for="reason">', $txt['moved_why'], '</label>
								</dt>
								<dd>
									<textarea id="reason" name="reason" rows="3" cols="40">', $txt['movetopic_default'], '</textarea>
								</dd>
								<dt>
									<label for="redirect_topic">', $txt['movetopic_redirect'], '</label>
								</dt>
								<dd>
									<input type="checkbox" name="redirect_topic" id="redirect_topic" ', !empty($context['redirect_topic']) ? 'checked="checked"' : '', ' class="input_check" />
								</dd>
								<dt>
									<label for="redirect_expires">', $txt['movetopic_expires'], '</label>
								</dt>
								<dd>
									<select id="redirect_expires" name="redirect_expires">
										<option value="0"', empty($context['redirect_expires']) ? ' selected="selected"' : '', '>', $txt['never'], '</option>
										<option value="1440"', !empty($context['redirect_expires']) && $context['redirect_expires'] == 1440 ? ' selected="selected"' : '', '>', $txt['one_day'], '</option>
										<option value="10080"', !empty($context['redirect_expires']) && $context['redirect_expires'] == 10080 ? ' selected="selected"' : '', '>', $txt['one_week'], '</option>
										<option value="20160"', !empty($context['redirect_expires']) && $context['redirect_expires'] == 20160 ? ' selected="selected"' : '', '>', $txt['two_weeks'], '</option>
										<option value="43200"', !empty($context['redirect_expires']) && $context['redirect_expires'] == 43200 ? ' selected="selected"' : '', '>', $txt['one_month'], '</option>
										<option value="86400"', !empty($context['redirect_expires']) && $context['redirect_expires'] == 86400 ? ' selected="selected"' : '', '>', $txt['two_months'], '</option>
									</select>
								</dd>
							</dl>
						</fieldset>
						<input type="submit" value="', $txt['move_topic'], '" onclick="return submitThisOnce(this);" accesskey="s" class="right_submit" />
					</div>
				</div>
			</div>';
    if ($context['back_to_topic']) {
        echo '
			<input type="hidden" name="goback" value="1" />';
    }
    echo '
			<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
			<input type="hidden" name="seqnum" value="', $context['form_sequence_number'], '" />
		</form>
	</div>';
}