Skip to content
Snippets Groups Projects
faq.inc.php 1.82 KiB
Newer Older
  • Learn to ignore specific revisions
  • Jared Hancock's avatar
    Jared Hancock committed
    <?php
    if(!defined('OSTCLIENTINC') || !$faq  || !$faq->isPublished()) die('Access Denied');
    
    $category=$faq->getCategory();
    
    ?>
    
    <div class="row">
    <div class="span8">
    
    
    <h1><?php echo __('Frequently Asked Questions');?></h1>
    
    Jared Hancock's avatar
    Jared Hancock committed
    <div id="breadcrumbs">
    
        <a href="index.php"><?php echo __('All Categories');?></a>
    
        &raquo; <a href="faq.php?cid=<?php echo $category->getId(); ?>"><?php echo $category->getName(); ?></a>
    
    Jared Hancock's avatar
    Jared Hancock committed
    </div>
    
    
    <div class="faq-content">
    <div class="article-title flush-left">
    <?php echo $faq->getLocalQuestion() ?>
    
    Jared Hancock's avatar
    Jared Hancock committed
    </div>
    
    <div class="faded"><?php echo __('Last updated').' '.Format::daydatetime($category->getUpdateDate()); ?></div>
    
    <br/>
    <div class="thread-body bleed">
    
    <?php echo Format::safe_html($faq->getLocalAnswerWithImages()); ?>
    
    <div class="span4 pull-right">
    <div class="sidebar">
    <div class="searchbar">
        <form method="get" action="faq.php">
        <input type="hidden" name="a" value="search"/>
        <input type="text" name="q" class="search" placeholder="<?php
            echo __('Search our knowledge base'); ?>"/>
        <input type="submit" style="display:none" value="search"/>
        </form>
    
    Jared Hancock's avatar
    Jared Hancock committed
    </div>
    
    <div class="content">
    <?php if ($attachments = $faq->getVisibleAttachments()) { ?>
    <section>
        <strong><?php echo __('Attachments');?>:</strong>
    <?php foreach ($attachments as $att) { ?>
        <div>
        <a href="file.php?h=<?php echo $att['download']; ?>" class="no-pjax">
            <i class="icon-file"></i>
            <?php echo Format::htmlchars($att['name']); ?>
        </a>
        </div>
    <?php } ?>
    </section>
    <?php } ?>
    
    <?php if ($faq->getHelpTopics()->count()) { ?>
    <section>
        <strong><?php echo __('Help Topics'); ?></strong>
    <?php foreach ($faq->getHelpTopics() as $topic) { ?>
        <div><?php echo $topic->getFullName(); ?></div>
    <?php } ?>
    </section>
    <?php } ?>
    </div>
    </div>
    </div>
    
    </div>
    
    <?php $faq->logView(); ?>