PHP-Code:
function get_list($weight = 2, $section_id = 0, $section_dir = "") {
global $tbl_name;
global $now_datetime;
global $page_postdate;
global $page_list;
$query = "SELECT ID, title, post_date, summary FROM $tbl_name
WHERE status = 1
AND post_date <= '$now_datetime'
AND weight <= '$weight'
AND section_id = '$section_id'
AND ( expire_date > '$now_datetime' OR expire_date = '')
ORDER BY post_date DESC
";
$result = mysql_query($query);
$string = "";
while ($row = mysql_fetch_object($result)) {
$title = stripslashes($row->title);
$page_postdate = $row->post_date;
$id = $row->ID;
$summary = $row->summary;
// Set date format for list
$page_postdate = format_datelong($page_postdate);
$string = $string . "
[b]<a href=\"";
if ($section_dir != "") {
$string = $string
. $section_dir . "/";
}
$string = $string . "item.php?id="
. $id . "\">" . $title . " </a>"
. "[/b]
\n";
}
$page_list = $string . "";
}
Die Änderung im Detail:
PHP-Code:
$query = "SELECT ID, title, post_date, summary FROM $tbl_name WHERE status = 1 AND post_date <= '$now_datetime' AND weight <= '$weight' AND section_id = '$section_id' AND ( expire_date > '$now_datetime' OR expire_date = '') ORDER BY post_date DESC";
PHP-Code:
while ($row = mysql_fetch_object($result)) {
$title = stripslashes($row->title);
$page_postdate = $row->post_date;
$id = $row->ID;
$summary = $row->summary;
#Hannes#