add series external view
4
website/agenda/checkip.cgi
Executable file
@@ -0,0 +1,4 @@
|
||||
#!/bin/perl
|
||||
|
||||
print "Content-type:text/plain\n\nCurrent IP Address:".$ENV{REMOTE_ADDR}."\n";
|
||||
|
||||
BIN
website/agenda/planung/css/images/chess.gif
Normal file
|
After Width: | Height: | Size: 601 B |
BIN
website/agenda/planung/css/images/ui-icons_444444_256x240.png
Normal file
|
After Width: | Height: | Size: 6.8 KiB |
BIN
website/agenda/planung/css/images/ui-icons_555555_256x240.png
Normal file
|
After Width: | Height: | Size: 6.9 KiB |
BIN
website/agenda/planung/css/images/ui-icons_777620_256x240.png
Normal file
|
After Width: | Height: | Size: 4.6 KiB |
BIN
website/agenda/planung/css/images/ui-icons_777777_256x240.png
Normal file
|
After Width: | Height: | Size: 6.8 KiB |
BIN
website/agenda/planung/css/images/ui-icons_cc0000_256x240.png
Normal file
|
After Width: | Height: | Size: 4.5 KiB |
BIN
website/agenda/planung/css/images/ui-icons_ffffff_256x240.png
Normal file
|
After Width: | Height: | Size: 6.2 KiB |
BIN
website/agenda/planung/image/128/radio.png
Normal file
|
After Width: | Height: | Size: 880 B |
BIN
website/agenda/planung/image/16/radio.png
Normal file
|
After Width: | Height: | Size: 310 B |
BIN
website/agenda/planung/image/32/radio.png
Normal file
|
After Width: | Height: | Size: 466 B |
BIN
website/agenda/planung/image/64/radio.png
Normal file
|
After Width: | Height: | Size: 745 B |
6
website/agenda/planung/templates/seriesNames.html
Normal file
@@ -0,0 +1,6 @@
|
||||
<div id="newSeries">
|
||||
<TMPL_LOOP newSeries>
|
||||
<TMPL_IF has_single_events><TMPL_VAR .loc.single_events><TMPL_ELSE><TMPL_VAR series_name></TMPL_IF><br>
|
||||
</TMPL_LOOP>
|
||||
</div>
|
||||
|
||||
116
website/agenda/series.cgi
Normal file
@@ -0,0 +1,116 @@
|
||||
#!/usr/bin/perl -w
|
||||
|
||||
use warnings "all";
|
||||
use strict;
|
||||
use Data::Dumper;
|
||||
|
||||
use params;
|
||||
use config;
|
||||
#use log;
|
||||
use template;
|
||||
#use auth;
|
||||
#use uac;
|
||||
#use roles;
|
||||
#use project;
|
||||
use studios;
|
||||
#use events;
|
||||
use series;
|
||||
#use series_schedule;
|
||||
#use series_events;
|
||||
#use series_dates;
|
||||
#use user_stats;
|
||||
#use markup;
|
||||
#use URI::Escape;
|
||||
#use Encode;
|
||||
#use localization;
|
||||
|
||||
binmode STDOUT, ":utf8";
|
||||
print "Content-Type: text/html; charset=utf-8\n\n";
|
||||
|
||||
my $r = shift;
|
||||
( my $cgi, my $params, my $error ) = params::get($r);
|
||||
|
||||
my $config = config::get('config/config.cgi');
|
||||
|
||||
$params = check_params($params);
|
||||
|
||||
list_series( $config, $params );
|
||||
|
||||
sub list_series {
|
||||
my $config = shift;
|
||||
my $params = shift;
|
||||
|
||||
$config->{access}->{write} = 0;
|
||||
|
||||
my $project_id = $params->{project_id};
|
||||
my $studio_id = $params->{studio_id};
|
||||
my $location = $params->{location};
|
||||
|
||||
if (defined $location){
|
||||
my $studios = studios::get(
|
||||
$config,
|
||||
{
|
||||
project_id => $project_id,
|
||||
location => $location
|
||||
}
|
||||
);
|
||||
|
||||
$studio_id = $studios->[0]->{id};
|
||||
}
|
||||
|
||||
my $conditions = {};
|
||||
$conditions->{project_id} = $project_id if defined $project_id;
|
||||
$conditions->{studio_id} = $studio_id if defined $studio_id;
|
||||
|
||||
if (scalar (keys %$conditions) == 0){
|
||||
$params->{info} .= "missing parameters";
|
||||
return;
|
||||
}
|
||||
$params->{info}.= Dumper($conditions);
|
||||
|
||||
my $series = series::get_event_age( $config, $conditions );
|
||||
my $series2 = [];
|
||||
for my $serie ( sort { lc $a->{series_name} cmp lc $b->{series_name} } (@$series) ) {
|
||||
next if $serie->{days_over} > 80 ;
|
||||
next if $serie->{days_over} == 0 ;
|
||||
next unless defined $serie->{series_name};
|
||||
next if $serie->{series_name} eq '_single_';
|
||||
push @$series2, $serie;
|
||||
}
|
||||
$params->{series} = $series2;
|
||||
|
||||
$params->{info}.="no results found" if scalar(@$series)==0;
|
||||
$params->{info}='';
|
||||
|
||||
template::process( 'print', 'templates/series.html', $params );
|
||||
}
|
||||
|
||||
|
||||
sub check_params {
|
||||
my $params = shift;
|
||||
|
||||
my $checked = {};
|
||||
|
||||
my $debug = $params->{debug} || '';
|
||||
if ( $debug =~ /([a-z\_\,]+)/ ) {
|
||||
$debug = $1;
|
||||
}
|
||||
$checked->{debug} = $debug;
|
||||
|
||||
for my $param ('project_id', 'studio_id') {
|
||||
if ( ( defined $params->{$param} ) && ( $params->{$param} =~ /^\d+$/ ) ) {
|
||||
$checked->{$param} = $params->{$param};
|
||||
}
|
||||
}
|
||||
|
||||
for my $param ( 'location') {
|
||||
if ( defined $params->{$param} ) {
|
||||
$checked->{$param} = $params->{$param};
|
||||
$checked->{$param} =~ s/^\s+//g;
|
||||
$checked->{$param} =~ s/\s+$//g;
|
||||
}
|
||||
}
|
||||
|
||||
return $checked;
|
||||
}
|
||||
|
||||
55
website/agenda/templates/series.html
Normal file
@@ -0,0 +1,55 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
|
||||
<script src="/agenda/js/jquery.min.js" ></script>
|
||||
<link rel="stylesheet" type="text/css" href="/agenda/css/calcms.css">
|
||||
|
||||
<style>
|
||||
.series{
|
||||
clear:both;
|
||||
}
|
||||
.info{
|
||||
padding:1rem;
|
||||
background:#cc0;
|
||||
}
|
||||
|
||||
button{
|
||||
font-size:0.8rem;
|
||||
}
|
||||
|
||||
.buttons{
|
||||
float:right;
|
||||
}
|
||||
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<div>
|
||||
<h1>aktuelle Sendereihen</h1>
|
||||
<TMPL_IF info><div class="info"><TMPL_VAR info></div></TMPL_IF>
|
||||
|
||||
<div id="content">
|
||||
<TMPL_LOOP series>
|
||||
<div class="series"
|
||||
href="#"
|
||||
>
|
||||
<b><TMPL_IF has_single_events><TMPL_VAR .loc.single_events><TMPL_ELSE><TMPL_VAR series_name></TMPL_IF></b>
|
||||
<TMPL_IF TITLE> - <TMPL_VAR title></TMPL_IF>
|
||||
<div class="buttons">
|
||||
<button onclick="$(this).parent().parent().find('#calcms_list').load('/agenda/suche/all/<TMPL_VAR series_name escape=url>/vergangene/').show();return false;" >⯇ vergangene</button>
|
||||
<button onclick="$(this).parent().parent().find('#calcms_list').load('/agenda/suche/all/<TMPL_VAR series_name escape=url>/kommende/').show(); return false;" >⯈ kommende</button>
|
||||
<button onclick="$(this).parent().parent().find('#calcms_list').hide();">X</button>
|
||||
</div>
|
||||
<div id="calcms_list" style="display:none"> </div>
|
||||
|
||||
</div>
|
||||
</TMPL_LOOP>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||