<?php
// Version: 1.0 RC1; FAQManagement
function template_Faq_Admin ()
{
global $context, $txt, $scripturl;
echo '
<div align="center">
<div align="center" class="tborder">
<table border="0" cellspacing="1" width="100%">
<tr>
<th class="titlebg" colspan="4"><b>', $txt['faq01'], '</b></th>
</tr><tr class="catbg">
<th>', $txt['faq02'], '</th>
<th width="50%">', $txt['faq03'], '</th>
<th>', $txt['faq26'], '</th>
<td> </td>
</tr>';
foreach ($context['faqcats'] AS $cat)
{
echo '<tr>
<td align="center" class="windowbg2">', $cat['id_cat'], '</td>
<td align="left" class="windowbg2">', $cat['categories'], '</td>
<td align="center" class="windowbg2">', $cat['answers'], '</td>
<td align="center" class="windowbg2">
<a href="', $scripturl, '?module=FaqManagement;sa=faqcatgo;id_cat=', $cat['id_cat'], ';cat=', $cat['rowcat'], '">' . $txt['faq27'] . '</a><br />
<a href="', $scripturl, '?module=FaqManagement;sa=faqcatedit;id_cat=', $cat['id_cat'], '">' . $txt['faq09'] . '</a><br />
<a href="', $scripturl, '?module=FaqManagement;sa=faqcatdel;id_cat=', $cat['id_cat'], ';ok=0">' . $txt['faq28'] . '</a></td>
</tr>';
}
echo '
</table>
</div><br />
<form action="', $scripturl, '?module=FaqManagement;sa=faqcatadd" method="post">',
$txt['faq04'], ': <input type="text" name="categories" size="31">
<input type="submit" value="', $txt['faq05'], '">
</form>
</div>';
}
function template_Faq_CatGo()
{
global $context, $txt, $scripturl;
echo '
<form action="', $scripturl, '?module=FaqManagement;sa=faqcatgo" method="post">
<div class="tborder">
<table width="100%" align="center" border="0">
<tr>
<th class="titlebg" colspan="3">', $txt['faq22'], '</th>
</tr><tr class="catbg">
<th>', $txt['faq06'], '</th>
<th>', $txt['faq07'], '</th>
<th></th>
</tr>';
foreach ($context['faqcatsasw'] AS $asw)
{
echo '<tr>
<td align="left">', $asw['question'], '</td>
<td><p>', $asw['answer'], '</p></td>
<td align="center"><a href="', $scripturl, '?module=FaqManagement;sa=faqcatgoedit;id=', $asw['id'], ';id_cat=', $context['id_cat'], '">Edit</a> | <a href="', $scripturl, '?module=FaqManagement;sa=faqcatgodel;id=', $asw['id'], ';id_cat=', $context['id_cat'], ';ok=0">Delete</a></td>
</tr>';
}
echo '
</table>
</div>
</form>
<br /><br />
<font size=4><b>', $txt['faq08'], '</b></font>
<br /><br />
<form action="', $scripturl, '?module=FaqManagement;sa=faqcatgoadd" method="post">
<table border=0 width="100%">
<tr>
<td>', $txt['faq06'], ':</td>
<td><input type="text" name="question" size="31"></td>
</tr><tr>
<td>', $txt['faq07'], ':</td>
<td><textarea name="answer" cols="70" rows="15"></textarea></td>
</tr>
</table>
<input type="hidden" name="id_cat" value="', $context['id_cat'], '">
<!-- input type="hidden" name="cat" value="', urlencode($context['id_cat']), '" -->
<input type="submit" value="', $txt['faq05'], '">
</form>';
}
function template_Faq_CatEdit()
{
global $context, $txt, $scripturl;
echo '
<form action="', $scripturl, '?module=FaqManagement;sa=faqcatsave" method="post">
<input type="hidden" name="id_cat" value="', $context['id_cat'], '"> ', $txt['faq09'], ':
<input type="text" name="categories" size="31" value="', $context['categories'], '">
<input type="submit" value="', $txt['faq10'], '">
</form></p>';
}
function template_Faq_CatGoEdit()
{
global $context, $txt, $scripturl;
echo '
<form action="', $scripturl, '?module=FaqManagement;sa=faqcatgosave" method="post">
<input type="hidden" name="id" value="', $context['id'], '">
<table border="0" width="80%">
<caption>', $txt['faq11'], '</caption>
<tr>
<td>', $txt['faq06'], ': </td>
<td><input type="text" name="question" size="31" value="', $context['asw_edit']['question'], '"></td>
</tr><tr>
<td>', $txt['faq07'], ': </td>
<td><textarea name="answer" cols="70" rows="15">', $context['asw_edit']['answer'], '</textarea></td>
</tr>
</table>
<input type="hidden" name="id_cat" value="', $context['asw_edit']['id_cat'], '">
<input type="submit" value="', $txt['faq10'], '">
</form>';
}
function template_Faq_Delete()
{
global $context, $txt, $scripturl;
echo '
<div align="center"><p class="meaction">
<b>', $txt['faq12'], '</b><br /><br />
<font color="Black"></p>
[ <a href="', $scripturl, '?module=FaqManagement;sa=faqcatdel;id_cat=', $context['id_cat'], '&ok=1">', $txt['faq13'], '</a> |
<a href="', $scripturl, '?module=FaqManagement">', $txt['faq14'], '</a> ]<br /><br />
</div>';
}
function template_Faq_Delete_asw()
{
global $context, $txt, $scripturl;
echo '
<div align="center"><br />
<p class="meaction"><b>', $txt['faq15'], '</b></p>
[ <a href="', $scripturl, '?module=FaqManagement;sa=faqcatgodel;id=', $context['id'], ';id_cat=', $context['id_cat'], ';ok=1">', $txt['faq13'], '</a> | <a href="', $scripturl, '?module=FaqManagement;sa=faqcatgo;id_cat=', $context['id_cat'], '">', $txt['faq14'], '</a> ]<br /><br />
</div>';
}
?>