]> git.sur5r.net Git - bacula/docs/blob - docs/home-page/en/pages/testimonial.php
ebl Send new testimonials to rt
[bacula/docs] / docs / home-page / en / pages / testimonial.php
1 <? 
2 require_once("inc/header.php"); 
3
4 $dat_dir = '/var/www/testimonials';
5 $upload_dir = '/var/www/bacula';
6 $password='';
7 // 0 No
8 // 1 Yes
9 $org_type_lst = array(
10        'empty'   => "SELECT ONE",
11        '100' => "Church / Religious Organization",
12        '101' => "Corporation",
13        '102' => "Educational Institution",
14        '103' => "Government",
15        '104' => "Military",
16        '105' => "Non-Profit Organization",
17        '107' => "Small Business",
18        '106' => "Other"
19 );
20
21 $version_lst = array(
22        'empty'   => "SELECT ONE",
23        '200'   => "1.36.x",
24        '201'   => "1.38.x",
25        '202'   => "2.0.x",
26        '203'   => "2.2.x",
27        '204'   => "SVN version"
28 );
29
30 $catalog_lst = array(
31        'empty'   => "SELECT ONE",
32        '300'   => "MySQL",
33        '301'   => "PostgreSQL",
34        '303'   => "SqLite"
35 );
36
37 $org_industry_lst = array(
38  'empty'   => 'SELECT ONE',                     '400'  => 'Aerospace / Aeronautical',
39  '401'  => 'Agriculture / Farming',             '402'  => 'Architecture / Design',
40  '403'  => 'Arts',                              '404'  => 'ASP',
41  '405'  => 'Banking',
42  '406'  => 'Church / Religious Organization',   '407'  => 'Coaching',
43  '408'  => 'Construction',                      '409'  => 'Consulting (General)',
44  '410'  => 'Consulting (Information Technology)','411' => 'Defense Industry',
45  '412'  => 'Education / Training',              '413'  => 'Energy Industry',
46  '414'  => 'Engineering',                       '415'  => 'Entertainment (Film)',
47  '416'  => 'Entertainment (Music)',             '417'  => 'Entertainment (Other)',
48  '418'  => 'Event Management / Conferences',    '419'  => 'Finance / Banking / Accounting',
49  '420'  => 'Food Service Industry',             '421'  => 'Government',
50  '422'  => 'Healthcare / Medicine',             '423'  => 'Higher Education',
51  '424'  => 'Insurance',                         '425'  => 'Internet Service Provider',
52  '426'  => 'K-12 Education',                    '427'  => 'Law Enforcement / Emergency Management',
53  '428'  => 'Legal',                             '429'  => 'Manufacturing (Computer Equipment)',
54  '430'  => 'Manufacturing (General)',           '431'  => 'Media (Publishing, Broadcasting, etc)',
55  '432'  => 'Military',                          '433'  => 'Mining',
56  '434'  => 'Natural Resources / Environment',   '435'  => 'Pharmaceuticals',
57  '436'  => 'Public Relations / Advertising',    '437'  => 'Real Estate',
58  '438'  => 'Retail / Consumer Goods',           '439'  => 'Sales / Marketing',
59  '440'  => 'Scientific Research',               '441'  => 'Sports / Recreation',
60  '442'  => 'Technical College / Trade School',  '443'  => 'Telecommunications',
61  '444'  => 'Transportation Industry (Air)',     '445'  => 'Transportation Industry (General)',
62  '446'  => 'Transportation Industry (Marine)',  '447'  => 'Travel / Tourism / Lodging',
63  '448'  => 'Travel Industry',                   '449'  => 'Utilities / Public Works',
64  '450'  => 'Other'                             
65 );
66
67 $os_lst = array(
68    'empty'  =>  'SELECT ONE',        '500' =>  'AIX',
69    '501' =>  'FreeBSD',              '502' =>  'HP-UX',
70    '503' =>  'Linux (Debian)',       '504' =>  'Linux (Fedora)',
71    '505' =>  'Linux (Gentoo)',       '506' =>  'Linux (Mandriva)',
72    '507' =>  'Linux (Other)',        '508' =>  'Linux (RedHat)',
73    '509' =>  'Linux (Slackware)',    '510' =>  'Linux (Suse)',
74    '511' =>  'Mac OS X',             '512' =>  'NetBSD',
75    '513' =>  'OpenBSD',              '514' =>  'Other',
76    '515' =>  'Solaris',              '516' =>  'Windows 2000',
77    '517' =>  'Windows 2003',         '518' =>  'Windows XP',
78    '519' =>  'Windows Vista'
79 ); 
80
81 $country_lst = array(
82    'empty' =>  'SELECT ONE',              '1001'  =>  'Afghanistan',
83    '1002'  =>  'Albania',                 '1003'  =>  'Algeria',
84    '1004'  =>  'American Samoa',          '1005'  =>  'Andorra',
85    '1006'  =>  'Angola',                  '1007'  =>  'Anguilla',
86    '1008'  =>  'Antarctica',              '1009'  =>  'Antigua and Barbuda',
87    '1010'  =>  'Argentina',               '1011'  =>  'Armenia',
88    '1012'  =>  'Aruba',                   '1013'  =>  'Australia',
89    '1014'  =>  'Austria',                 '1015'  =>  'Azerbaijan',
90    '1016'  =>  'Bahamas',                 '1017'  =>  'Bahrain',
91    '1018'  =>  'Bangladesh',              '1019'  =>  'Barbados',
92    '1020'  =>  'Belarus',                 '1021'  =>  'Belgium',
93    '1022'  =>  'Belize',                  '1023'  =>  'Benin',
94    '1024'  =>  'Bermuda',                 '1025'  =>  'Bhutan',
95    '1026'  =>  'Bolivia',                 '1027'  =>  'Bosnia and Herzegovina',
96    '1028'  =>  'Botswana',                '1029'  =>  'Bouvet Island',
97    '1030'  =>  'Brazil',                  '1031'  =>  'Brunei Darussalam',
98    '1032'  =>  'Bulgaria',                '1033'  =>  'Burkina Faso',
99    '1034'  =>  'Burundi',                 '1035'  =>  'Cambodia',
100    '1036'  =>  'Cameroon',                '1037'  =>  'Canada',
101    '1038'  =>  'Cape Verde',              '1039'  =>  'Cayman Islands',
102    '1040'  =>  'Central African Republic','1041'  =>  'Chad',
103    '1042'  =>  'Chile',                   '1043'  =>  'China',
104    '1044'  =>  'Christmas Island',        '1045'  =>  'Colombia',
105    '1046'  =>  'Comoros',                 '1047'  =>  'Congo',
106    '1048'  =>  'Cook Islands',            '1049'  =>  'Costa Rica',
107    '1054'  =>  "Ivory Coast",             '1050'  =>  'Croatia',
108    '1051'  =>  'Cuba',                    '1052'  =>  'Cyprus',
109    '1053'  =>  'Czech Republic',          '1055'  =>  'Denmark',
110    '1056'  =>  'Djibouti',                '1057'  =>  'Dominica',
111    '1058'  =>  'Dominican Republic',      '1059'  =>  'East Timor',
112    '1060'  =>  'Ecuador',                 '1061'  =>  'Egypt',
113    '1062'  =>  'El Salvador',             '1063'  =>  'Equatorial Guinea',
114    '1064'  =>  'Eritrea',                 '1065'  =>  'Estonia',
115    '1066'  =>  'Ethiopia',                '1067'  =>  'Falkland Islands',
116    '1068'  =>  'Faroe Islands',           '1069'  =>  'Fiji',
117    '1070'  =>  'Finland',                 '1071'  =>  'France',
118    '1072'  =>  'French Guiana',           '1073'  =>  'French Polynesia',
119    '1074'  =>  'Gabon',                   '1075'  =>  'Gambia',
120    '1076'  =>  'Georgia',                 '1077'  =>  'Germany',
121    '1078'  =>  'Ghana',                   '1079'  =>  'Gibraltar',
122    '1080'  =>  'Greece',                  '1081'  =>  'Greenland',
123    '1082'  =>  'Grenada',                 '1083'  =>  'Guadeloupe',
124    '1084'  =>  'Guam',                    '1085'  =>  'Guatemala',
125    '1086'  =>  'Guinea',                  '1087'  =>  'Guinea-Bissau',
126    '1088'  =>  'Guyana',                  '1089'  =>  'Haiti',
127    '1090'  =>  'Honduras',                '1091'  =>  'Hong Kong',
128    '1092'  =>  'Hungary',                 '1093'  =>  'Iceland',
129    '1094'  =>  'India',                   '1095'  =>  'Indonesia',
130    '1096'  =>  'Iran',                    '1097'  =>  'Iraq',
131    '1098'  =>  'Ireland',                 '1099'  =>  'Israel',
132    '1100'  =>  'Italy',                    '1101' =>  'Jamaica',
133    '1102'  =>  'Japan',                    '1103' =>  'Jordan',
134    '1104'  =>  'Kazakstan',                '1105' =>  'Kenya',
135    '1106'  =>  'Kiribati',                 '1107' =>  'Kuwait',
136    '1108'  =>  'Kyrgystan',                '1109' =>  'Lao',
137    '1110'  =>  'Latvia',                   '1111' =>  'Lebanon',
138    '1112'  =>  'Lesotho',                  '1113' =>  'Liberia',
139    '1232'  =>  'Libya',                    '1114' =>  'Liechtenstein',
140    '1115'  =>  'Lithuania',                '1116' =>  'Luxembourg',
141    '1117'  =>  'Macau',                    '1118' =>  'Macedonia (FYR)',
142    '1119'  =>  'Madagascar',               '1120' =>  'Malawi',
143    '1121'  =>  'Malaysia',                 '1122' =>  'Maldives',
144    '1123'  =>  'Mali',                     '1124' =>  'Malta',
145    '1125'  =>  'Marshall Islands',         '1126' =>  'Martinique',
146    '1127'  =>  'Mauritania',               '1128' =>  'Mauritius',
147    '1129'  =>  'Mayotte',                  '1130' =>  'Mexico',
148    '1131'  =>  'Micronesia',               '1132' =>  'Moldova',
149    '1133'  =>  'Monaco',                   '1134' =>  'Mongolia',
150    '1135'  =>  'Montserrat',               '1136' =>  'Morocco',
151    '1137'  =>  'Mozambique',               '1138' =>  'Myanmar',
152    '1139'  =>  'Namibia',                  '1140' =>  'Nauru',
153    '1141'  =>  'Nepal',                    '1142' =>  'Netherlands',
154    '1143'  =>  'Netherlands Antilles',     '1144' =>  'Neutral Zone',
155    '1145'  =>  'New Caledonia',            '1146' =>  'New Zealand',
156    '1147'  =>  'Nicaragua',                '1148' =>  'Niger',
157    '1149'  =>  'Nigeria',                  '1150' =>  'Niue',
158    '1151'  =>  'Norfolk Island',           '1152' =>  'North Korea',
159    '1153'  =>  'Northern Mariana Islands', '1154' =>  'Norway',
160    '1155'  =>  'Oman',                     '1156' =>  'Pakistan',
161    '1157'  =>  'Palau',                    '1158' =>  'Panama',
162    '1159'  =>  'Papua New Guinea',         '1160' =>  'Paraguay',
163    '1161'  =>  'Peru',                     '1162' =>  'Philippines',
164    '1163'  =>  'Pitcairn',                 '1164' =>  'Poland',
165    '1165'  =>  'Portugal',                 '1166' =>  'Puerto Rico',
166    '1167'  =>  'Qatar',                    '1168' =>  'Reunion',
167    '1169'  =>  'Romania',                  '1170' =>  'Russian Federation',
168    '1171'  =>  'Rwanda',                   '1172' =>  'Saint Helena',
169    '1173'  =>  'Saint Kitts and Nevis',    '1174' =>  'Saint Lucia',
170    '1175'  =>  'Saint Pierre and Miquelon','1231' =>  'Saint Vincent and the Grenadines',
171    '1176'  =>  'Samoa',                    '1177' =>  'San Marino',
172    '1178'  =>  'Sao Tome and Principe',    '1179' =>  'Saudi Arabia',
173    '1180'  =>  'Senegal',                  '1227' =>  'Serbia and Montenegro',
174    '1181'  =>  'Seychelles',               '1182' =>  'Sierra Leone',
175    '1183'  =>  'Singapore',                '1184' =>  'Slovakia',
176    '1185'  =>  'Slovenia',                 '1186' =>  'Solomon Islands',
177    '1187'  =>  'Somalia',                  '1188' =>  'South Africa',
178    '1189'  =>  'South Georgia',            '1190' =>  'South Korea',
179    '1191'  =>  'Spain',                    '1192' =>  'Sri Lanka',
180    '1193'  =>  'Sudan',                    '1194' =>  'Suriname',
181    '1195'  =>  'Swaziland',                '1196' =>  'Sweden',
182    '1197'  =>  'Switzerland',              '1198' =>  'Syria',
183    '1199'  =>  'Taiwan',                   '1200' =>  'Tajikistan',
184    '1201'  =>  'Tanzania',                 '1202' =>  'Thailand',
185    '1203'  =>  'Togo',                     '1204' =>  'Tokelau',
186    '1205'  =>  'Tonga',                    '1206' =>  'Trinidad and Tobago',
187    '1207'  =>  'Tunisia',                  '1208' =>  'Turkey',
188    '1209'  =>  'Turkmenistan',             '1210' =>  'Turks and Caicos Islands',
189    '1211'  =>  'Tuvalu',                   '1212' =>  'Uganda',
190    '1213'  =>  'Ukraine',                  '1214' =>  'United Arab Emirates',
191    '1215'  =>  'United Kingdom',           '1216' =>  'United States of America',
192    '1217'  =>  'Uruguay',                  '1218' =>  'Uzbekistan',
193    '1219'  =>  'Vanuatu',                  '1233' =>  'Vatican City',
194    '1220'  =>  'Venezuela',                '1221' =>  'Vietnam',
195    '1222'  =>  'Virgin Islands (British)', '1223' =>  'Virgin Islands (U.S.)',
196    '1224'  =>  'Wallis and Futuna Islands','1225' =>  'Western Sahara',
197    '1226'  =>  'Yemen',                    '1228' =>  'Zaire',
198    '1229'  =>  'Zambia',                   '1230' =>  'Zimbabwe'
199 );
200
201 admin_link();
202
203 if ($_REQUEST['action'] == 'Add' or $_REQUEST['action'] == 'Modify')
204 {
205
206 ?>
207
208 <script type="text/javascript" language="JavaScript">
209
210 function validate_testimonial (form) {
211     var alertstr = '';
212     var invalid  = 0;
213     var invalid_fields = new Array();
214     var ok;
215     // email: standard text, hidden, password, or textarea box
216     var email = form.elements['email_address'].value;
217     if (email == null || ! email.match(/^[\w\-\+\._]+\@[a-zA-Z0-9][-a-zA-Z0-9\.]*\.[a-zA-Z]+$/)) {
218         alertstr += '- Invalid entry for the "Email" field\n';
219         invalid++;
220         invalid_fields.push('email_address');
221     }
222
223     // contact_name: standard text, hidden, password, or textarea box
224     var contact_name = form.elements['contact_name'].value;
225     if (contact_name == null || ! contact_name.match(/^[a-zA-Z]+[- ]?[a-zA-Z]+\s*,?([a-zA-Z]+|[a-zA-Z]+\.)?$/)) {
226         alertstr += '- Invalid entry for the "Contact Name" field\n';
227         invalid++;
228         invalid_fields.push('contact_name');
229     }
230
231     // org_name: standard text, hidden, password, or textarea box
232     var org_name = form.elements['org_name'].value;
233     if (org_name == null || ! org_name.match(/^[a-zA-Z0-9();@%, :!\/]+$/)) {
234         alertstr += '- Invalid entry for the "Organization Name" field\n';
235         invalid++;
236         invalid_fields.push('org_name');
237     }
238     var number = form.elements['orgtype_id'].value;
239     if (number == null || ! number.match(/^[0-9]+$/)) {
240         alertstr += '-  Choose one of the "Organization type" options\n';
241         invalid_fields.push('orgtype_id');
242         invalid++;
243     } 
244     number = form.elements['orgindustry_id'].value;
245     if (number == null || ! number.match(/^[0-9]+$/)) {
246         alertstr += '- Choose one of the "Organization industry type" options\n';
247         invalid_fields.push('orgindustry_id');
248         invalid++;
249     }
250     var org_size = form.elements['org_size'].value;
251     if (org_size == null || ! org_size.match(/^[0-9,\.]+$/)) {
252         alertstr += '- Invalid entry for the "Organization size" field\n';
253         invalid_fields.push('org_size');
254         invalid++;
255     }
256
257     var bacula_version = form.elements['bacula_version'].value;
258     if (bacula_version == null || ! bacula_version.match(/^[0-9]+$/)) {
259         alertstr += '- Invalid entry for the "Bacula version" field\n';
260         invalid_fields.push('bacula_version');
261         invalid++;
262     }
263     var ostype = form.elements['ostype_id'].value;
264     if (ostype == null || ! ostype.match(/^[0-9]+$/)) {
265         alertstr += '-  Choose one of the "Director OS" field\n';
266         invalid_fields.push('ostype_id');
267         invalid++;
268     }
269     var catalog = form.elements['catalog_id'].value;
270     if (catalog == null || ! catalog.match(/^[0-9]+$/)) {
271         alertstr += '-  Choose one of the "Catalog type" field\n';
272         invalid_fields.push('catalog_id');
273         invalid++;
274     }
275     var number = form.elements['number_fd'].value;
276     if (number == null || ! number.match(/^[0-9,\.]+$/)) {
277         alertstr += '-  Invalid entry for the "Number of Client" field\n';
278         invalid_fields.push('number_fd');
279         invalid++;
280     } 
281     number = form.elements['number_sd'].value;
282     if (number == null || ! number.match(/^[0-9,\.]+$/)) {
283         alertstr += '-  Invalid entry for the "Number of Storage" field\n';
284         invalid_fields.push('number_sd');
285         invalid++;
286     } 
287     number = form.elements['number_dir'].value;
288     if (number == null || ! number.match(/^[0-9,\.]+$/)) {
289         alertstr += '-  Invalid entry for the "Number of Director" field\n';
290         invalid_fields.push('number_dir');
291         invalid++;
292     } 
293     number = form.elements['month_gb'].value;
294     if (number == null || ! number.match(/^[0-9,\.]+$/)) {
295         alertstr += '-  Invalid entry for the "Number GB/month" field\n';
296         invalid_fields.push('month_gb');
297         invalid++;
298     } 
299     number = form.elements['number_files'].value;
300     if (number == null || ! number.match(/^[0-9,\.]+$/)) {
301         alertstr += '-  Invalid entry for the "File number" field\n';
302         invalid_fields.push('number_files');
303         invalid++;
304     } 
305     if (invalid > 0 || alertstr != '') {
306         if (! invalid) invalid = 'The following';   // catch for programmer error
307         alert(''+invalid+' error(s) were encountered with your submission:'+'\n\n'
308                 +alertstr+'\n'+'Please correct these fields and try again.');
309         return false;
310     }
311     return true;  // all checked ok
312 }
313
314 </script>
315 <table>
316 <tr>
317         <td class="contentTopic">
318                 <? echo $_REQUEST['action'] ?> Testimonial
319         </td>
320 </tr>
321 <tr>
322         <td class="content">
323
324 Want to let others know you're using Bacula? Submit a user profile!  Your
325 submission will be reviewed before being made publicly available.  We reserve
326 the right to edit your submission for spelling, grammar, etc. You will receive
327 an email when your profile has been approved for public viewing. Note that
328 while your contact name and email address are required (to verify
329 information if necessary), you can choose to have them not be published along
330 with your profile information.  
331 <br/><br/>
332 Fields marked with a * are required. Read the privacy notice below for
333 information about how this data will be used.
334
335         </td>
336 </tr>
337
338 <tr>
339         <td class="content">
340 <form name='form1' enctype="multipart/form-data" method='post' onsubmit="return validate_testimonial(this)" action='?page=testimonial'>
341 <input type='hidden' name='page' value='testimonial'>
342 <table border='0' class='Content'>
343
344 <td class='ItemName'>
345 <font color='red'>*</font>Contact Name:</td>
346 <td class='ItemValue'><input type='text' class='ItemValue' id='contact_name' 
347 name='contact_name' size='30' maxlength='100' value=''></td>
348 <td class='ItemName'>Publish Contact Name?</td>
349 <td class='ItemValue'><select name='publish_contact' class='ItemValue'>
350 <option id='publish_contact_0'  value='0' SELECTED>No
351 <option id='publish_contact_1' value='1'>Yes
352 </select></td>
353 </tr>
354
355 <tr>
356 <td class='ItemName'><font color='red'>*</font>Email Address:</td>
357 <td class='ItemValue'><input type='text' class='ItemValue' name='email_address' 
358 id='email_address' size='30' maxlength='150' value=''></td>
359 <td class='ItemName'>Publish Email Address?</td><td class='ItemValue'>
360 <select name='publish_email' class='ItemValue'>
361 <option value='0' id='publish_email_0' SELECTED>No
362 <option value='1' id='publish_email_1' >Yes
363 </select></td>
364 </tr>
365
366 <tr><td class='ItemName'>Job Description/Title:</td>
367 <td class='ItemValue'>
368 <input type='text' name='title' id='title' size='30' maxlength='100' value=''></td></tr>
369 <tr><td colspan=4><br></td></tr>
370
371 <tr><td class='ItemName'><font color='red'>*</font>Organization Name:</td>
372 <td class='ItemValue'>
373 <input type='text' class='ItemValue' name='org_name' id='org_name' 
374 size='30' maxlength='100' value=''>
375 </td><td class='ItemName'>Publish Org Name?</td><td class='ItemValue'>
376 <select name='publish_orgname' class='ItemValue'>
377 <option value='0' id='publish_orgname_0' >No
378 <option value='1' id='publish_orgname_1' SELECTED>Yes
379 </select></td>
380 </tr>
381
382 <tr><td class='ItemName'><font color='red'>*</font>Organization Type:</td>
383 <td class='ItemValue' colspan='3'>
384 <select name='orgtype_id' class='ItemValue'>
385 <?
386
387 while(list ($key, $val) = each ($org_type_lst))
388 {
389  echo "<option id='orgtype_id_$key' value='$key'>$val\n";
390 }
391
392 ?>
393 </select>
394 </td></tr>
395
396 <tr><td class='ItemName'><font color='red'>*</font>Organization Industry/Function:</td>
397 <td class='ItemValue' colspan='3'>
398 <select name='orgindustry_id' class='ItemValue'>
399 <?
400
401 while(list ($key, $val) = each ($org_industry_lst))
402 {
403  echo "<option id='orgindustry_id_$key' value='$key'>$val\n";
404 }
405
406 ?>
407 </select>
408 </td></tr>
409
410 <tr><td class='ItemName'>
411 <font color='red'>*</font>Approx. Organization Size (# of Users):</td>
412 <td class='ItemValue'>
413 <input type='text' id='org_size' class='ItemValue' name='org_size' 
414 size='4' maxlength='6' value=''></td>
415 <td class='ItemName'>Publish Org Size?</td><td class='ItemValue'><select name='publish_orgsize' class='ItemValue'>
416 <option id='publish_orgsize_0' value='0' >No
417 <option id='publish_orgsize_1' value='1' SELECTED>Yes
418 </select></td>
419 </tr>
420 <tr>
421
422 <td class='ItemName'>Website URL:</td>
423 <td class='ItemValue'>
424 <input type='text' class='ItemValue' id='website' name='website' size='30'
425  maxlength='150' value=''></td>
426 <td class='ItemName'>Publish Website?</td><td class='ItemValue'>
427 <select name='publish_website' class='ItemValue'>
428 <option id='publish_website_0' value='0' >No
429 <option id='publish_website_1' value='1' SELECTED>Yes
430 </select></td>
431 </tr>
432
433 <tr>
434 <td class='ItemName'>Organization Logo :</td>
435 <td class='ItemValue'>
436 <input type="file" name="org_logo" title="png, gif or jpeg file only please"/>
437 </td><td><i>max width 150px. png, gif or jpeg only</i></td>
438 </tr>
439
440 <tr><td class='ItemName'><font color='red'>*</font>Country:</td>
441 <td class='ItemValue'>
442 <select name='country_id' class='ItemValue'>
443 <?
444 while(list ($key, $val) = each ($country_lst))
445 {
446  echo "<option id='country_id_$key' value='$key'>$val\n";
447 }
448
449 ?>
450 </select>
451 </td></tr>
452
453 <tr><td colspan=4><br></td></tr>
454 <tr><td class='ItemName'><font color='red'>*</font>Bacula version:</td>
455 <td class='ItemValue'>
456 <select name='bacula_version' class='ItemValue'>
457 <?
458
459 while(list ($key, $val) = each ($version_lst))
460 {
461  echo "<option id='bacula_version_$key' value='$key'>$val\n";
462 }
463
464 ?>
465 </select>
466 </td></tr>
467 <tr><td class='ItemName'><font color='red'>*</font>Director OS:</td>
468 <td class='ItemValue'>
469 <select name='ostype_id' class='ItemValue'>
470 <?
471
472 while(list ($key, $val) = each ($os_lst))
473 {
474  echo "<option id='ostype_id_$key' value='$key'>$val\n";
475 }
476
477 ?>
478 </select>
479 </td></tr>
480 <tr><td class='ItemName'><font color='red'>*</font>Catalog DB:</td>
481 <td class='ItemValue'>
482 <select name='catalog_id' class='ItemValue'>
483 <?
484
485 while(list ($key, $val) = each ($catalog_lst))
486 {
487  echo "<option id='catalog_id_$key' value='$key'>$val\n";
488 }
489
490 ?>
491 </select>
492 </td></tr>
493 <tr>
494 <td class='ItemName'><font color='red'>*</font>Redundant/Failover Backup Setup?</td>
495 <td class='ItemValue'><select name='redundant_setup' class='ItemValue'>
496 <option value='0' id='redundant_setup_0' SELECTED>No
497 <option value='1' id='redundant_setup_1' >Yes
498 </select></td>
499 </tr>
500
501 <tr><td class='ItemName'><font color='red'>*</font>Number of Director (Running bacula-dir):</td>
502 <td class='ItemValue'>
503 <input type='text' class='ItemValue' id='number_dir' name='number_dir' 
504  size='5' maxlength='10' value=''></td>
505 </tr>
506
507 <tr><td class='ItemName'><font color='red'>*</font>Number of Clients (Running bacula-fd):</td>
508 <td class='ItemValue'>
509 <input type='text' class='ItemValue' id='number_fd' name='number_fd' 
510  size='5' maxlength='10' value=''></td>
511 </tr>
512
513 <tr><td class='ItemName'>
514 <font color='red'>*</font>Number of Storage Daemons (Running bacula-sd):</td>
515 <td class='ItemValue'>
516 <input type='text' class='ItemValue' id='number_sd' name='number_sd' size='5' 
517  maxlength='10' value=''></td>
518 </tr>
519
520 <tr><td class='ItemName' title="See bellow how to get this information"><font color='red'>*</font>Total # of GB saved every month:</td>
521 <td class='ItemValue'><input type='text' class='ItemValue' name='month_gb' size='5' 
522  id='month_gb' maxlength='10' value=''></td>
523 </tr>
524
525 <tr><td class='ItemName' title='See bellow how to get this information'><font color='red'>*</font>Number # of Files:</td>
526 <td class='ItemValue'><input type='text' class='ItemValue' name='number_files'
527  id='number_files' size='10' maxlength='15' value=''></td>
528 </tr>
529 <tr>
530
531 <td class='ItemName'>Need professional support:</td>
532 <td class='ItemValue'>
533 <select name='support' class='ItemValue'>
534 <option id='support_0' value='0' SELECTED>No
535 <option id='support_1' value='1'>Yes
536 </select></td>
537 </tr>
538
539 <tr><td colspan=4><br></td></tr>
540
541 <tr><td class='ItemName' valign='top'>Applicable Hardware and Network Information:</td>
542 <td class='ItemValue' colspan='3'>
543 <textarea name='hardware_comments' wrap='virtual' rows='4' id='hardware_comments'
544  cols='60' class='ItemValue'>Loader Description:
545 Barcode Reader: Yes/No
546 Number of Storage Elements:
547 Number of Import/Export Elements:
548 --
549 Nics: 
550 ...
551 </textarea>
552 </tr>
553
554 <tr><td class='ItemName' valign='top'>General Comments:</td>
555 <td class='ItemValue' colspan='3'>
556 <textarea name='comments' id='comments' wrap='virtual' rows='4' cols='60' 
557  class='ItemValue'></textarea></tr>
558
559 <tr><td></td><td>
560 <?
561  if ($_REQUEST['action'] == 'Modify') {
562   echo "<input type='hidden' title='testimonial id' id='id' name='id' class='ItemValue' value=''>";
563   echo "<input type='submit' name='action' class='ItemValue' value='Save'>";
564   echo "<input type='submit' name='action' class='ItemValue' onclick='confirm(\"Are you sure ?\");' value='Delete'><br>";
565   echo "<input type='hidden' name='page' class='ItemValue' value='testimonial'><br>";
566
567 } else {  
568   echo "<input type='submit' name='action' class='ItemValue' value='Review Profile Submission'>";
569 }
570 ?>
571
572 </td></tr>
573 </table>
574 </form>
575
576 </td>
577 </tr>
578 <tr>
579
580         <td class="content">
581         <h3 style="padding: 5px; border-bottom: 1px dotted #002244"> Getting backup information </h3>
582 To get <i>Total # of GB saved every month</i>, you can run this query on you catalog (just adapt the starttime condition and round the result)
583 <pre>
584 bacula@yourdir:~$ bconsole
585 *sql
586 SELECT sum(JobBytes)/1073741824 FROM Job WHERE StartTime > '2008-02-07' AND Type = 'B'
587 </pre>
588
589 To know how many files are in your catalog, you can run this:
590 <pre>
591 bacula@yourdir:~$ bconsole
592 *sql
593 SELECT sum(JobFiles) FROM Job WHERE Type = 'B'
594 </pre>
595         </td>
596 </tr>
597 <tr>
598         <td class="content">
599         <h3 style="padding: 5px; border-bottom: 1px dotted #002244"> Privacy Notice </h3>
600
601 The following information is required, but you may choose to not have it
602 published for public viewing if you wish: contact name, email address,
603 organization name. We may use this information to verify the data you submit if
604 we find the need.
605         </td>
606 </tr>
607
608
609 </table>
610 <?
611 }
612 if ($_REQUEST['action'] == 'Modify') {
613    $filename = get_file_from_id();
614
615    if (!$filename) {
616         return (0);
617    }
618
619    $formul = load_formul($filename);
620
621    echo "<script type='text/javascript' language='JavaScript'>\n";
622    $attribs = array('contact_name','email_address', 'org_name','title','website',
623                     'month_gb','number_files', 'number_dir','number_fd','number_sd',
624                     'org_size','id');
625    foreach ($attribs as $arr) {
626            form_set_value($formul, $arr);
627    }
628
629    $attribs = array('publish_contact','publish_email', 'publish_orgname', 'orgtype_id', 
630                     'orgindustry_id', 'publish_orgsize','publish_website', 'bacula_version',
631                     'country_id','ostype_id', 'redundant_setup', 'catalog_id', 'support');
632    foreach ($attribs as $arr) {
633         form_set_selection($formul, $arr);
634    }
635
636    $attribs = array('comments', 'hardware_comments');
637    foreach ($attribs as $arr) {
638         form_set_text($formul, $arr);
639    }
640   
641
642    echo "</script>\n";
643
644 } elseif ($_REQUEST['action'] == 'Review Profile Submission') {
645
646         $form = get_formul();
647         if (!$form) {
648                 echo "Sorry, something is missing, I can't accept your submission";
649         } else {
650                 $token = uniqid(md5(rand()), true);
651                 $filename = "$dat_dir/profile.$token";
652         
653                 $form['filename'] = $filename;  
654                 $form['id'] = $token;
655                 $form['visible']=0;
656                 save_formul($form);
657
658                 send_email($form['id'], $form['contact_name'], $form['email_address']);
659                 echo "You can modify your profile <a href='?page=testimonial&action=Modify&id=" . $form['id'] . "'>here</a> (keep this link as bookmark)<br><br>";
660                 print_formul($form);
661         }
662
663 } elseif ($_REQUEST['action'] == 'View') {
664         
665         $file = get_file_from_id();
666
667         if ($file) {
668              print_formul_file($filename,true);
669         }
670
671 } elseif ($_REQUEST['action'] == 'Delete') {
672
673         $filename = get_file_from_id();
674
675         if (!$filename) {
676             return (0);
677         }
678
679         $form = load_formul($filename);
680         
681         if ($form['org_logo'] && file_exists($form['org_logo'])) {
682             rename($upload_dir + $form['org_logo'], $upload_dir + $form['org_logo'] + '.remove');
683         }
684         if (file_exists($filename)) {
685             rename($filename, "$filename.remove");
686             echo "Profile deleted";
687         }
688
689 } elseif ($_REQUEST['action'] == 'Accept' && is_admin()) {
690
691         $filename = get_file_from_id();
692         
693         if (!$filename) {
694             return (0);
695         }
696
697         $form = load_formul($filename);
698
699         $hide = $_REQUEST['hide'];
700
701         if ($hide) {
702                 $form['visible']=0;
703         } else {
704                 $form['visible']=1;
705         }
706         save_formul($form);
707         echo $form['id'] . " is now " . ($hide?"un":"") . "visible";
708         print_formul($form);
709
710 } elseif ($_REQUEST['action'] == 'Save') {
711         
712         $filename = get_file_from_id();
713
714         if (!$filename) {
715             return (0);
716         }
717
718         $form = get_formul();
719
720         $form['filename'] = $filename;  
721         $form['id'] = $_REQUEST['id'];  // id is clean
722 //      $form['visible'] = false;
723
724         if (!$form['org_logo']) {
725             $form_old = load_formul($filename);
726             $form['org_logo'] = $form_old['org_logo'];
727         }
728
729         save_formul($form);
730
731         echo "Your profile has been modified.<br>";
732         print_formul($form);
733
734 } elseif ($_REQUEST['action'] == 'Admin' && is_admin()) {
735
736     view_all();
737
738 } elseif (!$_REQUEST['action'] || $_REQUEST['action'] == 'ViewAll') {
739
740     echo "<a href='?page=testimonial&action=Add'>Add your testimonial</a><br><br>";
741     view_all();
742
743 } elseif ($_REQUEST['action'] == 'AdminExport' && is_admin()) {
744
745    $file = get_file_from_id();
746    if (!$file) {
747        return 0;
748    }
749    $form = load_formul($file);
750    if ($form) {
751         export_form($form);
752    }
753 } elseif ($_REQUEST['action'] == 'sql') {
754    print "<pre>";
755    dump_sql();
756    print "</pre>";
757 }
758
759 function view_all()
760 {
761     global $dat_dir;
762     global $password;
763
764     $limit = $_REQUEST['limit'];
765     $offset = $_REQUEST['offset'];
766
767     $limit = is_numeric($limit)?$limit:5;
768     $offset = is_numeric($offset)?$offset:0;
769     $max = $offset + $limit;
770
771     $admin = is_admin();
772     if ($limit > 20) { $limit = 20 ;}
773
774     if ($handle = opendir($dat_dir)) {
775     /* Ceci est la facon correcte de traverser un dossier. */
776         $i = 0 ;
777         while (false !== ($file = readdir($handle))) {
778             if (preg_match("/profile.[a-z0-9\.]+/", $file)) {
779                 if (($i >= $offset) && ($i < $max)) {
780                     print_formul_file("$dat_dir/$file",$admin);
781                 }
782                 if ($i > $max) {
783                     break;
784                 }
785             $i++;
786             }
787         } 
788         closedir($handle);
789     }
790     if ($offset > 0) {
791        $offset = $offset - $limit;
792        if ($offset < 0) {
793           $offset=0;
794        }
795        echo "<a href='?page=testimonial&offset=$offset&limit=$limit$password'>Prev</a>&nbsp;";
796     }
797     if ($i >= $max) {
798        $offset = $offset + $limit;
799        echo "&nbsp;<a href='?page=testimonial&offset=$offset&limit=$limit$password'>Next</a><br>";
800     }
801 }
802
803 function export_form($formul)
804 {
805         global $country_lst, $org_type_lst, $org_industry_lst, $os_lst, $catalog_lst;
806
807         $attribs = array('contact_name','email_address', 'org_name','title','website',
808                          'hardware_comments','comments',
809                          'publish_contact','publish_email', 'publish_orgname','org_size','redundant_setup',
810                          'date','visible', 'support','number_dir',
811                          'number_fd','number_sd','month_gb','number_files','publish_orgsize','publish_website');
812         print "<pre>\n";
813         foreach ($attribs as $arr) {
814                 print "$arr = " . $formul[$arr] . "\n";
815         }
816
817         print "orgtype = " . $org_type_lst[$formul['orgtype_id']] . "\n";
818         print "orgindustry = " . $org_industry_lst[$formul['orgindustry_id']] . "\n";
819         print "bacula_version = " . $version_lst[$formul['bacula_version']] . "\n";
820         print "country = " . $country_lst[$formul['country_id']] . "\n";
821         print "ostype = " . $os_lst[$formul['ostype_id']] . "\n";
822         print "catalog = " . $catalog_lst[$formul['catalog_id']] . "\n";
823
824         print "<pre>\n";
825 }
826
827 function get_file_from_id()
828 {
829     global $dat_dir;
830     $id = $_REQUEST['id'];
831
832     if (!ereg('^[a-zA-Z0-9\.]+$',$id)) {
833          return(0) ;
834     }
835
836     $filename="$dat_dir/profile.$id";
837
838     if (!file_exists($filename)) {
839          echo "Can't verify your id";
840          return (0);
841     }       
842
843     return $filename;
844 }
845
846 function send_email($id, $name, $email)
847 {
848         // Your email address
849 //        $from = 'kern@sibbald.com';
850         $from = 'eric@eb.homelinux.org';
851
852         // The subject
853         $subject = "[BACULA] New testimonial";
854
855         // The message
856         $message = "Hello, 
857 You can modify your new testimonial at http://www.bacula.org/en/?page=testimonial&action=Modify&id=$id
858
859 Best regards.
860 ";
861
862         mail($email, $subject, $message, "From: Bacula WebMaster <$from>");
863
864         $message = "Hello, 
865 You can review this testimonial at http://www.bacula.org/en/?page=testimonial&action=Modify&id=$id
866
867 Best regards.
868 ";
869
870         
871         mail('testimonials@rt.baculasystems.com', $subject, $message, "From: $name <$email>");
872
873         echo "The email has been sent for approval.<br/>";
874 }
875
876 function save_formul($form)
877 {
878         $fp = fopen($form['filename'], 'w'); 
879         fwrite($fp, serialize($form));
880         fclose($fp);
881 }
882
883 function get_formul()
884 {
885         global $upload_dir;
886         global $dat_dir;
887         $formul = array();
888         $attribs = array('contact_name','email_address', 'org_name');
889         foreach ($attribs as $arr) {
890                 if (!$_REQUEST[$arr]) {
891                         echo "Can't get $arr<br/>";
892                         return '';
893                 }
894                 $formul[$arr] = preg_replace('/[^a-zA-Z0-9!\.?\:\/,;_()@\n -]/', " ", $_REQUEST[$arr]);
895         }
896
897         $attribs = array('title','website','hardware_comments','comments')              ;
898         foreach ($attribs as $arr) {
899                 $formul[$arr] = preg_replace('/[^a-zA-Z0-9!\.?\:\/,;_()@\n -]/', " ", $_REQUEST[$arr]);
900         }
901
902         $attribs = array('publish_contact','publish_email', 'publish_orgname', 'orgtype_id', 
903                          'orgindustry_id','org_size', 'publish_orgsize','publish_website', 'bacula_version',
904                          'country_id','ostype_id', 'redundant_setup','number_fd','number_sd','support',
905                          'month_gb','number_files','catalog_id','number_dir');
906         foreach ($attribs as $arr) {
907                 $tmp = $_REQUEST[$arr];
908                 $tmp = preg_replace("/[,\.]/", "", $tmp);
909                 if (preg_match("/^[0-9]+$/", $tmp)) {
910                         $formul[$arr] = $_REQUEST[$arr];
911                 }
912         }
913
914         $attribs = array('orgtype_id', 'orgindustry_id', 'org_size', 'country_id','bacula_version',
915                          'catalog_id', 'ostype_id','number_fd','number_sd', 'number_dir', 'month_gb','number_files');
916         foreach ($attribs as $arr) {
917                 if (!$formul[$arr]) {
918                         echo "Can't get $arr<br/>";
919                         return '';
920                 }
921         }
922
923         if ($_FILES['org_logo']) {
924                 $token = uniqid(md5(rand()), true);
925                 $image = "/upload/$token";
926
927                 if (preg_match("/(jpg|jpeg)$/i", $_FILES['org_logo']['name'])) {
928                         $image = "$image.jpg";
929                 } elseif (preg_match("/png$/i", $_FILES['org_logo']['name'])) {
930                         $image = "$image.png";
931                 } elseif (preg_match("/gif$/i", $_FILES['org_logo']['name'])) {
932                         $image = "$image.gif";
933                 } else {
934                         $image = '';
935                 }
936                 if ($image) {
937                         $ret=move_uploaded_file($_FILES['org_logo']['tmp_name'], "$upload_dir/$image");
938                         $formul['org_logo'] = $image;
939                 }
940         }
941         $formul['date'] = time();
942         $formul['visible'] = false;
943
944         return $formul;
945 }
946
947 function form_set_value($formul,$val)
948 {
949  echo "document.getElementById('$val').value = '" . $formul[$val] . "';\n";
950 }
951
952 function form_set_selection($formul,$val)
953 {
954  echo "document.getElementById('${val}_" . $formul[$val] . "').selected =true;\n";
955 }
956
957 function form_set_text($formul,$val)
958 {
959  $temp = $formul[$val];
960  $temp = str_replace(array("\n", "\r"), array("\\n",""), $temp);
961  echo "document.getElementById('$val').value='" . $temp . "';\n";
962 }
963
964 // passwd file must exist in dat directory
965 function is_admin()
966 {
967    global $dat_dir;
968    $id = $_REQUEST['p'];
969
970    if (!$id) {
971        return(false);
972    }
973
974    if (!ereg('^[a-zA-Z]+$',$id)) {
975        return(false) ;
976    }
977    
978    if (file_exists("$dat_dir/$id")) {
979        return true;
980    } else {
981        return false;
982    }
983 }
984
985 function admin_link()
986 {
987    global $password;
988    if (is_admin()) {
989       $pass = $_REQUEST['p'];
990       $waiting = $_REQUEST['waiting'];    
991       $password = "&p=$pass";
992       print "Admin: ";
993       if ($waiting) {
994          print "<a href='?page=testimonial&action=Admin$password'> View all</a><br>";
995       } else {
996          print "<a href='?page=testimonial&action=Admin$password'> View all</a> | ";
997          print "<a href='?page=testimonial&action=Admin&waiting=1$password'> View Waiting</a><br>";
998       }
999            print "<hr>";
1000    }
1001 }
1002
1003 function load_formul($filename)
1004 {
1005    if (!file_exists($filename)) {
1006            return array();
1007    }
1008
1009    if (!filesize($filename) || filesize($filename) > 10*1024*1024) {
1010        return undef;
1011    }
1012    $fp = fopen($filename, 'r');
1013    $contents = fread ($fp, filesize ($filename));
1014    fclose ($fp);
1015
1016    $formul = unserialize($contents);
1017    if (!is_array($formul)) {
1018        return undef;
1019    }
1020
1021    return $formul;
1022 }
1023
1024 function print_formul_file($filename, $admin) {
1025     global $password;
1026     $form = load_formul($filename);
1027     if (!$form) {
1028        return 0;
1029     }
1030     
1031     if (!$admin) {
1032        if (!$form['visible']) {
1033           return 0;
1034        }
1035     } 
1036     $waiting = $_REQUEST['waiting'];
1037     if ($admin && $waiting && $form['visible']) {
1038        return 0;
1039     }
1040
1041     $ret = print_formul($form);
1042     if ($admin) {
1043        if ($form['visible']) {
1044           print "<a href=\"?page=testimonial&action=Accept&hide=1$password&id=" . $form['id'] . "\"> Hide </a> | \n";
1045        } else {
1046           print "<a href=\"?page=testimonial&action=Accept$password&id=" . $form['id'] . "\"> Accept </a> | \n";
1047        }
1048        print "<a href=\"?page=testimonial&action=Modify$password&id=" . $form['id'] . "\"> Modify </a> | \n";
1049        print "<a href=\"?page=testimonial&action=AdminExport$password&id=" . $form['id'] . "\"> Export </a><br><br>\n";
1050    }
1051    return $ret;
1052 }
1053
1054 function dump_sql()
1055 {
1056    global $dat_dir, $country_lst, $org_type_lst, $org_industry_lst, $os_lst,$catalog_lst, $version_lst;
1057    if (!is_admin()) {
1058      return;
1059    }
1060 ?>
1061    CREATE TABLE dict (lang text, id int, name text, primary key (lang, id));
1062    CREATE TABLE testimonials (
1063     contact_name        text,
1064     email_address       text,
1065     org_name            text,
1066     title               text  DEFAULT '',
1067     website             text  DEFAULT '',
1068     filename            text  DEFAULT '',
1069     month_gb            int   DEFAULT 0,
1070     number_files        bigint DEFAULT 0,
1071     number_dir          int   DEFAULT 0,
1072     number_fd           int   DEFAULT 0,
1073     number_sd           int   DEFAULT 0,
1074     org_size            int   DEFAULT 0,
1075
1076     country_id          int,
1077     ostype_id           int,
1078     bacula_version      int,
1079     contry_id           int,
1080     orgindustry_id      int,
1081     orgtype_id          int,
1082     catalog_id          int,
1083
1084     id                  text,
1085     publish_contact     int    DEFAULT 0,
1086     publish_email       int    DEFAULT 0,
1087     publish_website     int    DEFAULT 0,
1088     publish_orgname     int    DEFAULT 0,
1089     publish_orgsize     int    DEFAULT 0,
1090     redundant_setup     int    DEFAULT 0,
1091     support             int    DEFAULT 0,
1092     comments            text   DEFAULT '',
1093     hardware_comments   text   DEFAULT '', 
1094     visible             int    DEFAULT 0,
1095     org_logo            text   DEFAULT '',
1096     date                int    DEFAULT 0,
1097     lastmodifed         int    DEFAULT 0
1098    );
1099
1100    CREATE VIEW reference AS SELECT contact_name,email_address,org_name,title,website,hardware_comments,comments,
1101           publish_contact,publish_email,publish_orgname,org_size,publish_orgsize,publish_website,
1102           redundant_setup,number_fd,number_sd,support,month_gb,number_files,number_dir,date,visible,filename,t.id,
1103           orgtype.name AS orgtype, 
1104           orgindustry.name AS orgindustry,
1105           version.name AS bacula_version,
1106           country.name AS country,
1107           ostype.name AS ostype,
1108           catalog.name AS catalog
1109    FROM testimonials AS t, dict AS  orgtype, dict AS orgindustry, dict AS version, dict AS country, dict AS ostype,
1110         dict AS catalog
1111
1112    WHERE t.orgtype_id = orgtype.id            AND orgtype.lang     = 'en'
1113      AND t.orgindustry_id = orgindustry.id    AND orgindustry.lang = 'en'
1114      AND t.bacula_version = version.id AND version.lang = 'en'
1115      AND t.country_id = country.id            AND country.lang = 'en'
1116      AND t.ostype_id  = ostype.id             AND ostype.lang = 'en'
1117      AND t.catalog_id = catalog.id            AND catalog.lang = 'en';
1118
1119
1120    INSERT INTO dict (lang, id, name) VALUES ('en', 0, 'no');
1121    INSERT INTO dict (lang, id, name) VALUES ('en', 1, 'yes');
1122 <?
1123    $a = array($version_lst, $country_lst, $org_type_lst, $org_industry_lst, $os_lst,$catalog_lst);
1124    foreach ($a as $tab) {
1125       while(list ($key, $val) = each ($tab))
1126       {   
1127           if ($key != 'empty') {
1128              echo "INSERT INTO dict (lang, id, name) VALUES ('en', $key, '$val');\n";
1129           }
1130       }
1131    }
1132     if ($handle = opendir($dat_dir)) {
1133     /* Ceci est la facon correcte de traverser un dossier. */
1134         while (false !== ($file = readdir($handle))) {
1135             if (preg_match("/profile.[a-z0-9\.]+/", $file)) {
1136                $tmpv = array();
1137                $tmpk = array();
1138                $form = load_formul("$dat_dir/$file");
1139                while(list ($key, $val) = each ($form))
1140                {
1141                    array_push($tmpv, "'$val'");
1142                    array_push($tmpk, $key);
1143                }
1144                echo "INSERT INTO testimonials (";
1145                print join(",", $tmpk);
1146                echo ") VALUES (";
1147                print join(",", $tmpv);
1148                echo ");\n";               
1149             }
1150         } 
1151         closedir($handle);
1152     }
1153 }
1154
1155 function print_formul($formul)
1156 {
1157    global $country_lst, $org_type_lst, $org_industry_lst, $os_lst,$catalog_lst;
1158
1159    ?>
1160    <table width="80%">
1161    <td>
1162    <b><? echo ($formul['publish_orgname'])?$formul['org_name']:'N/A' ?></b><br>
1163    <table>
1164    <tr><td> Date: </td><td><? echo date('d/m/o', $formul['date']) ?> </td></tr>
1165    <tr><td> Location: </td><td><? $a = $formul['country_id'] ; echo $country_lst[$a] ?> </td></tr>
1166    <tr><td> Organization Type: </td><td><? echo $org_type_lst[$formul['orgtype_id']] ?> </td></tr>
1167    <tr><td> Industry/Function: </td><td><? echo $org_industry_lst[$formul['orgindustry_id']] ?> </td></tr>
1168
1169    <? if ($formul['publish_orgsize']) { ?>
1170         <tr><td> Organisation Size: </td><td><? echo $formul['org_size'] ?> </td></tr>
1171    <? } ?>
1172
1173    <? if ($formul['publish_website']) { ?>
1174         <tr><td> Website: </td><td><? echo $formul['website'] ?> </td></tr>
1175    <? } ?>
1176
1177    <? if ($formul['number_fd'] > 1) { ?>
1178         <tr><td> Number of fd: </td><td><? echo $formul['number_fd'] ?> </td></tr>
1179    <? } ?>
1180
1181    <? if ($formul['month_gb'] > 1) { ?>
1182         <tr><td> GB/Month: </td><td><? echo $formul['month_gb'] ?> </td></tr>
1183    <? } ?>
1184
1185    <tr><td> Comments: </td><td width='450'><i><? echo $formul['comments'] ?> </i></td></tr>
1186    <? if ($formul['publish_contact']) { ?>
1187         <tr align='right'><td></td><td><i><? echo $formul['contact_name'] ?> </i></td></tr>
1188    <? } ?>
1189 <!--
1190    </table>
1191    </td>
1192 -->
1193    <tr><td></td>
1194    <td>
1195    <? if ($formul['org_logo']) { ?>
1196         <a href="<? echo $formul['org_logo'] ?>" ><img width='150' src="<? echo $formul['org_logo'] ?>"></a>
1197    <? } ?>
1198    </td>
1199    </tr> <!-- added -->
1200    </table>
1201 <?
1202    return 1;
1203 }
1204
1205 ?>
1206 <? require_once("inc/footer.php"); ?>