<?php
$module_css_path = ($line_domain['theme'] != "" && $line_domain['theme'] != "default") ? ($path . ('assets/themes/' . $line_domain['theme'] . '/')) : $path;

if(isset($_REQUEST['debug'])) {
    echo '<pre>', var_export($data, true), '</pre>';
}

$optres['css'][] = $module_css_path . 'amodules/news/css/news_template.css';

if(!isset($news_box_color)) {
    $news_box_color = 1;
}
else {
    $news_box_color += 1;
    if($news_box_color > 9) $news_box_color = 1;
}

$news_box_color_class = 'box-color' . $news_box_color;

?>
<div class="newspaper box <?=$news_box_color_class?> box-compact">
    <div class="box-header">
        <a href="<?php echo $data[1];?>" target="_blank" class="pull-left text-bold text-danger"><i class="fa fa-newspaper-o fa-lg text-muted"></i> <?php echo $data[0]; ?></a>
    </div>
    <div class="box-body">
        <ul class="list-unstyled">
            <?php
            for($i=0; $i<5; $i++){
                if(isset($data[2][$i])) {
                    ?>
                    <li><?php echo '<a href="'.$data[2][$i].'" class="pull-left" target="_blank">'. $data[3][$i] . '</a>'; ?></li>
                    <?php
                }
            }
            ?>
        </ul>
    </div>
</div>