<?php
switch ($type) {
    case 'person':
        ?>
        <div id="searchTitle">People</div>
        <div id="notificationsBody" class="notifications">
            <ul>
                <li>   
                    <?php
                    foreach ($searched_person as $person_value) {
                        ++$counter;
                        ?>
                        <a href="<?php echo base_url() . $person_value->url . '/profile' ?>" target="_blank">
                            <p><?php echo $person_value->person_first_name . ' ' . $person_value->person_last_name ?></p>
                        </a>
                        <?php
                    }
                    if ($total_searched_person > $counter) {
                        ?>
                        <a href="javascript:void(0)" 
                           onclick="getMoreSearchInfo('person', '<?php echo base_url() . 'get-more-search-info' ?>', '<?php echo $search_value ?>', '<?php echo $counter ?>')"
                           style="float:  right !important">
                            More.. &nbsp;&nbsp;&nbsp;
                        </a>
                        <hr>
                        <?php
                    }
                    echo '<br>';
                    ?>
                </li>
            </ul>
        </div>
        <?php
        break;

    case 'course':
        ?>
        <div id="searchTitle">Course</div>
        <div id="notificationsBody" class="notifications">
            <ul>
                <li>   
                    <?php
                    foreach ($searched_course as $course_value) {
                        ++$counter;
                        ?>
                        <a href="<?php echo base_url() . $course_value->url ?>" target="_blank">
                            <p><?php echo $course_value->course_name ?></p>
                        </a>
                        <?php
                    }
                    if ($total_searched_course > $counter) {
                        ?>
                        <a href="javascript:void(0)" 
                           onclick="getMoreSearchInfo('course', '<?php echo base_url() . 'get-more-search-info' ?>', '<?php echo $search_value ?>', '<?php echo $counter ?>')"
                           style="float:  right !important">
                            More.. &nbsp;&nbsp;&nbsp;
                        </a>
                        <hr>
                        <?php
                    }
                    echo '<br>';
                    ?>
                </li>
            </ul>
        </div>
        <?php
        break;

    case 'video_course':
        ?>
        <div id="searchTitle">Video Course</div>
        <div id="notificationsBody" class="notifications">
            <ul>
                <li>   
                    <?php
                    foreach ($searched_video_course as $video_course_value) {
                        ++$counter;
                        ?>
                        <a href="<?php echo base_url() . $video_course_value->url ?>" target="_blank">
                            <p><?php echo $video_course_value->video_course_title ?></p>
                        </a>
                        <?php
                    }
                    if ($total_searched_video_course > $counter) {
                        ?>
                        <a href="javascript:void(0)" 
                           onclick="getMoreSearchInfo('video_course', '<?php echo base_url() . 'get-more-search-info' ?>', '<?php echo $search_value ?>', '<?php echo $counter ?>')"
                           style="float:  right !important">
                            More.. &nbsp;&nbsp;&nbsp;
                        </a>
                        <hr>
                        <?php
                    }
                    echo '<br>';
                    ?>
                </li>
            </ul>
        </div>
        <?php
        break;


    case 'group':
        ?>
        <div id="searchTitle">Group</div>
        <div id="notificationsBody" class="notifications">
            <ul>
                <li>   
                    <?php
                    foreach ($searched_group as $group_value) {
                        ++$counter;
                        ?>
                        <a href="<?php echo base_url() . 'group/' . $group_value->url ?>" target="_blank">
                            <p><?php echo $group_value->group_name ?></p>
                        </a>
                        <?php
                    }
                    if ($total_searched_group > $counter) {
                        ?>
                        <a href="javascript:void(0)" 
                           onclick="getMoreSearchInfo('group', '<?php echo base_url() . 'get-more-search-info' ?>', '<?php echo $search_value ?>', '<?php echo $counter ?>')"
                           style="float:  right !important">
                            More.. &nbsp;&nbsp;&nbsp;
                        </a>
                        <hr>
                        <?php
                    }
                    echo '<br>';
                    ?>
                </li>
            </ul>
        </div>
        <?php
        break;


    case 'quiz':
        ?>
        <div id="searchTitle">Quiz</div>
        <div id="notificationsBody" class="notifications">
            <ul>
                <li>   
                    <?php
                    foreach ($searched_quiz as $quiz_value) {
                        ++$counter;
                        ?>
                        <a href="<?php echo base_url() . 'quiz/' . $quiz_value->url ?>" target="_blank">
                            <p><?php echo $quiz_value->quiz_name ?></p>
                        </a>
                        <?php
                    }
                    if ($total_searched_quiz > $counter) {
                        ?>
                        <a href="javascript:void(0)" 
                           onclick="getMoreSearchInfo('quiz', '<?php echo base_url() . 'get-more-search-info' ?>', '<?php echo $search_value ?>', '<?php echo $counter ?>')"
                           style="float:  right !important">
                            More.. &nbsp;&nbsp;&nbsp;
                        </a>
                        <hr>
                        <?php
                    }
                    echo '<br>';
                    ?>
                </li>
            </ul>
        </div>
        <?php
        break;
}