From: Eric Bollengier Date: Tue, 29 Sep 2009 16:06:09 +0000 (+0200) Subject: update testimonial script pages X-Git-Tag: Release-3.0.3~2^2~8 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=b786d1de9cf6ae457aee0f53f862204dfb695ae2;p=bacula%2Fdocs update testimonial script pages --- diff --git a/docs/home-page/de/pages/testimonial.php b/docs/home-page/de/pages/testimonial.php index 71fdc691..c25aeb20 100644 --- a/docs/home-page/de/pages/testimonial.php +++ b/docs/home-page/de/pages/testimonial.php @@ -1,206 +1,323 @@ - - "SELECT ONE", - '15' => "Church / Religious Organization", - '3' => "Corporation", - '14' => "Educational Institution", - '5' => "Government", - '6' => "Military", - '13' => "Non-Profit Organization", - '10' => "Other", - '4' => "Small Business" + 'empty' => "SELECT ONE", + '100' => "Church / Religious Organization", + '101' => "Corporation", + '102' => "Educational Institution", + '103' => "Government", + '104' => "Military", + '105' => "Non-Profit Organization", + '107' => "Small Business", + '106' => "Other" ); $version_lst = array( - '0' => "SELECT ONE", - '1' => "1.36.x", - '2' => "1.38.x", - '3' => "2.0.x", - '4' => "2.2.x", - '5' => "SVN version" + 'empty' => "SELECT ONE", + '200' => "1.36.x", + '201' => "1.38.x", + '202' => "2.0.x", + '203' => "2.2.x", + '206' => "2.4.x", + '206' => "3.0.x", + '204' => "GIT master version" ); $catalog_lst = array( - '0' => "SELECT ONE", - '1' => "MySQL", - '2' => "PostgreSQL", - '3' => "SqLite" + 'empty' => "SELECT ONE", + '300' => "MySQL", + '301' => "PostgreSQL", + '303' => "SqLite" ); $org_industry_lst = array( - '0' => 'SELECT ONE', '25' => 'Aerospace / Aeronautical', - '11' => 'Agriculture / Farming', '38' => 'Architecture / Design', - '44' => 'Arts', '5' => 'ASP', - '54' => 'Banking', - '42' => 'Church / Religious Organization', '45' => 'Coaching', - '10' => 'Construction', '22' => 'Consulting (General)', - '21' => 'Consulting (Information Technology)', '31' => 'Defense Industry', - '51' => 'Education / Training', '37' => 'Energy Industry', - '46' => 'Engineering', '35' => 'Entertainment (Film)', - '34' => 'Entertainment (Music)', '36' => 'Entertainment (Other)', - '47' => 'Event Management / Conferences', '7' => 'Finance / Banking / Accounting', - '12' => 'Food Service Industry', '29' => 'Government', - '3' => 'Healthcare / Medicine', '8' => 'Higher Education', - '6' => 'Insurance', '4' => 'Internet Service Provider', - '2' => 'K-12 Education', '48' => 'Law Enforcement / Emergency Management', - '14' => 'Legal', '24' => 'Manufacturing (Computer Equipment)', - '23' => 'Manufacturing (General)', '53' => 'Media (Publishing, Broadcasting, etc)', - '30' => 'Military', '9' => 'Mining', - '18' => 'Natural Resources / Environment', '15' => 'Pharmaceuticals', - '49' => 'Public Relations / Advertising', '13' => 'Real Estate', - '41' => 'Retail / Consumer Goods', '52' => 'Sales / Marketing', - '32' => 'Scientific Research', '33' => 'Sports / Recreation', - '43' => 'Technical College / Trade School', '40' => 'Telecommunications', - '27' => 'Transportation Industry (Air)', '28' => 'Transportation Industry (General)', - '26' => 'Transportation Industry (Marine)', '50' => 'Travel / Tourism / Lodging', - '17' => 'Travel Industry', '39' => 'Utilities / Public Works', - '16' => 'Other' + 'empty' => 'SELECT ONE', '400' => 'Aerospace / Aeronautical', + '401' => 'Agriculture / Farming', '402' => 'Architecture / Design', + '403' => 'Arts', '404' => 'ASP', + '405' => 'Banking', + '406' => 'Church / Religious Organization', '407' => 'Coaching', + '408' => 'Construction', '409' => 'Consulting (General)', + '410' => 'Consulting (Information Technology)','411' => 'Defense Industry', + '412' => 'Education / Training', '413' => 'Energy Industry', + '414' => 'Engineering', '415' => 'Entertainment (Film)', + '416' => 'Entertainment (Music)', '417' => 'Entertainment (Other)', + '418' => 'Event Management / Conferences', '419' => 'Finance / Banking / Accounting', + '420' => 'Food Service Industry', '421' => 'Government', + '422' => 'Healthcare / Medicine', '423' => 'Higher Education', + '424' => 'Insurance', '425' => 'Internet Service Provider', + '426' => 'K-12 Education', '427' => 'Law Enforcement / Emergency Management', + '428' => 'Legal', '429' => 'Manufacturing (Computer Equipment)', + '430' => 'Manufacturing (General)', '431' => 'Media (Publishing, Broadcasting, etc)', + '432' => 'Military', '433' => 'Mining', + '434' => 'Natural Resources / Environment', '435' => 'Pharmaceuticals', + '436' => 'Public Relations / Advertising', '437' => 'Real Estate', + '438' => 'Retail / Consumer Goods', '439' => 'Sales / Marketing', + '440' => 'Scientific Research', '441' => 'Sports / Recreation', + '442' => 'Technical College / Trade School', '443' => 'Telecommunications', + '444' => 'Transportation Industry (Air)', '445' => 'Transportation Industry (General)', + '446' => 'Transportation Industry (Marine)', '447' => 'Travel / Tourism / Lodging', + '448' => 'Travel Industry', '449' => 'Utilities / Public Works', + '450' => 'Other' ); $os_lst = array( - '0' => 'SELECT ONE', '20' => 'AIX', - '21' => 'FreeBSD', '14' => 'HP-UX', - '2' => 'Linux (Debian)', '27' => 'Linux (Fedora)', - '25' => 'Linux (Gentoo)', '4' => 'Linux (Mandrake)', - '5' => 'Linux (Other)', '1' => 'Linux (RedHat)', - '26' => 'Linux (Slackware)', '3' => 'Linux (Suse)', - '18' => 'Mac OS X', '22' => 'NetBSD', - '23' => 'OpenBSD', '24' => 'Other', - '13' => 'Solaris', '15' => 'Windows 2000', - '16' => 'Windows 2003', '17' => 'Windows XP' + 'empty' => 'SELECT ONE', '500' => 'AIX', + '501' => 'FreeBSD', '502' => 'HP-UX', + '503' => 'Linux (Debian)', '504' => 'Linux (Fedora)', + '505' => 'Linux (Gentoo)', '506' => 'Linux (Mandriva)', + '507' => 'Linux (Other)', '508' => 'Linux (RedHat)', + '509' => 'Linux (Slackware)', '510' => 'Linux (Suse)', + '511' => 'Mac OS X', '512' => 'NetBSD', + '513' => 'OpenBSD', '514' => 'Other', + '515' => 'Solaris', '516' => 'Windows 2000', + '517' => 'Windows 2003', '518' => 'Windows XP', + '519' => 'Windows Vista' ); $country_lst = array( - '0' => 'SELECT ONE', '1' => 'Afghanistan', - '2' => 'Albania', '3' => 'Algeria', - '4' => 'American Samoa', '5' => 'Andorra', - '6' => 'Angola', '7' => 'Anguilla', - '8' => 'Antarctica', '9' => 'Antigua and Barbuda', - '10' => 'Argentina', '11' => 'Armenia', - '12' => 'Aruba', '13' => 'Australia', - '14' => 'Austria', '15' => 'Azerbaijan', - '16' => 'Bahamas', '17' => 'Bahrain', - '18' => 'Bangladesh', '19' => 'Barbados', - '20' => 'Belarus', '21' => 'Belgium', - '22' => 'Belize', '23' => 'Benin', - '24' => 'Bermuda', '25' => 'Bhutan', - '26' => 'Bolivia', '27' => 'Bosnia and Herzegovina', - '28' => 'Botswana', '29' => 'Bouvet Island', - '30' => 'Brazil', '31' => 'Brunei Darussalam', - '32' => 'Bulgaria', '33' => 'Burkina Faso', - '34' => 'Burundi', '35' => 'Cambodia', - '36' => 'Cameroon', '37' => 'Canada', - '38' => 'Cape Verde', '39' => 'Cayman Islands', - '40' => 'Central African Republic','41' => 'Chad', - '42' => 'Chile', '43' => 'China', - '44' => 'Christmas Island', '45' => 'Colombia', - '46' => 'Comoros', '47' => 'Congo', - '48' => 'Cook Islands', '49' => 'Costa Rica', - '54' => "Ivory Coast", '50' => 'Croatia', - '51' => 'Cuba', '52' => 'Cyprus', - '53' => 'Czech Republic', '55' => 'Denmark', - '56' => 'Djibouti', '57' => 'Dominica', - '58' => 'Dominican Republic', '59' => 'East Timor', - '60' => 'Ecuador', '61' => 'Egypt', - '62' => 'El Salvador', '63' => 'Equatorial Guinea', - '64' => 'Eritrea', '65' => 'Estonia', - '66' => 'Ethiopia', '67' => 'Falkland Islands', - '68' => 'Faroe Islands', '69' => 'Fiji', - '70' => 'Finland', '71' => 'France', - '72' => 'French Guiana', '73' => 'French Polynesia', - '74' => 'Gabon', '75' => 'Gambia', - '76' => 'Georgia', '77' => 'Germany', - '78' => 'Ghana', '79' => 'Gibraltar', - '80' => 'Greece', '81' => 'Greenland', - '82' => 'Grenada', '83' => 'Guadeloupe', - '84' => 'Guam', '85' => 'Guatemala', - '86' => 'Guinea', '87' => 'Guinea-Bissau', - '88' => 'Guyana', '89' => 'Haiti', - '90' => 'Honduras', '91' => 'Hong Kong', - '92' => 'Hungary', '93' => 'Iceland', - '94' => 'India', '95' => 'Indonesia', - '96' => 'Iran', '97' => 'Iraq', - '98' => 'Ireland', '99' => 'Israel', - '100' => 'Italy', '101' => 'Jamaica', - '102' => 'Japan', '103' => 'Jordan', - '104' => 'Kazakstan', '105' => 'Kenya', - '106' => 'Kiribati', '107' => 'Kuwait', - '108' => 'Kyrgystan', '109' => 'Lao', - '110' => 'Latvia', '111' => 'Lebanon', - '112' => 'Lesotho', '113' => 'Liberia', - '232' => 'Libya', '114' => 'Liechtenstein', - '115' => 'Lithuania', '116' => 'Luxembourg', - '117' => 'Macau', '118' => 'Macedonia (FYR)', - '119' => 'Madagascar', '120' => 'Malawi', - '121' => 'Malaysia', '122' => 'Maldives', - '123' => 'Mali', '124' => 'Malta', - '125' => 'Marshall Islands', '126' => 'Martinique', - '127' => 'Mauritania', '128' => 'Mauritius', - '129' => 'Mayotte', '130' => 'Mexico', - '131' => 'Micronesia', '132' => 'Moldova', - '133' => 'Monaco', '134' => 'Mongolia', - '135' => 'Montserrat', '136' => 'Morocco', - '137' => 'Mozambique', '138' => 'Myanmar', - '139' => 'Namibia', '140' => 'Nauru', - '141' => 'Nepal', '142' => 'Netherlands', - '143' => 'Netherlands Antilles', '144' => 'Neutral Zone', - '145' => 'New Caledonia', '146' => 'New Zealand', - '147' => 'Nicaragua', '148' => 'Niger', - '149' => 'Nigeria', '150' => 'Niue', - '151' => 'Norfolk Island', '152' => 'North Korea', - '153' => 'Northern Mariana Islands','154' => 'Norway', - '155' => 'Oman', '156' => 'Pakistan', - '157' => 'Palau', '158' => 'Panama', - '159' => 'Papua New Guinea', '160' => 'Paraguay', - '161' => 'Peru', '162' => 'Philippines', - '163' => 'Pitcairn', '164' => 'Poland', - '165' => 'Portugal', '166' => 'Puerto Rico', - '167' => 'Qatar', '168' => 'Reunion', - '169' => 'Romania', '170' => 'Russian Federation', - '171' => 'Rwanda', '172' => 'Saint Helena', - '173' => 'Saint Kitts and Nevis', '174' => 'Saint Lucia', - '175' => 'Saint Pierre and Miquelon','231' => 'Saint Vincent and the Grenadines', - '176' => 'Samoa', '177' => 'San Marino', - '178' => 'Sao Tome and Principe', '179' => 'Saudi Arabia', - '180' => 'Senegal', '227' => 'Serbia and Montenegro', - '181' => 'Seychelles', '182' => 'Sierra Leone', - '183' => 'Singapore', '184' => 'Slovakia', - '185' => 'Slovenia', '186' => 'Solomon Islands', - '187' => 'Somalia', '188' => 'South Africa', - '189' => 'South Georgia', '190' => 'South Korea', - '191' => 'Spain', '192' => 'Sri Lanka', - '193' => 'Sudan', '194' => 'Suriname', - '195' => 'Swaziland', '196' => 'Sweden', - '197' => 'Switzerland', '198' => 'Syria', - '199' => 'Taiwan', '200' => 'Tajikistan', - '201' => 'Tanzania', '202' => 'Thailand', - '203' => 'Togo', '204' => 'Tokelau', - '205' => 'Tonga', '206' => 'Trinidad and Tobago', - '207' => 'Tunisia', '208' => 'Turkey', - '209' => 'Turkmenistan', '210' => 'Turks and Caicos Islands', - '211' => 'Tuvalu', '212' => 'Uganda', - '213' => 'Ukraine', '214' => 'United Arab Emirates', - '215' => 'United Kingdom', '216' => 'United States of America', - '217' => 'Uruguay', '218' => 'Uzbekistan', - '219' => 'Vanuatu', '233' => 'Vatican City', - '220' => 'Venezuela', '221' => 'Vietnam', - '222' => 'Virgin Islands (British)','223' => 'Virgin Islands (U.S.)', - '224' => 'Wallis and Futuna Islands','225' => 'Western Sahara', - '226' => 'Yemen', '228' => 'Zaire', - '229' => 'Zambia', '230' => 'Zimbabwe' + 'empty' => 'SELECT ONE', '1001' => 'Afghanistan', + '1002' => 'Albania', '1003' => 'Algeria', + '1004' => 'American Samoa', '1005' => 'Andorra', + '1006' => 'Angola', '1007' => 'Anguilla', + '1008' => 'Antarctica', '1009' => 'Antigua and Barbuda', + '1010' => 'Argentina', '1011' => 'Armenia', + '1012' => 'Aruba', '1013' => 'Australia', + '1014' => 'Austria', '1015' => 'Azerbaijan', + '1016' => 'Bahamas', '1017' => 'Bahrain', + '1018' => 'Bangladesh', '1019' => 'Barbados', + '1020' => 'Belarus', '1021' => 'Belgium', + '1022' => 'Belize', '1023' => 'Benin', + '1024' => 'Bermuda', '1025' => 'Bhutan', + '1026' => 'Bolivia', '1027' => 'Bosnia and Herzegovina', + '1028' => 'Botswana', '1029' => 'Bouvet Island', + '1030' => 'Brazil', '1031' => 'Brunei Darussalam', + '1032' => 'Bulgaria', '1033' => 'Burkina Faso', + '1034' => 'Burundi', '1035' => 'Cambodia', + '1036' => 'Cameroon', '1037' => 'Canada', + '1038' => 'Cape Verde', '1039' => 'Cayman Islands', + '1040' => 'Central African Republic','1041' => 'Chad', + '1042' => 'Chile', '1043' => 'China', + '1044' => 'Christmas Island', '1045' => 'Colombia', + '1046' => 'Comoros', '1047' => 'Congo', + '1048' => 'Cook Islands', '1049' => 'Costa Rica', + '1054' => "Ivory Coast", '1050' => 'Croatia', + '1051' => 'Cuba', '1052' => 'Cyprus', + '1053' => 'Czech Republic', '1055' => 'Denmark', + '1056' => 'Djibouti', '1057' => 'Dominica', + '1058' => 'Dominican Republic', '1059' => 'East Timor', + '1060' => 'Ecuador', '1061' => 'Egypt', + '1062' => 'El Salvador', '1063' => 'Equatorial Guinea', + '1064' => 'Eritrea', '1065' => 'Estonia', + '1066' => 'Ethiopia', '1067' => 'Falkland Islands', + '1068' => 'Faroe Islands', '1069' => 'Fiji', + '1070' => 'Finland', '1071' => 'France', + '1072' => 'French Guiana', '1073' => 'French Polynesia', + '1074' => 'Gabon', '1075' => 'Gambia', + '1076' => 'Georgia', '1077' => 'Germany', + '1078' => 'Ghana', '1079' => 'Gibraltar', + '1080' => 'Greece', '1081' => 'Greenland', + '1082' => 'Grenada', '1083' => 'Guadeloupe', + '1084' => 'Guam', '1085' => 'Guatemala', + '1086' => 'Guinea', '1087' => 'Guinea-Bissau', + '1088' => 'Guyana', '1089' => 'Haiti', + '1090' => 'Honduras', '1091' => 'Hong Kong', + '1092' => 'Hungary', '1093' => 'Iceland', + '1094' => 'India', '1095' => 'Indonesia', + '1096' => 'Iran', '1097' => 'Iraq', + '1098' => 'Ireland', '1099' => 'Israel', + '1100' => 'Italy', '1101' => 'Jamaica', + '1102' => 'Japan', '1103' => 'Jordan', + '1104' => 'Kazakstan', '1105' => 'Kenya', + '1106' => 'Kiribati', '1107' => 'Kuwait', + '1108' => 'Kyrgystan', '1109' => 'Lao', + '1110' => 'Latvia', '1111' => 'Lebanon', + '1112' => 'Lesotho', '1113' => 'Liberia', + '1232' => 'Libya', '1114' => 'Liechtenstein', + '1115' => 'Lithuania', '1116' => 'Luxembourg', + '1117' => 'Macau', '1118' => 'Macedonia (FYR)', + '1119' => 'Madagascar', '1120' => 'Malawi', + '1121' => 'Malaysia', '1122' => 'Maldives', + '1123' => 'Mali', '1124' => 'Malta', + '1125' => 'Marshall Islands', '1126' => 'Martinique', + '1127' => 'Mauritania', '1128' => 'Mauritius', + '1129' => 'Mayotte', '1130' => 'Mexico', + '1131' => 'Micronesia', '1132' => 'Moldova', + '1133' => 'Monaco', '1134' => 'Mongolia', + '1135' => 'Montserrat', '1136' => 'Morocco', + '1137' => 'Mozambique', '1138' => 'Myanmar', + '1139' => 'Namibia', '1140' => 'Nauru', + '1141' => 'Nepal', '1142' => 'Netherlands', + '1143' => 'Netherlands Antilles', '1144' => 'Neutral Zone', + '1145' => 'New Caledonia', '1146' => 'New Zealand', + '1147' => 'Nicaragua', '1148' => 'Niger', + '1149' => 'Nigeria', '1150' => 'Niue', + '1151' => 'Norfolk Island', '1152' => 'North Korea', + '1153' => 'Northern Mariana Islands', '1154' => 'Norway', + '1155' => 'Oman', '1156' => 'Pakistan', + '1157' => 'Palau', '1158' => 'Panama', + '1159' => 'Papua New Guinea', '1160' => 'Paraguay', + '1161' => 'Peru', '1162' => 'Philippines', + '1163' => 'Pitcairn', '1164' => 'Poland', + '1165' => 'Portugal', '1166' => 'Puerto Rico', + '1167' => 'Qatar', '1168' => 'Reunion', + '1169' => 'Romania', '1170' => 'Russian Federation', + '1171' => 'Rwanda', '1172' => 'Saint Helena', + '1173' => 'Saint Kitts and Nevis', '1174' => 'Saint Lucia', + '1175' => 'Saint Pierre and Miquelon','1231' => 'Saint Vincent and the Grenadines', + '1176' => 'Samoa', '1177' => 'San Marino', + '1178' => 'Sao Tome and Principe', '1179' => 'Saudi Arabia', + '1180' => 'Senegal', '1227' => 'Serbia and Montenegro', + '1181' => 'Seychelles', '1182' => 'Sierra Leone', + '1183' => 'Singapore', '1184' => 'Slovakia', + '1185' => 'Slovenia', '1186' => 'Solomon Islands', + '1187' => 'Somalia', '1188' => 'South Africa', + '1189' => 'South Georgia', '1190' => 'South Korea', + '1191' => 'Spain', '1192' => 'Sri Lanka', + '1193' => 'Sudan', '1194' => 'Suriname', + '1195' => 'Swaziland', '1196' => 'Sweden', + '1197' => 'Switzerland', '1198' => 'Syria', + '1199' => 'Taiwan', '1200' => 'Tajikistan', + '1201' => 'Tanzania', '1202' => 'Thailand', + '1203' => 'Togo', '1204' => 'Tokelau', + '1205' => 'Tonga', '1206' => 'Trinidad and Tobago', + '1207' => 'Tunisia', '1208' => 'Turkey', + '1209' => 'Turkmenistan', '1210' => 'Turks and Caicos Islands', + '1211' => 'Tuvalu', '1212' => 'Uganda', + '1213' => 'Ukraine', '1214' => 'United Arab Emirates', + '1215' => 'United Kingdom', '1216' => 'United States of America', + '1217' => 'Uruguay', '1218' => 'Uzbekistan', + '1219' => 'Vanuatu', '1233' => 'Vatican City', + '1220' => 'Venezuela', '1221' => 'Vietnam', + '1222' => 'Virgin Islands (British)', '1223' => 'Virgin Islands (U.S.)', + '1224' => 'Wallis and Futuna Islands','1225' => 'Western Sahara', + '1226' => 'Yemen', '1228' => 'Zaire', + '1229' => 'Zambia', '1230' => 'Zimbabwe' ); -if ($_REQUEST['btnSubmit'] == 'Add' or $_REQUEST['btnSubmit'] == 'Modify') +admin_link(); + +if ($_REQUEST['action'] == 'Add' or $_REQUEST['action'] == 'Modify') { ?> + + @@ -222,7 +339,7 @@ information about how this data will be used.
- Testimonial + Testimonial
-
+ @@ -383,6 +500,12 @@ while(list ($key, $val) = each ($catalog_lst)) + + + + - + - + + id='number_files' size='10' maxlength='15' value=''> @@ -437,14 +560,14 @@ Nics: + + +
*Number of Director (Running bacula-dir): +
*Number of Clients (Running bacula-fd):
*Total # of GB saved every month:
*Total # of GB saved every month:
*Number # of Files:
*Number # of Files:
"; - echo ""; - echo "
"; + if ($_REQUEST['action'] == 'Modify') { + echo ""; + echo ""; + echo "
"; echo "
"; } else { - echo ""; + echo ""; } ?> @@ -456,6 +579,24 @@ Nics:
+

Getting backup information

+To get Total # of GB saved every month, you can run this query on you catalog (just adapt the starttime condition and round the result) +
+bacula@yourdir:~$ bconsole
+*sql
+SELECT sum(JobBytes)/1073741824 FROM Job WHERE StartTime > '2008-02-07' AND Type = 'B'
+
+ +To know how many files are in your catalog, you can run this: +
+bacula@yourdir:~$ bconsole
+*sql
+SELECT sum(JobFiles) FROM Job WHERE Type = 'B'
+
+

Privacy Notice

@@ -469,10 +610,8 @@ we find the need.
\n"; $attribs = array('contact_name','email_address', 'org_name','title','website', - 'month_gb','number_files', 'number_fd','number_sd', - 'org_size','comments', 'hardware_comments', 'id'); + 'month_gb','number_files', 'number_dir','number_fd','number_sd', + 'org_size','id'); foreach ($attribs as $arr) { form_set_value($formul, $arr); } @@ -496,27 +635,34 @@ if ($_REQUEST['btnSubmit'] == 'Modify') { form_set_selection($formul, $arr); } + $attribs = array('comments', 'hardware_comments'); + foreach ($attribs as $arr) { + form_set_text($formul, $arr); + } + + echo "\n"; -} elseif ($_REQUEST['btnSubmit'] == 'Review Profile Submission') { +} elseif ($_REQUEST['action'] == 'Review Profile Submission') { $form = get_formul(); if (!$form) { - echo "Sorry, something is missing, I cannot accept your submission"; + echo "Sorry, something is missing, I can't accept your submission"; } else { $token = uniqid(md5(rand()), true); $filename = "$dat_dir/profile.$token"; $form['filename'] = $filename; $form['id'] = $token; + $form['visible']=0; save_formul($form); - send_email($form['id'], $form['email_address']); - echo "You can modify your profile here (keep this link as bookmark)

"; + send_email($form['id'], $form['contact_name'], $form['email_address']); + echo "You can modify your profile here (keep this link as bookmark)

"; print_formul($form); } -} elseif ($_REQUEST['btnSubmit'] == 'View') { +} elseif ($_REQUEST['action'] == 'View') { $file = get_file_from_id(); @@ -524,7 +670,7 @@ if ($_REQUEST['btnSubmit'] == 'Modify') { print_formul_file($filename,true); } -} elseif ($_REQUEST['btnSubmit'] == 'Delete') { +} elseif ($_REQUEST['action'] == 'Delete') { $filename = get_file_from_id(); @@ -535,14 +681,14 @@ if ($_REQUEST['btnSubmit'] == 'Modify') { $form = load_formul($filename); if ($form['org_logo'] && file_exists($form['org_logo'])) { - unlink($form['org_logo']); + rename($upload_dir + $form['org_logo'], 'removed.' + $upload_dir + $form['org_logo']); } if (file_exists($filename)) { - unlink($filename); + rename($filename, "$filename-removed"); echo "Profile deleted"; } -} elseif ($_REQUEST['btnSubmit'] == 'Accept' && is_admin()) { +} elseif ($_REQUEST['action'] == 'Accept' && is_admin()) { $filename = get_file_from_id(); @@ -563,7 +709,7 @@ if ($_REQUEST['btnSubmit'] == 'Modify') { echo $form['id'] . " is now " . ($hide?"un":"") . "visible"; print_formul($form); -} elseif ($_REQUEST['btnSubmit'] == 'Save') { +} elseif ($_REQUEST['action'] == 'Save') { $filename = get_file_from_id(); @@ -587,95 +733,84 @@ if ($_REQUEST['btnSubmit'] == 'Modify') { echo "Your profile has been modified.
"; print_formul($form); -} elseif ($_REQUEST['btnSubmit'] == 'Admin' && is_admin()) { +} elseif ($_REQUEST['action'] == 'Admin' && is_admin()) { + view_all(); - $pass = $_REQUEST['passwd']; // passwd is clean - $waiting = $_REQUEST['waiting']; - - if ($waiting) { - print ' View all
'; - print "

View all waiting testimonials

"; - } else { - print ' View Waiting
'; - print "

View all testimonials

"; - } +} elseif (!$_REQUEST['action'] || $_REQUEST['action'] == 'ViewAll') { - if ($handle = opendir($dat_dir)) { - /* Ceci est la facon correcte de traverser un dossier. */ - while (false !== ($file = readdir($handle))) { - if (preg_match("/profile.[a-z0-9\.]+/", $file)) { - $form = load_formul("$dat_dir/$file") ; - // on affiche ceux qui sont en attente ou bien tous - if (!$waiting || !$form['visible']) { - print_formul($form); - if ($form['visible']) { - print " Hide | \n"; - } else { - print " Accept | \n"; - } - print " Modify | \n"; - print " Export

\n"; - - } - } - } - closedir($handle); - } + echo "Add your testimonial

"; + view_all(); -} elseif (!$_REQUEST['btnSubmit'] || $_REQUEST['btnSubmit'] == 'ViewAll') { +} elseif ($_REQUEST['action'] == 'AdminExport' && is_admin()) { + + $file = get_file_from_id(); + if (!$file) { + return 0; + } + $form = load_formul($file); + if ($form) { + export_form($form); + } +} elseif ($_REQUEST['action'] == 'sql') { + print "
";
+   dump_sql();
+   print "
"; +} + +function view_all() +{ + global $dat_dir; + global $password; $limit = $_REQUEST['limit']; $offset = $_REQUEST['offset']; - $limit = is_int($limit)?$limit:10; - $offset = is_int($offset)?$limit:0; + $limit = is_numeric($limit)?$limit:5; + $offset = is_numeric($offset)?$offset:0; + $max = $offset + $limit; $admin = is_admin(); - if ($limit > 20) { $limit = 20 ;} - echo "Add a testimonial

"; - if ($handle = opendir($dat_dir)) { /* Ceci est la facon correcte de traverser un dossier. */ - $i = 0 ; - while (false !== ($file = readdir($handle))) { - if (preg_match("/profile.[a-z0-9\.]+/", $file)) { - if ($i >= $offset && $i < ($offset + $limit)) { - $i += print_formul_file("$dat_dir/$file",$admin); - } - - if ($i > ($offset + $limit)) { - break; - } + $i = 0 ; + while (false !== ($file = readdir($handle))) { + if (preg_match("/^profile.[a-z0-9\.]+$/", $file)) { + if (($i >= $offset) && ($i < $max)) { + $i += print_formul_file("$dat_dir/$file",$admin); + } else { + $i++; } - } - closedir($handle); + if ($i > $max) { + break; + } + } + } + closedir($handle); + } + if ($offset > 0) { + $offset = $offset - $limit; + if ($offset < 0) { + $offset=0; + } + echo "Prev "; + } + if ($i >= $max) { + $offset = $offset + $limit; + echo " Next
"; } - -} elseif ($_REQUEST['btnSubmit'] == 'AdminExport' && is_admin()) { - - $file = get_file_from_id(); - if (!$file) { - return 0; - } - $form = load_formul($file); - if ($form) { - export_form($form); - } -} else { - print "Invalid btnSubmit
"; } function export_form($formul) { - global $country_lst, $org_type_lst, $org_industry_lst, $os_lst, $catalog_lst; + global $country_lst, $org_type_lst, $org_industry_lst, $os_lst, $catalog_lst, $version_lst; $attribs = array('contact_name','email_address', 'org_name','title','website', 'hardware_comments','comments', 'publish_contact','publish_email', 'publish_orgname','org_size','redundant_setup', - 'date','visible', 'support', + 'date','visible', 'support','number_dir', 'number_fd','number_sd','month_gb','number_files','publish_orgsize','publish_website'); print "
\n";
         foreach ($attribs as $arr) {
@@ -711,25 +846,32 @@ function get_file_from_id()
     return $filename;
 }
 
-function send_email($id, $email)
+function send_email($id, $name, $email)
 {
         // Your email address
-        $from = 'kern@sibbald.com';
-//        $from = 'eric@eb.homelinux.org';
+//        $from = 'kern@sibbald.com';
+        $from = 'eric@eb.homelinux.org';
 
         // The subject
         $subject = "[BACULA] New testimonial";
 
         // The message
         $message = "Hello, 
-You can modify your new testimonial at http://www.bacula.org/?page=testimonial&btnSubmit=Modify&id=$id
+You can modify your new testimonial at http://www.bacula.org/en/?page=testimonial&action=Modify&id=$id
 
 Best regards.
 ";
 
         mail($email, $subject, $message, "From: Bacula WebMaster <$from>");
-        mail($from, $subject, $message, "From: Bacula WebMaster <$from>");
-        mail('eric@eb.homelinux.org', $subject, $message, "From: Bacula WebMaster <$from>");
+
+        $message = "Hello, 
+You can review this testimonial at http://www.bacula.org/en/?page=testimonial&action=Modify&id=$id
+
+Best regards.
+";
+
+        
+        mail('testimonial@rt.baculasystems.com', $subject, $message, "From: $name <$email>");
 
         echo "The email has been sent for approval.
"; } @@ -743,6 +885,7 @@ function save_formul($form) function get_formul() { + global $upload_dir; global $dat_dir; $formul = array(); $attribs = array('contact_name','email_address', 'org_name'); @@ -754,23 +897,25 @@ function get_formul() $formul[$arr] = preg_replace('/[^a-zA-Z0-9!\.?\:\/,;_()@\n -]/', " ", $_REQUEST[$arr]); } - $attribs = array('title','website','hardware_comments','comments'); + $attribs = array('title','website','hardware_comments','comments') ; foreach ($attribs as $arr) { - $formul[$arr] = preg_replace('/[^a-zA-Z0-9!\.?\:\/,;_()@ -]/', " ", $_REQUEST[$arr]); + $formul[$arr] = preg_replace('/[^a-zA-Z0-9!\.?\:\/,;_()@\n -]/', " ", $_REQUEST[$arr]); } $attribs = array('publish_contact','publish_email', 'publish_orgname', 'orgtype_id', 'orgindustry_id','org_size', 'publish_orgsize','publish_website', 'bacula_version', 'country_id','ostype_id', 'redundant_setup','number_fd','number_sd','support', - 'month_gb','number_files','catalog_id'); + 'month_gb','number_files','catalog_id','number_dir'); foreach ($attribs as $arr) { - if (preg_match("/^[0-9]+$/", $_REQUEST[$arr])) { + $tmp = $_REQUEST[$arr]; + $tmp = preg_replace("/[,\.]/", "", $tmp); + if (preg_match("/^[0-9]+$/", $tmp)) { $formul[$arr] = $_REQUEST[$arr]; } } $attribs = array('orgtype_id', 'orgindustry_id', 'org_size', 'country_id','bacula_version', - 'catalog_id', 'ostype_id','number_fd','number_sd', 'month_gb','number_files'); + 'catalog_id', 'ostype_id','number_fd','number_sd', 'number_dir', 'month_gb','number_files'); foreach ($attribs as $arr) { if (!$formul[$arr]) { echo "Can't get $arr
"; @@ -780,7 +925,7 @@ function get_formul() if ($_FILES['org_logo']) { $token = uniqid(md5(rand()), true); - $image = "upload/$token"; + $image = "/upload/$token"; if (preg_match("/(jpg|jpeg)$/i", $_FILES['org_logo']['name'])) { $image = "$image.jpg"; @@ -792,7 +937,7 @@ function get_formul() $image = ''; } if ($image) { - $ret=move_uploaded_file($_FILES['org_logo']['tmp_name'], $image); + $ret=move_uploaded_file($_FILES['org_logo']['tmp_name'], "$upload_dir/$image"); $formul['org_logo'] = $image; } } @@ -812,60 +957,202 @@ function form_set_selection($formul,$val) echo "document.getElementById('${val}_" . $formul[$val] . "').selected =true;\n"; } +function form_set_text($formul,$val) +{ + $temp = $formul[$val]; + $temp = str_replace(array("\n", "\r"), array("\\n",""), $temp); + echo "document.getElementById('$val').value='" . $temp . "';\n"; +} + // passwd file must exist in dat directory function is_admin() { - global $dat_dir; - $id = $_REQUEST['passwd']; + global $dat_dir; + $id = $_REQUEST['p']; - if (!ereg('^[a-zA-Z]+$',$id)) { - return(false) ; - } - - if (file_exists("$dat_dir/$id")) { - return true; - } else { - return false; - } + if (!$id) { + return(false); + } + + if (!ereg('^[a-zA-Z]+$',$id)) { + return(false) ; + } + + if (file_exists("$dat_dir/$id")) { + return true; + } else { + return false; + } +} + +function admin_link() +{ + global $password; + if (is_admin()) { + $pass = $_REQUEST['p']; + $waiting = $_REQUEST['waiting']; + $password = "&p=$pass"; + print "Admin: "; + if ($waiting) { + print " View all
"; + } else { + print " View all | "; + print " View Waiting
"; + } + print "
"; + } } function load_formul($filename) { - if (!file_exists($filename)) { - return array(); - } + if (!file_exists($filename)) { + return array(); + } - if (!filesize($filename) || filesize($filename) > 10*1024*1024) { - return undef; - } - $fp = fopen($filename, 'r'); - $contents = fread ($fp, filesize ($filename)); - fclose ($fp); + if (!filesize($filename) || filesize($filename) > 10*1024*1024) { + return undef; + } + $fp = fopen($filename, 'r'); + $contents = fread ($fp, filesize ($filename)); + fclose ($fp); - $formul = unserialize($contents); - if (!is_array($formul)) { - return undef; - } + $formul = unserialize($contents); + if (!is_array($formul)) { + return undef; + } - return $formul; + return $formul; } function print_formul_file($filename, $admin) { + global $password; + $form = load_formul($filename); + if (!$form) { + return 0; + } + + if (!$admin) { + if (!$form['visible']) { + return 0; + } + } + $waiting = $_REQUEST['waiting']; + if ($admin && $waiting && $form['visible']) { + return 0; + } - $formul = load_formul($filename); - if (!$formul) { - return 0; - } - - if (!$admin) { - if (!$formul['visible']) { - return 0; - } - } else { - print "Modify
\n"; - } + $ret = print_formul($form); + if ($admin) { + if ($form['visible']) { + print " Hide | \n"; + } else { + print " Accept | \n"; + } + print " Modify | \n"; + print " Export

\n"; + } + return $ret; +} - return print_formul($formul); +function dump_sql() +{ + global $dat_dir, $country_lst, $org_type_lst, $org_industry_lst, $os_lst,$catalog_lst, $version_lst; + if (!is_admin()) { + return; + } +?> + CREATE TABLE dict (lang text, id int, name text, primary key (lang, id)); + CREATE TABLE testimonials ( + contact_name text, + email_address text, + org_name text, + title text DEFAULT '', + website text DEFAULT '', + filename text DEFAULT '', + month_gb int DEFAULT 0, + number_files bigint DEFAULT 0, + number_dir int DEFAULT 0, + number_fd int DEFAULT 0, + number_sd int DEFAULT 0, + org_size int DEFAULT 0, + + country_id int, + ostype_id int, + bacula_version int, + contry_id int, + orgindustry_id int, + orgtype_id int, + catalog_id int, + + id text, + publish_contact int DEFAULT 0, + publish_email int DEFAULT 0, + publish_website int DEFAULT 0, + publish_orgname int DEFAULT 0, + publish_orgsize int DEFAULT 0, + redundant_setup int DEFAULT 0, + support int DEFAULT 0, + comments text DEFAULT '', + hardware_comments text DEFAULT '', + visible int DEFAULT 0, + org_logo text DEFAULT '', + date int DEFAULT 0, + lastmodifed int DEFAULT 0 + ); + + CREATE VIEW reference AS SELECT contact_name,email_address,org_name,title,website,hardware_comments,comments, + publish_contact,publish_email,publish_orgname,org_size,publish_orgsize,publish_website, + redundant_setup,number_fd,number_sd,support,month_gb,number_files,number_dir,date,visible,filename,t.id, + orgtype.name AS orgtype, + orgindustry.name AS orgindustry, + version.name AS bacula_version, + country.name AS country, + ostype.name AS ostype, + catalog.name AS catalog + FROM testimonials AS t, dict AS orgtype, dict AS orgindustry, dict AS version, dict AS country, dict AS ostype, + dict AS catalog + + WHERE t.orgtype_id = orgtype.id AND orgtype.lang = 'en' + AND t.orgindustry_id = orgindustry.id AND orgindustry.lang = 'en' + AND t.bacula_version = version.id AND version.lang = 'en' + AND t.country_id = country.id AND country.lang = 'en' + AND t.ostype_id = ostype.id AND ostype.lang = 'en' + AND t.catalog_id = catalog.id AND catalog.lang = 'en'; + + + INSERT INTO dict (lang, id, name) VALUES ('en', 0, 'no'); + INSERT INTO dict (lang, id, name) VALUES ('en', 1, 'yes'); +
+ @@ -886,7 +1174,7 @@ function print_formul($formul) - + 1) { ?> @@ -901,13 +1189,17 @@ function print_formul($formul) + + +
Date:
Location:
Organization Type:
Industry/Function:
Website:
Website:
"2.0.x", '203' => "2.2.x", '206' => "2.4.x", - '204' => "SVN version" + '206' => "3.0.x", + '204' => "GIT master version" ); $catalog_lst = array( diff --git a/docs/home-page/es/pages/testimonial.php b/docs/home-page/es/pages/testimonial.php index 56649743..c25aeb20 100644 --- a/docs/home-page/es/pages/testimonial.php +++ b/docs/home-page/es/pages/testimonial.php @@ -25,7 +25,8 @@ $version_lst = array( '202' => "2.0.x", '203' => "2.2.x", '206' => "2.4.x", - '204' => "SVN version" + '206' => "3.0.x", + '204' => "GIT master version" ); $catalog_lst = array( @@ -784,7 +785,7 @@ function view_all() } if ($i > $max) { break; - } + } } } closedir($handle); @@ -792,7 +793,7 @@ function view_all() if ($offset > 0) { $offset = $offset - $limit; if ($offset < 0) { - $offset=0; + $offset=0; } echo "Prev "; } @@ -856,7 +857,7 @@ function send_email($id, $name, $email) // The message $message = "Hello, -You can modify your new testimonial at http://www.bacula.org/es/?page=testimonial&action=Modify&id=$id +You can modify your new testimonial at http://www.bacula.org/en/?page=testimonial&action=Modify&id=$id Best regards. "; @@ -864,7 +865,7 @@ Best regards. mail($email, $subject, $message, "From: Bacula WebMaster <$from>"); $message = "Hello, -You can review this testimonial at http://www.bacula.org/es/?page=testimonial&action=Modify&id=$id +You can review this testimonial at http://www.bacula.org/en/?page=testimonial&action=Modify&id=$id Best regards. "; @@ -896,7 +897,7 @@ function get_formul() $formul[$arr] = preg_replace('/[^a-zA-Z0-9!\.?\:\/,;_()@\n -]/', " ", $_REQUEST[$arr]); } - $attribs = array('title','website','hardware_comments','comments') ; + $attribs = array('title','website','hardware_comments','comments') ; foreach ($attribs as $arr) { $formul[$arr] = preg_replace('/[^a-zA-Z0-9!\.?\:\/,;_()@\n -]/', " ", $_REQUEST[$arr]); } @@ -998,7 +999,7 @@ function admin_link() print " View all | "; print " View Waiting
"; } - print "
"; + print "
"; } } @@ -1147,7 +1148,7 @@ function dump_sql() print join(",", $tmpk); echo ") VALUES ("; print join(",", $tmpv); - echo ");\n"; + echo ");\n"; } } closedir($handle);