$sites = init("sites", "r", FALSE);
// init
$join = "";
$where = "";
// sollte man mal umstrukturieren..
if ($send) {
    // Volltext
    if (!empty($fulltext)) {
        if (!empty($where)) {
            $where .= " AND ";
        }
        $where .= " (e.title LIKE '%" . clean_in($fulltext) . "%' OR k.keyword LIKE '%" . clean_in($fulltext) . "%') ";
        $join .= " LEFT JOIN press_ke_rel AS kerel ON kerel.eid=e.id " . "LEFT JOIN press_keywords AS k ON kerel.kid=k.id ";
    }
    // Datumsfunktion
    $d = set_date($date);
    switch ($range) {
        default:
        case 'all':
            break;
        case 'before':
            if (!empty($where)) {
                $where .= " AND ";
            }
            $where .= " (date <= '" . $d . "')";
            break;
        case 'after':
            if (!empty($where)) {
                $where .= " AND ";
            }
            $where .= " (date >= '" . $d . "')";
Exemple #2
0
<?php

$data = getListPostById($con, $_GET['id']);
$hit = $data['counter_hit'] + 1;
updateCounter($con, $hit, $_GET['id']);
?>
<div class="blog-item">
    <img class="img-responsive img-blog" src="assets/images/blog/blog1.jpg" width="100%" alt="" />
    <div class="row">  
        <div class="col-xs-12 col-sm-2 text-center">
            <div class="entry-meta">
                <span id="publish_date"><?php 
echo set_date($data['tanggal']);
?>
</span>
                <span><i class="fa fa-user"></i> <a href="#"> <?php 
echo $data['nama_lengkap'];
?>
</a></span>
                <span><i class="fa fa-comment"></i> <a href="blog-item.html#comments"><?php 
echo $data['counter_comments'];
?>
 Comments</a></span>
                <span><i class="fa fa-heart"></i><a href="#">56 Likes</a></span>
            </div>
        </div>
        <div class="col-xs-12 col-sm-10 blog-content">
            <h2><?php 
echo $data['judul'];
?>
</h2>