-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathindex.php
executable file
·98 lines (91 loc) · 3.73 KB
/
index.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
<?php
/*********************************************************************
index.php
Helpdesk landing page. Please customize it to fit your needs.
Peter Rotich <[email protected]>
Copyright (c) 2006-2013 osTicket
http://www.osticket.com
Released under the GNU General Public License WITHOUT ANY WARRANTY.
See LICENSE.TXT for details.
vim: expandtab sw=4 ts=4 sts=4:
**********************************************************************/
require('client.inc.php');
require_once INCLUDE_DIR . 'class.page.php';
$section = 'home';
require(CLIENTINC_DIR.'header.inc.php');
?>
<section class="section">
<div class="row">
<div class="col-xl-8">
<div class="card">
<div class="card-block">
<?php
if ($cfg && $cfg->isKnowledgebaseEnabled()) { ?>
<form method="get" action="kb/faq.php">
<div class="row">
<div class="col-md-10 form-group">
<input type="hidden" name="a" value="search"/>
<input type="text" name="q" class="form-control" placeholder="<?php echo __('Search our knowledge base'); ?>"/>
</div>
<div class="col-md-2 form-group">
<button type="submit" class="btn btn-primary-outline"><?php echo __('Search'); ?></button>
</div>
</div>
<hr>
</form>
<?php } ?>
<?php if($cfg && ($page = $cfg->getLandingPage()))
echo $page->getBodyWithImages();
else
echo '<h1>'.__('Welcome to the Support Center').'</h1>';
?>
</div>
</div>
<section>
<?php
if($cfg && $cfg->isKnowledgebaseEnabled()){
//FIXME: provide ability to feature or select random FAQs ??
?>
<?php
$cats = Category::getFeatured();
if ($cats->all()) { ?>
<br>
<div class="subtitle-block">
<h3 class="subtitle"><?php echo __('Featured Knowledge Base Articles'); ?></h3>
</div>
<div class="card">
<?php
}
foreach ($cats as $C) { ?>
<section>
<div class="card-block row sameheight-items">
<div class="col-md-2"><i class="fa fa-3x fa-folder-open"></i></div>
<div class="col-md-10">
<div class="header-block">
<h3 class="title"><?php echo $C->getName(); ?></h3>
</div>
<div class="card-block">
<?php foreach ($C->getTopArticles() as $F) { ?>
<div class="article-headline">
<div class="article-title"><a href="<?php echo ROOT_PATH;
?>kb/faq.php?id=<?php echo $F->getId(); ?>"><?php
echo $F->getQuestion(); ?></a></div>
<div class="article-teaser"><?php echo $F->getTeaser(); ?></div>
</div>
<?php } ?>
</div>
</div>
</div>
</section>
<hr>
<?php
} ?>
</div>
<?php }
?>
</section>
</div>
<?php include CLIENTINC_DIR.'templates/sidebar.tmpl.php'; ?>
</div>
</section>
<?php require(CLIENTINC_DIR.'footer.inc.php'); ?>