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