예제 #1
0
                                        </div>
                                    </div>
                                    <div class="col-md-19">
                                        <div class="arhiv-box-text">
                                            <h3><a href="/<?php 
        echo $lng . '/' . page_url_by_id($lng, $item->source) . '/' . ($item->source == 3 ? get_pre_url($lng, $item->source) : ($item->source == 1 ? get_pre_url($lng, $item->id) : null)) . $item->{'url_' . $lng};
        ?>
"><?php 
        echo $item->{'name_' . $lng};
        ?>
</a></h3>
                                            <p><?php 
        echo read_more($item->{'text_' . $lng}, 50);
        ?>
 <a href="/<?php 
        echo $lng . '/' . page_url_by_id($lng, $item->source) . '/' . ($item->source == 3 ? get_pre_url($lng, $item->source) : ($item->source == 1 ? get_pre_url($lng, $item->id) : null)) . $item->{'url_' . $lng};
        ?>
">[...]</a></p>
                                        </div>
                                        <div class="date-social-arhiv">
                                            <div class="date-time-arhiv">
                                                <span><i class="mdi mdi-calendar-clock"></i><?php 
        echo show_date($item->data);
        ?>
</span>
                                                <span><i class="mdi mdi-eye"></i><?php 
        echo $item->visits;
        ?>
</span>
                                            </div>
                                        </div>
function get_pre_url_table($lng, $table = null, $source = null)
{
    $array = array('investigatii' => '1', 'cetatean' => '5', 'dosare' => '6', 'achizitii' => '7', 'blog' => '3', 'stiri' => '2', 'interviu' => '12');
    $sergment2 = page_url_by_id($lng, $array[$table]);
    if ($array[$table] == 1 || $array[$table] == 3) {
        $segment3 = get_pre_url($lng, $source);
        $url = $sergment2 . '/' . $segment3;
    } else {
        $url = $sergment2 . '/';
    }
    return $url;
}