Exemplo n.º 1
0
function find_news($start, $end)
{
    global $tpl;
    $query = "SELECT id,date_posted,content FROM `news` order by id desc limit " . $start . "," . $end;
    $wynik = XDb::xSql($query);
    $ile = XDb::xNumRows($wynik);
    $znalezione = array();
    while ($odp2 = XDb::xFetchArray($wynik)) {
        $odp['date_posted'] = $odp2['date_posted'];
        //$odp['content']=strip_tags($odp2['content'],'<b></b><p></p><a></a><br><br/>');
        $odp['content'] = html2desc($odp2['content']);
        $znalezione[] = $odp;
    }
    $tpl->assign('news', $znalezione);
    return $ile;
}
Exemplo n.º 2
0
 $cache_info['longitude'] = number_format($caches['longitude'], 5);
 $cache_info['latitude'] = number_format($caches['latitude'], 5);
 $cache_info['N'] = cords($caches['latitude']);
 $cache_info['E'] = cords($caches['longitude']);
 $cache_info['type'] = $cache_type[0];
 $cache_info['size'] = $cache_size[0];
 $cache_info['status2'] = $caches['status'];
 $cache_info['status'] = $cache_status[0];
 $cache_info['hidden_date'] = date('j.m.Y', strtotime($caches['date_hidden']));
 $cache_info['wp_oc'] = $caches['wp_oc'];
 $cache_info['owner'] = $user[0];
 $cache_info['user_id'] = $caches['user_id'];
 $cache_info['founds'] = $caches['founds'];
 $cache_info['notfounds'] = $caches['notfounds'];
 $cache_info['notes'] = $caches['notes'];
 $cache_info['desc'] = html2desc($cache_desc['desc']);
 $cache_info['hint'] = html2hint($cache_desc['hint']);
 $cache_info['picturescount'] = $caches['picturescount'];
 $cache_info['topratings'] = $caches['topratings'];
 $tpl->assign("cache", $cache_info);
 if ($caches['picturescount'] > 0) {
     $query = "select url, title, spoiler from pictures where object_id = '" . $caches['cache_id'] . "' and display=1 and object_type=2;";
     $wynik = db_query($query);
     $znalezione = array();
     while ($rekord = mysql_fetch_assoc($wynik)) {
         $photos[] = $rekord;
     }
     $tpl->assign("photos_list", $photos);
 }
 if (!empty($cache_attributes)) {
     $attr_text = "";