|
//gewählten Menüpunkt in $menu speichern
$m =$_GET['m'];
$u = $_GET['u'];
$menu="&m=".$m."&u=".$u;
?>
// Pheed - the newsfeeder v.1.1
error_reporting(63);
function pheed($newsid){
GLOBAL $PHP_SELF,$prev,$newsid;
include "pheedini.php3";
$conid=dbconnect ($dbname,$username,$password);
?>
" class="newstext">
if ($newsid==0){
if (!isset($prev)){
if (isset($month)){
$sql="SELECT id,date,title FROM $dbtable WHERE (MONTH(date)=$month AND YEAR(date)=$year) ORDER BY date DESC";
}else{
$sql="SELECT id,date,title FROM $dbtable ORDER BY date DESC LIMIT 25";
};
$result=dbquery($conid,$sql);
while (list($id,$date,$title)=dbfetch($result)){
$date=substr($date,0,10);
$dat=explode("-",$date);
$date="$dat[2]. $dat[1]. $dat[0]";
?>
print $date ?> print $title ?>
|
mehr,...
};
print "$lang[allnews] ";
} else{
?>
|
$result = dbquery($conid, "SELECT DISTINCT(MONTH(date)) as month, year(date) as year FROM $dbtable ORDER BY year DESC, month DESC");
while (list($month,$year)=dbfetch($result)){
print "[$mtext[$month] $year] ";
};
print " ";
};
} else {
$result = dbquery($conid, "SELECT date,title,text,image,caption,URL,urlname FROM $dbtable WHERE (id='$newsid')");
list($date,$title,$text,$image,$caption,$URL,$urlname)=dbfetch($result);
$result = dbquery($conid, "UPDATE $dbtable SET view=view+1 WHERE (id='$newsid')");
$date=substr($date,0,16);
$dat1=explode(" ",$date);
$dat=explode("-",$dat1[0]);
$date="$dat[2]. $dat[1]. $dat[0] $dat1[1]";
?>
if ($image!=""){
print " ";
};
print $title ?>
print $date ?>
print $text; ?>
|
$result = dbquery($conid, "SELECT max(id) as maxid FROM $dbtable WHERE (id<'$newsid') LIMIT 1 ");
list($tmp)=dbfetch($result);
if ($tmp!=""){
?>
«
};
$result = dbquery($conid, "SELECT min(id) as minid FROM $dbtable WHERE (id>'$newsid') LIMIT 1 ");
list($tmp)=dbfetch($result);
if ($tmp!=""){
?>
»
};
?>
|
if ($URL!=""){
print " $urlname ";
};
?>
|
$result = dbquery($conid, "SELECT id,date,title FROM $dbtable WHERE id<$newsid ORDER BY date DESC LIMIT 5");
while (list ($newsid,$date,$title)=dbfetch($result)){
$date=substr($date,0,10);
?>
};
};
dbfree($result);
?>
|
}
if (!isset($newsid)){
pheed (0);
}else{
pheed ($newsid);
}
?>
|