1: <?php
2: 3: 4: 5: 6: 7: 8: 9:
10:
11: if (!defined('XOOPS_ROOT_PATH')) exit();
12:
13: require_once XOOPS_ROOT_PATH . "/core/XCube_ActionForm.class.php";
14:
15: 16: 17: 18:
19: class Legacy_ThemeSelectForm extends XCube_ActionForm
20: {
21: function getTokenName()
22: {
23: return "module.legacy.ThemeSelectForm.TOKEN";
24: }
25:
26: function prepare()
27: {
28:
29:
30:
31: $this->mFormProperties['select'] =new XCube_BoolArrayProperty('select');
32: $this->mFormProperties['choose'] =new XCube_StringArrayProperty('choose');
33: }
34:
35: 36: 37:
38: function getChooseTheme()
39: {
40: foreach ($this->get('choose') as $dirname => $dmy) {
41: return $dirname;
42: }
43:
44: return null;
45: }
46:
47: function getSelectableTheme()
48: {
49: $ret = array();
50:
51: foreach ($this->get('select') as $themeName => $isSelect) {
52: if ($isSelect == 1) {
53: $ret[] = $themeName;
54: }
55: }
56:
57: return $ret;
58: }
59:
60: function load(&$themeArr)
61: {
62: foreach ($themeArr as $themeName) {
63: $this->set('select', $themeName, 1);
64: }
65: }
66: }
67:
68: ?>
69: