-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathformbuilder.cgi
More file actions
executable file
·53 lines (47 loc) · 1.05 KB
/
formbuilder.cgi
File metadata and controls
executable file
·53 lines (47 loc) · 1.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#!/usr/bin/perl
#
# Written by Marco Wise <marco.wise@stanford.edu>
# Copyright 2008,2009 Board of Trustees, Leland Stanford Jr. University
#
# See LICENSE for licensing terms.
#
use strict;
use warnings;
use lib 'includes';
use FB;
use AppConfig qw(:expand :argcount);
my $config = AppConfig->new(
'language' => {
ARGCOUNT => ARGCOUNT_ONE,
DEFAULT => 'en_us',
},
'templates_path' => {
ARGCOUNT => ARGCOUNT_LIST,
DEFAULT => 'templates',
},
'max_forms_per_user' => {
ARGCOUNT => ARGCOUNT_ONE,
DEFAULT => 20,
},
'users_max_forms' => {
ARGCOUNT => ARGCOUNT_ONE,
DEFAULT => 20,
},
'users_can_create_new' => {
ARGCOUNT => ARGCOUNT_ONE,
DEFAULT => 1,
},
'users_can_create_automatically' => {
ARGCOUNT => ARGCOUNT_ONE,
DEFAULT => 1,
},
);
$config->file('includes/config.txt');
my $fb = new FB($config);
eval {
$fb->build();
};
if ($@) {
$fb->display_error(error_message => $@, fatal => 1);
}
exit;