<html lang="en">
    <head>
        <meta charset="utf-8" />
        <title>Delivery</title>
        <link rel="stylesheet" type="text/css" href="<?= site_url() ?>css/style.css" media="screen">
        <link rel="stylesheet" type="text/css" href="<?= site_url() ?>css/navi.css" media="screen">
        <link rel="stylesheet" href="<?= site_url() ?>css/accordionmenu.css" type="text/css" media="screen" />
        <style type="text/css">#wrapper-250{width:98%;margin:0 auto;}</style>
        <meta name="robots" content="noindex,follow" />
        <script type="text/javascript" src="<?= site_url() ?>js/jquery-1.8.3.js"></script>
        <script type="text/javascript">

            $(document).ready(function() {
                // Store variables
                var accordion_head = $('.accordion > li > a'),
                        accordion_body = $('.accordion li > .sub-menu');
                // Open the first tab on load
                accordion_head.first().addClass('active').next().slideDown('normal');
                // Click function
                accordion_head.on('click', function(event) {
                    // Disable header links
                    event.preventDefault();
                    // Show and hide the tabs on click
                    if ($(this).attr('class') != 'active') {
                        accordion_body.slideUp('normal');
                        $(this).next().stop(true, true).slideToggle('normal');
                        accordion_head.removeClass('active');
                        $(this).addClass('active');
                    }
                });
            });
        </script>
    </head>
    <body>      
        <br> 
        <div id="wrapper-250">
            <h2><span style="color: white;">Delivery</span></h2>
           <ul class="accordion">               
                <?php
                foreach ($orders as $order) {
                    echo "<li id=" . $order['CALLID'] . ">";
                    echo "<a href=#one>" . $order['NAME'] . "</a>";
                    echo "<ul class=sub-menu id=sub-menu>";
                    echo "<li class=green id=" . $order['ID'] . "><img src=" . site_url() . "images/add4.png alt=add  style=margin:-12px></button></em>&nbsp;Delivered</a></li>";
                    echo "</ul>";
                    echo "</li>";
                }
                ?>

            </ul>
        </div>
    </body>
</html>