Пример #1
0
    construct_hidden_code('lastedit', $template['dateline']);
    $backlink = "template.php?" . $vbulletin->session->vars['sessionurl'] . "do=modify&expandset={$template['styleid']}&group=" . $vbulletin->GPC['group'] . "&templateid=" . $vbulletin->GPC['templateid'] . "&searchstring=" . urlencode($vbulletin->GPC['searchstring']);
    $products = fetch_product_list();
    if ($template['styleid'] == -1) {
        print_select_row($vbphrase['product'], 'product', $products, $template['product']);
    } else {
        print_label_row($vbphrase['product'], $products[$template['product'] ? $template['product'] : 'vbulletin']);
        construct_hidden_code('product', $template['product'] ? $template['product'] : 'vbulletin');
    }
    print_label_row($vbphrase['style'], "<a href=\"{$backlink}\" title=\"" . $vbphrase['edit_templates'] . "\"><b>{$template['style']}</b></a>");
    print_input_row($vbphrase['title'] . ($template['styleid'] != -1 ? '<dfn>' . construct_link_code($vbphrase['view_history'], 'template.php?do=history&amp;dostyleid=' . $template['styleid'] . '&amp;title=' . urlencode($template['title']), 1) . '</dfn>' : ''), 'title', $template['title']);
    print_textarea_row($vbphrase['template'] . '
			<br /><br />
			<span class="smallfont">' . iif($template['styleid'] != -1, construct_link_code($vbphrase['show_default'], "template.php?" . $vbulletin->session->vars['sessionurl'] . "do=view&amp;title={$template['title']}", 1) . '<br /><br />', '') . '<!--' . $vbphrase['wrap_text'] . '<input type="checkbox" unselectable="on" onclick="set_wordwrap(\'ta_template\', this.checked);" accesskey="w" checked="checked" />-->
			</span>', 'template', $template['template_un'], 22, '75" style="width:100%', true, true, 'ltr', 'code');
    print_template_javascript();
    print_label_row($vbphrase['save_in_template_history'], '<label for="savehistory"><input type="checkbox" name="savehistory" id="savehistory" value="1" tabindex="1" />' . $vbphrase['yes'] . '</label><br /><span class="smallfont">' . $vbphrase['comment'] . '</span> <input type="text" name="histcomment" value="" tabindex="1" class="bginput" size="50" />');
    print_submit_row($vbphrase['save'], '_default_', 2, '', "<input type=\"submit\" class=\"button\" tabindex=\"1\" name=\"return\" value=\"{$vbphrase['save_and_reload']}\" accesskey=\"e\" />");
    ?>
	<script type="text/javascript">
	<!--
	var initial_crc32 = crc32(YAHOO.util.Dom.get(textarea_id).value);
	var confirmUnload = true;
	YAHOO.util.Event.addListener('cpform', 'submit', function(e) { confirmUnload = false; });
	YAHOO.util.Event.addListener(window, 'beforeunload', function(e) {
		if (initial_crc32 != crc32(YAHOO.util.Dom.get(textarea_id).value) && confirmUnload) {
			e.returnValue = '<?php 
    echo addslashes_js($vbphrase[unsaved_data_may_be_lost]);
    ?>
';
		}
Пример #2
0
    } else {
        print_label_row($vbphrase['product'], $products[$template['product'] ? $template['product'] : 'vbulletin']);
        construct_hidden_code('product', $template['product'] ? $template['product'] : 'vbulletin');
    }
    $backlink = "template.php?" . vB::getCurrentSession()->get('sessionurl') . "do=modify&amp;expandset={$template['styleid']}&amp;group=" . $vbulletin->GPC['group'] . "&amp;templateid=" . $vbulletin->GPC['templateid'] . "&amp;searchstring=" . urlencode($vbulletin->GPC['searchstring']);
    print_label_row($vbphrase['style'], "<a href=\"{$backlink}\" title=\"" . $vbphrase['edit_templates'] . "\"><b>{$template['style']}</b></a>");
    print_input_row($vbphrase['title'] . '<dfn>' . construct_link_code($vbphrase['view_history_gstyle'], 'template.php?do=history&amp;dostyleid=' . $template['styleid'] . '&amp;title=' . urlencode($template['title']), 1) . '</dfn>', 'title', $template['title']);
    print_checkbox_row($vbphrase['textonly'] . '<dfn>' . $vbphrase['textonly_desc'] . '</dfn>', 'textonly', !empty($template['textonly']));
    if ($updatetemplate_edit_conflict) {
        print_description_row($vbphrase['template_current_version_merge_here'], false, 2, 'tfoot', 'center');
    }
    print_textarea_row($vbphrase['template'] . '
			<br /><br />
			<span class="smallfont">' . iif($template['styleid'] != -1, construct_link_code($vbphrase['show_default'], "template.php?" . vB::getCurrentSession()->get('sessionurl') . "do=view&amp;title={$template['title']}", 1) . '<br /><br />', '') . '<!--' . $vbphrase['wrap_text'] . '<input type="checkbox" unselectable="on" onclick="set_wordwrap(\'ta_template\', this.checked);" accesskey="w" checked="checked" />-->
			</span>', 'template', $text, 22, '5000" style="width:99%', true, false, 'ltr', 'code');
    print_template_javascript($vbulletin->textarea_id);
    print_label_row($vbphrase['search_in_template'], '
			<input type="text" class="bginput searchstring" name="string" accesskey="t" value="" size="20" />
			<input type="button" class="button findbutton" style="font-weight:normal" value=" ' . $vbphrase['find'] . ' " accesskey="f" />');
    print_label_row($vbphrase['save_in_template_history'], '<label for="savehistory"><input type="checkbox" name="savehistory" id="savehistory" value="1" tabindex="1" ' . (($updatetemplate_edit_conflict and $vbulletin->GPC['savehistory']) ? 'checked="checked" ' : '') . '/>' . $vbphrase['yes'] . '</label><br /><span class="smallfont">' . $vbphrase['comment_gstyle'] . '</span> <input type="text" name="histcomment" value="' . ($updatetemplate_edit_conflict ? $vbulletin->GPC['histcomment'] : '') . '" tabindex="1" class="bginput" size="50" />');
    print_submit_row($vbphrase['save'], '_default_', 2, '', "<input type=\"submit\" class=\"button js-reload-to-position\" tabindex=\"1\" name=\"return\" value=\"{$vbphrase['save_and_reload']}\" accesskey=\"e\" />");
    if ($updatetemplate_edit_conflict) {
        print_form_header('', '', false, true, 'cpform_oldtemplate');
        print_column_style_code(array('width:20%', 'width:80%'));
        print_table_header($vbphrase['your_version_of_template']);
        print_description_row($vbphrase['template_your_version_merge_from_here']);
        print_textarea_row($vbphrase['template'], 'oldtemplate_editconflict', $vbulletin->GPC['template'], 22, '5000" style="width:99%" readonly="readonly', true, false, 'ltr', 'code');
        print_table_footer();
    }
}
// #############################################################################