<?php
// Version: 1.0 RC1; QuotesManagement
function template_quote_aquote()
{
global $context, $txt, $scripturl, $settings;
echo '
<script language="JavaScript1.2" type="text/javascript"><!--
function DoConfirm(message, url)
{
if (confirm(message))
location.href = url;
}
//--></script>
<div class="tborder">
<table width="100%" border="0" cellspacing="1" align="center">
<tr>
<td class="catbg">
<b>' . $txt['quote_110'] . '</b></td>
<td class="catbg">
<b>' . $txt[29] . '</b></td>
<td class="catbg">
<!-- b>' . $txt['quote_113'] . '</b --></td>
</tr>';
$i=0;
foreach ($context['quotes'] AS $quote)
{
$class = ($i % 2) ? 'windowbg2' : 'windowbg';
echo '<tr>
<td class="', $class, '">', $quote['quote'], '</td>
<td class="', $class, '">', $quote['author'], '</td>
<td class="', $class, '" align="center" nowrap>
<a href="', $scripturl, '?module=QuotesManagement;sa=equote;id=', $quote['id'], '"><img src="', $settings['images_url'], '/icons/edit.png" border="0" alt="', $txt['quote_111'], '" /></a> <a href="javascript:DoConfirm(\'', $txt['quote_124'], '\', \'', $scripturl, '?module=QuotesManagement;sa=delquote;id=', $quote['id'], '\')"><img src="', $settings['images_url'], '/icons/edit_trash.png" border="0" alt="', $txt['quote_112'], '" /></td>
</tr>';
$i++;
}
echo '
</table>
</div>
<br /><br />
<a name="addQuote"></a>
<form name="add_quote" method="post" action="', $scripturl, '?module=QuotesManagement;sa=aquote2">
<div class="tborder">
<table width="100%" cellspacing="1" cellpadding="0" border="0" align="center">
<tr>
<th class="titlebg" colspan="2">', $txt['quote_120'], '</th>
</tr><tr>
<td class="windowbg2">
', $txt['quote_110'], '</td>
<td class="windowbg2">
<textarea name="quote" rows="10" cols="90"></textarea></td>
</tr><tr>
<td class="windowbg2">
', $txt[29], '</td>
<td class="windowbg2">
<input type="text" size="33" name="qAuthor"></td>
</tr><tr>
<td class="windowbg2" colspan="2" align="center">
<input type="submit" name="submit" value="', $txt['quote_120'], '"></td>
</tr>
</table>
</div>
</form>';
}
function template_quote_equote()
{
global $context, $txt, $scripturl;
echo '
<form name="edit_quote" method="post" action="', $scripturl, '?module=QuotesManagement;sa=equote2">
<div class="tborder">
<table width="100%" cellspacing="1" cellpadding="0" border="0" align="center">
<tr>
<th class="titlebg" colspan="2">', $txt['quote_123'], '</th>
</tr><tr>
<td class="windowbg2">
', $txt['quote_110'], '</td>
<td class="windowbg2">
<textarea name="quote" rows="10" cols="90">', $context['quote2edit']['quote'], '</textarea></td>
</tr><tr>
<td class="windowbg2">
', $txt[29], '</td>
<td class="windowbg2">
<input type="text" name="qAuthor" size="33" value="', $context['quote2edit']['author'], '"></td>
</tr><tr>
<td class="windowbg2" colspan="2" align="center">
<input type="submit" name="submit" value="', $txt['quote_123'], '"></td>
</tr>
<input type="hidden" name="id" value="', $context['quote2edit']['id'], '">
</table>
</div>
</form>';
}
?>