site/cgi-bin/modules/BSE/Mail/SMTP.pm
site/cgi-bin/modules/BSE/Mail/Sendmail.pm
site/cgi-bin/modules/BSE/Message.pm
+site/cgi-bin/modules/BSE/Permissions.pm
site/cgi-bin/modules/BSE/Request.pm
site/cgi-bin/modules/BSE/Session.pm
site/cgi-bin/modules/BSE/Shop/Util.pm
site/htdocs/admin/help/catalog.html
site/htdocs/admin/help/edit.html
site/htdocs/admin/help/file.html
+site/htdocs/admin/help/image.html
site/htdocs/admin/help/product.html
site/htdocs/admin/help/subs.html
site/htdocs/admin/help/subssend.html
site/templates/admin/product_list.tmpl
site/templates/admin/regenerror.tmpl
site/templates/admin/showgroup.tmpl
+site/templates/admin/showgroupart.tmpl
+site/templates/admin/showgroup_del.tmpl
+site/templates/admin/showgroup_glob.tmpl
site/templates/admin/showuser.tmpl
+site/templates/admin/showuserart.tmpl
+site/templates/admin/showuser_del.tmpl
+site/templates/admin/showuser_glob.tmpl
site/templates/admin/subs/add.tmpl
site/templates/admin/subs/edit.tmpl
site/templates/admin/subs/list.tmpl
-VERSION=0.12_08
+VERSION=0.12_09
DISTNAME=bse-$(VERSION)
DISTBUILD=$(DISTNAME)
DISTTAR=../$(DISTNAME).tar
-- an empty string if there's no user
userId varchar(40) not null,
+ paymentType integer not null default 0,
+
+ -- intended for custom uses
+ customInt1 integer null,
+ customInt2 integer null,
+ customInt3 integer null,
+ customInt4 integer null,
+ customInt5 integer null,
+
+ customStr1 varchar(255) null,
+ customStr2 varchar(255) null,
+ customStr3 varchar(255) null,
+ customStr4 varchar(255) null,
+ customStr5 varchar(255) null,
+
primary key (id),
index order_cchash(ccNumberHash),
index order_userId(userId, orderDate)
sub {
print "<div>",CGI::escapeHTML($_[0]),"</div>\n";
});
+ print qq!<p><a target="_top" href="/admin/">Back to Admin Menu</a></p>\n!;
print "</body></html>\n";
}
[basic]
randomdata = /dev/urandom
+accesscontrol=0
[paths]
; the following needs to be set to a path writable by the BSE processes
[articles]
shop=3
+[shop]
+payment_types=0,1,2
+address1=First address line in configuration
+address2=Second address line in configuration
+address3=Third address line in configuration
+
[level 1]
template=common/default.tmpl
[products]
template=shopitem.tmpl
+
+[Global permissions]
+shop_access = 1
+all_but_shop = 3
+
+[Article permissions]
+full_access = 0
+change_body = 2
+
+[permission full_access]
+help=Full access to the article. The user can modify all modifiable fields, delete and add articles at will.
+brief=Full access
+permissions=*
+descendants=1
+
+[permission change_body]
+help=The user only has permission to change the body of the article or product.
+permissions=edit_field_body
+brief=Change body
+
+[permission shop_access]
+help=The user has complete access to articles in the shop
+articles=3
+descendants=1
+permissions=!admin_*
+brief=Shop admin
+
+[permission all_but_shop]
+help=The user has complete access to all articles but the shop.
+articles=!3
+descendants=1
+brief=All but shop admin
+permissions=!admin_*
+
return ArticleFiles->getBy(articleId=>$self->{id});
}
+sub parent {
+ my ($self) = @_;
+ $self->{parentid} == -1 and return;
+ return Articles->getByPkey($self->{parentid});
+}
+
1;
(
users=>1,
showuser=>1,
+ showuserart=>1,
saveuser=>1,
+ saveuserart=>1,
adduser=>1,
groups=>1,
+ showgroupart=>1,
showgroup=>1,
savegroup=>1,
+ savegroupart=>1,
+ showobjectart=>1,
addgroup=>1,
+ deluser=>1,
+ delgroup=>1,
);
sub dispatch {
my %acts;
%acts = $class->common_tags($req, $msg);
+
return BSE::Template->get_response('admin/grouplist', $req->cfg, \%acts);
}
shift @cols;
my $user = BSE::TB::AdminUsers->add(@user{@cols});
return $class->refresh($req, 'a_showuser', userid=>$user->{id},
- m=>"User $logon created");
+ 'm'=>"User $logon created");
}
sub req_addgroup {
shift @cols;
my $group = BSE::TB::AdminGroups->add(@group{@cols});
return $class->refresh($req, 'a_showgroup', groupid=>$group->{id},
- m=>"Group $name created");
+ 'm' =>"Group $name created");
+}
+
+sub tag_if_user_member_of {
+ my ($members, $arg, $acts, $funcname, $templater) = @_;
+
+ my $groupid = $templater->perform($acts, $arg, 'id')
+ or return;
+
+ return exists $members->{$groupid};
+}
+
+sub iter_get_gperms {
+ my ($cfg) = @_;
+
+ require BSE::Permissions;
+ my $perms = BSE::Permissions->new($cfg);
+
+ return $perms->global_perms;
+}
+
+sub tag_if_gperm_set {
+ my ($obj, $arg, $acts, $funcname, $templater) = @_;
+
+ my $id = $templater->perform($acts, $arg, 'id');
+ $id =~ /\d/
+ or return;
+
+ return unless $id < length($obj->{perm_map});
+
+ substr($obj->{perm_map}, $id, 1);
+}
+
+sub showuser_tags {
+ my ($class, $req, $user, $msg) = @_;
+
+ my %members = map { $_->{group_id} => 1 }
+ BSE::DB->query(userGroups=>$user->{id});
+ return
+ (
+ $class->common_tags($req, $msg),
+ user => [ \&hash_tag, $user ],
+ ifMemberof => [ \&tag_if_user_member_of, \%members ],
+ DevHelp::Tags->make_iterator2
+ ([ \&iter_get_gperms, $req->cfg ], 'gperm', 'gperms' ),
+ ifGperm_set =>
+ [ \&tag_if_gperm_set, $user ],
+ );
}
sub req_showuser {
my $cgi = $req->cgi;
my $userid = $cgi->param('userid');
$userid
- or return $class->req_users($req, $msg, 'No userid supplied');
+ or return $class->req_users($req, 'No userid supplied');
require BSE::TB::AdminUsers;
my $user = BSE::TB::AdminUsers->getByPkey($userid)
- or return $class->req_users($req, $msg, "User id $userid not found");
+ or return $class->req_users($req, "User id $userid not found");
my %acts;
%acts =
(
- $class->common_tags($req, $msg),
- user => [ \&hash_tag, $user ],
+ $class->showuser_tags($req, $user, $msg),
);
- return BSE::Template->get_response('admin/showuser', $req->cfg, \%acts);
+
+ my $template = 'admin/showuser';
+ my $t = $cgi->param('_t');
+ $template .= "_$t" if $t && $t =~ /^\w+$/;
+
+ return BSE::Template->get_response($template, $req->cfg, \%acts);
}
-sub req_showgroup {
+sub iter_get_kids {
+ my ($article) = @_;
+
+ require Articles;
+ return sort { $b->{displayOrder} <=> $a->{displayOrder} }
+ Articles->children($article->{id});
+}
+
+sub iter_get_aperms {
+ my ($perms) = @_;
+
+ return $perms->article_perms;
+}
+
+sub tag_if_aperm_set {
+ my ($perm, $arg, $acts, $funcname, $templater) = @_;
+
+ return unless $perm;
+
+ my $id = $templater->perform($acts, $arg, 'id');
+ $id =~ /\d/
+ or return '';
+
+ return '' unless $id < length($perm->{perm_map});
+
+ substr($perm->{perm_map}, $id, 1);
+}
+
+sub article_tags {
+ my ($class, $req, $user, $article) = @_;
+
+ my @children;
+ my $child_index;
+ my $parent;
+ if ($article->{id} != -1) {
+ if ($article->{parentid} != -1) {
+ $parent = $article->parent;
+ }
+ else {
+ $parent =
+ {
+ id=>-1,
+ title=>'Your site',
+ };
+ }
+ }
+ require BSE::Permissions;
+ my $perms = BSE::Permissions->new($req->cfg);
+ my $perm = $perms->get_article_perm($article->{id}, $user);
+ return
+ (
+ article => [ \&hash_tag, $article ],
+ DevHelp::Tags->make_iterator2
+ ([ \&iter_get_kids, $article ], 'child', 'children',
+ \@children, \$child_index),
+ ifParent => !!$parent,
+ parent => [ \&hash_tag, $parent ],
+ DevHelp::Tags->make_iterator2
+ ([ \&iter_get_aperms, $perms ], 'aperm', 'aperms' ),
+ ifAperm_set =>
+ [ \&tag_if_aperm_set, $perm ],
+ );
+}
+
+sub get_article {
+ my ($self, $id) = @_;
+
+ if ($id eq '-1') {
+ return
+ {
+ id=>-1,
+ title=>'Your site',
+ };
+ }
+ else {
+ require Articles;
+ return Articles->getByPkey($id);
+ }
+}
+
+sub req_showuserart {
+ my ($class, $req, $msg) = @_;
+
+ my $cgi = $req->cgi;
+ my $userid = $cgi->param('userid');
+ $userid
+ or return $class->req_users($req, 'No userid supplied');
+ require BSE::TB::AdminUsers;
+ my $user = BSE::TB::AdminUsers->getByPkey($userid)
+ or return $class->req_users($req, "User id $userid not found");
+ my $artid = $cgi->param('id');
+ $artid
+ or return $class->req_showuser($req, 'No article id supplied');
+ my $article = $class->get_article($artid)
+ or return $class->req_showuser($req, 'No such article');
+
+ my %acts;
+ %acts =
+ (
+ $class->showuser_tags($req, $user, $msg),
+ $class->article_tags($req, $user, $article),
+ );
+
+ my $template = 'admin/showuserart';
+ my $t = $cgi->param('_t');
+ $template .= "_$t" if $t && $t =~ /^\w+$/;
+
+ return BSE::Template->get_response($template, $req->cfg, \%acts);
+}
+
+sub req_showgroupart {
my ($class, $req, $msg) = @_;
my $cgi = $req->cgi;
my $groupid = $cgi->param('groupid');
$groupid
- or return $class->req_groups($req, $msg, 'No groupid supplied');
+ or return $class->req_groups($req, 'No groupid supplied');
require BSE::TB::AdminGroups;
my $group = BSE::TB::AdminGroups->getByPkey($groupid)
- or return $class->req_groups($req, $msg, "Group id $groupid not found");
+ or return $class->req_groups($req, "Group id $groupid not found");
+ my $artid = $cgi->param('id');
+ $artid
+ or return $class->req_showgroup($req, 'No article id supplied');
+ my $article = $class->get_article($artid)
+ or return $class->req_showgroup($req, 'No such article');
+
my %acts;
%acts =
+ (
+ $class->showgroup_tags($req, $group, $msg),
+ $class->article_tags($req, $group, $article),
+ );
+
+ my $template = 'admin/showgroupart';
+ my $t = $cgi->param('_t');
+ $template .= "_$t" if $t && $t =~ /^\w+$/;
+
+ return BSE::Template->get_response($template, $req->cfg, \%acts);
+}
+
+sub req_showobjectart {
+ my ($class, $req) = @_;
+
+ my $cgi = $req->cgi;
+ my $adminid = $cgi->param('adminid');
+ $adminid && $adminid =~ /^\d+$/
+ or return $class->req_users($req, 'No adminid supplied');
+ require BSE::TB::AdminBases;
+ my $base = BSE::TB::AdminBases->getByPkey($adminid)
+ or return $class->req_users($req, 'Unknown adminid');
+ my $artid = $cgi->param('id');
+ $artid
+ or return $class->req_users($req, 'No article id supplied');
+ my $article = $class->get_article($artid)
+ or return $class->req_users($req, 'No such article');
+
+ if ($base->{type} eq 'u') {
+ return $class->refresh($req, a_showuserart =>
+ userid=>$adminid,
+ id=>$artid);
+ }
+ else {
+ return $class->refresh($req, a_showgroupart =>
+ groupid=>$adminid,
+ id=>$artid);
+ }
+}
+
+sub tag_if_member_of_group {
+ my ($members, $arg, $acts, $funcname, $templater) = @_;
+
+ my $userid = $templater->perform($acts, $arg, 'id')
+ or return;
+
+ return exists $members->{$userid};
+}
+
+sub showgroup_tags {
+ my ($class, $req, $group, $msg) = @_;
+
+ my %members = map { $_->{user_id} => 1 }
+ BSE::DB->query(groupUsers=>$group->{id});
+ return
(
$class->common_tags($req, $msg),
group => [ \&hash_tag, $group ],
+ ifMemberof => [ \&tag_if_member_of_group, \%members ],
+ DevHelp::Tags->make_iterator2
+ ([ \&iter_get_gperms, $req->cfg ], 'gperm', 'gperms' ),
+ ifGperm_set =>
+ [ \&tag_if_gperm_set, $group ],
+ );
+}
+
+sub req_showgroup {
+ my ($class, $req, $msg) = @_;
+
+ my $cgi = $req->cgi;
+ my $groupid = $cgi->param('groupid');
+ $groupid
+ or return $class->req_groups($req, 'No groupid supplied');
+ require BSE::TB::AdminGroups;
+ my $group = BSE::TB::AdminGroups->getByPkey($groupid)
+ or return $class->req_groups($req, "Group id $groupid not found");
+ my %acts;
+ %acts =
+ (
+ $class->showgroup_tags($req, $group, $msg),
);
- return BSE::Template->get_response('admin/showgroup', $req->cfg, \%acts);
+
+ my $template = 'admin/showgroup';
+ my $t = $cgi->param('_t');
+ $template .= "_$t" if $t && $t =~ /^\w+$/;
+
+ return BSE::Template->get_response($template, $req->cfg, \%acts);
+}
+
+sub req_saveuser {
+ my ($class, $req) = @_;
+
+ my $cgi = $req->cgi;
+ my $userid = $cgi->param('userid');
+ $userid
+ or return $class->req_users($req, 'No userid supplied');
+ require BSE::TB::AdminUsers;
+ my $user = BSE::TB::AdminUsers->getByPkey($userid)
+ or return $class->req_users($req, "User id $userid not found");
+ my $name = $cgi->param('name');
+ my $password = $cgi->param('password');
+ my $confirm = $cgi->param('confirm');
+ $user->{name} = $name if defined $name and length $name;
+ if (defined $password && defined $confirm
+ && length $password) {
+ length $confirm
+ or return $class->req_showuser($req, "Enter both password and confirmation to change password");
+ $password eq $confirm
+ or return $class->req_showuser($req, "Password and confirmation password don't match");
+ $user->{password} = $password;
+ }
+ if ($cgi->param('savegperms')) {
+ my $perms = '';
+ my @gperms = $cgi->param('gperms');
+ for my $id (@gperms) {
+ if (length($perms) < $id) {
+ $perms .= '0' x ($id - length $perms);
+ }
+ substr($perms, $id, 1) = '1';
+ }
+ $user->{perm_map} = $perms;
+ }
+ $user->save;
+
+ if ($cgi->param('savegroups')) {
+ require BSE::TB::AdminGroups;
+ require BSE::TB::AdminUsers;
+ my @group_ids = map $_->{id}, BSE::TB::AdminGroups->all;
+ my %want_groups = map { $_ => 1 } $cgi->param('groups');
+ my %current_groups = map { $_->{group_id} => 1 }
+ BSE::DB->query(userGroups=>$user->{id});
+
+ for my $group_id (@group_ids) {
+ if ($want_groups{$group_id} && !$current_groups{$group_id}) {
+ BSE::DB->run(addUserToGroup=>$user->{id}, $group_id);
+ }
+ elsif (!$want_groups{$group_id} && $current_groups{$group_id}) {
+ BSE::DB->run(delUserFromGroup=>$user->{id}, $group_id);
+ }
+ }
+ }
+
+ return $class->refresh($req, a_showuser => userid => $user->{id},
+ 'm' => 'User saved');
+}
+
+sub req_saveuserart {
+ my ($class, $req) = @_;
+
+ my $cgi = $req->cgi;
+ my $userid = $cgi->param('userid');
+ $userid
+ or return $class->req_users($req, 'No userid supplied');
+ require BSE::TB::AdminUsers;
+ my $user = BSE::TB::AdminUsers->getByPkey($userid)
+ or return $class->req_users($req, "User id $userid not found");
+ my $artid = $cgi->param('id');
+ $artid
+ or return $class->req_showuser($req, 'No article id supplied');
+ my $article = $class->get_article($artid)
+ or return $class->req_showuser($req, 'No such article');
+
+ require BSE::Permissions;
+ my $perms = BSE::Permissions->new($req->cfg);
+ my $perm_map = '';
+ my @aperms = $cgi->param('aperms');
+ for my $id (@aperms) {
+ if (length($perm_map) < $id) {
+ $perm_map .= '0' x ($id - length $perm_map);
+ }
+ substr($perm_map, $id, 1) = '1';
+ }
+
+ $perms->set_article_perm($artid, $user, $perm_map);
+
+ return $class->refresh($req, a_showuserart => userid => $user->{id},
+ id=>$artid, 'm' => 'Permissions saved');
+}
+
+sub req_savegroup {
+ my ($class, $req, $msg) = @_;
+
+ my $cgi = $req->cgi;
+ my $groupid = $cgi->param('groupid');
+ $groupid
+ or return $class->req_groups($req, 'No groupid supplied');
+ require BSE::TB::AdminGroups;
+ my $group = BSE::TB::AdminGroups->getByPkey($groupid)
+ or return $class->req_groups($req, "Group id $groupid not found");
+ my $description = $cgi->param('description');
+ $group->{description} = $description if defined $description;
+
+ if ($cgi->param('savegperms')) {
+ my $perms = '';
+ my @gperms = $cgi->param('gperms');
+ for my $id (@gperms) {
+ if (length($perms) < $id) {
+ $perms .= '0' x ($id - length $perms);
+ }
+ substr($perms, $id, 1) = '1';
+ }
+ $group->{perm_map} = $perms;
+ }
+ $group->save;
+
+ require BSE::TB::AdminGroups;
+ require BSE::TB::AdminUsers;
+ my @member_ids = map $_->{id}, BSE::TB::AdminUsers->all;
+ my %want_users = map { $_ => 1 } $cgi->param('users');
+ my %current_users = map { $_->{user_id} => 1 }
+ BSE::DB->query(groupUsers=>$group->{id});
+
+ for my $user_id (@member_ids) {
+ if ($want_users{$user_id} && !$current_users{$user_id}) {
+ BSE::DB->run(addUserToGroup=>$user_id, $group->{id});
+ }
+ elsif (!$want_users{$user_id} && $current_users{$user_id}) {
+ BSE::DB->run(delUserFromGroup=>$user_id, $group->{id});
+ }
+ }
+
+ return $class->refresh($req, a_showgroup => groupid => $group->{id},
+ 'm' => 'Group saved');
+}
+
+sub req_savegroupart {
+ my ($class, $req) = @_;
+
+ my $cgi = $req->cgi;
+ my $userid = $cgi->param('userid');
+ my $groupid = $cgi->param('groupid');
+ $groupid
+ or return $class->req_groups($req, 'No groupid supplied');
+ require BSE::TB::AdminGroups;
+ my $group = BSE::TB::AdminGroups->getByPkey($groupid)
+ or return $class->req_groups($req, "Group id $groupid not found");
+ my $artid = $cgi->param('id');
+ $artid
+ or return $class->req_showuser($req, 'No article id supplied');
+ my $article = $class->get_article($artid)
+ or return $class->req_showuser($req, 'No such article');
+
+ require BSE::Permissions;
+ my $perms = BSE::Permissions->new($req->cfg);
+ my $perm_map = '';
+ my @aperms = $cgi->param('aperms');
+ for my $id (@aperms) {
+ if (length($perm_map) < $id) {
+ $perm_map .= '0' x ($id - length $perm_map);
+ }
+ substr($perm_map, $id, 1) = '1';
+ }
+
+ $perms->set_article_perm($artid, $group, $perm_map);
+
+ return $class->refresh($req, a_showgroupart => groupid => $group->{id},
+ id=>$artid, 'm' => 'Permissions saved');
+}
+
+sub req_deluser {
+ my ($class, $req) = @_;
+
+ my $cgi = $req->cgi;
+ my $userid = $cgi->param('userid');
+ $userid
+ or return $class->req_users($req, 'No userid supplied');
+ require BSE::TB::AdminUsers;
+ my $user = BSE::TB::AdminUsers->getByPkey($userid)
+ or return $class->req_users($req, "User id $userid not found");
+
+ my $logon = $user->{logon};
+ $user->remove;
+
+ return $class->refresh($req, a_users =>
+ 'm' => "User '$logon' deleted");
+}
+
+sub req_delgroup {
+ my ($class, $req, $msg) = @_;
+
+ my $cgi = $req->cgi;
+ my $groupid = $cgi->param('groupid');
+ $groupid
+ or return $class->req_groups($req, 'No groupid supplied');
+ require BSE::TB::AdminGroups;
+ my $group = BSE::TB::AdminGroups->getByPkey($groupid)
+ or return $class->req_groups($req, "Group id $groupid not found");
+
+ my $name = $group->{name};
+ $group->remove;
+
+ return $class->refresh($req, a_groups =>
+ 'm' => "Group '$name' deleted");
}
1;
require 5.005;
use strict;
use Carp qw(croak);
+use Carp qw/confess/;
use vars qw($VERSION);
$VERSION = '1.00';
return @results;
}
+sub run {
+ my ($self, $name, @args) = @_;
+
+ $self = BSE::DB->single unless ref $self;
+
+ my $sth = $self->stmt($name);
+
+ $sth->execute(@args)
+ or confess "Cannot execute statement $name: ",$sth->errstr;
+}
+
+
1;
__END__
Orders => 'select * from orders',
getOrderByPkey => 'select * from orders where id = ?',
getOrderItemByOrderId => 'select * from order_item where orderId = ?',
- addOrder => 'insert orders values(null,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)',
- replaceOrder => 'replace orders values(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)',
+ addOrder => 'insert orders values(null,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)',
+ replaceOrder => 'replace orders values(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)',
addOrderItem => 'insert order_item values(null,?,?,?,?,?,?,?)',
getOrderByUserId => 'select * from orders where userId = ?',
'select * from email_requests where genEmail = ?',
addAdminBase => 'insert into admin_base values(null, ?)',
+ replaceAdminBase => 'replace into admin_base values(?, ?)',
+ deleteAdminBase => 'delete from admin_base where id = ?',
+ getAdminBaseByPkey => 'select * from admin_base where id=?',
AdminUsers => <<SQL,
select bs.*, us.* from admin_base bs, admin_users us
where bs.id = us.base_id and bs.id = ?
SQL
addAdminUser => 'insert into admin_users values(?,?,?,?,?)',
+ replaceAdminUser => 'replace into admin_users values(?,?,?,?,?)',
+ deleteAdminUser => 'delete from admin_users where base_id = ?',
adminUsersGroups => <<SQL,
select bs.*, gr.*
from admin_base bs, admin_groups gr, admin_membership am
where bs.id = gr.base_id && am.user_id = ? and am.group_id = bs.id
order by gr.name
SQL
+ userGroups => 'select * from admin_membership where user_id = ?',
+ deleteUserGroups => 'delete from admin_membership where user_id = ?',
AdminGroups => <<SQL,
select bs.*, gr.*
where bs.id = gr.base_id and bs.id = ?
SQL
addAdminGroup => 'insert into admin_groups values(?,?,?,?)',
+ replaceAdminGroup => 'replace into admin_groups values(?,?,?,?)',
+ deleteAdminGroup => 'delete from admin_groups where base_id = ?',
+ groupUsers => 'select * from admin_membership where group_id = ?',
+
+ addUserToGroup => 'insert into admin_membership values(?,?)',
+ delUserFromGroup => <<SQL,
+delete from admin_membership where user_id = ? and group_id = ?
+SQL
+ deleteGroupUsers => 'delete from admin_membership where group_id = ?',
+
+ articleObjectPerm => <<SQL,
+select * from admin_perms where object_id = ? and admin_id = ?
+SQL
+ addArticleObjectPerm => 'insert into admin_perms values(?,?,?)',
+ replaceArticleObjectPerm => 'replace into admin_perms values(?,?,?)',
);
sub _single
return qq!<img src="$images_uri/admin/error.gif" alt="$encoded" title="$encoded" border="0" align="top">!;
}
+sub iter_admin_users {
+ require BSE::TB::AdminUsers;
+
+ BSE::TB::AdminUsers->all;
+}
+
+sub iter_admin_groups {
+ require BSE::TB::AdminGroups;
+
+ BSE::TB::AdminGroups->all;
+}
+
sub low_edit_tags {
my ($self, $acts, $request, $article, $articles, $msg, $errors) = @_;
DevHelp::Tags->make_iterator2
([ \&iter_files, $article ], 'file', 'files', \@files, \$file_index ),
movefiles => [ \&tag_movefiles, $self, $article, \@files, \$file_index ],
+ DevHelp::Tags->make_iterator2
+ (\&iter_admin_users, 'iadminuser', 'adminusers'),
+ DevHelp::Tags->make_iterator2
+ (\&iter_admin_groups, 'iadmingroup', 'admingroups'),
edit => \&tag_edit_link,
error => [ \&tag_hash, $errors ],
error_img => [ \&tag_error_img, $self, $errors ],
--- /dev/null
+package BSE::Permissions;
+use strict;
+
+sub new {
+ my ($class, $cfg) = @_;
+
+ # load global permissions
+ my @gobjs;
+ my %gobjs;
+ my %gvalues = $cfg->entries('global permissions');
+ my $maxgid = 0;
+ for my $name (keys %gvalues) {
+ my $id = $gvalues{$name};
+ if ($id > 250) {
+ print STDERR "permission id for $name out of range\n";
+ next;
+ }
+ $id > $maxgid and $maxgid = $id;
+ my %obj = ( name => $name, id => $id );
+ my $section = "permission $name";
+ $obj{help} = $cfg->entry($section, 'help', '');
+ $obj{descendants} = $cfg->entry($section, 'descendants', 0);
+ $obj{brief} = $cfg->entry($section, 'brief', $name);
+ $obj{permissions} = $cfg->entry($section, 'permissions')
+ or next; # ignore it
+ $obj{articles} = $cfg->entry($section, 'articles')
+ or next;
+ $obj{perminfo} = _make_perm_info($obj{permissions});
+ $obj{artinfo} = _make_art_info($obj{permissions});
+
+ push @gobjs, \%obj;
+ $gobjs{$name} = \%obj;
+ }
+
+ # load article permissions
+ my @aobjs;
+ my %aobjs;
+ my %avalues = $cfg->entries('article permissions');
+ my $maxaid = 0;
+ for my $name (keys %avalues) {
+ my $id = $avalues{$name};
+ if ($id > 250) {
+ print STDERR "permission id for $name out of range\n";
+ next;
+ }
+ $id > $maxaid and $maxaid = $id;
+ my %obj = ( name => $name, id => $id );
+ my $section = "permission $name";
+ $obj{help} = $cfg->entry($section, 'help', '');
+ $obj{descendants} = $cfg->entry($section, 'descendants', 0);
+ $obj{brief} = $cfg->entry($section, 'brief', $name);
+ $obj{permissions} = $cfg->entry($section, 'permissions')
+ or next; # ignore it
+ $obj{perminfo} = _make_perm_info($obj{permissions});
+
+ push @aobjs, \%obj;
+ $aobjs{$name} = \%obj;
+ }
+
+ return bless {
+ gobj_array => \@gobjs,
+ gobj_hash => \%gobjs,
+ max_gid => $maxgid,
+ aobj_array => \@aobjs,
+ aobj_hash => \%aobjs,
+ max_aid => $maxaid,
+ cfg => $cfg,
+ }, $class;
+}
+
+sub global_perms {
+ my ($self) = @_;
+
+ return @{$self->{gobj_array}};
+}
+
+sub max_global_perm_id {
+ my ($self) = @_;
+
+ return $self->{max_gid};
+}
+
+sub article_perms {
+ my ($self) = @_;
+
+ return @{$self->{aobj_array}};
+}
+
+sub max_article_perm_id {
+ my ($self) = @_;
+
+ return $self->{max_aid};
+}
+
+sub get_article_perm {
+ my ($self, $artid, $object) = @_;
+
+ my ($result) = BSE::DB->query(articleObjectPerm => $artid, $object->{id});
+
+ return $result;
+}
+
+sub set_article_perm {
+ my ($self, $artid, $object, $perm_map) = @_;
+
+ my $perm = $self->get_article_perm($artid, $object);
+ if ($perm) {
+ BSE::DB->run(replaceArticleObjectPerm =>$artid, $object->{id},
+ $perm_map);
+ }
+ else {
+ BSE::DB->run(addArticleObjectPerm =>$artid, $object->{id}, $perm_map);
+ }
+}
+
+sub can_user {
+ my ($self, $user, $article, @actions) = @_;
+
+
+}
+
+sub _make_perm_info {
+ my ($perm) = @_;
+
+ my $not = $perm =~ s/^!//;
+ my @tests = split /,/, $perm;
+ my @res;
+ for my $test (@tests) {
+ (my $re = $test) =~ s/\*/.*/;
+ $re = "^$re\$";
+ eval {
+ $re = qr/$re/;
+ };
+ if ($@) {
+ print STDERR "Bad permission test '$test'\n";
+ }
+ else {
+ push @res, $re;
+ }
+ }
+
+ return { not=>$not, res=>\@res };
+}
+
+sub _make_art_info {
+ my ($art) = @_;
+
+ my $not = $art =~ s/^!//;
+ my @tests = split /,/, $art;
+ my @arts;
+ for my $test (@tests) {
+ if ($test =~ /^(?:\d+|-1|[a-z]\w+)$/) {
+ push @arts, { type=>'exact', article=>$test };
+ }
+ elsif ($test =~ /^childof\((\d+|-1|[a-z]\w+)\)$/) {
+ push @arts, { type=>'childof', article=>$1 };
+ }
+ elsif ($test =~ /^typeof\((\w+)\)$/) {
+ push @arts, { type=>'typeof', name=>$1 };
+ }
+ else {
+ print STDERR "Unrecognized article match '$test'\n";
+ }
+ }
+
+ return { not=>$not, arts=>\@arts };
+}
+
+1;
my $content;
push(@headers, "MIME-Version: 1.0");
if ($html) {
- my $boundary = time . "=_=" .int(rand(10000))."=";
+ $html =~ tr/\cM/\cJ/;
+ my $boundary = "====" . time . "=_=" .int(rand(10000))."=";
push(@headers, qq!Content-Type: multipart/alternative; boundary="$boundary"!);
$content = "This is a multi-part message in MIME format\n\n"
. "--$boundary\n"
return { base_id=>{ class=>'BSE::TB::AdminBase' } };
}
+sub remove {
+ my ($self) = @_;
+
+ BSE::DB->run(deleteGroupUsers => $self->{id});
+
+ $self->SUPER::remove();
+}
+
1;
return { base_id=>{ class=>'BSE::TB::AdminBase' } };
}
+sub remove {
+ my ($self) = @_;
+
+ BSE::DB->run(deleteUserGroups => $self->{id});
+
+ $self->SUPER::remove();
+}
+
1;
+
ifEq =>
sub {
my ($arg, $acts, $name, $templater) = @_;
- (my ($left, $right) = DevHelp::Tags->get_parms($arg, $acts, $templater)) == 2
- or die; # leaves if in place
+ my @args = DevHelp::Tags->get_parms($arg, $acts, $templater);
+ @args == 2
+ or die "wrong number of args (@args)";
#print STDERR "ifEq >$left< >$right<\n";
- $left eq $right;
+ $args[0] eq $args[1];
},
ifMatch =>
sub {
total wholesaleTotal gst orderDate
ccNumberHash ccName ccExpiryHash ccType
filled whenFilled whoFilled paidFor paymentReceipt
- randomId cancelled userId/;
+ randomId cancelled userId paymentType
+ customInt1 customInt2 customInt3 customInt4 customInt5
+ customStr1 customStr2 customStr3 customStr4 customStr5/;
}
1;
package Squirrel::Template;
use vars qw($VERSION);
use strict;
-use Carp;
+use Carp qw/cluck confess/;
$VERSION="0.05";
return bless \%opts, $class;
}
-sub perform {
+sub low_perform {
my ($self, $acts, $func, $args, $orig) = @_;
- $args = '' unless defined $args;
-
- #print STDERR "perform $func $args\n";
my $fmt;
if ($acts->{_format} && $args =~ s/\|(\S+)\s*$//) {
$fmt = $1;
}
+ $args = '' unless defined $args;
if (exists $acts->{$func}) {
- $args = '' unless defined $args;
$args =~ s/^\s+|\s+$//g;
my $value;
my $action = $acts->{$func};
else {
$value = $action;
}
- unless (defined $value) {
- use Carp 'cluck';
- cluck "** undefined value returned by $func $args tag";
- }
+ return unless defined $value;
return $fmt ? $acts->{_format}->($value, $fmt) : $value;
}
for my $match (keys %$acts) {
if ($func =~ /$re/) {
$args =~ s/^\s+|\s+$//g;
my $value = $acts->{$match}->($func, $args);
- defined $value
- or return "** function $func $args returned undef **";
- return $fmt ? $acts->{_format}->($value, $fmt) : $value;
+ #defined $value
+ # or return "** function $func $args returned undef **";
+ if (defined($value) && $fmt) {
+ $value = $acts->{_format}->($value, $fmt);
+ }
+ return $value;
}
}
}
}
# otherwise fall through
}
+
return $self->{verbose} ? "** unknown function $func **" : $orig;
}
+sub perform {
+ my ($self, $acts, $func, $args, $orig) = @_;
+
+ $args = '' unless defined $args;
+
+ #print STDERR "perform $func $args\n";
+ my $value = $self->low_perform($acts, $func, $args, $orig);
+
+ unless (defined $value) {
+ cluck "** undefined value returned by $func $args **";
+ }
+
+ return $value;
+}
+
sub iterate {
my ($self, $name, $args, $input, $sep, $acts, $orig) = @_;
my $result =
eval {
if (exists $acts->{"if$name"}) {
- my $cond = $self->perform($acts, "if$name", $args, '');
+ my $cond = $self->low_perform($acts, "if$name", $args, '');
return $cond ? $true : $false;
}
elsif (exists $acts->{lcfirst $name}) {
- my $cond = $self->perform($acts, lcfirst $name, $args, '');
+ my $cond = $self->low_perform($acts, lcfirst $name, $args, '');
return $cond ? $true : $false;
}
else {
#!/usr/bin/perl -w
+# -d:ptkdb
+BEGIN { $ENV{DISPLAY} = '192.168.32.15:0.0' }
use strict;
use FindBin;
use lib "$FindBin::Bin/modules";
my $toName = $SHOP_TO_NAME;
my $toEmail= $SHOP_TO_EMAIL;
+use constant PAYMENT_CC => 0;
+use constant PAYMENT_CHEQUE => 1;
+use constant PAYMENT_CALLME => 2;
+my %valid_payment_types =
+ (
+ PAYMENT_CC() =>1,
+ PAYMENT_CHEQUE() =>1,
+ PAYMENT_CALLME() =>1
+ );
+my %payment_names = qw(CC 0 Cheque 1 CallMe 2);
+
my $cfg = BSE::Cfg->new();
my $urlbase = $cfg->entryVar('site', 'url');
my $securlbase = $cfg->entryVar('site', 'secureurl');
my %custom_state = %{$session{custom}};
BSE::Custom->enter_cart(\@cart, \@cart_prods, \%custom_state);
+ my @payment_types = split /,/, $cfg->entry('shop', 'payment_types', '0');
+ @payment_types = grep $valid_payment_types{$_}, @payment_types;
+ @payment_types or @payment_types = ( 0 );
+ @payment_types = sort { $a <=> $b } @payment_types;
+ my %payment_types = map { $_=> 1 } @payment_types;
my $item_index = -1;
my @options;
old => sub { CGI::escapeHTML($olddata ? param($_[0]) :
$user && defined $user->{$_[0]} ? $user->{$_[0]} : '') },
BSE::Custom->checkout_actions(\%acts, \@cart, \@cart_prods, \%custom_state, $CGI::Q),
+ ifMultPaymentTypes => @payment_types > 1,
);
+ for my $name (keys %payment_names) {
+ my $id = $payment_names{$name};
+ $acts{"if${name}Payments"} = exists $payment_types{$id};
+ $acts{"if${name}FirstPayment"} = $payment_types[0] == $id;
+ $acts{"checkedIfFirst$name"} = $payment_types[0] == $id ? "checked " : "";
+ }
$session{custom} = \%custom_state;
page('checkout.tmpl', \%acts);
sub purchase {
# some basic validation, in case the user switched off javascript
my @required =
- (BSE::Custom->required_fields($CGI::Q, $session{custom}),
- qw(cardHolder cardExpiry) );
+ BSE::Custom->required_fields($CGI::Q, $session{custom});
+
+ my @payment_types = split /,/, $cfg->entry('shop', 'payment_types', '0');
+ @payment_types = grep $valid_payment_types{$_}, @payment_types;
+ @payment_types or @payment_types = ( 0 );
+ @payment_types = sort { $a <=> $b } @payment_types;
+ my %payment_types = map { $_=> 1 } @payment_types;
+
+ my $paymentType = param('paymentType');
+ defined $paymentType or $paymentType = $payment_types[0];
+ $payment_types{$paymentType}
+ or return checkout("Invalid payment type");
+
+ push @required, qw(cardHolder cardExpiry)
+ if $paymentType == PAYMENT_CC;
+
for my $field (@required) {
defined(param($field)) && length(param($field))
or return checkout("Field $field is required", 1);
}
defined(param('email')) && param('email') =~ /.\@./
or return checkout("Please enter a valid email address", 1);
- defined(param('cardNumber')) && param('cardNumber') =~ /^\d+$/
- or return checkout("Please enter a credit card number", 1);
+ if ($paymentType == PAYMENT_CC) {
+ defined(param('cardNumber')) && param('cardNumber') =~ /^\d+$/
+ or return checkout("Please enter a credit card number", 1);
+ }
use Orders;
use Order;
}
my $ccNumber = param('cardNumber');
+ defined $ccNumber or $ccNumber = '';
my $ccExpiry = param('cardExpiry');
+ defined $ccExpiry or $ccExpiry = '';
use Digest::MD5 'md5_hex';
$ccNumber =~ tr/0-9//cd;
$order{orderDate} = $today;
$order{total} += BSE::Custom->total_extras(\@cart, \@products,
$session{custom});
+ $order{paymentType} = $paymentType;
++$session{changed};
# blank anything else
ifOptions => sub { @options },
options => sub { nice_options(@options) },
);
+ for my $name (keys %payment_names) {
+ my $id = $payment_names{$name};
+ $acts{"if${name}Payment"} = $order->{paymentType} == $id;
+ }
send_order($order, \@items, \@products);
$session{cart} = []; # empty the cart
page('checkoutfinal.tmpl', \%acts);
my $item_index = -1;
my @options;
my $option_index;
+ require BSE::Util::Tags;
my %acts;
%acts =
(
%extras,
+ BSE::Util::Tags->static(\%acts, $cfg),
iterate_items_reset => sub { $item_index = -1; },
iterate_items =>
sub {
"Full Access" on all descendants of article -1.
+=head1 MACRO STORAGE
+
+To simplify processing we have two sections in the config file:
+
+=over
+
+=item *
+
+[Global permissions] - keeps permissions that have all article
+references resolved
+
+=item *
+
+[Article permissions] - permissions which have to reference an article
+
+=back
+
+The [permission ids] section is used to translate permission indexes to
+permission ids.
+
+The [permission names] section is used to translate permission indexes
+to descriptive permission names.
+
+=cut
+
=head1 CHANGES
+=head2 0.12_09
+
+=over
+
+=item *
+
+ability to control permissions each admin user and group has access to
+
+=item *
+
+new help for image manager, other updated help files, many template
+changes, thanks to Adrian.
+
+=item *
+
+deleting admin users and groups
+
+=item *
+
+selectable payment types
+
+=item *
+
+when sending a subscription with HTML content, the boundary between
+MIME parts has been changed to hopefully prevent problems with some
+mail clients
+
+=item *
+
+when sending a subscription with HTML content, any carriage-returns
+are converted into linefeed to hopefully prevent problems when sending
+subscriptions based on Macintosh format files to some mail clients.
+
+=item *
+
+htmlemail/basic.tmpl now includes a DOCTYPE, which will hopefully
+prevent problems with some mail clients.
+
+=item *
+
+conditionals are now handled differently in the templating system to
+avoid some of the undefined value warnings it was producing.
+
+=item *
+
+added fields intended for custom processing to the orders table
+
+=back
+
=head2 0.12_08
This is a development release. If you want stable try 0.12_01, since
whether or not for sale files are attached to products in the cart.
Default: False.
+=item payment_types
+
+A comma-separated list of acceptable payment types. Default: 0
+
+The possible payment types are:
+
+=over
+
+=item *
+
+0 - the user enters a credit card number, name and expiry date
+
+=item *
+
+1 - the customer will send a cheque
+
+=item *
+
+2 - contact customer for details
+
+=back
+
+=item address1
+
+=item address2
+
+=item address3
+
+These are used by various shop templates to present an address that a
+cheque payment should be sent to.
+
=back
=head2 [fields]
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01
+Transitional//EN">
<html>
<head>
- <title>Catalog Editor - BSE</title>
+ <title>Catalog Editor -
+BSE</title>
<link rel="stylesheet" href="/css/admin.css">
- </head>
+
+</head>
<body>
<h1>Catalog Editor</h1>
<div>
- <h2><a name="section">Parent</h2>
+ <h2><a
+name="section">Parent</h2>
- <p>The parent this article will be placed under..</p>
+ <p>The parent this article will be
+placed under..</p>
</div>
<div>
- <h2><a name="title">Catalog title</h2>
+ <h2><a name="title">Catalog
+title</h2>
<p>The title of the catalog.</p>
</div>
<div>
-<h2><a name="template">Template</h2>
+<h2><a
+name="template">Template</h2>
- <p>The template used to present this catalog.</p>
+ <p>The template used to present this
+catalog.</p>
</div>
<div>
<h2><a name="body">Body</h2>
- <p>The content of your catalog. There are a number of <a
-href="body.html">tags</a> you can use to markup your article text.</p>
+ <p>The
+content of your catalog. There are a number of
+<a
+href="body.html">tags</a> you can use to markup your article
+text.</p>
</div>
<div>
<h2><a name="release">Release date</h2>
- <p>The date that your catalog is released to the world. Your article will only
- appear in menus after this date and before the expiry date. If you don't enter
- a release date it will default to the current date.</p> <p><b>Note</b>: Unreleased catalogs can be accessed via a direct URL to the
+
+<p>The date that your catalog is released to the world. Your article
+will only
+ appear in menus after this date and before the expiry
+date. If you don't enter
+ a release date it will default to the
+current date.</p> <p><b>Note</b>: Unreleased catalogs can be
+accessed via a direct URL to the
catalog.</p>
</div>
<div>
- <h2><a name="expire">Expiry date</h2>
+
+<h2><a name="expire">Expiry date</h2>
- <p>The date from which you don't want the catalog to appear on your site.</p>
+ <p>The date from which you
+don't want the catalog to appear on your site.</p>
- <p><b>Note:</b> Expired catalogs can be found through the search engine.</p>
+ <p><b>Note:</b>
+Expired catalogs can be found through the search
+engine.</p>
</div>
<div>
-<h2><a name="summary">Summary length</h2>
+<h2><a name="summary">Summary
+length</h2>
- <p>The length of the summary displayed for sub catalogs by the <:summary:>
+ <p>The length of the summary displayed for sub
+catalogs by the <:summary:>
tag.</p>
</div>
<div>
- <h2><a name="threshold">Display threshold</h2>
-
- <p>This is used by the <:if UnderThreshold :> conditional tag. If the
- number of sub-catalogs is less than this value the condition is true.</p>
- <p>Typically your templates will embed sub-catalogs if there are fewer than
- this number of sub-catalogs, otherwise a menu of sub-catalogs will be displayed.</p>
+
+<h2><a name="threshold">Display threshold</h2>
+
+ <p>This is used by
+the <:if UnderThreshold :> conditional tag. If the
+ number
+of sub-catalogs is less than this value the condition is true.</p>
+
+<p>Typically your templates will embed sub-catalogs if there are
+fewer than
+ this number of sub-catalogs, otherwise a menu of
+sub-catalogs will be displayed.</p>
</div>
<div>
-<h2><a name="keywords">Keywords</h2>
+<h2><a
+name="keywords">Keywords</h2>
-<p>This is a comma-separated list of extra keywords used by the search
+<p>This is a comma-separated list of
+extra keywords used by the search
engine.</p>
</div>
<div>
- <h2><a name="listed">List article</h2>
+ <h2><a
+name="listed">List article</h2>
- <p>Choose how the catalog is listed in the sidebar menus, or in lists of sub-catalogs
- in the parent.</p>
+ <p>Choose how the catalog is
+listed in the sidebar menus, or in lists of sub-catalogs
+ in the
+parent.</p>
</div>
<div>
- <h2><a name="thumb">Thumbnail image</h2>
+ <h2><a name="thumb">Thumbnail
+image</h2>
- <p>An image that can be used with the <:thumbnail:> tag to display a small
- image for the catalog in menus.</p>
+ <p>An image that can be used with the
+<:thumbnail:> tag to display a small
+ image for the catalog
+in menus.</p>
</div>
<div>
- <h2><a name="images">Uploaded images</h2>
-
- <p>Images attached to the catalog.</p>
+ <h2><a name="images">Images</h2>
+
+<div>
+ <p>Images attached to the product. This isn't available
+until the product has
+ been created.</p>
+ <p>You can modify
+the images by clicking the "Manage Images" link.</p>
+
+</div>
</div>
</body></html>
\ No newline at end of file
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01
+Transitional//EN">
<html>
<head>
- <title>Article Editor - BSE</title>
+ <title>Article Editor -
+BSE</title>
<link rel="stylesheet" href="/css/admin.css">
- </head>
+
+</head>
<body>
<h1>Article Editor</h1>
<div>
-<h2><a name="section">Section</h2>
+<h2><a
+name="section">Section</h2>
-<p>The section this article will be placed under..</p>
+<p>The section this article will be
+placed under..</p>
</div>
<div>
-<h2><a name="title">Title</h2>
+<h2><a
+name="title">Title</h2>
-<p>The title of the article.</p>
+<p>The title of the
+article.</p>
</div>
<div>
-<h2><a name="template">Template</h2>
+<h2><a
+name="template">Template</h2>
-<p>The template used to present this article.</p>
+<p>The template used to present this
+article.</p>
</div>
<div>
<h2><a name="body">Body</h2>
-<p>The content of your article. There are a number of <a
-href="body.html">tags</a> you can use to markup your article text.</p>
+<p>The
+content of your article. There are a number of
+<a
+href="body.html">tags</a> you can use to markup your article
+text.</p>
</div>
<div>
<h2><a name="release">Release date</h2>
- <p>The date that your article is released to the world. Your article will only
- appear in menus after this date and before the expiry date. If you don't enter
- a release date it will default to the current date.</p>
+
+<p>The date that your article is released to the world. Your article
+will only
+ appear in menus after this date and before the expiry
+date. If you don't enter
+ a release date it will default to the
+current date.</p>
-<p><b>Note</b>: Unreleased articles can be accessed via a direct URL to
+<p><b>Note</b>: Unreleased articles can be
+accessed via a direct URL to
the article.</p>
</div>
<div>
- <h2><a name="expire">Expire date</h2>
+ <h2><a
+name="expire">Expire date</h2>
-<p>The date from which you don't want the article to appear on your site.</p>
+<p>The date from which you don't want
+the article to appear on your site.</p>
-<p><b>Note:</b> Expired articles can be found through the search engine.</p>
+<p><b>Note:</b> Expired
+articles can be found through the search
+engine.</p>
</div>
<div>
-<h2><a name="summary">Summary length</h2>
+<h2><a name="summary">Summary
+length</h2>
-<p>The length of the summary displayed for child articles by the
+<p>The length of the summary displayed for child
+articles by the
<:summary:> tag.</p>
</div>
<div>
- <h2><a name="threshold">Display threshold</h2>
-
-<p>This is used by the <:if UnderThreshold :> conditional tag.
-If the number of children is less than this value the condition is
+ <h2><a
+name="threshold">Display threshold</h2>
+
+<p>This is used by the
+<:if UnderThreshold :> conditional tag.
+If the number of
+children is less than this value the condition
+is
true.</p>
-<p>Typically your templates will embed child articles if there are
-fewer than this number of child articles, otherwise a menu of child
+<p>Typically your templates will embed child articles
+if there are
+fewer than this number of child articles, otherwise a
+menu of child
articles will be displayed.</p>
</div>
<div>
-<h2><a name="keywords">Keywords</h2>
+<h2><a
+name="keywords">Keywords</h2>
-<p>This is a comma-separated list of extra keywords used by the search
+<p>This is a comma-separated list of
+extra keywords used by the search
engine.</p>
</div>
<div>
- <h2><a name="listed">List article</h2>
+ <h2><a
+name="listed">List article</h2>
-<p>Choose how the article is listed in the sidebar menus, or in lists
-of child articles in the parent.</p>
+<p>Choose how the article is listed
+in the sidebar menus, or in lists
+of child articles in the
+parent.</p>
</div>
<div>
- <h2><a name="thumb">Thumbnail image</h2>
+ <h2><a name="thumb">Thumbnail
+image</h2>
- <p>An image that can be used with the <:thumbnail:> tag to display a small
- image for the article in menus.</p>
+ <p>An image that can be used with the
+<:thumbnail:> tag to display a small
+ image for the article
+in menus.</p>
</div>
<div>
-<h2><a name="files">Files</h2>
-
-<p>Files attached to the article. This isn't available until the
-article has been created.</p>
+ <div>
+ <h2><a
+name="files">Files</h2>
+ <p>Files attached to the product. This
+isn't available until the product has
+ been created.</p>
+
+<p>You can modify the files by clicking the "Manage Files"
+link.</p>
+ </div>
+ <div>
+ <h2><a name="images">Images</h2>
+
+<p>Images attached to the product. This isn't available until the
+product has
+ been created.</p>
+ <p>You can modify the images
+by clicking the "Manage Images" link.</p>
+ </div>
+
+<h2> </h2>
</div>
-<div>
- <h2><a name="images">Uploaded images</h2>
-
-<p>Images attached to the article.</p>
-
-</div>
+<div></div>
</body></html>
\ No newline at end of file
--- /dev/null
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01
+Transitional//EN">
+<html>
+ <head>
+ <title>Files Wizard -
+BSE</title>
+ <link rel="stylesheet" href="/css/admin.css">
+
+</head>
+<body>
+<h1>Image Wizard</h1>
+<div>
+ <h2><a name="file">Image
+file to add</h2>
+
+ <p>Either enter the name of an image on your
+machine, or use the Browse
+button to select an image file (Usually
+with a .GIF, .JPG, .PNG file extension).</p>
+ <p>Please note that if
+you select a large image, it may take several
+minutes to upload to
+the web server unless you have a large link.
+eg. on a 56K link a 1
+megabyte file will take 4 minutes to upload,
+assuming you have a
+perfect ISP.</p>
+
+</div>
+
+<div>
+ <h2><a name="alt">Alt text for
+image</h2>
+
+ <p>Image Alt (alternate) text is only displayed when
+your browser does not display images. Setting Alt text is also
+helpful for sight impared users who use screen
+readers.</p>
+
+</div>
+<div>
+ <h2><a name="url">URL for image</h2>
+
+<p>An image can be used as a link. Input the desired URL (web
+address) in this field to make the image a clickable link to this
+URL.</p>
+
+</div>
+
+<div>
+ <h2><a name="position">First image
+position</h2>
+
+<p>This option positions the first article image,
+based on this choice BSE attempts to arrange susequent images as
+alternately staggered down the page.</p>
+
+ <p>Relying on BSE to get
+a page layout to look good with multiple images is far from ideal,
+typically you will achieve much better results if you position images
+in the article body text manually. Refer to the <a
+href="body.html">body text markup</a> and look for
+"image[<i>index</i>]".</p>
+
+</div>
+
+</body></html>
\ No newline at end of file
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01
+Transitional//EN">
<html>
<head>
- <title>Product Editor - BSE</title>
+ <title>Product Editor -
+BSE</title>
<link rel="stylesheet" href="/css/admin.css">
- </head>
+
+</head>
<body>
<h1>Product Editor</h1>
<div>
- <h2><a name="title">Title</h2>
+ <h2><a
+name="title">Title</h2>
- <p>The name of the product (NB: the title cannot be changed once an order has
- been placed that includes this product).</p>
+ <p>The name of the product (NB: the title
+cannot be changed once an order has
+ been placed that includes
+this product).</p>
</div>
<div>
- <h2><a name="summary">Summary</h2>
- <p>The extended name of the product (NB: the summary cannot be changed once
- an order has been placed that includes this product).</p>
+ <h2><a
+name="summary">Summary</h2>
+ <p>The extended name of the product
+(NB: the summary cannot be changed once
+ an order has been placed
+that includes this product).</p>
</div>
<div>
- <h2><a name="catalog">Catalog</h2>
+ <h2><a
+name="catalog">Catalog</h2>
- <p>The catalog in which this product should be listed.</p>
+ <p>The catalog in which this product
+should be listed.</p>
</div>
<div>
-<h2><a name="body">Body</h2>
+<h2><a
+name="body">Body</h2>
-<p>The content of your article. There are a number of <a
-href="body.html">tags</a> you can use to markup your article text.</p>
+<p>The content of your article. There are a
+number of <a
+href="body.html">tags</a> you can use to markup your
+article text.</p>
</div>
<div>
-<h2><a name="leadtime">Lead time</h2>
+<h2><a name="leadtime">Lead
+time</h2>
-<p>The time required to prepare this product for shipping.</p>
+<p>The time required to prepare this product for
+shipping.</p>
</div>
<div>
-<h2><a name="retail">Retail price</h2>
+<h2><a name="retail">Retail
+price</h2>
-<p>The total cost of the product to the customer.</p>
+<p>The total cost of the product to the
+customer.</p>
</div>
<div>
-<h2><a name="wholesale">Wholesale price</h2>
+<h2><a name="wholesale">Wholesale
+price</h2>
-<p>The price this product costs to wholesalers.</p>
+<p>The price this product costs to
+wholesalers.</p>
</div>
<div>
<h2><a name="gst">GST</h2>
-<p>The Goods and Services Tax on this product (in dollars).</p>
+<p>The
+Goods and Services Tax on this product (in
+dollars).</p>
</div>
<div>
- <h2><a name="release">Release date</h2>
+ <h2><a name="release">Release
+date</h2>
- <p>The date that your product is released to the world. Your product will only
- appear in menus after this date and before the expiry date. If you don't enter
- a release date it will default to the current date.</p>
- <p><b>Note</b>: Unreleased products can be accessed via a direct URL to the
- product.</p>
+ <p>The date that your product is released to the world.
+Your product will only
+ appear in menus after this date and
+before the expiry date. If you don't enter
+ a release date it
+will default to the current date.</p>
+ <p><b>Note</b>: Unreleased
+products can be accessed via a direct URL to the
+
+product.</p>
</div>
<div>
<h2><a name="expire">Expiry date</h2>
- <p>The date from which you don't want the product to appear on your site.</p>
+
+<p>The date from which you don't want the product to appear on your
+site.</p>
- <p><b>Note:</b> Expired products can be found through the search engine.</p>
+ <p><b>Note:</b> Expired products can be found through
+the search engine.</p>
</div>
<div>
-<h2><a name="summary">Summary length</h2>
+<h2><a name="summary">Summary
+length</h2>
- <p>The length of the summary displayed for products by the <:summary:>
- tag (typically this is only seen when the product is a stepkid of a non-shop
+ <p>The length of the summary displayed for products by
+the <:summary:>
+ tag (typically this is only seen when the
+product is a stepkid of a non-shop
section).</p>
</div>
<div>
- <h2><a name="threshold">Display threshold</h2>
+
+<h2><a name="threshold">Display threshold</h2>
-<p>This is used by the <:if UnderThreshold :> conditional tag.
-If the number of children is less than this value the condition is
+<p>This is used by
+the <:if UnderThreshold :> conditional tag.
+If the number of
+children is less than this value the condition is
true.</p>
- <p>Typically your templates will embed child articles if there are fewer than
- this number of child articles, otherwise a menu of child articles will be
- displayed (typically this is only seen when the product is a stepkid of a
- non-shop section.</p>
+
+<p>Typically your templates will embed child articles if there are
+fewer than
+ this number of child articles, otherwise a menu of
+child articles will be
+ displayed (typically this is only seen
+when the product is a stepkid of a
+ non-shop
+section.</p>
</div>
<div>
<h2><a name="options">Options</h2>
- <p>Options available with this product, like sizes and colors (the options are
+
+<p>Options available with this product, like sizes and colors (the
+options are
set in Constants.pm).</p>
</div>
<div>
- <h2><a name="thumb">Thumbnail image</h2>
+ <h2><a
+name="thumb">Thumbnail image</h2>
- <p>An image that can be used with the <:thumbnail:> tag to display a small
- image for the product in menus.</p>
+ <p>An image that can be used
+with the <:thumbnail:> tag to display a small
+ image for
+the product in menus.</p>
</div>
<div>
-<h2><a name="files">Files</h2>
+<h2><a
+name="files">Files</h2>
- <p>Files attached to the product. This isn't available until the product has
+ <p>Files attached to the product. This
+isn't available until the product has
been created.</p>
+ <p>You
+can modify the files by clicking the "Manage Files"
+link.</p>
</div>
<div>
- <h2><a name="images">Uploaded images</h2>
+ <h2><a name="images">Images</h2>
- <p>Images attached to the product.</p>
+
+<p>Images attached to the product. This isn't available until the
+product has
+ been created.</p>
+ <p>You can modify the images by
+clicking the "Manage Images"
+link.</p>
</div>
<td bgcolor="#FFFFFF">
<input type="file" name="image">
</td>
+ <td bgcolor="#FFFFFF"><:help image file:> </td>
</tr>
<tr>
<th bgcolor="#FFFFFF" align="left"> Alt text for image: </th>
<td bgcolor="#FFFFFF">
<input type="text" name="altIn">
</td>
+ <td bgcolor="#FFFFFF"><:help image alt:> </td>
</tr>
<tr>
<th bgcolor="#FFFFFF" align="left"> URL for image: </th>
<td bgcolor="#FFFFFF">
<input type="text" name="url" width="40">
</td>
+ <td bgcolor="#FFFFFF"><:help image url:> </td>
</tr>
<tr>
- <td bgcolor="#FFFFFF" colspan="2" align="right">
+ <td bgcolor="#FFFFFF" colspan="3" align="right">
<input type="submit" name="addimg" value=" Add Image ">
</td>
</tr>
<th valign="top" bgcolor="#FFFFFF" colspan="3">First Image Position</th>
</tr>
<tr>
- <td align="center" bgcolor="#FFFFFF" colspan="3"> <input type="radio" name="imagePos" value="tl" <: ifEq [article imagePos] "tl":>checked<:or:><:eif:>
+ <td bgcolor="#FFFFFF" colspan="3">
+ <table width="100%" border="0" cellspacing="0" cellpadding="0">
+ <tr>
+ <td width="100%" align="center"><input type="radio" name="imagePos" value="tl" <: ifEq [article imagePos] "tl":>checked<:or:><:eif:>
>Top Left <input type="radio" name="imagePos" value="tr" <: ifEq [article imagePos] "tr":>checked<:or:><:eif:>
>Top Right <input type="radio" name="imagePos" value="bl" <: ifEq [article imagePos] "bl":>checked<:or:><:eif:>
>Bottom Left <input type="radio" name="imagePos" value="br" <: ifEq [article imagePos] "br":>checked<:or:><:eif:>
- >Bottom Right
+ >Bottom Right</td>
+ <td bgcolor="#FFFFFF"><:help image file:> </td>
+ </tr>
+ </table>
+
</td>
</tr>
<tr bgcolor="#FFFFFF">
image width :>" height="<: image height :>"></td>
</tr>
<tr bgcolor="#FFFFFF">
- <th width="50%"> Alt Text</th>
+ <th> Alt Text</th>
<th width="50%"> URL</th>
<th nowrap> Modify</th>
</tr>
<tr bgcolor="#FFFFFF">
- <td valign="top" width="50%">
+ <td valign="top">
<input type="text" name="alt" value="<: image alt :>" size="32">
</td>
<td valign="top" width="50%">
<input type="text" name="url" value="<: image url :>" size="32">
</td>
<td valign="bottom" nowrap>
- <b><a href="<:script:>?level=<: level :>&parentid=<: article parentid :>&id=<:article id:>&imgtype=<: articleType :>&removeimg_<: image id :>">Delete</a></b>
+ <b><a href="<:script:>?level=<: level :>&parentid=<: article parentid :>&id=<:article id:>&imgtype=<: articleType :>&removeimg_<: image id :>" onClick="return window.confirm('Are you sure you want to delete this Image')">Delete</a></b>
<:imgmove:> </td>
</tr>
<: iterator separator images :>
<:ifMessage:>
<p><b><:message:></b></p>
<:or:><:eif:>
-<p>| <a href="/admin/">Admin menu</a> | <:if children:> <a name="children"></a>
-</p>
+<p>| <a href="/admin/">Admin menu</a> | </p>
+<form action="/cgi-bin/admin/adminusers.pl"><input type=submit name="a_showobjectart" value="Manage access for"><input type=hidden name=id value="<: article id:>">
+<select name=adminid>
+<:iterator begin adminusers:>
+<option value=<:iadminuser id:>>User <:iadminuser logon:>
+<:iterator end adminusers:>
+<:iterator begin admingroups:>
+<option value=<:iadmingroup id:>>Group <:iadmingroup name:>
+<:iterator end admingroups:>
+</select>
+
+</form>
+
+<:if children:> <a name="children"></a>
<table border="0" cellspacing="0" cellpadding="0" bgcolor="#000000" width="100%" class="table">
<tr>
<td>
<h2><:articleType:> Details</h2>
+<:ifnew:><:or:>
+<form action="/cgi-bin/admin/adminusers.pl"><input type=submit name="a_showobjectart" value="Manage access for"><input type=hidden name=id value="<: article id:>">
+<select name=adminid>
+<:iterator begin adminusers:>
+<option value=<:iadminuser id:>>User <:iadminuser logon:>
+<:iterator end adminusers:>
+<:iterator begin admingroups:>
+<option value=<:iadmingroup id:>>Group <:iadmingroup name:>
+<:iterator end admingroups:>
+</select>
+</form><:eif:>
+
<form enctype="multipart/form-data" method="POST" action="<:script:>">
<input type="hidden" name="level" value="<: level :>">
<h2><:articleType:> Details</h2>
+<:ifnew:><:or:>
+<form action="/cgi-bin/admin/adminusers.pl"><input type=submit name="a_showobjectart" value="Manage access for"><input type=hidden name=id value="<: article id:>">
+<select name=adminid>
+<:iterator begin adminusers:>
+<option value=<:iadminuser id:>>User <:iadminuser logon:>
+<:iterator end adminusers:>
+<:iterator begin admingroups:>
+<option value=<:iadmingroup id:>>Group <:iadmingroup name:>
+<:iterator end admingroups:>
+</select>
+</form><:eif:>
+
<form enctype="multipart/form-data" method="POST" action="<:script:>">
<input type="hidden" name="level" value="<: level :>">
catalogs</a> | <:if new:><:or new:><a href="<:script:>?id=<:article id:>&_t=steps">Manage
step children/parents</a> | <:eif new:></p>
- <form enctype="multipart/form-data" method="POST" action="<:script:>">
<h2>Catalog Details</h2>
+<:ifnew:><:or:>
+<form action="/cgi-bin/admin/adminusers.pl"><input type=submit name="a_showobjectart" value="Manage access for"><input type=hidden name=id value="<: article id:>">
+<select name=adminid>
+<:iterator begin adminusers:>
+<option value=<:iadminuser id:>>User <:iadminuser logon:>
+<:iterator end adminusers:>
+<:iterator begin admingroups:>
+<option value=<:iadmingroup id:>>Group <:iadmingroup name:>
+<:iterator end admingroups:>
+</select>
+</form><:eif:>
+
+ <form enctype="multipart/form-data" method="POST" action="<:script:>">
<input type=hidden name=type value="Catalog">
<input type="hidden" name="level" value="<: level :>">
<input type="hidden" name="id" value="<: article id :>">
<td width="30%"><a href="<:child admin:>"><:child title:></a></td>
<td width="70%"><: summary child body :></td>
<td align="center"><: is child listed :></td>
- <td nowrap> <: edit child Edit :> <a href="/cgi-bin/admin/add.pl?id=<:child id:>&remove=1" onClick="return window.confirm('Are you sure you want to delete this Sub-catalog')">Delete</a><:movechild:> </td>
+ <td nowrap> <: edit child Edit :> <a href="/cgi-bin/admin/add.pl?id=<:child id:>&remove=1" onClick="return window.confirm('Are you sure you want to delete this <:ifMatch [child generator] "Product":>Product<:or:>Sub-catalog<:eif:>')">Delete</a><:movechild:> </td>
</tr>
<:iterator separator children:> <:iterator end children:>
</table>
<:eif Product:>| <a href="/cgi-bin/admin/add.pl?id=<:product id:>&_t=steps">Manage
step parents</a> | <:ifProduct listed:><:or:>Hidden<:eif:></p>
<h2>Edit Product</h2>
+<:ifnew:><:or:>
+<form action="/cgi-bin/admin/adminusers.pl"><input type=submit name="a_showobjectart" value="Manage access for"><input type=hidden name=id value="<: article id:>">
+<select name=adminid>
+<:iterator begin adminusers:>
+<option value=<:iadminuser id:>>User <:iadminuser logon:>
+<:iterator end adminusers:>
+<:iterator begin admingroups:>
+<option value=<:iadmingroup id:>>Group <:iadmingroup name:>
+<:iterator end admingroups:>
+</select>
+</form><:eif:>
<form action="<:script:>" enctype="multipart/form-data" method="POST">
<input type="hidden" name="id" value="<:product id:>">
<table border="0" cellspacing="0" cellpadding="0" bgcolor="#000000" class="table">
<td><:ifStepKid:>
<input type="text" name="expire_<:stepkid childId:>" value="<:date "%d/%m/%Y" stepkid expire:>" size=10>
<:or:> <:eif:></td>
- <td nowrap><:edit kid Edit:> <:ifStepKid:><a href="<:script:>?del_stepkid=1&id=<:stepkid parentId:>&stepkid=<:stepkid childId:>&_t=steps">Delete</a><:or:><:eif:>
+ <td nowrap><:edit kid Edit:> <:ifStepKid:><a href="<:script:>?del_stepkid=1&id=<:stepkid parentId:>&stepkid=<:stepkid childId:>&_t=steps" onClick="return window.confirm('Are you sure you want to delete this Step child')">Delete</a><:or:><:eif:>
<:movestepkid:></td>
</tr>
<:iterator end kids:>
<input type="text" name="expire_<:stepparent parentId:>" value="<:date "%d/%m/%Y" stepparent expire:>" size="10">
</td>
<td nowrap><a href="/cgi-bin/admin/add.pl?id=<:stepparent parentId:>">Edit</a>
- <a href="<:script:>?del_stepparent=1&id=<:stepparent childId:>&stepparent=<:stepparent parentId:>&_t=steps">Delete</a>
+ <a href="<:script:>?del_stepparent=1&id=<:stepparent childId:>&stepparent=<:stepparent parentId:>&_t=steps" onClick="return window.confirm('Are you sure you want to delete this Step parent')">Delete</a>
<:movestepparent:></td>
</tr>
<:iterator end stepparents:>
<td valign="top" align="center" nowrap> <input type="checkbox" name="requireUser_<:file id:>"
<:ifFile requireUser:> checked<:or:><:eif:> />Require login
</td>
- <td nowrap align="right" width="100%"> <b><a href="<:script:>?filedel=1&id=<:article id:>&file=<:file id:>">Remove</a></b>
+ <td nowrap align="right" width="100%"> <b><a href="<:script:>?filedel=1&id=<:article id:>&file=<:file id:>" onClick="return window.confirm('Are you sure you want to delete this File')">Delete</a></b>
<:movefiles:></td>
</tr>
</table>
<th bgcolor="#FFFFFF" nowrap> Name</th>
<th bgcolor="#FFFFFF" nowrap> Description</th>
<th bgcolor="#FFFFFF" nowrap> Users</th>
+ <th bgcolor="#FFFFFF" nowrap> </th>
</tr>
<:if Groups:> <: iterator begin groups :>
<tr bgcolor="#FFFFFF">
<td nowrap> <a href="<:script:>?a_showgroup=1&groupid=<:igroup id:>"><:igroup name:></a></td>
<td valign="top"><:igroup description:></td>
- <td valign="top"><:ifGroup_users igroup:><:iterator begin group_users igroup:><:group_user logon:> <:iterator separator group_users:>, <:iterator end group_users:><:or:>(none)<:eif:>
+ <td valign="top"><:ifGroup_users igroup:><:iterator begin group_users igroup:><:group_user logon:><:iterator separator group_users:>, <:iterator end group_users:><:or:>(none)<:eif:>
</td>
+ <td valign="top"><a href="<:script:>?a_showgroup=1&groupid=<:igroup id:>&_t=del">Delete</a></td>
</tr>
<: iterator end groups :>
<:or Groups:>
</td>
</tr>
</table>
+<:ifEq [order paymentType] "0":><p>Payment made by credit card.</p><:or:><:eif:>
+<:ifEq [order paymentType] "1":><p>Payment will be made by cheque.</p><:or:><:eif:>
+<:ifEq [order paymentType] "2":><p>Contact the customer to arrange for payment.</p><:or:><:eif:>
+
<:if Order filled:>
<p>This order was filled on <:date order whenFilled:> by <:order whoFilled:>.</p>
<:or Order:>
<h1>Edit Group</h1>
<p>
| <a href="/admin/">Admin menu</a>
+| <a href="<:script:>">User list</a>
| <a href="<:script:>?a_groups=1">Group list</a> |
</p>
+<p>
+| Group Details
+| <a href="<:script:>?a_showgroup=1&groupid=<:group id:>&_t=glob">Global Permissions</a>
+| <a href="<:script:>?a_showgroupart=1&groupid=<:group id:>&id=-1">Article Permissions</a> |
+</p>
<:ifMessage:>
<p><b><:message:></b></p>
<:or:><:eif:>
<form method="POST" action="<:script:>">
-
+<input type=hidden name=groupid value=<:group id:>>
<table border="0" cellspacing="0" cellpadding="0" bgcolor="#000000" class="table">
<tr>
<td>
</td>
<td bgcolor="#FFFFFF"><:help editgroup description:> </td>
</tr>
+ <tr>
+ <th bgcolor="#FFFFFF" align="left"> Members: </th>
+ <td bgcolor="#FFFFFF">
+ <:iterator begin users:>
+ <input type=checkbox name=users value=<:iuser id:> <:ifMemberof iuser:>checked<:or:><:eif:> /> <:iuser name:>
+ <:iterator separator users:>
+ <br>
+ <:iterator end users:>
+ </td>
+ <td bgcolor="#FFFFFF" valign="top"><:help editgroup members:> </td>
+ </tr>
<tr>
<td bgcolor="#FFFFFF" colspan="3" align="right">
<input type="submit" name="a_savegroup" value=" Save Group " />
--- /dev/null
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+
+ <title>Administration - Delete Group</title>
+
+ <link rel="stylesheet" type="text/css" href="/css/admin.css" />
+
+</head>
+
+<body>
+<h1>Delete Group</h1>
+<p>
+| <a href="/admin/">Admin menu</a>
+| <a href="<:script:>">User list</a>
+| <a href="<:script:>?a_groups=1">Group list</a> |
+</p>
+
+<form method="POST" action="<:script:>">
+<input type=hidden name=groupid value=<:group id:>>
+ <table border="0" cellspacing="0" cellpadding="0" bgcolor="#000000" class="table">
+ <tr>
+ <td>
+ <table cellpadding="6" border="0" cellspacing="1">
+ <tr>
+ <th bgcolor="#FFFFFF" align="left">Name: </th>
+ <td bgcolor="#FFFFFF">
+ <:group name:>
+ </td>
+ <td bgcolor="#FFFFFF"><:help editgroup name:> </td>
+ </tr>
+ <tr>
+ <th bgcolor="#FFFFFF" align="left">Description: </th>
+ <td bgcolor="#FFFFFF">
+ <:group description:>
+ </td>
+ <td bgcolor="#FFFFFF"><:help editgroup description:> </td>
+ </tr>
+ <tr>
+ <td bgcolor="#FFFFFF" colspan="3" align="right">
+ Are you sure you want to delete this group?
+ </td>
+ </tr>
+ <tr>
+ <td bgcolor="#FFFFFF" colspan="3" align="right">
+ <input type="submit" name="a_delgroup" value=" Delete Group " />
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+</form>
+
+<p><font size="-1">BSE Release <:release:></font></p>
+</body
+></html>
--- /dev/null
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+
+ <title>Administration - Edit Group</title>
+
+ <link rel="stylesheet" type="text/css" href="/css/admin.css" />
+
+</head>
+
+<body>
+<h1>Edit Group <:group name:></h1>
+<p>
+| <a href="/admin/">Admin menu</a>
+| <a href="<:script:>">User list</a>
+| <a href="<:script:>?a_groups=1">Group list</a> |
+</p>
+<p>
+| <a href="<:script:>?a_showgroup=1&groupid=<:group id:>">Group Details</a> | Global Permissions
+| <a href="<:script:>?a_showgroupart=1&groupid=<:group id:>&id=-1">Article Permissions</a> |
+</p>
+<:ifMessage:>
+<p><b><:message:></b></p>
+<:or:><:eif:>
+
+<form method="POST" action="<:script:>">
+<input type=hidden name=groupid value=<:group id:>>
+<input type=hidden name=savegperms value=1>
+ <table border="0" cellspacing="0" cellpadding="0" bgcolor="#000000" class="table">
+ <tr>
+ <td>
+ <table cellpadding="6" border="0" cellspacing="1">
+ <:iterator begin gperms:>
+ <tr>
+ <th bgcolor="#FFFFFF" align="left"><:gperm brief:> </th>
+ <td bgcolor="#FFFFFF">
+ <input type=checkbox name=gperms value=<:gperm id:> <:ifGperm_set gperm:>checked <:or:><:eif:>/>
+ </td>
+ <td bgcolor="#FFFFFF"><img src="/images/admin/help.gif" title="<:gperm help:>" /></td>
+ </tr>
+ <:iterator end gperms:>
+ <tr>
+ <td bgcolor="#FFFFFF" colspan="3" align="right">
+ <input type="submit" name="a_savegroup" value=" Save Permissions " />
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+</form>
+
+<p><font size="-1">BSE Release <:release:></font></p>
+</body
+></html>
--- /dev/null
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+
+ <title>Administration - Edit Group - Article permissions</title>
+
+ <link rel="stylesheet" type="text/css" href="/css/admin.css" />
+
+</head>
+
+<body>
+<h1>Edit Group <:group name:></h1>
+<p>
+| <a href="/admin/">Admin menu</a>
+| <a href="<:script:>">User list</a>
+| <a href="<:script:>?a_groups=1">Group list</a> |
+</p>
+<p>
+| <a href="<:script:>?a_showgroup=1&groupid=<:group id:>">Group Details</a>
+| <a href="<:script:>?a_showgroup=1&groupid=<:group id:>&_t=glob">Global Permissions</a>
+| Article Permissions |
+</p>
+<:ifParent:><p>| <a href="<:script:>?a_showgroupart=1&groupid=<:group id:>&id=<:parent id:>">Parent permissions</a> |</p><:or:><:eif:>
+<:ifMessage:>
+<p><b><:message:></b></p>
+<:or:><:eif:>
+
+<h2>Permissions for <:ifEq [article id] "-1":>the site<:or:>article <:article title:><:eif:></h2>
+
+<form method="POST" action="<:script:>">
+<input type=hidden name=groupid value=<:group id:>>
+<input type=hidden name=saveaperms value=1>
+<input type=hidden name=id value=<:article id:>>
+ <table border="0" cellspacing="0" cellpadding="0" bgcolor="#000000" class="table">
+ <tr>
+ <td>
+ <table cellpadding="6" border="0" cellspacing="1">
+ <:iterator begin aperms:>
+ <tr>
+ <th bgcolor="#FFFFFF" align="left" width="100%"><:aperm brief:> </th>
+ <td bgcolor="#FFFFFF">
+ <input type=checkbox name=aperms value=<:aperm id:> <:ifAperm_set aperm:>checked <:or:><:eif:>/>
+ </td>
+ <td bgcolor="#FFFFFF"><img src="/images/admin/help.gif" title="<:aperm help:>" /></td>
+ </tr>
+ <:iterator end aperms:>
+ <tr>
+ <td bgcolor="#FFFFFF" colspan="3" align="right">
+ <input type="submit" name="a_savegroupart" value=" Save Group permissions " />
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+</form>
+
+<:if Children:>
+<h2>Children</h2>
+<table border="0" cellspacing="0" cellpadding="0" bgcolor="#000000" class="table">
+ <tr>
+ <td>
+ <table border=0 cellpadding="6" cellspacing="1" width="100%">
+ <tr bgcolor="#FFFFFF">
+ <th>Title</th>
+ <th>Summary</th>
+ <th nowrap>Permissions</th>
+ </tr>
+ <:iterator begin children:>
+ <tr bgcolor="#FFFFFF">
+ <td><a href="<:child admin:>"><:child title:></a></td>
+ <td><: summary child body :></td>
+ <td nowrap><a href="<:script:>?a_showgroupart=1&groupid=<:group id:>&id=<:child id:>">Permissions</a></td>
+ </tr>
+ <:iterator separator children:> <:iterator end children:>
+ </table>
+</td>
+</tr>
+</table>
+<:or Children:><:eif Children:>
+
+<p><font size="-1">BSE Release <:release:></font></p>
+</body
+></html>
| <a href="/admin/">Admin menu</a>
| <a href="<:script:>">User list</a> |
</p>
+<p>
+| User Details | <a href="<:script:>?a_showuser=1&userid=<:user id:>&_t=glob">Global Permissions</a>
+| <a href="<:script:>?a_showuserart=1&userid=<:user id:>&id=-1">Article Permissions</a> |
+</p>
<:ifMessage:>
<p><b><:message:></b></p>
<:or:><:eif:>
<form method="POST" action="<:script:>">
-
+<input type=hidden name=userid value=<:user id:>>
+<input type=hidden name=savegroups value=1>
<table border="0" cellspacing="0" cellpadding="0" bgcolor="#000000" class="table">
<tr>
<td>
<tr>
<th bgcolor="#FFFFFF" align="left">Name: </th>
<td bgcolor="#FFFFFF">
- <input type="text" name="name" value="<:user logon:>" />
+ <input type="text" name="name" value="<:user name:>" />
</td>
<td bgcolor="#FFFFFF"><:help edituser name:> </td>
</tr>
</td>
<td bgcolor="#FFFFFF"><:help edituser confirm:> </td>
</tr>
+ <tr>
+ <th bgcolor="#FFFFFF" align="left" valign="top"> Groups: </th>
+ <td bgcolor="#FFFFFF">
+ <:iterator begin groups:>
+ <input type=checkbox name=groups value=<:igroup id:> <:ifMemberof igroup:>checked<:or:><:eif:> /> <:igroup name:>
+ <:iterator separator groups:>
+ <br>
+ <:iterator end groups:>
+ </td>
+ <td bgcolor="#FFFFFF" valign="top"><:help edituser groups:> </td>
+ </tr>
<tr>
<td bgcolor="#FFFFFF" colspan="3" align="right">
<input type="submit" name="a_saveuser" value=" Save User " />
--- /dev/null
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+
+ <title>Administration - Delete User</title>
+
+ <link rel="stylesheet" type="text/css" href="/css/admin.css" />
+
+</head>
+
+<body>
+<h1>Delete User</h1>
+<p>
+| <a href="/admin/">Admin menu</a>
+| <a href="<:script:>">User list</a> |
+</p>
+<form method="POST" action="<:script:>">
+<input type=hidden name=userid value=<:user id:>>
+ <table border="0" cellspacing="0" cellpadding="0" bgcolor="#000000" class="table">
+ <tr>
+ <td>
+ <table cellpadding="6" border="0" cellspacing="1">
+ <tr>
+ <th bgcolor="#FFFFFF" align="left">Logon: </th>
+ <td bgcolor="#FFFFFF">
+ <:user logon:>
+ </td>
+ <td bgcolor="#FFFFFF"><:help edituser logon:> </td>
+ </tr>
+ <tr>
+ <th bgcolor="#FFFFFF" align="left">Name: </th>
+ <td bgcolor="#FFFFFF">
+ <:user name:>
+ </td>
+ <td bgcolor="#FFFFFF"><:help edituser name:> </td>
+ </tr>
+ <tr>
+ <td colspan="3" bgcolor="#FFFFFF" align="left">
+ Are you sure you want to delete this user?
+ </td>
+ </tr>
+ <tr>
+ <td bgcolor="#FFFFFF" colspan="3" align="right">
+ <input type="submit" name="a_deluser" value=" Delete User " />
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+</form>
+
+<p><font size="-1">BSE Release <:release:></font></p>
+</body
+></html>
--- /dev/null
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+
+ <title>Administration - Edit User</title>
+
+ <link rel="stylesheet" type="text/css" href="/css/admin.css" />
+
+</head>
+
+<body>
+<h1>Edit User <:user logon:></h1>
+<p>
+| <a href="/admin/">Admin menu</a>
+| <a href="<:script:>">User list</a> |
+</p>
+<p>
+| <a href="<:script:>?a_showuser=1&userid=<:user id:>">User Details</a> | Global Permissions
+| <a href="<:script:>?a_showuserart=1&userid=<:user id:>&id=-1">Article Permissions</a> |
+</p>
+<:ifMessage:>
+<p><b><:message:></b></p>
+<:or:><:eif:>
+
+<form method="POST" action="<:script:>">
+<input type=hidden name=userid value=<:user id:>>
+<input type=hidden name=savegperms value=1>
+ <table border="0" cellspacing="0" cellpadding="0" bgcolor="#000000" class="table">
+ <tr>
+ <td>
+ <table cellpadding="6" border="0" cellspacing="1">
+ <:iterator begin gperms:>
+ <tr>
+ <th bgcolor="#FFFFFF" align="left"><:gperm brief:> </th>
+ <td bgcolor="#FFFFFF">
+ <input type=checkbox name=gperms value=<:gperm id:> <:ifGperm_set gperm:>checked <:or:><:eif:>/>
+ </td>
+ <td bgcolor="#FFFFFF"><img src="/images/admin/help.gif" title="<:gperm help:>" /></td>
+ </tr>
+ <:iterator end gperms:>
+ <tr>
+ <td bgcolor="#FFFFFF" colspan="3" align="right">
+ <input type="submit" name="a_saveuser" value=" Save Permissions " />
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+</form>
+
+<p><font size="-1">BSE Release <:release:></font></p>
+</body
+></html>
--- /dev/null
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+
+ <title>Administration - Edit User - Article permissions</title>
+
+ <link rel="stylesheet" type="text/css" href="/css/admin.css" />
+
+</head>
+
+<body>
+<h1>Edit User <:user logon:></h1>
+<p>
+| <a href="/admin/">Admin menu</a>
+| <a href="<:script:>">User list</a> |
+</p>
+<p>
+| <a href="<:script:>?a_showuser=1&userid=<:user id:>">User Details</a>
+| <a href="<:script:>?a_showuser=1&userid=<:user id:>&_t=glob">Global Permissions</a>
+| Article Permissions |
+</p>
+<:ifParent:><p>| <a href="<:script:>?a_showuserart=1&userid=<:user id:>&id=<:parent id:>">Parent permissions</a> |</p><:or:><:eif:>
+<:ifMessage:>
+<p><b><:message:></b></p>
+<:or:><:eif:>
+
+<h2>Permissions for <:ifEq [article id] "-1":>the site<:or:>article <:article title:><:eif:></h2>
+
+<form method="POST" action="<:script:>">
+<input type=hidden name=userid value=<:user id:>>
+<input type=hidden name=saveaperms value=1>
+<input type=hidden name=id value=<:article id:>>
+ <table border="0" cellspacing="0" cellpadding="0" bgcolor="#000000" class="table">
+ <tr>
+ <td>
+ <table cellpadding="6" border="0" cellspacing="1">
+ <:iterator begin aperms:>
+ <tr>
+ <th bgcolor="#FFFFFF" align="left"><:aperm brief:> </th>
+ <td bgcolor="#FFFFFF">
+ <input type=checkbox name=aperms value=<:aperm id:> <:ifAperm_set aperm:>checked <:or:><:eif:>/>
+ </td>
+ <td bgcolor="#FFFFFF"><img src="/images/admin/help.gif" title="<:aperm help:>" /></td>
+ </tr>
+ <:iterator end aperms:>
+ <tr>
+ <td bgcolor="#FFFFFF" colspan="3" align="right">
+ <input type="submit" name="a_saveuserart" value=" Save User permissions " />
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+</form>
+
+<:if Children:>
+<h2>Children</h2>
+<table border="0" cellspacing="0" cellpadding="0" bgcolor="#000000" class="table">
+ <tr>
+ <td>
+ <table border=0 cellpadding="6" cellspacing="1" width="100%">
+ <tr bgcolor="#FFFFFF">
+ <th>Title</th>
+ <th>Summary</th>
+ <th nowrap>Permissions</th>
+ </tr>
+ <:iterator begin children:>
+ <tr bgcolor="#FFFFFF">
+ <td><a href="<:child admin:>"><:child title:></a></td>
+ <td><: summary child body :></td>
+ <td nowrap><a href="<:script:>?a_showuserart=1&userid=<:user id:>&id=<:child id:>">Permissions</a></td>
+ </tr>
+ <:iterator separator children:> <:iterator end children:>
+ </table>
+</td>
+</tr>
+</table>
+<:or Children:><:eif Children:>
+
+<p><font size="-1">BSE Release <:release:></font></p>
+</body
+></html>
<th bgcolor="#FFFFFF" nowrap> Logon</th>
<th bgcolor="#FFFFFF" nowrap> Name</th>
<th bgcolor="#FFFFFF" nowrap> In Groups</th>
+ <th bgcolor="#FFFFFF" nowrap> </th>
</tr>
<:if Users:> <: iterator begin users :>
<tr bgcolor="#FFFFFF">
<td nowrap> <a href="<:script:>?a_showuser=1&userid=<:iuser id:>"><:iuser logon:></a></td>
<td valign="top"><:iuser name:></td>
- <td valign="top"><:ifUser_groups iuser:><:iterator begin user_groups iuser:><:user_group name:> <:iterator separator user_groups:>, <:iterator end user_groups:><:or:>(none)<:eif:>
+ <td valign="top"><:ifUser_groups iuser:><:iterator begin user_groups iuser:><:user_group name:><:iterator separator user_groups:>, <:iterator end user_groups:><:or:>(none)<:eif:>
</td>
+ <td>
+ <a href="<:script:>?a_showuser=1&userid=<:iuser id:>&_t=del">Delete</a>
+ </td>
</tr>
<: iterator end users :>
<:or Users:>
<tr bgcolor="#FFFFFF">
- <td colspan="3" align="center">Your system has no users.</td>
+ <td colspan="4" align="center">Your system has no users.</td>
</tr>
<:eif Users:>
</table>
<td height="18"> <font face="Verdana, Arial, Helvetica, sans-serif" size="-2" color="#FFFFFF"><b>Price:</b></font> </td>
<td height="18"> </td>
</tr>
+ <:ifCount:>
<:iterator begin items:>
<tr valign="middle" align="center" bgcolor="#FFFFFF">
<td width="100%" align="left"> <font face="Verdana, Arial, Helvetica, sans-serif" size="-2"><a href="<:item link:>"><:item
<input type="submit" name="delete_<:index:>" value="Remove">
</td>
</tr>
- <:iterator end items:>
+ <:iterator end items:>
+ <:or:>
+ <tr valign="middle" align="center" bgcolor="#FFFFFF">
+ <td width="100%" height="20" align="center" colspan="4"><font face="Verdana, Arial, Helvetica, sans-serif" size="2">You have no items in your shopping cart!</font></td>
+ </tr>
+ <:eif:>
</table>
</td>
</tr>
} if (errors) alert('The following error(s) occurred:\n'+errors);
document.MM_returnValue = (errors == '');
}
+
+function BSE_validateForm {
+ var typeEl = MM_findObj('paymentType');
+ var type = typeEl.value;
+ if (type == 0) {
+ MM_validateForm('name1','','R','name2','','R','address','','R','city','','R','postcode','','R','state','','R','country','','R','email','','RisEmail','cardHolder','','R','cardNumber','','R','cardExpiry','','R');
+ }
+ else {
+ MM_validateForm('name1','','R','name2','','R','address','','R','city','','R','postcode','','R','state','','R','country','','R','email','','RisEmail');
+ }
+}
+
//-->
</script>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
</tr>
</table>
<p> </p>
-<form action="/cgi-bin/shop.pl" method="POST" onSubmit="MM_validateForm('name1','','R','name2','','R','address','','R','city','','R','postcode','','R','state','','R','country','','R','email','','RisEmail','cardHolder','','R','cardNumber','','R','cardExpiry','','R');return document.MM_returnValue">
+<form action="/cgi-bin/shop.pl" method="POST" onSubmit="BSE_validateForm();return document.MM_returnValue">
<font face="Verdana, Arial, Helvetica, sans-serif" size="3"> <b>Shipping Details:</b></font>
<hr noshade size="1">
<table border="0" cellspacing="0" cellpadding="0">
<p> </p>
<font face="Verdana, Arial, Helvetica, sans-serif" size="3"> <b>Payment Details:</b></font>
<hr size="1" noshade>
+ <:if CCPayments :>
+ <:if MultPaymentTypes:><p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><input type=radio name=paymentType value=0 <:checkedIfFirstCC:>> Credit Card</font></p><:or MultPaymentTypes:><input type=hidden name=paymentType value=0><:eif MultPaymentTypes:>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td> <font face="Verdana, Arial, Helvetica, sans-serif" size="2"> Name on
*</font></td>
</tr>
</table>
+ <:or CCPayments:><:eif CCPayments:>
+ <:if ChequePayments:>
+ <:if MultPaymentTypes:><p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> <input type=radio name=paymentType value=1 <:checkedIfFirstCheque:>/>
+ Cheque</font></p><:or MultPaymentTypes:><input type=hidden name=paymentType value=1><:eif MultPaymentTypes:>
+ <p> <font face="Verdana, Arial, Helvetica, sans-serif" size="2"> Please send your cheque to:</font></p>
+ <ul> <font face="Verdana, Arial, Helvetica, sans-serif" size="2"> <:cfg shop address1:><br />
+ <:cfg shop address2:><br />
+ <:cfg shop address3:></font></ul>
+ <:or ChequePayments:><:eif ChequePayments:>
+ <:if CallMePayments:>
+ <:if MultPaymentTypes:><p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><input type=radio name=paymentType value=2 <:checkedIfFirstCallMe:>/> Contact me for billing details</font></p>
+ <:or MultPaymentTypes:>
+ <input type=hidden name=paymentType value=2>
+ <p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">We will call you to arrange for payment.</font></p>
+ <:eif MultPaymentTypes:>
+ <:or CallMePayments:>
+
+ <:eif CallMePayments:>
<p> </p>
<font face="Verdana, Arial, Helvetica, sans-serif" size="3"> <b>Tax Invoice
/ Receipt & Delivery Costs:</b></font>
<p> The <:siteName:> store is run on a secure encrypted server, your details are
safe with us.<br>
</p>
+<:if CCPayment:><:or CCPayment:><:eif CCPayment:>
+<:if ChequePayment:>
+<p>Please send your cheque to:</p>
+<ul><:cfg shop address1 |h:><br>
+<:cfg shop address2 |h:><br>
+<:cfg shop address3 |h:></ul>
+<:or ChequePayment:><:eif ChequePayment:>
+<:if CallMePayment:>
+<p>We will call you to arrange payment.</p>
+<:or CallMePayment:><:eif CallMePayment:>
</font>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<th><font face="Verdana, Arial, Helvetica, sans-serif" size="-2">Description</font></th>
<th><font face="Verdana, Arial, Helvetica, sans-serif" size="-2">Filename</font></th>
<th><font face="Verdana, Arial, Helvetica, sans-serif" size="-2">Size</font></th>
- <th><font face="Verdana, Arial, Helvetica, sans-serif" size="-2">Download</font></th>
+ <th><font face="Verdana, Arial, Helvetica, sans-serif" size="-2">Status</font></th>
</tr>
<:iterator begin files:>
<tr bgcolor="#FFFFFF">
<:file displayName:></a><:eif File:></font></td>
<td align="right"><font face="Verdana, Arial, Helvetica, sans-serif" size="-2"><:kb
file sizeInBytes:></font></td>
- <td> <font face="Verdana, Arial, Helvetica, sans-serif" size="-2"><:if
- File forSale:> Sorry, this document cannot be downloaded <:or File:>
- <a href="/cgi-bin/user.pl?download_file=1&file=<:file id:>">Download</a>
- <:eif File:> </font></td>
+ <td nowrap align="center"> <:if
+ File forSale:><img src="/images/filestatus/locked.gif" width="15" height="15" alt="Locked" title="Locked"><img src="/images/filestatus/forSale.gif" width="15" height="15" alt="File must be purchased" title="File must be purchased"><:or File:><a href="/cgi-bin/user.pl?download_file=1&file=<:file id:>"><img src="/images/filestatus/download.gif" width="15" height="15" alt="Download now" title="Download now" border="0"></a><:ifFile requireUser:><img src="/images/filestatus/requireUser.gif" width="15" height="15" alt="For registered users only" title="For registered users only"><:or:><img src="/images/trans_pixel.gif" width="15" height="15" title="For registered users only"><:eif:><:eif File:></td>
</tr>
<:iterator end files:>
</table>
<th><font face="Verdana, Arial, Helvetica, sans-serif" size="-2">Description</font></th>
<th><font face="Verdana, Arial, Helvetica, sans-serif" size="-2">Filename</font></th>
<th><font face="Verdana, Arial, Helvetica, sans-serif" size="-2">Size</font></th>
- <th><font face="Verdana, Arial, Helvetica, sans-serif" size="-2">Download</font></th>
+ <th><font face="Verdana, Arial, Helvetica, sans-serif" size="-2">Status</font></th>
</tr>
<:iterator begin files:>
<tr bgcolor="#FFFFFF">
<:file displayName:></a><:eif File:></font></td>
<td align="right"><font face="Verdana, Arial, Helvetica, sans-serif" size="-2"><:kb
file sizeInBytes:></font></td>
- <td> <font face="Verdana, Arial, Helvetica, sans-serif" size="-2"><:if
- File forSale:> Sorry, this document cannot be downloaded <:or File:>
- <a href="/cgi-bin/user.pl?download_file=1&file=<:file id:>">Download</a>
- <:eif File:> </font></td>
+ <td nowrap align="center"> <:if
+ File forSale:><img src="/images/filestatus/locked.gif" width="15" height="15" alt="Locked" title="Locked"><img src="/images/filestatus/forSale.gif" width="15" height="15" alt="File must be purchased" title="File must be purchased"><:or File:><a href="/cgi-bin/user.pl?download_file=1&file=<:file id:>"><img src="/images/filestatus/download.gif" width="15" height="15" alt="Download now" title="Download now" border="0"></a><:ifFile requireUser:><img src="/images/filestatus/requireUser.gif" width="15" height="15" alt="For registered users only" title="For registered users only"><:or:><img src="/images/trans_pixel.gif" width="15" height="15" title="For registered users only"><:eif:><:eif File:></td>
</tr>
<:iterator end files:>
</table>
<:file displayName:></a><:eif File:></font></td>
<td align="right"><font face="Verdana, Arial, Helvetica, sans-serif" size="-2"><:kb
file sizeInBytes:></font></td>
- <td nowrap> <:if
- File forSale:><img src="/images/filestatus/locked.gif" width="15" height="15" alt="Locked" title="Locked"><:or File:><a href="/cgi-bin/user.pl?download_file=1&file=<:file id:>"><img src="/images/filestatus/download.gif" width="15" height="15" alt="Download now" title="Download now" border="0"></a><:eif File:><:if File requireUser:><img src="/images/filestatus/requireUser.gif" width="15" height="15" alt="For registered users only" title="For registered users only"><:or File:><img src="/images/trans_pixel.gif" width="15" height="15"><:eif File:><:if File forSale:><img src="/images/filestatus/forSale.gif" width="15" height="15" alt="File must be purchased" title="File must be purchased"><:or File:><img src="/images/trans_pixel.gif" width="15" height="15"><:eif File:></td>
+ <td nowrap align="center"> <:if
+ File forSale:><img src="/images/filestatus/locked.gif" width="15" height="15" alt="Locked" title="Locked"><img src="/images/filestatus/forSale.gif" width="15" height="15" alt="File must be purchased" title="File must be purchased"><:or File:><a href="/cgi-bin/user.pl?download_file=1&file=<:file id:>"><img src="/images/filestatus/download.gif" width="15" height="15" alt="Download now" title="Download now" border="0"></a><:ifFile requireUser:><img src="/images/filestatus/requireUser.gif" width="15" height="15" alt="For registered users only" title="For registered users only"><:or:><img src="/images/trans_pixel.gif" width="15" height="15" title="For registered users only"><:eif:><:eif File:></td>
</tr>
<:iterator end files:>
</table>
<th><font face="Verdana, Arial, Helvetica, sans-serif" size="-2">Description</font></th>
<th><font face="Verdana, Arial, Helvetica, sans-serif" size="-2">Filename</font></th>
<th><font face="Verdana, Arial, Helvetica, sans-serif" size="-2">Size</font></th>
- <th><font face="Verdana, Arial, Helvetica, sans-serif" size="-2">Download</font></th>
+ <th><font face="Verdana, Arial, Helvetica, sans-serif" size="-2">Status</font></th>
</tr>
<:iterator begin files:>
<tr bgcolor="#FFFFFF">
<:file displayName:></a><:eif File:></font></td>
<td align="right"><font face="Verdana, Arial, Helvetica, sans-serif" size="-2"><:kb
file sizeInBytes:></font></td>
- <td> <font face="Verdana, Arial, Helvetica, sans-serif" size="-2"><:if
- File forSale:> Sorry, this document cannot be downloaded <:or File:>
- <a href="/cgi-bin/user.pl?download_file=1&file=<:file id:>">Download</a>
- <:eif File:> </font></td>
+ <td nowrap align="center"> <:if
+ File forSale:><img src="/images/filestatus/locked.gif" width="15" height="15" alt="Locked" title="Locked"><img src="/images/filestatus/forSale.gif" width="15" height="15" alt="File must be purchased" title="File must be purchased"><:or File:><a href="/cgi-bin/user.pl?download_file=1&file=<:file id:>"><img src="/images/filestatus/download.gif" width="15" height="15" alt="Download now" title="Download now" border="0"></a><:ifFile requireUser:><img src="/images/filestatus/requireUser.gif" width="15" height="15" alt="For registered users only" title="For registered users only"><:or:><img src="/images/trans_pixel.gif" width="15" height="15" title="For registered users only"><:eif:><:eif File:></td>
</tr>
<:iterator end files:>
</table>
<th><font face="Verdana, Arial, Helvetica, sans-serif" size="-2">Description</font></th>
<th><font face="Verdana, Arial, Helvetica, sans-serif" size="-2">Filename</font></th>
<th><font face="Verdana, Arial, Helvetica, sans-serif" size="-2">Size</font></th>
- <th><font face="Verdana, Arial, Helvetica, sans-serif" size="-2">Download</font></th>
+ <th><font face="Verdana, Arial, Helvetica, sans-serif" size="-2">Status</font></th>
</tr>
<:iterator begin files:>
<tr bgcolor="#FFFFFF">
<:file displayName:></a><:eif File:></font></td>
<td align="right"><font face="Verdana, Arial, Helvetica, sans-serif" size="-2"><:kb
file sizeInBytes:></font></td>
- <td> <font face="Verdana, Arial, Helvetica, sans-serif" size="-2"><:if
- File forSale:> Sorry, this document cannot be downloaded <:or File:>
- <a href="/cgi-bin/user.pl?download_file=1&file=<:file id:>">Download</a>
- <:eif File:> </font></td>
+ <td nowrap align="center"> <:if
+ File forSale:><img src="/images/filestatus/locked.gif" width="15" height="15" alt="Locked" title="Locked"><img src="/images/filestatus/forSale.gif" width="15" height="15" alt="File must be purchased" title="File must be purchased"><:or File:><a href="/cgi-bin/user.pl?download_file=1&file=<:file id:>"><img src="/images/filestatus/download.gif" width="15" height="15" alt="Download now" title="Download now" border="0"></a><:ifFile requireUser:><img src="/images/filestatus/requireUser.gif" width="15" height="15" alt="For registered users only" title="For registered users only"><:or:><img src="/images/trans_pixel.gif" width="15" height="15" title="For registered users only"><:eif:><:eif File:></td>
</tr>
<:iterator end files:>
</table>
<th><font face="Verdana, Arial, Helvetica, sans-serif" size="-2">Description</font></th>
<th><font face="Verdana, Arial, Helvetica, sans-serif" size="-2">Filename</font></th>
<th><font face="Verdana, Arial, Helvetica, sans-serif" size="-2">Size</font></th>
- <th><font face="Verdana, Arial, Helvetica, sans-serif" size="-2">Download</font></th>
+ <th><font face="Verdana, Arial, Helvetica, sans-serif" size="-2">Status</font></th>
</tr>
<:iterator begin files:>
<tr bgcolor="#FFFFFF">
<:file displayName:></a><:eif File:></font></td>
<td align="right"><font face="Verdana, Arial, Helvetica, sans-serif" size="-2"><:kb
file sizeInBytes:></font></td>
- <td> <font face="Verdana, Arial, Helvetica, sans-serif" size="-2"><:if
- File forSale:> Sorry, this document cannot be downloaded <:or File:>
- <a href="/cgi-bin/user.pl?download_file=1&file=<:file id:>">Download</a>
- <:eif File:> </font></td>
+ <td nowrap align="center"> <:if
+ File forSale:><img src="/images/filestatus/locked.gif" width="15" height="15" alt="Locked" title="Locked"><img src="/images/filestatus/forSale.gif" width="15" height="15" alt="File must be purchased" title="File must be purchased"><:or File:><a href="/cgi-bin/user.pl?download_file=1&file=<:file id:>"><img src="/images/filestatus/download.gif" width="15" height="15" alt="Download now" title="Download now" border="0"></a><:ifFile requireUser:><img src="/images/filestatus/requireUser.gif" width="15" height="15" alt="For registered users only" title="For registered users only"><:or:><img src="/images/trans_pixel.gif" width="15" height="15" title="For registered users only"><:eif:><:eif File:></td>
</tr>
<:iterator end files:>
</table>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title><:article title:></title>
:>-----------------------------------------------------------------
Total: <:order total |m10:>
GST: <:order gst |m10:>
+
+<:ifEq [order paymentType] "0" :>Paid by credit card.<:or:><:eif
+:><:ifEq [order paymentType] "1" :>Will be paid by cheque<:or
+:><:eif:><:ifEq [order paymentType] "2"
+:>We will call you to arrange for payment<:or:><:eif:>
Total: <:order total |m10:>
GST: <:order gst |m10:>
+<:ifEq [order paymentType] "0":>Paid by credit card:
Card No. : <:cardNumber:>
Expires : <:cardExpiry:>
Name on Card : <:order ccName:>
-Card Type : <:order ccType :>
+Card Type : <:order ccType :><:or:><:eif
+:><:ifEq [order paymentType] "1" :>Will be paid by cheque<:or
+:><:eif:><:ifEq [order paymentType] "2"
+:>Please call the customer to arrange for payment<:or:><:eif:>
</table>
</form>
<:or Product:><br>
+<br>
<table border="0" cellspacing="0" cellpadding="1" bgcolor="#CCCCCC">
<tr>
<td>
<th><font face="Verdana, Arial, Helvetica, sans-serif" size="-2">Description</font></th>
<th><font face="Verdana, Arial, Helvetica, sans-serif" size="-2">Filename</font></th>
<th><font face="Verdana, Arial, Helvetica, sans-serif" size="-2">Size</font></th>
- <th><font face="Verdana, Arial, Helvetica, sans-serif" size="-2">Download</font></th>
+ <th><font face="Verdana, Arial, Helvetica, sans-serif" size="-2">Status</font></th>
</tr>
<:iterator begin files:>
<tr bgcolor="#FFFFFF">
<:file displayName:></a><:eif File:></font></td>
<td align="right"><font face="Verdana, Arial, Helvetica, sans-serif" size="-2"><:kb
file sizeInBytes:></font></td>
- <td> <font face="Verdana, Arial, Helvetica, sans-serif" size="-2"><:if
- File forSale:>Downloadable on purchase<:or File:> <a href="/cgi-bin/user.pl?download_file=1&file=<:file id:>">Download</a>
- <:eif File:> </font></td>
+ <td nowrap align="center"> <:if
+ File forSale:><img src="/images/filestatus/locked.gif" width="15" height="15" alt="Locked" title="Locked"><img src="/images/filestatus/forSale.gif" width="15" height="15" alt="File must be purchased" title="File must be purchased"><:or File:><a href="/cgi-bin/user.pl?download_file=1&file=<:file id:>"><img src="/images/filestatus/download.gif" width="15" height="15" alt="Download now" title="Download now" border="0"></a><:ifFile requireUser:><img src="/images/filestatus/requireUser.gif" width="15" height="15" alt="For registered users only" title="For registered users only"><:or:><img src="/images/trans_pixel.gif" width="15" height="15" title="For registered users only"><:eif:><:eif File:></td>
</tr>
<:iterator end files:>
</table>
<:if Prodfiles:>
<table width="100%" cellpadding="3" cellspacing="1">
<tr bgcolor="#CCCCCC">
- <th colspan="3"><font face="Verdana, Arial, Helvetica, sans-serif" size="2" color="#666666"><:if
+ <th colspan="4"><font face="Verdana, Arial, Helvetica, sans-serif" size="2" color="#666666"><:if
Order filled:>Files available<:or Order:><:ifEq [cfg downloads must_be_filled]
"yes":>Files available when order status is ‘Complete’<:or:>Files<:eif:><:eif
Order:></font></th>
<tr bgcolor="#EEEEEE">
<th width="50%" align="left"><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Description</font></th>
- <th nowrap width="50%" align="left"><font face="Verdana, Arial, Helvetica, sans-serif" size="2">File</font></th>
+ <th nowrap width="50%" align="left" colspan="2"><font face="Verdana, Arial, Helvetica, sans-serif" size="2">File</font></th>
<th><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Size</font></th>
</tr>
<:iterator begin items:>
<td nowrap width="50%"><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><:if
FileAvail:><a href="/cgi-bin/user.pl?download=1&file=<:prodfile id:>&order=<:order id:>&item=<:item id:>"><:prodfile
displayName:></a><:or FileAvail:><:prodfile displayName:><:eif FileAvail:></font></td>
+ <td><:if FileAvail:><a href="/cgi-bin/user.pl?download=1&file=<:prodfile id:>&order=<:order id:>&item=<:item id:>"><img src="/images/filestatus/download.gif" width="15" height="15" alt="Download now" title="Download now" border="0"></a><:or FileAvail:><img src="/images/filestatus/locked.gif" width="15" height="15" alt="Locked" title="Locked"><:eif FileAvail:></td>
<td align="right"><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><:kb
prodfile sizeInBytes:></font></td>
</tr>
use BSE::Test;
++$|;
-print "1..39\n";
+print "1..43\n";
my $baseurl = base_url;
ok($baseurl =~ /^http:/, "basic check of base url");
my $ua = make_ua;
qr!Section\sDetails!s);
fetch_ok($ua, "edit catalog form", "$baseurl/cgi-bin/admin/add.pl?id=4",
qr!Catalog\sDetails!s);
+fetch_ok($ua, "user list", "$baseurl/cgi-bin/admin/adminusers.pl",
+ qr!Admin\sUsers!s);
+fetch_ok($ua, "group list", "$baseurl/cgi-bin/admin/adminusers.pl?a_groups=1",
+ qr!Admin\sGroups!s);