<?php
if(!empty($message))
    echo $message;

if(empty($article))
    return;

function show_article($ci, $article)
{
?>

                    <table style="width:100%;display: block;">
                        <tr>
                         <?php

                            echo '<td '.(empty($article['galleries']) ? '':'style="width:200px; margin-right:30px;"').'>';
                            echo '<h2 class="section_name">'.$article['name'].'</h2>';
                            echo '<p>'.$article['content'].'</p>';

                        if(!empty($article['galleries']))
                        {
                            echo '</td><td>';
                            echo '<div style="margin-top:30px;">';
                                $ci->load->view('front/elements/article_gallery',array('images'=>$article['galleries']));
                            echo '</div>';
                        }

                        if($article['contact_form'])
                        {
                            echo '<br /><br />';
                            $ci->load->view('front/elements/contact_form');
                        }
                        
                        if($article['google_map'])
                            $ci->load->view('front/elements/google_map',$ci->settings['google_map']);
                    ?>
                            </td>
                        </tr>
                    </table>
<?php
}
?>



<div id="page_content_top"></div>

<div id="article_body">
<?php
    if(empty($article['subarticles']) && is_array($article['subarticles']))
    {
        echo '<div>';
                show_article($this, $article);
        echo '</div>';
    }
    else
    {
?>

            <div id="page_content_col_left">

                        <?php
                                if(!empty($articles_menu))
                                    echo $articles_menu;

                                echo '<br />';
                        ?>
            </div>
            <div id="page_content_col_right">
                <?php   show_article($this,$article); ?>
            </div>
<?php
    }
?>
</div>

