set_file(array("dates" => "index_latestradio_more.ihtml")); $t->set_block("dates", "RADIO", "all_radio"); $t->set_block("dates", "LATEST_RADIOSHOW", "all_latest_radio"); $t->set_block("dates", "LATEST_NETCAST", "all_latest_netcast"); $t->set_block("dates", "NETARTISTEN", "all_netartist"); $db=new DB_Contour; // all_radio $db->query("select s.datum, s.artist, s.duration, p.name from c_sendungen s, c_projekt p WHERE datum>".time()." and p.id=s.projekt_id and s.status=0 ORDER BY s.datum LIMIT 0,2"); $i=0; while($db->next_record()){ $i++; $t->set_var(array("DATUM" => strtolower(date("D, d.m.",$db->f("datum"))), "ZEIT" => date("Hi",$db->f("datum"))." - ".date("Hi",$db->f("datum")+$db->f("duration")*60)." cet", "ARTIST" => $db->f("artist"), "PROJEKT" => $db->f("name"))); if($i==1) $trenner='

'; else $trenner=""; $t->set_var(array("TRENNER" => $trenner)); $t->parse("all_radio", "RADIO", true); } // all_latest_radio $db->query("select s.datum, s.artist, s.ramfile, p.name from c_sendungen s, c_projekt p WHERE s.datum<".time()." and p.id=s.projekt_id and s.status=1 ORDER BY s.datum desc limit 0,6"); $i=0; while($db->next_record()){ $i++; $t->set_var(array("LATESTLINK" => $ram_path.$db->f("ramfile"), "LATESTPROJECT" => $db->f("name"), "LATESTARTIST" => substr($db->f("artist"), 0, 42))); if($i>=1 && $i<6) $trenner='
'; else $trenner=""; $t->set_var(array("TRENNER" => $trenner)); $t->parse("all_latest_radio", "LATEST_RADIOSHOW", true); } // all_latest_netcast $db->query("select * from c_netcast WHERE datum<".time()." and status=1 ORDER BY datum desc limit 1"); if($db->next_record()){ if($db->f("image")==none) $image='
'; else $image='
netimage
'; if($db->f("link")!="" && $db->f("link_pub")==1) $netlink='artist
website'; else $netlink=""; if($db->f("link")!="") $title='artist'.$db->f("title").''; else $title=""; $t->set_var(array("NETDATE" => strtolower(date("M, Y",$db->f("datum"))), "RAMLINK" => $db->f("ramfile"), "NETARTIST" => $db->f("artist"), "COMMENT" => $title, "WEBSITE_ARTIST"=> $netlink, "NETIMAGE" => $image)); $t->set_var(array("TRENNER" => $trenner)); $t->parse("all_latest_netcast", "LATEST_NETCAST", true); } // all_netartist $db->query("select artist, ramfile, status from c_netcast WHERE status=1"); $i=0; while($db->next_record()){ $i++; $t->set_var(array("NETARTIST_ALL" => $db->f("artist"), "LINKSITE_ALL" => $db->f("ramfile"))); $t->parse("all_netartist", "NETARTISTEN", true); } $t->parse("out", "dates"); $t->p("out"); ?>