<!--Copyright (C) 2014  Web3king - Alberto Bonacina

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.
-->

<!doctype html>
<html>
    <head>
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
      <title>RistoMeal</title>
      <!-- If you are using CSS version, only link these 2 files, you may add app.css to use for your overrides if you like.
      <link href="<?php echo base_url();?>css/menu-style.css" rel="stylesheet"> -->
      <link href="<?php echo base_url();?>css/bootstrap.css" rel="stylesheet">
      <link href="<?php echo base_url();?>css/font-awesome.min.css" rel="stylesheet">
      <link href="<?php echo base_url();?>application/views/template/<?php echo $template['code'];?>/style.css" rel="stylesheet">
      <link href='http://fonts.googleapis.com/css?family=Raleway:300' rel='stylesheet' type='text/css'>
    </head>

    <body>

    <div id="main-content">
        
        <div class="row">
            <div class="col-md-6 col-md-offset-3"><!--Inizia parte dedicata al single-->
                <?php
                if($single['title'] != ''){

                    echo "<h1>".$single['title']."</h1><hr>";

                    if(is_array($single['starter'])){
                        echo "<h2>Antipasti</h2>";
                        echo "<ul>";
                        foreach ($single['starter'] as $bst) {
                          echo "<li><span class='name-title'>".$bst['name']."</span><span class='price-title'>€ ".$bst['price']."</span></li>";
                        }
                        echo "</ul>";
                    }
                    if(is_array($single['first'])){
                      echo "<h2>Primi</h2>";
                      echo "<ul>";
                        foreach ($single['first'] as $bfs) {
                          echo "<li><span class='name-title'>".$bfs['name']."</span><span class='price-title'>€ ".$bfs['price']."</span></li>";
                        }
                        echo "</ul>";
                    }
                    if(is_array($single['second'])){
                      echo "<h2>Secondi</h2>";
                      echo "<ul>";
                        foreach ($single['second'] as $bsc) {
                          echo "<li><span class='name-title'>".$bsc['name']."</span><span class='price-title'>€ ".$bsc['price']."</span></li>";
                        }
                        echo "</ul>";
                    }
                    if(is_array($single['sweet'])){
                      echo "<h2>Dolci</h2>";
                      echo "<ul>";
                        foreach ($single['sweet'] as $bsw) {
                          echo "<li><span class='name-title'>".$bsw['name']."</span><span class='price-title'>€ ".$bsw['price']."</span></li>";
                        }
                        echo "</ul>";
                    }
                    if(is_array($single['other'])){
                      echo "<h2>Altro</h2>";
                      echo "<ul>";
                        foreach ($single['other'] as $bot) {
                          echo "<li><span class='name-title'>".$bot['name']."</span><span class='price-title'>€ ".$bot['price']."</span></li>";
                        }
                        echo "</ul>";
                    }
                    if(is_array($single['wine'])){
                      echo "<h2>Vini</h2>";
                      echo "<ul>";
                        foreach ($single['wine'] as $bwn) {
                          echo "<li><span class='name-title'>".$bwn['name']."</span><span class='price-title'>€ ".$bwn['price']."</span></li>";
                        }
                        echo "</ul>";
                    }
                }
                ?>
            </div><!--Finisce parte dedicata al single-->

        </div>

    </div>
    