<?php

require_once 'inc/helpers.php';
$kategorie = getParameter('kategorie');
$l_courses = getOnlineCoursesByCategory('course');
$l_courses_advanced = getOnlineCoursesByCategory('course_advanced');
$l_exams = getOnlineCoursesByCategory('exam');
$boxtext2trans1 = MYSQLI_QUERY($link, "Select {$lang} From `translations` where translationid =6");
$boxtext2trans1x = mysqli_fetch_array($boxtext2trans1);
$boxtext2trans2 = MYSQLI_QUERY($link, "Select {$lang} From `translations` where translationid =7");
$boxtext2trans2x = mysqli_fetch_array($boxtext2trans2);
$boxtext2trans3 = MYSQLI_QUERY($link, "Select {$lang} From `translations` where translationid =10");
$boxtext2trans3x = mysqli_fetch_array($boxtext2trans3);
?>

<div id="reiter2"><?php 
echo $boxtext2trans2x[0];
?>
</div> 
<ul>
<?php 
while ($daten2 = mysqli_fetch_array($l_courses)) {
    ?>
	<li <?php 
    if ($daten2['id'] == $kategorie) {
        echo "class='linkhover'";
    }
    ?>
><a  href="termine.php?lang=<?php 
    echo $lang;
    ?>
<?php

// getting all courses types of a certain category
$course_selection = getOnlineCoursesByCategory($course_category);
?>

<ul>
<?php 
while ($daten2 = mysqli_fetch_array($course_selection)) {
    ?>
	<?php 
    $course_tyoe_id = $daten2['id'];
    ?>
	<li>
		<a  href="/termine.php?lang=<?php 
    echo $lang;
    ?>
&kategorie=<?php 
    echo $course_tyoe_id;
    ?>
"><?php 
    echo nl2br(trim(getTranslationValue($daten2['title'], $lang)));
    ?>
</a>
		<?php 
    // getting all courses of a certain course type
    $courses = MYSQLI_QUERY($link, "Select * From `termine` where deaktiviert = 0 and courseTypeID = {$course_tyoe_id} order by datum_von asc");
    ?>
		<p class="list-text">
			<?php 
    if (mysqli_num_rows($courses) > 0) {
<?php

require_once 'inc/helpers.php';
$nav_a_class = $lang == "ru" ? 'russnav' : '';
$l_courses = getOnlineCoursesByCategory('course');
$l_courses_advanced = getOnlineCoursesByCategory('course_advanced');
#Menü override!!!!
$abfrage2 = MYSQLI_QUERY($link, "Select seite,boxtext_" . $lang . " From `content` where sort <> 0 order by sort asc");
?>
<div id="menu" >
<ul class="sf-menu">
	<li class="line">
		<a class="<?php 
echo $nav_a_class;
?>
" href="kursangebot.php?lang=<?php 
echo $lang;
?>
"><?php 
echo t('menu.main.course_descriptions');
?>
</a>
		<ul>
			<li class="noline"><a href="kursangebot.php?lang=<?php 
echo $lang;
?>
" class="<?php 
echo $nav_a_class;
?>
"><?php 
echo t('menu.main.what_is_vt');