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