MyBB Community Forums

Full Version: Calendar Template
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,

I tried to save my calendar template and it displayed this warning :
A potential security issue was found in the template

I'm start finding but found nothing missing in this template.

Here is it:

<html>
<head>
	<title>{$lang->calendar} - {$mybb->settings['bbname']}</title>
	{$headerinclude}
</head>
<body>
	{$header}
	<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
		<thead>
			<tr>
				<td class="thead" colspan="8">
					<div class="float_right">
						<a href="{$prev_link}">&laquo; {$monthnames[$prev_month['month']]} {$prev_month['year']}</a> | <a href="{$next_link}">{$monthnames[$next_month['month']]} {$next_month['year']} &raquo;</a>
					</div>
					<div><strong>{$monthnames[$month]} {$year}</strong></div>
				</td>
			</tr>
			<tr>
				<td class="tcat">&nbsp;</td>
			{$weekday_headers}
			</tr>
		</thead>
		<tbody>
		{$calendar_rows}
		</tbody>
	</table>
<br />
<form action="calendar.php" method="post">
	<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder rounded-top">
		<tr>
			<td class="trow1">
				<table width="100%" cellspacing="0" cellpadding="0" border="0">
					<tr>
						<td class="trow1" valign="top">{$addevent}</td>
						<td class="trow1" align="right">
						<span class="smalltext"><strong>{$lang->jump_month}</strong></span>
						<select name="month">
							<option value="{$month}">{$monthnames[$month]}</option>
							<option value="{$month}">----------</option>
							<option value="1">{$lang->alt_month_1}</option>
							<option value="2">{$lang->alt_month_2}</option>
							<option value="3">{$lang->alt_month_3}</option>
							<option value="4">{$lang->alt_month_4}</option>
							<option value="5">{$lang->alt_month_5}</option>
							<option value="6">{$lang->alt_month_6}</option>
							<option value="7">{$lang->alt_month_7}</option>
							<option value="8">{$lang->alt_month_8}</option>
							<option value="9">{$lang->alt_month_9}</option>
							<option value="10">{$lang->alt_month_10}</option>
							<option value="11">{$lang->alt_month_11}</option>
							<option value="12">{$lang->alt_month_12}</option>
						</select>
						<select name="year">
							<option value="{$year}">{$year}</option>
							<option value="{$year}">----------</option>
							{$yearsel}
						</select>
						{$gobutton}
						<br /><br />
						<span class="smalltext"><strong>{$lang->jump_to_calendar}</strong></span>
						{$calendar_jump}
						{$gobutton}
						</td>
					</tr>
				</table>
			</td>
		</tr>
		</table>
	</form>
{$footer}
</body>
</html>


Please take a look into this template, and help me find out what I've missed. Thanks.
Replace your code with the following:

<html>
<head>
    <title>{$lang->calendar} - {$mybb->settings['bbname']}</title>
    {$headerinclude}
</head>
<body>
    {$header}
    <table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
        <thead>
            <tr>
                <td class="thead" colspan="8">
                    <div class="float_right">
                        <a href="{$prev_link}">&laquo; {$prev_month['name']} {$prev_month['year']}</a> | <a href="{$next_link}">{$next_month['name']} {$next_month['year']} &raquo;</a>
                    </div>
                    <div><strong>{$monthnames[$month]} {$year}</strong></div>
                </td>
            </tr>
            <tr>
                <td class="tcat">&nbsp;</td>
            {$weekday_headers}
            </tr>
        </thead>
        <tbody>
        {$calendar_rows}
        </tbody>
    </table>
<br />
<form action="calendar.php" method="post">
    <table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder rounded-top">
        <tr>
            <td class="trow1">
                <table width="100%" cellspacing="0" cellpadding="0" border="0">
                    <tr>
                        <td class="trow1" valign="top">{$addevent}</td>
                        <td class="trow1" align="right">
                        <span class="smalltext"><strong>{$lang->jump_month}</strong></span>
                        <select name="month">
                            <option value="{$month}">{$monthnames[$month]}</option>
                            <option value="{$month}">----------</option>
                            <option value="1">{$lang->alt_month_1}</option>
                            <option value="2">{$lang->alt_month_2}</option>
                            <option value="3">{$lang->alt_month_3}</option>
                            <option value="4">{$lang->alt_month_4}</option>
                            <option value="5">{$lang->alt_month_5}</option>
                            <option value="6">{$lang->alt_month_6}</option>
                            <option value="7">{$lang->alt_month_7}</option>
                            <option value="8">{$lang->alt_month_8}</option>
                            <option value="9">{$lang->alt_month_9}</option>
                            <option value="10">{$lang->alt_month_10}</option>
                            <option value="11">{$lang->alt_month_11}</option>
                            <option value="12">{$lang->alt_month_12}</option>
                        </select>
                        <select name="year">
                            <option value="{$year}">{$year}</option>
                            <option value="{$year}">----------</option>
                            {$yearsel}
                        </select>
                        {$gobutton}
                        <br /><br />
                        <span class="smalltext"><strong>{$lang->jump_to_calendar}</strong></span>
                        {$calendar_jump}
                        {$gobutton}
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
        </table>
    </form>
{$footer}
</body>
</html>
Thanks you so much. Could you tell me, what I've missed in that template?
That line is different in Vernier's version.

<a href="{$prev_link}">&laquo; {$prev_month['name']} {$prev_month['year']}</a> | <a href="{$next_link}">{$next_month['name']} {$next_month['year']} &raquo;</a>