add user password reset, add series image switch, add image licences, redesign exclude filters
This commit is contained in:
@@ -178,7 +178,11 @@ CREATE TABLE `calcms_event_history` (
|
|||||||
`series_id` int(10) unsigned DEFAULT NULL,
|
`series_id` int(10) unsigned DEFAULT NULL,
|
||||||
`deleted` tinyint(1) unsigned DEFAULT '0',
|
`deleted` tinyint(1) unsigned DEFAULT '0',
|
||||||
`project_id` int(10) unsigned NOT NULL,
|
`project_id` int(10) unsigned NOT NULL,
|
||||||
`draft` tinyint(3) unsigned NOT NULL DEFAULT '0',
|
`recurrence_count` int(10) unsigned NOT NULL DEFAULT '0',
|
||||||
|
`draft` tinyint(1) unsigned NOT NULL DEFAULT '0',
|
||||||
|
`series_image` VARCHAR(200) DEFAULT NULL,
|
||||||
|
`image_label` VARCHAR(200) DEFAULT NULL,
|
||||||
|
`series_image_label` VARCHAR(200) DEFAULT NULL,
|
||||||
PRIMARY KEY (`id`),
|
PRIMARY KEY (`id`),
|
||||||
KEY `end` (`end`),
|
KEY `end` (`end`),
|
||||||
KEY `start` (`start`),
|
KEY `start` (`start`),
|
||||||
@@ -264,6 +268,9 @@ CREATE TABLE `calcms_events` (
|
|||||||
`archive_url` varchar(300) DEFAULT NULL,
|
`archive_url` varchar(300) DEFAULT NULL,
|
||||||
`recurrence_count` int(10) unsigned NOT NULL DEFAULT '0',
|
`recurrence_count` int(10) unsigned NOT NULL DEFAULT '0',
|
||||||
`draft` tinyint(1) unsigned NOT NULL DEFAULT '0',
|
`draft` tinyint(1) unsigned NOT NULL DEFAULT '0',
|
||||||
|
`series_image` VARCHAR(200) DEFAULT NULL,
|
||||||
|
`image_label` VARCHAR(200) DEFAULT NULL,
|
||||||
|
`series_image_label` VARCHAR(200) DEFAULT NULL,
|
||||||
PRIMARY KEY (`id`),
|
PRIMARY KEY (`id`),
|
||||||
KEY `end` (`end`),
|
KEY `end` (`end`),
|
||||||
KEY `start` (`start`),
|
KEY `start` (`start`),
|
||||||
@@ -315,6 +322,8 @@ CREATE TABLE `calcms_images` (
|
|||||||
`modified_by` varchar(64) DEFAULT NULL,
|
`modified_by` varchar(64) DEFAULT NULL,
|
||||||
`modified_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
`modified_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||||
`project_id` int(10) unsigned NOT NULL,
|
`project_id` int(10) unsigned NOT NULL,
|
||||||
|
`public` tinyint(1) unsigned NULL DEFAULT '0',
|
||||||
|
`licence` varchar(300) NULL,
|
||||||
PRIMARY KEY (`id`),
|
PRIMARY KEY (`id`),
|
||||||
KEY `created_at` (`created_at`),
|
KEY `created_at` (`created_at`),
|
||||||
KEY `filename` (`filename`),
|
KEY `filename` (`filename`),
|
||||||
@@ -395,7 +404,7 @@ CREATE TABLE `calcms_playout` (
|
|||||||
`rms_image` varchar(300) DEFAULT NULL,
|
`rms_image` varchar(300) DEFAULT NULL,
|
||||||
`replay_gain` float DEFAULT NULL,
|
`replay_gain` float DEFAULT NULL,
|
||||||
`updated_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
`updated_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||||
`modified_at` datetime NOT NULL,
|
`modified_at` datetime DEFAULT CURRENT_TIMESTAMP,
|
||||||
PRIMARY KEY (`project_id`,`studio_id`,`start`),
|
PRIMARY KEY (`project_id`,`studio_id`,`start`),
|
||||||
KEY `project_id` (`project_id`),
|
KEY `project_id` (`project_id`),
|
||||||
KEY `studio_id` (`studio_id`),
|
KEY `studio_id` (`studio_id`),
|
||||||
|
|||||||
@@ -95,3 +95,22 @@ ALTER TABLE `calcms_events`
|
|||||||
ALTER TABLE `calcms_users`
|
ALTER TABLE `calcms_users`
|
||||||
CHANGE COLUMN email email varchar(300) NOT NULL;
|
CHANGE COLUMN email email varchar(300) NOT NULL;
|
||||||
|
|
||||||
|
ALTER TABLE `calcms_events` ADD COLUMN `series_image` VARCHAR(200) DEFAULT NULL AFTER `draft`;
|
||||||
|
|
||||||
|
ALTER TABLE `calcms_events` ADD COLUMN `image_label` VARCHAR(200) DEFAULT NULL AFTER `series_image`,
|
||||||
|
ADD COLUMN `series_image_label` VARCHAR(200) DEFAULT NULL AFTER `image_label`;
|
||||||
|
|
||||||
|
ALTER TABLE `calcms_playout`
|
||||||
|
CHANGE COLUMN `modified_at` `modified_at` datetime DEFAULT CURRENT_TIMESTAMP;
|
||||||
|
|
||||||
|
ALTER TABLE `calcms_images`
|
||||||
|
ADD COLUMN public tinyint(1) unsigned NULL DEFAULT '0',
|
||||||
|
ADD COLUMN licence varchar(300) NULL AFTER project_id;
|
||||||
|
|
||||||
|
ALTER TABLE `calcms_event_history`
|
||||||
|
CHANGE COLUMN draft draft tinyint(1) unsigned NOT NULL DEFAULT '0',
|
||||||
|
ADD COLUMN series_image_label varchar(200) NULL,
|
||||||
|
ADD COLUMN series_image varchar(200) NULL AFTER draft,
|
||||||
|
ADD COLUMN recurrence_count int(10) unsigned NOT NULL DEFAULT '0' AFTER project_id,
|
||||||
|
ADD COLUMN image_label varchar(200) NULL;
|
||||||
|
|
||||||
|
|||||||
@@ -271,6 +271,7 @@ sub show_login_form{
|
|||||||
<!DOCTYPE HTML>
|
<!DOCTYPE HTML>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<style type="text/css">
|
<style type="text/css">
|
||||||
html,body{
|
html,body{
|
||||||
|
|||||||
@@ -46,6 +46,8 @@ sub setAttributesFromSeriesTemplate{
|
|||||||
){
|
){
|
||||||
$event->{$attr}=$serie->{$attr};
|
$event->{$attr}=$serie->{$attr};
|
||||||
}
|
}
|
||||||
|
$event->{series_image} = $serie->{image};
|
||||||
|
$event->{series_image_label} = $serie->{licence};
|
||||||
return $serie;
|
return $serie;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -97,7 +99,7 @@ sub setAttributesFromOtherEvent{
|
|||||||
event_id => $params->{source_event_id}
|
event_id => $params->{source_event_id}
|
||||||
});
|
});
|
||||||
if (defined $event2){
|
if (defined $event2){
|
||||||
for my $attr ('title', 'user_title', 'excerpt', 'user_excerpt', 'content', 'html_content', 'topics', 'image', 'live', 'no_event_sync', 'podcast_url', 'archive_url'){
|
for my $attr ('title', 'user_title', 'excerpt', 'user_excerpt', 'content', 'html_content', 'topics', 'image', 'series_image', 'live', 'no_event_sync', 'podcast_url', 'archive_url', 'image_label', 'series_image_label'){
|
||||||
$event->{$attr}=$event2->{$attr};
|
$event->{$attr}=$event2->{$attr};
|
||||||
}
|
}
|
||||||
$event->{rerun}=1;
|
$event->{rerun}=1;
|
||||||
|
|||||||
@@ -246,20 +246,20 @@ sub modify_results {
|
|||||||
$result->{no_comment} = 1 if ( $result->{comment_count} == 0 );
|
$result->{no_comment} = 1 if ( $result->{comment_count} == 0 );
|
||||||
|
|
||||||
#fix image url
|
#fix image url
|
||||||
|
|
||||||
|
if ((defined $config->{permissions}->{hide_event_images}) && ($config->{permissions}->{hide_event_images} eq '1')){
|
||||||
|
$result->{image} = $result->{series_image};
|
||||||
|
$result->{image_label} = $result->{series_image_label};
|
||||||
|
}
|
||||||
|
|
||||||
if ( defined $result->{image} ) {
|
if ( defined $result->{image} ) {
|
||||||
$result->{thumb} = $result->{image};
|
my $url=$config->{locations}->{local_media_url}||'';
|
||||||
$result->{icon} = $result->{image};
|
if (defined $result->{image}){
|
||||||
|
my $image=$result->{image};
|
||||||
$result->{image} =~ s/thumbs/images/g;
|
$result->{thumb} = $url.'/thumbs/'.$image;
|
||||||
$result->{image} =~ s/icons/images/g;
|
$result->{icon} = $url.'/icons/'.$image;
|
||||||
|
$result->{image} = $url.'/images/'.$image;
|
||||||
#fix thumbs url
|
}
|
||||||
$result->{thumb} =~ s/images/thumbs/s;
|
|
||||||
$result->{thumb} =~ s/icons/thumbs/s;
|
|
||||||
|
|
||||||
#fix icon url
|
|
||||||
$result->{icon} =~ s/thumbs/icons/s;
|
|
||||||
$result->{icon} =~ s/images/icons/s;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$result->{location_css} = $result->{location} || '';
|
$result->{location_css} = $result->{location} || '';
|
||||||
@@ -1019,6 +1019,9 @@ sub get_query {
|
|||||||
,e.modified_by
|
,e.modified_by
|
||||||
,e.comment_count
|
,e.comment_count
|
||||||
,e.image
|
,e.image
|
||||||
|
,e.image_label
|
||||||
|
,e.series_image
|
||||||
|
,e.series_image_label
|
||||||
,e.reference
|
,e.reference
|
||||||
,e.recurrence
|
,e.recurrence
|
||||||
,e.recurrence_count
|
,e.recurrence_count
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ our %EXPORT_TAGS = ( 'all' => [ @EXPORT_OK ] );
|
|||||||
|
|
||||||
#column 'created_at' will be set at insert
|
#column 'created_at' will be set at insert
|
||||||
#column 'modified_at' will be set by default (do not update)
|
#column 'modified_at' will be set by default (do not update)
|
||||||
my $sql_columns =['filename', 'name', 'description', 'created_by', 'modified_by', 'modified_at', 'studio_id', 'project_id'];
|
my $sql_columns =['filename', 'name', 'description', 'created_by', 'modified_by', 'modified_at', 'studio_id', 'project_id', 'public', 'licence'];
|
||||||
|
|
||||||
sub get{
|
sub get{
|
||||||
my $config=shift;
|
my $config=shift;
|
||||||
@@ -52,6 +52,15 @@ sub get{
|
|||||||
push @cond, 'modified_by = ?';
|
push @cond, 'modified_by = ?';
|
||||||
push @$bind_values,$options->{modified_by};
|
push @$bind_values,$options->{modified_by};
|
||||||
}
|
}
|
||||||
|
if ((defined $options->{licence}) && ($options->{licence}ne'')){
|
||||||
|
push @cond, 'licence = ?';
|
||||||
|
push @$bind_values,$options->{licence};
|
||||||
|
}
|
||||||
|
if ((defined $options->{public}) && ($options->{public}ne'')){
|
||||||
|
push @cond, 'public = ?';
|
||||||
|
push @$bind_values,$options->{public};
|
||||||
|
}
|
||||||
|
|
||||||
if ((defined $options->{search}) && ($options->{search}ne'')){
|
if ((defined $options->{search}) && ($options->{search}ne'')){
|
||||||
push @cond, '(filename like ?'
|
push @cond, '(filename like ?'
|
||||||
.' or name like ?'
|
.' or name like ?'
|
||||||
@@ -85,8 +94,8 @@ sub get{
|
|||||||
};
|
};
|
||||||
#print STDERR Dumper($query).Dumper($bind_values);
|
#print STDERR Dumper($query).Dumper($bind_values);
|
||||||
|
|
||||||
my $dbh=db::connect($config);
|
my $dbh = db::connect($config);
|
||||||
my $results=db::get($dbh, $query, $bind_values);
|
my $results = db::get($dbh, $query, $bind_values);
|
||||||
|
|
||||||
#print STDERR @$results."\n";
|
#print STDERR @$results."\n";
|
||||||
return $results;
|
return $results;
|
||||||
@@ -96,8 +105,8 @@ sub insert_or_update{
|
|||||||
my $dbh=shift;
|
my $dbh=shift;
|
||||||
my $image=shift;
|
my $image=shift;
|
||||||
|
|
||||||
$image->{name}='new' if ($image->{name}eq'');
|
$image->{name} = 'new' if $image->{name} eq '' ;
|
||||||
my $entry=get_by_filename($dbh, $image->{filename});
|
my $entry = get_by_filename($dbh, $image->{filename});
|
||||||
if (defined $entry){
|
if (defined $entry){
|
||||||
update($dbh, $image);
|
update($dbh, $image);
|
||||||
}else{
|
}else{
|
||||||
@@ -128,6 +137,10 @@ sub insert{
|
|||||||
return undef;
|
return undef;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for my $attr ('public'){
|
||||||
|
$image->{$attr} = 0 unless (defined $image->{$attr}) && ($image->{$attr} eq '1');
|
||||||
|
}
|
||||||
|
|
||||||
my $query=q{
|
my $query=q{
|
||||||
insert into calcms_images(
|
insert into calcms_images(
|
||||||
}.join(',',@sql_columns).qq{
|
}.join(',',@sql_columns).qq{
|
||||||
@@ -137,7 +150,12 @@ sub insert{
|
|||||||
my @bind_values=map { $image->{$_} } @sql_columns;
|
my @bind_values=map { $image->{$_} } @sql_columns;
|
||||||
|
|
||||||
#print STDERR Dumper($query).Dumper(\@bind_values);
|
#print STDERR Dumper($query).Dumper(\@bind_values);
|
||||||
return db::put($dbh, $query, \@bind_values);
|
my $result = db::put($dbh, $query, \@bind_values);
|
||||||
|
|
||||||
|
images::setSeriesLabels($dbh, $image);
|
||||||
|
images::setEventLabels($dbh, $image);
|
||||||
|
|
||||||
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -153,9 +171,17 @@ sub update{
|
|||||||
print STDERR "missing project_id at image::update\n";
|
print STDERR "missing project_id at image::update\n";
|
||||||
return undef;
|
return undef;
|
||||||
}
|
}
|
||||||
|
unless (defined $image->{filename}){
|
||||||
|
print STDERR "missing filename at image::update\n";
|
||||||
|
return undef;
|
||||||
|
}
|
||||||
|
|
||||||
$image->{modified_at}=time::time_to_datetime();
|
$image->{modified_at}=time::time_to_datetime();
|
||||||
|
|
||||||
|
for my $attr ('public'){
|
||||||
|
$image->{$attr} = 0 unless (defined $image->{$attr}) && ($image->{$attr} eq '1');
|
||||||
|
}
|
||||||
|
|
||||||
my @set=();
|
my @set=();
|
||||||
my $bind_values=[];
|
my $bind_values=[];
|
||||||
for my $column (@$sql_columns){
|
for my $column (@$sql_columns){
|
||||||
@@ -184,10 +210,16 @@ sub update{
|
|||||||
set $set
|
set $set
|
||||||
where $conditions
|
where $conditions
|
||||||
};
|
};
|
||||||
#print STDERR Dumper($query).Dumper($bind_values);
|
print STDERR Dumper($query).Dumper($bind_values);
|
||||||
return db::put($dbh,$query,$bind_values);
|
my $result= db::put($dbh,$query,$bind_values);
|
||||||
|
|
||||||
|
images::setSeriesLabels($dbh, $image);
|
||||||
|
images::setEventLabels($dbh, $image);
|
||||||
|
|
||||||
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
sub delete{
|
sub delete{
|
||||||
my $dbh=shift;
|
my $dbh=shift;
|
||||||
my $image=shift;
|
my $image=shift;
|
||||||
@@ -196,8 +228,8 @@ sub delete{
|
|||||||
print STDERR "missing project_id at images::delete\n";
|
print STDERR "missing project_id at images::delete\n";
|
||||||
return undef;
|
return undef;
|
||||||
}
|
}
|
||||||
unless (defined $image->{project_id}){
|
unless (defined $image->{studio_id}){
|
||||||
print STDERR "missing project_id at images::delete\n";
|
print STDERR "missing studio_id at images::delete\n";
|
||||||
return undef;
|
return undef;
|
||||||
}
|
}
|
||||||
unless (defined $image->{filename}){
|
unless (defined $image->{filename}){
|
||||||
@@ -292,6 +324,206 @@ sub delete_file{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sub getPath{
|
||||||
|
my $config=shift;
|
||||||
|
my $options=shift;
|
||||||
|
|
||||||
|
my $dir = $config->{locations}->{local_media_dir};
|
||||||
|
return undef unless defined $dir;
|
||||||
|
return undef unless -e $dir;
|
||||||
|
|
||||||
|
my $filename=$options->{filename};
|
||||||
|
return undef unless defined $filename;
|
||||||
|
$filename=~s/^.*\///g;
|
||||||
|
|
||||||
|
my $type='thumbs';
|
||||||
|
$type=$options->{type} if (defined $options->{type}) && ($options->{type}=~/^(images|thumbs|icons)$/);
|
||||||
|
|
||||||
|
my $path = $dir.'/'.$type.'/'.$filename;
|
||||||
|
$path=~s/\/+/\//g;
|
||||||
|
return $path;
|
||||||
|
}
|
||||||
|
|
||||||
|
sub getInternalPath{
|
||||||
|
my $config=shift;
|
||||||
|
my $options=shift;
|
||||||
|
|
||||||
|
my $dir=$config->{locations}->{local_media_dir};
|
||||||
|
return undef unless defined $dir;
|
||||||
|
return undef unless -e $dir;
|
||||||
|
|
||||||
|
my $filename=$options->{filename};
|
||||||
|
return undef unless defined $filename;
|
||||||
|
$filename=~s/^.*\///g;
|
||||||
|
|
||||||
|
my $type='thumbs';
|
||||||
|
$type=$options->{type} if (defined $options->{type}) && ($options->{type}=~/^(images|thumbs|icons)$/);
|
||||||
|
|
||||||
|
my $path = $dir.'/internal/'.$type.'/'.$filename;
|
||||||
|
$path=~s/\/+/\//g;
|
||||||
|
return $path;
|
||||||
|
}
|
||||||
|
|
||||||
|
sub readFile{
|
||||||
|
my $path=shift;
|
||||||
|
my $content='';
|
||||||
|
|
||||||
|
print STDERR "read '$path'\n";
|
||||||
|
return { error=> "source '$path' does not exist"} unless -e $path;
|
||||||
|
return { error=> "cannot read source '$path'"} unless -r $path;
|
||||||
|
|
||||||
|
open my $file, '< :raw', $path or return { error => 'could not open image file. ' . $! . " $path" };
|
||||||
|
binmode $file;
|
||||||
|
$content = join("",<$file>);
|
||||||
|
close $file;
|
||||||
|
return {content => $content};
|
||||||
|
}
|
||||||
|
|
||||||
|
sub writeFile{
|
||||||
|
my $path=shift;
|
||||||
|
my $content=shift;
|
||||||
|
|
||||||
|
print STDERR "save '$path'\n";
|
||||||
|
open my $fh, '> :raw', $path or return { error => 'could not save image. ' . $! . " $path" };
|
||||||
|
binmode $fh;
|
||||||
|
print $fh $content;
|
||||||
|
close $fh;
|
||||||
|
return {};
|
||||||
|
}
|
||||||
|
|
||||||
|
sub deleteFile{
|
||||||
|
my $path=shift;
|
||||||
|
return { error=> "source '$path' does not exist"} unless -e $path;
|
||||||
|
#unlink $path;
|
||||||
|
return {};
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
sub copyFile{
|
||||||
|
my $source = shift;
|
||||||
|
my $target = shift;
|
||||||
|
my $errors = shift;
|
||||||
|
|
||||||
|
my $read=images::readFile($source);
|
||||||
|
return $read if defined $read->{error};
|
||||||
|
|
||||||
|
my $write=images::writeFile($target, $read->{content});
|
||||||
|
return $write;
|
||||||
|
}
|
||||||
|
|
||||||
|
sub publish{
|
||||||
|
my $config=shift;
|
||||||
|
my $filename=shift;
|
||||||
|
|
||||||
|
print STDERR "publish\n";
|
||||||
|
return undef unless defined $config;
|
||||||
|
return undef unless defined $filename;
|
||||||
|
my $errors=[];
|
||||||
|
for my $type ('images','thumbs','icons'){
|
||||||
|
my $source = getInternalPath($config, {filename=>$filename, type=>$type});
|
||||||
|
my $target = getPath($config, {filename=>$filename, type=>$type});
|
||||||
|
my $result = copyFile($source, $target, $errors);
|
||||||
|
if (defined $result->{error}){
|
||||||
|
push @$errors, $result->{error} ;
|
||||||
|
print STDERR "error on copy '$source' to '$target': $result->{error}\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return $errors;
|
||||||
|
}
|
||||||
|
|
||||||
|
sub depublish{
|
||||||
|
my $config=shift;
|
||||||
|
my $filename=shift;
|
||||||
|
|
||||||
|
print STDERR "depublish\n";
|
||||||
|
return undef unless defined $config;
|
||||||
|
return undef unless defined $filename;
|
||||||
|
my $errors=[];
|
||||||
|
for my $type ('images','thumbs','icons'){
|
||||||
|
my $path = getPath($config, {filename=>$filename, type=>$type});
|
||||||
|
next unless defined $path;
|
||||||
|
print STDERR "remove '$path'\n";
|
||||||
|
unlink $path;
|
||||||
|
#push @$errors, $result->{error} if defined $result->{error};
|
||||||
|
}
|
||||||
|
return $errors;
|
||||||
|
}
|
||||||
|
|
||||||
|
sub checkLicence{
|
||||||
|
my $config = shift;
|
||||||
|
my $result = shift;
|
||||||
|
|
||||||
|
print STDERR "depublish\n";
|
||||||
|
return undef unless defined $config;
|
||||||
|
return undef unless defined $result;
|
||||||
|
|
||||||
|
return if $result->{licence}=~/\S/;
|
||||||
|
if ((defined $result->{public}) && ($result->{public}eq'1')){
|
||||||
|
depublish($config, $result->{filename});
|
||||||
|
$result->{public}=0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
sub setEventLabels{
|
||||||
|
my $dbh = shift;
|
||||||
|
my $image = shift;
|
||||||
|
|
||||||
|
unless (defined $image->{project_id}){
|
||||||
|
print STDERR "missing project_id at images::setEventLabels\n";
|
||||||
|
return undef;
|
||||||
|
}
|
||||||
|
unless (defined $image->{studio_id}){
|
||||||
|
print STDERR "missing studio_id at images::setEventLabels\n";
|
||||||
|
return undef;
|
||||||
|
}
|
||||||
|
unless (defined $image->{filename}){
|
||||||
|
print STDERR "missing filename at images::setEventLabels\n";
|
||||||
|
return undef;
|
||||||
|
}
|
||||||
|
|
||||||
|
my $query=qq{
|
||||||
|
update calcms_events
|
||||||
|
set image_label=?
|
||||||
|
where image=?
|
||||||
|
};
|
||||||
|
my $bind_values=[$image->{licence}, $image->{filename}];
|
||||||
|
print STDERR Dumper($query).Dumper($bind_values);
|
||||||
|
|
||||||
|
my $results= db::put($dbh, $query, $bind_values);
|
||||||
|
print STDERR Dumper($results)." changes\n";
|
||||||
|
return $results;
|
||||||
|
}
|
||||||
|
|
||||||
|
sub setSeriesLabels{
|
||||||
|
my $dbh = shift;
|
||||||
|
my $image = shift;
|
||||||
|
|
||||||
|
unless (defined $image->{project_id}){
|
||||||
|
print STDERR "missing project_id at images::setSeriesLabels\n";
|
||||||
|
return undef;
|
||||||
|
}
|
||||||
|
unless (defined $image->{studio_id}){
|
||||||
|
print STDERR "missing studio_id at images::setSeriesLabels\n";
|
||||||
|
return undef;
|
||||||
|
}
|
||||||
|
unless (defined $image->{filename}){
|
||||||
|
print STDERR "missing filename at images::setSeriesLabels\n";
|
||||||
|
return undef;
|
||||||
|
}
|
||||||
|
|
||||||
|
my $query=qq{
|
||||||
|
update calcms_events
|
||||||
|
set series_image_label=?
|
||||||
|
where series_image=?
|
||||||
|
};
|
||||||
|
my $bind_values=[$image->{licence}, $image->{filename}];
|
||||||
|
print STDERR Dumper($query).Dumper($bind_values);
|
||||||
|
|
||||||
|
my $results= db::put($dbh, $query, $bind_values);
|
||||||
|
print STDERR Dumper($results)." changes\n";
|
||||||
|
return $results;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
#do not delete last line!
|
#do not delete last line!
|
||||||
1;
|
1;
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ sub get{
|
|||||||
return undef unless defined $condition->{studio_id};
|
return undef unless defined $condition->{studio_id};
|
||||||
|
|
||||||
my $date_range_include=0;
|
my $date_range_include=0;
|
||||||
$date_range_include=1 if $condition->{date_range_include}==1;
|
$date_range_include=1 if (defined $condition->{date_range_include}) && ($condition->{date_range_include}==1);
|
||||||
|
|
||||||
my $dbh=db::connect($config);
|
my $dbh=db::connect($config);
|
||||||
|
|
||||||
|
|||||||
@@ -78,6 +78,17 @@ sub get{
|
|||||||
return $projects;
|
return $projects;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# requires at least project_id
|
||||||
|
sub getImageById{
|
||||||
|
my $config = shift;
|
||||||
|
my $conditions = shift;
|
||||||
|
|
||||||
|
return undef unless defined $conditions->{project_id};
|
||||||
|
my $projects=project::get($config, $conditions);
|
||||||
|
return undef if scalar(@$projects) != 1;
|
||||||
|
return $projects->[0]->{image};
|
||||||
|
}
|
||||||
|
|
||||||
sub get_date_range{
|
sub get_date_range{
|
||||||
my $config=shift;
|
my $config=shift;
|
||||||
my $query=qq{
|
my $query=qq{
|
||||||
|
|||||||
@@ -71,7 +71,10 @@ sub save_content{
|
|||||||
my @keys=();
|
my @keys=();
|
||||||
for my $key ('series_name', 'title', 'excerpt', 'content', 'html_content',
|
for my $key ('series_name', 'title', 'excerpt', 'content', 'html_content',
|
||||||
'user_title', 'user_excerpt', 'topic', 'html_topic',
|
'user_title', 'user_excerpt', 'topic', 'html_topic',
|
||||||
'episode', 'image', 'podcast_url', 'archive_url',
|
'episode',
|
||||||
|
'image', 'image_label',
|
||||||
|
'series_image', 'series_image_label',
|
||||||
|
'podcast_url', 'archive_url',
|
||||||
'live', 'published', 'playout', 'archived', 'rerun', 'draft', 'disable_event_sync',
|
'live', 'published', 'playout', 'archived', 'rerun', 'draft', 'disable_event_sync',
|
||||||
'modified_by'
|
'modified_by'
|
||||||
){
|
){
|
||||||
@@ -90,7 +93,7 @@ sub save_content{
|
|||||||
where id=?
|
where id=?
|
||||||
};
|
};
|
||||||
|
|
||||||
print STDERR $query.Dumper(\@bind_values);
|
#print STDERR $query.Dumper(\@bind_values);
|
||||||
db::put($dbh, $query, \@bind_values);
|
db::put($dbh, $query, \@bind_values);
|
||||||
return $entry;
|
return $entry;
|
||||||
}
|
}
|
||||||
@@ -409,6 +412,8 @@ sub insert_event{
|
|||||||
for my $attr ('program', 'series_name', 'title', 'excerpt', 'content', 'topic', 'image', 'episode', 'podcast_url', 'archive_url'){
|
for my $attr ('program', 'series_name', 'title', 'excerpt', 'content', 'topic', 'image', 'episode', 'podcast_url', 'archive_url'){
|
||||||
$event->{$attr}=$serie->{$attr} if defined $serie->{$attr};
|
$event->{$attr}=$serie->{$attr} if defined $serie->{$attr};
|
||||||
}
|
}
|
||||||
|
$event->{series_image} = $serie->{image} if defined $serie->{image};
|
||||||
|
$event->{series_image_label} = $serie->{licence} if defined $serie->{licence};
|
||||||
|
|
||||||
#overwrite series values from parameters
|
#overwrite series values from parameters
|
||||||
for my $attr ('program', 'series_name', 'title', 'user_title', 'excerpt', 'user_except', 'content', 'topic', 'image', 'episode', 'podcast_url', 'archive_url'){
|
for my $attr ('program', 'series_name', 'title', 'user_title', 'excerpt', 'user_except', 'content', 'topic', 'image', 'episode', 'podcast_url', 'archive_url'){
|
||||||
@@ -462,6 +467,30 @@ sub add_event_dates{
|
|||||||
return $event;
|
return $event;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sub update_series_images{
|
||||||
|
my $config = shift;
|
||||||
|
my $options = shift;
|
||||||
|
|
||||||
|
return "missing project_id" unless defined $options->{project_id};
|
||||||
|
return "missing studio_id" unless defined $options->{studio_id};
|
||||||
|
return "missing series_id" unless defined $options->{series_id};
|
||||||
|
return "missing series_image" unless defined $options->{series_image};
|
||||||
|
|
||||||
|
my $events=series::get_events(
|
||||||
|
$config, {
|
||||||
|
project_id => $options->{project_id},
|
||||||
|
studio_id => $options->{studio_id},
|
||||||
|
series_id => $options->{series_id},
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
for my $event (@$events){
|
||||||
|
$event->{series_image} = $options->{series_image};
|
||||||
|
series_events::save_content($config, $event);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
sub error{
|
sub error{
|
||||||
my $msg=shift;
|
my $msg=shift;
|
||||||
print "ERROR: $msg<br/>\n";
|
print "ERROR: $msg<br/>\n";
|
||||||
|
|||||||
@@ -81,6 +81,17 @@ sub get{
|
|||||||
return $studios;
|
return $studios;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sub getImageById{
|
||||||
|
my $config = shift;
|
||||||
|
my $conditions = shift;
|
||||||
|
|
||||||
|
return undef unless defined $conditions->{project_id};
|
||||||
|
return undef unless defined $conditions->{studio_id};
|
||||||
|
my $studios = studios::get($config, $conditions);
|
||||||
|
return undef if scalar(@$studios) != 1;
|
||||||
|
return $studios->[0]->{image};
|
||||||
|
}
|
||||||
|
|
||||||
sub insert{
|
sub insert{
|
||||||
my $config=shift;
|
my $config=shift;
|
||||||
my $entry=shift;
|
my $entry=shift;
|
||||||
|
|||||||
@@ -130,14 +130,16 @@ if ( $0 =~ /aggregate.*?\.cgi$/ ) {
|
|||||||
$list->{project_title} = '' unless ( defined $list->{project_title} );
|
$list->{project_title} = '' unless ( defined $list->{project_title} );
|
||||||
$content =~ s/(<(div|span)\s+id="calcms_title".*?>).*?(<\/(div|span)>)/$list->{project_title}/g;
|
$content =~ s/(<(div|span)\s+id="calcms_title".*?>).*?(<\/(div|span)>)/$list->{project_title}/g;
|
||||||
|
|
||||||
my $title = $list->{program} || '';
|
my $values = [];
|
||||||
$title .= ' - ' . $list->{series_name} if ( ( defined $list->{series_name} ) && ( $list->{series_name} ne '' ) );
|
for my $value ($list->{'program'}, $list->{'series_name'}, $list->{'title'}, $list->{'location'}, $list->{'project_title'}){
|
||||||
$title .= ' - ' . $list->{title} if ( ( defined $list->{title} ) && ( $list->{title} ne '' ) );
|
next unless defined $value;
|
||||||
$title = ' | ' . $title if ( $title ne '' );
|
next if $value eq '';
|
||||||
$title .= 'Programmplan';
|
push @$values, $value;
|
||||||
$title .= ' | ' . $list->{project_title} if $list->{project_title} ne '';
|
}
|
||||||
|
|
||||||
#$content=~s/(<title>)(.*?)(<\/title>)/$1$title$3/;
|
my $title = join (' - ', @$values);
|
||||||
|
|
||||||
|
$content=~s/(<title>)(.*?)(<\/title>)/$1$title$3/;
|
||||||
|
|
||||||
$js = '';
|
$js = '';
|
||||||
if ( ( defined $list->{event_id} ) && ( $list->{event_id} ne '' ) ) {
|
if ( ( defined $list->{event_id} ) && ( $list->{event_id} ne '' ) ) {
|
||||||
|
|||||||
@@ -74,8 +74,8 @@ sub getProjects {
|
|||||||
my $config = shift;
|
my $config = shift;
|
||||||
|
|
||||||
my $excludedProjects = {};
|
my $excludedProjects = {};
|
||||||
if ( defined $config->{filter}->{exclude_projects} ) {
|
if ( defined $config->{filter}->{projects_to_exclude} ) {
|
||||||
for my $project ( split( /\,/, $config->{filter}->{exclude_projects} ) ) {
|
for my $project ( split( /\,/, $config->{filter}->{projects_to_exclude} ) ) {
|
||||||
$project =~ s/^\s+//g;
|
$project =~ s/^\s+//g;
|
||||||
$project =~ s/\s+$//g;
|
$project =~ s/\s+$//g;
|
||||||
$excludedProjects->{$project} = 1;
|
$excludedProjects->{$project} = 1;
|
||||||
|
|||||||
@@ -1,8 +1,51 @@
|
|||||||
/*
|
/*
|
||||||
include in your web page:
|
include in your web page:
|
||||||
<link rel="stylesheet" type="text/css" media="screen" href="/agenda_files/css/calcms.css" />
|
<link rel="stylesheet" type="text/css" media="screen" href="/agenda_files/css/calcms.css" />
|
||||||
|
* {font-size:1em !important;}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/* latin-ext */
|
||||||
|
@font-face {
|
||||||
|
font-family: 'Roboto';
|
||||||
|
font-style: normal;
|
||||||
|
font-weight: 400;
|
||||||
|
src: local('Roboto'), local('Roboto-Regular'), url(https://fonts.gstatic.com/s/roboto/v18/KFOmCnqEu92Fr1Mu7GxKOzY.woff2) format('woff2');
|
||||||
|
unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
|
||||||
|
}
|
||||||
|
/* latin */
|
||||||
|
@font-face {
|
||||||
|
font-family: 'Roboto';
|
||||||
|
font-style: normal;
|
||||||
|
font-weight: 400;
|
||||||
|
src: local('Roboto'), local('Roboto-Regular'), url(https://fonts.gstatic.com/s/roboto/v18/KFOmCnqEu92Fr1Mu4mxK.woff2) format('woff2');
|
||||||
|
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* latin-ext */
|
||||||
|
@font-face {
|
||||||
|
font-family: 'Open Sans';
|
||||||
|
font-style: normal;
|
||||||
|
font-weight: 400;
|
||||||
|
src: local('Open Sans Regular'), local('OpenSans-Regular'), url(https://fonts.gstatic.com/s/opensans/v15/mem8YaGs126MiZpBA-UFW50bbck.woff2) format('woff2');
|
||||||
|
unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
|
||||||
|
}
|
||||||
|
/* latin */
|
||||||
|
@font-face {
|
||||||
|
font-family: 'Open Sans';
|
||||||
|
font-style: normal;
|
||||||
|
font-weight: 400;
|
||||||
|
src: local('Open Sans Regular'), local('OpenSans-Regular'), url(https://fonts.gstatic.com/s/opensans/v15/mem8YaGs126MiZpBA-UFVZ0b.woff2) format('woff2');
|
||||||
|
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
||||||
|
}
|
||||||
|
|
||||||
|
#page * {
|
||||||
|
font-family: Roboto, serif !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
#page p {
|
||||||
|
font-family: Open Sans, serif !important;
|
||||||
|
}
|
||||||
|
|
||||||
/* fix drupal */
|
/* fix drupal */
|
||||||
input{
|
input{
|
||||||
max-width:20em;
|
max-width:20em;
|
||||||
@@ -134,22 +177,100 @@ a{
|
|||||||
margin-left:1.7rem;
|
margin-left:1.7rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#calcms_list .event{
|
||||||
|
display:flex;
|
||||||
|
flex-direction: row;
|
||||||
|
width:100%;
|
||||||
|
justify-content: space-between;
|
||||||
|
border-bottom:1px solid rgba(100,100,100,0.24);
|
||||||
|
hyphens: none;
|
||||||
|
cursor:pointer;
|
||||||
|
background:rgba(200, 200, 200, 0.2);
|
||||||
|
color:#666;
|
||||||
|
overflow:hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
transition: all .1s ease-in-out;
|
||||||
|
}
|
||||||
|
|
||||||
|
#calcms_list .event:hover{
|
||||||
|
background:rgba(200, 200, 200, 0.3);
|
||||||
|
}
|
||||||
|
|
||||||
#calcms_list .date{
|
#calcms_list .date{
|
||||||
font-weight:bold;
|
font-weight:bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#calcms_list .time{
|
||||||
|
width:10%;
|
||||||
|
min-width:5rem;
|
||||||
|
padding:1rem;
|
||||||
|
padding-right:0;
|
||||||
|
text-align:center;
|
||||||
|
font-size:1.1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
#calcms_list .summary{
|
||||||
|
width:70%;
|
||||||
|
padding:1rem;
|
||||||
|
padding-right:0;
|
||||||
|
hyphens: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
#calcms_list .title{
|
||||||
|
font-weight:bold;
|
||||||
|
hyphens: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
#calcms_list .title a{
|
||||||
|
font-weight:bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
#calcms_list .location{
|
||||||
|
width:20%;
|
||||||
|
padding:1rem;
|
||||||
|
font-weight:100;
|
||||||
|
text-align:center;
|
||||||
|
color:rgba(0, 0, 0, 0.7);
|
||||||
|
}
|
||||||
|
|
||||||
|
@media all and (max-width: 959px) {
|
||||||
|
#calcms_list .summary{
|
||||||
|
width:90%;
|
||||||
|
}
|
||||||
|
#calcms_list .location {
|
||||||
|
width:0;
|
||||||
|
display:none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media all and (max-width: 800px) {
|
||||||
|
#calcms_list .excerpt{
|
||||||
|
width:0;
|
||||||
|
display:none;
|
||||||
|
}
|
||||||
|
#calcms_list .location {
|
||||||
|
width:0;
|
||||||
|
display:none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#calcms_list .excerpt{
|
#calcms_list .excerpt{
|
||||||
margin-left:3rem;
|
max-height:3.9rem;
|
||||||
margin-top:6px;
|
|
||||||
max-height:5em;
|
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
|
color:rgba(0, 0, 0, 0.7);
|
||||||
|
}
|
||||||
|
|
||||||
|
#calcms_list .event.running:hover{
|
||||||
|
opacity:0.9;
|
||||||
}
|
}
|
||||||
|
|
||||||
#calcms_list .event.running,
|
#calcms_list .event.running,
|
||||||
|
#calcms_list .event.running .excerpt,
|
||||||
|
#calcms_list .event.running .location,
|
||||||
#calcms_list .event.running a{
|
#calcms_list .event.running a{
|
||||||
color:#fff;
|
color:#fff;
|
||||||
background:#aaa;
|
background:#007acc;
|
||||||
}
|
}
|
||||||
|
|
||||||
#calcms_list .comments.submitted{
|
#calcms_list .comments.submitted{
|
||||||
@@ -157,36 +278,45 @@ a{
|
|||||||
}
|
}
|
||||||
|
|
||||||
#calcms_list .submitted{
|
#calcms_list .submitted{
|
||||||
margin-left:3.2rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
#calcms_list .title{
|
|
||||||
margin-bottom:1em;
|
|
||||||
font-weight:bold;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#calcms_list .content img{
|
#calcms_list .content img{
|
||||||
text-align:left;
|
|
||||||
font-size:1.5em;
|
|
||||||
margin-bottom:20px;
|
|
||||||
border:0;
|
border:0;
|
||||||
float: right;
|
}
|
||||||
|
|
||||||
|
#calcms_list .content figure{
|
||||||
|
float:right;
|
||||||
|
margin-left: 1em;
|
||||||
|
margin-bottom:20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#calcms_list .content figcaption{
|
||||||
|
font-size:12px;
|
||||||
margin-left: 1em;
|
margin-left: 1em;
|
||||||
}
|
}
|
||||||
|
|
||||||
#calcms_list .event{
|
|
||||||
padding:1rem;
|
#calcms_list .piradio,
|
||||||
padding-right:0.5rem;
|
#calcms_list .dt64,
|
||||||
border-bottom:1rem solid #fff;
|
#calcms_list .galerie,
|
||||||
hyphens: none;
|
#calcms_list .studiolottumstrasse,
|
||||||
cursor:pointer;
|
#calcms_list .ansage,
|
||||||
background:#eee;
|
#calcms_list .potsdam,
|
||||||
color:#666;
|
#calcms_list .colabo{
|
||||||
max-height:8rem;
|
color:#333;
|
||||||
overflow:hidden;
|
|
||||||
text-overflow: ellipsis;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#calcms_list .blnfm,
|
||||||
|
#calcms_list .multicultfm,
|
||||||
|
#calcms_list .ohrfunk,
|
||||||
|
#calcms_list .twenfm,
|
||||||
|
#calcms_list .offenerkanalberlin,
|
||||||
|
#calcms_list .studioansage,
|
||||||
|
#calcms_list .studiorebootfm,
|
||||||
|
#calcms_list .frrapo,
|
||||||
|
#calcms_list .klubradio{
|
||||||
|
color:#666;
|
||||||
|
}
|
||||||
|
|
||||||
#calcms_list hr{
|
#calcms_list hr{
|
||||||
margin:1em 0;
|
margin:1em 0;
|
||||||
@@ -583,6 +713,12 @@ a#calcms_search_show_details #plus{
|
|||||||
background-color:#f0f0f0;
|
background-color:#f0f0f0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#calcms_calendar table tbody td.calcms_today,
|
||||||
|
#calcms_calendar table tbody td.calcms_today a{
|
||||||
|
background:#007acc;
|
||||||
|
color:white;
|
||||||
|
}
|
||||||
|
|
||||||
#calcms_calendar table td.selected{
|
#calcms_calendar table td.selected{
|
||||||
background:#eee;
|
background:#eee;
|
||||||
font-weight:bold;
|
font-weight:bold;
|
||||||
@@ -598,7 +734,7 @@ a#calcms_search_show_details #plus{
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* player */
|
/* player
|
||||||
#player{
|
#player{
|
||||||
border:0;
|
border:0;
|
||||||
padding:0;
|
padding:0;
|
||||||
@@ -606,9 +742,18 @@ a#calcms_search_show_details #plus{
|
|||||||
width:180px;
|
width:180px;
|
||||||
overflow:hidden;
|
overflow:hidden;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
#player{
|
||||||
|
border:0;
|
||||||
|
padding:0;
|
||||||
|
height:64px;
|
||||||
|
}
|
||||||
|
#player:hover{
|
||||||
|
opacity:0.9;
|
||||||
|
}
|
||||||
|
|
||||||
/* mobile menu */
|
/* mobile menu */
|
||||||
|
|
||||||
#mobileMenuButton{
|
#mobileMenuButton{
|
||||||
display:block;
|
display:block;
|
||||||
position:fixed;
|
position:fixed;
|
||||||
@@ -698,3 +843,25 @@ div.update, div.update a{
|
|||||||
color:#bbb;
|
color:#bbb;
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
#listen_radio{
|
||||||
|
width:100%;
|
||||||
|
text-align:left;
|
||||||
|
}
|
||||||
|
#listen_radio iframe{
|
||||||
|
margin-top:1em;
|
||||||
|
}
|
||||||
|
#listen_radio td{
|
||||||
|
border:0;
|
||||||
|
}
|
||||||
|
|
||||||
|
div#content header h1.entry-title{
|
||||||
|
margin-bottom:0;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media screen and (min-width: 61.5625em) {
|
||||||
|
.site-header {
|
||||||
|
padding: 3rem;
|
||||||
|
padding-top: 1rem;
|
||||||
|
padding-bottom: 0rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -31,7 +31,13 @@ if ( $0 =~ /events.*?\.cgi$/ ) {
|
|||||||
#my %params=$cgi->Vars();
|
#my %params=$cgi->Vars();
|
||||||
our $config = config::get('config/config.cgi');
|
our $config = config::get('config/config.cgi');
|
||||||
|
|
||||||
|
$params->{template} = '' unless defined $params->{template};
|
||||||
$params->{recordings} = 1 if $params->{template} =~ /events_playout/;
|
$params->{recordings} = 1 if $params->{template} =~ /events_playout/;
|
||||||
|
|
||||||
|
$params->{exclude_locations} = 1;
|
||||||
|
$params->{exclude_projects} = 1;
|
||||||
|
$params->{exclude_event_images} = 1;
|
||||||
|
|
||||||
my $request = {
|
my $request = {
|
||||||
url => $ENV{QUERY_STRING},
|
url => $ENV{QUERY_STRING},
|
||||||
params => {
|
params => {
|
||||||
|
|||||||
@@ -647,9 +647,10 @@ var calcms = (function($) {
|
|||||||
// show comment for given event id and start time
|
// show comment for given event id and start time
|
||||||
my.showCommentsByEventIdOrEventStart = function showCommentsByEventIdOrEventStart(
|
my.showCommentsByEventIdOrEventStart = function showCommentsByEventIdOrEventStart(
|
||||||
event_id, event_start) {
|
event_id, event_start) {
|
||||||
var url = my.get('comments_url');
|
var url = my.get('comments_url') || '/agenda/kommentare/';
|
||||||
if (event_id == '' || event_start == '' || url == '')
|
if (event_id == '' || event_start == '' || url == '')
|
||||||
return false;
|
return false;
|
||||||
|
console.log("showCommentsByEventIdOrEventStart url="+url);
|
||||||
|
|
||||||
my.set('comments_event_start', event_start);
|
my.set('comments_event_start', event_start);
|
||||||
my.set('comments_event_id', event_id);
|
my.set('comments_event_id', event_id);
|
||||||
|
|||||||
@@ -227,7 +227,6 @@ sub assign_events {
|
|||||||
template => 'no',
|
template => 'no',
|
||||||
limit => 1,
|
limit => 1,
|
||||||
archive => 'all',
|
archive => 'all',
|
||||||
no_exclude => '1'
|
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -216,7 +216,6 @@ sub showCalendar {
|
|||||||
till_date => $till,
|
till_date => $till,
|
||||||
date_range_include => 1,
|
date_range_include => 1,
|
||||||
archive => 'all',
|
archive => 'all',
|
||||||
no_exclude => '1',
|
|
||||||
};
|
};
|
||||||
|
|
||||||
# set options depending on switches
|
# set options depending on switches
|
||||||
@@ -1745,8 +1744,9 @@ sub getSeriesEvents {
|
|||||||
};
|
};
|
||||||
$request2->{params}->{checked}->{published} = 'all';
|
$request2->{params}->{checked}->{published} = 'all';
|
||||||
$request2->{params}->{checked}->{draft} = '1' if $params->{list}==1;
|
$request2->{params}->{checked}->{draft} = '1' if $params->{list}==1;
|
||||||
delete $request2->{params}->{checked}->{exclude_locations}
|
|
||||||
if ( ( $params->{studio_id} == -1 ) && ( defined $request2->{params}->{checked}->{exclude_locations} ) );
|
#delete $request2->{params}->{checked}->{locations_to_exclude}
|
||||||
|
# if ( ( $params->{studio_id} == -1 ) && ( defined $request2->{params}->{checked}->{locations_to_exclude} ) );
|
||||||
|
|
||||||
my $events = events::get( $config, $request2 );
|
my $events = events::get( $config, $request2 );
|
||||||
|
|
||||||
|
|||||||
@@ -11,16 +11,18 @@ use config;
|
|||||||
#use template;
|
#use template;
|
||||||
use auth;
|
use auth;
|
||||||
use uac;
|
use uac;
|
||||||
|
use time;
|
||||||
|
|
||||||
#use roles;
|
#use roles;
|
||||||
#use project;
|
#use project;
|
||||||
#use studios;
|
#use studios;
|
||||||
#use events;
|
#use events;
|
||||||
use series;
|
use series;
|
||||||
|
use eventOps;
|
||||||
|
|
||||||
#use series_schedule;
|
#use series_schedule;
|
||||||
#use series_events;
|
#use series_events;
|
||||||
#use series_dates;
|
use series_dates;
|
||||||
#use markup;
|
#use markup;
|
||||||
#use URI::Escape;
|
#use URI::Escape;
|
||||||
#use Encode;
|
#use Encode;
|
||||||
@@ -85,13 +87,129 @@ unless ( $permissions->{create_event_from_schedule} == 1 ) {
|
|||||||
|
|
||||||
if ( defined $params->{action} ) {
|
if ( defined $params->{action} ) {
|
||||||
|
|
||||||
# assign_series ($config, $request) if ($params->{action} eq 'assign_series');
|
# assign_s ($config, $request) if ($params->{action} eq 'assign_series');
|
||||||
}
|
}
|
||||||
|
|
||||||
#print Dumper($params);
|
#print Dumper($params);
|
||||||
show_events( $config, $request );
|
show_events( $config, $request );
|
||||||
|
|
||||||
sub show_events {
|
sub show_events{
|
||||||
|
my $config = shift;
|
||||||
|
my $request = shift;
|
||||||
|
|
||||||
|
my $params = $request->{params}->{checked};
|
||||||
|
my $permissions = $request->{permissions};
|
||||||
|
unless ( $permissions->{assign_series_events} == 1 ) {
|
||||||
|
uac::permissions_denied('assign_series_events');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
my $project_id = $params->{project_id};
|
||||||
|
my $studio_id = $params->{studio_id};
|
||||||
|
my $from_date = $params->{from_date};
|
||||||
|
my $till_date = $params->{till_date};
|
||||||
|
|
||||||
|
$from_date = time::time_to_datetime();
|
||||||
|
if ($from_date=~/(\d\d\d\d\-\d\d\-\d\d \d\d)/){
|
||||||
|
$from_date = $1.':00';
|
||||||
|
}
|
||||||
|
$till_date = time::add_days_to_datetime($from_date, 28);
|
||||||
|
if ($from_date=~/(\d\d\d\d\-\d\d\-\d\d)/){
|
||||||
|
$from_date = $1;
|
||||||
|
}
|
||||||
|
if ($till_date=~/(\d\d\d\d\-\d\d\-\d\d)/){
|
||||||
|
$till_date = $1;
|
||||||
|
}
|
||||||
|
|
||||||
|
print "update from $from_date to $till_date\n";
|
||||||
|
|
||||||
|
my $dates = series_dates::getDatesWithoutEvent(
|
||||||
|
$config, {
|
||||||
|
project_id => $project_id,
|
||||||
|
studio_id => $studio_id,
|
||||||
|
from => $from_date,
|
||||||
|
till => $till_date
|
||||||
|
}
|
||||||
|
);
|
||||||
|
print "<pre>found ".(scalar @$dates)." dates\n";
|
||||||
|
for my $date (@$dates){
|
||||||
|
print $date->{start}."\n";
|
||||||
|
createEvent($config, $request, $date);
|
||||||
|
#return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
sub createEvent{
|
||||||
|
my $config = shift;
|
||||||
|
my $request = shift;
|
||||||
|
my $date = shift;
|
||||||
|
|
||||||
|
my $permissions = $request->{permissions};
|
||||||
|
my $user = $request->{user};
|
||||||
|
|
||||||
|
$date->{show_new_event_from_schedule} = 1;
|
||||||
|
unless ( $permissions->{create_event_from_schedule} == 1 ) {
|
||||||
|
uac::permissions_denied('create_event_from_schedule');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
$date->{start_date} = $date->{start};
|
||||||
|
my $event = eventOps::getNewEvent($config, $date, 'show_new_event_from_schedule');
|
||||||
|
|
||||||
|
return undef unless defined $event;
|
||||||
|
|
||||||
|
$event->{start_date} = $event->{start};
|
||||||
|
return eventOps::createEvent($request, $event, 'create_event_from_schedule');
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
sub check_params {
|
||||||
|
my $params = shift;
|
||||||
|
|
||||||
|
my $checked = {};
|
||||||
|
|
||||||
|
my $debug = $params->{debug} || '';
|
||||||
|
if ( $debug =~ /([a-z\_\,]+)/ ) {
|
||||||
|
$debug = $1;
|
||||||
|
}
|
||||||
|
$checked->{debug} = $debug;
|
||||||
|
|
||||||
|
#actions and roles
|
||||||
|
$checked->{action} = '';
|
||||||
|
if ( defined $params->{action} ) {
|
||||||
|
if ( $params->{action} =~ /^(create_events)$/ ) {
|
||||||
|
$checked->{action} = $params->{action};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#numeric values
|
||||||
|
$checked->{exclude} = 0;
|
||||||
|
for my $param ( 'id', 'project_id', 'studio_id', 'series_id' ) {
|
||||||
|
if ( ( defined $params->{$param} ) && ( $params->{$param} =~ /^\d+$/ ) ) {
|
||||||
|
$checked->{$param} = $params->{$param};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( defined $checked->{studio_id} ) {
|
||||||
|
$checked->{default_studio_id} = $checked->{studio_id};
|
||||||
|
} else {
|
||||||
|
$checked->{studio_id} = -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
for my $param ( 'date', 'from_date', 'till_date' ) {
|
||||||
|
$checked->{$param} = time::check_date( $params->{$param} );
|
||||||
|
}
|
||||||
|
|
||||||
|
$checked->{template} = template::check( $params->{template}, 'create_events' );
|
||||||
|
|
||||||
|
return $checked;
|
||||||
|
}
|
||||||
|
|
||||||
|
__DATA__
|
||||||
|
|
||||||
|
https://piradio.de/agenda/planung/create_events.cgi?project_id=1&studio_id=1&from_date=2016-09-01&till_date=2016-10-01
|
||||||
|
|
||||||
|
sub show_events2 {
|
||||||
my $config = shift;
|
my $config = shift;
|
||||||
my $request = shift;
|
my $request = shift;
|
||||||
|
|
||||||
@@ -205,7 +323,7 @@ sub getEvents {
|
|||||||
till_date => $till,
|
till_date => $till,
|
||||||
date_range_include => 1,
|
date_range_include => 1,
|
||||||
archive => 'all',
|
archive => 'all',
|
||||||
no_exclude => '1',
|
#exclude_locations => '1',
|
||||||
};
|
};
|
||||||
|
|
||||||
my $events = getSeriesEvents( $config, $request, $options, $params );
|
my $events = getSeriesEvents( $config, $request, $options, $params );
|
||||||
@@ -237,8 +355,10 @@ sub getSeriesEvents {
|
|||||||
permissions => $request->{permissions}
|
permissions => $request->{permissions}
|
||||||
};
|
};
|
||||||
$request2->{params}->{checked}->{published} = 'all';
|
$request2->{params}->{checked}->{published} = 'all';
|
||||||
delete $request2->{params}->{checked}->{exclude_locations}
|
|
||||||
if ( ( $params->{studio_id} == -1 ) && ( defined $request2->{params}->{checked}->{exclude_locations} ) );
|
#$request2->{params}->{checked}->{exclude_locations} = 1;
|
||||||
|
#delete $request2->{params}->{checked}->{locations_to_exclude}
|
||||||
|
# if ( ( $params->{studio_id} == -1 ) && ( defined $request2->{params}->{checked}->{locations_to_exclude} ) );
|
||||||
|
|
||||||
my $events = events::get( $config, $request2 );
|
my $events = events::get( $config, $request2 );
|
||||||
|
|
||||||
@@ -265,48 +385,3 @@ sub getSeriesEvents {
|
|||||||
return $events;
|
return $events;
|
||||||
}
|
}
|
||||||
|
|
||||||
sub check_params {
|
|
||||||
my $params = shift;
|
|
||||||
|
|
||||||
my $checked = {};
|
|
||||||
|
|
||||||
my $debug = $params->{debug} || '';
|
|
||||||
if ( $debug =~ /([a-z\_\,]+)/ ) {
|
|
||||||
$debug = $1;
|
|
||||||
}
|
|
||||||
$checked->{debug} = $debug;
|
|
||||||
|
|
||||||
#actions and roles
|
|
||||||
$checked->{action} = '';
|
|
||||||
if ( defined $params->{action} ) {
|
|
||||||
if ( $params->{action} =~ /^(create_events)$/ ) {
|
|
||||||
$checked->{action} = $params->{action};
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#numeric values
|
|
||||||
$checked->{exclude} = 0;
|
|
||||||
for my $param ( 'id', 'project_id', 'studio_id', 'series_id' ) {
|
|
||||||
if ( ( defined $params->{$param} ) && ( $params->{$param} =~ /^\d+$/ ) ) {
|
|
||||||
$checked->{$param} = $params->{$param};
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( defined $checked->{studio_id} ) {
|
|
||||||
$checked->{default_studio_id} = $checked->{studio_id};
|
|
||||||
} else {
|
|
||||||
$checked->{studio_id} = -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
for my $param ( 'date', 'from_date', 'till_date' ) {
|
|
||||||
$checked->{$param} = time::check_date( $params->{$param} );
|
|
||||||
}
|
|
||||||
|
|
||||||
$checked->{template} = template::check( $params->{template}, 'create_events' );
|
|
||||||
|
|
||||||
return $checked;
|
|
||||||
}
|
|
||||||
|
|
||||||
__DATA__
|
|
||||||
|
|
||||||
https://piradio.de/agenda/planung/create_events.cgi?project_id=1&studio_id=1&from_date=2016-09-01&till_date=2016-10-01
|
|
||||||
|
|||||||
@@ -17,6 +17,10 @@ body #content{
|
|||||||
text-align:left;
|
text-align:left;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#selectImage #content{
|
||||||
|
max-width:none;
|
||||||
|
}
|
||||||
|
|
||||||
body,
|
body,
|
||||||
#content input,
|
#content input,
|
||||||
#content textarea,
|
#content textarea,
|
||||||
@@ -27,7 +31,7 @@ body,
|
|||||||
#content li{
|
#content li{
|
||||||
font-size:14px;
|
font-size:14px;
|
||||||
font-size:0.75rem;
|
font-size:0.75rem;
|
||||||
font-family:sans-serif;
|
font-family:Roboto,sans-serif;
|
||||||
}
|
}
|
||||||
|
|
||||||
#content textarea{
|
#content textarea{
|
||||||
@@ -390,6 +394,10 @@ tr.tablesorter-filter-row input{
|
|||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#content input.error{
|
||||||
|
border-bottom:2px solid #d30000;
|
||||||
|
}
|
||||||
|
|
||||||
#content input[type="text"]:focus{
|
#content input[type="text"]:focus{
|
||||||
border-bottom:2px solid #03a9f4;
|
border-bottom:2px solid #03a9f4;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
#content{
|
#content{
|
||||||
margin-top:3em;
|
margin-top:3em;
|
||||||
padding:1em;
|
padding:1em;
|
||||||
max-width:1000px;
|
/*max-width:1000px;*/
|
||||||
min-height:100%;
|
min-height:100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
58
website/agenda/planung/css/show-playout.css
Normal file
58
website/agenda/planung/css/show-playout.css
Normal file
@@ -0,0 +1,58 @@
|
|||||||
|
#content table,
|
||||||
|
#content tr,
|
||||||
|
#content td,
|
||||||
|
#content div.ok,
|
||||||
|
#content div.warn,
|
||||||
|
#content div.error{
|
||||||
|
margin:0;
|
||||||
|
padding:0;
|
||||||
|
border:0;
|
||||||
|
}
|
||||||
|
|
||||||
|
table{
|
||||||
|
margin:1em;
|
||||||
|
border-collapse:collapse;
|
||||||
|
empty-cells:show;
|
||||||
|
}
|
||||||
|
|
||||||
|
#content tr,
|
||||||
|
#content td{
|
||||||
|
vertical-align:top;
|
||||||
|
}
|
||||||
|
|
||||||
|
#content tr{
|
||||||
|
border-top:1px solid #666;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#content td{
|
||||||
|
padding:3px;
|
||||||
|
font-size:-2;
|
||||||
|
text-align:center;
|
||||||
|
}
|
||||||
|
|
||||||
|
#content img{
|
||||||
|
width:100%;
|
||||||
|
height:100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
#content div.ok,
|
||||||
|
#content div.warn,
|
||||||
|
#content div.error{
|
||||||
|
padding-top:3px;
|
||||||
|
padding-bottom:3px;
|
||||||
|
margin:1px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#content div.ok{
|
||||||
|
background:#4caf50;
|
||||||
|
}
|
||||||
|
|
||||||
|
#content div.warn{
|
||||||
|
background:#ffeb3b;
|
||||||
|
}
|
||||||
|
|
||||||
|
#content div.error{
|
||||||
|
background:#f44336;
|
||||||
|
}
|
||||||
|
|
||||||
@@ -28,6 +28,7 @@ use series_events;
|
|||||||
use user_stats;
|
use user_stats;
|
||||||
use localization;
|
use localization;
|
||||||
use eventOps;
|
use eventOps;
|
||||||
|
use images;
|
||||||
|
|
||||||
binmode STDOUT, ":utf8";
|
binmode STDOUT, ":utf8";
|
||||||
|
|
||||||
@@ -167,6 +168,7 @@ sub show_event {
|
|||||||
uac::print_error("event not found");
|
uac::print_error("event not found");
|
||||||
}
|
}
|
||||||
#print STDERR "show:".Dumper($event->{draft});
|
#print STDERR "show:".Dumper($event->{draft});
|
||||||
|
#print STDERR "show event".Dumper($event);
|
||||||
|
|
||||||
my $editLock = 1;
|
my $editLock = 1;
|
||||||
if ( ( defined $permissions->{update_event_after_week} ) && ( $permissions->{update_event_after_week} eq '1' ) ) {
|
if ( ( defined $permissions->{update_event_after_week} ) && ( $permissions->{update_event_after_week} eq '1' ) ) {
|
||||||
@@ -204,7 +206,8 @@ sub show_event {
|
|||||||
if ( defined $event2 ) {
|
if ( defined $event2 ) {
|
||||||
for my $attr (
|
for my $attr (
|
||||||
'title', 'user_title', 'excerpt', 'user_excerpt', 'content', 'topic',
|
'title', 'user_title', 'excerpt', 'user_excerpt', 'content', 'topic',
|
||||||
'image', 'live no_event_sync', 'podcast_url', 'archive_url'
|
'image', 'image_label', 'series_image', 'series_image_label',
|
||||||
|
'live no_event_sync', 'podcast_url', 'archive_url'
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
$event->{$attr} = $event2->{$attr};
|
$event->{$attr} = $event2->{$attr};
|
||||||
@@ -215,8 +218,8 @@ sub show_event {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$event->{rerun} = 1 if ( $event->{rerun} =~ /a-z/ );
|
$event->{rerun} = 1 if ( $event->{rerun} =~ /a-z/ );
|
||||||
|
|
||||||
$event->{series_id} = $params->{series_id};
|
$event->{series_id} = $params->{series_id};
|
||||||
|
|
||||||
$event->{duration} = events::get_duration( $config, $event );
|
$event->{duration} = events::get_duration( $config, $event );
|
||||||
$event->{durations} = \@durations;
|
$event->{durations} = \@durations;
|
||||||
if ( defined $event->{duration} ) {
|
if ( defined $event->{duration} ) {
|
||||||
@@ -260,7 +263,7 @@ sub show_event {
|
|||||||
series_id => $params->{series_id}
|
series_id => $params->{series_id}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
if ( @$series == 1 ) {
|
if ( scalar(@$series) == 1 ) {
|
||||||
$event->{has_single_events} = $series->[0]->{has_single_events};
|
$event->{has_single_events} = $series->[0]->{has_single_events};
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -416,55 +419,7 @@ sub show_new_event {
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
# check for missing parameters
|
my $event = eventOps::getNewEvent($config, $params, $params->{action});
|
||||||
my $required_fields = [ 'project_id', 'studio_id', 'series_id' ];
|
|
||||||
push @$required_fields, 'start_date' if ( $params->{action} eq 'show_new_event_from_schedule' );
|
|
||||||
|
|
||||||
my $event = {};
|
|
||||||
for my $attr (@$required_fields) {
|
|
||||||
unless ( defined $params->{$attr} ) {
|
|
||||||
uac::print_error( "missing " . $attr );
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
$event->{$attr} = $params->{$attr};
|
|
||||||
}
|
|
||||||
|
|
||||||
my $serie = eventOps::setAttributesFromSeriesTemplate( $config, $params, $event );
|
|
||||||
|
|
||||||
if ( $params->{action} eq 'show_new_event_from_schedule' ) {
|
|
||||||
eventOps::setAttributesFromSchedule( $config, $params, $event );
|
|
||||||
} else {
|
|
||||||
eventOps::setAttributesForCurrentTime( $serie, $event );
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( defined $params->{source_event_id} ) {
|
|
||||||
|
|
||||||
#overwrite by existing event (rerun)
|
|
||||||
eventOps::setAttributesFromOtherEvent( $config, $params, $event );
|
|
||||||
}
|
|
||||||
|
|
||||||
$event = events::calc_dates( $config, $event );
|
|
||||||
|
|
||||||
if ( $serie->{has_single_events} eq '1' ) {
|
|
||||||
$event->{has_single_events} = 1;
|
|
||||||
$event->{series_name} = undef;
|
|
||||||
$event->{episode} = undef;
|
|
||||||
}
|
|
||||||
|
|
||||||
#get next episode
|
|
||||||
$event->{episode} = series::get_next_episode(
|
|
||||||
$config,
|
|
||||||
{
|
|
||||||
project_id => $params->{project_id},
|
|
||||||
studio_id => $params->{studio_id},
|
|
||||||
series_id => $params->{series_id},
|
|
||||||
}
|
|
||||||
);
|
|
||||||
delete $event->{episode} if $event->{episode} == 0;
|
|
||||||
|
|
||||||
$event->{disable_event_sync} = 1;
|
|
||||||
$event->{published} = 1;
|
|
||||||
$event->{new_event} = 1;
|
|
||||||
|
|
||||||
#copy event to template params
|
#copy event to template params
|
||||||
for my $key ( keys %$event ) {
|
for my $key ( keys %$event ) {
|
||||||
@@ -574,7 +529,8 @@ sub save_event {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#print Dumper($params);
|
#print Dumper($params);
|
||||||
my $start = $params->{start_date}, my $end = time::add_minutes_to_datetime( $params->{start_date}, $params->{duration} );
|
my $start = $params->{start_date};
|
||||||
|
my $end = time::add_minutes_to_datetime( $params->{start_date}, $params->{duration} );
|
||||||
|
|
||||||
#check permissions
|
#check permissions
|
||||||
my $options = {
|
my $options = {
|
||||||
@@ -601,19 +557,25 @@ sub save_event {
|
|||||||
my $found = 0;
|
my $found = 0;
|
||||||
|
|
||||||
#content fields
|
#content fields
|
||||||
for my $key ( 'content', 'topic', 'title', 'excerpt', 'episode', 'image', 'podcast_url', 'archive_url' ) {
|
for my $key ( 'content', 'topic', 'title', 'excerpt', 'episode',
|
||||||
|
'image', 'series_image', 'image_label', 'series_image_label',
|
||||||
|
'podcast_url', 'archive_url' ) {
|
||||||
next unless defined $permissions->{ 'update_event_field_' . $key };
|
next unless defined $permissions->{ 'update_event_field_' . $key };
|
||||||
if ( $permissions->{ 'update_event_field_' . $key } eq '1' ) {
|
if ( $permissions->{ 'update_event_field_' . $key } eq '1' ) {
|
||||||
$entry->{$key} = $params->{$key} if defined $params->{$key};
|
next unless defined $params->{$key};
|
||||||
|
$entry->{$key} = $params->{$key};
|
||||||
$found++;
|
$found++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#print STDERR "event to update1: ".Dumper($entry);
|
||||||
|
|
||||||
#user extension fields
|
#user extension fields
|
||||||
for my $key ( 'title', 'excerpt' ) {
|
for my $key ( 'title', 'excerpt' ) {
|
||||||
next unless defined $permissions->{ 'update_event_field_' . $key . '_extension' };
|
next unless defined $permissions->{ 'update_event_field_' . $key . '_extension' };
|
||||||
if ( $permissions->{ 'update_event_field_' . $key . '_extension' } eq '1' ) {
|
if ( $permissions->{ 'update_event_field_' . $key . '_extension' } eq '1' ) {
|
||||||
$entry->{ 'user_' . $key } = $params->{ 'user_' . $key } if defined $params->{ 'user_' . $key };
|
next unless defined $params->{ 'user_' . $key };
|
||||||
|
$entry->{ 'user_' . $key } = $params->{ 'user_' . $key };
|
||||||
$found++;
|
$found++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -644,6 +606,10 @@ sub save_event {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$entry->{image} = images::normalizeName($entry->{image});
|
||||||
|
$entry->{series_image} = images::normalizeName($entry->{series_image});
|
||||||
|
#print STDERR "event to update2: ".Dumper($entry);
|
||||||
|
|
||||||
$config->{access}->{write} = 1;
|
$config->{access}->{write} = 1;
|
||||||
|
|
||||||
#update content
|
#update content
|
||||||
@@ -701,119 +667,11 @@ sub create_event {
|
|||||||
my $config = shift;
|
my $config = shift;
|
||||||
my $request = shift;
|
my $request = shift;
|
||||||
|
|
||||||
my $params = $request->{params}->{checked};
|
my $params = $request->{params}->{checked};
|
||||||
my $permissions = $request->{permissions};
|
my $event = $request->{params}->{checked};
|
||||||
|
my $action = $params->{action};
|
||||||
|
return eventOps::createEvent($request, $event, $action);
|
||||||
|
|
||||||
my $checklist = [ 'studio', 'user', 'create_events', 'studio_timeslots' ];
|
|
||||||
if ( $params->{action} eq 'create_event_from_schedule' ) {
|
|
||||||
push @$checklist, 'schedule' if $params->{action} eq 'create_event_from_schedule';
|
|
||||||
}
|
|
||||||
|
|
||||||
my $start = $params->{start_date}, my $end = time::add_minutes_to_datetime( $params->{start_date}, $params->{duration} );
|
|
||||||
|
|
||||||
my $result = series_events::check_permission(
|
|
||||||
$request,
|
|
||||||
{
|
|
||||||
permission => 'create_event,create_event_of_series',
|
|
||||||
check_for => $checklist,
|
|
||||||
project_id => $params->{project_id},
|
|
||||||
studio_id => $params->{studio_id},
|
|
||||||
series_id => $params->{series_id},
|
|
||||||
start_date => $params->{start_date},
|
|
||||||
draft => $params->{draft},
|
|
||||||
start => $start,
|
|
||||||
end => $end,
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
#print Dumper(" start_date => $params->{start_date}");
|
|
||||||
unless ( $result eq '1' ) {
|
|
||||||
uac::print_error($result);
|
|
||||||
return undef;
|
|
||||||
}
|
|
||||||
|
|
||||||
#get series name from series
|
|
||||||
my $series = series::get(
|
|
||||||
$config,
|
|
||||||
{
|
|
||||||
project_id => $params->{project_id},
|
|
||||||
studio_id => $params->{studio_id},
|
|
||||||
series_id => $params->{series_id},
|
|
||||||
}
|
|
||||||
);
|
|
||||||
if ( @$series != 1 ) {
|
|
||||||
uac::print_error("series not found");
|
|
||||||
return undef;
|
|
||||||
}
|
|
||||||
my $serie = $series->[0];
|
|
||||||
|
|
||||||
#get studio location from studios
|
|
||||||
my $studios = studios::get(
|
|
||||||
$config,
|
|
||||||
{
|
|
||||||
project_id => $params->{project_id},
|
|
||||||
studio_id => $params->{studio_id}
|
|
||||||
}
|
|
||||||
);
|
|
||||||
unless ( defined $studios ) {
|
|
||||||
uac::print_error("studio not found");
|
|
||||||
return undef;
|
|
||||||
}
|
|
||||||
unless ( @$studios == 1 ) {
|
|
||||||
uac::print_error("studio not found");
|
|
||||||
return undef;
|
|
||||||
}
|
|
||||||
my $studio = $studios->[0];
|
|
||||||
|
|
||||||
$config->{access}->{write} = 1;
|
|
||||||
|
|
||||||
#insert event content and save history
|
|
||||||
my $event_id = series_events::insert_event(
|
|
||||||
$config,
|
|
||||||
{
|
|
||||||
project_id => $params->{project_id},
|
|
||||||
studio => $studio,
|
|
||||||
serie => $serie,
|
|
||||||
event => $params,
|
|
||||||
user => $params->{presets}->{user}
|
|
||||||
}
|
|
||||||
);
|
|
||||||
uac::print_error("could not insert event") if $event_id <= 0;
|
|
||||||
|
|
||||||
#assign event to series
|
|
||||||
$result = series::assign_event(
|
|
||||||
$config,
|
|
||||||
{
|
|
||||||
project_id => $params->{project_id},
|
|
||||||
studio_id => $params->{studio_id},
|
|
||||||
series_id => $params->{series_id},
|
|
||||||
event_id => $event_id
|
|
||||||
}
|
|
||||||
);
|
|
||||||
uac::print_error("could not assign event") unless defined $result;
|
|
||||||
|
|
||||||
#update recurrences
|
|
||||||
my $event = $params;
|
|
||||||
$event->{event_id} = $event_id;
|
|
||||||
series::update_recurring_events( $config, $event );
|
|
||||||
|
|
||||||
# update user stats
|
|
||||||
user_stats::increase(
|
|
||||||
$config,
|
|
||||||
'create_events',
|
|
||||||
{
|
|
||||||
project_id => $params->{project_id},
|
|
||||||
studio_id => $params->{studio_id},
|
|
||||||
series_id => $params->{series_id},
|
|
||||||
user => $params->{presets}->{user}
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
#forward to edit event
|
|
||||||
#print STDERR Dumper($event_id);
|
|
||||||
#$params->{event_id}=$event_id;
|
|
||||||
uac::print_info("event created");
|
|
||||||
return $event_id;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#TODO: replace permission check with download
|
#TODO: replace permission check with download
|
||||||
@@ -849,6 +707,7 @@ sub download {
|
|||||||
event_id => $params->{event_id},
|
event_id => $params->{event_id},
|
||||||
template => 'no',
|
template => 'no',
|
||||||
limit => 1,
|
limit => 1,
|
||||||
|
#no_exclude => 1
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
@@ -955,7 +814,7 @@ sub check_params {
|
|||||||
|
|
||||||
#strings
|
#strings
|
||||||
for my $param (
|
for my $param (
|
||||||
'series_name', 'title', 'excerpt', 'content', 'topic', 'program', 'category', 'image',
|
'series_name', 'title', 'excerpt', 'content', 'topic', 'program', 'category', 'image', 'series_image',
|
||||||
'user_content', 'user_title', 'user_excerpt', 'podcast_url', 'archive_url'
|
'user_content', 'user_title', 'user_excerpt', 'podcast_url', 'archive_url'
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
@@ -985,7 +844,7 @@ sub check_params {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#print STDERR Dumper($checked);
|
#print STDERR "event params:".Dumper($checked);
|
||||||
return $checked;
|
return $checked;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ use Data::Dumper;
|
|||||||
|
|
||||||
use File::stat;
|
use File::stat;
|
||||||
use Time::localtime;
|
use Time::localtime;
|
||||||
use CGI qw(header param Vars escapeHTML uploadInfo cgi_error);
|
use CGI::Simple;# qw(header param Vars escapeHTML uploadInfo cgi_error);
|
||||||
use URI::Escape;
|
use URI::Escape;
|
||||||
|
|
||||||
use time;
|
use time;
|
||||||
@@ -67,17 +67,12 @@ $headerParams->{loc} = localization::get( $config, { user => $user, file => 'men
|
|||||||
template::process( 'print', template::check('ajax_header.html'), $headerParams );
|
template::process( 'print', template::check('ajax_header.html'), $headerParams );
|
||||||
return unless defined uac::check( $config, $params, $user_presets );
|
return unless defined uac::check( $config, $params, $user_presets );
|
||||||
|
|
||||||
#my $base_dir = $config->{locations}->{base_dir};
|
|
||||||
my $local_media_dir = $config->{locations}->{local_media_dir};
|
my $local_media_dir = $config->{locations}->{local_media_dir};
|
||||||
my $local_media_url = $config->{locations}->{local_media_url};
|
my $local_media_url = $config->{locations}->{local_media_url};
|
||||||
|
|
||||||
#my $local_base_url = $config->{locations}->{local_base_url};
|
log::error( $config, 'cannot locate media dir' . $local_media_dir ) unless -e $local_media_dir ;
|
||||||
|
uac::permissions_denied('reading from local media dir') unless -r $local_media_dir;
|
||||||
log::error( $config, 'cannot locate media dir' . $local_media_dir ) unless ( -e $local_media_dir );
|
uac::permissions_denied('writing to local media dir') unless -w $local_media_dir;
|
||||||
|
|
||||||
#continue on error
|
|
||||||
uac::permissions_denied('reading from local media dir') unless ( -r $local_media_dir );
|
|
||||||
uac::permissions_denied('writing to local media dir') unless ( -w $local_media_dir );
|
|
||||||
|
|
||||||
if ( $params->{delete_image} ne '' ) {
|
if ( $params->{delete_image} ne '' ) {
|
||||||
delete_image( $config, $request, $user, $local_media_dir );
|
delete_image( $config, $request, $user, $local_media_dir );
|
||||||
@@ -114,69 +109,73 @@ sub show_image {
|
|||||||
$config->{access}->{write} = 0;
|
$config->{access}->{write} = 0;
|
||||||
my $dbh = db::connect( $config, undef );
|
my $dbh = db::connect( $config, undef );
|
||||||
|
|
||||||
|
my $projectId = $params->{project_id};
|
||||||
|
my $studioId = $params->{studio_id};
|
||||||
my $selectedFilename = $params->{filename} || '';
|
my $selectedFilename = $params->{filename} || '';
|
||||||
|
|
||||||
my $filenames = {};
|
my $filenames = {};
|
||||||
my $results = [];
|
my $results = [];
|
||||||
|
|
||||||
# add images from series
|
# add images from series
|
||||||
if ( defined $params->{series_id} ) {
|
if ( defined $params->{series_id} ) {
|
||||||
my $seriesImages = series::get_images( $config, $params );
|
my $seriesImages = series::get_images( $config, {
|
||||||
|
project_id => $projectId,
|
||||||
|
studio_id => $studioId,
|
||||||
|
series_id => $params->{series_id}
|
||||||
|
} );
|
||||||
|
|
||||||
for my $image (@$seriesImages) {
|
for my $image (@$seriesImages) {
|
||||||
my $filename = $image->{filename};
|
my $filename = $image->{filename};
|
||||||
unless ( defined $filenames->{$filename} ) {
|
next if defined $filenames->{$filename};
|
||||||
|
$filenames->{$filename} = $image;
|
||||||
#print STDERR "add1 $filename\n";
|
push @$results, $image;
|
||||||
push @$results, $image;
|
|
||||||
$filenames->{$filename} = $image;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#load images matching by search
|
#load images matching by search
|
||||||
if ( defined $params->{search} ) {
|
if ( $params->{search}=~/\S/ ) {
|
||||||
|
|
||||||
#remove filename from search
|
#remove filename from search
|
||||||
delete $params->{filename};
|
#delete $params->{filename};
|
||||||
delete $params->{series_id};
|
#delete $params->{series_id};
|
||||||
my $searchImages = images::get( $config, $params );
|
my $searchImages = images::get( $config, {
|
||||||
|
project_id => $projectId,
|
||||||
|
studio_id => $studioId,
|
||||||
|
search => $params->{search}
|
||||||
|
} );
|
||||||
|
|
||||||
for my $image (@$searchImages) {
|
for my $image (@$searchImages) {
|
||||||
my $filename = $image->{filename};
|
my $filename = $image->{filename};
|
||||||
unless ( defined $filenames->{$filename} ) {
|
next if defined $filenames->{$filename};
|
||||||
|
$filenames->{$filename} = $image;
|
||||||
#print STDERR "add2 $filename\n";
|
push @$results, $image;
|
||||||
push @$results, $image;
|
|
||||||
$filenames->{$filename} = $image;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#load selected image, if not already loaded
|
#load selected image, if not already loaded
|
||||||
|
my $selectedImage=undef;
|
||||||
if ( $selectedFilename ne '' ) {
|
if ( $selectedFilename ne '' ) {
|
||||||
my $search = $params->{search} || '';
|
|
||||||
|
|
||||||
# use selected image if already loaded
|
|
||||||
my $selectedImage = undef;
|
|
||||||
if ( defined $filenames->{$selectedFilename} ) {
|
if ( defined $filenames->{$selectedFilename} ) {
|
||||||
$selectedImage = $filenames->{$selectedFilename};
|
$selectedImage = $filenames->{$selectedFilename};
|
||||||
} else {
|
} else {
|
||||||
|
#print STDERR "getByName:".Dumper($params);
|
||||||
#now add filename and remove search
|
|
||||||
$params->{filename} = $selectedFilename;
|
|
||||||
delete $params->{search};
|
|
||||||
|
|
||||||
#put selected image to the top
|
#put selected image to the top
|
||||||
my $imagesByNames = images::get( $config, $params );
|
my $imagesByNames = images::get( $config, {
|
||||||
$selectedImage = $imagesByNames->[0] if ( scalar(@$imagesByNames) > 0 );
|
project_id => $projectId,
|
||||||
}
|
studio_id => $studioId,
|
||||||
|
filename => $selectedFilename
|
||||||
|
} );
|
||||||
|
#print STDERR Dumper($imagesByNames);
|
||||||
|
$selectedImage = $imagesByNames->[0] if scalar(@$imagesByNames) > 0;
|
||||||
|
}
|
||||||
|
|
||||||
my $finalResults = [];
|
my $finalResults = [];
|
||||||
|
|
||||||
# put selected image first
|
# put selected image first
|
||||||
$selectedFilename = 'not-found';
|
$selectedFilename = 'not-found';
|
||||||
if ( defined $selectedImage ) {
|
if ( defined $selectedImage ) {
|
||||||
push @$finalResults, $selectedImage;
|
$finalResults = [ $selectedImage ];
|
||||||
$selectedFilename = $selectedImage->{filename};
|
$selectedFilename = $selectedImage->{filename};
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -185,20 +184,21 @@ sub show_image {
|
|||||||
push @$finalResults, $image if $image->{filename} ne $selectedFilename;
|
push @$finalResults, $image if $image->{filename} ne $selectedFilename;
|
||||||
}
|
}
|
||||||
$results = $finalResults;
|
$results = $finalResults;
|
||||||
|
|
||||||
#add search again
|
|
||||||
$params->{search} = $search;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( $params->{template} =~ /edit/ ) {
|
if ( $params->{template} =~ /edit/ ) {
|
||||||
$results = [ $results->[0] ] || undef;
|
my $result = $results->[0];
|
||||||
|
$result->{missing_licence}=1 unless $result->{licence}=~/\S/;
|
||||||
|
$results = [ $result ] ;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( defined $results ) {
|
if ( defined $results ) {
|
||||||
$results = modify_results( $results, $permissions, $user, $local_media_url );
|
$results = modify_results( $results, $permissions, $user, $local_media_url );
|
||||||
}
|
}
|
||||||
|
|
||||||
my $search = $params->{search} || '';
|
my $search = $params->{search} || '';
|
||||||
$search =~ s/\%+/ /g;
|
$search =~ s/\%+/ /g;
|
||||||
|
|
||||||
my $template_params = {
|
my $template_params = {
|
||||||
'search' => $search,
|
'search' => $search,
|
||||||
'images' => $results,
|
'images' => $results,
|
||||||
@@ -250,18 +250,24 @@ sub save_image {
|
|||||||
|
|
||||||
my $image = {};
|
my $image = {};
|
||||||
$image->{filename} = $params->{save_image};
|
$image->{filename} = $params->{save_image};
|
||||||
$image->{name} = $params->{update_name} if ( $params->{update_name} ne '' );
|
$image->{name} = $params->{update_name} if $params->{update_name} ne '' ;
|
||||||
$image->{description} = $params->{update_description} if ( $params->{update_description} ne '' );
|
$image->{description} = $params->{update_description} if $params->{update_description} ne '' ;
|
||||||
$image->{project_id} = $params->{project_id};
|
$image->{project_id} = $params->{project_id};
|
||||||
$image->{studio_id} = $params->{studio_id};
|
$image->{studio_id} = $params->{studio_id};
|
||||||
|
$image->{licence} = $params->{licence};
|
||||||
|
$image->{public} = $params->{public};
|
||||||
$image->{modified_by} = $user;
|
$image->{modified_by} = $user;
|
||||||
|
|
||||||
$image->{name} = 'new' if ( $image->{name} eq '' );
|
$image->{name} = 'new' if $image->{name} eq '';
|
||||||
|
|
||||||
|
images::checkLicence($config, $image);
|
||||||
|
|
||||||
$config->{access}->{write} = 1;
|
$config->{access}->{write} = 1;
|
||||||
my $dbh = db::connect($config);
|
my $dbh = db::connect($config);
|
||||||
|
|
||||||
#print STDERR "going to save\n";
|
print STDERR "going to save\n";
|
||||||
|
print STDERR Dumper($image);
|
||||||
|
|
||||||
my $entries = images::get(
|
my $entries = images::get(
|
||||||
$config,
|
$config,
|
||||||
{
|
{
|
||||||
@@ -271,7 +277,6 @@ sub save_image {
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
#print STDERR Dumper($entries);
|
|
||||||
if ( scalar @$entries > 1 ) {
|
if ( scalar @$entries > 1 ) {
|
||||||
print_js_error('more than one matching result found');
|
print_js_error('more than one matching result found');
|
||||||
return 0;
|
return 0;
|
||||||
@@ -283,6 +288,8 @@ sub save_image {
|
|||||||
my $entry = $entries->[0];
|
my $entry = $entries->[0];
|
||||||
if ( defined $entry ) {
|
if ( defined $entry ) {
|
||||||
images::update( $dbh, $image );
|
images::update( $dbh, $image );
|
||||||
|
images::publish( $config, $image->{filename}) if (($image->{public}==1) && ($entry->{public}==0));
|
||||||
|
images::depublish($config, $image->{filename}) if (($image->{public}==0) && ($entry->{public}==1));
|
||||||
} else {
|
} else {
|
||||||
$image->{created_by} = $user;
|
$image->{created_by} = $user;
|
||||||
images::insert( $dbh, $image );
|
images::insert( $dbh, $image );
|
||||||
@@ -410,7 +417,7 @@ sub check_params {
|
|||||||
$checked->{search} = $1;
|
$checked->{search} = $1;
|
||||||
}
|
}
|
||||||
|
|
||||||
for my $attr ( 'update_name', 'update_description' ) {
|
for my $attr ( 'update_name', 'update_description', 'licence' ) {
|
||||||
$checked->{$attr} = '';
|
$checked->{$attr} = '';
|
||||||
if ( ( defined $params->{$attr} ) && ( $params->{$attr} =~ /^\s*(.+?)\s*$/ ) ) {
|
if ( ( defined $params->{$attr} ) && ( $params->{$attr} =~ /^\s*(.+?)\s*$/ ) ) {
|
||||||
$checked->{$attr} = $params->{$attr};
|
$checked->{$attr} = $params->{$attr};
|
||||||
@@ -427,6 +434,13 @@ sub check_params {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#checkboxes
|
||||||
|
for my $param ( 'public' ) {
|
||||||
|
if ( ( defined $params->{$param} ) && ( $params->{$param} =~ /([01])/ ) ) {
|
||||||
|
$checked->{$param} = $1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#map show to filename, but overwrite if filename given
|
#map show to filename, but overwrite if filename given
|
||||||
if ( $checked->{show} ne '' ) {
|
if ( $checked->{show} ne '' ) {
|
||||||
$checked->{filename} = $checked->{show};
|
$checked->{filename} = $checked->{show};
|
||||||
@@ -438,6 +452,7 @@ sub check_params {
|
|||||||
|
|
||||||
$checked->{from} = time::check_date( $params->{from} );
|
$checked->{from} = time::check_date( $params->{from} );
|
||||||
$checked->{till} = time::check_date( $params->{till} );
|
$checked->{till} = time::check_date( $params->{till} );
|
||||||
|
#print STDERR 'checked:'.Dumper ($checked);
|
||||||
|
|
||||||
return $checked;
|
return $checked;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -226,11 +226,12 @@ sub update_database {
|
|||||||
|
|
||||||
my $image = {
|
my $image = {
|
||||||
filename => $params->{filename},
|
filename => $params->{filename},
|
||||||
name => $params->{name} || 'new',
|
name => $name,
|
||||||
description => $params->{description},
|
description => $params->{description},
|
||||||
modified_by => $user,
|
modified_by => $user,
|
||||||
project_id => $params->{project_id},
|
project_id => $params->{project_id},
|
||||||
studio_id => $params->{studio_id}
|
studio_id => $params->{studio_id},
|
||||||
|
licence => $params->{licence}
|
||||||
};
|
};
|
||||||
|
|
||||||
#connect
|
#connect
|
||||||
@@ -238,7 +239,7 @@ sub update_database {
|
|||||||
my $dbh = db::connect($config);
|
my $dbh = db::connect($config);
|
||||||
|
|
||||||
my $entries = images::get( $config, { filename => $image->{filename} } );
|
my $entries = images::get( $config, { filename => $image->{filename} } );
|
||||||
if ( ( defined $entries ) && ( @$entries > 0 ) ) {
|
if ( ( defined $entries ) && ( scalar(@$entries) > 0 ) ) {
|
||||||
images::update( $dbh, $image );
|
images::update( $dbh, $image );
|
||||||
my $entry = $entries->[0];
|
my $entry = $entries->[0];
|
||||||
$params->{image_id} = $entry->{id};
|
$params->{image_id} = $entry->{id};
|
||||||
@@ -318,16 +319,14 @@ sub process_image {
|
|||||||
my $md5_filename = shift;
|
my $md5_filename = shift;
|
||||||
my $content = shift;
|
my $content = shift;
|
||||||
|
|
||||||
my $upload_path = $config->{locations}->{local_media_dir} . 'upload/' . $md5_filename . '.' . $extension;
|
my $upload_path = images::getInternalPath($config, {type=>'upload', filename=> $md5_filename . '.' . $extension});
|
||||||
my $thumb_path = $config->{locations}->{local_media_dir} . 'thumbs/' . $md5_filename . '.jpg';
|
my $thumb_path = images::getInternalPath($config, {type=>'thumbs', filename=> $md5_filename . '.jpg'});
|
||||||
my $icon_path = $config->{locations}->{local_media_dir} . 'icons/' . $md5_filename . '.jpg';
|
my $icon_path = images::getInternalPath($config, {type=>'icons', filename=> $md5_filename . '.jpg'});
|
||||||
my $image_path = $config->{locations}->{local_media_dir} . 'images/' . $md5_filename . '.jpg';
|
my $image_path = images::getInternalPath($config, {type=>'images', filename=> $md5_filename . '.jpg'});
|
||||||
|
|
||||||
#copy file to upload space
|
#copy file to upload space
|
||||||
open DAT, '>' . $upload_path or return { error => 'could not save image. ' . $! . " $upload_path" };
|
my $result=images::writeFile($upload_path, $content);
|
||||||
binmode DAT;
|
return $result if defined $result->{error};
|
||||||
print DAT $content;
|
|
||||||
close DAT;
|
|
||||||
|
|
||||||
#write image
|
#write image
|
||||||
my $image = new Image::Magick;
|
my $image = new Image::Magick;
|
||||||
@@ -363,7 +362,7 @@ sub process_image {
|
|||||||
$icon->Write( 'jpg:' . $icon_path );
|
$icon->Write( 'jpg:' . $icon_path );
|
||||||
|
|
||||||
unless ( -e $thumb_path ) {
|
unless ( -e $thumb_path ) {
|
||||||
return { error => 'could not create thumb nail file!' };
|
return { error => 'could not create thumb file!' };
|
||||||
}
|
}
|
||||||
unless ( -e $icon_path ) {
|
unless ( -e $icon_path ) {
|
||||||
return { error => 'could not create icon file!' };
|
return { error => 'could not create icon file!' };
|
||||||
@@ -403,7 +402,7 @@ sub check_params {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#string
|
#string
|
||||||
for my $param ( 'debug', 'name', 'description' ) {
|
for my $param ( 'debug', 'name', 'description', 'licence' ) {
|
||||||
if ( ( defined $params->{$param} ) && ( $params->{$param} =~ /^\s*(.+?)\s*$/ ) ) {
|
if ( ( defined $params->{$param} ) && ( $params->{$param} =~ /^\s*(.+?)\s*$/ ) ) {
|
||||||
$checked->{$param} = $1;
|
$checked->{$param} = $1;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -178,6 +178,7 @@ function changeSeries(seriesId){
|
|||||||
url += '&event_id='+eventId;
|
url += '&event_id='+eventId;
|
||||||
url += '&new_series_id='+newSeriesId;
|
url += '&new_series_id='+newSeriesId;
|
||||||
url += '&action=reassign_event';
|
url += '&action=reassign_event';
|
||||||
|
//alert(url);
|
||||||
|
|
||||||
$.post(
|
$.post(
|
||||||
url,
|
url,
|
||||||
|
|||||||
@@ -61,3 +61,4 @@ function showImageUrl(id){
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
|
|
||||||
|
var windowOffsetX=32;
|
||||||
|
var windowOffsetY=32;
|
||||||
|
|
||||||
// choose action depending on selected tab
|
// choose action depending on selected tab
|
||||||
function imageAction(filename){
|
function imageAction(filename){
|
||||||
@@ -6,6 +8,7 @@ function imageAction(filename){
|
|||||||
selectThisImage(filename);
|
selectThisImage(filename);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(selectedImageTab=='edit'){
|
if(selectedImageTab=='edit'){
|
||||||
editImage(filename);
|
editImage(filename);
|
||||||
return false;
|
return false;
|
||||||
@@ -28,24 +31,33 @@ function selectImage(project_id, studio_id, id, value, imageUrl, series_id){
|
|||||||
if((series_id!=null)&&(series_id != '')){
|
if((series_id!=null)&&(series_id != '')){
|
||||||
url+='&series_id='+series_id;
|
url+='&series_id='+series_id;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(imageUrl!=null){
|
if(imageUrl!=null){
|
||||||
var filename=imageUrl.split('%2F').pop();
|
var filename=imageUrl.split('%2F').pop();
|
||||||
url+='&filename='+filename;
|
url+='&filename='+filename;
|
||||||
}
|
}
|
||||||
|
var x=$(window).width() - windowOffsetX;
|
||||||
|
var y=$(window).height() - windowOffsetY;
|
||||||
|
hideContent();
|
||||||
|
|
||||||
$('#selectImage').load(url);
|
$('#selectImage').load(url);
|
||||||
$('#selectImage').dialog({
|
$('#selectImage').dialog({
|
||||||
appendTo: "#content",
|
appendTo: "#content",
|
||||||
title:"select image",
|
title:"select image",
|
||||||
width:"980",
|
width:x,
|
||||||
height:640
|
height:y,
|
||||||
|
close: function( event, ui ) {
|
||||||
|
showContent();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// set editor image and image url to selected image
|
// set editor image and image url to selected image
|
||||||
function selectThisImage(filename){
|
function selectThisImage(filename){
|
||||||
var url=('/agenda_files/media/thumbs/'+filename);
|
$('#'+selectImageId).val(filename);
|
||||||
$('#'+selectImageId).val(url);
|
var url = 'showImage.cgi?project_id='+project_id+'&studio_id='+studio_id+'&filename=' + filename;
|
||||||
|
console.log(url);
|
||||||
$('#imagePreview').prop('src',url);
|
$('#imagePreview').prop('src',url);
|
||||||
|
|
||||||
try{
|
try{
|
||||||
@@ -75,7 +87,34 @@ function searchImage(){
|
|||||||
$( "#image-tabs" ).tabs();
|
$( "#image-tabs" ).tabs();
|
||||||
$( "#image-tabs" ).tabs( "option", "active", 1 );
|
$( "#image-tabs" ).tabs( "option", "active", 1 );
|
||||||
});
|
});
|
||||||
//
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
function hideContent(){
|
||||||
|
|
||||||
|
$(window).resize(function () {
|
||||||
|
$('.ui-dialog').css({
|
||||||
|
'width': $(window).width() - windowOffsetX,
|
||||||
|
'height': $(window).height() - windowOffsetY,
|
||||||
|
'left': windowOffsetX/2+'px',
|
||||||
|
'top': windowOffsetY/2+'px'
|
||||||
|
});
|
||||||
|
}).resize();
|
||||||
|
|
||||||
|
$('.editor').each(
|
||||||
|
function(){
|
||||||
|
$(this).hide();
|
||||||
|
}
|
||||||
|
);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
function showContent(){
|
||||||
|
$('.editor').each(
|
||||||
|
function(){
|
||||||
|
$(this).show();
|
||||||
|
}
|
||||||
|
);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -84,10 +123,17 @@ function editImage(filename){
|
|||||||
$("#img_editor").load(
|
$("#img_editor").load(
|
||||||
'image.cgi?show='+filename+'&template=image_edit.html&project_id='+project_id+'&studio_id='+studio_id,
|
'image.cgi?show='+filename+'&template=image_edit.html&project_id='+project_id+'&studio_id='+studio_id,
|
||||||
function(){
|
function(){
|
||||||
|
var x=$(window).width() - windowOffsetX;
|
||||||
|
var y=$(window).height() - windowOffsetY;
|
||||||
|
hideContent();
|
||||||
|
|
||||||
$('#img_editor').dialog({
|
$('#img_editor').dialog({
|
||||||
appendTo: "#content",
|
appendTo: "#content",
|
||||||
width:"100%",
|
width:x,
|
||||||
height:430
|
height:y,
|
||||||
|
close: function( event, ui ) {
|
||||||
|
showContent();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
@@ -96,10 +142,18 @@ function editImage(filename){
|
|||||||
// open dialog to show image preview
|
// open dialog to show image preview
|
||||||
function showImage(url){
|
function showImage(url){
|
||||||
$("#img_image").html('<img src="'+url+'" onclick="$(\'#img_image\').dialog(\'close\');return false;"/>');
|
$("#img_image").html('<img src="'+url+'" onclick="$(\'#img_image\').dialog(\'close\');return false;"/>');
|
||||||
|
var x=$(window).width() - windowOffsetX;
|
||||||
|
var y=$(window).height() - windowOffsetY;
|
||||||
|
hideContent();
|
||||||
|
|
||||||
$("#img_image").dialog({
|
$("#img_image").dialog({
|
||||||
appendTo: "#content",
|
appendTo: "#content",
|
||||||
width:"100%",
|
width:x,
|
||||||
height:660
|
height:y,
|
||||||
|
close: function( event, ui ) {
|
||||||
|
showContent();
|
||||||
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -121,7 +175,7 @@ function saveImage(id, filename) {
|
|||||||
var line=lines[index];
|
var line=lines[index];
|
||||||
if(contains(line,'ERROR:')){
|
if(contains(line,'ERROR:')){
|
||||||
//add error field
|
//add error field
|
||||||
if($('#image-tabs .error').length==0){
|
if( $('#image-tabs .error').length==0 ){
|
||||||
$('#image-tabs').append('<div class="error"></div>');
|
$('#image-tabs').append('<div class="error"></div>');
|
||||||
}
|
}
|
||||||
$('#image-tabs div.error').append(line);
|
$('#image-tabs div.error').append(line);
|
||||||
@@ -162,7 +216,7 @@ function hideImageDetails(id,filename){
|
|||||||
function showImageUrl(id){
|
function showImageUrl(id){
|
||||||
var el=document.getElementById(id);
|
var el=document.getElementById(id);
|
||||||
var input_id=id+'_input';
|
var input_id=id+'_input';
|
||||||
var text='<input id="'+input_id+'" value="{{thumbs/'+id+'|title}}" title="3fach-Klick zum Markieren!">';
|
var text='<input id="'+input_id+'" value="{{'+id+'|title}}" title="3fach-Klick zum Markieren!">';
|
||||||
if (el.innerHTML==text){
|
if (el.innerHTML==text){
|
||||||
el.innerHTML='';
|
el.innerHTML='';
|
||||||
}else{
|
}else{
|
||||||
|
|||||||
14
website/agenda/planung/js/show-playout.js
Normal file
14
website/agenda/planung/js/show-playout.js
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
|
||||||
|
function showTable(){
|
||||||
|
$('#playout-table').tablesorter({
|
||||||
|
widgets: ["filter"],
|
||||||
|
usNumberFormat : false
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
$(document).ready(
|
||||||
|
function(){
|
||||||
|
showTable();
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
@@ -52,4 +52,15 @@ msgstr "Editor-Link"
|
|||||||
msgid "label_search_hits"
|
msgid "label_search_hits"
|
||||||
msgstr "Treffer"
|
msgstr "Treffer"
|
||||||
|
|
||||||
|
msgid "label_author"
|
||||||
|
msgstr "Author"
|
||||||
|
|
||||||
|
msgid "label_licence"
|
||||||
|
msgstr "Lizenz"
|
||||||
|
|
||||||
|
msgid "label_public"
|
||||||
|
msgstr "veröffentlicht"
|
||||||
|
|
||||||
|
msgid "label_licence_missing"
|
||||||
|
msgstr "bitte eintragen"
|
||||||
|
|
||||||
|
|||||||
@@ -49,3 +49,6 @@ msgstr "Import"
|
|||||||
msgid "help"
|
msgid "help"
|
||||||
msgstr "Hilfe"
|
msgstr "Hilfe"
|
||||||
|
|
||||||
|
msgid "images"
|
||||||
|
msgstr "Bilder"
|
||||||
|
|
||||||
|
|||||||
@@ -52,3 +52,15 @@ msgstr "Editor-Link"
|
|||||||
msgid "label_search_hits"
|
msgid "label_search_hits"
|
||||||
msgstr "hits"
|
msgstr "hits"
|
||||||
|
|
||||||
|
msgid "label_licence"
|
||||||
|
msgstr "licence"
|
||||||
|
|
||||||
|
msgid "label_author"
|
||||||
|
msgstr "author"
|
||||||
|
|
||||||
|
msgid "label_public"
|
||||||
|
msgstr "published"
|
||||||
|
|
||||||
|
msgid "label_licence_missing"
|
||||||
|
msgstr "please fill in"
|
||||||
|
|
||||||
|
|||||||
@@ -49,3 +49,6 @@ msgstr "Import"
|
|||||||
msgid "help"
|
msgid "help"
|
||||||
msgstr "Help"
|
msgstr "Help"
|
||||||
|
|
||||||
|
msgid "images"
|
||||||
|
msgstr "Images"
|
||||||
|
|
||||||
|
|||||||
@@ -92,7 +92,7 @@ if ( defined $params->{action} ) {
|
|||||||
unassign_event( $config, $request ) if ( $params->{action} eq 'unassign_event' );
|
unassign_event( $config, $request ) if ( $params->{action} eq 'unassign_event' );
|
||||||
if ( $params->{action} eq 'reassign_event' ) {
|
if ( $params->{action} eq 'reassign_event' ) {
|
||||||
my $result = reassign_event( $config, $request );
|
my $result = reassign_event( $config, $request );
|
||||||
return if $result == 1;
|
return if defined $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
# save_scan ($config, $request) if ($params->{action} eq 'save_scan');
|
# save_scan ($config, $request) if ($params->{action} eq 'save_scan');
|
||||||
@@ -428,6 +428,13 @@ sub save_series {
|
|||||||
$config->{access}->{write} = 1;
|
$config->{access}->{write} = 1;
|
||||||
my $result = series::update( $config, $entry );
|
my $result = series::update( $config, $entry );
|
||||||
|
|
||||||
|
series_events::update_series_images($config,{
|
||||||
|
project_id => $entry->{project_id},
|
||||||
|
studio_id => $entry->{studio_id},
|
||||||
|
series_id => $entry->{series_id},
|
||||||
|
series_image => $params->{image}
|
||||||
|
});
|
||||||
|
|
||||||
user_stats::increase(
|
user_stats::increase(
|
||||||
$config,
|
$config,
|
||||||
'update_series',
|
'update_series',
|
||||||
@@ -581,11 +588,13 @@ sub assign_event {
|
|||||||
my $config = shift;
|
my $config = shift;
|
||||||
my $request = shift;
|
my $request = shift;
|
||||||
|
|
||||||
|
print STDERR "assign event\n";
|
||||||
|
|
||||||
my $params = $request->{params}->{checked};
|
my $params = $request->{params}->{checked};
|
||||||
my $permissions = $request->{permissions};
|
my $permissions = $request->{permissions};
|
||||||
unless ( $permissions->{assign_series_events} == 1 ) {
|
unless ( $permissions->{assign_series_events} == 1 ) {
|
||||||
uac::permissions_denied('assign_series_events');
|
uac::permissions_denied('assign_series_events');
|
||||||
return;
|
return undef;
|
||||||
}
|
}
|
||||||
|
|
||||||
my $entry = {};
|
my $entry = {};
|
||||||
@@ -594,9 +603,10 @@ sub assign_event {
|
|||||||
$entry->{$attr} = $params->{$attr};
|
$entry->{$attr} = $params->{$attr};
|
||||||
} else {
|
} else {
|
||||||
uac::print_error( $attr . ' not given!' );
|
uac::print_error( $attr . ' not given!' );
|
||||||
return;
|
return undef;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#print STDERR "found all parameters:\n".Dumper($entry);
|
||||||
|
|
||||||
# check if event exists,
|
# check if event exists,
|
||||||
# this has to use events::get, since it cannot check for series_id
|
# this has to use events::get, since it cannot check for series_id
|
||||||
@@ -606,10 +616,11 @@ sub assign_event {
|
|||||||
checked => events::check_params(
|
checked => events::check_params(
|
||||||
$config,
|
$config,
|
||||||
{
|
{
|
||||||
event_id => $entry->{event_id},
|
event_id => $entry->{event_id},
|
||||||
template => 'no',
|
template => 'no',
|
||||||
limit => 1,
|
limit => 1,
|
||||||
archive => 'all'
|
archive => 'all',
|
||||||
|
# no_exclude => 1
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
@@ -617,10 +628,15 @@ sub assign_event {
|
|||||||
permissions => $request->{permissions}
|
permissions => $request->{permissions}
|
||||||
};
|
};
|
||||||
$request2->{params}->{checked}->{published} = 'all';
|
$request2->{params}->{checked}->{published} = 'all';
|
||||||
my $events = events::get( $config, $request2 );
|
|
||||||
my $event = $events->[0];
|
|
||||||
|
|
||||||
#print STDERR Dumper($event);
|
my $events = events::get( $config, $request2 );
|
||||||
|
#print STDERR "found events:".Dumper($events);
|
||||||
|
if (scalar (@$events) != 1){
|
||||||
|
uac::print_error("no event found for event_id=$entry->{event_id}, archive=all");
|
||||||
|
return undef;
|
||||||
|
}
|
||||||
|
|
||||||
|
my $event = $events->[0];
|
||||||
|
|
||||||
#is series assigned to studio
|
#is series assigned to studio
|
||||||
my $result = series_events::check_permission(
|
my $result = series_events::check_permission(
|
||||||
@@ -721,7 +737,7 @@ sub unassign_event {
|
|||||||
my $permissions = $request->{permissions};
|
my $permissions = $request->{permissions};
|
||||||
unless ( $permissions->{assign_series_events} == 1 ) {
|
unless ( $permissions->{assign_series_events} == 1 ) {
|
||||||
uac::permissions_denied('assign_series_events');
|
uac::permissions_denied('assign_series_events');
|
||||||
return;
|
return undef;
|
||||||
}
|
}
|
||||||
|
|
||||||
my $entry = {};
|
my $entry = {};
|
||||||
@@ -730,7 +746,7 @@ sub unassign_event {
|
|||||||
$entry->{$attr} = $params->{$attr};
|
$entry->{$attr} = $params->{$attr};
|
||||||
} else {
|
} else {
|
||||||
uac::print_error( $attr . ' not given!' );
|
uac::print_error( $attr . ' not given!' );
|
||||||
return;
|
return undef;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -748,7 +764,7 @@ sub unassign_event {
|
|||||||
uac::print_error(
|
uac::print_error(
|
||||||
"event $entry->{event_id} not found for project_id=$entry->{project_id}, studio_id=$entry->{studio_id}, series_id=$entry->{series_id}"
|
"event $entry->{event_id} not found for project_id=$entry->{project_id}, studio_id=$entry->{studio_id}, series_id=$entry->{series_id}"
|
||||||
);
|
);
|
||||||
return;
|
return undef;
|
||||||
}
|
}
|
||||||
|
|
||||||
#print Dumper($event);
|
#print Dumper($event);
|
||||||
@@ -801,13 +817,13 @@ sub reassign_event {
|
|||||||
my $permissions = $request->{permissions};
|
my $permissions = $request->{permissions};
|
||||||
unless ( $permissions->{assign_series_events} == 1 ) {
|
unless ( $permissions->{assign_series_events} == 1 ) {
|
||||||
uac::permissions_denied('assign_series_events');
|
uac::permissions_denied('assign_series_events');
|
||||||
return;
|
return undef;
|
||||||
}
|
}
|
||||||
|
|
||||||
for my $attr ( 'project_id', 'studio_id', 'series_id', 'new_series_id', 'event_id' ) {
|
for my $attr ( 'project_id', 'studio_id', 'series_id', 'new_series_id', 'event_id' ) {
|
||||||
unless ( defined $params->{$attr} ) {
|
unless ( defined $params->{$attr} ) {
|
||||||
uac::print_error( $attr . ' not given!' );
|
uac::print_error( $attr . ' not given!' );
|
||||||
return;
|
return undef;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -819,17 +835,24 @@ sub reassign_event {
|
|||||||
|
|
||||||
$request->{params}->{checked}->{series_id} = $new_series_id;
|
$request->{params}->{checked}->{series_id} = $new_series_id;
|
||||||
my $result = assign_event( $config, $request );
|
my $result = assign_event( $config, $request );
|
||||||
if ( $result == 1 ) {
|
unless (defined $result){
|
||||||
$request->{params}->{checked}->{series_id} = $series_id;
|
uac::print_error("could not assign event");
|
||||||
$result = unassign_event( $config, $request );
|
return undef;
|
||||||
}
|
}
|
||||||
if ( $result == 1 ) {
|
|
||||||
my $url =
|
$request->{params}->{checked}->{series_id} = $series_id;
|
||||||
'event.cgi?project_id=' . $project_id . '&studio_id=' . $studio_id . '&series_id=' . $new_series_id . '&event_id=' . $event_id;
|
$result = unassign_event( $config, $request );
|
||||||
print qq{<meta http-equiv="refresh" content="0; url=$url" />} . "\n";
|
unless (defined $result){
|
||||||
delete $params->{getBack};
|
uac::print_error("could not unassign event");
|
||||||
return 1;
|
return undef;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#print STDERR " event\n";
|
||||||
|
my $url =
|
||||||
|
'event.cgi?project_id=' . $project_id . '&studio_id=' . $studio_id . '&series_id=' . $new_series_id . '&event_id=' . $event_id;
|
||||||
|
print qq{<meta http-equiv="refresh" content="0; url=$url" />} . "\n";
|
||||||
|
delete $params->{getBack};
|
||||||
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
sub add_user {
|
sub add_user {
|
||||||
@@ -921,15 +944,30 @@ sub list_series {
|
|||||||
|
|
||||||
my $project_id = $params->{project_id};
|
my $project_id = $params->{project_id};
|
||||||
my $studio_id = $params->{studio_id};
|
my $studio_id = $params->{studio_id};
|
||||||
|
|
||||||
|
my $studios = studios::get(
|
||||||
|
$config,
|
||||||
|
{
|
||||||
|
project_id => $project_id,
|
||||||
|
studio_id => $studio_id
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
my $studio_by_id = {};
|
||||||
|
for my $studio (@$studios) {
|
||||||
|
$studio_by_id->{ $studio->{id} } = $studio;
|
||||||
|
}
|
||||||
|
my $studio = $studio_by_id->{ $studio_id };
|
||||||
|
|
||||||
my $series_conditions = {
|
my $series_conditions = {
|
||||||
project_id => $project_id,
|
project_id => $project_id,
|
||||||
studio_id => $studio_id
|
studio_id => $studio_id
|
||||||
};
|
};
|
||||||
my $series = series::get_event_age( $config, $series_conditions );
|
my $series = series::get_event_age( $config, $series_conditions );
|
||||||
|
|
||||||
my $newSeries = [];
|
my $newSeries = [];
|
||||||
my $oldSeries = [];
|
my $oldSeries = [];
|
||||||
for my $serie ( sort { lc $a->{series_name} cmp lc $b->{series_name} } (@$series) ) {
|
for my $serie ( sort { lc $a->{series_name} cmp lc $b->{series_name} } (@$series) ) {
|
||||||
|
|
||||||
if ( $serie->{days_over} > 30 ) {
|
if ( $serie->{days_over} > 30 ) {
|
||||||
push @$oldSeries, $serie;
|
push @$oldSeries, $serie;
|
||||||
} else {
|
} else {
|
||||||
@@ -940,6 +978,10 @@ sub list_series {
|
|||||||
$params->{newSeries} = $newSeries;
|
$params->{newSeries} = $newSeries;
|
||||||
$params->{oldSeries} = $oldSeries;
|
$params->{oldSeries} = $oldSeries;
|
||||||
|
|
||||||
|
$params->{image} = studios::getImageById($config, {project_id => $project_id, studio_id => $studio_id} ) if ( (!defined $params->{image}) || ($params->{image} eq '') );
|
||||||
|
$params->{image} = project::getImageById($config, {project_id => $project_id} ) if ( (!defined $params->{image}) || ($params->{image} eq '') );
|
||||||
|
#print STDERR Dumper $params->{image};
|
||||||
|
|
||||||
$params->{loc} = localization::get( $config, { user => $params->{presets}->{user}, file => 'all,series' } );
|
$params->{loc} = localization::get( $config, { user => $params->{presets}->{user}, file => 'all,series' } );
|
||||||
template::process( 'print', $params->{template}, $params );
|
template::process( 'print', $params->{template}, $params );
|
||||||
}
|
}
|
||||||
@@ -1035,6 +1077,11 @@ sub show_series {
|
|||||||
|
|
||||||
my $location = $studio->{location};
|
my $location = $studio->{location};
|
||||||
|
|
||||||
|
# set default image from studio
|
||||||
|
$serie->{image} = studios::getImageById($config, {project_id => $project_id, studio_id => $studio_id} ) if ( (!defined $serie->{image}) || ($serie->{image} eq '') );
|
||||||
|
$serie->{image} = project::getImageById($config, {project_id => $project_id} ) if ( (!defined $serie->{image}) || ($serie->{image} eq '') );
|
||||||
|
#print STDERR Dumper $serie->{image};
|
||||||
|
|
||||||
#add users
|
#add users
|
||||||
$serie->{series_users} = series::get_users(
|
$serie->{series_users} = series::get_users(
|
||||||
$config,
|
$config,
|
||||||
@@ -1221,7 +1268,7 @@ sub check_params {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for my $param ( 'series_name', 'title', 'excerpt', 'content', 'topic', 'image',
|
for my $param ( 'series_name', 'title', 'excerpt', 'content', 'topic', 'image', 'image_label',
|
||||||
'assign_event_series_name', 'assign_event_title', 'comment', 'podcast_url', 'archive_url' )
|
'assign_event_series_name', 'assign_event_title', 'comment', 'podcast_url', 'archive_url' )
|
||||||
{
|
{
|
||||||
if ( defined $params->{$param} ) {
|
if ( defined $params->{$param} ) {
|
||||||
|
|||||||
146
website/agenda/planung/showImage.cgi
Normal file
146
website/agenda/planung/showImage.cgi
Normal file
@@ -0,0 +1,146 @@
|
|||||||
|
#! /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 images;
|
||||||
|
|
||||||
|
#use series_schedule;
|
||||||
|
#use series_events;
|
||||||
|
#use series_dates;
|
||||||
|
#use markup;
|
||||||
|
#use URI::Escape;
|
||||||
|
#use Encode;
|
||||||
|
use localization;
|
||||||
|
|
||||||
|
binmode STDOUT, ":utf8";
|
||||||
|
|
||||||
|
my $r = shift;
|
||||||
|
( my $cgi, my $params, my $error ) = params::get($r);
|
||||||
|
|
||||||
|
my $config = config::get('../config/config.cgi');
|
||||||
|
my $debug = $config->{system}->{debug};
|
||||||
|
my ( $user, $expires ) = auth::get_user( $cgi, $config );
|
||||||
|
return if ( ( !defined $user ) || ( $user eq '' ) );
|
||||||
|
|
||||||
|
my $user_presets = uac::get_user_presets(
|
||||||
|
$config,
|
||||||
|
{
|
||||||
|
project_id => $params->{project_id},
|
||||||
|
studio_id => $params->{studio_id},
|
||||||
|
user => $user
|
||||||
|
}
|
||||||
|
);
|
||||||
|
$params->{default_studio_id} = $user_presets->{studio_id};
|
||||||
|
$params->{studio_id} = $params->{default_studio_id}
|
||||||
|
if ( ( !( defined $params->{action} ) ) || ( $params->{action} eq '' ) || ( $params->{action} eq 'login' ) );
|
||||||
|
$params->{project_id} = $user_presets->{project_id}
|
||||||
|
if ( ( !( defined $params->{action} ) ) || ( $params->{action} eq '' ) || ( $params->{action} eq 'login' ) );
|
||||||
|
|
||||||
|
my $request = {
|
||||||
|
url => $ENV{QUERY_STRING} || '',
|
||||||
|
params => {
|
||||||
|
original => $params,
|
||||||
|
checked => check_params($params),
|
||||||
|
},
|
||||||
|
};
|
||||||
|
$request = uac::prepare_request( $request, $user_presets );
|
||||||
|
log::init($request);
|
||||||
|
|
||||||
|
$params = $request->{params}->{checked};
|
||||||
|
|
||||||
|
#process header
|
||||||
|
|
||||||
|
return unless uac::check( $config, $params, $user_presets ) == 1;
|
||||||
|
showImage( $config, $request );
|
||||||
|
|
||||||
|
#TODO: filter by published, draft
|
||||||
|
sub showImage {
|
||||||
|
my $config = shift;
|
||||||
|
my $request = shift;
|
||||||
|
|
||||||
|
my $params = $request->{params}->{checked};
|
||||||
|
my $permissions = $request->{permissions};
|
||||||
|
unless ( $permissions->{read_event} == 1 ) {
|
||||||
|
uac::permissions_denied('read_image');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
unless (defined $params->{filename}){
|
||||||
|
uac::permissions_denied('missing filename');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
my $filename = images::getInternalPath($config, $params);
|
||||||
|
unless (-e $filename){
|
||||||
|
uac::permissions_denied("read $filename");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
my $image=images::readFile($filename);
|
||||||
|
if (defined $image->{error}){
|
||||||
|
uac::permissions_denied("read $filename, $image->{error}");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
binmode STDOUT;
|
||||||
|
print "Content-type:image/jpeg; charset=UTF-8;\n\n";
|
||||||
|
print $image->{content};
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
sub check_params {
|
||||||
|
my $params = shift;
|
||||||
|
|
||||||
|
my $checked = {};
|
||||||
|
|
||||||
|
my $debug = $params->{debug} || '';
|
||||||
|
if ( $debug =~ /([a-z\_\,]+)/ ) {
|
||||||
|
$debug = $1;
|
||||||
|
}
|
||||||
|
$checked->{debug} = $debug;
|
||||||
|
|
||||||
|
#numeric values
|
||||||
|
for my $param ( 'filename') {
|
||||||
|
if ( ( defined $params->{$param} ) && ( $params->{$param} =~ /^[A-Za-z\_\-\.\d\/]+$/ ) ) {
|
||||||
|
$checked->{$param} = $params->{$param};
|
||||||
|
$checked->{$param} =~s/^.*\///g;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$checked->{type}='thumbs';
|
||||||
|
for my $param ( 'type') {
|
||||||
|
if ( ( defined $params->{$param} ) && ( $params->{$param} =~ /^(thumbs|images|icons)$/ ) ) {
|
||||||
|
$checked->{$param} = $params->{$param};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#numeric values
|
||||||
|
for my $param ( 'project_id', 'studio_id', 'series_id', 'event_id') {
|
||||||
|
if ( ( defined $params->{$param} ) && ( $params->{$param} =~ /^[\-\d]+$/ ) ) {
|
||||||
|
$checked->{$param} = $params->{$param};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( defined $checked->{studio_id} ) {
|
||||||
|
$checked->{default_studio_id} = $checked->{studio_id};
|
||||||
|
} else {
|
||||||
|
$checked->{studio_id} = -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $checked;
|
||||||
|
}
|
||||||
|
|
||||||
@@ -37,6 +37,10 @@
|
|||||||
<div> <a href="projects.cgi?project_id=<TMPL_VAR project_id>&studio_id=<TMPL_VAR default_studio_id>"><TMPL_VAR .loc.projects></a> </div>
|
<div> <a href="projects.cgi?project_id=<TMPL_VAR project_id>&studio_id=<TMPL_VAR default_studio_id>"><TMPL_VAR .loc.projects></a> </div>
|
||||||
</TMPL_IF>
|
</TMPL_IF>
|
||||||
|
|
||||||
|
<TMPL_IF .allow.update_image_others>
|
||||||
|
<div> <a href="image.cgi?project_id=<TMPL_VAR project_id>&studio_id=<TMPL_VAR default_studio_id>"><TMPL_VAR .loc.images></a> </div>
|
||||||
|
</TMPL_IF>
|
||||||
|
|
||||||
<TMPL_IF .allow.scan_series_events>
|
<TMPL_IF .allow.scan_series_events>
|
||||||
<div> <a href="assignments.cgi?project_id=<TMPL_VAR project_id>&studio_id=<TMPL_VAR default_studio_id>"><TMPL_VAR .loc.import></a> </div>
|
<div> <a href="assignments.cgi?project_id=<TMPL_VAR project_id>&studio_id=<TMPL_VAR default_studio_id>"><TMPL_VAR .loc.import></a> </div>
|
||||||
</TMPL_IF>
|
</TMPL_IF>
|
||||||
|
|||||||
@@ -384,7 +384,7 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td class="label">description</td>
|
<td class="label">description</td>
|
||||||
<td>
|
<td>
|
||||||
<img src="<TMPL_VAR image>" style="float:right;padding-left:1em">
|
<img style="float:right;padding-left:1em" src="showImage.cgi?project_id=<TMPL_VAR project_id>&studioId=<TMPL_VAR .studio_id>&type=icon&filename=<TMPL_VAR image>">
|
||||||
<div><TMPL_VAR topic</div>
|
<div><TMPL_VAR topic</div>
|
||||||
<div><TMPL_VAR html_content escape=0></div>
|
<div><TMPL_VAR html_content escape=0></div>
|
||||||
</td>
|
</td>
|
||||||
@@ -452,9 +452,11 @@
|
|||||||
<button onclick="selectImage('<TMPL_VAR .project_id>','<TMPL_VAR .studio_id>','image_<TMPL_VAR event_id>','<TMPL_VAR series_name escape=HTML>','<TMPL_VAR image ESCAPE=url>','<TMPL_VAR series_id>');return false;"
|
<button onclick="selectImage('<TMPL_VAR .project_id>','<TMPL_VAR .studio_id>','image_<TMPL_VAR event_id>','<TMPL_VAR series_name escape=HTML>','<TMPL_VAR image ESCAPE=url>','<TMPL_VAR series_id>');return false;"
|
||||||
style="padding:0;"
|
style="padding:0;"
|
||||||
>
|
>
|
||||||
<img id="imagePreview" src="<TMPL_VAR image>">
|
<img id="imagePreview" src="showImage.cgi?project_id=<TMPL_VAR project_id>&studioId=<TMPL_VAR studio_id>&filename=<TMPL_VAR image>&type=icon">
|
||||||
</button>
|
</button>
|
||||||
<input id="image_<TMPL_VAR event_id>" name="image" value="<TMPL_VAR image>" class="image" style="float:right" placeholder="<TMPL_VAR .loc.label_image>">
|
<input id="image_<TMPL_VAR event_id>" name="image" value="<TMPL_VAR image>" class="image" style="float:right" placeholder="<TMPL_VAR .loc.label_image>">
|
||||||
|
<input type="hidden" name="series_image" value="<TMPL_VAR series_image>" >
|
||||||
|
<!--(series_image:<TMPL_VAR series_image>,image=<TMPL_VAR image>)-->
|
||||||
</TMPL_IF>
|
</TMPL_IF>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
@@ -136,7 +136,7 @@
|
|||||||
<button onclick="selectImage('<TMPL_VAR .project_id>','<TMPL_VAR .studio_id>','image_<TMPL_VAR .series_id>','<TMPL_VAR series_name escape=HTML>','<TMPL_VAR image escape=URL>','<TMPL_VAR series_id>');return false;"
|
<button onclick="selectImage('<TMPL_VAR .project_id>','<TMPL_VAR .studio_id>','image_<TMPL_VAR .series_id>','<TMPL_VAR series_name escape=HTML>','<TMPL_VAR image escape=URL>','<TMPL_VAR series_id>');return false;"
|
||||||
style="padding:0;float:left"
|
style="padding:0;float:left"
|
||||||
>
|
>
|
||||||
<img id="imagePreview" src="<TMPL_VAR image>">
|
<img id="imagePreview" src="showImage.cgi?project_id=<TMPL_VAR .project_id>&studioId=<TMPL_VAR .studio_id>&filename=<TMPL_VAR image>&type=icon">
|
||||||
</button>
|
</button>
|
||||||
<input id="image_<TMPL_VAR .series_id>" name="image" value="<TMPL_VAR image>" class="image" placeholder="<TMPL_VAR .loc.template_image>">
|
<input id="image_<TMPL_VAR .series_id>" name="image" value="<TMPL_VAR image>" class="image" placeholder="<TMPL_VAR .loc.template_image>">
|
||||||
</TMPL_IF>
|
</TMPL_IF>
|
||||||
@@ -444,7 +444,7 @@
|
|||||||
<TMPL_LOOP events>
|
<TMPL_LOOP events>
|
||||||
<tr id="event_<TMPL_VAR event_id>">
|
<tr id="event_<TMPL_VAR event_id>">
|
||||||
<TMPL_IF .allow.read_image>
|
<TMPL_IF .allow.read_image>
|
||||||
<td class="logo"><img src="<TMPL_VAR image>" width="33" height="33"></td>
|
<td class="logo"><img width="33" height="33" src="showImage.cgi?project_id=<TMPL_VAR project_id>&studioId=<TMPL_VAR .studio_id>&type=icon&filename=<TMPL_VAR image>"></td>
|
||||||
</TMPL_IF>
|
</TMPL_IF>
|
||||||
<td class="weekday"><TMPL_VAR weekday_short_name></td>
|
<td class="weekday"><TMPL_VAR weekday_short_name></td>
|
||||||
<td class="date"><TMPL_VAR start_date></td>
|
<td class="date"><TMPL_VAR start_date></td>
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
$("#image-tabs").tabs({
|
$("#image-tabs").tabs({
|
||||||
activate: function(event, ui){
|
activate: function(event, ui){
|
||||||
if (ui==null) return;
|
if (ui==null) return;
|
||||||
selectedImageTab=getSelectedTab('image-tabs');
|
selectedImageTab = getSelectedTab('image-tabs');
|
||||||
|
|
||||||
<TMPL_IF .allow.create_image>
|
<TMPL_IF .allow.create_image>
|
||||||
if(selectedImageTab=="upload"){
|
if(selectedImageTab=="upload"){
|
||||||
@@ -100,7 +100,7 @@
|
|||||||
<TMPL_LOOP images>
|
<TMPL_LOOP images>
|
||||||
<div class="image"
|
<div class="image"
|
||||||
id="img_<TMPL_VAR id>"
|
id="img_<TMPL_VAR id>"
|
||||||
style="background-image:url('<TMPL_VAR thumb_url>')"
|
style="background-image:url('showImage.cgi?project_id=<TMPL_VAR project_id>&studioId=<TMPL_VAR .studio_id>&type=icon&filename=<TMPL_VAR filename>')"
|
||||||
title="<TMPL_VAR description>"
|
title="<TMPL_VAR description>"
|
||||||
onclick="imageAction('<TMPL_VAR filename>');return false;"
|
onclick="imageAction('<TMPL_VAR filename>');return false;"
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -2,11 +2,51 @@
|
|||||||
<head>
|
<head>
|
||||||
<link type="text/css" href="css/admin.css" rel="stylesheet"/>
|
<link type="text/css" href="css/admin.css" rel="stylesheet"/>
|
||||||
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
||||||
|
<script>
|
||||||
|
|
||||||
|
function updateCheckBox(selector, value){
|
||||||
|
$(selector).attr('value', value)
|
||||||
|
if (value==1){
|
||||||
|
$(selector).prop( "checked", true );
|
||||||
|
} else {
|
||||||
|
$(selector).prop( "checked", false );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function updatePublicCheckbox(elem){
|
||||||
|
console.log(elem.prop('checked'))
|
||||||
|
if (elem.prop('checked')){
|
||||||
|
console.log( 'set public' );
|
||||||
|
updateCheckBox(elem, 1);
|
||||||
|
}else{
|
||||||
|
console.log( 'unset public' );
|
||||||
|
updateCheckBox(elem, 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
$(document).ready(
|
||||||
|
function(){
|
||||||
|
var publicCheckbox=$("#img_editor input[name='public']");
|
||||||
|
|
||||||
|
updatePublicCheckbox( publicCheckbox );
|
||||||
|
publicCheckbox.change(
|
||||||
|
function(){
|
||||||
|
updatePublicCheckbox($(this));
|
||||||
|
}
|
||||||
|
)
|
||||||
|
console.log("image handler initialized");
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<TMPL_LOOP images>
|
<TMPL_LOOP images>
|
||||||
<form id="save_img_<TMPL_VAR id>"
|
<form id="save_img_<TMPL_VAR id>"
|
||||||
method="post" action="image.cgi"
|
method="post"
|
||||||
|
action="image.cgi"
|
||||||
onsubmit="saveImage('<TMPL_VAR id>','<TMPL_VAR filename>');return false;"
|
onsubmit="saveImage('<TMPL_VAR id>','<TMPL_VAR filename>');return false;"
|
||||||
style="float:left"
|
style="float:left"
|
||||||
>
|
>
|
||||||
@@ -15,9 +55,10 @@
|
|||||||
|
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<td rowspan="5"><a href="<TMPL_VAR image_url>" onclick="showImage('<TMPL_VAR image_url>');return false;"><img src="<TMPL_VAR thumb_url>" /></a></td>
|
|
||||||
<td><TMPL_VAR .loc.label_name></td>
|
<td><TMPL_VAR .loc.label_name></td>
|
||||||
<td><input value="<TMPL_VAR name escape=0>" name="update_name" class="field"></td>
|
<td><input value="<TMPL_VAR name escape=0>" name="update_name" class="field"></td>
|
||||||
|
<td rowspan="99"><a href="<TMPL_VAR image_url>" onclick="showImage('<TMPL_VAR image_url>');return false;"
|
||||||
|
><img src="showImage.cgi?project_id=<TMPL_VAR project_id>&studioId=<TMPL_VAR .studio_id>&type=icon&filename=<TMPL_VAR filename>" /></a></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><TMPL_VAR .loc.label_description></td>
|
<td><TMPL_VAR .loc.label_description></td>
|
||||||
@@ -33,21 +74,25 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><TMPL_VAR .loc.label_editor_link></td>
|
<td><TMPL_VAR .loc.label_editor_link></td>
|
||||||
<td><input value="{{thumbs/<TMPL_VAR filename escape=0>|<TMPL_VAR name>}}" class="field"/></td>
|
<td><input value="{{<TMPL_VAR filename escape=0>|<TMPL_VAR name>}}" class="field" /></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><TMPL_VAR .loc.label_author>/<TMPL_VAR .loc.label_licence></td>
|
||||||
|
<td><input name="licence" value="<TMPL_VAR licence>" class="field<TMPL_IF missing_licence> error</TMPL_IF>" placeholder="<TMPL_VAR .loc.label_licence_missing>"/></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><TMPL_VAR .loc.label_public></td>
|
||||||
|
<td><input type="checkbox" name="public" <TMPL_IF public>checked="checked" value="1"<TMPL_ELSE>value="0"</TMPL_IF> /></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td />
|
<td />
|
||||||
<td>
|
<td>
|
||||||
<TMPL_IF name="update_image">
|
<TMPL_IF name="update_image">
|
||||||
<input type="hidden" name="project_id" value="<TMPL_VAR .project_id>">
|
|
||||||
<input type="hidden" name="studio_id" value="<TMPL_VAR .studio_id>" />
|
|
||||||
<input type="hidden" name="save_image" value="<TMPL_VAR filename escape=0>" />
|
<input type="hidden" name="save_image" value="<TMPL_VAR filename escape=0>" />
|
||||||
<button onclick="this.submit"><TMPL_VAR .loc.button_save></button/>
|
<button onclick="this.submit"><TMPL_VAR .loc.button_save></button/>
|
||||||
</TMPL_IF>
|
</TMPL_IF>
|
||||||
|
|
||||||
<TMPL_IF name="delete_image">
|
<TMPL_IF name="delete_image">
|
||||||
<input type="hidden" name="project_id" value="<TMPL_VAR .project_id>">
|
|
||||||
<input type="hidden" name="studio_id" value="<TMPL_VAR .studio_id>" />
|
|
||||||
<button onclick="askDeleteImage('img_<TMPL_VAR id escape=0>','<TMPL_VAR filename escape=0>');return false;"><TMPL_VAR .loc.button_delete></button>
|
<button onclick="askDeleteImage('img_<TMPL_VAR id escape=0>','<TMPL_VAR filename escape=0>');return false;"><TMPL_VAR .loc.button_delete></button>
|
||||||
</TMPL_IF>
|
</TMPL_IF>
|
||||||
</td>
|
</td>
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
Content-type:text/html; charset=UTF-8;
|
|
||||||
|
|
||||||
<html>
|
<html>
|
||||||
<body>
|
<body>
|
||||||
<TMPL_LOOP images>
|
<TMPL_LOOP images>
|
||||||
|
|||||||
@@ -1,163 +0,0 @@
|
|||||||
<html>
|
|
||||||
<head>
|
|
||||||
|
|
||||||
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
|
||||||
<title><TMPL_VAR .doc.title></title>
|
|
||||||
<script src="js/page_leave_handler.js" type="text/javascript"></script>
|
|
||||||
|
|
||||||
<style>
|
|
||||||
.mailHeader{
|
|
||||||
background:#ccc;
|
|
||||||
}
|
|
||||||
|
|
||||||
.mailSubject{
|
|
||||||
border-bottom:2px solid #ccc;
|
|
||||||
}
|
|
||||||
|
|
||||||
.mailBody{
|
|
||||||
white-space:pre;
|
|
||||||
border-top:2px solid #ccc;
|
|
||||||
}
|
|
||||||
|
|
||||||
.done{
|
|
||||||
background:#cfc;
|
|
||||||
}
|
|
||||||
|
|
||||||
table#events td:nth-of-type(1){
|
|
||||||
width:15em;
|
|
||||||
}
|
|
||||||
|
|
||||||
table#events td:nth-of-type(2){
|
|
||||||
width:60em;
|
|
||||||
}
|
|
||||||
|
|
||||||
td.action, input.action{
|
|
||||||
width:5em;
|
|
||||||
}
|
|
||||||
|
|
||||||
form input{
|
|
||||||
width:50em;
|
|
||||||
}
|
|
||||||
|
|
||||||
form textarea{
|
|
||||||
width:50em;
|
|
||||||
height:14em;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
var region='<TMPL_VAR loc.region>';
|
|
||||||
var event_id='<TMPL_VAR event_id>';
|
|
||||||
var selectImageId='';
|
|
||||||
<TMPL_IF .event_edited>
|
|
||||||
$(document).ready(
|
|
||||||
function(){
|
|
||||||
if ($('div.error').length>0) return;
|
|
||||||
if(comeFromCalendar()) getBack();
|
|
||||||
}
|
|
||||||
);
|
|
||||||
</TMPL_IF>
|
|
||||||
|
|
||||||
$(document).ready(
|
|
||||||
function(){
|
|
||||||
$("#forms form").submit(
|
|
||||||
function( event ) {
|
|
||||||
event.preventDefault();
|
|
||||||
var $form = $( this );
|
|
||||||
var posting = $.post("notify_events.cgi", $form.serialize());
|
|
||||||
posting.done(
|
|
||||||
function( data ) {
|
|
||||||
var content = $( data ).find( "#content" );
|
|
||||||
$('#result').html(content);
|
|
||||||
var formId=$form.attr('id');
|
|
||||||
$('#'+formId+" .mailHeader").addClass("done");
|
|
||||||
}
|
|
||||||
);
|
|
||||||
}
|
|
||||||
);
|
|
||||||
}
|
|
||||||
);
|
|
||||||
</script>
|
|
||||||
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<div id="result" style="display:none"> </div>
|
|
||||||
|
|
||||||
<div id="forms">
|
|
||||||
<TMPL_LOOP events>
|
|
||||||
<form id="event_<TMPL_VAR event_id>">
|
|
||||||
<input type="hidden" name="project_id" value="<TMPL_VAR project_id>">
|
|
||||||
<input type="hidden" name="studio_id" value="<TMPL_VAR studio_id>">
|
|
||||||
<input type="hidden" name="series_id" value="<TMPL_VAR series_id>">
|
|
||||||
<input type="hidden" name="event_id" value="<TMPL_VAR event_id>">
|
|
||||||
<input type="hidden" name="action" value="send">
|
|
||||||
|
|
||||||
<table id="events">
|
|
||||||
<tr id="header_<TMPL_VAR event_id>" class="mailHeader">
|
|
||||||
<td><b><TMPL_VAR start></b></td>
|
|
||||||
<td><b><TMPL_VAR full_title></b> | <TMPL_IF live>live</TMPL_IF> <TMPL_IF preproduction>preproduction</TMPL_IF> <TMPL_IF playout>playout</TMPL_IF></td>
|
|
||||||
|
|
||||||
<TMPL_IF noRecipient>
|
|
||||||
<td></td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td>Warning</td>
|
|
||||||
<td><div class="error">no recipient configured at series!</div></td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<TMPL_ELSE>
|
|
||||||
|
|
||||||
<td class="action"><input class="button" type="submit" name="action" value="send"></td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<TMPL_IF mail.Subject>
|
|
||||||
<tr>
|
|
||||||
<td>Subject</td>
|
|
||||||
<td class="mailSubject"><input name="subject" value="<TMPL_VAR mail.Subject>"></td>
|
|
||||||
</tr>
|
|
||||||
</TMPL_IF>
|
|
||||||
|
|
||||||
<TMPL_IF mail.To>
|
|
||||||
<tr>
|
|
||||||
<td>To</td>
|
|
||||||
<td><input name="to" value="<TMPL_VAR mail.To>"></td>
|
|
||||||
</tr>
|
|
||||||
</TMPL_IF>
|
|
||||||
|
|
||||||
<TMPL_IF mail.From>
|
|
||||||
<tr>
|
|
||||||
<td>From</td>
|
|
||||||
<td><TMPL_VAR mail.From></td>
|
|
||||||
</tr>
|
|
||||||
</TMPL_IF>
|
|
||||||
|
|
||||||
<TMPL_IF mail.Cc>
|
|
||||||
<tr>
|
|
||||||
<td>Cc</td>
|
|
||||||
<td><input name="cc" value="<TMPL_VAR mail.Cc>"></td>
|
|
||||||
</tr>
|
|
||||||
</TMPL_IF>
|
|
||||||
|
|
||||||
<TMPL_IF mail.Reply-To>
|
|
||||||
<tr>
|
|
||||||
<td>Reply-To</td>
|
|
||||||
<td><TMPL_VAR mail.Reply-To></td>
|
|
||||||
</tr>
|
|
||||||
</TMPL_IF>
|
|
||||||
|
|
||||||
<TMPL_IF mail.data>
|
|
||||||
<tr>
|
|
||||||
<td>Content</td>
|
|
||||||
<td class="mailBody"><textarea name="content" ><TMPL_VAR mail.data></textarea></td>
|
|
||||||
</tr>
|
|
||||||
</TMPL_IF>
|
|
||||||
|
|
||||||
</TMPL_IF>
|
|
||||||
</table>
|
|
||||||
</form>
|
|
||||||
</TMPL_LOOP>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
@@ -12,8 +12,9 @@ var region='<TMPL_VAR loc.region>';
|
|||||||
<button onclick="add_series('<TMPL_VAR series_name>')"><TMPL_VAR .loc.button_add_series></button>
|
<button onclick="add_series('<TMPL_VAR series_name>')"><TMPL_VAR .loc.button_add_series></button>
|
||||||
<div id="edit_new" class="editor" style="display:none;clear:both">
|
<div id="edit_new" class="editor" style="display:none;clear:both">
|
||||||
<form method="post" action="series.cgi">
|
<form method="post" action="series.cgi">
|
||||||
<input type="hidden" name="project_id" value="<TMPL_VAR project_id>">
|
<input type="hidden" name="project_id" value="<TMPL_VAR .project_id>">
|
||||||
<input type="hidden" name="studio_id" value="<TMPL_VAR studio_id>">
|
<input type="hidden" name="studio_id" value="<TMPL_VAR .studio_id>">
|
||||||
|
<input type="hidden" name="image" value="<TMPL_VAR .image>">
|
||||||
|
|
||||||
<div class="formField">
|
<div class="formField">
|
||||||
<div class="label"><TMPL_VAR .loc.label_name></div>
|
<div class="label"><TMPL_VAR .loc.label_name></div>
|
||||||
|
|||||||
@@ -200,7 +200,13 @@ sub update_user {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
return unless ( check_password( $params->{user_password} ) );
|
my $users= uac::get_users($config, {email => $params->{email}});
|
||||||
|
if (scalar (@$users) > 0){
|
||||||
|
error('There is already a user registered for the given email address');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
return unless password_request::checkPassword( $params->{user_password} ) ;
|
||||||
|
|
||||||
if ( $params->{user_password} ne $params->{user_password2} ) {
|
if ( $params->{user_password} ne $params->{user_password2} ) {
|
||||||
error('password mismatch');
|
error('password mismatch');
|
||||||
@@ -236,76 +242,17 @@ sub change_password {
|
|||||||
my $params = $request->{params}->{checked};
|
my $params = $request->{params}->{checked};
|
||||||
my $permissions = $request->{permissions};
|
my $permissions = $request->{permissions};
|
||||||
|
|
||||||
unless ( ( defined $userName ) || ( $userName eq '' ) ) {
|
my $result = password_requests::changePassword($config, $request, $userName);
|
||||||
uac::print_error('user not found');
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
my $user = uac::get_user( $config, $userName );
|
$params->{errors} = $result->{error} if defined $result->{error};
|
||||||
|
$params->{info} = $result->{success} if defined $result->{success};
|
||||||
unless ( ( defined $user ) && ( defined $user->{id} ) && ( $user->{id} ne '' ) ) {
|
$params->{loc} = localization::get( $config, { user => $params->{presets}->{user}, file => 'users' } );
|
||||||
uac::print_error('user id not found');
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
unless ( check_password( $params->{user_password} ) ) {
|
|
||||||
error('password does not meet requirements');
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( $params->{user_password} ne $params->{user_password2} ) {
|
|
||||||
error('entered passwords do not match');
|
|
||||||
}
|
|
||||||
|
|
||||||
print STDERR "error at changing password:" . Dumper($errors);
|
|
||||||
|
|
||||||
if ( @$errors == 0 ) {
|
|
||||||
my $crypt = auth::crypt_password( $params->{user_password} );
|
|
||||||
$user = { id => $user->{id} };
|
|
||||||
$user->{salt} = $crypt->{salt};
|
|
||||||
$user->{pass} = $crypt->{crypt};
|
|
||||||
|
|
||||||
#print '<pre>'.Dumper($user).'</pre>';
|
|
||||||
$config->{access}->{write} = 1;
|
|
||||||
uac::update_user( $config, $user );
|
|
||||||
$config->{access}->{write} = 0;
|
|
||||||
print STDERR "password changed for $params->{presets}->{user}\n";
|
|
||||||
}
|
|
||||||
$params->{errors} = $errors; #join("<br>", (map {$_>{error}} (@$errors)) );
|
|
||||||
$params->{loc} = localization::get( $config, { user => $params->{presets}->{user}, file => 'users' } );
|
|
||||||
uac::set_template_permissions( $permissions, $params );
|
uac::set_template_permissions( $permissions, $params );
|
||||||
|
|
||||||
#print Dumper($permissions);
|
#print Dumper($permissions);
|
||||||
template::process( 'print', template::check('change_password'), $params );
|
template::process( 'print', template::check('change_password'), $params );
|
||||||
}
|
}
|
||||||
|
|
||||||
sub check_password {
|
|
||||||
my $password = shift;
|
|
||||||
unless ( defined $password || $password eq '' ) {
|
|
||||||
error("password is empty");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if ( length($password) < 8 ) {
|
|
||||||
error("password to short");
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
unless ( $password =~ /[a-z]/ ) {
|
|
||||||
error("password should contains at least one small character");
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
unless ( $password =~ /[A-Z]/ ) {
|
|
||||||
error("password should contains at least one big character");
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
unless ( $password =~ /[0-9]/ ) {
|
|
||||||
error("password should contains at least one number");
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
unless ( $password =~ /[^a-zA-Z0-9]/ ) {
|
|
||||||
error("password should contains at least one special character");
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
sub delete_user {
|
sub delete_user {
|
||||||
my $config = shift;
|
my $config = shift;
|
||||||
@@ -473,7 +420,16 @@ sub check_params {
|
|||||||
$checked->{studio_id} = -1;
|
$checked->{studio_id} = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
for my $param ( 'user_name', 'user_full_name', 'user_email', 'user_password', 'user_password2' ) {
|
for my $param ( 'user_name', 'user_full_name', 'user_email') {
|
||||||
|
if ( defined $params->{$param} ) {
|
||||||
|
my $value = $params->{$param};
|
||||||
|
$value =~s/^\s+//g;
|
||||||
|
$value =~s/\s+$//g;
|
||||||
|
$checked->{$param} = $value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for my $param ( 'user_password', 'user_password2' ) {
|
||||||
if ( defined $params->{$param} ) {
|
if ( defined $params->{$param} ) {
|
||||||
$checked->{$param} = $params->{$param};
|
$checked->{$param} = $params->{$param};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -85,8 +85,8 @@ sub getProjects {
|
|||||||
my $projects = project::get_sorted($config);
|
my $projects = project::get_sorted($config);
|
||||||
|
|
||||||
my $excludedProjects = {};
|
my $excludedProjects = {};
|
||||||
if ( defined $config->{filter}->{exclude_projects} ) {
|
if ( defined $config->{filter}->{projects_to_exclude} ) {
|
||||||
for my $project ( split( /\,/, $config->{filter}->{exclude_projects} ) ) {
|
for my $project ( split( /\,/, $config->{filter}->{projects_to_exclude} ) ) {
|
||||||
$project =~ s/^\s+//g;
|
$project =~ s/^\s+//g;
|
||||||
$project =~ s/\s+$//g;
|
$project =~ s/\s+$//g;
|
||||||
$excludedProjects->{$project} = 1;
|
$excludedProjects->{$project} = 1;
|
||||||
@@ -126,9 +126,9 @@ sub getSeriesNames {
|
|||||||
my $bind_values = [];
|
my $bind_values = [];
|
||||||
|
|
||||||
my @conds = ();
|
my @conds = ();
|
||||||
if ( defined $config->{filter}->{exclude_locations} ) {
|
if ( defined $config->{filter}->{locations_to_exclude} ) {
|
||||||
my @exclude = ();
|
my @exclude = ();
|
||||||
for my $location ( split( /\,/, $config->{filter}->{exclude_locations} ) ) {
|
for my $location ( split( /\,/, $config->{filter}->{locations_to_exclude} ) ) {
|
||||||
$location =~ s/^\s+//g;
|
$location =~ s/^\s+//g;
|
||||||
$location =~ s/\s+$//g;
|
$location =~ s/\s+$//g;
|
||||||
push @exclude, '?';
|
push @exclude, '?';
|
||||||
@@ -137,9 +137,9 @@ sub getSeriesNames {
|
|||||||
push @conds, 'location not in (' . join( ',', @exclude ) . ')';
|
push @conds, 'location not in (' . join( ',', @exclude ) . ')';
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( defined $config->{filter}->{exclude_projects} ) {
|
if ( defined $config->{filter}->{projects_to_exclude} ) {
|
||||||
my @exclude = ();
|
my @exclude = ();
|
||||||
for my $project ( split( /\,/, $config->{filter}->{exclude_projects} ) ) {
|
for my $project ( split( /\,/, $config->{filter}->{projects_to_exclude} ) ) {
|
||||||
$project =~ s/^\s+//g;
|
$project =~ s/^\s+//g;
|
||||||
$project =~ s/\s+$//g;
|
$project =~ s/\s+$//g;
|
||||||
push @exclude, '?';
|
push @exclude, '?';
|
||||||
|
|||||||
@@ -37,16 +37,32 @@
|
|||||||
|
|
||||||
<TMPL_IF program> (<TMPL_VAR program>)</TMPL_IF>
|
<TMPL_IF program> (<TMPL_VAR program>)</TMPL_IF>
|
||||||
</div>
|
</div>
|
||||||
<div class="content" >
|
<div class="content description" >
|
||||||
<TMPL_VAR excerpt > <TMPL_VAR user_excerpt >
|
<TMPL_VAR excerpt > <TMPL_VAR user_excerpt >
|
||||||
<TMPL_IF excerpt><hr><TMPL_ELSE><TMPL_IF user_excerpt><hr></TMPL_IF></TMPL_IF>
|
<TMPL_IF excerpt><hr><TMPL_ELSE><TMPL_IF user_excerpt><hr></TMPL_IF></TMPL_IF>
|
||||||
|
|
||||||
<TMPL_IF no_image_in_text>
|
<TMPL_IF no_image_in_text>
|
||||||
<p>
|
<TMPL_IF .hide_event_images>
|
||||||
<a href="<TMPL_VAR image>">
|
<a href="<TMPL_VAR series_image_url>">
|
||||||
<img alt="<TMPL_VAR series_name>" src="<TMPL_VAR thumb>">
|
<figure>
|
||||||
|
<TMPL_IF series_thumb_url>
|
||||||
|
<img alt="<TMPL_VAR series_name>" src="<TMPL_VAR series_thumb_url>">
|
||||||
|
<TMPL_IF series_image_label><figcaption>Bild:<TMPL_VAR series_image_label></figcaption></TMPL_IF>
|
||||||
|
</TMPL_IF>
|
||||||
|
</figure>
|
||||||
</a>
|
</a>
|
||||||
</p>
|
<TMPL_ELSE>
|
||||||
|
<a href="<TMPL_VAR image_url>">
|
||||||
|
<figure>
|
||||||
|
<TMPL_IF thumb_url>
|
||||||
|
<img alt="<TMPL_VAR series_name>" src="<TMPL_VAR thumb_url>">
|
||||||
|
<TMPL_IF image_label><figcaption>Bild:<TMPL_VAR image_label></figcaption></TMPL_IF>
|
||||||
|
</TMPL_IF>
|
||||||
|
</figure>
|
||||||
|
</a>
|
||||||
|
</TMPL_IF>
|
||||||
</TMPL_IF>
|
</TMPL_IF>
|
||||||
|
|
||||||
<TMPL_VAR topic ESCAPE=0><TMPL_VAR content ESCAPE=0>
|
<TMPL_VAR topic ESCAPE=0><TMPL_VAR content ESCAPE=0>
|
||||||
<TMPL_IF recurrence_date><a href="<TMPL_VAR recurrence>.html">Wiederholung vom <TMPL_VAR recurrence_date></a></TMPL_IF>
|
<TMPL_IF recurrence_date><a href="<TMPL_VAR recurrence>.html">Wiederholung vom <TMPL_VAR recurrence_date></a></TMPL_IF>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -22,23 +22,30 @@
|
|||||||
<TMPL_VAR weekday_short_name>, <TMPL_VAR start_date_name><TMPL_IF project_title> - <TMPL_VAR project_title></TMPL_IF>
|
<TMPL_VAR weekday_short_name>, <TMPL_VAR start_date_name><TMPL_IF project_title> - <TMPL_VAR project_title></TMPL_IF>
|
||||||
</div>
|
</div>
|
||||||
</TMPL_IF>
|
</TMPL_IF>
|
||||||
|
|
||||||
<div id="event_<TMPL_VAR event_id>" class="event<TMPL_IF location_css> <TMPL_VAR location_css></TMPL_IF><TMPL_IF is_running> running</TMPL_IF>"
|
<div id="event_<TMPL_VAR event_id>" class="event<TMPL_IF location_css> <TMPL_VAR location_css></TMPL_IF><TMPL_IF is_running> running</TMPL_IF>"
|
||||||
onclick="window.location.href='<TMPL_VAR cache_base_url>/<TMPL_VAR .controllers.event>/<TMPL_VAR event_id>.html#<TMPL_VAR event_uri escape=url>'"
|
onclick="window.location.href='<TMPL_VAR cache_base_url>/<TMPL_VAR .controllers.event>/<TMPL_VAR event_id>.html#<TMPL_VAR event_uri escape=url>'"
|
||||||
>
|
>
|
||||||
<span class="summary title" title="Mehr Infos zur Sendung">
|
|
||||||
<TMPL_VAR start_time_name><TMPL_IF name="__last__"> - <TMPL_VAR end_time_name></TMPL_IF> |
|
<span class="time"><TMPL_VAR start_time_name><TMPL_IF name="__last__"> - <TMPL_VAR end_time_name></TMPL_IF></span>
|
||||||
<a href="<TMPL_VAR cache_base_url>/<TMPL_VAR .controllers.event>/<TMPL_VAR event_id>.html#<TMPL_VAR event_uri escape=url>"
|
|
||||||
><TMPL_VAR full_title></a>
|
<span class="summary" title="Mehr Infos zur Sendung">
|
||||||
<span style="float:right;font-weight:100"><TMPL_IF location_mapped><TMPL_VAR location_mapped></TMPL_IF></span>
|
|
||||||
|
<a href="<TMPL_VAR cache_base_url>/<TMPL_VAR .controllers.event>/<TMPL_VAR event_id>.html#<TMPL_VAR event_uri escape=url>">
|
||||||
|
<span class="title"><TMPL_VAR full_title></span>
|
||||||
|
</a>
|
||||||
|
<div class="excerpt"><TMPL_VAR excerpt> <TMPL_VAR user_excerpt> </div>
|
||||||
|
|
||||||
|
<TMPL_UNLESS no_comment>
|
||||||
|
<a href="<TMPL_VAR cache_base_url>/<TMPL_VAR .controllers.event>/<TMPL_VAR event_id>.html#<TMPL_VAR event_uri>#comments"
|
||||||
|
>
|
||||||
|
<span class="submitted<TMPL_IF comment_count> comments</TMPL_IF>"><TMPL_VAR comment_count> Kommentar<TMPL_UNLESS one_comment>e</TMPL_UNLESS></span>
|
||||||
|
</a>
|
||||||
|
</TMPL_UNLESS>
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
<div class="excerpt"><TMPL_VAR excerpt> <TMPL_VAR user_excerpt></div>
|
<span class="location"><TMPL_VAR location_mapped></span>
|
||||||
<TMPL_UNLESS no_comment>
|
|
||||||
<a href="<TMPL_VAR cache_base_url>/<TMPL_VAR .controllers.event>/<TMPL_VAR event_id>.html#<TMPL_VAR event_uri>#comments"
|
|
||||||
>
|
|
||||||
<span class="submitted<TMPL_IF comment_count> comments</TMPL_IF>"><TMPL_VAR comment_count> Kommentar<TMPL_UNLESS one_comment>e</TMPL_UNLESS></span>
|
|
||||||
</a>
|
|
||||||
</TMPL_UNLESS>
|
|
||||||
</div>
|
</div>
|
||||||
</TMPL_IF>
|
</TMPL_IF>
|
||||||
</TMPL_LOOP>
|
</TMPL_LOOP>
|
||||||
|
|||||||
@@ -39,7 +39,7 @@
|
|||||||
|
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<TMPL_VAR start_time_name><br />
|
<TMPL_VAR start_time_name><br />
|
||||||
<TMPL_VAR series_name><TMPL_UNLESS series_name>kaputt: <TMPL_VAR title></TMPL_UNLESS>
|
<TMPL_VAR series_name><TMPL_UNLESS series_name>!<TMPL_VAR title></TMPL_UNLESS>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<span class="dtstart"><TMPL_VAR start></span>
|
<span class="dtstart"><TMPL_VAR start></span>
|
||||||
|
|||||||
@@ -1,6 +1,4 @@
|
|||||||
Options -Indexes -FollowSymLinks -MultiViews -ExecCGI
|
Options -Indexes +FollowSymLinks +MultiViews -ExecCGI
|
||||||
#Order allow,deny
|
|
||||||
#allow from all
|
|
||||||
Require all granted
|
Require all granted
|
||||||
|
|
||||||
<IfModule mod_expires.c>
|
<IfModule mod_expires.c>
|
||||||
|
|||||||
Reference in New Issue
Block a user