[vhffs-dev] [1816] No more HTML::Template in broadcast/create |
[ Thread Index |
Date Index
| More vhffs.org/vhffs-dev Archives
]
Revision: 1816
Author: beuss
Date: 2011-05-26 14:21:00 +0200 (Thu, 26 May 2011)
Log Message:
-----------
No more HTML::Template in broadcast/create
And reviewed the directory layout of broacasts. This should have been
done in two commits, but hey it's VHFFS...
Modified Paths:
--------------
trunk/vhffs-api/src/Vhffs/Panel/Admin.pm
trunk/vhffs-panel/Makefile.am
trunk/vhffs-panel/templates/Makefile.am
trunk/vhffs-panel/templates/admin/main/general.tmpl
trunk/vhffs-panel/templates/admin/misc/broadcast_part.tmpl
Added Paths:
-----------
trunk/vhffs-panel/admin/broadcast/
trunk/vhffs-panel/admin/broadcast/create.pl
trunk/vhffs-panel/admin/broadcast/delete.pl
trunk/vhffs-panel/admin/broadcast/list.pl
trunk/vhffs-panel/admin/broadcast/view.pl
trunk/vhffs-panel/templates/admin/broadcast/
trunk/vhffs-panel/templates/admin/broadcast/create.tt
Removed Paths:
-------------
trunk/vhffs-panel/admin/broadcast.pl
trunk/vhffs-panel/admin/broadcast_delete.pl
trunk/vhffs-panel/admin/broadcast_list.pl
trunk/vhffs-panel/admin/broadcast_submit.pl
trunk/vhffs-panel/admin/broadcast_view.pl
trunk/vhffs-panel/templates/admin/misc/broadcast.tmpl
Modified: trunk/vhffs-api/src/Vhffs/Panel/Admin.pm
===================================================================
--- trunk/vhffs-api/src/Vhffs/Panel/Admin.pm 2011-05-26 12:20:51 UTC (rev 1815)
+++ trunk/vhffs-api/src/Vhffs/Panel/Admin.pm 2011-05-26 12:21:00 UTC (rev 1816)
@@ -105,8 +105,8 @@
{ link => '/admin/moderation.pl', label => gettext( 'Moderation' ) },
{ link => '/admin/object/list.pl', label => gettext( 'List all objects' ) },
{ link => '/admin/object/search.pl', label => gettext( 'Search for an object' ) },
- { link => '/admin/broadcast.pl', label => gettext( 'Mail to all hosted people' ) },
- { link => '/admin/broadcast_list.pl', label => gettext( 'Manage mailings' ) }
+ { link => '/admin/broadcast/create.pl', label => gettext( 'Mail to all hosted people' ) },
+ { link => '/admin/broadcast/list.pl', label => gettext( 'Manage mailings' ) }
];
return { name => gettext( 'General' ), items => $items, type => 'general' };
}
Modified: trunk/vhffs-panel/Makefile.am
===================================================================
--- trunk/vhffs-panel/Makefile.am 2011-05-26 12:20:51 UTC (rev 1815)
+++ trunk/vhffs-panel/Makefile.am 2011-05-26 12:21:00 UTC (rev 1816)
@@ -862,11 +862,10 @@
admin/cron/index.pl \
admin/cron/list.pl \
admin/cron/search.pl \
- admin/broadcast_delete.pl \
- admin/broadcast_list.pl \
- admin/broadcast_submit.pl \
- admin/broadcast_view.pl \
- admin/broadcast.pl \
+ admin/broadcast/delete.pl \
+ admin/broadcast/list.pl \
+ admin/broadcast/view.pl \
+ admin/broadcast/create.pl \
admin/moderation_submit.pl \
admin/moderation.pl \
admin/stats.pl \
Copied: trunk/vhffs-panel/admin/broadcast/create.pl (from rev 1815, trunk/vhffs-panel/admin/broadcast.pl)
===================================================================
--- trunk/vhffs-panel/admin/broadcast/create.pl (rev 0)
+++ trunk/vhffs-panel/admin/broadcast/create.pl 2011-05-26 12:21:00 UTC (rev 1816)
@@ -0,0 +1,76 @@
+#!%PERL% -w
+# Copyright (c) vhffs project and its contributors
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in
+# the documentation and/or other materials provided with the
+# distribution.
+#3. Neither the name of vhffs nor the names of its contributors
+# may be used to endorse or promote products derived from this
+# software without specific prior written permission.
+#
+#THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+#"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+#LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+#FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+#COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+#INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+#BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+#LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+#CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+# POSSIBILITY OF SUCH DAMAGE.
+
+
+use utf8;
+use POSIX qw(locale_h);
+use locale;
+use Locale::gettext;
+use CGI;
+use CGI::Session;
+use strict;
+
+use lib '%VHFFS_LIB_DIR%';
+use Vhffs::Mailings;
+use Vhffs::Panel::Admin;
+
+my $panel = new Vhffs::Panel::Admin();
+my $cgi = $panel->{cgi};
+my $vhffs = $panel->{vhffs};
+
+my $subject = $cgi->param('SUBJECT');
+my $body = $cgi->param('BODY');
+my $vars = {};
+
+if(defined $subject and defined $body) {
+# Submission processing
+ if($subject !~ /\S/) {
+ $panel->add_error( gettext('You have to enter a subject') );
+ }
+ if($body !~ /\S/) {
+ $panel->add_error( gettext('You have to enter a message body') );
+ }
+ if(! $panel->has_errors ) {
+ if( Vhffs::Mailings::add_mailing( $vhffs , $subject , $body ) == 1 ) {
+ $panel->render('misc/message.tt', {
+ message => gettext('Mailing successfully added'),
+ refresh_url => '/admin/broadcast/list.pl'
+ });
+ } else {
+ $panel->add_error( gettext('Error while queuing mailing') );
+ }
+ }
+ $vars->{subject} = $subject;
+ $vars->{body} = $body;
+}
+
+
+$panel->render('admin/broadcast/create.tt', $vars);
Copied: trunk/vhffs-panel/admin/broadcast/delete.pl (from rev 1815, trunk/vhffs-panel/admin/broadcast_delete.pl)
===================================================================
--- trunk/vhffs-panel/admin/broadcast/delete.pl (rev 0)
+++ trunk/vhffs-panel/admin/broadcast/delete.pl 2011-05-26 12:21:00 UTC (rev 1816)
@@ -0,0 +1,98 @@
+#!%PERL% -w
+# Copyright (c) vhffs project and its contributors
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in
+# the documentation and/or other materials provided with the
+# distribution.
+#3. Neither the name of vhffs nor the names of its contributors
+# may be used to endorse or promote products derived from this
+# software without specific prior written permission.
+#
+#THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+#"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+#LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+#FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+#COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+#INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+#BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+#LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+#CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+# POSSIBILITY OF SUCH DAMAGE.
+
+
+use utf8;
+use POSIX qw(locale_h);
+use HTML::Template;
+use locale;
+use Locale::gettext;
+use CGI;
+use CGI::Session;
+use strict;
+
+
+use lib '%VHFFS_LIB_DIR%';
+use Vhffs::User;
+use Vhffs::Group;
+use Vhffs::Main;
+use Vhffs::Panel::Main;
+use Vhffs::Panel::Menu;
+use Vhffs::Services::Web;
+use Vhffs::Acl;
+use Vhffs::Constants;
+
+my $panel = new Vhffs::Panel::Main();
+exit 0 unless $panel;
+my $session = $panel->get_session;
+exit 0 unless $session;
+
+my $template;
+
+my $cgi = $panel->{'cgi'};
+my $vhffs = $panel->{'vhffs'};
+my $maintemplate = $panel->{'template'};
+my $user = $panel->{'user'};
+
+my $mid = $cgi->param("ID");
+
+my $templatedir = $vhffs->get_config->get_templatedir;
+
+$template = new HTML::Template( filename => $templatedir."/panel/misc/simplemsg.tmpl" );
+my $message;
+
+#Use is not allowed to see this page, only MODERATOR and ADMIN
+if( $user->is_admin != 1 )
+{
+ $message = gettext("You're not allowed to do this (ACL rights)");
+ $template->param( MESSAGE => $message );
+}
+elsif( ! defined $mid )
+{
+ $message = gettext("CGI Error !");
+ $template->param( MESSAGE => $message );
+}
+else
+{
+ use Vhffs::Mailings;
+ if( Vhffs::Mailings::del_mailing( $vhffs , $mid ) == 1 )
+ {
+ $template->param( MESSAGE => gettext("Mailing successfully deleted") );
+ }
+ else
+ {
+ $template->param( MESSAGE => gettext("An error occured while deleting this mailing") );
+ }
+}
+
+$panel->set_refresh_url( "/admin/broadcast_list.pl" );
+$panel->build( $template );
+$panel->display;
Copied: trunk/vhffs-panel/admin/broadcast/list.pl (from rev 1815, trunk/vhffs-panel/admin/broadcast_list.pl)
===================================================================
--- trunk/vhffs-panel/admin/broadcast/list.pl (rev 0)
+++ trunk/vhffs-panel/admin/broadcast/list.pl 2011-05-26 12:21:00 UTC (rev 1816)
@@ -0,0 +1,113 @@
+#!%PERL% -w
+# Copyright (c) vhffs project and its contributors
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in
+# the documentation and/or other materials provided with the
+# distribution.
+#3. Neither the name of vhffs nor the names of its contributors
+# may be used to endorse or promote products derived from this
+# software without specific prior written permission.
+#
+#THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+#"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+#LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+#FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+#COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+#INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+#BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+#LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+#CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+# POSSIBILITY OF SUCH DAMAGE.
+
+
+use utf8;
+use POSIX qw(locale_h);
+use HTML::Template;
+use locale;
+use Locale::gettext;
+use CGI;
+use CGI::Session;
+use strict;
+
+use lib '%VHFFS_LIB_DIR%';
+use Vhffs::User;
+use Vhffs::Group;
+use Vhffs::Main;
+use Vhffs::Panel::Main;
+use Vhffs::Panel::Menu;
+use Vhffs::Constants;
+use Vhffs::Mailings;
+
+my $panel = new Vhffs::Panel::Main();
+exit 0 unless $panel;
+my $session = $panel->get_session;
+exit 0 unless $session;
+
+my $vhffs = $panel->{'vhffs'};
+my $maintemplate = $panel->{'template'};
+my $user = $panel->{'user'};
+my $cgi = $panel->{'cgi'};
+my $servername = $cgi->param("name");
+my $template;
+my $subtemplate;
+my $templatesdir = $vhffs->get_config->get_templatedir;
+
+if( $user->is_admin != 1 )
+{
+
+ $template = new HTML::Template( filename => $templatesdir."/panel/misc/simplemsg.tmpl" );
+ my $message = gettext( "You are not allowed to see it");
+ $template->param( MESSAGE => $message );
+}
+else
+{
+ $template = new HTML::Template( filename => $templatesdir."/panel/admin/misc/broadcast_list.tmpl" );
+ $template->param( TITLE => gettext("All mailings sent to hosted"));
+ my $mailings = Vhffs::Mailings::getall( $vhffs );
+ my $result;
+ my $body;
+ $result = "";
+ foreach ( reverse sort keys %{$mailings} )
+ {
+ $subtemplate = new HTML::Template( filename => $templatesdir."/panel/admin/misc/broadcast_part.tmpl" );
+ $body = $mailings->{$_}{'message'};
+ ( $body ) = ( $body =~ /^(.{0,200}).*/ );
+ $subtemplate->param( ID => $_ );
+ $subtemplate->param( DATE => $mailings->{$_}{'date'} );
+ $subtemplate->param( DELETE => gettext("Delete this mailing") );
+ $subtemplate->param( VIEW => gettext("View this mailing") );
+ $subtemplate->param( SUBJECT => $mailings->{$_}{'subject'} );
+ $subtemplate->param( BODY => $body ."..." );
+
+ if( $mailings->{$_}{'state'} == 3 )
+ {
+ $subtemplate->param( STATE => gettext("Awaiting sending") );
+ }
+ elsif( $mailings->{$_}{'state'} == 6 )
+ {
+ $subtemplate->param( STATE => gettext("Send") );
+ }
+ else
+ {
+ $subtemplate->param( STATE => gettext("Unknown status") );
+ }
+
+ $result .= $subtemplate->output;
+ }
+ $template->param( MAILINGS => $result );
+
+}
+
+$panel->build( $template );
+$panel->display;
+
Copied: trunk/vhffs-panel/admin/broadcast/view.pl (from rev 1815, trunk/vhffs-panel/admin/broadcast_view.pl)
===================================================================
--- trunk/vhffs-panel/admin/broadcast/view.pl (rev 0)
+++ trunk/vhffs-panel/admin/broadcast/view.pl 2011-05-26 12:21:00 UTC (rev 1816)
@@ -0,0 +1,110 @@
+#!%PERL% -w
+# Copyright (c) vhffs project and its contributors
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in
+# the documentation and/or other materials provided with the
+# distribution.
+#3. Neither the name of vhffs nor the names of its contributors
+# may be used to endorse or promote products derived from this
+# software without specific prior written permission.
+#
+#THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+#"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+#LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+#FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+#COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+#INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+#BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+#LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+#CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+# POSSIBILITY OF SUCH DAMAGE.
+
+
+use strict;
+use utf8;
+use POSIX qw(locale_h);
+use HTML::Template;
+use locale;
+use Locale::gettext;
+use CGI;
+use CGI::Session;
+
+use lib '%VHFFS_LIB_DIR%';
+use Vhffs::User;
+use Vhffs::Group;
+use Vhffs::Main;
+use Vhffs::Panel::Main;
+use Vhffs::Panel::Menu;
+use Vhffs::Constants;
+use Vhffs::Mailings;
+
+my $panel = new Vhffs::Panel::Main();
+exit 0 unless $panel;
+my $session = $panel->get_session;
+exit 0 unless $session;
+
+my $vhffs = $panel->{'vhffs'};
+my $maintemplate = $panel->{'template'};
+my $user = $panel->{'user'};
+my $cgi = $panel->{'cgi'};
+my $mid = $cgi->param("ID");
+my $template;
+my $subtemplate;
+my $templatesdir = $vhffs->get_config->get_templatedir;
+my $message;
+
+my $mailing = Vhffs::Mailings::get_mailing( $vhffs , $mid );
+
+if( $user->is_admin != 1 )
+{
+ $template = new HTML::Template( filename => $templatesdir."/panel/misc/simplemsg.tmpl" );
+ $message = gettext( "You are not allowed to see it");
+ $template->param( MESSAGE => $message );
+}
+elsif( ( ! defined $mid ) || ( ! defined $mailing ) )
+{
+ $template = new HTML::Template( filename => $templatesdir."/panel/misc/simplemsg.tmpl" );
+ $message = gettext( "CGI Error !");
+ $template->param( MESSAGE => $message );
+}
+else
+{
+ $template = new HTML::Template( filename => $templatesdir."/panel/admin/misc/broadcast_view.tmpl" );
+ $template->param( TITLE => gettext("View mailing"));
+ $template->param( DATE_TEXT => gettext("Date"));
+ $template->param( SUBJECT_TEXT => gettext("Subject"));
+ $template->param( STATE_TEXT => gettext("State"));
+ $template->param( BODY_TEXT => gettext("Body"));
+
+ $template->param( DATE => $mailing->{'date'} );
+ $template->param( SUBJECT => $mailing->{'subject'} );
+ $template->param( BODY => $mailing->{'message'} );
+
+ if( $mailing->{'state'} == 3 )
+ {
+ $template->param( STATE => gettext("Awaiting sending") );
+ }
+ elsif( $mailing->{'state'} == 6 )
+ {
+ $template->param( STATE => gettext("Send") );
+ }
+ else
+ {
+ $template->param( STATE => gettext("Unknown status") );
+ }
+
+}
+
+$panel->build( $template );
+$panel->display;
+
Deleted: trunk/vhffs-panel/admin/broadcast.pl
===================================================================
--- trunk/vhffs-panel/admin/broadcast.pl 2011-05-26 12:20:51 UTC (rev 1815)
+++ trunk/vhffs-panel/admin/broadcast.pl 2011-05-26 12:21:00 UTC (rev 1816)
@@ -1,84 +0,0 @@
-#!%PERL% -w
-# Copyright (c) vhffs project and its contributors
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-#
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-#2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in
-# the documentation and/or other materials provided with the
-# distribution.
-#3. Neither the name of vhffs nor the names of its contributors
-# may be used to endorse or promote products derived from this
-# software without specific prior written permission.
-#
-#THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-#"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-#LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-#FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-#COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-#INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-#BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-#LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-#CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-# POSSIBILITY OF SUCH DAMAGE.
-
-
-use utf8;
-use POSIX qw(locale_h);
-use HTML::Template;
-use locale;
-use Locale::gettext;
-use CGI;
-use CGI::Session;
-use strict;
-
-use lib '%VHFFS_LIB_DIR%';
-use Vhffs::User;
-use Vhffs::Group;
-use Vhffs::Main;
-use Vhffs::Panel::Main;
-use Vhffs::Panel::Menu;
-use Vhffs::Constants;
-
-my $panel = new Vhffs::Panel::Main();
-exit 0 unless $panel;
-my $session = $panel->get_session;
-exit 0 unless $session;
-
-my $vhffs = $panel->{'vhffs'};
-my $maintemplate = $panel->{'template'};
-my $user = $panel->{'user'};
-my $cgi = $panel->{'cgi'};
-my $servername = $cgi->param("name");
-my $template;
-
-my $templatesdir = $vhffs->get_config->get_templatedir;
-
-if( $user->is_admin != 1 )
-{
-
- $template = new HTML::Template( filename => $templatesdir."/panel/misc/simplemsg.tmpl" );
- my $message = gettext( "You are not allowed to see it");
- $template->param( MESSAGE => $message );
-}
-else
-{
- $template = new HTML::Template( filename => $templatesdir."/panel/admin/misc/broadcast.tmpl" );
-
- $template->param( TITLE => gettext("Send an email to all hosted people") );
-
- $template->param( TEXT_SUBJECT => gettext("Subject") );
- $template->param( TEXT_BODY => gettext("Message") );
- $template->param( TEXT_SUBMIT => gettext("Ok, send it !") );
-}
-
-$panel->build( $template );
-$panel->display;
-
Deleted: trunk/vhffs-panel/admin/broadcast_delete.pl
===================================================================
--- trunk/vhffs-panel/admin/broadcast_delete.pl 2011-05-26 12:20:51 UTC (rev 1815)
+++ trunk/vhffs-panel/admin/broadcast_delete.pl 2011-05-26 12:21:00 UTC (rev 1816)
@@ -1,98 +0,0 @@
-#!%PERL% -w
-# Copyright (c) vhffs project and its contributors
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-#
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-#2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in
-# the documentation and/or other materials provided with the
-# distribution.
-#3. Neither the name of vhffs nor the names of its contributors
-# may be used to endorse or promote products derived from this
-# software without specific prior written permission.
-#
-#THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-#"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-#LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-#FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-#COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-#INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-#BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-#LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-#CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-# POSSIBILITY OF SUCH DAMAGE.
-
-
-use utf8;
-use POSIX qw(locale_h);
-use HTML::Template;
-use locale;
-use Locale::gettext;
-use CGI;
-use CGI::Session;
-use strict;
-
-
-use lib '%VHFFS_LIB_DIR%';
-use Vhffs::User;
-use Vhffs::Group;
-use Vhffs::Main;
-use Vhffs::Panel::Main;
-use Vhffs::Panel::Menu;
-use Vhffs::Services::Web;
-use Vhffs::Acl;
-use Vhffs::Constants;
-
-my $panel = new Vhffs::Panel::Main();
-exit 0 unless $panel;
-my $session = $panel->get_session;
-exit 0 unless $session;
-
-my $template;
-
-my $cgi = $panel->{'cgi'};
-my $vhffs = $panel->{'vhffs'};
-my $maintemplate = $panel->{'template'};
-my $user = $panel->{'user'};
-
-my $mid = $cgi->param("ID");
-
-my $templatedir = $vhffs->get_config->get_templatedir;
-
-$template = new HTML::Template( filename => $templatedir."/panel/misc/simplemsg.tmpl" );
-my $message;
-
-#Use is not allowed to see this page, only MODERATOR and ADMIN
-if( $user->is_admin != 1 )
-{
- $message = gettext("You're not allowed to do this (ACL rights)");
- $template->param( MESSAGE => $message );
-}
-elsif( ! defined $mid )
-{
- $message = gettext("CGI Error !");
- $template->param( MESSAGE => $message );
-}
-else
-{
- use Vhffs::Mailings;
- if( Vhffs::Mailings::del_mailing( $vhffs , $mid ) == 1 )
- {
- $template->param( MESSAGE => gettext("Mailing successfully deleted") );
- }
- else
- {
- $template->param( MESSAGE => gettext("An error occured while deleting this mailing") );
- }
-}
-
-$panel->set_refresh_url( "/admin/broadcast_list.pl" );
-$panel->build( $template );
-$panel->display;
Deleted: trunk/vhffs-panel/admin/broadcast_list.pl
===================================================================
--- trunk/vhffs-panel/admin/broadcast_list.pl 2011-05-26 12:20:51 UTC (rev 1815)
+++ trunk/vhffs-panel/admin/broadcast_list.pl 2011-05-26 12:21:00 UTC (rev 1816)
@@ -1,113 +0,0 @@
-#!%PERL% -w
-# Copyright (c) vhffs project and its contributors
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-#
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-#2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in
-# the documentation and/or other materials provided with the
-# distribution.
-#3. Neither the name of vhffs nor the names of its contributors
-# may be used to endorse or promote products derived from this
-# software without specific prior written permission.
-#
-#THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-#"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-#LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-#FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-#COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-#INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-#BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-#LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-#CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-# POSSIBILITY OF SUCH DAMAGE.
-
-
-use utf8;
-use POSIX qw(locale_h);
-use HTML::Template;
-use locale;
-use Locale::gettext;
-use CGI;
-use CGI::Session;
-use strict;
-
-use lib '%VHFFS_LIB_DIR%';
-use Vhffs::User;
-use Vhffs::Group;
-use Vhffs::Main;
-use Vhffs::Panel::Main;
-use Vhffs::Panel::Menu;
-use Vhffs::Constants;
-use Vhffs::Mailings;
-
-my $panel = new Vhffs::Panel::Main();
-exit 0 unless $panel;
-my $session = $panel->get_session;
-exit 0 unless $session;
-
-my $vhffs = $panel->{'vhffs'};
-my $maintemplate = $panel->{'template'};
-my $user = $panel->{'user'};
-my $cgi = $panel->{'cgi'};
-my $servername = $cgi->param("name");
-my $template;
-my $subtemplate;
-my $templatesdir = $vhffs->get_config->get_templatedir;
-
-if( $user->is_admin != 1 )
-{
-
- $template = new HTML::Template( filename => $templatesdir."/panel/misc/simplemsg.tmpl" );
- my $message = gettext( "You are not allowed to see it");
- $template->param( MESSAGE => $message );
-}
-else
-{
- $template = new HTML::Template( filename => $templatesdir."/panel/admin/misc/broadcast_list.tmpl" );
- $template->param( TITLE => gettext("All mailings sent to hosted"));
- my $mailings = Vhffs::Mailings::getall( $vhffs );
- my $result;
- my $body;
- $result = "";
- foreach ( reverse sort keys %{$mailings} )
- {
- $subtemplate = new HTML::Template( filename => $templatesdir."/panel/admin/misc/broadcast_part.tmpl" );
- $body = $mailings->{$_}{'message'};
- ( $body ) = ( $body =~ /^(.{0,200}).*/ );
- $subtemplate->param( ID => $_ );
- $subtemplate->param( DATE => $mailings->{$_}{'date'} );
- $subtemplate->param( DELETE => gettext("Delete this mailing") );
- $subtemplate->param( VIEW => gettext("View this mailing") );
- $subtemplate->param( SUBJECT => $mailings->{$_}{'subject'} );
- $subtemplate->param( BODY => $body ."..." );
-
- if( $mailings->{$_}{'state'} == 3 )
- {
- $subtemplate->param( STATE => gettext("Awaiting sending") );
- }
- elsif( $mailings->{$_}{'state'} == 6 )
- {
- $subtemplate->param( STATE => gettext("Send") );
- }
- else
- {
- $subtemplate->param( STATE => gettext("Unknown status") );
- }
-
- $result .= $subtemplate->output;
- }
- $template->param( MAILINGS => $result );
-
-}
-
-$panel->build( $template );
-$panel->display;
-
Deleted: trunk/vhffs-panel/admin/broadcast_submit.pl
===================================================================
--- trunk/vhffs-panel/admin/broadcast_submit.pl 2011-05-26 12:20:51 UTC (rev 1815)
+++ trunk/vhffs-panel/admin/broadcast_submit.pl 2011-05-26 12:21:00 UTC (rev 1816)
@@ -1,98 +0,0 @@
-#!%PERL% -w
-# Copyright (c) vhffs project and its contributors
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-#
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-#2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in
-# the documentation and/or other materials provided with the
-# distribution.
-#3. Neither the name of vhffs nor the names of its contributors
-# may be used to endorse or promote products derived from this
-# software without specific prior written permission.
-#
-#THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-#"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-#LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-#FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-#COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-#INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-#BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-#LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-#CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-# POSSIBILITY OF SUCH DAMAGE.
-
-
-use strict;
-use utf8;
-use POSIX qw(locale_h);
-use HTML::Template;
-use locale;
-use Locale::gettext;
-use CGI;
-use CGI::Session;
-use Encode;
-
-use lib '%VHFFS_LIB_DIR%';
-use Vhffs::User;
-use Vhffs::Group;
-use Vhffs::Main;
-use Vhffs::Panel::Main;
-use Vhffs::Panel::Menu;
-use Vhffs::Services::Web;
-use Vhffs::Acl;
-use Vhffs::Constants;
-
-my $panel = new Vhffs::Panel::Main();
-exit 0 unless $panel;
-my $session = $panel->get_session;
-exit 0 unless $session;
-
-my $template;
-
-my $cgi = $panel->{'cgi'};
-my $vhffs = $panel->{'vhffs'};
-my $maintemplate = $panel->{'template'};
-my $user = $panel->{'user'};
-
-my $subject = Encode::decode_utf8( $cgi->param('SUBJECT') );
-my $body = Encode::decode_utf8( $cgi->param('BODY') );
-
-my $templatedir = $vhffs->get_config->get_templatedir;
-
-$template = new HTML::Template( filename => $templatedir."/panel/admin/misc/moderation_applied.tmpl" );
-my $message;
-#Use is not allowed to see this page, only MODERATOR and ADMIN
-if( $user->is_admin != 1 )
-{
- $message = gettext("You're not allowed to do this (ACL rights)");
- $template->param( MESSAGE => $message );
-}
-elsif( ( ! defined $body ) || ( ! defined $subject ) )
-{
- $message = gettext("CGI Error !");
- $template->param( MESSAGE => $message );
-}
-else
-{
- use Vhffs::Mailings;
- if( Vhffs::Mailings::add_mailing( $vhffs , $subject , $body ) == 1 )
- {
- $template->param( MESSAGE => gettext("Mailing successfully added") );
- }
- else
- {
- $template->param( MESSAGE => gettext("Error !") );
- }
-}
-
-$panel->set_refresh_url( "/admin/broadcast.pl" );
-$panel->build( $template );
-$panel->display;
Deleted: trunk/vhffs-panel/admin/broadcast_view.pl
===================================================================
--- trunk/vhffs-panel/admin/broadcast_view.pl 2011-05-26 12:20:51 UTC (rev 1815)
+++ trunk/vhffs-panel/admin/broadcast_view.pl 2011-05-26 12:21:00 UTC (rev 1816)
@@ -1,110 +0,0 @@
-#!%PERL% -w
-# Copyright (c) vhffs project and its contributors
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-#
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-#2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in
-# the documentation and/or other materials provided with the
-# distribution.
-#3. Neither the name of vhffs nor the names of its contributors
-# may be used to endorse or promote products derived from this
-# software without specific prior written permission.
-#
-#THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-#"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-#LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-#FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-#COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-#INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-#BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-#LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-#CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-# POSSIBILITY OF SUCH DAMAGE.
-
-
-use strict;
-use utf8;
-use POSIX qw(locale_h);
-use HTML::Template;
-use locale;
-use Locale::gettext;
-use CGI;
-use CGI::Session;
-
-use lib '%VHFFS_LIB_DIR%';
-use Vhffs::User;
-use Vhffs::Group;
-use Vhffs::Main;
-use Vhffs::Panel::Main;
-use Vhffs::Panel::Menu;
-use Vhffs::Constants;
-use Vhffs::Mailings;
-
-my $panel = new Vhffs::Panel::Main();
-exit 0 unless $panel;
-my $session = $panel->get_session;
-exit 0 unless $session;
-
-my $vhffs = $panel->{'vhffs'};
-my $maintemplate = $panel->{'template'};
-my $user = $panel->{'user'};
-my $cgi = $panel->{'cgi'};
-my $mid = $cgi->param("ID");
-my $template;
-my $subtemplate;
-my $templatesdir = $vhffs->get_config->get_templatedir;
-my $message;
-
-my $mailing = Vhffs::Mailings::get_mailing( $vhffs , $mid );
-
-if( $user->is_admin != 1 )
-{
- $template = new HTML::Template( filename => $templatesdir."/panel/misc/simplemsg.tmpl" );
- $message = gettext( "You are not allowed to see it");
- $template->param( MESSAGE => $message );
-}
-elsif( ( ! defined $mid ) || ( ! defined $mailing ) )
-{
- $template = new HTML::Template( filename => $templatesdir."/panel/misc/simplemsg.tmpl" );
- $message = gettext( "CGI Error !");
- $template->param( MESSAGE => $message );
-}
-else
-{
- $template = new HTML::Template( filename => $templatesdir."/panel/admin/misc/broadcast_view.tmpl" );
- $template->param( TITLE => gettext("View mailing"));
- $template->param( DATE_TEXT => gettext("Date"));
- $template->param( SUBJECT_TEXT => gettext("Subject"));
- $template->param( STATE_TEXT => gettext("State"));
- $template->param( BODY_TEXT => gettext("Body"));
-
- $template->param( DATE => $mailing->{'date'} );
- $template->param( SUBJECT => $mailing->{'subject'} );
- $template->param( BODY => $mailing->{'message'} );
-
- if( $mailing->{'state'} == 3 )
- {
- $template->param( STATE => gettext("Awaiting sending") );
- }
- elsif( $mailing->{'state'} == 6 )
- {
- $template->param( STATE => gettext("Send") );
- }
- else
- {
- $template->param( STATE => gettext("Unknown status") );
- }
-
-}
-
-$panel->build( $template );
-$panel->display;
-
Modified: trunk/vhffs-panel/templates/Makefile.am
===================================================================
--- trunk/vhffs-panel/templates/Makefile.am 2011-05-26 12:20:51 UTC (rev 1815)
+++ trunk/vhffs-panel/templates/Makefile.am 2011-05-26 12:21:00 UTC (rev 1816)
@@ -5,7 +5,6 @@
admin/main/main.tmpl \
admin/misc/broadcast_list.tmpl \
admin/misc/broadcast_part.tmpl \
- admin/misc/broadcast.tmpl \
admin/misc/broadcast_view.tmpl \
admin/misc/list.tmpl \
admin/misc/mailings_part.tmpl \
@@ -43,6 +42,7 @@
acl/view.tt \
admin/group/list.tt \
admin/index.tt \
+ admin/broadcast/create.tt \
admin/misc/list.tt \
admin/misc/search.tt \
admin/object/edit.tt \
Added: trunk/vhffs-panel/templates/admin/broadcast/create.tt
===================================================================
--- trunk/vhffs-panel/templates/admin/broadcast/create.tt (rev 0)
+++ trunk/vhffs-panel/templates/admin/broadcast/create.tt 2011-05-26 12:21:00 UTC (rev 1816)
@@ -0,0 +1,16 @@
+<h1>[% 'Send an email to all hosted people' | i18n | html %]</h1>
+
+<form method="post" action="/admin/broadcast/create.pl" accept-charset="utf-8">
+ <p>
+ <label for="SUBJECT">[% 'Subject:' | i18n | html %]</label>
+ <input type="text" name="SUBJECT" id="SUBJECT" value="[% subject | html %]"/>
+ </p>
+ <p>
+ <label for="BODY">[% 'Message:' | i18n | html %]</label>
+ <textarea name="BODY" id="BODY" cols="60" rows="30">[% body | html %]</textarea>
+ </p>
+ <p class="button" id="buttonSend">
+ <input type="submit" value="[% 'Send' | i18n | html %]" />
+ </p>
+</form>
+
Modified: trunk/vhffs-panel/templates/admin/main/general.tmpl
===================================================================
--- trunk/vhffs-panel/templates/admin/main/general.tmpl 2011-05-26 12:20:51 UTC (rev 1815)
+++ trunk/vhffs-panel/templates/admin/main/general.tmpl 2011-05-26 12:21:00 UTC (rev 1816)
@@ -27,12 +27,12 @@
</a>
</li>
<li id="adminHomeMailing">
- <a href="/admin/broadcast.pl">
+ <a href="/admin/broadcast/create.pl">
<TMPL_VAR ESCAPE=1 NAME="TEXT_MAILING">
</a>
</li>
<li id="adminHomeMailingHandling">
- <a href="/admin/broadcast_list.pl">
+ <a href="/admin/broadcast/list.pl">
<TMPL_VAR ESCAPE=1 NAME="TEXT_AMAILING">
</a>
</li>
Deleted: trunk/vhffs-panel/templates/admin/misc/broadcast.tmpl
===================================================================
--- trunk/vhffs-panel/templates/admin/misc/broadcast.tmpl 2011-05-26 12:20:51 UTC (rev 1815)
+++ trunk/vhffs-panel/templates/admin/misc/broadcast.tmpl 2011-05-26 12:21:00 UTC (rev 1816)
@@ -1,19 +0,0 @@
-<h1><TMPL_VAR ESCAPE=1 NAME="TITLE"></h1>
-
-<form method="post" action="broadcast_submit.pl" accept-charset="utf-8">
- <p>
- <label for="SUBJECT">
- <TMPL_VAR ESCAPE=1 NAME="TEXT_SUBJECT">:
- </label>
- <input type="text" name="SUBJECT" id="SUBJECT" />
- </p>
- <p>
- <label for="BODY">
- <TMPL_VAR ESCAPE=1 NAME="TEXT_BODY">:
- </label>
- <textarea name="BODY" id="BODY" cols="60" rows="30"></textarea>
- </p>
- <p class="button" id="buttonSend">
- <input type="submit" value="<TMPL_VAR ESCAPE=1 NAME="TEXT_SUBMIT">" />
- </p>
-</form>
Modified: trunk/vhffs-panel/templates/admin/misc/broadcast_part.tmpl
===================================================================
--- trunk/vhffs-panel/templates/admin/misc/broadcast_part.tmpl 2011-05-26 12:20:51 UTC (rev 1815)
+++ trunk/vhffs-panel/templates/admin/misc/broadcast_part.tmpl 2011-05-26 12:21:00 UTC (rev 1816)
@@ -13,12 +13,12 @@
<TMPL_VAR ESCAPE=1 NAME="STATE">
</td>
<td>
- <form method="post" action="broadcast_delete.pl" accept-charset="utf-8">
+ <form method="post" action="/admin/broadcast/delete.pl" accept-charset="utf-8">
<input type="hidden" name="ID" value="<TMPL_VAR ESCAPE=1 NAME="ID">" />
<input type="submit" value="<TMPL_VAR ESCAPE=1 NAME="DELETE">" />
</form>
<br/>
- <form method="post" action="broadcast_view.pl" accept-charset="utf-8">
+ <form method="post" action="/admin/broadcast/view.pl" accept-charset="utf-8">
<input type="hidden" name="ID" value="<TMPL_VAR ESCAPE=1 NAME="ID">" />
<input type="submit" value="<TMPL_VAR ESCAPE=1 NAME="VIEW">" />
</form>