<?php /** * Wyswietlenie listy newsow itp. * * @author m@sote.pl * @version $: newsedit.inc.php,v 1.2 2008-01-14 ::41 michal Exp $ * * @verified 2004-03-22 m@sote.pl * @package newsedit */ /** * Lista newsów */ class NewsEdit { /** * Wy¶wietl liste newsów wg grupy * * @param int $group ID grupy newsow (id z tabeli newsedit_groups) * @global $_REQUEST['group'] int ID grupy newsów (z tabeli newsedit_groups) * * @return none */ function show_list($group=1) { if (@$_REQUEST['group']) {$group = @$_REQUEST['group'];} else {$group = 1;} $and_group="id_newsedit_groups=1"; $and_group="id_newsedit_groups=$group"; $and_group="id_newsedit_groups=$group"; } else return false; } // lista newsow $sql="SELECT * FROM newsedit WHERE lang='".$config->lang."' AND active=1 AND ($and_group OR group1=$group OR group2=$group OR group3=$group) AND `date_add` <= NOW() ORDER BY ordercol DESC"; $dbedit =& new DBEdit; $dbedit->dbtype=$config->dbtype; $dbedit->top_links="false"; $dbedit->record_class="NewsEditRow"; $dbedit->empty_list_message=""; $__group=$group; require_once ("plugins/_newsedit/include/newsedit_row.inc.php"); } // print $sql; $dbedit->record_list($sql); return; } // end show_list() /** * Ile jest newsów * * @param int $group ID grupy newsow (id z tabeli newsedit_groups) * @global $_REQUEST['group'] int ID grupy newsów (z tabeli newsedit_groups) * @author lech@sote.pl * * @return int liczba newsów */ function get_news_count($group = 1) { $and_group="id_newsedit_groups=1"; $and_group="id_newsedit_groups=$group"; $and_group="id_newsedit_groups=$group"; } else return false; } $where="lang='".$config->lang."' AND active=1 AND ($and_group OR group1=$group OR group2=$group OR group3=$group) "; return $mdbd->num_rows; } // end get_news_count() } // end class NewsEdit $newsedit =& new NewsEdit; ?>
Mam taki kodzik czy któryś z kolegów pomógłby mi go tak zmodyfikować aby wyświetlał jeden news + 5 samych tematów dalszych newsów np. Serdecznie dziękuje za pomoc.