Squiz Matrix  4.12.2
 All Data Structures Namespaces Functions Variables Pages
external_tools_config.inc
1 <?php
18 require_once SQ_LIB_PATH.'/config/config.inc';
19 
33 {
34 
35 
41  var $config_vars = Array(
42  'SQ_TOOL_HTML_TIDY_PATH' => Array('editable' => 1, 'default' => '/usr/bin/tidy'),
43  'SQ_TOOL_HTML_TIDY_ENABLED' => Array('editable' => 1, 'default' => FALSE),
44  'SQ_TOOL_HTML_TIDY_ACCESSIBILITY_LEVEL' => Array('editable' => 1, 'default' => 0),
45  'SQ_TOOL_HTML_TIDY_HTML_STANDARD' => Array('editable' => 1, 'default' => 'HTML_4.01_Transitional'),
46  'SQ_TOOL_PDFTOHTML_PATH' => Array('editable' => 1, 'default' => '/usr/bin/pdftohtml'),
47  'SQ_TOOL_PDFTOHTML_ENABLED' => Array('editable' => 1, 'default' => FALSE),
48  'SQ_TOOL_ANTIWORD_PATH' => Array('editable' => 1, 'default' => '/usr/bin/antiword'),
49  'SQ_TOOL_ANTIWORD_MAPPING_PATH' => Array('editable' => 1, 'default' => '/usr/share/antiword'),
50  'SQ_TOOL_ANTIWORD_ENABLED' => Array('editable' => 1, 'default' => FALSE),
51  'SQ_TOOL_JPEG_TOOLKIT_PATH' => Array('editable' => 1, 'default' => ''),
52  'SQ_TOOL_JPEG_TOOLKIT_ENABLED' => Array('editable' => 1, 'default' => FALSE),
53  'SQ_TOOL_SPELL_CHECKER_LANG' => Array('editable' => 1, 'default' => 'en'),
54  'SQ_TOOL_MARKDOWN_PATH' => Array('editable' => 1, 'default' => '/usr/bin/markdown.php'),
55  'SQ_TOOL_MARKDOWN_ENABLED' => Array('editable' => 1, 'default' => FALSE),
56  'SQ_TOOL_MARKDOWNIFY_PATH' => Array('editable' => 1, 'default' => '/usr/bin/markdownify.php'),
57  'SQ_TOOL_MARKDOWNIFY_ENABLED' => Array('editable' => 1, 'default' => FALSE),
58  'SQ_TOOL_GETID3_PATH' => Array('editable' => 1, 'default' => '/usr/share/php/getid3'),
59  'SQ_TOOL_GETID3_ENABLED' => Array('editable' => 1, 'default' => FALSE),
60  'SQ_TOOL_VIRUS_CHECKER_PATH' => Array('editable' => 1, 'default' => ''),
61  'SQ_TOOL_VIRUS_CHECKER_ENABLED' => Array('editable' => 1, 'default' => FALSE),
62  'SQ_TOOL_VIRUS_CHECKER_TYPE' => Array('editable' => 1, 'default' => 'clam'),
63  'SQ_TOOL_JS_PATH' => Array('editable' => 1, 'default' => '/usr/bin/js'),
64  'SQ_TOOL_OGG_METADATA_EXTRACTION_PATH' => Array('editable' => 1, 'default' => ''),
65  'SQ_TOOL_OGG_METADATA_EXTRACTION_ENABLED' => Array('editable' => 1, 'default' => FALSE),
66  'SQ_TOOL_MOLLOM_PUBLIC_KEY' => Array('editable' => 1, 'default' => ''),
67  'SQ_TOOL_MOLLOM_PRIVATE_KEY' => Array('editable' => 1, 'default' => ''),
68  'SQ_TOOL_MOLLOM_TEST_MODE' => Array('editable' => 1, 'default' => '0'),
69  'SQ_TOOL_MOLLOM_ACCEPT_BYPASSED_SUBMISSION' => Array('editable' => 1, 'default' => '1'),
70  'SQ_TOOL_SQUID_CACHE_HOSTNAMES' => Array('editable' => 1, 'default' => ''),
71  'SQ_TOOL_SQUID_CACHE_PATH' => Array('editable' => 1, 'default' => '/usr/bin/squidclient'),
72  'SQ_TOOL_SQUID_CACHE_PORT' => Array('editable' => 1, 'default' => '3128'),
73  'SQ_TOOL_SQUID_CACHE_OPTION' => Array('editable' => 1, 'default' => ''),
74  'SQ_TOOL_SQUID_CACHE_SLASH' => Array('editable' => 1, 'default' => FALSE),
75  'SQ_TOOL_SQUID_URL_PORT' => Array('editable' => 1, 'default' => ''),
76  'SQ_TOOL_SENDMAIL_PATH' => Array('editable' => 1, 'default' => ''),
77  'SQ_TOOL_SENDMAIL_ARGS' => Array('editable' => 1, 'default' => ''),
78  'SQ_TOOL_SIMPLESAMLPHP_PATH' => Array('editable' => 1, 'default' => ''),
79  );
80 
81 
86  function __construct()
87  {
88  parent::__construct();
89  $this->config_file = SQ_DATA_PATH.'/private/conf/tools.inc';
90 
91  }//end constructor
92 
93 
107  function save($vars, $backup_existing=FALSE, $send_message=TRUE)
108  {
109  if ($GLOBALS['SQ_SYSTEM']->runLevelEnables(SQ_SECURITY_PERMISSIONS)) {
110  $is_root = $GLOBALS['SQ_SYSTEM']->userRoot();
111  $is_admin = ($is_root || $GLOBALS['SQ_SYSTEM']->userSystemAdmin());
112 
113  // if we dont have access, go away
114  if (!$is_admin) {
115  trigger_localised_error('SYS0267', E_USER_WARNING, $this->name);
116  return FALSE;
117  }
118  }
119 
120  return parent::save($vars, $backup_existing, $send_message);
121 
122  }//end save()
123 
124 
132  function canAcquireLock()
133  {
134  // need to be root or a sys admin
135  return ($GLOBALS['SQ_SYSTEM']->userRoot() || $GLOBALS['SQ_SYSTEM']->userSystemAdmin());
136 
137  }//end canAcquireLock()
138 
139 
146  function writeAccess()
147  {
148  if (!parent::writeAccess()) return FALSE;
149 
150  if (!$GLOBALS['SQ_SYSTEM']->runLevelEnables(SQ_SECURITY_PERMISSIONS)) {
151  return TRUE;
152  }
153 
154  // need to be root or a sys admin
155  return ($GLOBALS['SQ_SYSTEM']->userRoot() || $GLOBALS['SQ_SYSTEM']->userSystemAdmin());
156 
157  }//end writeAccess()
158 
159 
172  function paintBackend(&$o)
173  {
174  parent::paintBackend($o);
175 
176  $write_access = $this->writeAccess();
177 
178  $is_root = $GLOBALS['SQ_SYSTEM']->userRoot();
179 
180  $class = get_class_lower($this);
181 
182  $o->openSection(translate('active_external_tools'));
183 
184  $o->openField(translate('enable_html_tidy'), '', '');
185  if ($write_access && $is_root) {
186  combo_box($class.'[SQ_TOOL_HTML_TIDY_ENABLED]', Array('1' => translate('yes'), '0' => translate('no')), FALSE, SQ_TOOL_HTML_TIDY_ENABLED);
187  } else {
188  echo (SQ_TOOL_HTML_TIDY_ENABLED) ? translate('yes') : translate('no');
189  }
190 
191  $o->openField(translate('html_tidy_accessibility_level'), '', '');
192  if ($write_access && $is_root) {
193  combo_box($class.'[SQ_TOOL_HTML_TIDY_ACCESSIBILITY_LEVEL]', Array('0', '1', '2', '3'), FALSE, SQ_TOOL_HTML_TIDY_ACCESSIBILITY_LEVEL);
194  } else {
195  echo (SQ_TOOL_HTML_TIDY_ACCESSIBILITY_LEVEL) ? SQ_TOOL_HTML_TIDY_ACCESSIBILITY_LEVEL : 0;
196  }
197 
198  $o->openField(translate('html_tidy_html_standard'), '', '');
199  $html_standards = Array(
200  'HTML_4.01_Transitional' =>'HTML 4.01 Transitional',
201  'HTML_4.01_Strict' => 'HTML 4.01 Strict',
202  'HTML_4.01_Frameset' => 'HTML 4.01 Frameset',
203  'XHTML_1.0_Transitional' => 'XHTML 1.0 Transitional',
204  'XHTML_1.0_Strict' => 'XHTML 1.0 Strict',
205  'XHTML_1.0_Frameset' => 'XHTML 1.0 Frameset',
206  'XHTML_1.1' => 'XHTML 1.1',
207  );
208  $html_standard_selected = (SQ_TOOL_HTML_TIDY_HTML_STANDARD) ? SQ_TOOL_HTML_TIDY_HTML_STANDARD : 'HTML_4.01_Transitional';
209  if ($write_access && $is_root) {
210  combo_box($class.'[SQ_TOOL_HTML_TIDY_HTML_STANDARD]', $html_standards, FALSE, $html_standard_selected);
211  } else {
212  echo $html_standards[$html_standard_selected];
213  }
214 
215  require_once SQ_FUDGE_PATH.'/standards_lists/character_sets.inc';
216  $tidy_char_set = array_get_index($standards_lists_tidy_char_sets, SQ_CONF_DEFAULT_CHARACTER_SET);
217 
218  if (empty($tidy_char_set)) {
219  $o->note('<span style="color: red;">'.translate('tidy_unsupported_char_set_warning').'</span>');
220  }
221 
222  $o->openField(translate('enable_pdftohtml'), '', '');
223  if ($write_access && $is_root) {
224  combo_box($class.'[SQ_TOOL_PDFTOHTML_ENABLED]', Array('1' => translate('yes'), '0' => translate('no')), FALSE, SQ_TOOL_PDFTOHTML_ENABLED);
225  } else {
226  echo (SQ_TOOL_PDFTOHTML_ENABLED) ? translate('yes') : translate('no');
227  }
228 
229  $o->openField(translate('enable_antiword'), '', '');
230  if ($write_access && $is_root) {
231  combo_box($class.'[SQ_TOOL_ANTIWORD_ENABLED]', Array('1' => translate('yes'), '0' => translate('no')), FALSE, SQ_TOOL_ANTIWORD_ENABLED);
232  } else {
233  echo (SQ_TOOL_ANTIWORD_ENABLED) ? translate('yes') : translate('no');
234  }
235 
236  $o->openField('Enable Photoshop Metadata Extraction');
237  if ($write_access && $is_root) {
238  combo_box($class.'[SQ_TOOL_JPEG_TOOLKIT_ENABLED]', Array('1' => translate('yes'), '0' => translate('no')), FALSE, SQ_TOOL_JPEG_TOOLKIT_ENABLED);
239  } else {
240  echo (SQ_TOOL_JPEG_TOOLKIT_ENABLED) ? translate('yes') : translate('no');
241  }
242 
243  $o->openField(translate('enable_markdown'), '', '');
244  if ($write_access && $is_root) {
245  combo_box($class.'[SQ_TOOL_MARKDOWN_ENABLED]', Array('1' => translate('yes'), '0' => translate('no')), FALSE, SQ_TOOL_MARKDOWN_ENABLED);
246  } else {
247  echo (SQ_TOOL_MARKDOWN_ENABLED) ? translate('yes') : translate('no');
248  }
249 
250  $o->openField(translate('enable_markdownify'), '', '');
251  if ($write_access && $is_root) {
252  combo_box($class.'[SQ_TOOL_MARKDOWNIFY_ENABLED]', Array('1' => translate('yes'), '0' => translate('no')), FALSE, SQ_TOOL_MARKDOWNIFY_ENABLED);
253  } else {
254  echo (SQ_TOOL_MARKDOWNIFY_ENABLED) ? translate('yes') : translate('no');
255  }
256 
257  $o->openField(translate('enable_getid3_extraction'));
258  if ($write_access && $is_root) {
259  combo_box($class.'[SQ_TOOL_GETID3_ENABLED]', Array('1' => translate('yes'), '0' => translate('no')), FALSE, SQ_TOOL_GETID3_ENABLED);
260  } else {
261  echo (SQ_TOOL_GETID3_ENABLED) ? translate('yes') : translate('no');
262  }
263 
264  $o->openField(translate('enable_ogg_metadata_extraction'));
265  if ($write_access && $is_root) {
266  combo_box($class.'[SQ_TOOL_OGG_METADATA_EXTRACTION_ENABLED]', Array('1' => translate('yes'), '0' => translate('no')), FALSE, SQ_TOOL_OGG_METADATA_EXTRACTION_ENABLED);
267  } else {
268  echo (SQ_TOOL_OGG_METADATA_EXTRACTION_ENABLED) ? translate('yes') : translate('no');
269  }
270 
271  $o->openField(translate('enable_virus_checker'));
272  if ($write_access && $is_root) {
273  combo_box($class.'[SQ_TOOL_VIRUS_CHECKER_ENABLED]', Array('1' => translate('yes'), '0' => translate('no')), FALSE, SQ_TOOL_VIRUS_CHECKER_ENABLED);
274  } else {
275  echo (SQ_TOOL_VIRUS_CHECKER_ENABLED) ? translate('yes') : translate('no');
276  }
277 
278  $o->closeSection();
279 
280  $o->openSection(translate('wysiwyg_editor_tools'));
281 
282  $o->openField(translate('path_to_html_tidy'));
283  echo SQ_TOOL_HTML_TIDY_PATH;
284 
285  if (!is_file(SQ_TOOL_HTML_TIDY_PATH)) {
286  ?><br /><span class="sq-backend-warning"><?php echo translate('path_to_not_valid', 'HTML Tidy'); ?></span><?php
287  } else if (!is_executable(SQ_TOOL_HTML_TIDY_PATH)) {
288  ?><br /><span class="sq-backend-warning"><?php echo translate('path_to_not_executable', 'HTML Tidy'); ?></span><?php
289  }//end if
290 
291  $o->openField(translate('wysiwyg_spell_checker_pref_field'));
292  if ($write_access) {
293  // if spell checker is not installed, disable this pref
294  text_box($class.'[SQ_TOOL_SPELL_CHECKER_LANG]', SQ_TOOL_SPELL_CHECKER_LANG, 6, 6);
295  $o->note(translate('wysiwyg_spell_checker_pref_note'));
296  } else {
297  echo SQ_TOOL_SPELL_CHECKER_LANG;
298  }
299 
300  if (!function_exists('pspell_suggest')) {
301  ?><br /><span class="sq-backend-warning"><?php echo translate('wysiwyg_pspell_not_installed'); ?></span><?php
302  } else {
303  $old_reporting = error_reporting(0);
304  $status = pspell_new(SQ_TOOL_SPELL_CHECKER_LANG);
305  error_reporting($old_reporting);
306  if ($status === FALSE) {
307  ?><br /><span class="sq-backend-warning"><?php echo translate('wysiwyg_spell_checker_pref_error', SQ_TOOL_SPELL_CHECKER_LANG); ?></span><?php
308  }
309  }
310 
311  $o->closeSection();
312 
313  $o->openSection(translate('keyword_extraction_tools'));
314 
315  $o->openField(translate('path_to_pdftohtml'));
316  echo SQ_TOOL_PDFTOHTML_PATH;
317 
318 
319  if (!is_file(SQ_TOOL_PDFTOHTML_PATH)) {
320  ?><br /><span class="sq-backend-warning"><?php echo translate('path_to_not_valid', 'PDFTOHTML'); ?></span><?php
321  } else if (!is_executable(SQ_TOOL_PDFTOHTML_PATH)) {
322  ?><br /><span class="sq-backend-warning"><?php echo translate('path_to_not_executable', 'PDFTOHTML'); ?></span><?php
323  }
324 
325  $o->openField(translate('path_to_antiword'));
326  echo SQ_TOOL_ANTIWORD_PATH;
327 
328 
329  if (!is_file(SQ_TOOL_ANTIWORD_PATH)) {
330  ?><br /><span class="sq-backend-warning"><?php echo translate('path_to_not_valid', 'Antiword');?></span><?php
331  } else if (!is_executable(SQ_TOOL_ANTIWORD_PATH)) {
332  ?><br /><span class="sq-backend-warning"><?php echo translate('path_to_not_executable', 'Antiword'); ?></span><?php
333  }
334 
335  $o->openField('Path to Antiword Mappings');
336  echo SQ_TOOL_ANTIWORD_MAPPING_PATH;
337 
338 
339  if (!is_dir(SQ_TOOL_ANTIWORD_MAPPING_PATH)) {
340  ?><br /><span class="sq-backend-warning">The path to Antiword Mappings is not valid</span><?php
341  }
342 
343  $o->closeSection();
344 
345 
346  $o->openSection('Photoshop Image Metadata Extraction');
347 
348  $o->openField('Path to PHP JPEG Metadata Toolkit');
349  echo SQ_TOOL_JPEG_TOOLKIT_PATH;
350 
351 
352  if (!is_dir(SQ_TOOL_JPEG_TOOLKIT_PATH)) {
353  ?><br /><span class="sq-backend-warning">Supplied path is not valid</span><?php
354  }
355 
356  $o->closeSection();
357 
358  $o->openSection(translate('markdown_tools'));
359 
360  $o->openField(translate('path_to_markdown'));
361  echo SQ_TOOL_MARKDOWN_PATH;
362 
363 
364  if (!is_file(SQ_TOOL_MARKDOWN_PATH)) {
365  ?><br /><span class="sq-backend-warning"><?php echo translate('path_to_not_valid', 'Markdown'); ?></span><?php
366  } else {
367  include_once SQ_TOOL_MARKDOWN_PATH;
368  if (!function_exists('Markdown')) {
369  ?><br /><span class="sq-backend-warning"><?php echo translate('path_to_markdown_no_required_function'); ?></span><?php
370  }
371  }//end if
372 
373  $o->openField(translate('path_to_markdownify'));
374  echo SQ_TOOL_MARKDOWNIFY_PATH;
375 
376 
377  if (!is_file(SQ_TOOL_MARKDOWNIFY_PATH)) {
378  ?><br /><span class="sq-backend-warning"><?php echo translate('path_to_not_valid', 'Markdownify'); ?></span><?php
379  } else {
380  include_once SQ_TOOL_MARKDOWNIFY_PATH;
381  $class_name = basename(SQ_TOOL_MARKDOWNIFY_PATH, '.php');
382  if (!method_exists($class_name, 'parseString')) {
383  ?><br /><span class="sq-backend-warning"><?php echo translate('path_to_markdownify_no_required_method', $class_name); ?></span><?php
384  }
385  }//end if
386 
387  $o->closeSection();
388 
389  $o->openSection(translate('getid3_extraction'));
390 
391  $o->openField(translate('path_to_getid3'));
392  echo SQ_TOOL_GETID3_PATH;
393 
394 
395  if (!is_dir(SQ_TOOL_GETID3_PATH)) {
396  ?><br /><span class="sq-backend-warning">Supplied path is not valid</span><?php
397  }
398 
399  $o->closeSection();
400 
401  $o->openSection(translate('ogg_metadata_extraction'));
402 
403  $o->openField(translate('path_to_ogg_metadata_extraction'));
404  echo SQ_TOOL_OGG_METADATA_EXTRACTION_PATH;
405 
406 
407  $ogg_found = FALSE;
408  if (is_file(SQ_TOOL_OGG_METADATA_EXTRACTION_PATH)) {
409  include_once SQ_TOOL_OGG_METADATA_EXTRACTION_PATH;
410  $ogg_found = method_exists('Ogg', 'Ogg');
411  }
412  if (!$ogg_found) {
413  ?><br /><span class="sq-backend-warning">Supplied path is not valid</span><?php
414  }
415 
416  $o->closeSection();
417 
418  $o->openSection(translate('virus_checker'));
419 
420  $o->openField(translate('virus_checker_type'));
421  $av_types = Array(
422  'clam' => translate('virus_checker_type_clam'),
423  'f-prot' => translate('virus_checker_type_fprot'),
424  );
425  if ($write_access) {
426  combo_box($class.'[SQ_TOOL_VIRUS_CHECKER_TYPE]', $av_types, FALSE, SQ_TOOL_VIRUS_CHECKER_TYPE);
427  } else {
428  switch (SQ_TOOL_VIRUS_CHECKER_TYPE) {
429  case 'f-prot':
430  echo translate('virus_checker_type_fprot');
431  break;
432  default:
433  echo translate('virus_checker_type_clam');
434  }//end switch
435  }//end if
436 
437  $o->openField(translate('path_to_virus_checker'));
438  echo SQ_TOOL_VIRUS_CHECKER_PATH;
439 
440 
441  if (!is_file(SQ_TOOL_VIRUS_CHECKER_PATH)) {
442  ?><br /><span class="sq-backend-warning"><?php echo translate('path_to_not_valid', 'Virus Checker'); ?></span><?php
443  } else if (!is_executable(SQ_TOOL_VIRUS_CHECKER_PATH)) {
444  ?><br /><span class="sq-backend-warning"><?php echo translate('path_to_not_executable', 'Virus Checker'); ?></span><?php
445  }//end if
446 
447  $o->closeSection();
448 
449  $o->openSection(translate('javascript_configuration'));
450  $o->openField(translate('path_to_javascript'));
451  echo SQ_TOOL_JS_PATH;
452 
453  ?><br /><?php
454  echo translate('javascript_command_note');
455  if (!is_file(SQ_TOOL_JS_PATH)) {
456  ?><br /><span class="sq-backend-warning"><?php echo translate('path_to_not_valid', 'JavaScript'); ?></span><?php
457  } else if (!is_executable(SQ_TOOL_JS_PATH)) {
458  ?><br /><span class="sq-backend-warning"><?php echo translate('path_to_not_executable', 'JavaScript'); ?></span><?php
459  }//end if
460  $o->closeSection();
461 
462  $o->openSection(translate('mollom_configuration'));
463 
464  $o->openField(translate('mollom_test_mode'));
465  if ($write_access && $is_root) {
466  combo_box($class.'[SQ_TOOL_MOLLOM_TEST_MODE]', Array('1' => translate('yes'), '0' => translate('no')), FALSE, SQ_TOOL_MOLLOM_TEST_MODE);
467  } else {
468  echo (SQ_TOOL_MOLLOM_TEST_MODE) ? translate('yes') : translate('no');
469  }
470  ?><br /><?php
471  echo translate('mollom_test_mode_note');
472  $o->openField(translate('mollom_public_key'));
473  if ($write_access) {
474  text_box($class.'[SQ_TOOL_MOLLOM_PUBLIC_KEY]', SQ_TOOL_MOLLOM_PUBLIC_KEY, 35);
475  } else {
476  echo SQ_TOOL_MOLLOM_PUBLIC_KEY;
477  }//end if
478  ?><br /><?php
479  echo translate('mollom_public_key_note');
480 
481  $o->openField(translate('mollom_private_key'));
482  if ($write_access) {
483  text_box($class.'[SQ_TOOL_MOLLOM_PRIVATE_KEY]', SQ_TOOL_MOLLOM_PRIVATE_KEY, 35);
484  } else {
485  echo SQ_TOOL_MOLLOM_PRIVATE_KEY;
486  }//end if
487  ?><br /><?php
488  echo translate('mollom_private_key_note');
489 
490  $o->openField(translate('mollom_valid_keys'));
491  // Check that keys are valid
492  if (SQ_TOOL_MOLLOM_PRIVATE_KEY && SQ_TOOL_MOLLOM_PUBLIC_KEY) {
493  require_once SQ_FUDGE_PATH.'/mollom/mollom.inc';
494  try {
495  Mollom::setPublicKey(SQ_TOOL_MOLLOM_PUBLIC_KEY);
496  Mollom::setPrivateKey(SQ_TOOL_MOLLOM_PRIVATE_KEY);
497  if (!empty($_SESSION['SQ_MOLLOM_SERVER_LIST'])) {
498  $server_list = unserialize($_SESSION['SQ_MOLLOM_SERVER_LIST']);
499  Mollom::setServerList($server_list);
500  } else {
501  $server_list = Mollom::getServerList();
502  $_SESSION['SQ_MOLLOM_SERVER_LIST'] = serialize($server_list);
503  }
504  $valid_keys = Mollom::verifyKey();
505  echo $valid_keys ? '<span style="color: green"><b>'.translate('valid').'</b></span>' : '<span style="color: red"><b>'.translate('invalid').'</b></span>';
506  } catch (Exception $e) {
507  echo '<span style="color: black"><b>'.translate('unknown').'</b></span>';
508  }
509  }
510 
511  $o->openField(translate('mollom_accept_bypassed_submission_question'));
512  if ($write_access && $is_root) {
513  combo_box($class.'[SQ_TOOL_MOLLOM_ACCEPT_BYPASSED_SUBMISSION]', Array('1' => translate('yes'), '0' => translate('no')), FALSE, SQ_TOOL_MOLLOM_ACCEPT_BYPASSED_SUBMISSION);
514  } else {
515  echo (SQ_TOOL_MOLLOM_ACCEPT_BYPASSED_SUBMISSION) ? translate('yes') : translate('no');
516  }
517  ?><br /><?php
518  echo translate('mollom_accept_bypassed_submission_note');
519  $o->closeSection();
520 
521 
522 
523 
524  // Squid caching
525  $o->openSection(translate('squid_cache_section'));
526 
527  $o->openField(translate('squid_tool_hostname'));
528  if ($write_access) {
529  text_area($class.'[SQ_TOOL_SQUID_CACHE_HOSTNAMES]', SQ_TOOL_SQUID_CACHE_HOSTNAMES, 80, 4);
530  } else {
531  echo nl2br(SQ_TOOL_SQUID_CACHE_HOSTNAMES);
532  }
533  echo $o->note(translate('squid_tool_pref_note'));
534  $o->closeField();
535  $o->openField(translate('squid_tool_path_field'));
536  echo nl2br(SQ_TOOL_SQUID_CACHE_PATH);
537  $o->closeField();
538  $o->openField(translate('squid_tool_port_field'));
539  if ($write_access) {
540  text_box($class.'[SQ_TOOL_SQUID_CACHE_PORT]', SQ_TOOL_SQUID_CACHE_PORT, 30);
541  } else {
542  echo nl2br(SQ_TOOL_SQUID_CACHE_PORT);
543  }
544  $o->closeField();
545  $o->openField(translate('squid_tool_option_field'));
546  if ($write_access) {
547  text_box($class.'[SQ_TOOL_SQUID_CACHE_OPTION]', SQ_TOOL_SQUID_CACHE_OPTION, 30);
548  $o->note(translate('squid_tool_option_note'));
549  } else {
550  echo nl2br(SQ_TOOL_SQUID_CACHE_OPTION);
551  }
552  $o->closeField();
553  $o->openField(translate('squid_tool_slash_field'));
554  $val = SQ_TOOL_SQUID_CACHE_SLASH;
555  if ($write_access) {
556  $selection = Array(
557  1 => translate('true'),
558  0 => translate('false'),
559  );
560  combo_box($class.'[SQ_TOOL_SQUID_CACHE_SLASH]', $selection, FALSE, $val);
561  } else {
562  ?><img src="<?php echo sq_web_path('lib'); ?>/web/images/<?php echo $val ? 'tick' : 'cross'; ?>.gif" width="15" height="15" /><?php
563  }
564  $o->closeField();
565  $o->openField(translate('squid_tool_url_port_field'));
566  if ($write_access) {
567  text_box($class.'[SQ_TOOL_SQUID_URL_PORT]', SQ_TOOL_SQUID_URL_PORT, 10);
568  $o->note(translate('squid_tool_url_port_note'));
569  } else {
570  echo nl2br(SQ_TOOL_SQUID_URL_PORT);
571  }
572  $o->closeField();
573  $o->closeSection();
574 
575  // Sendmail for bulkmail
576  $o->openSection(translate('sendmail'));
577  $o->openField(translate('sendmail_path'));
578  echo SQ_TOOL_SENDMAIL_PATH;
579  echo $o->note(translate('sendmail_path_note'));
580  $o->closeField();
581  $o->openField(translate('sendmail_arguments'));
582  echo SQ_TOOL_SENDMAIL_ARGS;
583  echo $o->note(translate('sendmail_arguments_note'));
584  $o->closeField();
585  $o->closeSection();
586 
587 
588  // simplesamlphp
589  $o->openSection(translate('saml_authentication'));
590  $o->openField(translate('simplesamlphp_path'));
591  echo SQ_TOOL_SIMPLESAMLPHP_PATH;
592  echo $o->note(translate('simplesamlphp_path_note'));
593  $o->closeField();
594  $o->closeSection();
595 
596  if ($write_access) $o->commitButton('', TRUE);
597 
598  }//end paintBackend()
599 
600 
601 }//end class
602 
603 ?>