<?php
If (!defined("in_astat")) {
    die("Dieses Script kann nicht ausserhalb des Frameworks laufen!");
} 
include 'thirdparty/twitter/twitter.class.php';
//define('MAGPIE_CACHE_DIR', '/var/www/virtual/recensio.org/phptmp/magpie_cache');
try{
    $twitter = new Twitter('uVApPPv2zWXu8dWBwkbLw', 'kNHU7pia5ikY22No8gHU8ucXLd0z3IpnOUn0MA5SvQ', '563736788-UhHJUIJXlSdu3iFPaaqZQDmI9FExJOBW1e7ceZpM', 'FTHmLz1Gwa0pkgH5riN5mui4v3m83BaVVpXju4Bqlc');
$channel = $twitter->load(Twitter::ME,5);
foreach ($channel as $status){
	$stat['screenname'] = $status->user->screen_name;
	$stat['image'] = htmlspecialchars($status->user->profile_image_url);
	$stat['user'] = htmlspecialchars($status->user->name);
	$stat['text'] = Twitter::clickable($status);
	$stat['date'] = date("d.m.Y H:i",strtotime($status->created_at));
	$stats[]=$stat;
}

}catch(Exception $e){
    $stats="Twitter down :,(";
}

$navtpl-> assign("status",$stats);  

$navrow .= $navtpl->fetch('nav_twitter.tpl');

?>
