'.$hesklang['kb_text'].'' : $hesklang['kb_text']; if ($hesk_settings['kb_search'] && $query) { hesk_kb_search($query); } elseif ($artid) { $sql = ' SELECT t1 . * 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`.`id` = '.hesk_dbEscape($artid).' AND `t1`.`type` = \'0\' AND `t2`.`type` = \'0\' LIMIT 0 , 30'; $result = hesk_dbQuery($sql); $article = hesk_dbFetchAssoc($result) or hesk_error($hesklang['kb_art_id']); hesk_show_kb_article($artid); } else { hesk_show_kb_category($catid); } require_once(HESK_PATH . 'inc/footer.inc.php'); exit(); /*** START FUNCTIONS ***/ function hesk_kb_header($kb_link) { global $hesk_settings, $hesklang; ?>
> >

» ()

'.$hesklang['nosr'].'

 

'; hesk_show_kb_category(1,1); } else { ?>
 
$hesk_settings['kb_substrart']) { $txt = substr(strip_tags($article['content']),0,$hesk_settings['kb_substrart']).'...'; } if ($hesk_settings['kb_rating']) { $alt = $article['rating'] ? sprintf($hesklang['kb_rated'], sprintf("%01.1f", $article['rating'])) : $hesklang['kb_not_rated']; $rat = ''; } else { $rat = ''; } echo ' '; } ?>
'.$alt.'
'.$rat.'
'.$article['subject'].'
'.$txt.'
 

 
«

'.$article['subject'].'
'.$hesklang['as'].' '. $article['content']; if (!empty($article['attachments'])) { echo '

'.$hesklang['attachments'].':
'; $att=explode(',',substr($article['attachments'], 0, -1)); foreach ($att as $myatt) { list($att_id, $att_name) = explode('#', $myatt); echo ''.$att_name.' '.$att_name.'
'; } echo '

'; } if ($hesk_settings['kb_rating'] && (empty($_COOKIE['hesk_kb_rate']) || strpos($_COOKIE['hesk_kb_rate'],'a'.$artid.'%')===false)) { echo '
 
'.$hesklang['rart'].' '.strtolower($hesklang['yes']).' / '.strtolower($hesklang['no']).'
'; } echo '
'; if ($article['catid']==1) { $link = 'knowledgebase.php'; } else { $link = 'knowledgebase.php?category='.$article['catid']; } ?>
'; } ?>
:
:
:
:
'.$hesklang['rating'].' ('.$hesklang['votes'].'): '.$alt.' ('.$article['votes'].')

 
«

 

» '.$hesklang['kb_cat'].': '.$thiscat['name'].'  ('.$hesklang['back'].') '; } $sql = 'SELECT * FROM `'.hesk_dbEscape($hesk_settings['db_pfix']).'kb_categories` WHERE `parent`=\''.hesk_dbEscape($catid).'\' AND `type`=\'0\' ORDER BY `parent` ASC, `cat_order` ASC'; $result = hesk_dbQuery($sql); if (hesk_dbNumRows($result) > 0) { ?>

» :

  '; } echo ' '; if ($i == $per_col) { echo ''; $i = 0; } $i++; } /* Finish the table if needed */ if ($i != 1) { for ($j=1;$j<=$per_col;$j++) { echo ''; if ($i == $per_col) { echo ''; break; } $i++; } } ?>
'; /* Print most popular/sticky articles */ if ($hesk_settings['kb_numshow'] && $cat['articles']) { $sql = 'SELECT `id`,`subject` FROM `'.hesk_dbEscape($hesk_settings['db_pfix']).'kb_articles` WHERE `catid`=\''.hesk_dbEscape($cat['id']).'\' AND `type`=\'0\' ORDER BY `sticky` DESC, `views` DESC, `art_order` ASC LIMIT '.hesk_dbEscape($hesk_settings['kb_numshow']+1); $res = hesk_dbQuery($sql); $num = 1; while ($art = hesk_dbFetchAssoc($res)) { echo ' '; if ($num == $hesk_settings['kb_numshow']) { break; } else { $num++; } } if (hesk_dbNumRows($res) > $hesk_settings['kb_numshow']) { echo ''; } } echo '
'.$cat['name'].'
'.$art['subject'].'
» '.$hesklang['m'].'
 
  
0 ?>

»

  '.$hesklang['noac'].'

'; } else { echo '
'; while ($article = hesk_dbFetchAssoc($res)) { $txt = strip_tags($article['content']); if (strlen($txt) > $hesk_settings['kb_substrart']) { $txt = substr(strip_tags($article['content']),0,$hesk_settings['kb_substrart']).'...'; } if ($hesk_settings['kb_rating']) { $alt = $article['rating'] ? sprintf($hesklang['kb_rated'], sprintf("%01.1f", $article['rating'])) : $hesklang['kb_not_rated']; $rat = ''; } else { $rat = ''; } echo ' '; } echo '
'.$alt.'
'.$rat.'
'.$article['subject'].'
'.$txt.'
'; } ?>