Bootswatch, Summernote, and Captcheck mods for Mods for HESK (mods-for-hesk.com). In use at support.netsyms.com.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

knowledgebase_private.php 19KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625
  1. <?php
  2. /*******************************************************************************
  3. * Title: Help Desk Software HESK
  4. * Version: 2.6.8 from 10th August 2016
  5. * Author: Klemen Stirn
  6. * Website: https://www.hesk.com
  7. ********************************************************************************
  8. * COPYRIGHT AND TRADEMARK NOTICE
  9. * Copyright 2005-2015 Klemen Stirn. All Rights Reserved.
  10. * HESK is a registered trademark of Klemen Stirn.
  11. * The HESK may be used and modified free of charge by anyone
  12. * AS LONG AS COPYRIGHT NOTICES AND ALL THE COMMENTS REMAIN INTACT.
  13. * By using this code you agree to indemnify Klemen Stirn from any
  14. * liability that might arise from it's use.
  15. * Selling the code for this program, in part or full, without prior
  16. * written consent is expressly forbidden.
  17. * Using this code, in part or full, to create derivate work,
  18. * new scripts or products is expressly forbidden. Obtain permission
  19. * before redistributing this software over the Internet or in
  20. * any other medium. In all cases copyright and header must remain intact.
  21. * This Copyright is in full effect in any country that has International
  22. * Trade Agreements with the United States of America or
  23. * with the European Union.
  24. * Removing any of the copyright notices without purchasing a license
  25. * is expressly forbidden. To remove HESK copyright notice you must purchase
  26. * a license for this script. For more information on how to obtain
  27. * a license please visit the page below:
  28. * https://www.hesk.com/buy.php
  29. *******************************************************************************/
  30. define('IN_SCRIPT',1);
  31. define('HESK_PATH','../');
  32. define('PAGE_TITLE', 'ADMIN_KB');
  33. define('MFH_PAGE_LAYOUT', 'TOP_ONLY');
  34. /* Get all the required files and functions */
  35. require(HESK_PATH . 'hesk_settings.inc.php');
  36. require(HESK_PATH . 'inc/common.inc.php');
  37. require(HESK_PATH . 'inc/admin_functions.inc.php');
  38. require(HESK_PATH . 'inc/knowledgebase_functions.inc.php');
  39. require(HESK_PATH . 'inc/mail_functions.inc.php');
  40. hesk_load_database_functions();
  41. hesk_session_start();
  42. hesk_dbConnect();
  43. hesk_isLoggedIn();
  44. hesk_kb_preheader();
  45. /* Is Knowledgebase enabled? */
  46. if ( ! $hesk_settings['kb_enable'])
  47. {
  48. hesk_error($hesklang['kbdis']);
  49. }
  50. /* Can this user manage Knowledgebase or just view it? */
  51. $can_man_kb = hesk_checkPermission('can_man_kb',0);
  52. /* Any category ID set? */
  53. $catid = intval( hesk_GET('category', 1) );
  54. $artid = intval( hesk_GET('article', 0) );
  55. if (isset($_GET['search']))
  56. {
  57. $query = hesk_input( hesk_GET('search') );
  58. }
  59. else
  60. {
  61. $query = 0;
  62. }
  63. $hesk_settings['kb_link'] = ($artid || $catid != 1 || $query) ? '<a href="knowledgebase_private.php">'.$hesklang['gopr'].'</a>' : ($can_man_kb ? $hesklang['gopr'] : '');
  64. if ($hesk_settings['kb_search'] && $query)
  65. {
  66. if (hesk_kb_search($query)) {
  67. hesk_show_kb_category(1,1);
  68. }
  69. }
  70. elseif ($artid)
  71. {
  72. // Show drafts only to staff who can manage knowledgebase
  73. if ($can_man_kb)
  74. {
  75. $result = hesk_dbQuery("SELECT t1.*, t2.`name` AS `cat_name`
  76. FROM `".hesk_dbEscape($hesk_settings['db_pfix'])."kb_articles` AS `t1`
  77. LEFT JOIN `".hesk_dbEscape($hesk_settings['db_pfix'])."kb_categories` AS `t2` ON `t1`.`catid` = `t2`.`id`
  78. WHERE `t1`.`id` = '{$artid}'
  79. ");
  80. }
  81. else
  82. {
  83. $result = hesk_dbQuery("SELECT t1.*, t2.`name` AS `cat_name`
  84. FROM `".hesk_dbEscape($hesk_settings['db_pfix'])."kb_articles` AS `t1`
  85. LEFT JOIN `".hesk_dbEscape($hesk_settings['db_pfix'])."kb_categories` AS `t2` ON `t1`.`catid` = `t2`.`id`
  86. WHERE `t1`.`id` = '{$artid}' AND `t1`.`type` IN ('0', '1')
  87. ");
  88. }
  89. $article = hesk_dbFetchAssoc($result) or hesk_error($hesklang['kb_art_id']);
  90. hesk_show_kb_article($artid);
  91. }
  92. else
  93. {
  94. hesk_show_kb_category($catid);
  95. }
  96. require_once(HESK_PATH . 'inc/footer.inc.php');
  97. exit();
  98. /*** START FUNCTIONS ***/
  99. function hesk_kb_preheader() {
  100. global $hesk_settings, $hesklang, $can_man_kb;
  101. /* Print admin navigation */
  102. require_once(HESK_PATH . 'inc/headerAdmin.inc.php');
  103. require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
  104. }
  105. function hesk_kb_header($kb_link, $catid=1)
  106. {
  107. global $hesk_settings, $hesklang, $can_man_kb;
  108. ?>
  109. <ol class="breadcrumb">
  110. <?php
  111. if ($can_man_kb)
  112. {
  113. ?>
  114. <li><a href="manage_knowledgebase.php"><?php echo $hesklang['kb']; ?></a></li>
  115. <?php
  116. }
  117. ?>
  118. <li class="active"><?php echo $kb_link; ?></li>
  119. </ol>
  120. <?php
  121. show_subnav('view', $catid);
  122. hesk_kbSearchLarge(1);
  123. } // END hesk_kb_header()
  124. function hesk_kb_search($query)
  125. {
  126. global $hesk_settings, $hesklang;
  127. $res = hesk_dbQuery('SELECT t1.`id`, t1.`subject`, LEFT(`t1`.`content`, '.max(200, $hesk_settings['kb_substrart'] * 2).') AS `content`, t1.`rating` FROM `'.hesk_dbEscape($hesk_settings['db_pfix']).'kb_articles` AS t1 LEFT JOIN `'.hesk_dbEscape($hesk_settings['db_pfix']).'kb_categories` AS t2 ON t1.`catid` = t2.`id` '." WHERE t1.`type` IN ('0','1') AND MATCH(`subject`,`content`,`keywords`) AGAINST ('".hesk_dbEscape($query)."') LIMIT ".intval($hesk_settings['kb_search_limit']));
  128. $num = hesk_dbNumRows($res);
  129. $show_default_category = false;
  130. ?>
  131. <div class="content-wrapper">
  132. <?php hesk_kb_header($hesk_settings['kb_link']); ?>
  133. <section style="padding: 15px">
  134. <div class="box">
  135. <div class="box-header with-border">
  136. <h1 class="box-title">
  137. <?php echo $hesklang['sr']; ?> (<?php echo $num; ?>)
  138. </h1>
  139. <div class="box-tools pull-right">
  140. <button type="button" class="btn btn-box-tool" data-widget="collapse">
  141. <i class="fa fa-minus"></i>
  142. </button>
  143. </div>
  144. </div>
  145. <div class="box-body">
  146. <?php
  147. if ($num == 0) {
  148. echo '<i>'.$hesklang['nosr'].'</i>';
  149. $show_default_category = true;
  150. } else {
  151. ?>
  152. <table class="table table-striped">
  153. <?php
  154. while ($article = hesk_dbFetchAssoc($res))
  155. {
  156. $txt = hesk_kbArticleContentPreview($article['content']);
  157. if ($hesk_settings['kb_rating'])
  158. {
  159. $rat = '<td width="1" valign="top">' . mfh_get_stars($article['rating']) . '</td>';
  160. }
  161. else
  162. {
  163. $rat = '';
  164. }
  165. echo '
  166. <tr>
  167. <td>
  168. <table border="0" width="100%" cellspacing="0" cellpadding="1">
  169. <tr>
  170. <td width="1" valign="top"><span class="glyphicon glyphicon-file"></span></td>
  171. <td valign="top"><a href="knowledgebase_private.php?article='.$article['id'].'">'.$article['subject'].'</a></td>
  172. '.$rat.'
  173. </tr>
  174. </table>
  175. <table border="0" width="100%" cellspacing="0" cellpadding="1">
  176. <tr>
  177. <td width="1" valign="top"><img src="../img/blank.gif" width="16" height="10" style="vertical-align:middle" alt="" /></td>
  178. <td><span class="article_list">'.$txt.'</span></td>
  179. </tr>
  180. </table>
  181. </td>
  182. </tr>';
  183. }
  184. ?>
  185. </table>
  186. <a href="javascript:history.go(-1)"><span class="glyphicon glyphicon-circle-arrow-left"></span>&nbsp;<?php echo $hesklang['back']; ?></a>
  187. <?php } ?>
  188. </div>
  189. </div>
  190. </section>
  191. </div>
  192. <?php
  193. return $show_default_category;
  194. } // END hesk_kb_search()
  195. function hesk_show_kb_article($artid)
  196. {
  197. global $hesk_settings, $hesklang, $article;
  198. // Print header
  199. $hesk_settings['tmp_title'] = $article['subject'];
  200. // Update views by 1
  201. hesk_dbQuery('UPDATE `'.hesk_dbEscape($hesk_settings['db_pfix'])."kb_articles` SET `views`=`views`+1 WHERE `id`={$artid}");
  202. ?>
  203. <div class="content-wrapper">
  204. <?php hesk_kb_header($hesk_settings['kb_link'], $article['catid']); ?>
  205. <section class="content">
  206. <div class="box">
  207. <div class="box-header with-border">
  208. <h1 class="box-title">
  209. <?php echo $article['subject']; ?>
  210. </h1>
  211. <div class="box-tools pull-right">
  212. <button type="button" class="btn btn-box-tool" data-widget="collapse">
  213. <i class="fa fa-minus"></i>
  214. </button>
  215. </div>
  216. </div>
  217. <div class="box-body">
  218. <?php echo $article['content']; ?>
  219. </div>
  220. <?php if (!empty($article['attachments'])): ?>
  221. <div class="box-footer">
  222. <p><b><?php echo $hesklang['attachments']; ?></b></p>
  223. <?php
  224. $att=explode(',',substr($article['attachments'], 0, -1));
  225. foreach ($att as $myatt)
  226. {
  227. list($att_id, $att_name) = explode('#', $myatt);
  228. echo '<i class="fa fa-paperclip"></i> <a href="../download_attachment.php?kb_att='.$att_id.'" rel="nofollow">'.$att_name.'</a><br />';
  229. }
  230. ?>
  231. </div>
  232. <?php endif; ?>
  233. </div>
  234. <?php
  235. if ($article['catid']==1)
  236. {
  237. $link = 'knowledgebase_private.php';
  238. }
  239. else
  240. {
  241. $link = 'knowledgebase_private.php?category='.$article['catid'];
  242. }
  243. ?>
  244. <br><br>
  245. <div class="row">
  246. <?php
  247. $showRelated = false;
  248. $column = 'col-md-12';
  249. require(HESK_PATH . 'inc/mail/email_parser.php');
  250. $query = hesk_dbEscape( $article['subject'] . ' ' . convert_html_to_text($article['content']) );
  251. // Get relevant articles from the database
  252. $res = hesk_dbQuery("SELECT `id`, `subject`, MATCH(`subject`,`content`,`keywords`) AGAINST ('{$query}') AS `score` FROM `".hesk_dbEscape($hesk_settings['db_pfix'])."kb_articles` WHERE `type` IN ('0','1') AND MATCH(`subject`,`content`,`keywords`) AGAINST ('{$query}') LIMIT ".intval($hesk_settings['kb_related']+1));
  253. // Array with related articles
  254. $related_articles = array();
  255. while ($related = hesk_dbFetchAssoc($res))
  256. {
  257. // Get base match score from the first (this) article
  258. if ( ! isset($base_score) )
  259. {
  260. $base_score = $related['score'];
  261. }
  262. // Ignore this article
  263. if ($related['id'] == $artid)
  264. {
  265. continue;
  266. }
  267. // Stop when articles reach less than 10% of base score
  268. if ($related['score'] / $base_score < 0.10)
  269. {
  270. break;
  271. }
  272. // This is a valid related article
  273. $related_articles[$related['id']] = $related['subject'];
  274. }
  275. // Print related articles if we have any valid matches
  276. if ( count($related_articles) ) {
  277. $column = 'col-md-6';
  278. $showRelated = true;
  279. }
  280. ?>
  281. <div class="<?php echo $column; ?> col-sm-12">
  282. <div class="box">
  283. <div class="box-header with-border">
  284. <h1 class="box-title">
  285. <?php echo $hesklang['ad']; ?>
  286. </h1>
  287. <div class="box-tools pull-right">
  288. <button type="button" class="btn btn-box-tool" data-widget="collapse">
  289. <i class="fa fa-minus"></i>
  290. </button>
  291. </div>
  292. </div>
  293. <div class="box-body">
  294. <table border="0">
  295. <tr>
  296. <td><?php echo $hesklang['aid']; ?>: </td>
  297. <td>
  298. <?php
  299. echo $article['id'];
  300. if ($article['type'] == 0)
  301. {
  302. echo ' [<a href="' . $hesk_settings['hesk_url'] . '/knowledgebase.php?article=' . $article['id'] . '">' . $hesklang['public_link'] . '</a>]';
  303. }
  304. ?>
  305. </td>
  306. </tr>
  307. <tr>
  308. <td><?php echo $hesklang['category']; ?>: </td>
  309. <td><a href="<?php echo $link; ?>"><?php echo $article['cat_name']; ?></a></td>
  310. </tr>
  311. <tr>
  312. <td><?php echo $hesklang['dta']; ?>: </td>
  313. <td><?php echo hesk_date($article['dt'], true); ?></td>
  314. </tr>
  315. <tr>
  316. <td><?php echo $hesklang['views']; ?>: </td>
  317. <td><?php echo (isset($_GET['rated']) ? $article['views'] : $article['views']+1); ?></td>
  318. </tr>
  319. </table>
  320. </div>
  321. </div>
  322. </div>
  323. <?php if ($showRelated) { ?>
  324. <div class="col-md-6 col-sm-12">
  325. <div class="box">
  326. <div class="box-header with-border">
  327. <h1 class="box-title">
  328. <?php echo $hesklang['relart']; ?>
  329. </h1>
  330. <div class="box-tools pull-right">
  331. <button type="button" class="btn btn-box-tool" data-widget="collapse">
  332. <i class="fa fa-minus"></i>
  333. </button>
  334. </div>
  335. </div>
  336. <div class="box-body">
  337. <?php
  338. // Related articles
  339. foreach ($related_articles as $id => $subject)
  340. {
  341. echo '<span class="glyphicon glyphicon-file" style="font-size: 16px;"></span> <a href="knowledgebase_private.php?article='.$id.'">'.$subject.'</a><br />';
  342. }
  343. ?>
  344. </div>
  345. </div>
  346. </div>
  347. <?php } ?>
  348. </div>
  349. <?php
  350. if (!isset($_GET['back']))
  351. {
  352. ?>
  353. <p><br /><a href="javascript:history.go(-1)"><span class="glyphicon glyphicon-circle-arrow-left"></span>&nbsp;<?php echo $hesklang['back']; ?></a></p>
  354. <?php
  355. }
  356. ?>
  357. </section>
  358. </div>
  359. <?php
  360. } // END hesk_show_kb_article()
  361. function hesk_show_kb_category($catid, $is_search = 0) {
  362. global $hesk_settings, $hesklang;
  363. $res = hesk_dbQuery("SELECT `name`,`parent` FROM `".hesk_dbEscape($hesk_settings['db_pfix'])."kb_categories` WHERE `id`='".intval($catid)."' LIMIT 1");
  364. $thiscat = hesk_dbFetchAssoc($res) or hesk_error($hesklang['kb_cat_inv']);
  365. ?>
  366. <div class="content-wrapper">
  367. <?php
  368. if ($is_search == 0)
  369. {
  370. /* Print header */
  371. hesk_kb_header($hesk_settings['kb_link'], $catid);
  372. } ?>
  373. <section class="content">
  374. <?php if ($thiscat['parent']): ?>
  375. <h3><?php echo $hesklang['kb_cat'].': '.$thiscat['name']; ?></h3>
  376. <p align="left"><a href="javascript:history.go(-1)">
  377. <span class="glyphicon glyphicon-circle-arrow-left"></span>
  378. <?php echo $hesklang['back']; ?>
  379. </a></p>
  380. <?php
  381. endif;
  382. $result = hesk_dbQuery("SELECT `id`,`name`,`articles`,`type` FROM `".hesk_dbEscape($hesk_settings['db_pfix'])."kb_categories` WHERE `parent`='".intval($catid)."' ORDER BY `parent` ASC, `cat_order` ASC");
  383. if (hesk_dbNumRows($result) > 0) {
  384. ?>
  385. <div class="box">
  386. <div class="box-header with-border">
  387. <h1 class="box-title">
  388. <?php echo $hesklang['kb_cat_sub']; ?>
  389. </h1>
  390. <div class="box-tools pull-right">
  391. <button type="button" class="btn btn-box-tool" data-widget="collapse">
  392. <i class="fa fa-minus"></i>
  393. </button>
  394. </div>
  395. </div>
  396. <div class="box-body">
  397. <table class="table table-striped">
  398. <?php
  399. $per_col = $hesk_settings['kb_cols'];
  400. $i = 1;
  401. while ($cat = hesk_dbFetchAssoc($result))
  402. {
  403. if ($i == 1)
  404. {
  405. echo '<tr>';
  406. }
  407. $private = ($cat['type'] == 1) ? ' *' : '';
  408. echo '
  409. <td width="50%" valign="top">
  410. <table border="0">
  411. <tr><td><span class="glyphicon glyphicon-folder-close"></span>&nbsp;<a href="knowledgebase_private.php?category='.$cat['id'].'">'.$cat['name'].'</a>'.$private.'</td></tr>
  412. ';
  413. /* Print most popular/sticky articles */
  414. if ($hesk_settings['kb_numshow'] && $cat['articles'])
  415. {
  416. $res = hesk_dbQuery("SELECT `id`,`subject`,`type` FROM `".hesk_dbEscape($hesk_settings['db_pfix'])."kb_articles` WHERE `catid`='".intval($cat['id'])."' AND `type` IN ('0','1') ORDER BY `sticky` DESC, `views` DESC, `art_order` ASC LIMIT " . (intval($hesk_settings['kb_numshow']) + 1) );
  417. $num = 1;
  418. while ($art = hesk_dbFetchAssoc($res))
  419. {
  420. $private = ($art['type'] == 1) ? ' *' : '';
  421. echo '
  422. <tr>
  423. <td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="glyphicon glyphicon-file"></span>
  424. <a href="knowledgebase_private.php?article='.$art['id'].'" class="article">'.$art['subject'].'</a>'.$private.'</td>
  425. </tr>';
  426. if ($num == $hesk_settings['kb_numshow'])
  427. {
  428. break;
  429. }
  430. else
  431. {
  432. $num++;
  433. }
  434. }
  435. if (hesk_dbNumRows($res) > $hesk_settings['kb_numshow'])
  436. {
  437. echo '<tr><td>&raquo; <a href="knowledgebase_private.php?category='.$cat['id'].'"><i>'.$hesklang['m'].'</i></a></td></tr>';
  438. }
  439. }
  440. echo '
  441. </table>
  442. </td>
  443. ';
  444. if ($i == $per_col)
  445. {
  446. echo '</tr>';
  447. $i = 0;
  448. }
  449. $i++;
  450. }
  451. /* Finish the table if needed */
  452. if ($i != 1)
  453. {
  454. for ($j=1;$j<=$per_col;$j++)
  455. {
  456. echo '<td width="50%">&nbsp;</td>';
  457. if ($i == $per_col)
  458. {
  459. echo '</tr>';
  460. break;
  461. }
  462. $i++;
  463. }
  464. }
  465. ?>
  466. </table>
  467. </div>
  468. <div class="box-footer">
  469. <?php echo $hesklang['private_category_star']; ?>
  470. </div>
  471. </div>
  472. <?php } ?>
  473. <div class="box">
  474. <div class="box-header with-border">
  475. <h1 class="box-title">
  476. <?php echo $hesklang['ac']; ?>
  477. </h1>
  478. <div class="box-tools pull-right">
  479. <button type="button" class="btn btn-box-tool" data-widget="collapse">
  480. <i class="fa fa-minus"></i>
  481. </button>
  482. </div>
  483. </div>
  484. <div class="box-body">
  485. <?php
  486. $res = hesk_dbQuery("SELECT `id`, `subject`, LEFT(`content`, ".max(200, $hesk_settings['kb_substrart'] * 2).") AS `content`, `rating`, `type` FROM `".hesk_dbEscape($hesk_settings['db_pfix'])."kb_articles` WHERE `catid`='".intval($catid)."' AND `type` IN ('0','1') ORDER BY `sticky` DESC, `art_order` ASC");
  487. if (hesk_dbNumRows($res) == 0)
  488. {
  489. echo '<i>'.$hesklang['noac'].'</i>';
  490. }
  491. else
  492. {
  493. echo '<table border="0" cellspacing="1" cellpadding="3" width="100%">';
  494. while ($article = hesk_dbFetchAssoc($res))
  495. {
  496. $private = ($article['type'] == 1) ? ' *' : '';
  497. $txt = hesk_kbArticleContentPreview($article['content']);
  498. echo '
  499. <tr>
  500. <td>
  501. <table border="0" width="100%" cellspacing="0" cellpadding="1">
  502. <tr>
  503. <td width="1" valign="top"><span class="glyphicon glyphicon-file"></span></td>
  504. <td valign="top"><a href="knowledgebase_private.php?article='.$article['id'].'">'.$article['subject'].'</a>'.$private.'</td>
  505. </tr>
  506. </table>
  507. <table border="0" width="100%" cellspacing="0" cellpadding="1">
  508. <tr>
  509. <td width="1" valign="top"><img src="../img/blank.gif" width="16" height="10" style="vertical-align:middle" alt="" /></td>
  510. <td><span class="article_list">'.$txt.'</span></td>
  511. </tr>
  512. </table>
  513. </td>
  514. </tr>';
  515. }
  516. echo '</table>';
  517. }
  518. ?>
  519. </div>
  520. <div class="box-footer">
  521. <?php echo $hesklang['private_article_star']; ?>
  522. </div>
  523. </div>
  524. </section>
  525. </div>
  526. <?php
  527. } // END hesk_show_kb_category()
  528. function show_subnav($hide='', $catid=1)
  529. {
  530. global $hesk_settings, $hesklang, $can_man_kb, $artid;
  531. if ( ! $can_man_kb)
  532. {
  533. echo '';
  534. return true;
  535. }
  536. $catid = intval($catid);
  537. echo '<div style="margin-left:40px;margin-right:40px">';
  538. $link['view'] = '<a href="knowledgebase_private.php"><i class="fa fa-search" style="font-size:16px"></i></a> <a href="knowledgebase_private.php">'.$hesklang['gopr'].'</a> | ';
  539. $link['newa'] = '<a href="manage_knowledgebase.php?a=add_article&amp;catid='.$catid.'"><i class="fa fa-plus" style="color: green;font-size:16px"></i></a> <a href="manage_knowledgebase.php?a=add_article&amp;catid='.$catid.'">'.$hesklang['kb_i_art'].'</a> | ';
  540. $link['newc'] = '<a href="manage_knowledgebase.php?a=add_category&amp;parent='.$catid.'"><i class="fa fa-caret-right" style="font-size:18px; color:blue"></i></a> <a href="manage_knowledgebase.php?a=add_category&amp;parent='.$catid.'">'.$hesklang['kb_i_cat'].'</a> | ';
  541. if ($hide && isset($link[$hide]))
  542. {
  543. $link[$hide] = preg_replace('/<a([^<]*)>/', '', $link[$hide]);
  544. $link[$hide] = str_replace('</a>','',$link[$hide]);
  545. }
  546. ?>
  547. <form style="margin:0px;padding:0px;" method="get" action="manage_knowledgebase.php">
  548. <?php
  549. echo $link['view'];
  550. echo $link['newa'];
  551. echo $link['newc'];
  552. ?>
  553. <i class="fa fa-pencil" style="color:orange;font-size:16px"></i> <input type="hidden" name="a" value="edit_article" /><?php echo $hesklang['aid']; ?>: <input type="text" name="id" size="3" <?php if ($artid) echo 'value="' . $artid . '"'; ?> /> <input type="submit" value="<?php echo $hesklang['edit']; ?>" class="btn btn-default btn-xs" />
  554. </form>
  555. </div>
  556. <?php
  557. } // End show_subnav()
  558. ?>