mirror of
https://github.com/slawkens/myaac.git
synced 2025-10-14 01:34:55 +02:00
* moved some more pages to twig
* moved online, movies, google_analytics code, faq, experience_table, downloads to twig * added new global variabl to twig (status) * removed some unused page (custom.php) * automatically append trailing slash at config.item_images_url * moved downloads from clients.halfaway.net to tibia-clients.com * show some more info on monster loot (currently only on TFS 0.3 and those that use item.id in monster files instead of item name) * some more unimportant fixes
This commit is contained in:
@@ -20,47 +20,10 @@ if(!$faqs->rowCount())
|
||||
There are no questions added yet.
|
||||
<?php
|
||||
if(admin())
|
||||
echo ' You can add new faq questions in phpmyadmin under ' . TABLE_PREFIX . 'faq table.';
|
||||
echo ' You can add new faq questions in phpmyadmin under <b>' . TABLE_PREFIX . 'faq</b> table.';
|
||||
}
|
||||
|
||||
echo $twig->render('faq.html.twig', array(
|
||||
'faqs' => $faqs
|
||||
));
|
||||
?>
|
||||
<table border="0" cellspacing="0" cellpadding="0" width="100%">
|
||||
<tr bgcolor="<?php echo $config['vdarkborder']; ?>">
|
||||
<td class="white">
|
||||
<b>FAQ</b>
|
||||
</td>
|
||||
<td align="right">
|
||||
<a href="#" onclick="toggleAll(); return false;">Toggle all</a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
$i = 0;
|
||||
foreach($faqs as $faq): ?>
|
||||
<tr bgcolor="<?php echo getStyle(++$i); ?>">
|
||||
<td colspan="2" style="cursor: pointer;" onclick="toggleVisibility('faq_<?php echo $i; ?>'); return false;">
|
||||
<b><?php echo $faq['question']; ?></b>
|
||||
<div id="faq_<?php echo $i; ?>" style="display: none;"><?php echo $faq['answer']; ?></div>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</table>
|
||||
|
||||
<script type="text/javascript">
|
||||
var expanded = false;
|
||||
|
||||
function toggleVisibility(id)
|
||||
{
|
||||
var tmp = document.getElementById(id);
|
||||
if(tmp)
|
||||
tmp.style.display = tmp.style.display == 'none' ? '' : 'none';
|
||||
}
|
||||
|
||||
function toggleAll()
|
||||
{
|
||||
for(i = 1; i < <?php echo $i + 1; ?>; i++)
|
||||
{
|
||||
document.getElementById('faq_' + i).style.display = expanded ? 'none' : '';
|
||||
}
|
||||
|
||||
expanded = !expanded;
|
||||
}
|
||||
</script>
|
||||
|
Reference in New Issue
Block a user