set_file(array("dates" => "index_latestnetcast_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 LIMIT 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 ORDER BY s.datum desc limit 2"); $i=0; while($db->next_record()){ $i++; $t->set_var(array("LATESTLINK" => $db->f("ramfile"), "LATESTPROJECT" => $db->f("name"), "LATESTARTIST" => $db->f("artist"))); if($i==1) $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()." ORDER BY datum desc limit 3"); $i=0; while($db->next_record()){ $i++; if($db->f("image")==none){ $image='
'; if($i==3) $image='
'; } else $image='
netimage
'; if($db->f("link_pub")=="1") $netlink='artist
website'; else $netlink=""; $t->set_var(array("NETDATE" => strtolower(date("D, d.m.Y",$db->f("datum"))), "RAMLINK" => $db->f("ramfile"), "NETARTIST" => $db->f("artist"), "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 from c_netcast"); $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"); ?>