示例#1
0
    ?>
" width="350px" height="248"></a>
            <br><br>
            <div class="test-rubric-time"><span><?php 
    echo gedate('l H:i', $item['date']);
    ?>
</span> | <span><?php 
    echo gedate('d.m.Y', $item['date']);
    ?>
</span></div>
            <br>
            <a href="http://<?php 
    echo $_SERVER['SERVER_NAME'];
    ?>
/<?php 
    echo $item['cat_chpu'];
    ?>
/<?php 
    echo $item['chpu'];
    ?>
/"><span><?php 
    echo title_filter($item['title'], 100);
    ?>
</span></a>
        </li>
        <?php 
}
?>
    </ul>
</div>
<div class="fix"></div>
示例#2
0
                <br><br>
                <div class="search-post-title"><a href="http://<?php 
        echo $_SERVER['SERVER_NAME'];
        ?>
/<?php 
        echo $item['cat_chpu'];
        ?>
/<?php 
        echo $item['chpu'];
        ?>
/"><?php 
        echo title_filter($item['title'], 60);
        ?>
</a></div>
                <div class="search-post-short"><?php 
        echo title_filter($short_text, $short_length);
        ?>
</div>
                <table class="time-like-short">
                    <tr>
                        <td><?php 
        echo gedate('l H:i', $item['date']);
        ?>
 | <?php 
        echo gedate('d.m.Y', $item['date']);
        ?>
</td>
                        <td valign="center">
                            <span>ავტორი:</span> <?php 
        echo $item['realname'];
        ?>
示例#3
0
    function load_search($args = array())
    {
        $output = '';
        $value = $args['txt'];
        $num = intval($args['num']);
        $last_id = intval($args['last_id']);
        $time = time();
        if ($value == "archive") {
            $sql_search = "";
            $sql_count = "";
        } else {
            $sql_search = '(osr_news.title LIKE "%' . $value . '%" or osr_news.text LIKE "%' . $value . '%") and ';
            $sql_count = "({$this->p}news.title LIKE '%{$value}%' or {$this->p}news.text LIKE '%{$value}%') and";
        }
        $last = $this->DB->getOne("SELECT {$this->p}news.id FROM {$this->p}news WHERE {$sql_count} {$this->p}news.moderate=1 and {$this->p}news.date <= {$time} order by {$this->p}news.date ASC");
        if ($last == $last_id) {
            $output .= "" . $last_id . "";
        } else {
            $registry['search'] = $this->DB->getAll('SELECT osr_news.*,osr_users.realname,osr_category.name,osr_category.cat_chpu,osr_category.id as cat_id FROM osr_news
                                         LEFT JOIN osr_category ON osr_category.id = osr_news.cat
                                         LEFT JOIN osr_users ON osr_users.id = osr_news.user
                                         WHERE ' . $sql_search . ' osr_news.moderate=1 and osr_news.date <= ' . $time . ' order by osr_news.date DESC LIMIT ' . $num . ',21');
            if ($registry['search'][0]['id'] > 0) {
                foreach ($registry['search'] as $item) {
                    $reg['slide'] = get_serialize($item['slide']);
                    if (count($reg['slide']['img']) > 1) {
                        $style = "background-image:url('/theme/funtime/images/main_icon.png');background-repeat:no-repeat;background-size:30px 30px;background-position:right 10px center;padding:10px 50px 7px 10px;";
                    } else {
                        $style = "padding:10px 10px 7px 10px;";
                    }
                    $title_length = string_length($item['title']);
                    if (!empty($item['title_short'])) {
                        $short_length = string_length($item['title_short']);
                        $short_text = $item['title_short'];
                    } else {
                        $short_length = string_length($item['text_short']);
                        $short_text = $item['text_short'];
                    }
                    $content_length = $title_length + $short_length;
                    $short_length = 135 - $title_length;
                    $output .= '<li data-last_id="' . $item['id'] . '">
<a href="http://' . $_SERVER['SERVER_NAME'] . '/' . $item['cat_chpu'] . '/"><h3 style="' . $style . '">' . $item['name'] . '</h3></a>
<a href="http://' . $_SERVER['SERVER_NAME'] . '/' . $item['cat_chpu'] . '/' . $item['chpu'] . '/"><img src="' . substr($item['thumbs'], 2) . '" width="363" title="' . $item['title'] . '" height="225"/></a>
<br><br>
<div class="search-post-title"><a href="http://' . $_SERVER['SERVER_NAME'] . '/' . $item['cat_chpu'] . '/' . $item['chpu'] . '/">' . title_filter($item['title'], 60) . '</a></div>
<div class="search-post-short">' . title_filter($short_text, $short_length) . '</div>
<table class="time-like-short">
    <tr>
        <td>' . gedate('l H:i', $item['date']) . ' | ' . gedate('d.m.Y', $item['date']) . '</td>
             <td valign="center">
                            <span>ავტორი:</span> ' . $item['realname'] . '
                        </td>
                    </tr>
                    <tr>
                        <td><div class="fb-like" data-href="http://' . $_SERVER['SERVER_NAME'] . '/' . $item['cat_chpu'] . '/' . $item['chpu'] . '/" data-width="80" data-layout="button_count" data-action="like" data-show-faces="false" data-share="false"></div> <div class="fb-share-button" data-href="http://' . $_SERVER['SERVER_NAME'] . '/' . $item['cat_chpu'] . '/' . $item['chpu'] . '/" data-layout="button_count"></div></td>
                        <td></td>
                    </tr>
</table>
</li>';
                }
            } else {
                $output .= '0';
            }
        }
        die($output);
    }