1<?php
2
3
4$output = "";
5
6  //Make the form
7$output .= '<a name="form"></a>';
8
9//Add the fields
10$output .= '<form name="onlineordering_form" id="onlineordering_form" method="post" action="?'.$_SERVER['QUERY_STRING'].'#form">';
11$output .= '<input type="hidden" name="onlineordering_stage" id="onlineordering_stage" value="1">';
12
13$output .= '<b>'.$this->getLang('enter_values').'</b><br />';
14$output .= $this->getLang('mandatory_fields').'<br /><br />';
15
16$output .= '<table>';
17
18//Title
19$form_title = $form['title'];
20$output .= '<tr>';
21$output .= 	'<th><label for="title">'.$this->getLang('title').'</label></th>';
22$output .= 	'<td><select size="1" name="onlineordering_title" id="onlineordering_title" tabindex="0">';
23//No-Title
24$output .= '<option ';
25if ($form_title == "") { $output .= 'selected'; }
26$output .= ' value=""></option>';
27$output .= '<option ';
28//Ms
29if ($form_title == $this->getLang('field_title_ms') ) { $output .= 'selected'; }
30$output .= ' value="'.$this->getLang('field_title_ms').'">'.$this->getLang('field_title_ms').'</option>';
31$output .= '<option ';
32//Mr
33if ($form_title == $this->getLang('field_title_mr') ) { $output .= 'selected'; }
34$output .= ' value="'.$this->getLang('field_title_mr').'">'.$this->getLang('field_title_mr').'</option>';
35$output .= '</select></td>';
36$output .= '</tr>';
37
38//Firstname
39$output .= '<tr>';
40$output .= 	'<th><label for="firstname">'.$this->getLang("firstname").'<i>*</i></label></th>';
41$output .= 	'<td><input type="text" name="onlineordering_firstname" id="onlineordering_firstname" tabindex="1" size="20" value="'.$form['firstname'].'"/></td>';
42$output .= '</tr>';
43
44//Lastname
45$output .= '<tr>';
46$output .= 	'<th><label for="lastname">'.$this->getLang('lastname').'<i>*</i></label></th>';
47$output .= 	'<td><input type="text" name="onlineordering_lastname" id="onlineordering_lastname" tabindex="2" size="20" value="'.$form['lastname'].'"/></td>';
48$output .= '</tr>';
49
50//Street
51$output .= '<tr>';
52$output .= 	'<th><label for="street">'.$this->getLang('street').'<i>*</i></label></th>';
53$output .= 	'<td><input type="text" name="onlineordering_street" id="onlineordering_street" tabindex="3" size="40" value="'.$form['street'].'"/></td>';
54$output .= '</tr>';
55
56//Zipcode
57$output .= '<tr>';
58$output .= 	'<th><label for="postcode">'.$this->getLang('postcode').'<i>*</i></label></th>';
59$output .= 	'<td><input type="text" name="onlineordering_postcode" id="onlineordering_postcode" tabindex="4" size="5" value="'.$form['postcode'].'"/></td>';
60$output .= '</tr>';
61
62//City
63$output .= '<tr>';
64$output .= 	'<th><label for="place">'.$this->getLang('place').'<i>*</i></label></th>';
65$output .= 	'<td><input type="text" name="onlineordering_place" id="onlineordering_place" tabindex="5" size="20" value="'.$form['place'].'"/></td>';
66$output .= '</tr>';
67
68//Country
69$output .= '<tr>';
70$output .= 	'<th><label for="country">'.$this->getLang('country').'<i>*</i></label></th>';
71$output .= 	'<td><select size="1" name="onlineordering_country" id="onlineordering_country" tabindex="6">';
72
73// Get the countries
74$countries = $data['countries'];
75if ( !isset( $countries ) )
76{
77    // Use the configuration parameter
78    $countries = $this->_get_countries();
79}
80
81if ( count( $countries ) == 1 )
82{
83    $output .= '<option selected value="'.$countries[0].'">'.$countries[0].'</option>';
84}
85else {
86    // Loop through the countries
87    for ( $index = 0; $index < count( $countries ); $index++ )
88    {
89        $country = $countries[ $index ];
90
91        $output .= '<option ';
92        if ( $country == $form['country'])
93        {
94            $output .= 'selected ';
95        }
96        $output .= 'value="'.$country.'">'.$country.'</option>';
97    }
98}
99
100$output .= '</select></td>';
101$output .= '</tr>';
102
103//Email
104$output .= '<tr>';
105$output .= 	'<th><label for="email">'.$this->getLang('email').'<i>*</i></label></th>';
106$output .= 	'<td><input type="text" name="onlineordering_email" id="onlineordering_email" tabindex="7" size="20" value="'.$form['email'].'"/></td>';
107$output .= '</tr>';
108
109//Tickets
110$output .= '<tr>';
111$output .= '<th><label for="tickets">'.$this->getLang('nr_tickets').'<i>*</i></label></th>';
112$output .= '<td><input type="text" name="onlineordering_tickets" id="onlineordering_tickes" tabindex="8" size="3" value="'.$form['tickets'].'"/>';
113
114$porto = '';
115if ( count($countries) == 1 )
116{
117    // Get the porto of the country
118    $porto = number_format($this->_get_porto($data, $countries[0]), 2, ",", ":").' '.$data['currency']. ' ';
119}
120$output .= ' ('.$this->getLang("ppu").': '.number_format($data['price'],2,",",":").' '.$data['currency'].' + '.$porto.$this->getLang('porto').' )</td>';
121$output .= '</tr>';
122
123//Remarks
124$output .= '<tr>';
125$output .= '<th><label for="remarks">'.$this->getLang('remarks').'</label></th>';
126$output .= '<td colspan="2"><textarea cols="40" rows="5" name="onlineordering_remarks" id="onlineordering_remarks" tabindex="9">'.$form['remarks'].'</textarea></td>';
127$output .= '</tr>';
128
129$output .= '</table>';
130
131//Submit
132$output .= '<br /><input type="submit" name="Submit" value="'.$this->getLang('confirm').'" tabindex="10" />';
133$output .= '</form>';
134
135
136?>