Eskilstuna Linden




[insert_php]
/*

————————————————————-

presentera_poster.php – Visar hÃ?€mtade poster

————————————————————-

F�¶rfattare: Leif Fransson
Skapad: 2008-12-21
F�¶r�€ndrad: 2008-12-21

Copyright (c) 2008 by V�€lkommen AB

————————————————————-

*/

$link = mysqli_connect(“localhost”,”jonk”,”satanrulez666″); //(host, username, password)
mysqli_select_db($link, “dagens-hockey”) or die(“Unable to select database”);

$rubrik_id = (isset($rubrik_id))? $rubrik_id : 140;
$max = (isset($max))? $max : 30;

$sqlsats = “select *,date_format(urub_post.post_skapad, ‘%Y-%m-%d’) as datum from post_rss, urub_post, rss_flode where urub_post.u_id = ‘$rubrik_id’ and post_rss.post_id = urub_post.post_id and rss_flode.rss_id = post_rss.rss_id order by urub_post.post_skapad desc, post_rss.post_skapad desc limit $max”;

#– UtfÃ?¶r SQL-kommandot
$result = mysqli_query ($link, $sqlsats)
or die (“Invalid query: hamta rss-flÃ?¶den $sqlsats”);

$antal_floden = 0;
#– HÃ?€mta resultatet

$datum_koll = “”;

while ($row = mysqli_fetch_array ($result))
{

if ($datum_koll <> $row[‘datum’])
{
$tmp_filter_strang = $tmp_filter_strang . “

” . $row[‘datum’] . “

“;
$datum_koll = $row[‘datum’];
}

$tmp_filter_strang = $tmp_filter_strang . $row[‘datum1’] . ‘‘ . “” . htmlentities(stripslashes(utf8_encode($row[‘post_titel’]))) . “ – ” . ($row[‘post_source’]) . ”

\n”;

$antal_floden++;

}

echo $tmp_filter_strang;
$output = $tmp_filter_strang;

return $output;
[/insert_php]