@@ -32,21 +32,21 @@ |
||
32 | 32 | } |
33 | 33 | |
34 | 34 | switch (strtolower(strrchr($photo->getVar('photo_name'), '.'))) { |
35 | - case '.png': |
|
36 | - $type = 'image/png'; |
|
37 | - break; |
|
38 | - case '.gif': |
|
39 | - $type = 'image/gif'; |
|
40 | - break; |
|
41 | - case '.jpg': |
|
42 | - $type = 'image/jpeg'; |
|
43 | - break; |
|
44 | - case '.jpeg': |
|
45 | - $type = 'image/jpeg'; |
|
46 | - break; |
|
47 | - default: |
|
48 | - $type = 'application/octet-stream'; |
|
49 | - break; |
|
35 | + case '.png': |
|
36 | + $type = 'image/png'; |
|
37 | + break; |
|
38 | + case '.gif': |
|
39 | + $type = 'image/gif'; |
|
40 | + break; |
|
41 | + case '.jpg': |
|
42 | + $type = 'image/jpeg'; |
|
43 | + break; |
|
44 | + case '.jpeg': |
|
45 | + $type = 'image/jpeg'; |
|
46 | + break; |
|
47 | + default: |
|
48 | + $type = 'application/octet-stream'; |
|
49 | + break; |
|
50 | 50 | } |
51 | 51 | |
52 | 52 | header('Content-Type: ' . $type . ''); |
@@ -33,9 +33,9 @@ discard block |
||
33 | 33 | |
34 | 34 | switch ($op) { |
35 | 35 | |
36 | - case 'uploadfont': |
|
36 | + case 'uploadfont': |
|
37 | 37 | |
38 | - switch ($step) { |
|
38 | + switch ($step) { |
|
39 | 39 | |
40 | 40 | case 'enreg': |
41 | 41 | |
@@ -87,12 +87,12 @@ discard block |
||
87 | 87 | |
88 | 88 | break; |
89 | 89 | |
90 | - } |
|
90 | + } |
|
91 | 91 | |
92 | 92 | break; |
93 | 93 | |
94 | - case 'conf': |
|
95 | - switch ($step) { |
|
94 | + case 'conf': |
|
95 | + switch ($step) { |
|
96 | 96 | case 'enreg': |
97 | 97 | /** @var XoopsModuleHandler $moduleHandler */ |
98 | 98 | /** @var \XoopsConfigHandler $configHandler */ |
@@ -411,102 +411,102 @@ discard block |
||
411 | 411 | |
412 | 412 | break; |
413 | 413 | |
414 | - } |
|
414 | + } |
|
415 | 415 | |
416 | 416 | break; |
417 | 417 | |
418 | - case 'default': |
|
419 | - default: |
|
418 | + case 'default': |
|
419 | + default: |
|
420 | 420 | |
421 | - xoops_cp_header(); |
|
421 | + xoops_cp_header(); |
|
422 | 422 | |
423 | - $nbFonts = 0; |
|
424 | - $fonts = []; |
|
423 | + $nbFonts = 0; |
|
424 | + $fonts = []; |
|
425 | 425 | |
426 | - $rep = XOOPS_ROOT_PATH . '/modules/extgallery/assets/fonts/'; |
|
427 | - $dir = opendir($rep); |
|
428 | - while (false !== ($f = readdir($dir))) { |
|
429 | - if (is_file($rep . $f)) { |
|
430 | - if (preg_match('/.*ttf/', strtolower($f))) { |
|
431 | - ++$nbFonts; |
|
432 | - $fonts[] = $f; |
|
426 | + $rep = XOOPS_ROOT_PATH . '/modules/extgallery/assets/fonts/'; |
|
427 | + $dir = opendir($rep); |
|
428 | + while (false !== ($f = readdir($dir))) { |
|
429 | + if (is_file($rep . $f)) { |
|
430 | + if (preg_match('/.*ttf/', strtolower($f))) { |
|
431 | + ++$nbFonts; |
|
432 | + $fonts[] = $f; |
|
433 | + } |
|
433 | 434 | } |
434 | 435 | } |
435 | - } |
|
436 | 436 | |
437 | - $xoopsTpl->assign('nbfonts', sprintf(_AM_EXTGALLERY_ADD_FONT_LINK, $nbFonts)); |
|
437 | + $xoopsTpl->assign('nbfonts', sprintf(_AM_EXTGALLERY_ADD_FONT_LINK, $nbFonts)); |
|
438 | 438 | |
439 | - $xoopsTpl->assign('fonts', $fonts); |
|
439 | + $xoopsTpl->assign('fonts', $fonts); |
|
440 | 440 | |
441 | - // Display Watermark param form if FreeType is supported |
|
442 | - if (function_exists('imagettfbbox')) { |
|
443 | - $xoopsTpl->assign('imagettfbbox', true); |
|
441 | + // Display Watermark param form if FreeType is supported |
|
442 | + if (function_exists('imagettfbbox')) { |
|
443 | + $xoopsTpl->assign('imagettfbbox', true); |
|
444 | 444 | |
445 | - $form = new \XoopsThemeForm(_AM_EXTGALLERY_WATERMARK_CONF, 'watermark_conf', 'watermark-border.php?op=conf', 'post', true); |
|
446 | - $fontSelect = new \XoopsFormSelect(_AM_EXTGALLERY_FONT, 'watermark_font', $helper->getConfig('watermark_font')); |
|
447 | - foreach ($fonts as $font) { |
|
448 | - $fontSelect->addOption($font, $font); |
|
449 | - } |
|
450 | - $form->addElement($fontSelect); |
|
451 | - |
|
452 | - $elementTray = new \XoopsFormElementTray(_AM_EXTGALLERY_WATERMARK_TEXT, ' '); |
|
453 | - |
|
454 | - $selected1 = 1 == $helper->getConfig('watermark_type') ? ' checked' : ''; |
|
455 | - $disable = 0 == $helper->getConfig('watermark_type') ? ' disabled="disabled"' : ''; |
|
456 | - $style = 0 == $helper->getConfig('watermark_type') ? ' style="background-color:#DDDDDD;"' : ''; |
|
457 | - $onClick = ' onClick="document.getElementById(\'watermark_text\').disabled = false; document.getElementById(\'watermark_text\').style.backgroundColor = \'#FFFFFF\';"'; |
|
458 | - $WTextForm = '<input type="radio" name="watermark_type" value="1"' . $selected1 . $onClick . '> <input name="watermark_text" id="watermark_text" size="50" maxlength="255" value="' . $helper->getConfig('watermark_text') . '" type="text"' . $disable . $style . '><br>'; |
|
459 | - |
|
460 | - $selected2 = 0 == $helper->getConfig('watermark_type') ? ' checked' : ''; |
|
461 | - $onClick = ' onClick="document.getElementById(\'watermark_text\').disabled = true; document.getElementById(\'watermark_text\').style.backgroundColor = \'#DDDDDD\';"'; |
|
462 | - $WTextForm .= '<input type="radio" name="watermark_type" value="0"' . $selected2 . $onClick . '> ' . _AM_EXTGALLERY_PRINT_SUBMITTER_UNAME; |
|
463 | - |
|
464 | - $elementTray->addElement(new \XoopsFormLabel('', $WTextForm), false); |
|
465 | - $form->addElement($elementTray); |
|
466 | - $positionSelect = new \XoopsFormSelect(_AM_EXTGALLERY_POSITION, 'watermark_position', $helper->getConfig('watermark_position')); |
|
467 | - $positionSelect->addOption('tl', _AM_EXTGALLERY_TOP_LEFT); |
|
468 | - $positionSelect->addOption('tr', _AM_EXTGALLERY_TOP_RIGHT); |
|
469 | - $positionSelect->addOption('bl', _AM_EXTGALLERY_BOTTOM_LEFT); |
|
470 | - $positionSelect->addOption('br', _AM_EXTGALLERY_BOTTOM_RIGHT); |
|
471 | - $positionSelect->addOption('tc', _AM_EXTGALLERY_TOP_CENTER); |
|
472 | - $positionSelect->addOption('bc', _AM_EXTGALLERY_BOTTOM_CENTER); |
|
473 | - $positionSelect->addOption('lc', _AM_EXTGALLERY_LEFT_CENTER); |
|
474 | - $positionSelect->addOption('rc', _AM_EXTGALLERY_RIGHT_CENTER); |
|
475 | - $positionSelect->addOption('cc', _AM_EXTGALLERY_CENTER_CENTER); |
|
476 | - $form->addElement($positionSelect); |
|
477 | - $form->addElement(new \XoopsFormColorPicker(_AM_EXTGALLERY_WATERMARK_COLOR, 'watermark_color', $helper->getConfig('watermark_color')), false); |
|
478 | - $form->addElement(new \XoopsFormText(_AM_EXTGALLERY_WATERMARK_FONT_SIZE, 'watermark_fontsize', '2', '2', $helper->getConfig('watermark_fontsize')), false); |
|
479 | - $form->addElement(new \XoopsFormText(_AM_EXTGALLERY_WATERMARK_PADDING, 'watermark_padding', '2', '2', $helper->getConfig('watermark_padding')), false); |
|
480 | - $form->addElement(new \XoopsFormHidden('step', 'enreg')); |
|
481 | - $form->addElement(new \XoopsFormButton('', 'submit', _SUBMIT, 'submit')); |
|
445 | + $form = new \XoopsThemeForm(_AM_EXTGALLERY_WATERMARK_CONF, 'watermark_conf', 'watermark-border.php?op=conf', 'post', true); |
|
446 | + $fontSelect = new \XoopsFormSelect(_AM_EXTGALLERY_FONT, 'watermark_font', $helper->getConfig('watermark_font')); |
|
447 | + foreach ($fonts as $font) { |
|
448 | + $fontSelect->addOption($font, $font); |
|
449 | + } |
|
450 | + $form->addElement($fontSelect); |
|
451 | + |
|
452 | + $elementTray = new \XoopsFormElementTray(_AM_EXTGALLERY_WATERMARK_TEXT, ' '); |
|
453 | + |
|
454 | + $selected1 = 1 == $helper->getConfig('watermark_type') ? ' checked' : ''; |
|
455 | + $disable = 0 == $helper->getConfig('watermark_type') ? ' disabled="disabled"' : ''; |
|
456 | + $style = 0 == $helper->getConfig('watermark_type') ? ' style="background-color:#DDDDDD;"' : ''; |
|
457 | + $onClick = ' onClick="document.getElementById(\'watermark_text\').disabled = false; document.getElementById(\'watermark_text\').style.backgroundColor = \'#FFFFFF\';"'; |
|
458 | + $WTextForm = '<input type="radio" name="watermark_type" value="1"' . $selected1 . $onClick . '> <input name="watermark_text" id="watermark_text" size="50" maxlength="255" value="' . $helper->getConfig('watermark_text') . '" type="text"' . $disable . $style . '><br>'; |
|
459 | + |
|
460 | + $selected2 = 0 == $helper->getConfig('watermark_type') ? ' checked' : ''; |
|
461 | + $onClick = ' onClick="document.getElementById(\'watermark_text\').disabled = true; document.getElementById(\'watermark_text\').style.backgroundColor = \'#DDDDDD\';"'; |
|
462 | + $WTextForm .= '<input type="radio" name="watermark_type" value="0"' . $selected2 . $onClick . '> ' . _AM_EXTGALLERY_PRINT_SUBMITTER_UNAME; |
|
463 | + |
|
464 | + $elementTray->addElement(new \XoopsFormLabel('', $WTextForm), false); |
|
465 | + $form->addElement($elementTray); |
|
466 | + $positionSelect = new \XoopsFormSelect(_AM_EXTGALLERY_POSITION, 'watermark_position', $helper->getConfig('watermark_position')); |
|
467 | + $positionSelect->addOption('tl', _AM_EXTGALLERY_TOP_LEFT); |
|
468 | + $positionSelect->addOption('tr', _AM_EXTGALLERY_TOP_RIGHT); |
|
469 | + $positionSelect->addOption('bl', _AM_EXTGALLERY_BOTTOM_LEFT); |
|
470 | + $positionSelect->addOption('br', _AM_EXTGALLERY_BOTTOM_RIGHT); |
|
471 | + $positionSelect->addOption('tc', _AM_EXTGALLERY_TOP_CENTER); |
|
472 | + $positionSelect->addOption('bc', _AM_EXTGALLERY_BOTTOM_CENTER); |
|
473 | + $positionSelect->addOption('lc', _AM_EXTGALLERY_LEFT_CENTER); |
|
474 | + $positionSelect->addOption('rc', _AM_EXTGALLERY_RIGHT_CENTER); |
|
475 | + $positionSelect->addOption('cc', _AM_EXTGALLERY_CENTER_CENTER); |
|
476 | + $form->addElement($positionSelect); |
|
477 | + $form->addElement(new \XoopsFormColorPicker(_AM_EXTGALLERY_WATERMARK_COLOR, 'watermark_color', $helper->getConfig('watermark_color')), false); |
|
478 | + $form->addElement(new \XoopsFormText(_AM_EXTGALLERY_WATERMARK_FONT_SIZE, 'watermark_fontsize', '2', '2', $helper->getConfig('watermark_fontsize')), false); |
|
479 | + $form->addElement(new \XoopsFormText(_AM_EXTGALLERY_WATERMARK_PADDING, 'watermark_padding', '2', '2', $helper->getConfig('watermark_padding')), false); |
|
480 | + $form->addElement(new \XoopsFormHidden('step', 'enreg')); |
|
481 | + $form->addElement(new \XoopsFormButton('', 'submit', _SUBMIT, 'submit')); |
|
482 | 482 | |
483 | - $xoopsTpl->assign('watermarkform', $form->render()); |
|
483 | + $xoopsTpl->assign('watermarkform', $form->render()); |
|
484 | 484 | |
485 | - // Else display Warning message |
|
486 | - } else { |
|
487 | - $xoopsTpl->assign('freetypewarn', _AM_EXTGALLERY_WATERMARK_FREETYPE_WARN); |
|
488 | - } |
|
485 | + // Else display Warning message |
|
486 | + } else { |
|
487 | + $xoopsTpl->assign('freetypewarn', _AM_EXTGALLERY_WATERMARK_FREETYPE_WARN); |
|
488 | + } |
|
489 | 489 | |
490 | - $form = new \XoopsThemeForm(_AM_EXTGALLERY_BORDER_CONF, 'border_conf', 'watermark-border.php?op=conf', 'post', true); |
|
491 | - $form->addElement(new \XoopsFormColorPicker(_AM_EXTGALLERY_INNER_BORDER_COLOR, 'inner_border_color', $helper->getConfig('inner_border_color')), false); |
|
492 | - $form->addElement(new \XoopsFormText(_AM_EXTGALLERY_INNER_BORDER_SIZE, 'inner_border_size', '2', '2', $helper->getConfig('inner_border_size')), false); |
|
493 | - $form->addElement(new \XoopsFormColorPicker(_AM_EXTGALLERY_OUTER_BORDER_COLOR, 'outer_border_color', $helper->getConfig('outer_border_color')), false); |
|
494 | - $form->addElement(new \XoopsFormText(_AM_EXTGALLERY_OUTER_BORDER_SIZE, 'outer_border_size', '2', '2', $helper->getConfig('outer_border_size')), false); |
|
495 | - $form->addElement(new \XoopsFormHidden('step', 'enreg')); |
|
496 | - $form->addElement(new \XoopsFormButton('', 'submit', _SUBMIT, 'submit')); |
|
490 | + $form = new \XoopsThemeForm(_AM_EXTGALLERY_BORDER_CONF, 'border_conf', 'watermark-border.php?op=conf', 'post', true); |
|
491 | + $form->addElement(new \XoopsFormColorPicker(_AM_EXTGALLERY_INNER_BORDER_COLOR, 'inner_border_color', $helper->getConfig('inner_border_color')), false); |
|
492 | + $form->addElement(new \XoopsFormText(_AM_EXTGALLERY_INNER_BORDER_SIZE, 'inner_border_size', '2', '2', $helper->getConfig('inner_border_size')), false); |
|
493 | + $form->addElement(new \XoopsFormColorPicker(_AM_EXTGALLERY_OUTER_BORDER_COLOR, 'outer_border_color', $helper->getConfig('outer_border_color')), false); |
|
494 | + $form->addElement(new \XoopsFormText(_AM_EXTGALLERY_OUTER_BORDER_SIZE, 'outer_border_size', '2', '2', $helper->getConfig('outer_border_size')), false); |
|
495 | + $form->addElement(new \XoopsFormHidden('step', 'enreg')); |
|
496 | + $form->addElement(new \XoopsFormButton('', 'submit', _SUBMIT, 'submit')); |
|
497 | 497 | |
498 | - $xoopsTpl->assign('borderform', $form->render()); |
|
498 | + $xoopsTpl->assign('borderform', $form->render()); |
|
499 | 499 | |
500 | - $imageTest = getImageTest(); |
|
500 | + $imageTest = getImageTest(); |
|
501 | 501 | |
502 | - if (isset($imageTest[0])) { |
|
503 | - $xoopsTpl->assign('imagetest', $imageTest[0]); |
|
504 | - } |
|
505 | - // Call template file |
|
506 | - $xoopsTpl->display(__DIR__ . '/../templates/admin/extgallery_admin_watermark_border.tpl'); |
|
507 | - xoops_cp_footer(); |
|
502 | + if (isset($imageTest[0])) { |
|
503 | + $xoopsTpl->assign('imagetest', $imageTest[0]); |
|
504 | + } |
|
505 | + // Call template file |
|
506 | + $xoopsTpl->display(__DIR__ . '/../templates/admin/extgallery_admin_watermark_border.tpl'); |
|
507 | + xoops_cp_footer(); |
|
508 | 508 | |
509 | - break; |
|
509 | + break; |
|
510 | 510 | |
511 | 511 | } |
512 | 512 |
@@ -31,901 +31,901 @@ |
||
31 | 31 | |
32 | 32 | switch ($op) { |
33 | 33 | |
34 | - case 'galleryview': |
|
35 | - /** @var \XoopsModuleHandler $moduleHandler */ |
|
36 | - /** @var \XoopsConfigHandler $configHandler */ |
|
37 | - $configHandler = xoops_getHandler('config'); |
|
38 | - $moduleIdCriteria = new \Criteria('conf_modid', $xoopsModule->getVar('mid')); |
|
39 | - |
|
40 | - if (isset($_POST['galleryview_panelwidth'])) { |
|
41 | - if ($helper->getConfig('galleryview_panelwidth') != $_POST['galleryview_panelwidth']) { |
|
42 | - $criteria = new \CriteriaCompo(); |
|
43 | - $criteria->add($moduleIdCriteria); |
|
44 | - $criteria->add(new \Criteria('conf_name', 'galleryview_panelwidth')); |
|
45 | - $config = $configHandler->getConfigs($criteria); |
|
46 | - $config = $config[0]; |
|
47 | - $configValue = [ |
|
48 | - 'conf_modid' => $xoopsModule->getVar('mid'), |
|
49 | - 'conf_catid' => 0, |
|
50 | - 'conf_name' => 'galleryview_panelwidth', |
|
51 | - 'conf_value' => $_POST['galleryview_panelwidth'], |
|
52 | - 'conf_formtype' => 'hidden', |
|
53 | - 'conf_valuetype' => 'text' |
|
54 | - ]; |
|
55 | - $config->setVars($configValue); |
|
56 | - $configHandler->insertConfig($config); |
|
57 | - } |
|
58 | - } |
|
59 | - |
|
60 | - if (isset($_POST['galleryview_panelheight'])) { |
|
61 | - if ($helper->getConfig('galleryview_panelheight') != $_POST['galleryview_panelheight']) { |
|
62 | - $criteria = new \CriteriaCompo(); |
|
63 | - $criteria->add($moduleIdCriteria); |
|
64 | - $criteria->add(new \Criteria('conf_name', 'galleryview_panelheight')); |
|
65 | - $config = $configHandler->getConfigs($criteria); |
|
66 | - $config = $config[0]; |
|
67 | - $configValue = [ |
|
68 | - 'conf_modid' => $xoopsModule->getVar('mid'), |
|
69 | - 'conf_catid' => 0, |
|
70 | - 'conf_name' => 'galleryview_panelheight', |
|
71 | - 'conf_value' => $_POST['galleryview_panelheight'], |
|
72 | - 'conf_formtype' => 'hidden', |
|
73 | - 'conf_valuetype' => 'text' |
|
74 | - ]; |
|
75 | - $config->setVars($configValue); |
|
76 | - $configHandler->insertConfig($config); |
|
77 | - } |
|
78 | - } |
|
79 | - |
|
80 | - if (isset($_POST['galleryview_framewidth'])) { |
|
81 | - if ($helper->getConfig('galleryview_framewidth') != $_POST['galleryview_framewidth']) { |
|
82 | - $criteria = new \CriteriaCompo(); |
|
83 | - $criteria->add($moduleIdCriteria); |
|
84 | - $criteria->add(new \Criteria('conf_name', 'galleryview_framewidth')); |
|
85 | - $config = $configHandler->getConfigs($criteria); |
|
86 | - $config = $config[0]; |
|
87 | - $configValue = [ |
|
88 | - 'conf_modid' => $xoopsModule->getVar('mid'), |
|
89 | - 'conf_catid' => 0, |
|
90 | - 'conf_name' => 'galleryview_framewidth', |
|
91 | - 'conf_value' => $_POST['galleryview_framewidth'], |
|
92 | - 'conf_formtype' => 'hidden', |
|
93 | - 'conf_valuetype' => 'text' |
|
94 | - ]; |
|
95 | - $config->setVars($configValue); |
|
96 | - $configHandler->insertConfig($config); |
|
97 | - } |
|
98 | - } |
|
99 | - |
|
100 | - if (isset($_POST['galleryview_frameheight'])) { |
|
101 | - if ($helper->getConfig('galleryview_frameheight') != $_POST['galleryview_frameheight']) { |
|
102 | - $criteria = new \CriteriaCompo(); |
|
103 | - $criteria->add($moduleIdCriteria); |
|
104 | - $criteria->add(new \Criteria('conf_name', 'galleryview_frameheight')); |
|
105 | - $config = $configHandler->getConfigs($criteria); |
|
106 | - $config = $config[0]; |
|
107 | - $configValue = [ |
|
108 | - 'conf_modid' => $xoopsModule->getVar('mid'), |
|
109 | - 'conf_catid' => 0, |
|
110 | - 'conf_name' => 'galleryview_frameheight', |
|
111 | - 'conf_value' => $_POST['galleryview_frameheight'], |
|
112 | - 'conf_formtype' => 'hidden', |
|
113 | - 'conf_valuetype' => 'text' |
|
114 | - ]; |
|
115 | - $config->setVars($configValue); |
|
116 | - $configHandler->insertConfig($config); |
|
117 | - } |
|
118 | - } |
|
119 | - |
|
120 | - if (isset($_POST['galleryview_tspeed'])) { |
|
121 | - if ($helper->getConfig('galleryview_tspeed') != $_POST['galleryview_tspeed']) { |
|
122 | - $criteria = new \CriteriaCompo(); |
|
123 | - $criteria->add($moduleIdCriteria); |
|
124 | - $criteria->add(new \Criteria('conf_name', 'galleryview_tspeed')); |
|
125 | - $config = $configHandler->getConfigs($criteria); |
|
126 | - $config = $config[0]; |
|
127 | - $configValue = [ |
|
128 | - 'conf_modid' => $xoopsModule->getVar('mid'), |
|
129 | - 'conf_catid' => 0, |
|
130 | - 'conf_name' => 'galleryview_tspeed', |
|
131 | - 'conf_value' => $_POST['galleryview_tspeed'], |
|
132 | - 'conf_formtype' => 'hidden', |
|
133 | - 'conf_valuetype' => 'text' |
|
134 | - ]; |
|
135 | - $config->setVars($configValue); |
|
136 | - $configHandler->insertConfig($config); |
|
137 | - } |
|
138 | - } |
|
139 | - |
|
140 | - if (isset($_POST['galleryview_tterval'])) { |
|
141 | - if ($helper->getConfig('galleryview_tterval') != $_POST['galleryview_tterval']) { |
|
142 | - $criteria = new \CriteriaCompo(); |
|
143 | - $criteria->add($moduleIdCriteria); |
|
144 | - $criteria->add(new \Criteria('conf_name', 'galleryview_tterval')); |
|
145 | - $config = $configHandler->getConfigs($criteria); |
|
146 | - $config = $config[0]; |
|
147 | - $configValue = [ |
|
148 | - 'conf_modid' => $xoopsModule->getVar('mid'), |
|
149 | - 'conf_catid' => 0, |
|
150 | - 'conf_name' => 'galleryview_tterval', |
|
151 | - 'conf_value' => $_POST['galleryview_tterval'], |
|
152 | - 'conf_formtype' => 'hidden', |
|
153 | - 'conf_valuetype' => 'text' |
|
154 | - ]; |
|
155 | - $config->setVars($configValue); |
|
156 | - $configHandler->insertConfig($config); |
|
157 | - } |
|
158 | - } |
|
159 | - |
|
160 | - if (isset($_POST['galleryview_overlayheight'])) { |
|
161 | - if ($helper->getConfig('galleryview_overlayheight') != $_POST['galleryview_overlayheight']) { |
|
162 | - $criteria = new \CriteriaCompo(); |
|
163 | - $criteria->add($moduleIdCriteria); |
|
164 | - $criteria->add(new \Criteria('conf_name', 'galleryview_overlayheight')); |
|
165 | - $config = $configHandler->getConfigs($criteria); |
|
166 | - $config = $config[0]; |
|
167 | - $configValue = [ |
|
168 | - 'conf_modid' => $xoopsModule->getVar('mid'), |
|
169 | - 'conf_catid' => 0, |
|
170 | - 'conf_name' => 'galleryview_overlayheight', |
|
171 | - 'conf_value' => $_POST['galleryview_overlayheight'], |
|
172 | - 'conf_formtype' => 'hidden', |
|
173 | - 'conf_valuetype' => 'text' |
|
174 | - ]; |
|
175 | - $config->setVars($configValue); |
|
176 | - $configHandler->insertConfig($config); |
|
177 | - } |
|
178 | - } |
|
179 | - |
|
180 | - if (isset($_POST['galleryview_opacity'])) { |
|
181 | - if ($helper->getConfig('galleryview_opacity') != $_POST['galleryview_opacity']) { |
|
182 | - $criteria = new \CriteriaCompo(); |
|
183 | - $criteria->add($moduleIdCriteria); |
|
184 | - $criteria->add(new \Criteria('conf_name', 'galleryview_opacity')); |
|
185 | - $config = $configHandler->getConfigs($criteria); |
|
186 | - $config = $config[0]; |
|
187 | - $configValue = [ |
|
188 | - 'conf_modid' => $xoopsModule->getVar('mid'), |
|
189 | - 'conf_catid' => 0, |
|
190 | - 'conf_name' => 'galleryview_opacity', |
|
191 | - 'conf_value' => $_POST['galleryview_opacity'], |
|
192 | - 'conf_formtype' => 'hidden', |
|
193 | - 'conf_valuetype' => 'text' |
|
194 | - ]; |
|
195 | - $config->setVars($configValue); |
|
196 | - $configHandler->insertConfig($config); |
|
197 | - } |
|
198 | - } |
|
199 | - |
|
200 | - if (isset($_POST['galleryview_overlayfs'])) { |
|
201 | - if ($helper->getConfig('galleryview_overlayfs') != $_POST['galleryview_overlayfs']) { |
|
202 | - $criteria = new \CriteriaCompo(); |
|
203 | - $criteria->add($moduleIdCriteria); |
|
204 | - $criteria->add(new \Criteria('conf_name', 'galleryview_overlayfs')); |
|
205 | - $config = $configHandler->getConfigs($criteria); |
|
206 | - $config = $config[0]; |
|
207 | - $configValue = [ |
|
208 | - 'conf_modid' => $xoopsModule->getVar('mid'), |
|
209 | - 'conf_catid' => 0, |
|
210 | - 'conf_name' => 'galleryview_overlayfs', |
|
211 | - 'conf_value' => $_POST['galleryview_overlayfs'], |
|
212 | - 'conf_formtype' => 'hidden', |
|
213 | - 'conf_valuetype' => 'text' |
|
214 | - ]; |
|
215 | - $config->setVars($configValue); |
|
216 | - $configHandler->insertConfig($config); |
|
217 | - } |
|
218 | - } |
|
219 | - |
|
220 | - if (isset($_POST['galleryview_borderwidth'])) { |
|
221 | - if ($helper->getConfig('galleryview_borderwidth') != $_POST['galleryview_borderwidth']) { |
|
222 | - $criteria = new \CriteriaCompo(); |
|
223 | - $criteria->add($moduleIdCriteria); |
|
224 | - $criteria->add(new \Criteria('conf_name', 'galleryview_borderwidth')); |
|
225 | - $config = $configHandler->getConfigs($criteria); |
|
226 | - $config = $config[0]; |
|
227 | - $configValue = [ |
|
228 | - 'conf_modid' => $xoopsModule->getVar('mid'), |
|
229 | - 'conf_catid' => 0, |
|
230 | - 'conf_name' => 'galleryview_borderwidth', |
|
231 | - 'conf_value' => $_POST['galleryview_borderwidth'], |
|
232 | - 'conf_formtype' => 'hidden', |
|
233 | - 'conf_valuetype' => 'text' |
|
234 | - ]; |
|
235 | - $config->setVars($configValue); |
|
236 | - $configHandler->insertConfig($config); |
|
237 | - } |
|
238 | - } |
|
239 | - |
|
240 | - if (isset($_POST['galleryview_bordercolor'])) { |
|
241 | - if ($helper->getConfig('galleryview_bordercolor') != $_POST['galleryview_bordercolor']) { |
|
242 | - $criteria = new \CriteriaCompo(); |
|
243 | - $criteria->add($moduleIdCriteria); |
|
244 | - $criteria->add(new \Criteria('conf_name', 'galleryview_bordercolor')); |
|
245 | - $config = $configHandler->getConfigs($criteria); |
|
246 | - $config = $config[0]; |
|
247 | - $configValue = [ |
|
248 | - 'conf_modid' => $xoopsModule->getVar('mid'), |
|
249 | - 'conf_catid' => 0, |
|
250 | - 'conf_name' => 'galleryview_bordercolor', |
|
251 | - 'conf_value' => $_POST['galleryview_bordercolor'], |
|
252 | - 'conf_formtype' => 'hidden', |
|
253 | - 'conf_valuetype' => 'text' |
|
254 | - ]; |
|
255 | - $config->setVars($configValue); |
|
256 | - $configHandler->insertConfig($config); |
|
257 | - } |
|
258 | - } |
|
259 | - |
|
260 | - if (isset($_POST['galleryview_bgcolor'])) { |
|
261 | - if ($helper->getConfig('galleryview_bgcolor') != $_POST['galleryview_bgcolor']) { |
|
262 | - $criteria = new \CriteriaCompo(); |
|
263 | - $criteria->add($moduleIdCriteria); |
|
264 | - $criteria->add(new \Criteria('conf_name', 'galleryview_bgcolor')); |
|
265 | - $config = $configHandler->getConfigs($criteria); |
|
266 | - $config = $config[0]; |
|
267 | - $configValue = [ |
|
268 | - 'conf_modid' => $xoopsModule->getVar('mid'), |
|
269 | - 'conf_catid' => 0, |
|
270 | - 'conf_name' => 'galleryview_bgcolor', |
|
271 | - 'conf_value' => $_POST['galleryview_bgcolor'], |
|
272 | - 'conf_formtype' => 'hidden', |
|
273 | - 'conf_valuetype' => 'text' |
|
274 | - ]; |
|
275 | - $config->setVars($configValue); |
|
276 | - $configHandler->insertConfig($config); |
|
277 | - } |
|
278 | - } |
|
279 | - |
|
280 | - if (isset($_POST['galleryview_overlaycolor'])) { |
|
281 | - if ($helper->getConfig('galleryview_overlaycolor') != $_POST['galleryview_overlaycolor']) { |
|
282 | - $criteria = new \CriteriaCompo(); |
|
283 | - $criteria->add($moduleIdCriteria); |
|
284 | - $criteria->add(new \Criteria('conf_name', 'galleryview_overlaycolor')); |
|
285 | - $config = $configHandler->getConfigs($criteria); |
|
286 | - $config = $config[0]; |
|
287 | - $configValue = [ |
|
288 | - 'conf_modid' => $xoopsModule->getVar('mid'), |
|
289 | - 'conf_catid' => 0, |
|
290 | - 'conf_name' => 'galleryview_overlaycolor', |
|
291 | - 'conf_value' => $_POST['galleryview_overlaycolor'], |
|
292 | - 'conf_formtype' => 'hidden', |
|
293 | - 'conf_valuetype' => 'text' |
|
294 | - ]; |
|
295 | - $config->setVars($configValue); |
|
296 | - $configHandler->insertConfig($config); |
|
297 | - } |
|
298 | - } |
|
299 | - |
|
300 | - if (isset($_POST['galleryview_overlaytc'])) { |
|
301 | - if ($helper->getConfig('galleryview_overlaytc') != $_POST['galleryview_overlaytc']) { |
|
302 | - $criteria = new \CriteriaCompo(); |
|
303 | - $criteria->add($moduleIdCriteria); |
|
304 | - $criteria->add(new \Criteria('conf_name', 'galleryview_overlaytc')); |
|
305 | - $config = $configHandler->getConfigs($criteria); |
|
306 | - $config = $config[0]; |
|
307 | - $configValue = [ |
|
308 | - 'conf_modid' => $xoopsModule->getVar('mid'), |
|
309 | - 'conf_catid' => 0, |
|
310 | - 'conf_name' => 'galleryview_overlaytc', |
|
311 | - 'conf_value' => $_POST['galleryview_overlaytc'], |
|
312 | - 'conf_formtype' => 'hidden', |
|
313 | - 'conf_valuetype' => 'text' |
|
314 | - ]; |
|
315 | - $config->setVars($configValue); |
|
316 | - $configHandler->insertConfig($config); |
|
317 | - } |
|
318 | - } |
|
319 | - |
|
320 | - if (isset($_POST['galleryview_captiontc'])) { |
|
321 | - if ($helper->getConfig('galleryview_captiontc') != $_POST['galleryview_captiontc']) { |
|
322 | - $criteria = new \CriteriaCompo(); |
|
323 | - $criteria->add($moduleIdCriteria); |
|
324 | - $criteria->add(new \Criteria('conf_name', 'galleryview_captiontc')); |
|
325 | - $config = $configHandler->getConfigs($criteria); |
|
326 | - $config = $config[0]; |
|
327 | - $configValue = [ |
|
328 | - 'conf_modid' => $xoopsModule->getVar('mid'), |
|
329 | - 'conf_catid' => 0, |
|
330 | - 'conf_name' => 'galleryview_captiontc', |
|
331 | - 'conf_value' => $_POST['galleryview_captiontc'], |
|
332 | - 'conf_formtype' => 'hidden', |
|
333 | - 'conf_valuetype' => 'text' |
|
334 | - ]; |
|
335 | - $config->setVars($configValue); |
|
336 | - $configHandler->insertConfig($config); |
|
337 | - } |
|
338 | - } |
|
339 | - |
|
340 | - if (isset($_POST['galleryview_navtheme'])) { |
|
341 | - if ($helper->getConfig('galleryview_navtheme') != $_POST['galleryview_navtheme']) { |
|
342 | - $criteria = new \CriteriaCompo(); |
|
343 | - $criteria->add($moduleIdCriteria); |
|
344 | - $criteria->add(new \Criteria('conf_name', 'galleryview_navtheme')); |
|
345 | - $config = $configHandler->getConfigs($criteria); |
|
346 | - $config = $config[0]; |
|
347 | - $configValue = [ |
|
348 | - 'conf_modid' => $xoopsModule->getVar('mid'), |
|
349 | - 'conf_catid' => 0, |
|
350 | - 'conf_name' => 'galleryview_navtheme', |
|
351 | - 'conf_value' => $_POST['galleryview_navtheme'], |
|
352 | - 'conf_formtype' => 'hidden', |
|
353 | - 'conf_valuetype' => 'text' |
|
354 | - ]; |
|
355 | - $config->setVars($configValue); |
|
356 | - $configHandler->insertConfig($config); |
|
357 | - } |
|
358 | - } |
|
359 | - |
|
360 | - if (isset($_POST['galleryview_position'])) { |
|
361 | - if ($helper->getConfig('galleryview_position') != $_POST['galleryview_position']) { |
|
362 | - $criteria = new \CriteriaCompo(); |
|
363 | - $criteria->add($moduleIdCriteria); |
|
364 | - $criteria->add(new \Criteria('conf_name', 'galleryview_position')); |
|
365 | - $config = $configHandler->getConfigs($criteria); |
|
366 | - $config = $config[0]; |
|
367 | - $configValue = [ |
|
368 | - 'conf_modid' => $xoopsModule->getVar('mid'), |
|
369 | - 'conf_catid' => 0, |
|
370 | - 'conf_name' => 'galleryview_position', |
|
371 | - 'conf_value' => $_POST['galleryview_position'], |
|
372 | - 'conf_formtype' => 'hidden', |
|
373 | - 'conf_valuetype' => 'text' |
|
374 | - ]; |
|
375 | - $config->setVars($configValue); |
|
376 | - $configHandler->insertConfig($config); |
|
377 | - } |
|
378 | - } |
|
379 | - |
|
380 | - if (isset($_POST['galleryview_easing'])) { |
|
381 | - if ($helper->getConfig('galleryview_easing') != $_POST['galleryview_easing']) { |
|
382 | - $criteria = new \CriteriaCompo(); |
|
383 | - $criteria->add($moduleIdCriteria); |
|
384 | - $criteria->add(new \Criteria('conf_name', 'galleryview_easing')); |
|
385 | - $config = $configHandler->getConfigs($criteria); |
|
386 | - $config = $config[0]; |
|
387 | - $configValue = [ |
|
388 | - 'conf_modid' => $xoopsModule->getVar('mid'), |
|
389 | - 'conf_catid' => 0, |
|
390 | - 'conf_name' => 'galleryview_easing', |
|
391 | - 'conf_value' => $_POST['galleryview_easing'], |
|
392 | - 'conf_formtype' => 'hidden', |
|
393 | - 'conf_valuetype' => 'text' |
|
394 | - ]; |
|
395 | - $config->setVars($configValue); |
|
396 | - $configHandler->insertConfig($config); |
|
397 | - } |
|
398 | - } |
|
399 | - |
|
400 | - redirect_header('slideshow.php', 3, _AM_EXTGALLERY_CONFIGURATION_SAVED); |
|
401 | - break; |
|
402 | - |
|
403 | - case 'galleria': |
|
404 | - /** @var XoopsModuleHandler $moduleHandler */ |
|
405 | - $configHandler = xoops_getHandler('config'); |
|
406 | - $moduleIdCriteria = new \Criteria('conf_modid', $xoopsModule->getVar('mid')); |
|
407 | - if (isset($_POST['galleria_height'])) { |
|
408 | - if ($helper->getConfig('galleria_height') != $_POST['galleria_height']) { |
|
409 | - $criteria = new \CriteriaCompo(); |
|
410 | - $criteria->add($moduleIdCriteria); |
|
411 | - $criteria->add(new \Criteria('conf_name', 'galleria_height')); |
|
412 | - $config = $configHandler->getConfigs($criteria); |
|
413 | - $config = $config[0]; |
|
414 | - $configValue = [ |
|
415 | - 'conf_modid' => $xoopsModule->getVar('mid'), |
|
416 | - 'conf_catid' => 0, |
|
417 | - 'conf_name' => 'galleria_height', |
|
418 | - 'conf_value' => $_POST['galleria_height'], |
|
419 | - 'conf_formtype' => 'hidden', |
|
420 | - 'conf_valuetype' => 'text' |
|
421 | - ]; |
|
422 | - $config->setVars($configValue); |
|
423 | - $configHandler->insertConfig($config); |
|
424 | - } |
|
425 | - } |
|
426 | - |
|
427 | - if (isset($_POST['galleria_panelwidth'])) { |
|
428 | - if ($helper->getConfig('galleria_panelwidth') != $_POST['galleria_panelwidth']) { |
|
429 | - $criteria = new \CriteriaCompo(); |
|
430 | - $criteria->add($moduleIdCriteria); |
|
431 | - $criteria->add(new \Criteria('conf_name', 'galleria_panelwidth')); |
|
432 | - $config = $configHandler->getConfigs($criteria); |
|
433 | - $config = $config[0]; |
|
434 | - $configValue = [ |
|
435 | - 'conf_modid' => $xoopsModule->getVar('mid'), |
|
436 | - 'conf_catid' => 0, |
|
437 | - 'conf_name' => 'galleria_panelwidth', |
|
438 | - 'conf_value' => $_POST['galleria_panelwidth'], |
|
439 | - 'conf_formtype' => 'hidden', |
|
440 | - 'conf_valuetype' => 'text' |
|
441 | - ]; |
|
442 | - $config->setVars($configValue); |
|
443 | - $configHandler->insertConfig($config); |
|
444 | - } |
|
445 | - } |
|
446 | - |
|
447 | - if (isset($_POST['galleria_bgcolor'])) { |
|
448 | - if ($helper->getConfig('galleria_bgcolor') != $_POST['galleria_bgcolor']) { |
|
449 | - $criteria = new \CriteriaCompo(); |
|
450 | - $criteria->add($moduleIdCriteria); |
|
451 | - $criteria->add(new \Criteria('conf_name', 'galleria_bgcolor')); |
|
452 | - $config = $configHandler->getConfigs($criteria); |
|
453 | - $config = $config[0]; |
|
454 | - $configValue = [ |
|
455 | - 'conf_modid' => $xoopsModule->getVar('mid'), |
|
456 | - 'conf_catid' => 0, |
|
457 | - 'conf_name' => 'galleria_bgcolor', |
|
458 | - 'conf_value' => $_POST['galleria_bgcolor'], |
|
459 | - 'conf_formtype' => 'hidden', |
|
460 | - 'conf_valuetype' => 'text' |
|
461 | - ]; |
|
462 | - $config->setVars($configValue); |
|
463 | - $configHandler->insertConfig($config); |
|
464 | - } |
|
465 | - } |
|
466 | - |
|
467 | - if (isset($_POST['galleria_bcolor'])) { |
|
468 | - if ($helper->getConfig('galleria_bcolor') != $_POST['galleria_bcolor']) { |
|
469 | - $criteria = new \CriteriaCompo(); |
|
470 | - $criteria->add($moduleIdCriteria); |
|
471 | - $criteria->add(new \Criteria('conf_name', 'galleria_bcolor')); |
|
472 | - $config = $configHandler->getConfigs($criteria); |
|
473 | - $config = $config[0]; |
|
474 | - $configValue = [ |
|
475 | - 'conf_modid' => $xoopsModule->getVar('mid'), |
|
476 | - 'conf_catid' => 0, |
|
477 | - 'conf_name' => 'galleria_bcolor', |
|
478 | - 'conf_value' => $_POST['galleria_bcolor'], |
|
479 | - 'conf_formtype' => 'hidden', |
|
480 | - 'conf_valuetype' => 'text' |
|
481 | - ]; |
|
482 | - $config->setVars($configValue); |
|
483 | - $configHandler->insertConfig($config); |
|
484 | - } |
|
485 | - } |
|
486 | - |
|
487 | - if (isset($_POST['galleria_bgimg'])) { |
|
488 | - if ($helper->getConfig('galleria_bgimg') != $_POST['galleria_bgimg']) { |
|
489 | - $criteria = new \CriteriaCompo(); |
|
490 | - $criteria->add($moduleIdCriteria); |
|
491 | - $criteria->add(new \Criteria('conf_name', 'galleria_bgimg')); |
|
492 | - $config = $configHandler->getConfigs($criteria); |
|
493 | - $config = $config[0]; |
|
494 | - $configValue = [ |
|
495 | - 'conf_modid' => $xoopsModule->getVar('mid'), |
|
496 | - 'conf_catid' => 0, |
|
497 | - 'conf_name' => 'galleria_bgimg', |
|
498 | - 'conf_value' => $_POST['galleria_bgimg'], |
|
499 | - 'conf_formtype' => 'hidden', |
|
500 | - 'conf_valuetype' => 'text' |
|
501 | - ]; |
|
502 | - $config->setVars($configValue); |
|
503 | - $configHandler->insertConfig($config); |
|
504 | - } |
|
505 | - } |
|
506 | - |
|
507 | - if (isset($_POST['galleria_autoplay'])) { |
|
508 | - if ($helper->getConfig('galleria_autoplay') != $_POST['galleria_autoplay']) { |
|
509 | - $criteria = new \CriteriaCompo(); |
|
510 | - $criteria->add($moduleIdCriteria); |
|
511 | - $criteria->add(new \Criteria('conf_name', 'galleria_autoplay')); |
|
512 | - $config = $configHandler->getConfigs($criteria); |
|
513 | - $config = $config[0]; |
|
514 | - $configValue = [ |
|
515 | - 'conf_modid' => $xoopsModule->getVar('mid'), |
|
516 | - 'conf_catid' => 0, |
|
517 | - 'conf_name' => 'galleria_autoplay', |
|
518 | - 'conf_value' => $_POST['galleria_autoplay'], |
|
519 | - 'conf_formtype' => 'hidden', |
|
520 | - 'conf_valuetype' => 'text' |
|
521 | - ]; |
|
522 | - $config->setVars($configValue); |
|
523 | - $configHandler->insertConfig($config); |
|
524 | - } |
|
525 | - } |
|
526 | - |
|
527 | - if (isset($_POST['galleria_transition'])) { |
|
528 | - if ($helper->getConfig('galleria_transition') != $_POST['galleria_transition']) { |
|
529 | - $criteria = new \CriteriaCompo(); |
|
530 | - $criteria->add($moduleIdCriteria); |
|
531 | - $criteria->add(new \Criteria('conf_name', 'galleria_transition')); |
|
532 | - $config = $configHandler->getConfigs($criteria); |
|
533 | - $config = $config[0]; |
|
534 | - $configValue = [ |
|
535 | - 'conf_modid' => $xoopsModule->getVar('mid'), |
|
536 | - 'conf_catid' => 0, |
|
537 | - 'conf_name' => 'galleria_transition', |
|
538 | - 'conf_value' => $_POST['galleria_transition'], |
|
539 | - 'conf_formtype' => 'hidden', |
|
540 | - 'conf_valuetype' => 'text' |
|
541 | - ]; |
|
542 | - $config->setVars($configValue); |
|
543 | - $configHandler->insertConfig($config); |
|
544 | - } |
|
545 | - } |
|
546 | - |
|
547 | - if (isset($_POST['galleria_tspeed'])) { |
|
548 | - if ($helper->getConfig('galleria_tspeed') != $_POST['galleria_tspeed']) { |
|
549 | - $criteria = new \CriteriaCompo(); |
|
550 | - $criteria->add($moduleIdCriteria); |
|
551 | - $criteria->add(new \Criteria('conf_name', 'galleria_tspeed')); |
|
552 | - $config = $configHandler->getConfigs($criteria); |
|
553 | - $config = $config[0]; |
|
554 | - $configValue = [ |
|
555 | - 'conf_modid' => $xoopsModule->getVar('mid'), |
|
556 | - 'conf_catid' => 0, |
|
557 | - 'conf_name' => 'galleria_tspeed', |
|
558 | - 'conf_value' => $_POST['galleria_tspeed'], |
|
559 | - 'conf_formtype' => 'hidden', |
|
560 | - 'conf_valuetype' => 'text' |
|
561 | - ]; |
|
562 | - $config->setVars($configValue); |
|
563 | - $configHandler->insertConfig($config); |
|
564 | - } |
|
565 | - } |
|
566 | - redirect_header('slideshow.php', 3, _AM_EXTGALLERY_CONFIGURATION_SAVED); |
|
567 | - break; |
|
568 | - |
|
569 | - case 'galleriffic': |
|
570 | - /** @var XoopsModuleHandler $moduleHandler */ |
|
571 | - $configHandler = xoops_getHandler('config'); |
|
572 | - $moduleIdCriteria = new \Criteria('conf_modid', $xoopsModule->getVar('mid')); |
|
573 | - |
|
574 | - if (isset($_POST['galleriffic_height'])) { |
|
575 | - if ($helper->getConfig('galleriffic_height') != $_POST['galleriffic_height']) { |
|
576 | - $criteria = new \CriteriaCompo(); |
|
577 | - $criteria->add($moduleIdCriteria); |
|
578 | - $criteria->add(new \Criteria('conf_name', 'galleriffic_height')); |
|
579 | - $config = $configHandler->getConfigs($criteria); |
|
580 | - $config = $config[0]; |
|
581 | - $configValue = [ |
|
582 | - 'conf_modid' => $xoopsModule->getVar('mid'), |
|
583 | - 'conf_catid' => 0, |
|
584 | - 'conf_name' => 'galleriffic_height', |
|
585 | - 'conf_value' => $_POST['galleriffic_height'], |
|
586 | - 'conf_formtype' => 'hidden', |
|
587 | - 'conf_valuetype' => 'text' |
|
588 | - ]; |
|
589 | - $config->setVars($configValue); |
|
590 | - $configHandler->insertConfig($config); |
|
591 | - } |
|
592 | - } |
|
593 | - |
|
594 | - if (isset($_POST['galleriffic_width'])) { |
|
595 | - if ($helper->getConfig('galleriffic_width') != $_POST['galleriffic_width']) { |
|
596 | - $criteria = new \CriteriaCompo(); |
|
597 | - $criteria->add($moduleIdCriteria); |
|
598 | - $criteria->add(new \Criteria('conf_name', 'galleriffic_width')); |
|
599 | - $config = $configHandler->getConfigs($criteria); |
|
600 | - $config = $config[0]; |
|
601 | - $configValue = [ |
|
602 | - 'conf_modid' => $xoopsModule->getVar('mid'), |
|
603 | - 'conf_catid' => 0, |
|
604 | - 'conf_name' => 'galleriffic_width', |
|
605 | - 'conf_value' => $_POST['galleriffic_width'], |
|
606 | - 'conf_formtype' => 'hidden', |
|
607 | - 'conf_valuetype' => 'text' |
|
608 | - ]; |
|
609 | - $config->setVars($configValue); |
|
610 | - $configHandler->insertConfig($config); |
|
611 | - } |
|
612 | - } |
|
613 | - |
|
614 | - if (isset($_POST['galleriffic_bgcolor'])) { |
|
615 | - if ($helper->getConfig('galleriffic_bgcolor') != $_POST['galleriffic_bgcolor']) { |
|
616 | - $criteria = new \CriteriaCompo(); |
|
617 | - $criteria->add($moduleIdCriteria); |
|
618 | - $criteria->add(new \Criteria('conf_name', 'galleriffic_bgcolor')); |
|
619 | - $config = $configHandler->getConfigs($criteria); |
|
620 | - $config = $config[0]; |
|
621 | - $configValue = [ |
|
622 | - 'conf_modid' => $xoopsModule->getVar('mid'), |
|
623 | - 'conf_catid' => 0, |
|
624 | - 'conf_name' => 'galleriffic_bgcolor', |
|
625 | - 'conf_value' => $_POST['galleriffic_bgcolor'], |
|
626 | - 'conf_formtype' => 'hidden', |
|
627 | - 'conf_valuetype' => 'text' |
|
628 | - ]; |
|
629 | - $config->setVars($configValue); |
|
630 | - $configHandler->insertConfig($config); |
|
631 | - } |
|
632 | - } |
|
633 | - |
|
634 | - if (isset($_POST['galleriffic_bordercolor'])) { |
|
635 | - if ($helper->getConfig('galleriffic_bordercolor') != $_POST['galleriffic_bordercolor']) { |
|
636 | - $criteria = new \CriteriaCompo(); |
|
637 | - $criteria->add($moduleIdCriteria); |
|
638 | - $criteria->add(new \Criteria('conf_name', 'galleriffic_bordercolor')); |
|
639 | - $config = $configHandler->getConfigs($criteria); |
|
640 | - $config = $config[0]; |
|
641 | - $configValue = [ |
|
642 | - 'conf_modid' => $xoopsModule->getVar('mid'), |
|
643 | - 'conf_catid' => 0, |
|
644 | - 'conf_name' => 'galleriffic_bordercolor', |
|
645 | - 'conf_value' => $_POST['galleriffic_bordercolor'], |
|
646 | - 'conf_formtype' => 'hidden', |
|
647 | - 'conf_valuetype' => 'text' |
|
648 | - ]; |
|
649 | - $config->setVars($configValue); |
|
650 | - $configHandler->insertConfig($config); |
|
651 | - } |
|
652 | - } |
|
653 | - |
|
654 | - if (isset($_POST['galleriffic_fontcolor'])) { |
|
655 | - if ($helper->getConfig('galleriffic_fontcolor') != $_POST['galleriffic_fontcolor']) { |
|
656 | - $criteria = new \CriteriaCompo(); |
|
657 | - $criteria->add($moduleIdCriteria); |
|
658 | - $criteria->add(new \Criteria('conf_name', 'galleriffic_fontcolor')); |
|
659 | - $config = $configHandler->getConfigs($criteria); |
|
660 | - $config = $config[0]; |
|
661 | - $configValue = [ |
|
662 | - 'conf_modid' => $xoopsModule->getVar('mid'), |
|
663 | - 'conf_catid' => 0, |
|
664 | - 'conf_name' => 'galleriffic_fontcolor', |
|
665 | - 'conf_value' => $_POST['galleriffic_fontcolor'], |
|
666 | - 'conf_formtype' => 'hidden', |
|
667 | - 'conf_valuetype' => 'text' |
|
668 | - ]; |
|
669 | - $config->setVars($configValue); |
|
670 | - $configHandler->insertConfig($config); |
|
671 | - } |
|
672 | - } |
|
673 | - |
|
674 | - if (isset($_POST['galleriffic_autoplay'])) { |
|
675 | - if ($helper->getConfig('galleriffic_autoplay') != $_POST['galleriffic_autoplay']) { |
|
676 | - $criteria = new \CriteriaCompo(); |
|
677 | - $criteria->add($moduleIdCriteria); |
|
678 | - $criteria->add(new \Criteria('conf_name', 'galleriffic_autoplay')); |
|
679 | - $config = $configHandler->getConfigs($criteria); |
|
680 | - $config = $config[0]; |
|
681 | - $configValue = [ |
|
682 | - 'conf_modid' => $xoopsModule->getVar('mid'), |
|
683 | - 'conf_catid' => 0, |
|
684 | - 'conf_name' => 'galleriffic_autoplay', |
|
685 | - 'conf_value' => $_POST['galleriffic_autoplay'], |
|
686 | - 'conf_formtype' => 'hidden', |
|
687 | - 'conf_valuetype' => 'text' |
|
688 | - ]; |
|
689 | - $config->setVars($configValue); |
|
690 | - $configHandler->insertConfig($config); |
|
691 | - } |
|
692 | - } |
|
693 | - |
|
694 | - if (isset($_POST['galleriffic_nb_thumbs'])) { |
|
695 | - if ($helper->getConfig('galleriffic_nb_thumbs') != $_POST['galleriffic_nb_thumbs']) { |
|
696 | - $criteria = new \CriteriaCompo(); |
|
697 | - $criteria->add($moduleIdCriteria); |
|
698 | - $criteria->add(new \Criteria('conf_name', 'galleriffic_nb_thumbs')); |
|
699 | - $config = $configHandler->getConfigs($criteria); |
|
700 | - $config = $config[0]; |
|
701 | - $configValue = [ |
|
702 | - 'conf_modid' => $xoopsModule->getVar('mid'), |
|
703 | - 'conf_catid' => 0, |
|
704 | - 'conf_name' => 'galleriffic_nb_thumbs', |
|
705 | - 'conf_value' => $_POST['galleriffic_nb_thumbs'], |
|
706 | - 'conf_formtype' => 'hidden', |
|
707 | - 'conf_valuetype' => 'text' |
|
708 | - ]; |
|
709 | - $config->setVars($configValue); |
|
710 | - $configHandler->insertConfig($config); |
|
711 | - } |
|
712 | - } |
|
713 | - |
|
714 | - if (isset($_POST['galleriffic_nb_colthumbs'])) { |
|
715 | - if ($helper->getConfig('galleriffic_nb_colthumbs') != $_POST['galleriffic_nb_colthumbs']) { |
|
716 | - $criteria = new \CriteriaCompo(); |
|
717 | - $criteria->add($moduleIdCriteria); |
|
718 | - $criteria->add(new \Criteria('conf_name', 'galleriffic_nb_colthumbs')); |
|
719 | - $config = $configHandler->getConfigs($criteria); |
|
720 | - $config = $config[0]; |
|
721 | - $configValue = [ |
|
722 | - 'conf_modid' => $xoopsModule->getVar('mid'), |
|
723 | - 'conf_catid' => 0, |
|
724 | - 'conf_name' => 'galleriffic_nb_colthumbs', |
|
725 | - 'conf_value' => $_POST['galleriffic_nb_colthumbs'], |
|
726 | - 'conf_formtype' => 'hidden', |
|
727 | - 'conf_valuetype' => 'text' |
|
728 | - ]; |
|
729 | - $config->setVars($configValue); |
|
730 | - $configHandler->insertConfig($config); |
|
731 | - } |
|
732 | - } |
|
733 | - |
|
734 | - if (isset($_POST['galleriffic_nb_preload'])) { |
|
735 | - if ($helper->getConfig('galleriffic_nb_preload') != $_POST['galleriffic_nb_preload']) { |
|
736 | - $criteria = new \CriteriaCompo(); |
|
737 | - $criteria->add($moduleIdCriteria); |
|
738 | - $criteria->add(new \Criteria('conf_name', 'galleriffic_nb_preload')); |
|
739 | - $config = $configHandler->getConfigs($criteria); |
|
740 | - $config = $config[0]; |
|
741 | - $configValue = [ |
|
742 | - 'conf_modid' => $xoopsModule->getVar('mid'), |
|
743 | - 'conf_catid' => 0, |
|
744 | - 'conf_name' => 'galleriffic_nb_preload', |
|
745 | - 'conf_value' => $_POST['galleriffic_nb_preload'], |
|
746 | - 'conf_formtype' => 'hidden', |
|
747 | - 'conf_valuetype' => 'text' |
|
748 | - ]; |
|
749 | - $config->setVars($configValue); |
|
750 | - $configHandler->insertConfig($config); |
|
751 | - } |
|
752 | - } |
|
753 | - |
|
754 | - if (isset($_POST['galleriffic_tdelay'])) { |
|
755 | - if ($helper->getConfig('galleriffic_tdelay') != $_POST['galleriffic_tdelay']) { |
|
756 | - $criteria = new \CriteriaCompo(); |
|
757 | - $criteria->add($moduleIdCriteria); |
|
758 | - $criteria->add(new \Criteria('conf_name', 'galleriffic_tdelay')); |
|
759 | - $config = $configHandler->getConfigs($criteria); |
|
760 | - $config = $config[0]; |
|
761 | - $configValue = [ |
|
762 | - 'conf_modid' => $xoopsModule->getVar('mid'), |
|
763 | - 'conf_catid' => 0, |
|
764 | - 'conf_name' => 'galleriffic_tdelay', |
|
765 | - 'conf_value' => $_POST['galleriffic_tdelay'], |
|
766 | - 'conf_formtype' => 'hidden', |
|
767 | - 'conf_valuetype' => 'text' |
|
768 | - ]; |
|
769 | - $config->setVars($configValue); |
|
770 | - $configHandler->insertConfig($config); |
|
771 | - } |
|
772 | - } |
|
773 | - |
|
774 | - if (isset($_POST['galleriffic_tspeed'])) { |
|
775 | - if ($helper->getConfig('galleriffic_tspeed') != $_POST['galleriffic_tspeed']) { |
|
776 | - $criteria = new \CriteriaCompo(); |
|
777 | - $criteria->add($moduleIdCriteria); |
|
778 | - $criteria->add(new \Criteria('conf_name', 'galleriffic_tspeed')); |
|
779 | - $config = $configHandler->getConfigs($criteria); |
|
780 | - $config = $config[0]; |
|
781 | - $configValue = [ |
|
782 | - 'conf_modid' => $xoopsModule->getVar('mid'), |
|
783 | - 'conf_catid' => 0, |
|
784 | - 'conf_name' => 'galleriffic_tspeed', |
|
785 | - 'conf_value' => $_POST['galleriffic_tspeed'], |
|
786 | - 'conf_formtype' => 'hidden', |
|
787 | - 'conf_valuetype' => 'text' |
|
788 | - ]; |
|
789 | - $config->setVars($configValue); |
|
790 | - $configHandler->insertConfig($config); |
|
791 | - } |
|
792 | - } |
|
793 | - |
|
794 | - if (isset($_POST['galleriffic_show_descr'])) { |
|
795 | - if ($helper->getConfig('galleriffic_show_descr') != $_POST['galleriffic_show_descr']) { |
|
796 | - $criteria = new \CriteriaCompo(); |
|
797 | - $criteria->add($moduleIdCriteria); |
|
798 | - $criteria->add(new \Criteria('conf_name', 'galleriffic_show_descr')); |
|
799 | - $config = $configHandler->getConfigs($criteria); |
|
800 | - $config = $config[0]; |
|
801 | - $configValue = [ |
|
802 | - 'conf_modid' => $xoopsModule->getVar('mid'), |
|
803 | - 'conf_catid' => 0, |
|
804 | - 'conf_name' => 'galleriffic_show_descr', |
|
805 | - 'conf_value' => $_POST['galleriffic_show_descr'], |
|
806 | - 'conf_formtype' => 'hidden', |
|
807 | - 'conf_valuetype' => 'text' |
|
808 | - ]; |
|
809 | - $config->setVars($configValue); |
|
810 | - $configHandler->insertConfig($config); |
|
811 | - } |
|
812 | - } |
|
813 | - |
|
814 | - if (isset($_POST['galleriffic_download'])) { |
|
815 | - if ($helper->getConfig('galleriffic_download') != $_POST['galleriffic_download']) { |
|
816 | - $criteria = new \CriteriaCompo(); |
|
817 | - $criteria->add($moduleIdCriteria); |
|
818 | - $criteria->add(new \Criteria('conf_name', 'galleriffic_download')); |
|
819 | - $config = $configHandler->getConfigs($criteria); |
|
820 | - $config = $config[0]; |
|
821 | - $configValue = [ |
|
822 | - 'conf_modid' => $xoopsModule->getVar('mid'), |
|
823 | - 'conf_catid' => 0, |
|
824 | - 'conf_name' => 'galleriffic_download', |
|
825 | - 'conf_value' => $_POST['galleriffic_download'], |
|
826 | - 'conf_formtype' => 'hidden', |
|
827 | - 'conf_valuetype' => 'text' |
|
828 | - ]; |
|
829 | - $config->setVars($configValue); |
|
830 | - $configHandler->insertConfig($config); |
|
831 | - } |
|
832 | - } |
|
833 | - redirect_header('slideshow.php', 3, _AM_EXTGALLERY_CONFIGURATION_SAVED); |
|
834 | - break; |
|
835 | - |
|
836 | - case 'default': |
|
837 | - default: |
|
838 | - |
|
839 | - xoops_cp_header(); |
|
840 | - |
|
841 | - //echo "<pre>";print_r($xoopsModuleConfig);echo "</pre>"; |
|
842 | - $xoopsTpl->assign('displayslideshow', 'slideshow' === $helper->getConfig('display_type')); |
|
843 | - |
|
844 | - $form = new \XoopsThemeForm(_AM_EXTGALLERY_GVIEW_CONF, 'galleryview_conf', 'slideshow.php', 'post', true); |
|
845 | - $form->addElement(new \XoopsFormText(_AM_EXTGALLERY_GVIEW_PANELWIDE, 'galleryview_panelwidth', '5', '5', $helper->getConfig('galleryview_panelwidth')), false); |
|
846 | - $form->addElement(new \XoopsFormText(_AM_EXTGALLERY_GVIEW_PANELHEIGHT, 'galleryview_panelheight', '5', '5', $helper->getConfig('galleryview_panelheight')), false); |
|
847 | - $form->addElement(new \XoopsFormText(_AM_EXTGALLERY_GVIEW_FRAMEWIDTH, 'galleryview_framewidth', '5', '5', $helper->getConfig('galleryview_framewidth')), false); |
|
848 | - $form->addElement(new \XoopsFormText(_AM_EXTGALLERY_GVIEW_FRAMEHEIGHT, 'galleryview_frameheight', '5', '5', $helper->getConfig('galleryview_frameheight')), false); |
|
849 | - $form->addElement(new \XoopsFormText(_AM_EXTGALLERY_GVIEW_TSPEED, 'galleryview_tspeed', '5', '5', $helper->getConfig('galleryview_tspeed')), false); |
|
850 | - $form->addElement(new \XoopsFormText(_AM_EXTGALLERY_GVIEW_TTERVAL, 'galleryview_tterval', '5', '5', $helper->getConfig('galleryview_tterval')), false); |
|
851 | - $form->addElement(new \XoopsFormText(_AM_EXTGALLERY_GVIEW_OPACITY, 'galleryview_opacity', '5', '5', $helper->getConfig('galleryview_opacity')), false); |
|
852 | - $form->addElement(new \XoopsFormText(_AM_EXTGALLERY_GVIEW_OVERLYAHEIGHT, 'galleryview_overlayheight', '5', '5', $helper->getConfig('galleryview_overlayheight')), false); |
|
853 | - $form->addElement(new \XoopsFormText(_AM_EXTGALLERY_GVIEW_OVERLAYFS, 'galleryview_overlayfs', '5', '5', $helper->getConfig('galleryview_overlayfs')), false); |
|
854 | - $form->addElement(new \XoopsFormText(_AM_EXTGALLERY_GVIEW_BORDERWIDTH, 'galleryview_borderwidth', '5', '5', $helper->getConfig('galleryview_borderwidth')), false); |
|
855 | - $form->addElement(new \XoopsFormColorPicker(_AM_EXTGALLERY_GVIEW_BORDERCOLOR, 'galleryview_bordercolor', $helper->getConfig('galleryview_bordercolor')), false); |
|
856 | - $form->addElement(new \XoopsFormColorPicker(_AM_EXTGALLERY_GVIEW_BGCOLOR, 'galleryview_bgcolor', $helper->getConfig('galleryview_bgcolor')), false); |
|
857 | - $form->addElement(new \XoopsFormColorPicker(_AM_EXTGALLERY_GVIEW_OVERLAYCOLOR, 'galleryview_overlaycolor', $helper->getConfig('galleryview_overlaycolor')), false); |
|
858 | - $form->addElement(new \XoopsFormColorPicker(_AM_EXTGALLERY_GVIEW_OVERLAYTC, 'galleryview_overlaytc', $helper->getConfig('galleryview_overlaytc')), false); |
|
859 | - $form->addElement(new \XoopsFormColorPicker(_AM_EXTGALLERY_GVIEW_CAPTIONTC, 'galleryview_captiontc', $helper->getConfig('galleryview_captiontc')), false); |
|
860 | - $navthemeSelect = new \XoopsFormSelect(_AM_EXTGALLERY_GVIEW_NAVTHEME, 'galleryview_navtheme', $helper->getConfig('galleryview_navtheme')); |
|
861 | - $navthemeSelect->addOption('light', _AM_EXTGALLERY_GVIEW_LIGHT); |
|
862 | - $navthemeSelect->addOption('dark', _AM_EXTGALLERY_GVIEW_DARK); |
|
863 | - $navthemeSelect->addOption('custom', _AM_EXTGALLERY_GVIEW_CUSTOM); |
|
864 | - $form->addElement($navthemeSelect); |
|
865 | - $positionSelect = new \XoopsFormSelect(_AM_EXTGALLERY_GVIEW_POSITION, 'galleryview_position', $helper->getConfig('galleryview_position')); |
|
866 | - $positionSelect->addOption('bottom', _AM_EXTGALLERY_GVIEW_BOTTOM); |
|
867 | - $positionSelect->addOption('top', _AM_EXTGALLERY_GVIEW_TOP); |
|
868 | - $form->addElement($positionSelect); |
|
869 | - $easingSelect = new \XoopsFormSelect(_AM_EXTGALLERY_GVIEW_EASING, 'galleryview_easing', $helper->getConfig('galleryview_easing')); |
|
870 | - $easingSelect->addOption('swing', _AM_EXTGALLERY_GVIEW_EASING_OP1); |
|
871 | - $easingSelect->addOption('linear', _AM_EXTGALLERY_GVIEW_EASING_OP2); |
|
872 | - $easingSelect->addOption('easeInOutBack', _AM_EXTGALLERY_GVIEW_EASING_OP3); |
|
873 | - $easingSelect->addOption('easeInOutQuad', _AM_EXTGALLERY_GVIEW_EASING_OP4); |
|
874 | - $easingSelect->addOption('easeOutBounce', _AM_EXTGALLERY_GVIEW_EASING_OP5); |
|
875 | - $form->addElement($easingSelect); |
|
876 | - $form->addElement(new \XoopsFormHidden('op', 'galleryview')); |
|
877 | - $form->addElement(new \XoopsFormButton('', 'submit', _SUBMIT, 'submit')); |
|
878 | - $xoopsTpl->assign('galleryviewform', $form->render()); |
|
879 | - |
|
880 | - $form = new \XoopsThemeForm(_AM_EXTGALLERY_GRIA_CONF, 'galleria_conf', 'slideshow.php', 'post', true); |
|
881 | - $form->addElement(new \XoopsFormText(_AM_EXTGALLERY_GRIA_HEIGHT, 'galleria_height', '5', '5', $helper->getConfig('galleria_height')), false); |
|
882 | - $form->addElement(new \XoopsFormText(_AM_EXTGALLERY_GRIA_PANELWIDTH, 'galleria_panelwidth', '5', '5', $helper->getConfig('galleria_panelwidth')), false); |
|
883 | - $form->addElement(new \XoopsFormColorPicker(_AM_EXTGALLERY_GRIA_BGCOLOR, 'galleria_bgcolor', $helper->getConfig('galleria_bgcolor')), false); |
|
884 | - $form->addElement(new \XoopsFormColorPicker(_AM_EXTGALLERY_GRIA_BCOLOR, 'galleria_bcolor', $helper->getConfig('galleria_bcolor')), false); |
|
885 | - $bgimgSelect = new \XoopsFormSelect(_AM_EXTGALLERY_GRIA_BGIMG, 'galleria_bgimg', $helper->getConfig('galleria_bgimg')); |
|
886 | - $bgimgSelect->addOption('classic-map', _AM_EXTGALLERY_GRIA_BGIMG_OP1); |
|
887 | - $bgimgSelect->addOption('classic-map-b', _AM_EXTGALLERY_GRIA_BGIMG_OP2); |
|
888 | - $form->addElement($bgimgSelect); |
|
889 | - $form->addElement(new \XoopsFormRadioYN(_AM_EXTGALLERY_GRIA_AUTOPLAY, 'galleria_autoplay', $helper->getConfig('galleria_autoplay'))); |
|
890 | - $select_trans = new \XoopsFormSelect(_AM_EXTGALLERY_GRIA_TRANS, 'galleria_transition', $helper->getConfig('galleria_transition')); |
|
891 | - $select_trans->addOption('fade', _AM_EXTGALLERY_GRIA_TRANS_TYP1); |
|
892 | - $select_trans->addOption('flash', _AM_EXTGALLERY_GRIA_TRANS_TYP2); |
|
893 | - $select_trans->addOption('pulse', _AM_EXTGALLERY_GRIA_TRANS_TYP3); |
|
894 | - $select_trans->addOption('slide', _AM_EXTGALLERY_GRIA_TRANS_TYP4); |
|
895 | - $select_trans->addOption('fadeslide', _AM_EXTGALLERY_GRIA_TRANS_TYP5); |
|
896 | - $form->addElement($select_trans); |
|
897 | - $form->addElement(new \XoopsFormText(_AM_EXTGALLERY_GRIA_TSPEED, 'galleria_tspeed', '5', '5', $helper->getConfig('galleria_tspeed')), false); |
|
898 | - $form->addElement(new \XoopsFormHidden('op', 'galleria')); |
|
899 | - $form->addElement(new \XoopsFormButton('', 'submit', _SUBMIT, 'submit')); |
|
900 | - $xoopsTpl->assign('galleriaform', $form->render()); |
|
901 | - |
|
902 | - $form = new \XoopsThemeForm(_AM_EXTGALLERY_GFIC_CONF, 'galleriffic_conf', 'slideshow.php', 'post', true); |
|
903 | - $form->addElement(new \XoopsFormText(_AM_EXTGALLERY_GFIC_HEIGHT, 'galleriffic_height', '5', '5', $helper->getConfig('galleriffic_height')), false); |
|
904 | - $form->addElement(new \XoopsFormText(_AM_EXTGALLERY_GFIC_WIDTH, 'galleriffic_width', '5', '5', $helper->getConfig('galleriffic_width')), false); |
|
905 | - $form->addElement(new \XoopsFormColorPicker(_AM_EXTGALLERY_GFIC_BGCOLOR, 'galleriffic_bgcolor', $helper->getConfig('galleriffic_bgcolor')), false); |
|
906 | - $form->addElement(new \XoopsFormColorPicker(_AM_EXTGALLERY_GFIC_BCOLOR, 'galleriffic_bordercolor', $helper->getConfig('galleriffic_bordercolor')), false); |
|
907 | - $form->addElement(new \XoopsFormColorPicker(_AM_EXTGALLERY_GFIC_FONTCOLOR, 'galleriffic_fontcolor', $helper->getConfig('galleriffic_fontcolor')), false); |
|
908 | - $form->addElement(new \XoopsFormRadioYN(_AM_EXTGALLERY_GFIC_AUTOPLAY, 'galleriffic_autoplay', $helper->getConfig('galleriffic_autoplay'))); |
|
909 | - $form->addElement(new \XoopsFormText(_AM_EXTGALLERY_GFIC_NB_THUMBS, 'galleriffic_nb_thumbs', '5', '5', $helper->getConfig('galleriffic_nb_thumbs')), false); |
|
910 | - $select_nbcol = new \XoopsFormSelect(_AM_EXTGALLERY_GFIC_NB_COLTHUMBS, 'galleriffic_nb_colthumbs', $helper->getConfig('galleriffic_nb_colthumbs')); |
|
911 | - $select_nbcol->addOption('0', '0 - hidden'); |
|
912 | - $select_nbcol->addOption('1', '1'); |
|
913 | - $select_nbcol->addOption('2', '2'); |
|
914 | - $select_nbcol->addOption('3', '3'); |
|
915 | - $form->addElement($select_nbcol); |
|
916 | - $form->addElement(new \XoopsFormText(_AM_EXTGALLERY_GFIC_NB_PRELOAD, 'galleriffic_nb_preload', '5', '5', $helper->getConfig('galleriffic_nb_preload')), false); |
|
917 | - $form->addElement(new \XoopsFormText(_AM_EXTGALLERY_GFIC_TDELAY, 'galleriffic_tdelay', '5', '5', $helper->getConfig('galleriffic_tdelay')), false); |
|
918 | - $form->addElement(new \XoopsFormText(_AM_EXTGALLERY_GFIC_TSPEED, 'galleriffic_tspeed', '5', '5', $helper->getConfig('galleriffic_tspeed')), false); |
|
919 | - $form->addElement(new \XoopsFormRadioYN(_AM_EXTGALLERY_GFIC_SHOW_DESCR, 'galleriffic_show_descr', $helper->getConfig('galleriffic_show_descr'))); |
|
920 | - $form->addElement(new \XoopsFormRadioYN(_AM_EXTGALLERY_GFIC_DOWNLOAD, 'galleriffic_download', $helper->getConfig('galleriffic_download'))); |
|
921 | - $form->addElement(new \XoopsFormHidden('op', 'galleriffic')); |
|
922 | - $form->addElement(new \XoopsFormButton('', 'submit', _SUBMIT, 'submit')); |
|
923 | - $xoopsTpl->assign('gallerifficform', $form->render()); |
|
924 | - |
|
925 | - // Call template file |
|
926 | - $xoopsTpl->display(XOOPS_ROOT_PATH . '/modules/extgallery/templates/admin/extgallery_admin_slideshow.tpl'); |
|
927 | - xoops_cp_footer(); |
|
928 | - |
|
929 | - break; |
|
34 | + case 'galleryview': |
|
35 | + /** @var \XoopsModuleHandler $moduleHandler */ |
|
36 | + /** @var \XoopsConfigHandler $configHandler */ |
|
37 | + $configHandler = xoops_getHandler('config'); |
|
38 | + $moduleIdCriteria = new \Criteria('conf_modid', $xoopsModule->getVar('mid')); |
|
39 | + |
|
40 | + if (isset($_POST['galleryview_panelwidth'])) { |
|
41 | + if ($helper->getConfig('galleryview_panelwidth') != $_POST['galleryview_panelwidth']) { |
|
42 | + $criteria = new \CriteriaCompo(); |
|
43 | + $criteria->add($moduleIdCriteria); |
|
44 | + $criteria->add(new \Criteria('conf_name', 'galleryview_panelwidth')); |
|
45 | + $config = $configHandler->getConfigs($criteria); |
|
46 | + $config = $config[0]; |
|
47 | + $configValue = [ |
|
48 | + 'conf_modid' => $xoopsModule->getVar('mid'), |
|
49 | + 'conf_catid' => 0, |
|
50 | + 'conf_name' => 'galleryview_panelwidth', |
|
51 | + 'conf_value' => $_POST['galleryview_panelwidth'], |
|
52 | + 'conf_formtype' => 'hidden', |
|
53 | + 'conf_valuetype' => 'text' |
|
54 | + ]; |
|
55 | + $config->setVars($configValue); |
|
56 | + $configHandler->insertConfig($config); |
|
57 | + } |
|
58 | + } |
|
59 | + |
|
60 | + if (isset($_POST['galleryview_panelheight'])) { |
|
61 | + if ($helper->getConfig('galleryview_panelheight') != $_POST['galleryview_panelheight']) { |
|
62 | + $criteria = new \CriteriaCompo(); |
|
63 | + $criteria->add($moduleIdCriteria); |
|
64 | + $criteria->add(new \Criteria('conf_name', 'galleryview_panelheight')); |
|
65 | + $config = $configHandler->getConfigs($criteria); |
|
66 | + $config = $config[0]; |
|
67 | + $configValue = [ |
|
68 | + 'conf_modid' => $xoopsModule->getVar('mid'), |
|
69 | + 'conf_catid' => 0, |
|
70 | + 'conf_name' => 'galleryview_panelheight', |
|
71 | + 'conf_value' => $_POST['galleryview_panelheight'], |
|
72 | + 'conf_formtype' => 'hidden', |
|
73 | + 'conf_valuetype' => 'text' |
|
74 | + ]; |
|
75 | + $config->setVars($configValue); |
|
76 | + $configHandler->insertConfig($config); |
|
77 | + } |
|
78 | + } |
|
79 | + |
|
80 | + if (isset($_POST['galleryview_framewidth'])) { |
|
81 | + if ($helper->getConfig('galleryview_framewidth') != $_POST['galleryview_framewidth']) { |
|
82 | + $criteria = new \CriteriaCompo(); |
|
83 | + $criteria->add($moduleIdCriteria); |
|
84 | + $criteria->add(new \Criteria('conf_name', 'galleryview_framewidth')); |
|
85 | + $config = $configHandler->getConfigs($criteria); |
|
86 | + $config = $config[0]; |
|
87 | + $configValue = [ |
|
88 | + 'conf_modid' => $xoopsModule->getVar('mid'), |
|
89 | + 'conf_catid' => 0, |
|
90 | + 'conf_name' => 'galleryview_framewidth', |
|
91 | + 'conf_value' => $_POST['galleryview_framewidth'], |
|
92 | + 'conf_formtype' => 'hidden', |
|
93 | + 'conf_valuetype' => 'text' |
|
94 | + ]; |
|
95 | + $config->setVars($configValue); |
|
96 | + $configHandler->insertConfig($config); |
|
97 | + } |
|
98 | + } |
|
99 | + |
|
100 | + if (isset($_POST['galleryview_frameheight'])) { |
|
101 | + if ($helper->getConfig('galleryview_frameheight') != $_POST['galleryview_frameheight']) { |
|
102 | + $criteria = new \CriteriaCompo(); |
|
103 | + $criteria->add($moduleIdCriteria); |
|
104 | + $criteria->add(new \Criteria('conf_name', 'galleryview_frameheight')); |
|
105 | + $config = $configHandler->getConfigs($criteria); |
|
106 | + $config = $config[0]; |
|
107 | + $configValue = [ |
|
108 | + 'conf_modid' => $xoopsModule->getVar('mid'), |
|
109 | + 'conf_catid' => 0, |
|
110 | + 'conf_name' => 'galleryview_frameheight', |
|
111 | + 'conf_value' => $_POST['galleryview_frameheight'], |
|
112 | + 'conf_formtype' => 'hidden', |
|
113 | + 'conf_valuetype' => 'text' |
|
114 | + ]; |
|
115 | + $config->setVars($configValue); |
|
116 | + $configHandler->insertConfig($config); |
|
117 | + } |
|
118 | + } |
|
119 | + |
|
120 | + if (isset($_POST['galleryview_tspeed'])) { |
|
121 | + if ($helper->getConfig('galleryview_tspeed') != $_POST['galleryview_tspeed']) { |
|
122 | + $criteria = new \CriteriaCompo(); |
|
123 | + $criteria->add($moduleIdCriteria); |
|
124 | + $criteria->add(new \Criteria('conf_name', 'galleryview_tspeed')); |
|
125 | + $config = $configHandler->getConfigs($criteria); |
|
126 | + $config = $config[0]; |
|
127 | + $configValue = [ |
|
128 | + 'conf_modid' => $xoopsModule->getVar('mid'), |
|
129 | + 'conf_catid' => 0, |
|
130 | + 'conf_name' => 'galleryview_tspeed', |
|
131 | + 'conf_value' => $_POST['galleryview_tspeed'], |
|
132 | + 'conf_formtype' => 'hidden', |
|
133 | + 'conf_valuetype' => 'text' |
|
134 | + ]; |
|
135 | + $config->setVars($configValue); |
|
136 | + $configHandler->insertConfig($config); |
|
137 | + } |
|
138 | + } |
|
139 | + |
|
140 | + if (isset($_POST['galleryview_tterval'])) { |
|
141 | + if ($helper->getConfig('galleryview_tterval') != $_POST['galleryview_tterval']) { |
|
142 | + $criteria = new \CriteriaCompo(); |
|
143 | + $criteria->add($moduleIdCriteria); |
|
144 | + $criteria->add(new \Criteria('conf_name', 'galleryview_tterval')); |
|
145 | + $config = $configHandler->getConfigs($criteria); |
|
146 | + $config = $config[0]; |
|
147 | + $configValue = [ |
|
148 | + 'conf_modid' => $xoopsModule->getVar('mid'), |
|
149 | + 'conf_catid' => 0, |
|
150 | + 'conf_name' => 'galleryview_tterval', |
|
151 | + 'conf_value' => $_POST['galleryview_tterval'], |
|
152 | + 'conf_formtype' => 'hidden', |
|
153 | + 'conf_valuetype' => 'text' |
|
154 | + ]; |
|
155 | + $config->setVars($configValue); |
|
156 | + $configHandler->insertConfig($config); |
|
157 | + } |
|
158 | + } |
|
159 | + |
|
160 | + if (isset($_POST['galleryview_overlayheight'])) { |
|
161 | + if ($helper->getConfig('galleryview_overlayheight') != $_POST['galleryview_overlayheight']) { |
|
162 | + $criteria = new \CriteriaCompo(); |
|
163 | + $criteria->add($moduleIdCriteria); |
|
164 | + $criteria->add(new \Criteria('conf_name', 'galleryview_overlayheight')); |
|
165 | + $config = $configHandler->getConfigs($criteria); |
|
166 | + $config = $config[0]; |
|
167 | + $configValue = [ |
|
168 | + 'conf_modid' => $xoopsModule->getVar('mid'), |
|
169 | + 'conf_catid' => 0, |
|
170 | + 'conf_name' => 'galleryview_overlayheight', |
|
171 | + 'conf_value' => $_POST['galleryview_overlayheight'], |
|
172 | + 'conf_formtype' => 'hidden', |
|
173 | + 'conf_valuetype' => 'text' |
|
174 | + ]; |
|
175 | + $config->setVars($configValue); |
|
176 | + $configHandler->insertConfig($config); |
|
177 | + } |
|
178 | + } |
|
179 | + |
|
180 | + if (isset($_POST['galleryview_opacity'])) { |
|
181 | + if ($helper->getConfig('galleryview_opacity') != $_POST['galleryview_opacity']) { |
|
182 | + $criteria = new \CriteriaCompo(); |
|
183 | + $criteria->add($moduleIdCriteria); |
|
184 | + $criteria->add(new \Criteria('conf_name', 'galleryview_opacity')); |
|
185 | + $config = $configHandler->getConfigs($criteria); |
|
186 | + $config = $config[0]; |
|
187 | + $configValue = [ |
|
188 | + 'conf_modid' => $xoopsModule->getVar('mid'), |
|
189 | + 'conf_catid' => 0, |
|
190 | + 'conf_name' => 'galleryview_opacity', |
|
191 | + 'conf_value' => $_POST['galleryview_opacity'], |
|
192 | + 'conf_formtype' => 'hidden', |
|
193 | + 'conf_valuetype' => 'text' |
|
194 | + ]; |
|
195 | + $config->setVars($configValue); |
|
196 | + $configHandler->insertConfig($config); |
|
197 | + } |
|
198 | + } |
|
199 | + |
|
200 | + if (isset($_POST['galleryview_overlayfs'])) { |
|
201 | + if ($helper->getConfig('galleryview_overlayfs') != $_POST['galleryview_overlayfs']) { |
|
202 | + $criteria = new \CriteriaCompo(); |
|
203 | + $criteria->add($moduleIdCriteria); |
|
204 | + $criteria->add(new \Criteria('conf_name', 'galleryview_overlayfs')); |
|
205 | + $config = $configHandler->getConfigs($criteria); |
|
206 | + $config = $config[0]; |
|
207 | + $configValue = [ |
|
208 | + 'conf_modid' => $xoopsModule->getVar('mid'), |
|
209 | + 'conf_catid' => 0, |
|
210 | + 'conf_name' => 'galleryview_overlayfs', |
|
211 | + 'conf_value' => $_POST['galleryview_overlayfs'], |
|
212 | + 'conf_formtype' => 'hidden', |
|
213 | + 'conf_valuetype' => 'text' |
|
214 | + ]; |
|
215 | + $config->setVars($configValue); |
|
216 | + $configHandler->insertConfig($config); |
|
217 | + } |
|
218 | + } |
|
219 | + |
|
220 | + if (isset($_POST['galleryview_borderwidth'])) { |
|
221 | + if ($helper->getConfig('galleryview_borderwidth') != $_POST['galleryview_borderwidth']) { |
|
222 | + $criteria = new \CriteriaCompo(); |
|
223 | + $criteria->add($moduleIdCriteria); |
|
224 | + $criteria->add(new \Criteria('conf_name', 'galleryview_borderwidth')); |
|
225 | + $config = $configHandler->getConfigs($criteria); |
|
226 | + $config = $config[0]; |
|
227 | + $configValue = [ |
|
228 | + 'conf_modid' => $xoopsModule->getVar('mid'), |
|
229 | + 'conf_catid' => 0, |
|
230 | + 'conf_name' => 'galleryview_borderwidth', |
|
231 | + 'conf_value' => $_POST['galleryview_borderwidth'], |
|
232 | + 'conf_formtype' => 'hidden', |
|
233 | + 'conf_valuetype' => 'text' |
|
234 | + ]; |
|
235 | + $config->setVars($configValue); |
|
236 | + $configHandler->insertConfig($config); |
|
237 | + } |
|
238 | + } |
|
239 | + |
|
240 | + if (isset($_POST['galleryview_bordercolor'])) { |
|
241 | + if ($helper->getConfig('galleryview_bordercolor') != $_POST['galleryview_bordercolor']) { |
|
242 | + $criteria = new \CriteriaCompo(); |
|
243 | + $criteria->add($moduleIdCriteria); |
|
244 | + $criteria->add(new \Criteria('conf_name', 'galleryview_bordercolor')); |
|
245 | + $config = $configHandler->getConfigs($criteria); |
|
246 | + $config = $config[0]; |
|
247 | + $configValue = [ |
|
248 | + 'conf_modid' => $xoopsModule->getVar('mid'), |
|
249 | + 'conf_catid' => 0, |
|
250 | + 'conf_name' => 'galleryview_bordercolor', |
|
251 | + 'conf_value' => $_POST['galleryview_bordercolor'], |
|
252 | + 'conf_formtype' => 'hidden', |
|
253 | + 'conf_valuetype' => 'text' |
|
254 | + ]; |
|
255 | + $config->setVars($configValue); |
|
256 | + $configHandler->insertConfig($config); |
|
257 | + } |
|
258 | + } |
|
259 | + |
|
260 | + if (isset($_POST['galleryview_bgcolor'])) { |
|
261 | + if ($helper->getConfig('galleryview_bgcolor') != $_POST['galleryview_bgcolor']) { |
|
262 | + $criteria = new \CriteriaCompo(); |
|
263 | + $criteria->add($moduleIdCriteria); |
|
264 | + $criteria->add(new \Criteria('conf_name', 'galleryview_bgcolor')); |
|
265 | + $config = $configHandler->getConfigs($criteria); |
|
266 | + $config = $config[0]; |
|
267 | + $configValue = [ |
|
268 | + 'conf_modid' => $xoopsModule->getVar('mid'), |
|
269 | + 'conf_catid' => 0, |
|
270 | + 'conf_name' => 'galleryview_bgcolor', |
|
271 | + 'conf_value' => $_POST['galleryview_bgcolor'], |
|
272 | + 'conf_formtype' => 'hidden', |
|
273 | + 'conf_valuetype' => 'text' |
|
274 | + ]; |
|
275 | + $config->setVars($configValue); |
|
276 | + $configHandler->insertConfig($config); |
|
277 | + } |
|
278 | + } |
|
279 | + |
|
280 | + if (isset($_POST['galleryview_overlaycolor'])) { |
|
281 | + if ($helper->getConfig('galleryview_overlaycolor') != $_POST['galleryview_overlaycolor']) { |
|
282 | + $criteria = new \CriteriaCompo(); |
|
283 | + $criteria->add($moduleIdCriteria); |
|
284 | + $criteria->add(new \Criteria('conf_name', 'galleryview_overlaycolor')); |
|
285 | + $config = $configHandler->getConfigs($criteria); |
|
286 | + $config = $config[0]; |
|
287 | + $configValue = [ |
|
288 | + 'conf_modid' => $xoopsModule->getVar('mid'), |
|
289 | + 'conf_catid' => 0, |
|
290 | + 'conf_name' => 'galleryview_overlaycolor', |
|
291 | + 'conf_value' => $_POST['galleryview_overlaycolor'], |
|
292 | + 'conf_formtype' => 'hidden', |
|
293 | + 'conf_valuetype' => 'text' |
|
294 | + ]; |
|
295 | + $config->setVars($configValue); |
|
296 | + $configHandler->insertConfig($config); |
|
297 | + } |
|
298 | + } |
|
299 | + |
|
300 | + if (isset($_POST['galleryview_overlaytc'])) { |
|
301 | + if ($helper->getConfig('galleryview_overlaytc') != $_POST['galleryview_overlaytc']) { |
|
302 | + $criteria = new \CriteriaCompo(); |
|
303 | + $criteria->add($moduleIdCriteria); |
|
304 | + $criteria->add(new \Criteria('conf_name', 'galleryview_overlaytc')); |
|
305 | + $config = $configHandler->getConfigs($criteria); |
|
306 | + $config = $config[0]; |
|
307 | + $configValue = [ |
|
308 | + 'conf_modid' => $xoopsModule->getVar('mid'), |
|
309 | + 'conf_catid' => 0, |
|
310 | + 'conf_name' => 'galleryview_overlaytc', |
|
311 | + 'conf_value' => $_POST['galleryview_overlaytc'], |
|
312 | + 'conf_formtype' => 'hidden', |
|
313 | + 'conf_valuetype' => 'text' |
|
314 | + ]; |
|
315 | + $config->setVars($configValue); |
|
316 | + $configHandler->insertConfig($config); |
|
317 | + } |
|
318 | + } |
|
319 | + |
|
320 | + if (isset($_POST['galleryview_captiontc'])) { |
|
321 | + if ($helper->getConfig('galleryview_captiontc') != $_POST['galleryview_captiontc']) { |
|
322 | + $criteria = new \CriteriaCompo(); |
|
323 | + $criteria->add($moduleIdCriteria); |
|
324 | + $criteria->add(new \Criteria('conf_name', 'galleryview_captiontc')); |
|
325 | + $config = $configHandler->getConfigs($criteria); |
|
326 | + $config = $config[0]; |
|
327 | + $configValue = [ |
|
328 | + 'conf_modid' => $xoopsModule->getVar('mid'), |
|
329 | + 'conf_catid' => 0, |
|
330 | + 'conf_name' => 'galleryview_captiontc', |
|
331 | + 'conf_value' => $_POST['galleryview_captiontc'], |
|
332 | + 'conf_formtype' => 'hidden', |
|
333 | + 'conf_valuetype' => 'text' |
|
334 | + ]; |
|
335 | + $config->setVars($configValue); |
|
336 | + $configHandler->insertConfig($config); |
|
337 | + } |
|
338 | + } |
|
339 | + |
|
340 | + if (isset($_POST['galleryview_navtheme'])) { |
|
341 | + if ($helper->getConfig('galleryview_navtheme') != $_POST['galleryview_navtheme']) { |
|
342 | + $criteria = new \CriteriaCompo(); |
|
343 | + $criteria->add($moduleIdCriteria); |
|
344 | + $criteria->add(new \Criteria('conf_name', 'galleryview_navtheme')); |
|
345 | + $config = $configHandler->getConfigs($criteria); |
|
346 | + $config = $config[0]; |
|
347 | + $configValue = [ |
|
348 | + 'conf_modid' => $xoopsModule->getVar('mid'), |
|
349 | + 'conf_catid' => 0, |
|
350 | + 'conf_name' => 'galleryview_navtheme', |
|
351 | + 'conf_value' => $_POST['galleryview_navtheme'], |
|
352 | + 'conf_formtype' => 'hidden', |
|
353 | + 'conf_valuetype' => 'text' |
|
354 | + ]; |
|
355 | + $config->setVars($configValue); |
|
356 | + $configHandler->insertConfig($config); |
|
357 | + } |
|
358 | + } |
|
359 | + |
|
360 | + if (isset($_POST['galleryview_position'])) { |
|
361 | + if ($helper->getConfig('galleryview_position') != $_POST['galleryview_position']) { |
|
362 | + $criteria = new \CriteriaCompo(); |
|
363 | + $criteria->add($moduleIdCriteria); |
|
364 | + $criteria->add(new \Criteria('conf_name', 'galleryview_position')); |
|
365 | + $config = $configHandler->getConfigs($criteria); |
|
366 | + $config = $config[0]; |
|
367 | + $configValue = [ |
|
368 | + 'conf_modid' => $xoopsModule->getVar('mid'), |
|
369 | + 'conf_catid' => 0, |
|
370 | + 'conf_name' => 'galleryview_position', |
|
371 | + 'conf_value' => $_POST['galleryview_position'], |
|
372 | + 'conf_formtype' => 'hidden', |
|
373 | + 'conf_valuetype' => 'text' |
|
374 | + ]; |
|
375 | + $config->setVars($configValue); |
|
376 | + $configHandler->insertConfig($config); |
|
377 | + } |
|
378 | + } |
|
379 | + |
|
380 | + if (isset($_POST['galleryview_easing'])) { |
|
381 | + if ($helper->getConfig('galleryview_easing') != $_POST['galleryview_easing']) { |
|
382 | + $criteria = new \CriteriaCompo(); |
|
383 | + $criteria->add($moduleIdCriteria); |
|
384 | + $criteria->add(new \Criteria('conf_name', 'galleryview_easing')); |
|
385 | + $config = $configHandler->getConfigs($criteria); |
|
386 | + $config = $config[0]; |
|
387 | + $configValue = [ |
|
388 | + 'conf_modid' => $xoopsModule->getVar('mid'), |
|
389 | + 'conf_catid' => 0, |
|
390 | + 'conf_name' => 'galleryview_easing', |
|
391 | + 'conf_value' => $_POST['galleryview_easing'], |
|
392 | + 'conf_formtype' => 'hidden', |
|
393 | + 'conf_valuetype' => 'text' |
|
394 | + ]; |
|
395 | + $config->setVars($configValue); |
|
396 | + $configHandler->insertConfig($config); |
|
397 | + } |
|
398 | + } |
|
399 | + |
|
400 | + redirect_header('slideshow.php', 3, _AM_EXTGALLERY_CONFIGURATION_SAVED); |
|
401 | + break; |
|
402 | + |
|
403 | + case 'galleria': |
|
404 | + /** @var XoopsModuleHandler $moduleHandler */ |
|
405 | + $configHandler = xoops_getHandler('config'); |
|
406 | + $moduleIdCriteria = new \Criteria('conf_modid', $xoopsModule->getVar('mid')); |
|
407 | + if (isset($_POST['galleria_height'])) { |
|
408 | + if ($helper->getConfig('galleria_height') != $_POST['galleria_height']) { |
|
409 | + $criteria = new \CriteriaCompo(); |
|
410 | + $criteria->add($moduleIdCriteria); |
|
411 | + $criteria->add(new \Criteria('conf_name', 'galleria_height')); |
|
412 | + $config = $configHandler->getConfigs($criteria); |
|
413 | + $config = $config[0]; |
|
414 | + $configValue = [ |
|
415 | + 'conf_modid' => $xoopsModule->getVar('mid'), |
|
416 | + 'conf_catid' => 0, |
|
417 | + 'conf_name' => 'galleria_height', |
|
418 | + 'conf_value' => $_POST['galleria_height'], |
|
419 | + 'conf_formtype' => 'hidden', |
|
420 | + 'conf_valuetype' => 'text' |
|
421 | + ]; |
|
422 | + $config->setVars($configValue); |
|
423 | + $configHandler->insertConfig($config); |
|
424 | + } |
|
425 | + } |
|
426 | + |
|
427 | + if (isset($_POST['galleria_panelwidth'])) { |
|
428 | + if ($helper->getConfig('galleria_panelwidth') != $_POST['galleria_panelwidth']) { |
|
429 | + $criteria = new \CriteriaCompo(); |
|
430 | + $criteria->add($moduleIdCriteria); |
|
431 | + $criteria->add(new \Criteria('conf_name', 'galleria_panelwidth')); |
|
432 | + $config = $configHandler->getConfigs($criteria); |
|
433 | + $config = $config[0]; |
|
434 | + $configValue = [ |
|
435 | + 'conf_modid' => $xoopsModule->getVar('mid'), |
|
436 | + 'conf_catid' => 0, |
|
437 | + 'conf_name' => 'galleria_panelwidth', |
|
438 | + 'conf_value' => $_POST['galleria_panelwidth'], |
|
439 | + 'conf_formtype' => 'hidden', |
|
440 | + 'conf_valuetype' => 'text' |
|
441 | + ]; |
|
442 | + $config->setVars($configValue); |
|
443 | + $configHandler->insertConfig($config); |
|
444 | + } |
|
445 | + } |
|
446 | + |
|
447 | + if (isset($_POST['galleria_bgcolor'])) { |
|
448 | + if ($helper->getConfig('galleria_bgcolor') != $_POST['galleria_bgcolor']) { |
|
449 | + $criteria = new \CriteriaCompo(); |
|
450 | + $criteria->add($moduleIdCriteria); |
|
451 | + $criteria->add(new \Criteria('conf_name', 'galleria_bgcolor')); |
|
452 | + $config = $configHandler->getConfigs($criteria); |
|
453 | + $config = $config[0]; |
|
454 | + $configValue = [ |
|
455 | + 'conf_modid' => $xoopsModule->getVar('mid'), |
|
456 | + 'conf_catid' => 0, |
|
457 | + 'conf_name' => 'galleria_bgcolor', |
|
458 | + 'conf_value' => $_POST['galleria_bgcolor'], |
|
459 | + 'conf_formtype' => 'hidden', |
|
460 | + 'conf_valuetype' => 'text' |
|
461 | + ]; |
|
462 | + $config->setVars($configValue); |
|
463 | + $configHandler->insertConfig($config); |
|
464 | + } |
|
465 | + } |
|
466 | + |
|
467 | + if (isset($_POST['galleria_bcolor'])) { |
|
468 | + if ($helper->getConfig('galleria_bcolor') != $_POST['galleria_bcolor']) { |
|
469 | + $criteria = new \CriteriaCompo(); |
|
470 | + $criteria->add($moduleIdCriteria); |
|
471 | + $criteria->add(new \Criteria('conf_name', 'galleria_bcolor')); |
|
472 | + $config = $configHandler->getConfigs($criteria); |
|
473 | + $config = $config[0]; |
|
474 | + $configValue = [ |
|
475 | + 'conf_modid' => $xoopsModule->getVar('mid'), |
|
476 | + 'conf_catid' => 0, |
|
477 | + 'conf_name' => 'galleria_bcolor', |
|
478 | + 'conf_value' => $_POST['galleria_bcolor'], |
|
479 | + 'conf_formtype' => 'hidden', |
|
480 | + 'conf_valuetype' => 'text' |
|
481 | + ]; |
|
482 | + $config->setVars($configValue); |
|
483 | + $configHandler->insertConfig($config); |
|
484 | + } |
|
485 | + } |
|
486 | + |
|
487 | + if (isset($_POST['galleria_bgimg'])) { |
|
488 | + if ($helper->getConfig('galleria_bgimg') != $_POST['galleria_bgimg']) { |
|
489 | + $criteria = new \CriteriaCompo(); |
|
490 | + $criteria->add($moduleIdCriteria); |
|
491 | + $criteria->add(new \Criteria('conf_name', 'galleria_bgimg')); |
|
492 | + $config = $configHandler->getConfigs($criteria); |
|
493 | + $config = $config[0]; |
|
494 | + $configValue = [ |
|
495 | + 'conf_modid' => $xoopsModule->getVar('mid'), |
|
496 | + 'conf_catid' => 0, |
|
497 | + 'conf_name' => 'galleria_bgimg', |
|
498 | + 'conf_value' => $_POST['galleria_bgimg'], |
|
499 | + 'conf_formtype' => 'hidden', |
|
500 | + 'conf_valuetype' => 'text' |
|
501 | + ]; |
|
502 | + $config->setVars($configValue); |
|
503 | + $configHandler->insertConfig($config); |
|
504 | + } |
|
505 | + } |
|
506 | + |
|
507 | + if (isset($_POST['galleria_autoplay'])) { |
|
508 | + if ($helper->getConfig('galleria_autoplay') != $_POST['galleria_autoplay']) { |
|
509 | + $criteria = new \CriteriaCompo(); |
|
510 | + $criteria->add($moduleIdCriteria); |
|
511 | + $criteria->add(new \Criteria('conf_name', 'galleria_autoplay')); |
|
512 | + $config = $configHandler->getConfigs($criteria); |
|
513 | + $config = $config[0]; |
|
514 | + $configValue = [ |
|
515 | + 'conf_modid' => $xoopsModule->getVar('mid'), |
|
516 | + 'conf_catid' => 0, |
|
517 | + 'conf_name' => 'galleria_autoplay', |
|
518 | + 'conf_value' => $_POST['galleria_autoplay'], |
|
519 | + 'conf_formtype' => 'hidden', |
|
520 | + 'conf_valuetype' => 'text' |
|
521 | + ]; |
|
522 | + $config->setVars($configValue); |
|
523 | + $configHandler->insertConfig($config); |
|
524 | + } |
|
525 | + } |
|
526 | + |
|
527 | + if (isset($_POST['galleria_transition'])) { |
|
528 | + if ($helper->getConfig('galleria_transition') != $_POST['galleria_transition']) { |
|
529 | + $criteria = new \CriteriaCompo(); |
|
530 | + $criteria->add($moduleIdCriteria); |
|
531 | + $criteria->add(new \Criteria('conf_name', 'galleria_transition')); |
|
532 | + $config = $configHandler->getConfigs($criteria); |
|
533 | + $config = $config[0]; |
|
534 | + $configValue = [ |
|
535 | + 'conf_modid' => $xoopsModule->getVar('mid'), |
|
536 | + 'conf_catid' => 0, |
|
537 | + 'conf_name' => 'galleria_transition', |
|
538 | + 'conf_value' => $_POST['galleria_transition'], |
|
539 | + 'conf_formtype' => 'hidden', |
|
540 | + 'conf_valuetype' => 'text' |
|
541 | + ]; |
|
542 | + $config->setVars($configValue); |
|
543 | + $configHandler->insertConfig($config); |
|
544 | + } |
|
545 | + } |
|
546 | + |
|
547 | + if (isset($_POST['galleria_tspeed'])) { |
|
548 | + if ($helper->getConfig('galleria_tspeed') != $_POST['galleria_tspeed']) { |
|
549 | + $criteria = new \CriteriaCompo(); |
|
550 | + $criteria->add($moduleIdCriteria); |
|
551 | + $criteria->add(new \Criteria('conf_name', 'galleria_tspeed')); |
|
552 | + $config = $configHandler->getConfigs($criteria); |
|
553 | + $config = $config[0]; |
|
554 | + $configValue = [ |
|
555 | + 'conf_modid' => $xoopsModule->getVar('mid'), |
|
556 | + 'conf_catid' => 0, |
|
557 | + 'conf_name' => 'galleria_tspeed', |
|
558 | + 'conf_value' => $_POST['galleria_tspeed'], |
|
559 | + 'conf_formtype' => 'hidden', |
|
560 | + 'conf_valuetype' => 'text' |
|
561 | + ]; |
|
562 | + $config->setVars($configValue); |
|
563 | + $configHandler->insertConfig($config); |
|
564 | + } |
|
565 | + } |
|
566 | + redirect_header('slideshow.php', 3, _AM_EXTGALLERY_CONFIGURATION_SAVED); |
|
567 | + break; |
|
568 | + |
|
569 | + case 'galleriffic': |
|
570 | + /** @var XoopsModuleHandler $moduleHandler */ |
|
571 | + $configHandler = xoops_getHandler('config'); |
|
572 | + $moduleIdCriteria = new \Criteria('conf_modid', $xoopsModule->getVar('mid')); |
|
573 | + |
|
574 | + if (isset($_POST['galleriffic_height'])) { |
|
575 | + if ($helper->getConfig('galleriffic_height') != $_POST['galleriffic_height']) { |
|
576 | + $criteria = new \CriteriaCompo(); |
|
577 | + $criteria->add($moduleIdCriteria); |
|
578 | + $criteria->add(new \Criteria('conf_name', 'galleriffic_height')); |
|
579 | + $config = $configHandler->getConfigs($criteria); |
|
580 | + $config = $config[0]; |
|
581 | + $configValue = [ |
|
582 | + 'conf_modid' => $xoopsModule->getVar('mid'), |
|
583 | + 'conf_catid' => 0, |
|
584 | + 'conf_name' => 'galleriffic_height', |
|
585 | + 'conf_value' => $_POST['galleriffic_height'], |
|
586 | + 'conf_formtype' => 'hidden', |
|
587 | + 'conf_valuetype' => 'text' |
|
588 | + ]; |
|
589 | + $config->setVars($configValue); |
|
590 | + $configHandler->insertConfig($config); |
|
591 | + } |
|
592 | + } |
|
593 | + |
|
594 | + if (isset($_POST['galleriffic_width'])) { |
|
595 | + if ($helper->getConfig('galleriffic_width') != $_POST['galleriffic_width']) { |
|
596 | + $criteria = new \CriteriaCompo(); |
|
597 | + $criteria->add($moduleIdCriteria); |
|
598 | + $criteria->add(new \Criteria('conf_name', 'galleriffic_width')); |
|
599 | + $config = $configHandler->getConfigs($criteria); |
|
600 | + $config = $config[0]; |
|
601 | + $configValue = [ |
|
602 | + 'conf_modid' => $xoopsModule->getVar('mid'), |
|
603 | + 'conf_catid' => 0, |
|
604 | + 'conf_name' => 'galleriffic_width', |
|
605 | + 'conf_value' => $_POST['galleriffic_width'], |
|
606 | + 'conf_formtype' => 'hidden', |
|
607 | + 'conf_valuetype' => 'text' |
|
608 | + ]; |
|
609 | + $config->setVars($configValue); |
|
610 | + $configHandler->insertConfig($config); |
|
611 | + } |
|
612 | + } |
|
613 | + |
|
614 | + if (isset($_POST['galleriffic_bgcolor'])) { |
|
615 | + if ($helper->getConfig('galleriffic_bgcolor') != $_POST['galleriffic_bgcolor']) { |
|
616 | + $criteria = new \CriteriaCompo(); |
|
617 | + $criteria->add($moduleIdCriteria); |
|
618 | + $criteria->add(new \Criteria('conf_name', 'galleriffic_bgcolor')); |
|
619 | + $config = $configHandler->getConfigs($criteria); |
|
620 | + $config = $config[0]; |
|
621 | + $configValue = [ |
|
622 | + 'conf_modid' => $xoopsModule->getVar('mid'), |
|
623 | + 'conf_catid' => 0, |
|
624 | + 'conf_name' => 'galleriffic_bgcolor', |
|
625 | + 'conf_value' => $_POST['galleriffic_bgcolor'], |
|
626 | + 'conf_formtype' => 'hidden', |
|
627 | + 'conf_valuetype' => 'text' |
|
628 | + ]; |
|
629 | + $config->setVars($configValue); |
|
630 | + $configHandler->insertConfig($config); |
|
631 | + } |
|
632 | + } |
|
633 | + |
|
634 | + if (isset($_POST['galleriffic_bordercolor'])) { |
|
635 | + if ($helper->getConfig('galleriffic_bordercolor') != $_POST['galleriffic_bordercolor']) { |
|
636 | + $criteria = new \CriteriaCompo(); |
|
637 | + $criteria->add($moduleIdCriteria); |
|
638 | + $criteria->add(new \Criteria('conf_name', 'galleriffic_bordercolor')); |
|
639 | + $config = $configHandler->getConfigs($criteria); |
|
640 | + $config = $config[0]; |
|
641 | + $configValue = [ |
|
642 | + 'conf_modid' => $xoopsModule->getVar('mid'), |
|
643 | + 'conf_catid' => 0, |
|
644 | + 'conf_name' => 'galleriffic_bordercolor', |
|
645 | + 'conf_value' => $_POST['galleriffic_bordercolor'], |
|
646 | + 'conf_formtype' => 'hidden', |
|
647 | + 'conf_valuetype' => 'text' |
|
648 | + ]; |
|
649 | + $config->setVars($configValue); |
|
650 | + $configHandler->insertConfig($config); |
|
651 | + } |
|
652 | + } |
|
653 | + |
|
654 | + if (isset($_POST['galleriffic_fontcolor'])) { |
|
655 | + if ($helper->getConfig('galleriffic_fontcolor') != $_POST['galleriffic_fontcolor']) { |
|
656 | + $criteria = new \CriteriaCompo(); |
|
657 | + $criteria->add($moduleIdCriteria); |
|
658 | + $criteria->add(new \Criteria('conf_name', 'galleriffic_fontcolor')); |
|
659 | + $config = $configHandler->getConfigs($criteria); |
|
660 | + $config = $config[0]; |
|
661 | + $configValue = [ |
|
662 | + 'conf_modid' => $xoopsModule->getVar('mid'), |
|
663 | + 'conf_catid' => 0, |
|
664 | + 'conf_name' => 'galleriffic_fontcolor', |
|
665 | + 'conf_value' => $_POST['galleriffic_fontcolor'], |
|
666 | + 'conf_formtype' => 'hidden', |
|
667 | + 'conf_valuetype' => 'text' |
|
668 | + ]; |
|
669 | + $config->setVars($configValue); |
|
670 | + $configHandler->insertConfig($config); |
|
671 | + } |
|
672 | + } |
|
673 | + |
|
674 | + if (isset($_POST['galleriffic_autoplay'])) { |
|
675 | + if ($helper->getConfig('galleriffic_autoplay') != $_POST['galleriffic_autoplay']) { |
|
676 | + $criteria = new \CriteriaCompo(); |
|
677 | + $criteria->add($moduleIdCriteria); |
|
678 | + $criteria->add(new \Criteria('conf_name', 'galleriffic_autoplay')); |
|
679 | + $config = $configHandler->getConfigs($criteria); |
|
680 | + $config = $config[0]; |
|
681 | + $configValue = [ |
|
682 | + 'conf_modid' => $xoopsModule->getVar('mid'), |
|
683 | + 'conf_catid' => 0, |
|
684 | + 'conf_name' => 'galleriffic_autoplay', |
|
685 | + 'conf_value' => $_POST['galleriffic_autoplay'], |
|
686 | + 'conf_formtype' => 'hidden', |
|
687 | + 'conf_valuetype' => 'text' |
|
688 | + ]; |
|
689 | + $config->setVars($configValue); |
|
690 | + $configHandler->insertConfig($config); |
|
691 | + } |
|
692 | + } |
|
693 | + |
|
694 | + if (isset($_POST['galleriffic_nb_thumbs'])) { |
|
695 | + if ($helper->getConfig('galleriffic_nb_thumbs') != $_POST['galleriffic_nb_thumbs']) { |
|
696 | + $criteria = new \CriteriaCompo(); |
|
697 | + $criteria->add($moduleIdCriteria); |
|
698 | + $criteria->add(new \Criteria('conf_name', 'galleriffic_nb_thumbs')); |
|
699 | + $config = $configHandler->getConfigs($criteria); |
|
700 | + $config = $config[0]; |
|
701 | + $configValue = [ |
|
702 | + 'conf_modid' => $xoopsModule->getVar('mid'), |
|
703 | + 'conf_catid' => 0, |
|
704 | + 'conf_name' => 'galleriffic_nb_thumbs', |
|
705 | + 'conf_value' => $_POST['galleriffic_nb_thumbs'], |
|
706 | + 'conf_formtype' => 'hidden', |
|
707 | + 'conf_valuetype' => 'text' |
|
708 | + ]; |
|
709 | + $config->setVars($configValue); |
|
710 | + $configHandler->insertConfig($config); |
|
711 | + } |
|
712 | + } |
|
713 | + |
|
714 | + if (isset($_POST['galleriffic_nb_colthumbs'])) { |
|
715 | + if ($helper->getConfig('galleriffic_nb_colthumbs') != $_POST['galleriffic_nb_colthumbs']) { |
|
716 | + $criteria = new \CriteriaCompo(); |
|
717 | + $criteria->add($moduleIdCriteria); |
|
718 | + $criteria->add(new \Criteria('conf_name', 'galleriffic_nb_colthumbs')); |
|
719 | + $config = $configHandler->getConfigs($criteria); |
|
720 | + $config = $config[0]; |
|
721 | + $configValue = [ |
|
722 | + 'conf_modid' => $xoopsModule->getVar('mid'), |
|
723 | + 'conf_catid' => 0, |
|
724 | + 'conf_name' => 'galleriffic_nb_colthumbs', |
|
725 | + 'conf_value' => $_POST['galleriffic_nb_colthumbs'], |
|
726 | + 'conf_formtype' => 'hidden', |
|
727 | + 'conf_valuetype' => 'text' |
|
728 | + ]; |
|
729 | + $config->setVars($configValue); |
|
730 | + $configHandler->insertConfig($config); |
|
731 | + } |
|
732 | + } |
|
733 | + |
|
734 | + if (isset($_POST['galleriffic_nb_preload'])) { |
|
735 | + if ($helper->getConfig('galleriffic_nb_preload') != $_POST['galleriffic_nb_preload']) { |
|
736 | + $criteria = new \CriteriaCompo(); |
|
737 | + $criteria->add($moduleIdCriteria); |
|
738 | + $criteria->add(new \Criteria('conf_name', 'galleriffic_nb_preload')); |
|
739 | + $config = $configHandler->getConfigs($criteria); |
|
740 | + $config = $config[0]; |
|
741 | + $configValue = [ |
|
742 | + 'conf_modid' => $xoopsModule->getVar('mid'), |
|
743 | + 'conf_catid' => 0, |
|
744 | + 'conf_name' => 'galleriffic_nb_preload', |
|
745 | + 'conf_value' => $_POST['galleriffic_nb_preload'], |
|
746 | + 'conf_formtype' => 'hidden', |
|
747 | + 'conf_valuetype' => 'text' |
|
748 | + ]; |
|
749 | + $config->setVars($configValue); |
|
750 | + $configHandler->insertConfig($config); |
|
751 | + } |
|
752 | + } |
|
753 | + |
|
754 | + if (isset($_POST['galleriffic_tdelay'])) { |
|
755 | + if ($helper->getConfig('galleriffic_tdelay') != $_POST['galleriffic_tdelay']) { |
|
756 | + $criteria = new \CriteriaCompo(); |
|
757 | + $criteria->add($moduleIdCriteria); |
|
758 | + $criteria->add(new \Criteria('conf_name', 'galleriffic_tdelay')); |
|
759 | + $config = $configHandler->getConfigs($criteria); |
|
760 | + $config = $config[0]; |
|
761 | + $configValue = [ |
|
762 | + 'conf_modid' => $xoopsModule->getVar('mid'), |
|
763 | + 'conf_catid' => 0, |
|
764 | + 'conf_name' => 'galleriffic_tdelay', |
|
765 | + 'conf_value' => $_POST['galleriffic_tdelay'], |
|
766 | + 'conf_formtype' => 'hidden', |
|
767 | + 'conf_valuetype' => 'text' |
|
768 | + ]; |
|
769 | + $config->setVars($configValue); |
|
770 | + $configHandler->insertConfig($config); |
|
771 | + } |
|
772 | + } |
|
773 | + |
|
774 | + if (isset($_POST['galleriffic_tspeed'])) { |
|
775 | + if ($helper->getConfig('galleriffic_tspeed') != $_POST['galleriffic_tspeed']) { |
|
776 | + $criteria = new \CriteriaCompo(); |
|
777 | + $criteria->add($moduleIdCriteria); |
|
778 | + $criteria->add(new \Criteria('conf_name', 'galleriffic_tspeed')); |
|
779 | + $config = $configHandler->getConfigs($criteria); |
|
780 | + $config = $config[0]; |
|
781 | + $configValue = [ |
|
782 | + 'conf_modid' => $xoopsModule->getVar('mid'), |
|
783 | + 'conf_catid' => 0, |
|
784 | + 'conf_name' => 'galleriffic_tspeed', |
|
785 | + 'conf_value' => $_POST['galleriffic_tspeed'], |
|
786 | + 'conf_formtype' => 'hidden', |
|
787 | + 'conf_valuetype' => 'text' |
|
788 | + ]; |
|
789 | + $config->setVars($configValue); |
|
790 | + $configHandler->insertConfig($config); |
|
791 | + } |
|
792 | + } |
|
793 | + |
|
794 | + if (isset($_POST['galleriffic_show_descr'])) { |
|
795 | + if ($helper->getConfig('galleriffic_show_descr') != $_POST['galleriffic_show_descr']) { |
|
796 | + $criteria = new \CriteriaCompo(); |
|
797 | + $criteria->add($moduleIdCriteria); |
|
798 | + $criteria->add(new \Criteria('conf_name', 'galleriffic_show_descr')); |
|
799 | + $config = $configHandler->getConfigs($criteria); |
|
800 | + $config = $config[0]; |
|
801 | + $configValue = [ |
|
802 | + 'conf_modid' => $xoopsModule->getVar('mid'), |
|
803 | + 'conf_catid' => 0, |
|
804 | + 'conf_name' => 'galleriffic_show_descr', |
|
805 | + 'conf_value' => $_POST['galleriffic_show_descr'], |
|
806 | + 'conf_formtype' => 'hidden', |
|
807 | + 'conf_valuetype' => 'text' |
|
808 | + ]; |
|
809 | + $config->setVars($configValue); |
|
810 | + $configHandler->insertConfig($config); |
|
811 | + } |
|
812 | + } |
|
813 | + |
|
814 | + if (isset($_POST['galleriffic_download'])) { |
|
815 | + if ($helper->getConfig('galleriffic_download') != $_POST['galleriffic_download']) { |
|
816 | + $criteria = new \CriteriaCompo(); |
|
817 | + $criteria->add($moduleIdCriteria); |
|
818 | + $criteria->add(new \Criteria('conf_name', 'galleriffic_download')); |
|
819 | + $config = $configHandler->getConfigs($criteria); |
|
820 | + $config = $config[0]; |
|
821 | + $configValue = [ |
|
822 | + 'conf_modid' => $xoopsModule->getVar('mid'), |
|
823 | + 'conf_catid' => 0, |
|
824 | + 'conf_name' => 'galleriffic_download', |
|
825 | + 'conf_value' => $_POST['galleriffic_download'], |
|
826 | + 'conf_formtype' => 'hidden', |
|
827 | + 'conf_valuetype' => 'text' |
|
828 | + ]; |
|
829 | + $config->setVars($configValue); |
|
830 | + $configHandler->insertConfig($config); |
|
831 | + } |
|
832 | + } |
|
833 | + redirect_header('slideshow.php', 3, _AM_EXTGALLERY_CONFIGURATION_SAVED); |
|
834 | + break; |
|
835 | + |
|
836 | + case 'default': |
|
837 | + default: |
|
838 | + |
|
839 | + xoops_cp_header(); |
|
840 | + |
|
841 | + //echo "<pre>";print_r($xoopsModuleConfig);echo "</pre>"; |
|
842 | + $xoopsTpl->assign('displayslideshow', 'slideshow' === $helper->getConfig('display_type')); |
|
843 | + |
|
844 | + $form = new \XoopsThemeForm(_AM_EXTGALLERY_GVIEW_CONF, 'galleryview_conf', 'slideshow.php', 'post', true); |
|
845 | + $form->addElement(new \XoopsFormText(_AM_EXTGALLERY_GVIEW_PANELWIDE, 'galleryview_panelwidth', '5', '5', $helper->getConfig('galleryview_panelwidth')), false); |
|
846 | + $form->addElement(new \XoopsFormText(_AM_EXTGALLERY_GVIEW_PANELHEIGHT, 'galleryview_panelheight', '5', '5', $helper->getConfig('galleryview_panelheight')), false); |
|
847 | + $form->addElement(new \XoopsFormText(_AM_EXTGALLERY_GVIEW_FRAMEWIDTH, 'galleryview_framewidth', '5', '5', $helper->getConfig('galleryview_framewidth')), false); |
|
848 | + $form->addElement(new \XoopsFormText(_AM_EXTGALLERY_GVIEW_FRAMEHEIGHT, 'galleryview_frameheight', '5', '5', $helper->getConfig('galleryview_frameheight')), false); |
|
849 | + $form->addElement(new \XoopsFormText(_AM_EXTGALLERY_GVIEW_TSPEED, 'galleryview_tspeed', '5', '5', $helper->getConfig('galleryview_tspeed')), false); |
|
850 | + $form->addElement(new \XoopsFormText(_AM_EXTGALLERY_GVIEW_TTERVAL, 'galleryview_tterval', '5', '5', $helper->getConfig('galleryview_tterval')), false); |
|
851 | + $form->addElement(new \XoopsFormText(_AM_EXTGALLERY_GVIEW_OPACITY, 'galleryview_opacity', '5', '5', $helper->getConfig('galleryview_opacity')), false); |
|
852 | + $form->addElement(new \XoopsFormText(_AM_EXTGALLERY_GVIEW_OVERLYAHEIGHT, 'galleryview_overlayheight', '5', '5', $helper->getConfig('galleryview_overlayheight')), false); |
|
853 | + $form->addElement(new \XoopsFormText(_AM_EXTGALLERY_GVIEW_OVERLAYFS, 'galleryview_overlayfs', '5', '5', $helper->getConfig('galleryview_overlayfs')), false); |
|
854 | + $form->addElement(new \XoopsFormText(_AM_EXTGALLERY_GVIEW_BORDERWIDTH, 'galleryview_borderwidth', '5', '5', $helper->getConfig('galleryview_borderwidth')), false); |
|
855 | + $form->addElement(new \XoopsFormColorPicker(_AM_EXTGALLERY_GVIEW_BORDERCOLOR, 'galleryview_bordercolor', $helper->getConfig('galleryview_bordercolor')), false); |
|
856 | + $form->addElement(new \XoopsFormColorPicker(_AM_EXTGALLERY_GVIEW_BGCOLOR, 'galleryview_bgcolor', $helper->getConfig('galleryview_bgcolor')), false); |
|
857 | + $form->addElement(new \XoopsFormColorPicker(_AM_EXTGALLERY_GVIEW_OVERLAYCOLOR, 'galleryview_overlaycolor', $helper->getConfig('galleryview_overlaycolor')), false); |
|
858 | + $form->addElement(new \XoopsFormColorPicker(_AM_EXTGALLERY_GVIEW_OVERLAYTC, 'galleryview_overlaytc', $helper->getConfig('galleryview_overlaytc')), false); |
|
859 | + $form->addElement(new \XoopsFormColorPicker(_AM_EXTGALLERY_GVIEW_CAPTIONTC, 'galleryview_captiontc', $helper->getConfig('galleryview_captiontc')), false); |
|
860 | + $navthemeSelect = new \XoopsFormSelect(_AM_EXTGALLERY_GVIEW_NAVTHEME, 'galleryview_navtheme', $helper->getConfig('galleryview_navtheme')); |
|
861 | + $navthemeSelect->addOption('light', _AM_EXTGALLERY_GVIEW_LIGHT); |
|
862 | + $navthemeSelect->addOption('dark', _AM_EXTGALLERY_GVIEW_DARK); |
|
863 | + $navthemeSelect->addOption('custom', _AM_EXTGALLERY_GVIEW_CUSTOM); |
|
864 | + $form->addElement($navthemeSelect); |
|
865 | + $positionSelect = new \XoopsFormSelect(_AM_EXTGALLERY_GVIEW_POSITION, 'galleryview_position', $helper->getConfig('galleryview_position')); |
|
866 | + $positionSelect->addOption('bottom', _AM_EXTGALLERY_GVIEW_BOTTOM); |
|
867 | + $positionSelect->addOption('top', _AM_EXTGALLERY_GVIEW_TOP); |
|
868 | + $form->addElement($positionSelect); |
|
869 | + $easingSelect = new \XoopsFormSelect(_AM_EXTGALLERY_GVIEW_EASING, 'galleryview_easing', $helper->getConfig('galleryview_easing')); |
|
870 | + $easingSelect->addOption('swing', _AM_EXTGALLERY_GVIEW_EASING_OP1); |
|
871 | + $easingSelect->addOption('linear', _AM_EXTGALLERY_GVIEW_EASING_OP2); |
|
872 | + $easingSelect->addOption('easeInOutBack', _AM_EXTGALLERY_GVIEW_EASING_OP3); |
|
873 | + $easingSelect->addOption('easeInOutQuad', _AM_EXTGALLERY_GVIEW_EASING_OP4); |
|
874 | + $easingSelect->addOption('easeOutBounce', _AM_EXTGALLERY_GVIEW_EASING_OP5); |
|
875 | + $form->addElement($easingSelect); |
|
876 | + $form->addElement(new \XoopsFormHidden('op', 'galleryview')); |
|
877 | + $form->addElement(new \XoopsFormButton('', 'submit', _SUBMIT, 'submit')); |
|
878 | + $xoopsTpl->assign('galleryviewform', $form->render()); |
|
879 | + |
|
880 | + $form = new \XoopsThemeForm(_AM_EXTGALLERY_GRIA_CONF, 'galleria_conf', 'slideshow.php', 'post', true); |
|
881 | + $form->addElement(new \XoopsFormText(_AM_EXTGALLERY_GRIA_HEIGHT, 'galleria_height', '5', '5', $helper->getConfig('galleria_height')), false); |
|
882 | + $form->addElement(new \XoopsFormText(_AM_EXTGALLERY_GRIA_PANELWIDTH, 'galleria_panelwidth', '5', '5', $helper->getConfig('galleria_panelwidth')), false); |
|
883 | + $form->addElement(new \XoopsFormColorPicker(_AM_EXTGALLERY_GRIA_BGCOLOR, 'galleria_bgcolor', $helper->getConfig('galleria_bgcolor')), false); |
|
884 | + $form->addElement(new \XoopsFormColorPicker(_AM_EXTGALLERY_GRIA_BCOLOR, 'galleria_bcolor', $helper->getConfig('galleria_bcolor')), false); |
|
885 | + $bgimgSelect = new \XoopsFormSelect(_AM_EXTGALLERY_GRIA_BGIMG, 'galleria_bgimg', $helper->getConfig('galleria_bgimg')); |
|
886 | + $bgimgSelect->addOption('classic-map', _AM_EXTGALLERY_GRIA_BGIMG_OP1); |
|
887 | + $bgimgSelect->addOption('classic-map-b', _AM_EXTGALLERY_GRIA_BGIMG_OP2); |
|
888 | + $form->addElement($bgimgSelect); |
|
889 | + $form->addElement(new \XoopsFormRadioYN(_AM_EXTGALLERY_GRIA_AUTOPLAY, 'galleria_autoplay', $helper->getConfig('galleria_autoplay'))); |
|
890 | + $select_trans = new \XoopsFormSelect(_AM_EXTGALLERY_GRIA_TRANS, 'galleria_transition', $helper->getConfig('galleria_transition')); |
|
891 | + $select_trans->addOption('fade', _AM_EXTGALLERY_GRIA_TRANS_TYP1); |
|
892 | + $select_trans->addOption('flash', _AM_EXTGALLERY_GRIA_TRANS_TYP2); |
|
893 | + $select_trans->addOption('pulse', _AM_EXTGALLERY_GRIA_TRANS_TYP3); |
|
894 | + $select_trans->addOption('slide', _AM_EXTGALLERY_GRIA_TRANS_TYP4); |
|
895 | + $select_trans->addOption('fadeslide', _AM_EXTGALLERY_GRIA_TRANS_TYP5); |
|
896 | + $form->addElement($select_trans); |
|
897 | + $form->addElement(new \XoopsFormText(_AM_EXTGALLERY_GRIA_TSPEED, 'galleria_tspeed', '5', '5', $helper->getConfig('galleria_tspeed')), false); |
|
898 | + $form->addElement(new \XoopsFormHidden('op', 'galleria')); |
|
899 | + $form->addElement(new \XoopsFormButton('', 'submit', _SUBMIT, 'submit')); |
|
900 | + $xoopsTpl->assign('galleriaform', $form->render()); |
|
901 | + |
|
902 | + $form = new \XoopsThemeForm(_AM_EXTGALLERY_GFIC_CONF, 'galleriffic_conf', 'slideshow.php', 'post', true); |
|
903 | + $form->addElement(new \XoopsFormText(_AM_EXTGALLERY_GFIC_HEIGHT, 'galleriffic_height', '5', '5', $helper->getConfig('galleriffic_height')), false); |
|
904 | + $form->addElement(new \XoopsFormText(_AM_EXTGALLERY_GFIC_WIDTH, 'galleriffic_width', '5', '5', $helper->getConfig('galleriffic_width')), false); |
|
905 | + $form->addElement(new \XoopsFormColorPicker(_AM_EXTGALLERY_GFIC_BGCOLOR, 'galleriffic_bgcolor', $helper->getConfig('galleriffic_bgcolor')), false); |
|
906 | + $form->addElement(new \XoopsFormColorPicker(_AM_EXTGALLERY_GFIC_BCOLOR, 'galleriffic_bordercolor', $helper->getConfig('galleriffic_bordercolor')), false); |
|
907 | + $form->addElement(new \XoopsFormColorPicker(_AM_EXTGALLERY_GFIC_FONTCOLOR, 'galleriffic_fontcolor', $helper->getConfig('galleriffic_fontcolor')), false); |
|
908 | + $form->addElement(new \XoopsFormRadioYN(_AM_EXTGALLERY_GFIC_AUTOPLAY, 'galleriffic_autoplay', $helper->getConfig('galleriffic_autoplay'))); |
|
909 | + $form->addElement(new \XoopsFormText(_AM_EXTGALLERY_GFIC_NB_THUMBS, 'galleriffic_nb_thumbs', '5', '5', $helper->getConfig('galleriffic_nb_thumbs')), false); |
|
910 | + $select_nbcol = new \XoopsFormSelect(_AM_EXTGALLERY_GFIC_NB_COLTHUMBS, 'galleriffic_nb_colthumbs', $helper->getConfig('galleriffic_nb_colthumbs')); |
|
911 | + $select_nbcol->addOption('0', '0 - hidden'); |
|
912 | + $select_nbcol->addOption('1', '1'); |
|
913 | + $select_nbcol->addOption('2', '2'); |
|
914 | + $select_nbcol->addOption('3', '3'); |
|
915 | + $form->addElement($select_nbcol); |
|
916 | + $form->addElement(new \XoopsFormText(_AM_EXTGALLERY_GFIC_NB_PRELOAD, 'galleriffic_nb_preload', '5', '5', $helper->getConfig('galleriffic_nb_preload')), false); |
|
917 | + $form->addElement(new \XoopsFormText(_AM_EXTGALLERY_GFIC_TDELAY, 'galleriffic_tdelay', '5', '5', $helper->getConfig('galleriffic_tdelay')), false); |
|
918 | + $form->addElement(new \XoopsFormText(_AM_EXTGALLERY_GFIC_TSPEED, 'galleriffic_tspeed', '5', '5', $helper->getConfig('galleriffic_tspeed')), false); |
|
919 | + $form->addElement(new \XoopsFormRadioYN(_AM_EXTGALLERY_GFIC_SHOW_DESCR, 'galleriffic_show_descr', $helper->getConfig('galleriffic_show_descr'))); |
|
920 | + $form->addElement(new \XoopsFormRadioYN(_AM_EXTGALLERY_GFIC_DOWNLOAD, 'galleriffic_download', $helper->getConfig('galleriffic_download'))); |
|
921 | + $form->addElement(new \XoopsFormHidden('op', 'galleriffic')); |
|
922 | + $form->addElement(new \XoopsFormButton('', 'submit', _SUBMIT, 'submit')); |
|
923 | + $xoopsTpl->assign('gallerifficform', $form->render()); |
|
924 | + |
|
925 | + // Call template file |
|
926 | + $xoopsTpl->display(XOOPS_ROOT_PATH . '/modules/extgallery/templates/admin/extgallery_admin_slideshow.tpl'); |
|
927 | + xoops_cp_footer(); |
|
928 | + |
|
929 | + break; |
|
930 | 930 | |
931 | 931 | } |
@@ -34,9 +34,9 @@ discard block |
||
34 | 34 | |
35 | 35 | switch ($op) { |
36 | 36 | |
37 | - case 'create': |
|
37 | + case 'create': |
|
38 | 38 | |
39 | - switch ($step) { |
|
39 | + switch ($step) { |
|
40 | 40 | |
41 | 41 | case 'enreg': |
42 | 42 | |
@@ -56,13 +56,13 @@ discard block |
||
56 | 56 | |
57 | 57 | break; |
58 | 58 | |
59 | - } |
|
59 | + } |
|
60 | 60 | |
61 | 61 | break; |
62 | 62 | |
63 | - case 'modify': |
|
63 | + case 'modify': |
|
64 | 64 | |
65 | - switch ($step) { |
|
65 | + switch ($step) { |
|
66 | 66 | |
67 | 67 | case 'enreg': |
68 | 68 | |
@@ -164,13 +164,13 @@ discard block |
||
164 | 164 | |
165 | 165 | break; |
166 | 166 | |
167 | - } |
|
167 | + } |
|
168 | 168 | |
169 | 169 | break; |
170 | 170 | |
171 | - case 'delete': |
|
171 | + case 'delete': |
|
172 | 172 | |
173 | - switch ($step) { |
|
173 | + switch ($step) { |
|
174 | 174 | |
175 | 175 | case 'enreg': |
176 | 176 | |
@@ -182,36 +182,36 @@ discard block |
||
182 | 182 | |
183 | 183 | break; |
184 | 184 | |
185 | - } |
|
185 | + } |
|
186 | 186 | |
187 | 187 | break; |
188 | 188 | |
189 | - case 'default': |
|
190 | - default: |
|
191 | - |
|
192 | - $catHandler = Extgallery\Helper::getInstance()->getHandler('PublicCategory'); |
|
193 | - |
|
194 | - xoops_cp_header(); |
|
195 | - |
|
196 | - $form = new \XoopsThemeForm(_AM_EXTGALLERY_MODDELETE_PUBLICCAT, 'modify_cat', 'public-category.php?op=modify', 'post', true); |
|
197 | - $form->addElement(new \XoopsFormLabel(_AM_EXTGALLERY_CATEGORY, $catHandler->getSelect('cat_id', false, false, 0, '', true))); |
|
198 | - $form->addElement(new \XoopsFormButton('', 'submit', _SUBMIT, 'submit')); |
|
199 | - $xoopsTpl->assign('formselectcat', $form->render()); |
|
200 | - |
|
201 | - $form = new \XoopsThemeForm(_AM_EXTGALLERY_ADD_PUBLIC_CAT, 'create_cat', 'public-category.php?op=create', 'post', true); |
|
202 | - $form->addElement(new \XoopsFormLabel(_AM_EXTGALLERY_PARENT_CAT, $catHandler->getSelect('cat_pid', 'leaf', true))); |
|
203 | - $form->addElement(new \XoopsFormText(_AM_EXTGALLERY_NAME, 'cat_name', '70', '255'), true); |
|
204 | - $form->addElement(new \XoopsFormText(_AM_EXTGALLERY_WEIGHT, 'cat_weight', '4', '4'), false); |
|
205 | - $form->addElement(new \XoopsFormDhtmlTextArea(_AM_EXTGALLERY_DESC, 'cat_desc', ''), false); |
|
206 | - $form->addElement(new \XoopsFormText(_AM_EXTGALLERY_CAT_IMG, 'cat_imgurl', '70', '150'), false); |
|
207 | - $form->addElement(new \XoopsFormHidden('step', 'enreg')); |
|
208 | - $form->addElement(new \XoopsFormButton('', 'submit', _SUBMIT, 'submit')); |
|
209 | - $xoopsTpl->assign('formcreatecat', $form->render()); |
|
210 | - |
|
211 | - // Call template file |
|
212 | - $xoopsTpl->display(XOOPS_ROOT_PATH . '/modules/extgallery/templates/admin/extgallery_admin_public_category.tpl'); |
|
213 | - // xoops_cp_footer(); |
|
214 | - require_once __DIR__ . '/admin_footer.php'; |
|
215 | - break; |
|
189 | + case 'default': |
|
190 | + default: |
|
191 | + |
|
192 | + $catHandler = Extgallery\Helper::getInstance()->getHandler('PublicCategory'); |
|
193 | + |
|
194 | + xoops_cp_header(); |
|
195 | + |
|
196 | + $form = new \XoopsThemeForm(_AM_EXTGALLERY_MODDELETE_PUBLICCAT, 'modify_cat', 'public-category.php?op=modify', 'post', true); |
|
197 | + $form->addElement(new \XoopsFormLabel(_AM_EXTGALLERY_CATEGORY, $catHandler->getSelect('cat_id', false, false, 0, '', true))); |
|
198 | + $form->addElement(new \XoopsFormButton('', 'submit', _SUBMIT, 'submit')); |
|
199 | + $xoopsTpl->assign('formselectcat', $form->render()); |
|
200 | + |
|
201 | + $form = new \XoopsThemeForm(_AM_EXTGALLERY_ADD_PUBLIC_CAT, 'create_cat', 'public-category.php?op=create', 'post', true); |
|
202 | + $form->addElement(new \XoopsFormLabel(_AM_EXTGALLERY_PARENT_CAT, $catHandler->getSelect('cat_pid', 'leaf', true))); |
|
203 | + $form->addElement(new \XoopsFormText(_AM_EXTGALLERY_NAME, 'cat_name', '70', '255'), true); |
|
204 | + $form->addElement(new \XoopsFormText(_AM_EXTGALLERY_WEIGHT, 'cat_weight', '4', '4'), false); |
|
205 | + $form->addElement(new \XoopsFormDhtmlTextArea(_AM_EXTGALLERY_DESC, 'cat_desc', ''), false); |
|
206 | + $form->addElement(new \XoopsFormText(_AM_EXTGALLERY_CAT_IMG, 'cat_imgurl', '70', '150'), false); |
|
207 | + $form->addElement(new \XoopsFormHidden('step', 'enreg')); |
|
208 | + $form->addElement(new \XoopsFormButton('', 'submit', _SUBMIT, 'submit')); |
|
209 | + $xoopsTpl->assign('formcreatecat', $form->render()); |
|
210 | + |
|
211 | + // Call template file |
|
212 | + $xoopsTpl->display(XOOPS_ROOT_PATH . '/modules/extgallery/templates/admin/extgallery_admin_public_category.tpl'); |
|
213 | + // xoops_cp_footer(); |
|
214 | + require_once __DIR__ . '/admin_footer.php'; |
|
215 | + break; |
|
216 | 216 | |
217 | 217 | } |