1 |
dpavlin |
1.1 |
<? |
2 |
|
|
include_once( "global.php" ); |
3 |
|
|
include_once( "dbconnect.php" ); |
4 |
|
|
include_once( "$phormationdir/form.php" ); |
5 |
|
|
include_once( "$phormationdir/multiform.php" ); |
6 |
|
|
include_once( "$phormationdir/file_upload.php" ); |
7 |
|
|
|
8 |
|
|
function html_before_form() |
9 |
|
|
{ |
10 |
|
|
?> |
11 |
|
|
<HTML> |
12 |
|
|
<HEAD> |
13 |
|
|
<link rel="stylesheet" type="text/css" href="styles.css"> |
14 |
|
|
</HEAD> |
15 |
|
|
<BODY bgcolor="#FFFFFF"> |
16 |
|
|
<? |
17 |
|
|
} |
18 |
|
|
function html_after_form() |
19 |
|
|
{ |
20 |
|
|
?> |
21 |
|
|
</BODY> |
22 |
|
|
</HTML> |
23 |
|
|
<? |
24 |
|
|
} |
25 |
|
|
if( empty( $numforms ) ) { |
26 |
|
|
$numforms = 2; |
27 |
|
|
} |
28 |
|
|
|
29 |
|
|
// define the fields in the form |
30 |
|
|
$fields[] = "firstname"; |
31 |
|
|
$names[] = "First Name"; |
32 |
|
|
$types[]="type=text&width=20&length=50&required=1"; |
33 |
|
|
|
34 |
|
|
$fields[] = "lastname"; |
35 |
|
|
$names[] = "Last Name"; |
36 |
|
|
$types[]="type=text&width=20&length=50&required=1"; |
37 |
|
|
|
38 |
|
|
$fields[] = "phone"; |
39 |
|
|
$names[] = "Phone Number"; |
40 |
|
|
$types[]="type=phone"; |
41 |
|
|
|
42 |
|
|
$fields[] = "email"; |
43 |
|
|
$names[] = "Email Address"; |
44 |
|
|
$types[]="type=email&width=20&length=50"; |
45 |
|
|
|
46 |
|
|
$fields[] = "typeid"; |
47 |
|
|
$names[] = "Type"; |
48 |
|
|
$types[]="type=select&map[P]=Personal&map[B]=Business&selecttype=dropdown"; |
49 |
|
|
|
50 |
|
|
$fields[] = "notes"; |
51 |
|
|
$names[] = "Notes"; |
52 |
|
|
$types[]="type=text&height=5&width=40&length=5000"; |
53 |
|
|
|
54 |
|
|
$fields[] = "photo,origphoto"; |
55 |
|
|
$names[] = "Photo"; |
56 |
|
|
$types[]="type=file&process_hook=default_image_process_hook&processparm=photoseq&targetdir=/home/jdhildeb/public_html/phexample/pics&showfilename=1&imagemode=1&serverdir=pics"; |
57 |
|
|
|
58 |
|
|
$opts = array(); |
59 |
|
|
$url = array(); |
60 |
|
|
$opts["maxforms"] = 10; |
61 |
|
|
$opts["numforms_prompt"] = "Select the number of records to create:"; |
62 |
|
|
$opts["item_heading"] = "Contact"; |
63 |
|
|
$url["home"] = "contact_index.php"; |
64 |
|
|
|
65 |
|
|
multiform_main( "contact", "id", $fields, $names, $types, $record_id, $url, $opts, $numforms ); |
66 |
|
|
?> |