Exemple #1
0
$cat=$_REQUEST['category'];

do_header('Chuza! mobile');
do_tabs('main','published');

$from_where = "FROM links WHERE link_status='published' ";
$order_by = " ORDER BY link_date DESC ";

echo '<div id="newswrap">'."\n";

$link = new LinkMobile;
$rows = $db->get_var("SELECT SQL_CACHE count(*) $from_where");

$links = $db->get_col("SELECT SQL_CACHE link_id $from_where $order_by LIMIT $offset,$page_size");
if ($links) {
	foreach($links as $link_id) {
		$link->id=$link_id;
		$link->read();
		$link->print_summary();
	}
}

do_pages($rows, $page_size);
echo '</div>'."\n";

do_footer();


?>
Exemple #2
0
$globals['ads'] = false;
$globals['noindex'] = true;
$_REQUEST['q'] = trim(stripslashes($_REQUEST['q']));
$response = do_search(false, $offset, $page_size);
$search_txt = htmlspecialchars($_REQUEST['q']);
do_header(sprintf(_('búsqueda de «%s»'), $search_txt));
do_tabs('main', _('búsqueda'), htmlentities($_SERVER['REQUEST_URI']));
echo '<div id="newswrap">' . "\n";
if (!empty($_REQUEST['q'])) {
    echo '<div style="background:#FFE2C5;margin: 4px; padding:4px;">' . _('búsqueda') . ': <em>' . $search_txt . '</em>';
    echo '&nbsp;&nbsp;' . _('encontrados') . ': ' . $response['rows'] . ', ' . _('tiempo total') . ': ' . sprintf("%1.3f", $response['time']) . ' ' . _('segundos') . '</div>';
}
echo '<form action="' . $globals['base_url'] . 'search.php" method="get">' . "\n";
echo '<fieldset>';
echo '<label for="search">' . _('búsqueda') . '</label>' . "\n";
echo '<div><input type="text" name="q" id="search" value="' . htmlspecialchars(strip_tags($_REQUEST['q'])) . '" /></div>';
echo '<input type="submit" value="' . _('buscar') . '" />' . "\n";
echo '</fieldset>';
echo '</form>';
$link = new LinkMobile();
if ($response['ids']) {
    $rows = min($response['rows'], 1000);
    foreach ($response['ids'] as $link_id) {
        $link->id = $link_id;
        $link->read();
        $link->print_summary('full', $link->status == 'published' ? 100 : 20);
    }
}
do_pages($rows, $page_size);
echo '</div>';
do_footer();