@@ -7,8 +7,8 @@ |
||
7 | 7 | * Licence: GNU |
8 | 8 | */ |
9 | 9 | // |
10 | -require_once __DIR__ . '/admin_header.php'; |
|
10 | +require_once __DIR__.'/admin_header.php'; |
|
11 | 11 | |
12 | -require_once SMARTOBJECT_ROOT_PATH . 'class/smartobjectabout.php'; |
|
12 | +require_once SMARTOBJECT_ROOT_PATH.'class/smartobjectabout.php'; |
|
13 | 13 | $aboutObj = new SmartobjectAbout(); |
14 | 14 | $aboutObj->render(); |
@@ -9,7 +9,7 @@ discard block |
||
9 | 9 | |
10 | 10 | if (false !== ($moduleHelper = Xmf\Module\Helper::getHelper($moduleDirName))) { |
11 | 11 | } else { |
12 | - $moduleHelper = Xmf\Module\Helper::getHelper('system'); |
|
12 | + $moduleHelper = Xmf\Module\Helper::getHelper('system'); |
|
13 | 13 | } |
14 | 14 | $adminObject = \Xmf\Module\Admin::getInstance(); |
15 | 15 | |
@@ -54,43 +54,43 @@ discard block |
||
54 | 54 | //--------------------------------- |
55 | 55 | |
56 | 56 | if (!defined('SMARTOBJECT_ROOT_PATH')) { |
57 | - require_once XOOPS_ROOT_PATH . '/modules/smartobject/include/functions.php'; |
|
57 | + require_once XOOPS_ROOT_PATH . '/modules/smartobject/include/functions.php'; |
|
58 | 58 | } |
59 | 59 | |
60 | 60 | $smartobjectConfig = smart_getModuleConfig('smartobject'); |
61 | 61 | |
62 | 62 | if (isset($smartobjectConfig['enable_currencyman']) && $smartobjectConfig['enable_currencyman'] === true) { |
63 | - ++$i; |
|
64 | - $adminmenu[$i]['title'] = _MI_SOBJECT_CURRENCIES; |
|
65 | - $adminmenu[$i]['link'] = 'admin/currency.php'; |
|
66 | - $adminmenu[$i]['icon'] = $pathIcon32 . '/cash_stack.png'; |
|
63 | + ++$i; |
|
64 | + $adminmenu[$i]['title'] = _MI_SOBJECT_CURRENCIES; |
|
65 | + $adminmenu[$i]['link'] = 'admin/currency.php'; |
|
66 | + $adminmenu[$i]['icon'] = $pathIcon32 . '/cash_stack.png'; |
|
67 | 67 | } |
68 | 68 | |
69 | 69 | global $xoopsModule; |
70 | 70 | if (isset($xoopsModule)) { |
71 | - // $i = -1; |
|
72 | - |
|
73 | - // --- for XCL --- |
|
74 | - // $headermenu[$i]['link'] = '../../system/admin.php?fct=preferences&op=showmod&mod=' . $xoopsModule->getVar('mid'); |
|
75 | - $mid = $xoopsModule->getVar('mid'); |
|
76 | - if (defined('XOOPS_CUBE_LEGACY')) { |
|
77 | - $link_pref = XOOPS_URL . '/modules/legacy/admin/index.php?action=PreferenceEdit&confmod_id=' . $mid; |
|
78 | - } else { |
|
79 | - $link_pref = XOOPS_URL . '/modules/system/admin.php?fct=preferences&op=showmod&mod=' . $mid; |
|
80 | - } |
|
81 | - $headermenu[$i]['link'] = $link_pref; |
|
82 | - // ----- |
|
83 | - |
|
84 | - // --- for XCL --- |
|
85 | - // $headermenu[$i]['link'] = XOOPS_URL . "/modules/system/admin.php?fct=modulesadmin&op=update&module=" . $xoopsModule->getVar('dirname'); |
|
86 | - $dirname = $xoopsModule->getVar('dirname'); |
|
87 | - if (defined('XOOPS_CUBE_LEGACY')) { |
|
88 | - $link_module = XOOPS_URL . '/modules/legacy/admin/index.php?action=ModuleUpdate&dirname=' . $dirname; |
|
89 | - } else { |
|
90 | - $link_module = XOOPS_URL . '/modules/system/admin.php?fct=modulesadmin&op=update&module=' . $dirname; |
|
91 | - } |
|
92 | - $headermenu[$i]['link'] = $link_module; |
|
93 | - // ----- |
|
94 | - |
|
95 | - ++$i; |
|
71 | + // $i = -1; |
|
72 | + |
|
73 | + // --- for XCL --- |
|
74 | + // $headermenu[$i]['link'] = '../../system/admin.php?fct=preferences&op=showmod&mod=' . $xoopsModule->getVar('mid'); |
|
75 | + $mid = $xoopsModule->getVar('mid'); |
|
76 | + if (defined('XOOPS_CUBE_LEGACY')) { |
|
77 | + $link_pref = XOOPS_URL . '/modules/legacy/admin/index.php?action=PreferenceEdit&confmod_id=' . $mid; |
|
78 | + } else { |
|
79 | + $link_pref = XOOPS_URL . '/modules/system/admin.php?fct=preferences&op=showmod&mod=' . $mid; |
|
80 | + } |
|
81 | + $headermenu[$i]['link'] = $link_pref; |
|
82 | + // ----- |
|
83 | + |
|
84 | + // --- for XCL --- |
|
85 | + // $headermenu[$i]['link'] = XOOPS_URL . "/modules/system/admin.php?fct=modulesadmin&op=update&module=" . $xoopsModule->getVar('dirname'); |
|
86 | + $dirname = $xoopsModule->getVar('dirname'); |
|
87 | + if (defined('XOOPS_CUBE_LEGACY')) { |
|
88 | + $link_module = XOOPS_URL . '/modules/legacy/admin/index.php?action=ModuleUpdate&dirname=' . $dirname; |
|
89 | + } else { |
|
90 | + $link_module = XOOPS_URL . '/modules/system/admin.php?fct=modulesadmin&op=update&module=' . $dirname; |
|
91 | + } |
|
92 | + $headermenu[$i]['link'] = $link_module; |
|
93 | + // ----- |
|
94 | + |
|
95 | + ++$i; |
|
96 | 96 | } |
@@ -22,7 +22,7 @@ discard block |
||
22 | 22 | $i = 0; |
23 | 23 | $adminmenu[$i]['title'] = _AM_MODULEADMIN_HOME; |
24 | 24 | $adminmenu[$i]['link'] = 'admin/index.php'; |
25 | -$adminmenu[$i]['icon'] = $pathIcon32 . '/home.png'; |
|
25 | +$adminmenu[$i]['icon'] = $pathIcon32.'/home.png'; |
|
26 | 26 | //++$i; |
27 | 27 | //$adminmenu[$i]['title'] = _MI_SOBJECT_INDEX; |
28 | 28 | //$adminmenu[$i]['link'] = "admin/main.php"; |
@@ -31,30 +31,30 @@ discard block |
||
31 | 31 | ++$i; |
32 | 32 | $adminmenu[$i]['title'] = _MI_SOBJECT_SENT_LINKS; |
33 | 33 | $adminmenu[$i]['link'] = 'admin/link.php'; |
34 | -$adminmenu[$i]['icon'] = $pathIcon32 . '/addlink.png'; |
|
34 | +$adminmenu[$i]['icon'] = $pathIcon32.'/addlink.png'; |
|
35 | 35 | |
36 | 36 | ++$i; |
37 | 37 | $adminmenu[$i]['title'] = _MI_SOBJECT_TAGS; |
38 | 38 | $adminmenu[$i]['link'] = 'admin/customtag.php'; |
39 | -$adminmenu[$i]['icon'] = $pathIcon32 . '/identity.png'; |
|
39 | +$adminmenu[$i]['icon'] = $pathIcon32.'/identity.png'; |
|
40 | 40 | |
41 | 41 | ++$i; |
42 | 42 | $adminmenu[$i]['title'] = _MI_SOBJECT_ADSENSES; |
43 | 43 | $adminmenu[$i]['link'] = 'admin/adsense.php'; |
44 | -$adminmenu[$i]['icon'] = $pathIcon32 . '/alert.png'; |
|
44 | +$adminmenu[$i]['icon'] = $pathIcon32.'/alert.png'; |
|
45 | 45 | ++$i; |
46 | 46 | $adminmenu[$i]['title'] = _MI_SOBJECT_RATINGS; |
47 | 47 | $adminmenu[$i]['link'] = 'admin/rating.php'; |
48 | -$adminmenu[$i]['icon'] = $pathIcon32 . '/stats.png'; |
|
48 | +$adminmenu[$i]['icon'] = $pathIcon32.'/stats.png'; |
|
49 | 49 | |
50 | 50 | ++$i; |
51 | 51 | $adminmenu[$i]['title'] = _AM_MODULEADMIN_ABOUT; |
52 | 52 | $adminmenu[$i]['link'] = 'admin/about.php'; |
53 | -$adminmenu[$i]['icon'] = $pathIcon32 . '/about.png'; |
|
53 | +$adminmenu[$i]['icon'] = $pathIcon32.'/about.png'; |
|
54 | 54 | //--------------------------------- |
55 | 55 | |
56 | 56 | if (!defined('SMARTOBJECT_ROOT_PATH')) { |
57 | - require_once XOOPS_ROOT_PATH . '/modules/smartobject/include/functions.php'; |
|
57 | + require_once XOOPS_ROOT_PATH.'/modules/smartobject/include/functions.php'; |
|
58 | 58 | } |
59 | 59 | |
60 | 60 | $smartobjectConfig = smart_getModuleConfig('smartobject'); |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | ++$i; |
64 | 64 | $adminmenu[$i]['title'] = _MI_SOBJECT_CURRENCIES; |
65 | 65 | $adminmenu[$i]['link'] = 'admin/currency.php'; |
66 | - $adminmenu[$i]['icon'] = $pathIcon32 . '/cash_stack.png'; |
|
66 | + $adminmenu[$i]['icon'] = $pathIcon32.'/cash_stack.png'; |
|
67 | 67 | } |
68 | 68 | |
69 | 69 | global $xoopsModule; |
@@ -74,9 +74,9 @@ discard block |
||
74 | 74 | // $headermenu[$i]['link'] = '../../system/admin.php?fct=preferences&op=showmod&mod=' . $xoopsModule->getVar('mid'); |
75 | 75 | $mid = $xoopsModule->getVar('mid'); |
76 | 76 | if (defined('XOOPS_CUBE_LEGACY')) { |
77 | - $link_pref = XOOPS_URL . '/modules/legacy/admin/index.php?action=PreferenceEdit&confmod_id=' . $mid; |
|
77 | + $link_pref = XOOPS_URL.'/modules/legacy/admin/index.php?action=PreferenceEdit&confmod_id='.$mid; |
|
78 | 78 | } else { |
79 | - $link_pref = XOOPS_URL . '/modules/system/admin.php?fct=preferences&op=showmod&mod=' . $mid; |
|
79 | + $link_pref = XOOPS_URL.'/modules/system/admin.php?fct=preferences&op=showmod&mod='.$mid; |
|
80 | 80 | } |
81 | 81 | $headermenu[$i]['link'] = $link_pref; |
82 | 82 | // ----- |
@@ -85,9 +85,9 @@ discard block |
||
85 | 85 | // $headermenu[$i]['link'] = XOOPS_URL . "/modules/system/admin.php?fct=modulesadmin&op=update&module=" . $xoopsModule->getVar('dirname'); |
86 | 86 | $dirname = $xoopsModule->getVar('dirname'); |
87 | 87 | if (defined('XOOPS_CUBE_LEGACY')) { |
88 | - $link_module = XOOPS_URL . '/modules/legacy/admin/index.php?action=ModuleUpdate&dirname=' . $dirname; |
|
88 | + $link_module = XOOPS_URL.'/modules/legacy/admin/index.php?action=ModuleUpdate&dirname='.$dirname; |
|
89 | 89 | } else { |
90 | - $link_module = XOOPS_URL . '/modules/system/admin.php?fct=modulesadmin&op=update&module=' . $dirname; |
|
90 | + $link_module = XOOPS_URL.'/modules/system/admin.php?fct=modulesadmin&op=update&module='.$dirname; |
|
91 | 91 | } |
92 | 92 | $headermenu[$i]['link'] = $link_module; |
93 | 93 | // ----- |
@@ -17,8 +17,8 @@ discard block |
||
17 | 17 | * @author XOOPS Development Team |
18 | 18 | */ |
19 | 19 | |
20 | -require_once __DIR__ . '/../../../include/cp_header.php'; |
|
21 | -require_once __DIR__ . '/admin_header.php'; |
|
20 | +require_once __DIR__.'/../../../include/cp_header.php'; |
|
21 | +require_once __DIR__.'/admin_header.php'; |
|
22 | 22 | |
23 | 23 | xoops_cp_header(); |
24 | 24 | |
@@ -27,4 +27,4 @@ discard block |
||
27 | 27 | $adminObject->displayNavigation(basename(__FILE__)); |
28 | 28 | $adminObject->displayIndex(); |
29 | 29 | |
30 | -require_once __DIR__ . '/admin_footer.php'; |
|
30 | +require_once __DIR__.'/admin_footer.php'; |
@@ -10,29 +10,29 @@ discard block |
||
10 | 10 | |
11 | 11 | function editclass($showmenu = false, $currencyid = 0) |
12 | 12 | { |
13 | - global $smartobjectCurrencyHandler; |
|
14 | - |
|
15 | - $currencyObj = $smartobjectCurrencyHandler->get($currencyid); |
|
16 | - |
|
17 | - if (!$currencyObj->isNew()) { |
|
18 | - if ($showmenu) { |
|
19 | - //smart_adminMenu(5, _AM_SOBJECT_CURRENCIES . " > " . _AM_SOBJECT_EDITING); |
|
20 | - } |
|
21 | - smart_collapsableBar('currencyedit', _AM_SOBJECT_CURRENCIES_EDIT, _AM_SOBJECT_CURRENCIES_EDIT_INFO); |
|
22 | - |
|
23 | - $sform = $currencyObj->getForm(_AM_SOBJECT_CURRENCIES_EDIT, 'addcurrency'); |
|
24 | - $sform->display(); |
|
25 | - smart_close_collapsable('currencyedit'); |
|
26 | - } else { |
|
27 | - if ($showmenu) { |
|
28 | - //smart_adminMenu(5, _AM_SOBJECT_CURRENCIES . " > " . _CO_SOBJECT_CREATINGNEW); |
|
29 | - } |
|
30 | - |
|
31 | - smart_collapsableBar('currencycreate', _AM_SOBJECT_CURRENCIES_CREATE, _AM_SOBJECT_CURRENCIES_CREATE_INFO); |
|
32 | - $sform = $currencyObj->getForm(_AM_SOBJECT_CURRENCIES_CREATE, 'addcurrency'); |
|
33 | - $sform->display(); |
|
34 | - smart_close_collapsable('currencycreate'); |
|
35 | - } |
|
13 | + global $smartobjectCurrencyHandler; |
|
14 | + |
|
15 | + $currencyObj = $smartobjectCurrencyHandler->get($currencyid); |
|
16 | + |
|
17 | + if (!$currencyObj->isNew()) { |
|
18 | + if ($showmenu) { |
|
19 | + //smart_adminMenu(5, _AM_SOBJECT_CURRENCIES . " > " . _AM_SOBJECT_EDITING); |
|
20 | + } |
|
21 | + smart_collapsableBar('currencyedit', _AM_SOBJECT_CURRENCIES_EDIT, _AM_SOBJECT_CURRENCIES_EDIT_INFO); |
|
22 | + |
|
23 | + $sform = $currencyObj->getForm(_AM_SOBJECT_CURRENCIES_EDIT, 'addcurrency'); |
|
24 | + $sform->display(); |
|
25 | + smart_close_collapsable('currencyedit'); |
|
26 | + } else { |
|
27 | + if ($showmenu) { |
|
28 | + //smart_adminMenu(5, _AM_SOBJECT_CURRENCIES . " > " . _CO_SOBJECT_CREATINGNEW); |
|
29 | + } |
|
30 | + |
|
31 | + smart_collapsableBar('currencycreate', _AM_SOBJECT_CURRENCIES_CREATE, _AM_SOBJECT_CURRENCIES_CREATE_INFO); |
|
32 | + $sform = $currencyObj->getForm(_AM_SOBJECT_CURRENCIES_CREATE, 'addcurrency'); |
|
33 | + $sform->display(); |
|
34 | + smart_close_collapsable('currencycreate'); |
|
35 | + } |
|
36 | 36 | } |
37 | 37 | |
38 | 38 | require_once __DIR__ . '/admin_header.php'; |
@@ -43,36 +43,36 @@ discard block |
||
43 | 43 | $op = ''; |
44 | 44 | |
45 | 45 | if (isset($_GET['op'])) { |
46 | - $op = $_GET['op']; |
|
46 | + $op = $_GET['op']; |
|
47 | 47 | } |
48 | 48 | if (isset($_POST['op'])) { |
49 | - $op = $_POST['op']; |
|
49 | + $op = $_POST['op']; |
|
50 | 50 | } |
51 | 51 | |
52 | 52 | switch ($op) { |
53 | - case 'mod': |
|
54 | - $currencyid = isset($_GET['currencyid']) ? (int)$_GET['currencyid'] : 0; |
|
53 | + case 'mod': |
|
54 | + $currencyid = isset($_GET['currencyid']) ? (int)$_GET['currencyid'] : 0; |
|
55 | 55 | |
56 | - smart_xoops_cp_header(); |
|
56 | + smart_xoops_cp_header(); |
|
57 | 57 | |
58 | - editclass(true, $currencyid); |
|
59 | - break; |
|
58 | + editclass(true, $currencyid); |
|
59 | + break; |
|
60 | 60 | |
61 | - case 'updateCurrencies': |
|
61 | + case 'updateCurrencies': |
|
62 | 62 | |
63 | - if (!isset($_POST['SmartobjectCurrency_objects']) || count($_POST['SmartobjectCurrency_objects']) == 0) { |
|
64 | - redirect_header($smart_previous_page, 3, _AM_SOBJECT_NO_RECORDS_TO_UPDATE); |
|
65 | - } |
|
63 | + if (!isset($_POST['SmartobjectCurrency_objects']) || count($_POST['SmartobjectCurrency_objects']) == 0) { |
|
64 | + redirect_header($smart_previous_page, 3, _AM_SOBJECT_NO_RECORDS_TO_UPDATE); |
|
65 | + } |
|
66 | 66 | |
67 | - if (isset($_POST['default_currency'])) { |
|
68 | - $newDefaultCurrency = $_POST['default_currency']; |
|
69 | - $sql = 'UPDATE ' . $smartobjectCurrencyHandler->table . ' SET default_currency=0'; |
|
70 | - $smartobjectCurrencyHandler->query($sql); |
|
71 | - $sql = 'UPDATE ' . $smartobjectCurrencyHandler->table . ' SET default_currency=1 WHERE currencyid=' . $newDefaultCurrency; |
|
72 | - $smartobjectCurrencyHandler->query($sql); |
|
73 | - } |
|
67 | + if (isset($_POST['default_currency'])) { |
|
68 | + $newDefaultCurrency = $_POST['default_currency']; |
|
69 | + $sql = 'UPDATE ' . $smartobjectCurrencyHandler->table . ' SET default_currency=0'; |
|
70 | + $smartobjectCurrencyHandler->query($sql); |
|
71 | + $sql = 'UPDATE ' . $smartobjectCurrencyHandler->table . ' SET default_currency=1 WHERE currencyid=' . $newDefaultCurrency; |
|
72 | + $smartobjectCurrencyHandler->query($sql); |
|
73 | + } |
|
74 | 74 | |
75 | - /* |
|
75 | + /* |
|
76 | 76 | $criteria = new CriteriaCompo(); |
77 | 77 | $criteria->add(new Criteria('currencyid', '(' . implode(', ', $_POST['SmartobjectCurrency_objects']) . ')', 'IN')); |
78 | 78 | $currenciesObj = $smartobjectCurrencyHandler->getObjects($criteria, true); |
@@ -82,49 +82,49 @@ discard block |
||
82 | 82 | $smartobjectCurrencyHandler->insert($currencyObj); |
83 | 83 | } |
84 | 84 | */ |
85 | - redirect_header($smart_previous_page, 3, _AM_SOBJECT_RECORDS_UPDATED); |
|
86 | - break; |
|
85 | + redirect_header($smart_previous_page, 3, _AM_SOBJECT_RECORDS_UPDATED); |
|
86 | + break; |
|
87 | 87 | |
88 | - case 'addcurrency': |
|
89 | - require_once XOOPS_ROOT_PATH . '/modules/smartobject/class/smartobjectcontroller.php'; |
|
90 | - $controller = new SmartObjectController($smartobjectCurrencyHandler); |
|
91 | - $controller->storeFromDefaultForm(_AM_SOBJECT_CURRENCIES_CREATED, _AM_SOBJECT_CURRENCIES_MODIFIED, SMARTOBJECT_URL . 'admin/currency.php'); |
|
88 | + case 'addcurrency': |
|
89 | + require_once XOOPS_ROOT_PATH . '/modules/smartobject/class/smartobjectcontroller.php'; |
|
90 | + $controller = new SmartObjectController($smartobjectCurrencyHandler); |
|
91 | + $controller->storeFromDefaultForm(_AM_SOBJECT_CURRENCIES_CREATED, _AM_SOBJECT_CURRENCIES_MODIFIED, SMARTOBJECT_URL . 'admin/currency.php'); |
|
92 | 92 | |
93 | - break; |
|
93 | + break; |
|
94 | 94 | |
95 | - case 'del': |
|
96 | - require_once XOOPS_ROOT_PATH . '/modules/smartobject/class/smartobjectcontroller.php'; |
|
97 | - $controller = new SmartObjectController($smartobjectCurrencyHandler); |
|
98 | - $controller->handleObjectDeletion(); |
|
95 | + case 'del': |
|
96 | + require_once XOOPS_ROOT_PATH . '/modules/smartobject/class/smartobjectcontroller.php'; |
|
97 | + $controller = new SmartObjectController($smartobjectCurrencyHandler); |
|
98 | + $controller->handleObjectDeletion(); |
|
99 | 99 | |
100 | - break; |
|
100 | + break; |
|
101 | 101 | |
102 | - default: |
|
102 | + default: |
|
103 | 103 | |
104 | - smart_xoops_cp_header(); |
|
104 | + smart_xoops_cp_header(); |
|
105 | 105 | |
106 | - //smart_adminMenu(5, _AM_SOBJECT_CURRENCIES); |
|
106 | + //smart_adminMenu(5, _AM_SOBJECT_CURRENCIES); |
|
107 | 107 | |
108 | - smart_collapsableBar('createdcurrencies', _AM_SOBJECT_CURRENCIES, _AM_SOBJECT_CURRENCIES_DSC); |
|
108 | + smart_collapsableBar('createdcurrencies', _AM_SOBJECT_CURRENCIES, _AM_SOBJECT_CURRENCIES_DSC); |
|
109 | 109 | |
110 | - require_once SMARTOBJECT_ROOT_PATH . 'class/smartobjecttable.php'; |
|
111 | - $objectTable = new SmartObjectTable($smartobjectCurrencyHandler); |
|
112 | - $objectTable->addColumn(new SmartObjectColumn('name', 'left', false, 'getCurrencyLink')); |
|
113 | - $objectTable->addColumn(new SmartObjectColumn('rate', 'center', 150)); |
|
114 | - $objectTable->addColumn(new SmartObjectColumn('iso4217', 'center', 150)); |
|
115 | - $objectTable->addColumn(new SmartObjectColumn('default_currency', 'center', 150, 'getDefaultCurrencyControl')); |
|
110 | + require_once SMARTOBJECT_ROOT_PATH . 'class/smartobjecttable.php'; |
|
111 | + $objectTable = new SmartObjectTable($smartobjectCurrencyHandler); |
|
112 | + $objectTable->addColumn(new SmartObjectColumn('name', 'left', false, 'getCurrencyLink')); |
|
113 | + $objectTable->addColumn(new SmartObjectColumn('rate', 'center', 150)); |
|
114 | + $objectTable->addColumn(new SmartObjectColumn('iso4217', 'center', 150)); |
|
115 | + $objectTable->addColumn(new SmartObjectColumn('default_currency', 'center', 150, 'getDefaultCurrencyControl')); |
|
116 | 116 | |
117 | - $objectTable->addIntroButton('addcurrency', 'currency.php?op=mod', _AM_SOBJECT_CURRENCIES_CREATE); |
|
117 | + $objectTable->addIntroButton('addcurrency', 'currency.php?op=mod', _AM_SOBJECT_CURRENCIES_CREATE); |
|
118 | 118 | |
119 | - $objectTable->addActionButton('updateCurrencies', _SUBMIT, _AM_SOBJECT_CURRENCY_UPDATE_ALL); |
|
119 | + $objectTable->addActionButton('updateCurrencies', _SUBMIT, _AM_SOBJECT_CURRENCY_UPDATE_ALL); |
|
120 | 120 | |
121 | - $objectTable->render(); |
|
121 | + $objectTable->render(); |
|
122 | 122 | |
123 | - echo '<br>'; |
|
124 | - smart_close_collapsable('createdcurrencies'); |
|
125 | - echo '<br>'; |
|
123 | + echo '<br>'; |
|
124 | + smart_close_collapsable('createdcurrencies'); |
|
125 | + echo '<br>'; |
|
126 | 126 | |
127 | - break; |
|
127 | + break; |
|
128 | 128 | } |
129 | 129 | |
130 | 130 | //smart_modFooter(); |
@@ -50,29 +50,29 @@ discard block |
||
50 | 50 | } |
51 | 51 | |
52 | 52 | switch ($op) { |
53 | - case 'mod': |
|
54 | - $currencyid = isset($_GET['currencyid']) ? (int)$_GET['currencyid'] : 0; |
|
53 | + case 'mod': |
|
54 | + $currencyid = isset($_GET['currencyid']) ? (int)$_GET['currencyid'] : 0; |
|
55 | 55 | |
56 | - smart_xoops_cp_header(); |
|
56 | + smart_xoops_cp_header(); |
|
57 | 57 | |
58 | - editclass(true, $currencyid); |
|
59 | - break; |
|
58 | + editclass(true, $currencyid); |
|
59 | + break; |
|
60 | 60 | |
61 | - case 'updateCurrencies': |
|
61 | + case 'updateCurrencies': |
|
62 | 62 | |
63 | - if (!isset($_POST['SmartobjectCurrency_objects']) || count($_POST['SmartobjectCurrency_objects']) == 0) { |
|
64 | - redirect_header($smart_previous_page, 3, _AM_SOBJECT_NO_RECORDS_TO_UPDATE); |
|
65 | - } |
|
63 | + if (!isset($_POST['SmartobjectCurrency_objects']) || count($_POST['SmartobjectCurrency_objects']) == 0) { |
|
64 | + redirect_header($smart_previous_page, 3, _AM_SOBJECT_NO_RECORDS_TO_UPDATE); |
|
65 | + } |
|
66 | 66 | |
67 | - if (isset($_POST['default_currency'])) { |
|
68 | - $newDefaultCurrency = $_POST['default_currency']; |
|
69 | - $sql = 'UPDATE ' . $smartobjectCurrencyHandler->table . ' SET default_currency=0'; |
|
70 | - $smartobjectCurrencyHandler->query($sql); |
|
71 | - $sql = 'UPDATE ' . $smartobjectCurrencyHandler->table . ' SET default_currency=1 WHERE currencyid=' . $newDefaultCurrency; |
|
72 | - $smartobjectCurrencyHandler->query($sql); |
|
73 | - } |
|
67 | + if (isset($_POST['default_currency'])) { |
|
68 | + $newDefaultCurrency = $_POST['default_currency']; |
|
69 | + $sql = 'UPDATE ' . $smartobjectCurrencyHandler->table . ' SET default_currency=0'; |
|
70 | + $smartobjectCurrencyHandler->query($sql); |
|
71 | + $sql = 'UPDATE ' . $smartobjectCurrencyHandler->table . ' SET default_currency=1 WHERE currencyid=' . $newDefaultCurrency; |
|
72 | + $smartobjectCurrencyHandler->query($sql); |
|
73 | + } |
|
74 | 74 | |
75 | - /* |
|
75 | + /* |
|
76 | 76 | $criteria = new CriteriaCompo(); |
77 | 77 | $criteria->add(new Criteria('currencyid', '(' . implode(', ', $_POST['SmartobjectCurrency_objects']) . ')', 'IN')); |
78 | 78 | $currenciesObj = $smartobjectCurrencyHandler->getObjects($criteria, true); |
@@ -82,49 +82,49 @@ discard block |
||
82 | 82 | $smartobjectCurrencyHandler->insert($currencyObj); |
83 | 83 | } |
84 | 84 | */ |
85 | - redirect_header($smart_previous_page, 3, _AM_SOBJECT_RECORDS_UPDATED); |
|
86 | - break; |
|
85 | + redirect_header($smart_previous_page, 3, _AM_SOBJECT_RECORDS_UPDATED); |
|
86 | + break; |
|
87 | 87 | |
88 | - case 'addcurrency': |
|
89 | - require_once XOOPS_ROOT_PATH . '/modules/smartobject/class/smartobjectcontroller.php'; |
|
90 | - $controller = new SmartObjectController($smartobjectCurrencyHandler); |
|
91 | - $controller->storeFromDefaultForm(_AM_SOBJECT_CURRENCIES_CREATED, _AM_SOBJECT_CURRENCIES_MODIFIED, SMARTOBJECT_URL . 'admin/currency.php'); |
|
88 | + case 'addcurrency': |
|
89 | + require_once XOOPS_ROOT_PATH . '/modules/smartobject/class/smartobjectcontroller.php'; |
|
90 | + $controller = new SmartObjectController($smartobjectCurrencyHandler); |
|
91 | + $controller->storeFromDefaultForm(_AM_SOBJECT_CURRENCIES_CREATED, _AM_SOBJECT_CURRENCIES_MODIFIED, SMARTOBJECT_URL . 'admin/currency.php'); |
|
92 | 92 | |
93 | - break; |
|
93 | + break; |
|
94 | 94 | |
95 | - case 'del': |
|
96 | - require_once XOOPS_ROOT_PATH . '/modules/smartobject/class/smartobjectcontroller.php'; |
|
97 | - $controller = new SmartObjectController($smartobjectCurrencyHandler); |
|
98 | - $controller->handleObjectDeletion(); |
|
95 | + case 'del': |
|
96 | + require_once XOOPS_ROOT_PATH . '/modules/smartobject/class/smartobjectcontroller.php'; |
|
97 | + $controller = new SmartObjectController($smartobjectCurrencyHandler); |
|
98 | + $controller->handleObjectDeletion(); |
|
99 | 99 | |
100 | - break; |
|
100 | + break; |
|
101 | 101 | |
102 | - default: |
|
102 | + default: |
|
103 | 103 | |
104 | - smart_xoops_cp_header(); |
|
104 | + smart_xoops_cp_header(); |
|
105 | 105 | |
106 | - //smart_adminMenu(5, _AM_SOBJECT_CURRENCIES); |
|
106 | + //smart_adminMenu(5, _AM_SOBJECT_CURRENCIES); |
|
107 | 107 | |
108 | - smart_collapsableBar('createdcurrencies', _AM_SOBJECT_CURRENCIES, _AM_SOBJECT_CURRENCIES_DSC); |
|
108 | + smart_collapsableBar('createdcurrencies', _AM_SOBJECT_CURRENCIES, _AM_SOBJECT_CURRENCIES_DSC); |
|
109 | 109 | |
110 | - require_once SMARTOBJECT_ROOT_PATH . 'class/smartobjecttable.php'; |
|
111 | - $objectTable = new SmartObjectTable($smartobjectCurrencyHandler); |
|
112 | - $objectTable->addColumn(new SmartObjectColumn('name', 'left', false, 'getCurrencyLink')); |
|
113 | - $objectTable->addColumn(new SmartObjectColumn('rate', 'center', 150)); |
|
114 | - $objectTable->addColumn(new SmartObjectColumn('iso4217', 'center', 150)); |
|
115 | - $objectTable->addColumn(new SmartObjectColumn('default_currency', 'center', 150, 'getDefaultCurrencyControl')); |
|
110 | + require_once SMARTOBJECT_ROOT_PATH . 'class/smartobjecttable.php'; |
|
111 | + $objectTable = new SmartObjectTable($smartobjectCurrencyHandler); |
|
112 | + $objectTable->addColumn(new SmartObjectColumn('name', 'left', false, 'getCurrencyLink')); |
|
113 | + $objectTable->addColumn(new SmartObjectColumn('rate', 'center', 150)); |
|
114 | + $objectTable->addColumn(new SmartObjectColumn('iso4217', 'center', 150)); |
|
115 | + $objectTable->addColumn(new SmartObjectColumn('default_currency', 'center', 150, 'getDefaultCurrencyControl')); |
|
116 | 116 | |
117 | - $objectTable->addIntroButton('addcurrency', 'currency.php?op=mod', _AM_SOBJECT_CURRENCIES_CREATE); |
|
117 | + $objectTable->addIntroButton('addcurrency', 'currency.php?op=mod', _AM_SOBJECT_CURRENCIES_CREATE); |
|
118 | 118 | |
119 | - $objectTable->addActionButton('updateCurrencies', _SUBMIT, _AM_SOBJECT_CURRENCY_UPDATE_ALL); |
|
119 | + $objectTable->addActionButton('updateCurrencies', _SUBMIT, _AM_SOBJECT_CURRENCY_UPDATE_ALL); |
|
120 | 120 | |
121 | - $objectTable->render(); |
|
121 | + $objectTable->render(); |
|
122 | 122 | |
123 | - echo '<br>'; |
|
124 | - smart_close_collapsable('createdcurrencies'); |
|
125 | - echo '<br>'; |
|
123 | + echo '<br>'; |
|
124 | + smart_close_collapsable('createdcurrencies'); |
|
125 | + echo '<br>'; |
|
126 | 126 | |
127 | - break; |
|
127 | + break; |
|
128 | 128 | } |
129 | 129 | |
130 | 130 | //smart_modFooter(); |
@@ -35,9 +35,9 @@ discard block |
||
35 | 35 | } |
36 | 36 | } |
37 | 37 | |
38 | -require_once __DIR__ . '/admin_header.php'; |
|
39 | -require_once SMARTOBJECT_ROOT_PATH . 'class/smartobjecttable.php'; |
|
40 | -require_once SMARTOBJECT_ROOT_PATH . 'class/currency.php'; |
|
38 | +require_once __DIR__.'/admin_header.php'; |
|
39 | +require_once SMARTOBJECT_ROOT_PATH.'class/smartobjecttable.php'; |
|
40 | +require_once SMARTOBJECT_ROOT_PATH.'class/currency.php'; |
|
41 | 41 | $smartobjectCurrencyHandler = xoops_getModuleHandler('currency'); |
42 | 42 | |
43 | 43 | $op = ''; |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | |
52 | 52 | switch ($op) { |
53 | 53 | case 'mod': |
54 | - $currencyid = isset($_GET['currencyid']) ? (int)$_GET['currencyid'] : 0; |
|
54 | + $currencyid = isset($_GET['currencyid']) ? (int) $_GET['currencyid'] : 0; |
|
55 | 55 | |
56 | 56 | smart_xoops_cp_header(); |
57 | 57 | |
@@ -66,9 +66,9 @@ discard block |
||
66 | 66 | |
67 | 67 | if (isset($_POST['default_currency'])) { |
68 | 68 | $newDefaultCurrency = $_POST['default_currency']; |
69 | - $sql = 'UPDATE ' . $smartobjectCurrencyHandler->table . ' SET default_currency=0'; |
|
69 | + $sql = 'UPDATE '.$smartobjectCurrencyHandler->table.' SET default_currency=0'; |
|
70 | 70 | $smartobjectCurrencyHandler->query($sql); |
71 | - $sql = 'UPDATE ' . $smartobjectCurrencyHandler->table . ' SET default_currency=1 WHERE currencyid=' . $newDefaultCurrency; |
|
71 | + $sql = 'UPDATE '.$smartobjectCurrencyHandler->table.' SET default_currency=1 WHERE currencyid='.$newDefaultCurrency; |
|
72 | 72 | $smartobjectCurrencyHandler->query($sql); |
73 | 73 | } |
74 | 74 | |
@@ -86,14 +86,14 @@ discard block |
||
86 | 86 | break; |
87 | 87 | |
88 | 88 | case 'addcurrency': |
89 | - require_once XOOPS_ROOT_PATH . '/modules/smartobject/class/smartobjectcontroller.php'; |
|
89 | + require_once XOOPS_ROOT_PATH.'/modules/smartobject/class/smartobjectcontroller.php'; |
|
90 | 90 | $controller = new SmartObjectController($smartobjectCurrencyHandler); |
91 | - $controller->storeFromDefaultForm(_AM_SOBJECT_CURRENCIES_CREATED, _AM_SOBJECT_CURRENCIES_MODIFIED, SMARTOBJECT_URL . 'admin/currency.php'); |
|
91 | + $controller->storeFromDefaultForm(_AM_SOBJECT_CURRENCIES_CREATED, _AM_SOBJECT_CURRENCIES_MODIFIED, SMARTOBJECT_URL.'admin/currency.php'); |
|
92 | 92 | |
93 | 93 | break; |
94 | 94 | |
95 | 95 | case 'del': |
96 | - require_once XOOPS_ROOT_PATH . '/modules/smartobject/class/smartobjectcontroller.php'; |
|
96 | + require_once XOOPS_ROOT_PATH.'/modules/smartobject/class/smartobjectcontroller.php'; |
|
97 | 97 | $controller = new SmartObjectController($smartobjectCurrencyHandler); |
98 | 98 | $controller->handleObjectDeletion(); |
99 | 99 | |
@@ -107,7 +107,7 @@ discard block |
||
107 | 107 | |
108 | 108 | smart_collapsableBar('createdcurrencies', _AM_SOBJECT_CURRENCIES, _AM_SOBJECT_CURRENCIES_DSC); |
109 | 109 | |
110 | - require_once SMARTOBJECT_ROOT_PATH . 'class/smartobjecttable.php'; |
|
110 | + require_once SMARTOBJECT_ROOT_PATH.'class/smartobjecttable.php'; |
|
111 | 111 | $objectTable = new SmartObjectTable($smartobjectCurrencyHandler); |
112 | 112 | $objectTable->addColumn(new SmartObjectColumn('name', 'left', false, 'getCurrencyLink')); |
113 | 113 | $objectTable->addColumn(new SmartObjectColumn('rate', 'center', 150)); |
@@ -129,4 +129,4 @@ discard block |
||
129 | 129 | |
130 | 130 | //smart_modFooter(); |
131 | 131 | //xoops_cp_footer(); |
132 | -require_once __DIR__ . '/admin_footer.php'; |
|
132 | +require_once __DIR__.'/admin_footer.php'; |
@@ -12,32 +12,32 @@ discard block |
||
12 | 12 | |
13 | 13 | function editcustomtag($showmenu = false, $customtagid = 0, $clone = false) |
14 | 14 | { |
15 | - global $smartobjectCustomtagHandler; |
|
16 | - |
|
17 | - $customtagObj = $smartobjectCustomtagHandler->get($customtagid); |
|
18 | - |
|
19 | - if (!$clone && !$customtagObj->isNew()) { |
|
20 | - if ($showmenu) { |
|
21 | - //smart_adminMenu(2, _AM_SOBJECT_CUSTOMTAGS . " > " . _AM_SOBJECT_EDITING); |
|
22 | - } |
|
23 | - smart_collapsableBar('customtagedit', _AM_SOBJECT_CUSTOMTAGS_EDIT, _AM_SOBJECT_CUSTOMTAGS_EDIT_INFO); |
|
24 | - |
|
25 | - $sform = $customtagObj->getForm(_AM_SOBJECT_CUSTOMTAGS_EDIT, 'addcustomtag'); |
|
26 | - $sform->display(); |
|
27 | - smart_close_collapsable('customtagedit'); |
|
28 | - } else { |
|
29 | - $customtagObj->setVar('customtagid', 0); |
|
30 | - $customtagObj->setVar('tag', ''); |
|
31 | - |
|
32 | - if ($showmenu) { |
|
33 | - //smart_adminMenu(2, _AM_SOBJECT_CUSTOMTAGS . " > " . _CO_SOBJECT_CREATINGNEW); |
|
34 | - } |
|
35 | - |
|
36 | - smart_collapsableBar('customtagcreate', _AM_SOBJECT_CUSTOMTAGS_CREATE, _AM_SOBJECT_CUSTOMTAGS_CREATE_INFO); |
|
37 | - $sform = $customtagObj->getForm(_AM_SOBJECT_CUSTOMTAGS_CREATE, 'addcustomtag'); |
|
38 | - $sform->display(); |
|
39 | - smart_close_collapsable('customtagcreate'); |
|
40 | - } |
|
15 | + global $smartobjectCustomtagHandler; |
|
16 | + |
|
17 | + $customtagObj = $smartobjectCustomtagHandler->get($customtagid); |
|
18 | + |
|
19 | + if (!$clone && !$customtagObj->isNew()) { |
|
20 | + if ($showmenu) { |
|
21 | + //smart_adminMenu(2, _AM_SOBJECT_CUSTOMTAGS . " > " . _AM_SOBJECT_EDITING); |
|
22 | + } |
|
23 | + smart_collapsableBar('customtagedit', _AM_SOBJECT_CUSTOMTAGS_EDIT, _AM_SOBJECT_CUSTOMTAGS_EDIT_INFO); |
|
24 | + |
|
25 | + $sform = $customtagObj->getForm(_AM_SOBJECT_CUSTOMTAGS_EDIT, 'addcustomtag'); |
|
26 | + $sform->display(); |
|
27 | + smart_close_collapsable('customtagedit'); |
|
28 | + } else { |
|
29 | + $customtagObj->setVar('customtagid', 0); |
|
30 | + $customtagObj->setVar('tag', ''); |
|
31 | + |
|
32 | + if ($showmenu) { |
|
33 | + //smart_adminMenu(2, _AM_SOBJECT_CUSTOMTAGS . " > " . _CO_SOBJECT_CREATINGNEW); |
|
34 | + } |
|
35 | + |
|
36 | + smart_collapsableBar('customtagcreate', _AM_SOBJECT_CUSTOMTAGS_CREATE, _AM_SOBJECT_CUSTOMTAGS_CREATE_INFO); |
|
37 | + $sform = $customtagObj->getForm(_AM_SOBJECT_CUSTOMTAGS_CREATE, 'addcustomtag'); |
|
38 | + $sform->display(); |
|
39 | + smart_close_collapsable('customtagcreate'); |
|
40 | + } |
|
41 | 41 | } |
42 | 42 | |
43 | 43 | require_once __DIR__ . '/admin_header.php'; |
@@ -52,70 +52,70 @@ discard block |
||
52 | 52 | $op = ''; |
53 | 53 | |
54 | 54 | if (isset($_GET['op'])) { |
55 | - $op = $_GET['op']; |
|
55 | + $op = $_GET['op']; |
|
56 | 56 | } |
57 | 57 | if (isset($_POST['op'])) { |
58 | - $op = $_POST['op']; |
|
58 | + $op = $_POST['op']; |
|
59 | 59 | } |
60 | 60 | |
61 | 61 | switch ($op) { |
62 | - case 'mod': |
|
62 | + case 'mod': |
|
63 | 63 | |
64 | - $customtagid = isset($_GET['customtagid']) ? (int)$_GET['customtagid'] : 0; |
|
64 | + $customtagid = isset($_GET['customtagid']) ? (int)$_GET['customtagid'] : 0; |
|
65 | 65 | |
66 | - smart_xoops_cp_header(); |
|
67 | - $adminObject->displayNavigation(basename(__FILE__)); |
|
66 | + smart_xoops_cp_header(); |
|
67 | + $adminObject->displayNavigation(basename(__FILE__)); |
|
68 | 68 | |
69 | - editcustomtag(true, $customtagid); |
|
70 | - break; |
|
69 | + editcustomtag(true, $customtagid); |
|
70 | + break; |
|
71 | 71 | |
72 | - case 'clone': |
|
72 | + case 'clone': |
|
73 | 73 | |
74 | - $customtagid = isset($_GET['customtagid']) ? (int)$_GET['customtagid'] : 0; |
|
74 | + $customtagid = isset($_GET['customtagid']) ? (int)$_GET['customtagid'] : 0; |
|
75 | 75 | |
76 | - smart_xoops_cp_header(); |
|
77 | - $adminObject->displayNavigation(basename(__FILE__)); |
|
76 | + smart_xoops_cp_header(); |
|
77 | + $adminObject->displayNavigation(basename(__FILE__)); |
|
78 | 78 | |
79 | - editcustomtag(true, $customtagid, true); |
|
80 | - break; |
|
79 | + editcustomtag(true, $customtagid, true); |
|
80 | + break; |
|
81 | 81 | |
82 | - case 'addcustomtag': |
|
83 | - require_once XOOPS_ROOT_PATH . '/modules/smartobject/class/smartobjectcontroller.php'; |
|
84 | - $controller = new SmartObjectController($smartobjectCustomtagHandler); |
|
85 | - $controller->storeFromDefaultForm(_AM_SOBJECT_CUSTOMTAGS_CREATED, _AM_SOBJECT_CUSTOMTAGS_MODIFIED); |
|
86 | - break; |
|
82 | + case 'addcustomtag': |
|
83 | + require_once XOOPS_ROOT_PATH . '/modules/smartobject/class/smartobjectcontroller.php'; |
|
84 | + $controller = new SmartObjectController($smartobjectCustomtagHandler); |
|
85 | + $controller->storeFromDefaultForm(_AM_SOBJECT_CUSTOMTAGS_CREATED, _AM_SOBJECT_CUSTOMTAGS_MODIFIED); |
|
86 | + break; |
|
87 | 87 | |
88 | - case 'del': |
|
88 | + case 'del': |
|
89 | 89 | |
90 | - require_once XOOPS_ROOT_PATH . '/modules/smartobject/class/smartobjectcontroller.php'; |
|
91 | - $controller = new SmartObjectController($smartobjectCustomtagHandler); |
|
92 | - $controller->handleObjectDeletion(); |
|
90 | + require_once XOOPS_ROOT_PATH . '/modules/smartobject/class/smartobjectcontroller.php'; |
|
91 | + $controller = new SmartObjectController($smartobjectCustomtagHandler); |
|
92 | + $controller->handleObjectDeletion(); |
|
93 | 93 | |
94 | - break; |
|
94 | + break; |
|
95 | 95 | |
96 | - default: |
|
96 | + default: |
|
97 | 97 | |
98 | - smart_xoops_cp_header(); |
|
99 | - $adminObject->displayNavigation(basename(__FILE__)); |
|
100 | - $adminObject->addItemButton(_AM_SOBJECT_CUSTOMTAGS_CREATE, 'customtag.php?op=mod', 'add', ''); |
|
101 | - $adminObject->displayButton('left', ''); |
|
98 | + smart_xoops_cp_header(); |
|
99 | + $adminObject->displayNavigation(basename(__FILE__)); |
|
100 | + $adminObject->addItemButton(_AM_SOBJECT_CUSTOMTAGS_CREATE, 'customtag.php?op=mod', 'add', ''); |
|
101 | + $adminObject->displayButton('left', ''); |
|
102 | 102 | |
103 | - //smart_adminMenu(2, _AM_SOBJECT_CUSTOMTAGS); |
|
103 | + //smart_adminMenu(2, _AM_SOBJECT_CUSTOMTAGS); |
|
104 | 104 | |
105 | - smart_collapsableBar('createdcustomtags', _AM_SOBJECT_CUSTOMTAGS, _AM_SOBJECT_CUSTOMTAGS_DSC); |
|
105 | + smart_collapsableBar('createdcustomtags', _AM_SOBJECT_CUSTOMTAGS, _AM_SOBJECT_CUSTOMTAGS_DSC); |
|
106 | 106 | |
107 | - require_once SMARTOBJECT_ROOT_PATH . 'class/smartobjecttable.php'; |
|
108 | - $objectTable = new SmartObjectTable($smartobjectCustomtagHandler); |
|
109 | - $objectTable->addColumn(new SmartObjectColumn('name', 'left', 150, 'getCustomtagName')); |
|
110 | - $objectTable->addColumn(new SmartObjectColumn('description', 'left')); |
|
111 | - $objectTable->addColumn(new SmartObjectColumn('language', 'center', 150)); |
|
107 | + require_once SMARTOBJECT_ROOT_PATH . 'class/smartobjecttable.php'; |
|
108 | + $objectTable = new SmartObjectTable($smartobjectCustomtagHandler); |
|
109 | + $objectTable->addColumn(new SmartObjectColumn('name', 'left', 150, 'getCustomtagName')); |
|
110 | + $objectTable->addColumn(new SmartObjectColumn('description', 'left')); |
|
111 | + $objectTable->addColumn(new SmartObjectColumn('language', 'center', 150)); |
|
112 | 112 | |
113 | - // $objectTable->addCustomAction('getCreateItemLink'); |
|
114 | - // $objectTable->addCustomAction('getCreateAttributLink'); |
|
113 | + // $objectTable->addCustomAction('getCreateItemLink'); |
|
114 | + // $objectTable->addCustomAction('getCreateAttributLink'); |
|
115 | 115 | |
116 | - // $objectTable->addIntroButton('addcustomtag', 'customtag.php?op=mod', _AM_SOBJECT_CUSTOMTAGS_CREATE); //mb button |
|
116 | + // $objectTable->addIntroButton('addcustomtag', 'customtag.php?op=mod', _AM_SOBJECT_CUSTOMTAGS_CREATE); //mb button |
|
117 | 117 | |
118 | - /* |
|
118 | + /* |
|
119 | 119 | $criteria_upcoming = new CriteriaCompo(); |
120 | 120 | $criteria_upcoming->add(new Criteria('start_date', time(), '>')); |
121 | 121 | $objectTable->addFilter(_AM_SOBJECT_FILTER_UPCOMING, array( |
@@ -139,16 +139,16 @@ discard block |
||
139 | 139 | 'criteria' => $criteria_last30days |
140 | 140 | )); |
141 | 141 | */ |
142 | - $objectTable->addQuickSearch(array('title', 'summary', 'description')); |
|
143 | - $objectTable->addCustomAction('getCloneLink'); |
|
142 | + $objectTable->addQuickSearch(array('title', 'summary', 'description')); |
|
143 | + $objectTable->addCustomAction('getCloneLink'); |
|
144 | 144 | |
145 | - $objectTable->render(); |
|
145 | + $objectTable->render(); |
|
146 | 146 | |
147 | - echo '<br>'; |
|
148 | - smart_close_collapsable('createdcustomtags'); |
|
149 | - echo '<br>'; |
|
147 | + echo '<br>'; |
|
148 | + smart_close_collapsable('createdcustomtags'); |
|
149 | + echo '<br>'; |
|
150 | 150 | |
151 | - break; |
|
151 | + break; |
|
152 | 152 | } |
153 | 153 | |
154 | 154 | //smart_modFooter(); |
@@ -59,63 +59,63 @@ discard block |
||
59 | 59 | } |
60 | 60 | |
61 | 61 | switch ($op) { |
62 | - case 'mod': |
|
62 | + case 'mod': |
|
63 | 63 | |
64 | - $customtagid = isset($_GET['customtagid']) ? (int)$_GET['customtagid'] : 0; |
|
64 | + $customtagid = isset($_GET['customtagid']) ? (int)$_GET['customtagid'] : 0; |
|
65 | 65 | |
66 | - smart_xoops_cp_header(); |
|
67 | - $adminObject->displayNavigation(basename(__FILE__)); |
|
66 | + smart_xoops_cp_header(); |
|
67 | + $adminObject->displayNavigation(basename(__FILE__)); |
|
68 | 68 | |
69 | - editcustomtag(true, $customtagid); |
|
70 | - break; |
|
69 | + editcustomtag(true, $customtagid); |
|
70 | + break; |
|
71 | 71 | |
72 | - case 'clone': |
|
72 | + case 'clone': |
|
73 | 73 | |
74 | - $customtagid = isset($_GET['customtagid']) ? (int)$_GET['customtagid'] : 0; |
|
74 | + $customtagid = isset($_GET['customtagid']) ? (int)$_GET['customtagid'] : 0; |
|
75 | 75 | |
76 | - smart_xoops_cp_header(); |
|
77 | - $adminObject->displayNavigation(basename(__FILE__)); |
|
76 | + smart_xoops_cp_header(); |
|
77 | + $adminObject->displayNavigation(basename(__FILE__)); |
|
78 | 78 | |
79 | - editcustomtag(true, $customtagid, true); |
|
80 | - break; |
|
79 | + editcustomtag(true, $customtagid, true); |
|
80 | + break; |
|
81 | 81 | |
82 | - case 'addcustomtag': |
|
83 | - require_once XOOPS_ROOT_PATH . '/modules/smartobject/class/smartobjectcontroller.php'; |
|
84 | - $controller = new SmartObjectController($smartobjectCustomtagHandler); |
|
85 | - $controller->storeFromDefaultForm(_AM_SOBJECT_CUSTOMTAGS_CREATED, _AM_SOBJECT_CUSTOMTAGS_MODIFIED); |
|
86 | - break; |
|
82 | + case 'addcustomtag': |
|
83 | + require_once XOOPS_ROOT_PATH . '/modules/smartobject/class/smartobjectcontroller.php'; |
|
84 | + $controller = new SmartObjectController($smartobjectCustomtagHandler); |
|
85 | + $controller->storeFromDefaultForm(_AM_SOBJECT_CUSTOMTAGS_CREATED, _AM_SOBJECT_CUSTOMTAGS_MODIFIED); |
|
86 | + break; |
|
87 | 87 | |
88 | - case 'del': |
|
88 | + case 'del': |
|
89 | 89 | |
90 | - require_once XOOPS_ROOT_PATH . '/modules/smartobject/class/smartobjectcontroller.php'; |
|
91 | - $controller = new SmartObjectController($smartobjectCustomtagHandler); |
|
92 | - $controller->handleObjectDeletion(); |
|
90 | + require_once XOOPS_ROOT_PATH . '/modules/smartobject/class/smartobjectcontroller.php'; |
|
91 | + $controller = new SmartObjectController($smartobjectCustomtagHandler); |
|
92 | + $controller->handleObjectDeletion(); |
|
93 | 93 | |
94 | - break; |
|
94 | + break; |
|
95 | 95 | |
96 | - default: |
|
96 | + default: |
|
97 | 97 | |
98 | - smart_xoops_cp_header(); |
|
99 | - $adminObject->displayNavigation(basename(__FILE__)); |
|
100 | - $adminObject->addItemButton(_AM_SOBJECT_CUSTOMTAGS_CREATE, 'customtag.php?op=mod', 'add', ''); |
|
101 | - $adminObject->displayButton('left', ''); |
|
98 | + smart_xoops_cp_header(); |
|
99 | + $adminObject->displayNavigation(basename(__FILE__)); |
|
100 | + $adminObject->addItemButton(_AM_SOBJECT_CUSTOMTAGS_CREATE, 'customtag.php?op=mod', 'add', ''); |
|
101 | + $adminObject->displayButton('left', ''); |
|
102 | 102 | |
103 | - //smart_adminMenu(2, _AM_SOBJECT_CUSTOMTAGS); |
|
103 | + //smart_adminMenu(2, _AM_SOBJECT_CUSTOMTAGS); |
|
104 | 104 | |
105 | - smart_collapsableBar('createdcustomtags', _AM_SOBJECT_CUSTOMTAGS, _AM_SOBJECT_CUSTOMTAGS_DSC); |
|
105 | + smart_collapsableBar('createdcustomtags', _AM_SOBJECT_CUSTOMTAGS, _AM_SOBJECT_CUSTOMTAGS_DSC); |
|
106 | 106 | |
107 | - require_once SMARTOBJECT_ROOT_PATH . 'class/smartobjecttable.php'; |
|
108 | - $objectTable = new SmartObjectTable($smartobjectCustomtagHandler); |
|
109 | - $objectTable->addColumn(new SmartObjectColumn('name', 'left', 150, 'getCustomtagName')); |
|
110 | - $objectTable->addColumn(new SmartObjectColumn('description', 'left')); |
|
111 | - $objectTable->addColumn(new SmartObjectColumn('language', 'center', 150)); |
|
107 | + require_once SMARTOBJECT_ROOT_PATH . 'class/smartobjecttable.php'; |
|
108 | + $objectTable = new SmartObjectTable($smartobjectCustomtagHandler); |
|
109 | + $objectTable->addColumn(new SmartObjectColumn('name', 'left', 150, 'getCustomtagName')); |
|
110 | + $objectTable->addColumn(new SmartObjectColumn('description', 'left')); |
|
111 | + $objectTable->addColumn(new SmartObjectColumn('language', 'center', 150)); |
|
112 | 112 | |
113 | - // $objectTable->addCustomAction('getCreateItemLink'); |
|
114 | - // $objectTable->addCustomAction('getCreateAttributLink'); |
|
113 | + // $objectTable->addCustomAction('getCreateItemLink'); |
|
114 | + // $objectTable->addCustomAction('getCreateAttributLink'); |
|
115 | 115 | |
116 | - // $objectTable->addIntroButton('addcustomtag', 'customtag.php?op=mod', _AM_SOBJECT_CUSTOMTAGS_CREATE); //mb button |
|
116 | + // $objectTable->addIntroButton('addcustomtag', 'customtag.php?op=mod', _AM_SOBJECT_CUSTOMTAGS_CREATE); //mb button |
|
117 | 117 | |
118 | - /* |
|
118 | + /* |
|
119 | 119 | $criteria_upcoming = new CriteriaCompo(); |
120 | 120 | $criteria_upcoming->add(new Criteria('start_date', time(), '>')); |
121 | 121 | $objectTable->addFilter(_AM_SOBJECT_FILTER_UPCOMING, array( |
@@ -139,16 +139,16 @@ discard block |
||
139 | 139 | 'criteria' => $criteria_last30days |
140 | 140 | )); |
141 | 141 | */ |
142 | - $objectTable->addQuickSearch(array('title', 'summary', 'description')); |
|
143 | - $objectTable->addCustomAction('getCloneLink'); |
|
142 | + $objectTable->addQuickSearch(array('title', 'summary', 'description')); |
|
143 | + $objectTable->addCustomAction('getCloneLink'); |
|
144 | 144 | |
145 | - $objectTable->render(); |
|
145 | + $objectTable->render(); |
|
146 | 146 | |
147 | - echo '<br>'; |
|
148 | - smart_close_collapsable('createdcustomtags'); |
|
149 | - echo '<br>'; |
|
147 | + echo '<br>'; |
|
148 | + smart_close_collapsable('createdcustomtags'); |
|
149 | + echo '<br>'; |
|
150 | 150 | |
151 | - break; |
|
151 | + break; |
|
152 | 152 | } |
153 | 153 | |
154 | 154 | //smart_modFooter(); |
@@ -40,11 +40,11 @@ discard block |
||
40 | 40 | } |
41 | 41 | } |
42 | 42 | |
43 | -require_once __DIR__ . '/admin_header.php'; |
|
43 | +require_once __DIR__.'/admin_header.php'; |
|
44 | 44 | smart_loadLanguageFile('smartobject', 'customtag'); |
45 | 45 | |
46 | -require_once SMARTOBJECT_ROOT_PATH . 'class/smartobjecttable.php'; |
|
47 | -require_once SMARTOBJECT_ROOT_PATH . 'class/customtag.php'; |
|
46 | +require_once SMARTOBJECT_ROOT_PATH.'class/smartobjecttable.php'; |
|
47 | +require_once SMARTOBJECT_ROOT_PATH.'class/customtag.php'; |
|
48 | 48 | $smartobjectCustomtagHandler = xoops_getModuleHandler('customtag'); |
49 | 49 | |
50 | 50 | $adminObject = \Xmf\Module\Admin::getInstance(); |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | switch ($op) { |
62 | 62 | case 'mod': |
63 | 63 | |
64 | - $customtagid = isset($_GET['customtagid']) ? (int)$_GET['customtagid'] : 0; |
|
64 | + $customtagid = isset($_GET['customtagid']) ? (int) $_GET['customtagid'] : 0; |
|
65 | 65 | |
66 | 66 | smart_xoops_cp_header(); |
67 | 67 | $adminObject->displayNavigation(basename(__FILE__)); |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | |
72 | 72 | case 'clone': |
73 | 73 | |
74 | - $customtagid = isset($_GET['customtagid']) ? (int)$_GET['customtagid'] : 0; |
|
74 | + $customtagid = isset($_GET['customtagid']) ? (int) $_GET['customtagid'] : 0; |
|
75 | 75 | |
76 | 76 | smart_xoops_cp_header(); |
77 | 77 | $adminObject->displayNavigation(basename(__FILE__)); |
@@ -80,14 +80,14 @@ discard block |
||
80 | 80 | break; |
81 | 81 | |
82 | 82 | case 'addcustomtag': |
83 | - require_once XOOPS_ROOT_PATH . '/modules/smartobject/class/smartobjectcontroller.php'; |
|
83 | + require_once XOOPS_ROOT_PATH.'/modules/smartobject/class/smartobjectcontroller.php'; |
|
84 | 84 | $controller = new SmartObjectController($smartobjectCustomtagHandler); |
85 | 85 | $controller->storeFromDefaultForm(_AM_SOBJECT_CUSTOMTAGS_CREATED, _AM_SOBJECT_CUSTOMTAGS_MODIFIED); |
86 | 86 | break; |
87 | 87 | |
88 | 88 | case 'del': |
89 | 89 | |
90 | - require_once XOOPS_ROOT_PATH . '/modules/smartobject/class/smartobjectcontroller.php'; |
|
90 | + require_once XOOPS_ROOT_PATH.'/modules/smartobject/class/smartobjectcontroller.php'; |
|
91 | 91 | $controller = new SmartObjectController($smartobjectCustomtagHandler); |
92 | 92 | $controller->handleObjectDeletion(); |
93 | 93 | |
@@ -104,7 +104,7 @@ discard block |
||
104 | 104 | |
105 | 105 | smart_collapsableBar('createdcustomtags', _AM_SOBJECT_CUSTOMTAGS, _AM_SOBJECT_CUSTOMTAGS_DSC); |
106 | 106 | |
107 | - require_once SMARTOBJECT_ROOT_PATH . 'class/smartobjecttable.php'; |
|
107 | + require_once SMARTOBJECT_ROOT_PATH.'class/smartobjecttable.php'; |
|
108 | 108 | $objectTable = new SmartObjectTable($smartobjectCustomtagHandler); |
109 | 109 | $objectTable->addColumn(new SmartObjectColumn('name', 'left', 150, 'getCustomtagName')); |
110 | 110 | $objectTable->addColumn(new SmartObjectColumn('description', 'left')); |
@@ -153,4 +153,4 @@ discard block |
||
153 | 153 | |
154 | 154 | //smart_modFooter(); |
155 | 155 | //xoops_cp_footer(); |
156 | -require_once __DIR__ . '/admin_footer.php'; |
|
156 | +require_once __DIR__.'/admin_footer.php'; |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | |
28 | 28 | if (false !== ($moduleHelper = Xmf\Module\Helper::getHelper($moduleDirName))) { |
29 | 29 | } else { |
30 | - $moduleHelper = Xmf\Module\Helper::getHelper('system'); |
|
30 | + $moduleHelper = Xmf\Module\Helper::getHelper('system'); |
|
31 | 31 | } |
32 | 32 | $adminObject = \Xmf\Module\Admin::getInstance(); |
33 | 33 | |
@@ -43,6 +43,6 @@ discard block |
||
43 | 43 | $myts = MyTextSanitizer::getInstance(); |
44 | 44 | |
45 | 45 | if (!isset($GLOBALS['xoopsTpl']) || !($GLOBALS['xoopsTpl'] instanceof XoopsTpl)) { |
46 | - require_once $GLOBALS['xoops']->path('class/template.php'); |
|
47 | - $xoopsTpl = new XoopsTpl(); |
|
46 | + require_once $GLOBALS['xoops']->path('class/template.php'); |
|
47 | + $xoopsTpl = new XoopsTpl(); |
|
48 | 48 | } |
@@ -17,11 +17,11 @@ |
||
17 | 17 | * @author XOOPS Development Team |
18 | 18 | */ |
19 | 19 | |
20 | -require_once __DIR__ . '/../../../include/cp_header.php'; |
|
20 | +require_once __DIR__.'/../../../include/cp_header.php'; |
|
21 | 21 | //require_once $GLOBALS['xoops']->path('www/class/xoopsformloader.php'); |
22 | 22 | |
23 | -require_once __DIR__ . '/../class/utility.php'; |
|
24 | -require_once __DIR__ . '/../include/common.php'; |
|
23 | +require_once __DIR__.'/../class/utility.php'; |
|
24 | +require_once __DIR__.'/../include/common.php'; |
|
25 | 25 | |
26 | 26 | $moduleDirName = basename(dirname(__DIR__)); |
27 | 27 |
@@ -11,44 +11,44 @@ discard block |
||
11 | 11 | |
12 | 12 | function editclass($showmenu = false, $ratingid = 0) |
13 | 13 | { |
14 | - global $smartobjectRatingHandler; |
|
15 | - |
|
16 | - $ratingObj = $smartobjectRatingHandler->get($ratingid); |
|
17 | - |
|
18 | - if (!$ratingObj->isNew()) { |
|
19 | - if ($showmenu) { |
|
20 | - //smart_adminMenu(4, _AM_SOBJECT_RATINGS . " > " . _AM_SOBJECT_EDITING); |
|
21 | - } |
|
22 | - smart_collapsableBar('ratingedit', _AM_SOBJECT_RATINGS_EDIT, _AM_SOBJECT_RATINGS_EDIT_INFO); |
|
23 | - |
|
24 | - $sform = $ratingObj->getForm(_AM_SOBJECT_RATINGS_EDIT, 'addrating'); |
|
25 | - $sform->display(); |
|
26 | - smart_close_collapsable('ratingedit'); |
|
27 | - } else { |
|
28 | - $ratingObj->hideFieldFromForm(array('item', 'itemid', 'uid', 'date', 'rate')); |
|
29 | - |
|
30 | - if (isset($_POST['op'])) { |
|
31 | - $controller = new SmartObjectController($smartobjectRatingHandler); |
|
32 | - $controller->postDataToObject($ratingObj); |
|
33 | - |
|
34 | - if ($_POST['op'] === 'changedField') { |
|
35 | - switch ($_POST['changedField']) { |
|
36 | - case 'dirname': |
|
37 | - $ratingObj->showFieldOnForm(array('item', 'itemid', 'uid', 'date', 'rate')); |
|
38 | - break; |
|
39 | - } |
|
40 | - } |
|
41 | - } |
|
42 | - |
|
43 | - if ($showmenu) { |
|
44 | - //smart_adminMenu(4, _AM_SOBJECT_RATINGS . " > " . _CO_SOBJECT_CREATINGNEW); |
|
45 | - } |
|
46 | - |
|
47 | - smart_collapsableBar('ratingcreate', _AM_SOBJECT_RATINGS_CREATE, _AM_SOBJECT_RATINGS_CREATE_INFO); |
|
48 | - $sform = $ratingObj->getForm(_AM_SOBJECT_RATINGS_CREATE, 'addrating'); |
|
49 | - $sform->display(); |
|
50 | - smart_close_collapsable('ratingcreate'); |
|
51 | - } |
|
14 | + global $smartobjectRatingHandler; |
|
15 | + |
|
16 | + $ratingObj = $smartobjectRatingHandler->get($ratingid); |
|
17 | + |
|
18 | + if (!$ratingObj->isNew()) { |
|
19 | + if ($showmenu) { |
|
20 | + //smart_adminMenu(4, _AM_SOBJECT_RATINGS . " > " . _AM_SOBJECT_EDITING); |
|
21 | + } |
|
22 | + smart_collapsableBar('ratingedit', _AM_SOBJECT_RATINGS_EDIT, _AM_SOBJECT_RATINGS_EDIT_INFO); |
|
23 | + |
|
24 | + $sform = $ratingObj->getForm(_AM_SOBJECT_RATINGS_EDIT, 'addrating'); |
|
25 | + $sform->display(); |
|
26 | + smart_close_collapsable('ratingedit'); |
|
27 | + } else { |
|
28 | + $ratingObj->hideFieldFromForm(array('item', 'itemid', 'uid', 'date', 'rate')); |
|
29 | + |
|
30 | + if (isset($_POST['op'])) { |
|
31 | + $controller = new SmartObjectController($smartobjectRatingHandler); |
|
32 | + $controller->postDataToObject($ratingObj); |
|
33 | + |
|
34 | + if ($_POST['op'] === 'changedField') { |
|
35 | + switch ($_POST['changedField']) { |
|
36 | + case 'dirname': |
|
37 | + $ratingObj->showFieldOnForm(array('item', 'itemid', 'uid', 'date', 'rate')); |
|
38 | + break; |
|
39 | + } |
|
40 | + } |
|
41 | + } |
|
42 | + |
|
43 | + if ($showmenu) { |
|
44 | + //smart_adminMenu(4, _AM_SOBJECT_RATINGS . " > " . _CO_SOBJECT_CREATINGNEW); |
|
45 | + } |
|
46 | + |
|
47 | + smart_collapsableBar('ratingcreate', _AM_SOBJECT_RATINGS_CREATE, _AM_SOBJECT_RATINGS_CREATE_INFO); |
|
48 | + $sform = $ratingObj->getForm(_AM_SOBJECT_RATINGS_CREATE, 'addrating'); |
|
49 | + $sform->display(); |
|
50 | + smart_close_collapsable('ratingcreate'); |
|
51 | + } |
|
52 | 52 | } |
53 | 53 | |
54 | 54 | require_once __DIR__ . '/admin_header.php'; |
@@ -60,60 +60,60 @@ discard block |
||
60 | 60 | $op = ''; |
61 | 61 | |
62 | 62 | if (isset($_GET['op'])) { |
63 | - $op = $_GET['op']; |
|
63 | + $op = $_GET['op']; |
|
64 | 64 | } |
65 | 65 | if (isset($_POST['op'])) { |
66 | - $op = $_POST['op']; |
|
66 | + $op = $_POST['op']; |
|
67 | 67 | } |
68 | 68 | |
69 | 69 | switch ($op) { |
70 | - case 'mod': |
|
71 | - case 'changedField': |
|
70 | + case 'mod': |
|
71 | + case 'changedField': |
|
72 | 72 | |
73 | - $ratingid = isset($_GET['ratingid']) ? (int)$_GET['ratingid'] : 0; |
|
73 | + $ratingid = isset($_GET['ratingid']) ? (int)$_GET['ratingid'] : 0; |
|
74 | 74 | |
75 | - smart_xoops_cp_header(); |
|
76 | - $adminObject->displayNavigation(basename(__FILE__)); |
|
75 | + smart_xoops_cp_header(); |
|
76 | + $adminObject->displayNavigation(basename(__FILE__)); |
|
77 | 77 | |
78 | - editclass(true, $ratingid); |
|
79 | - break; |
|
78 | + editclass(true, $ratingid); |
|
79 | + break; |
|
80 | 80 | |
81 | - case 'addrating': |
|
82 | - require_once XOOPS_ROOT_PATH . '/modules/smartobject/class/smartobjectcontroller.php'; |
|
83 | - $controller = new SmartObjectController($smartobjectRatingHandler); |
|
84 | - $controller->storeFromDefaultForm(_AM_SOBJECT_RATINGS_CREATED, _AM_SOBJECT_RATINGS_MODIFIED, SMARTOBJECT_URL . 'admin/rating.php'); |
|
81 | + case 'addrating': |
|
82 | + require_once XOOPS_ROOT_PATH . '/modules/smartobject/class/smartobjectcontroller.php'; |
|
83 | + $controller = new SmartObjectController($smartobjectRatingHandler); |
|
84 | + $controller->storeFromDefaultForm(_AM_SOBJECT_RATINGS_CREATED, _AM_SOBJECT_RATINGS_MODIFIED, SMARTOBJECT_URL . 'admin/rating.php'); |
|
85 | 85 | |
86 | - break; |
|
86 | + break; |
|
87 | 87 | |
88 | - case 'del': |
|
89 | - require_once XOOPS_ROOT_PATH . '/modules/smartobject/class/smartobjectcontroller.php'; |
|
90 | - $controller = new SmartObjectController($smartobjectRatingHandler); |
|
91 | - $controller->handleObjectDeletion(); |
|
88 | + case 'del': |
|
89 | + require_once XOOPS_ROOT_PATH . '/modules/smartobject/class/smartobjectcontroller.php'; |
|
90 | + $controller = new SmartObjectController($smartobjectRatingHandler); |
|
91 | + $controller->handleObjectDeletion(); |
|
92 | 92 | |
93 | - break; |
|
93 | + break; |
|
94 | 94 | |
95 | - default: |
|
95 | + default: |
|
96 | 96 | |
97 | - smart_xoops_cp_header(); |
|
98 | - $adminObject->displayNavigation(basename(__FILE__)); |
|
97 | + smart_xoops_cp_header(); |
|
98 | + $adminObject->displayNavigation(basename(__FILE__)); |
|
99 | 99 | |
100 | - //smart_adminMenu(4, _AM_SOBJECT_RATINGS); |
|
100 | + //smart_adminMenu(4, _AM_SOBJECT_RATINGS); |
|
101 | 101 | |
102 | - smart_collapsableBar('createdratings', _AM_SOBJECT_RATINGS, _AM_SOBJECT_RATINGS_DSC); |
|
102 | + smart_collapsableBar('createdratings', _AM_SOBJECT_RATINGS, _AM_SOBJECT_RATINGS_DSC); |
|
103 | 103 | |
104 | - require_once SMARTOBJECT_ROOT_PATH . 'class/smartobjecttable.php'; |
|
105 | - $objectTable = new SmartObjectTable($smartobjectRatingHandler); |
|
106 | - $objectTable->addColumn(new SmartObjectColumn('name', 'left')); |
|
107 | - $objectTable->addColumn(new SmartObjectColumn('dirname', 'left')); |
|
108 | - $objectTable->addColumn(new SmartObjectColumn('item', 'left', false, 'getItemValue')); |
|
109 | - $objectTable->addColumn(new SmartObjectColumn('date', 'center', 150)); |
|
110 | - $objectTable->addColumn(new SmartObjectColumn('rate', 'center', 40, 'getRateValue')); |
|
104 | + require_once SMARTOBJECT_ROOT_PATH . 'class/smartobjecttable.php'; |
|
105 | + $objectTable = new SmartObjectTable($smartobjectRatingHandler); |
|
106 | + $objectTable->addColumn(new SmartObjectColumn('name', 'left')); |
|
107 | + $objectTable->addColumn(new SmartObjectColumn('dirname', 'left')); |
|
108 | + $objectTable->addColumn(new SmartObjectColumn('item', 'left', false, 'getItemValue')); |
|
109 | + $objectTable->addColumn(new SmartObjectColumn('date', 'center', 150)); |
|
110 | + $objectTable->addColumn(new SmartObjectColumn('rate', 'center', 40, 'getRateValue')); |
|
111 | 111 | |
112 | - // $objectTable->addCustomAction('getCreateItemLink'); |
|
113 | - // $objectTable->addCustomAction('getCreateAttributLink'); |
|
112 | + // $objectTable->addCustomAction('getCreateItemLink'); |
|
113 | + // $objectTable->addCustomAction('getCreateAttributLink'); |
|
114 | 114 | |
115 | - $objectTable->addIntroButton('addrating', 'rating.php?op=mod', _AM_SOBJECT_RATINGS_CREATE); |
|
116 | - /* |
|
115 | + $objectTable->addIntroButton('addrating', 'rating.php?op=mod', _AM_SOBJECT_RATINGS_CREATE); |
|
116 | + /* |
|
117 | 117 | $criteria_upcoming = new CriteriaCompo(); |
118 | 118 | $criteria_upcoming->add(new Criteria('start_date', time(), '>')); |
119 | 119 | $objectTable->addFilter(_AM_SOBJECT_FILTER_UPCOMING, array( |
@@ -138,13 +138,13 @@ discard block |
||
138 | 138 | )); |
139 | 139 | */ |
140 | 140 | |
141 | - $objectTable->render(); |
|
141 | + $objectTable->render(); |
|
142 | 142 | |
143 | - echo '<br>'; |
|
144 | - smart_close_collapsable('createdratings'); |
|
145 | - echo '<br>'; |
|
143 | + echo '<br>'; |
|
144 | + smart_close_collapsable('createdratings'); |
|
145 | + echo '<br>'; |
|
146 | 146 | |
147 | - break; |
|
147 | + break; |
|
148 | 148 | } |
149 | 149 | |
150 | 150 | //smart_modFooter(); |
@@ -67,53 +67,53 @@ discard block |
||
67 | 67 | } |
68 | 68 | |
69 | 69 | switch ($op) { |
70 | - case 'mod': |
|
71 | - case 'changedField': |
|
70 | + case 'mod': |
|
71 | + case 'changedField': |
|
72 | 72 | |
73 | - $ratingid = isset($_GET['ratingid']) ? (int)$_GET['ratingid'] : 0; |
|
73 | + $ratingid = isset($_GET['ratingid']) ? (int)$_GET['ratingid'] : 0; |
|
74 | 74 | |
75 | - smart_xoops_cp_header(); |
|
76 | - $adminObject->displayNavigation(basename(__FILE__)); |
|
75 | + smart_xoops_cp_header(); |
|
76 | + $adminObject->displayNavigation(basename(__FILE__)); |
|
77 | 77 | |
78 | - editclass(true, $ratingid); |
|
79 | - break; |
|
78 | + editclass(true, $ratingid); |
|
79 | + break; |
|
80 | 80 | |
81 | - case 'addrating': |
|
82 | - require_once XOOPS_ROOT_PATH . '/modules/smartobject/class/smartobjectcontroller.php'; |
|
83 | - $controller = new SmartObjectController($smartobjectRatingHandler); |
|
84 | - $controller->storeFromDefaultForm(_AM_SOBJECT_RATINGS_CREATED, _AM_SOBJECT_RATINGS_MODIFIED, SMARTOBJECT_URL . 'admin/rating.php'); |
|
81 | + case 'addrating': |
|
82 | + require_once XOOPS_ROOT_PATH . '/modules/smartobject/class/smartobjectcontroller.php'; |
|
83 | + $controller = new SmartObjectController($smartobjectRatingHandler); |
|
84 | + $controller->storeFromDefaultForm(_AM_SOBJECT_RATINGS_CREATED, _AM_SOBJECT_RATINGS_MODIFIED, SMARTOBJECT_URL . 'admin/rating.php'); |
|
85 | 85 | |
86 | - break; |
|
86 | + break; |
|
87 | 87 | |
88 | - case 'del': |
|
89 | - require_once XOOPS_ROOT_PATH . '/modules/smartobject/class/smartobjectcontroller.php'; |
|
90 | - $controller = new SmartObjectController($smartobjectRatingHandler); |
|
91 | - $controller->handleObjectDeletion(); |
|
88 | + case 'del': |
|
89 | + require_once XOOPS_ROOT_PATH . '/modules/smartobject/class/smartobjectcontroller.php'; |
|
90 | + $controller = new SmartObjectController($smartobjectRatingHandler); |
|
91 | + $controller->handleObjectDeletion(); |
|
92 | 92 | |
93 | - break; |
|
93 | + break; |
|
94 | 94 | |
95 | - default: |
|
95 | + default: |
|
96 | 96 | |
97 | - smart_xoops_cp_header(); |
|
98 | - $adminObject->displayNavigation(basename(__FILE__)); |
|
97 | + smart_xoops_cp_header(); |
|
98 | + $adminObject->displayNavigation(basename(__FILE__)); |
|
99 | 99 | |
100 | - //smart_adminMenu(4, _AM_SOBJECT_RATINGS); |
|
100 | + //smart_adminMenu(4, _AM_SOBJECT_RATINGS); |
|
101 | 101 | |
102 | - smart_collapsableBar('createdratings', _AM_SOBJECT_RATINGS, _AM_SOBJECT_RATINGS_DSC); |
|
102 | + smart_collapsableBar('createdratings', _AM_SOBJECT_RATINGS, _AM_SOBJECT_RATINGS_DSC); |
|
103 | 103 | |
104 | - require_once SMARTOBJECT_ROOT_PATH . 'class/smartobjecttable.php'; |
|
105 | - $objectTable = new SmartObjectTable($smartobjectRatingHandler); |
|
106 | - $objectTable->addColumn(new SmartObjectColumn('name', 'left')); |
|
107 | - $objectTable->addColumn(new SmartObjectColumn('dirname', 'left')); |
|
108 | - $objectTable->addColumn(new SmartObjectColumn('item', 'left', false, 'getItemValue')); |
|
109 | - $objectTable->addColumn(new SmartObjectColumn('date', 'center', 150)); |
|
110 | - $objectTable->addColumn(new SmartObjectColumn('rate', 'center', 40, 'getRateValue')); |
|
104 | + require_once SMARTOBJECT_ROOT_PATH . 'class/smartobjecttable.php'; |
|
105 | + $objectTable = new SmartObjectTable($smartobjectRatingHandler); |
|
106 | + $objectTable->addColumn(new SmartObjectColumn('name', 'left')); |
|
107 | + $objectTable->addColumn(new SmartObjectColumn('dirname', 'left')); |
|
108 | + $objectTable->addColumn(new SmartObjectColumn('item', 'left', false, 'getItemValue')); |
|
109 | + $objectTable->addColumn(new SmartObjectColumn('date', 'center', 150)); |
|
110 | + $objectTable->addColumn(new SmartObjectColumn('rate', 'center', 40, 'getRateValue')); |
|
111 | 111 | |
112 | - // $objectTable->addCustomAction('getCreateItemLink'); |
|
113 | - // $objectTable->addCustomAction('getCreateAttributLink'); |
|
112 | + // $objectTable->addCustomAction('getCreateItemLink'); |
|
113 | + // $objectTable->addCustomAction('getCreateAttributLink'); |
|
114 | 114 | |
115 | - $objectTable->addIntroButton('addrating', 'rating.php?op=mod', _AM_SOBJECT_RATINGS_CREATE); |
|
116 | - /* |
|
115 | + $objectTable->addIntroButton('addrating', 'rating.php?op=mod', _AM_SOBJECT_RATINGS_CREATE); |
|
116 | + /* |
|
117 | 117 | $criteria_upcoming = new CriteriaCompo(); |
118 | 118 | $criteria_upcoming->add(new Criteria('start_date', time(), '>')); |
119 | 119 | $objectTable->addFilter(_AM_SOBJECT_FILTER_UPCOMING, array( |
@@ -138,13 +138,13 @@ discard block |
||
138 | 138 | )); |
139 | 139 | */ |
140 | 140 | |
141 | - $objectTable->render(); |
|
141 | + $objectTable->render(); |
|
142 | 142 | |
143 | - echo '<br>'; |
|
144 | - smart_close_collapsable('createdratings'); |
|
145 | - echo '<br>'; |
|
143 | + echo '<br>'; |
|
144 | + smart_close_collapsable('createdratings'); |
|
145 | + echo '<br>'; |
|
146 | 146 | |
147 | - break; |
|
147 | + break; |
|
148 | 148 | } |
149 | 149 | |
150 | 150 | //smart_modFooter(); |
@@ -51,9 +51,9 @@ discard block |
||
51 | 51 | } |
52 | 52 | } |
53 | 53 | |
54 | -require_once __DIR__ . '/admin_header.php'; |
|
55 | -require_once SMARTOBJECT_ROOT_PATH . 'class/smartobjecttable.php'; |
|
56 | -require_once SMARTOBJECT_ROOT_PATH . 'class/rating.php'; |
|
54 | +require_once __DIR__.'/admin_header.php'; |
|
55 | +require_once SMARTOBJECT_ROOT_PATH.'class/smartobjecttable.php'; |
|
56 | +require_once SMARTOBJECT_ROOT_PATH.'class/rating.php'; |
|
57 | 57 | $smartobjectRatingHandler = xoops_getModuleHandler('rating'); |
58 | 58 | $indexAdmin = \Xmf\Module\Admin::getInstance(); |
59 | 59 | |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | case 'mod': |
71 | 71 | case 'changedField': |
72 | 72 | |
73 | - $ratingid = isset($_GET['ratingid']) ? (int)$_GET['ratingid'] : 0; |
|
73 | + $ratingid = isset($_GET['ratingid']) ? (int) $_GET['ratingid'] : 0; |
|
74 | 74 | |
75 | 75 | smart_xoops_cp_header(); |
76 | 76 | $adminObject->displayNavigation(basename(__FILE__)); |
@@ -79,14 +79,14 @@ discard block |
||
79 | 79 | break; |
80 | 80 | |
81 | 81 | case 'addrating': |
82 | - require_once XOOPS_ROOT_PATH . '/modules/smartobject/class/smartobjectcontroller.php'; |
|
82 | + require_once XOOPS_ROOT_PATH.'/modules/smartobject/class/smartobjectcontroller.php'; |
|
83 | 83 | $controller = new SmartObjectController($smartobjectRatingHandler); |
84 | - $controller->storeFromDefaultForm(_AM_SOBJECT_RATINGS_CREATED, _AM_SOBJECT_RATINGS_MODIFIED, SMARTOBJECT_URL . 'admin/rating.php'); |
|
84 | + $controller->storeFromDefaultForm(_AM_SOBJECT_RATINGS_CREATED, _AM_SOBJECT_RATINGS_MODIFIED, SMARTOBJECT_URL.'admin/rating.php'); |
|
85 | 85 | |
86 | 86 | break; |
87 | 87 | |
88 | 88 | case 'del': |
89 | - require_once XOOPS_ROOT_PATH . '/modules/smartobject/class/smartobjectcontroller.php'; |
|
89 | + require_once XOOPS_ROOT_PATH.'/modules/smartobject/class/smartobjectcontroller.php'; |
|
90 | 90 | $controller = new SmartObjectController($smartobjectRatingHandler); |
91 | 91 | $controller->handleObjectDeletion(); |
92 | 92 | |
@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | |
102 | 102 | smart_collapsableBar('createdratings', _AM_SOBJECT_RATINGS, _AM_SOBJECT_RATINGS_DSC); |
103 | 103 | |
104 | - require_once SMARTOBJECT_ROOT_PATH . 'class/smartobjecttable.php'; |
|
104 | + require_once SMARTOBJECT_ROOT_PATH.'class/smartobjecttable.php'; |
|
105 | 105 | $objectTable = new SmartObjectTable($smartobjectRatingHandler); |
106 | 106 | $objectTable->addColumn(new SmartObjectColumn('name', 'left')); |
107 | 107 | $objectTable->addColumn(new SmartObjectColumn('dirname', 'left')); |
@@ -149,4 +149,4 @@ discard block |
||
149 | 149 | |
150 | 150 | //smart_modFooter(); |
151 | 151 | //xoops_cp_footer(); |
152 | -require_once __DIR__ . '/admin_footer.php'; |
|
152 | +require_once __DIR__.'/admin_footer.php'; |
@@ -21,81 +21,81 @@ |
||
21 | 21 | $op = ''; |
22 | 22 | |
23 | 23 | if (isset($_GET['op'])) { |
24 | - $op = $_GET['op']; |
|
24 | + $op = $_GET['op']; |
|
25 | 25 | } |
26 | 26 | if (isset($_POST['op'])) { |
27 | - $op = $_POST['op']; |
|
27 | + $op = $_POST['op']; |
|
28 | 28 | } |
29 | 29 | |
30 | 30 | switch ($op) { |
31 | 31 | |
32 | - case 'del': |
|
33 | - require_once XOOPS_ROOT_PATH . '/modules/smartobject/class/smartobjectcontroller.php'; |
|
34 | - $controller = new SmartObjectController($smartobjectLinkHandler); |
|
35 | - $controller->handleObjectDeletion(_AM_SOBJECT_SENT_LINK_DELETE_CONFIRM); |
|
32 | + case 'del': |
|
33 | + require_once XOOPS_ROOT_PATH . '/modules/smartobject/class/smartobjectcontroller.php'; |
|
34 | + $controller = new SmartObjectController($smartobjectLinkHandler); |
|
35 | + $controller->handleObjectDeletion(_AM_SOBJECT_SENT_LINK_DELETE_CONFIRM); |
|
36 | 36 | |
37 | - break; |
|
37 | + break; |
|
38 | 38 | |
39 | - case 'view': |
|
40 | - $linkid = isset($_GET['linkid']) ? $_GET['linkid'] : 0; |
|
41 | - $linkObj = $smartobjectLinkHandler->get($linkid); |
|
39 | + case 'view': |
|
40 | + $linkid = isset($_GET['linkid']) ? $_GET['linkid'] : 0; |
|
41 | + $linkObj = $smartobjectLinkHandler->get($linkid); |
|
42 | 42 | |
43 | - if ($linkObj->isNew()) { |
|
44 | - redirect_header(SMARTOBJECT_URL . 'admin/link.php', 3, _AM_SOBJECT_LINK_NOT_FOUND); |
|
45 | - } |
|
43 | + if ($linkObj->isNew()) { |
|
44 | + redirect_header(SMARTOBJECT_URL . 'admin/link.php', 3, _AM_SOBJECT_LINK_NOT_FOUND); |
|
45 | + } |
|
46 | 46 | |
47 | - smart_xoops_cp_header(); |
|
47 | + smart_xoops_cp_header(); |
|
48 | 48 | |
49 | - //smart_adminMenu(1, _AM_SOBJECT_SENT_LINK_DISPLAY); |
|
49 | + //smart_adminMenu(1, _AM_SOBJECT_SENT_LINK_DISPLAY); |
|
50 | 50 | |
51 | - smart_collapsableBar('sentlinks', _AM_SOBJECT_SENT_LINK_DISPLAY, _AM_SOBJECT_SENT_LINK_DISPLAY_INFO); |
|
51 | + smart_collapsableBar('sentlinks', _AM_SOBJECT_SENT_LINK_DISPLAY, _AM_SOBJECT_SENT_LINK_DISPLAY_INFO); |
|
52 | 52 | |
53 | - require_once XOOPS_ROOT_PATH . '/class/template.php'; |
|
53 | + require_once XOOPS_ROOT_PATH . '/class/template.php'; |
|
54 | 54 | |
55 | - // --- |
|
56 | - // 2012-01-01 PHP 5.3: Assigning the return value of new by reference is now deprecated. |
|
57 | - // $xoopsTpl = new XoopsTpl(); |
|
58 | - $xoopsTpl = new XoopsTpl(); |
|
59 | - //--- |
|
55 | + // --- |
|
56 | + // 2012-01-01 PHP 5.3: Assigning the return value of new by reference is now deprecated. |
|
57 | + // $xoopsTpl = new XoopsTpl(); |
|
58 | + $xoopsTpl = new XoopsTpl(); |
|
59 | + //--- |
|
60 | 60 | |
61 | - $xoopsTpl->assign('link', $linkObj->toArray()); |
|
62 | - $xoopsTpl->display('db:smartobject_sentlink_display.tpl'); |
|
61 | + $xoopsTpl->assign('link', $linkObj->toArray()); |
|
62 | + $xoopsTpl->display('db:smartobject_sentlink_display.tpl'); |
|
63 | 63 | |
64 | - echo '<br>'; |
|
65 | - smart_close_collapsable('sentlinks'); |
|
66 | - echo '<br>'; |
|
64 | + echo '<br>'; |
|
65 | + smart_close_collapsable('sentlinks'); |
|
66 | + echo '<br>'; |
|
67 | 67 | |
68 | - break; |
|
68 | + break; |
|
69 | 69 | |
70 | - default: |
|
70 | + default: |
|
71 | 71 | |
72 | - smart_xoops_cp_header(); |
|
72 | + smart_xoops_cp_header(); |
|
73 | 73 | |
74 | - $adminObject->displayNavigation(basename(__FILE__)); |
|
74 | + $adminObject->displayNavigation(basename(__FILE__)); |
|
75 | 75 | |
76 | - //smart_adminMenu(1, _AM_SOBJECT_SENT_LINKS); |
|
76 | + //smart_adminMenu(1, _AM_SOBJECT_SENT_LINKS); |
|
77 | 77 | |
78 | - smart_collapsableBar('sentlinks', _AM_SOBJECT_SENT_LINKS, _AM_SOBJECT_SENT_LINKS_INFO); |
|
78 | + smart_collapsableBar('sentlinks', _AM_SOBJECT_SENT_LINKS, _AM_SOBJECT_SENT_LINKS_INFO); |
|
79 | 79 | |
80 | - require_once SMARTOBJECT_ROOT_PATH . 'class/smartobjecttable.php'; |
|
81 | - $objectTable = new SmartObjectTable($smartobjectLinkHandler, null, array('delete')); |
|
82 | - $objectTable->addColumn(new SmartObjectColumn('date')); |
|
83 | - $objectTable->addColumn(new SmartObjectColumn(_AM_SOBJECT_SENT_LINKS_FROM, $align = 'left', $width = false, 'getFromInfo')); |
|
84 | - $objectTable->addColumn(new SmartObjectColumn(_AM_SOBJECT_SENT_LINKS_TO, $align = 'left', $width = false, 'getToInfo')); |
|
85 | - $objectTable->addColumn(new SmartObjectColumn('link')); |
|
80 | + require_once SMARTOBJECT_ROOT_PATH . 'class/smartobjecttable.php'; |
|
81 | + $objectTable = new SmartObjectTable($smartobjectLinkHandler, null, array('delete')); |
|
82 | + $objectTable->addColumn(new SmartObjectColumn('date')); |
|
83 | + $objectTable->addColumn(new SmartObjectColumn(_AM_SOBJECT_SENT_LINKS_FROM, $align = 'left', $width = false, 'getFromInfo')); |
|
84 | + $objectTable->addColumn(new SmartObjectColumn(_AM_SOBJECT_SENT_LINKS_TO, $align = 'left', $width = false, 'getToInfo')); |
|
85 | + $objectTable->addColumn(new SmartObjectColumn('link')); |
|
86 | 86 | |
87 | - $objectTable->addCustomAction('getViewItemLink'); |
|
87 | + $objectTable->addCustomAction('getViewItemLink'); |
|
88 | 88 | |
89 | - $objectTable->setDefaultSort('date'); |
|
90 | - $objectTable->setDefaultOrder('DESC'); |
|
89 | + $objectTable->setDefaultSort('date'); |
|
90 | + $objectTable->setDefaultOrder('DESC'); |
|
91 | 91 | |
92 | - $objectTable->render(); |
|
92 | + $objectTable->render(); |
|
93 | 93 | |
94 | - echo '<br>'; |
|
95 | - smart_close_collapsable('sentlinks'); |
|
96 | - echo '<br>'; |
|
94 | + echo '<br>'; |
|
95 | + smart_close_collapsable('sentlinks'); |
|
96 | + echo '<br>'; |
|
97 | 97 | |
98 | - break; |
|
98 | + break; |
|
99 | 99 | } |
100 | 100 | |
101 | 101 | //smart_modFooter(); |
@@ -29,73 +29,73 @@ |
||
29 | 29 | |
30 | 30 | switch ($op) { |
31 | 31 | |
32 | - case 'del': |
|
33 | - require_once XOOPS_ROOT_PATH . '/modules/smartobject/class/smartobjectcontroller.php'; |
|
34 | - $controller = new SmartObjectController($smartobjectLinkHandler); |
|
35 | - $controller->handleObjectDeletion(_AM_SOBJECT_SENT_LINK_DELETE_CONFIRM); |
|
32 | + case 'del': |
|
33 | + require_once XOOPS_ROOT_PATH . '/modules/smartobject/class/smartobjectcontroller.php'; |
|
34 | + $controller = new SmartObjectController($smartobjectLinkHandler); |
|
35 | + $controller->handleObjectDeletion(_AM_SOBJECT_SENT_LINK_DELETE_CONFIRM); |
|
36 | 36 | |
37 | - break; |
|
37 | + break; |
|
38 | 38 | |
39 | - case 'view': |
|
40 | - $linkid = isset($_GET['linkid']) ? $_GET['linkid'] : 0; |
|
41 | - $linkObj = $smartobjectLinkHandler->get($linkid); |
|
39 | + case 'view': |
|
40 | + $linkid = isset($_GET['linkid']) ? $_GET['linkid'] : 0; |
|
41 | + $linkObj = $smartobjectLinkHandler->get($linkid); |
|
42 | 42 | |
43 | - if ($linkObj->isNew()) { |
|
44 | - redirect_header(SMARTOBJECT_URL . 'admin/link.php', 3, _AM_SOBJECT_LINK_NOT_FOUND); |
|
45 | - } |
|
43 | + if ($linkObj->isNew()) { |
|
44 | + redirect_header(SMARTOBJECT_URL . 'admin/link.php', 3, _AM_SOBJECT_LINK_NOT_FOUND); |
|
45 | + } |
|
46 | 46 | |
47 | - smart_xoops_cp_header(); |
|
47 | + smart_xoops_cp_header(); |
|
48 | 48 | |
49 | - //smart_adminMenu(1, _AM_SOBJECT_SENT_LINK_DISPLAY); |
|
49 | + //smart_adminMenu(1, _AM_SOBJECT_SENT_LINK_DISPLAY); |
|
50 | 50 | |
51 | - smart_collapsableBar('sentlinks', _AM_SOBJECT_SENT_LINK_DISPLAY, _AM_SOBJECT_SENT_LINK_DISPLAY_INFO); |
|
51 | + smart_collapsableBar('sentlinks', _AM_SOBJECT_SENT_LINK_DISPLAY, _AM_SOBJECT_SENT_LINK_DISPLAY_INFO); |
|
52 | 52 | |
53 | - require_once XOOPS_ROOT_PATH . '/class/template.php'; |
|
53 | + require_once XOOPS_ROOT_PATH . '/class/template.php'; |
|
54 | 54 | |
55 | - // --- |
|
56 | - // 2012-01-01 PHP 5.3: Assigning the return value of new by reference is now deprecated. |
|
57 | - // $xoopsTpl = new XoopsTpl(); |
|
58 | - $xoopsTpl = new XoopsTpl(); |
|
59 | - //--- |
|
55 | + // --- |
|
56 | + // 2012-01-01 PHP 5.3: Assigning the return value of new by reference is now deprecated. |
|
57 | + // $xoopsTpl = new XoopsTpl(); |
|
58 | + $xoopsTpl = new XoopsTpl(); |
|
59 | + //--- |
|
60 | 60 | |
61 | - $xoopsTpl->assign('link', $linkObj->toArray()); |
|
62 | - $xoopsTpl->display('db:smartobject_sentlink_display.tpl'); |
|
61 | + $xoopsTpl->assign('link', $linkObj->toArray()); |
|
62 | + $xoopsTpl->display('db:smartobject_sentlink_display.tpl'); |
|
63 | 63 | |
64 | - echo '<br>'; |
|
65 | - smart_close_collapsable('sentlinks'); |
|
66 | - echo '<br>'; |
|
64 | + echo '<br>'; |
|
65 | + smart_close_collapsable('sentlinks'); |
|
66 | + echo '<br>'; |
|
67 | 67 | |
68 | - break; |
|
68 | + break; |
|
69 | 69 | |
70 | - default: |
|
70 | + default: |
|
71 | 71 | |
72 | - smart_xoops_cp_header(); |
|
72 | + smart_xoops_cp_header(); |
|
73 | 73 | |
74 | - $adminObject->displayNavigation(basename(__FILE__)); |
|
74 | + $adminObject->displayNavigation(basename(__FILE__)); |
|
75 | 75 | |
76 | - //smart_adminMenu(1, _AM_SOBJECT_SENT_LINKS); |
|
76 | + //smart_adminMenu(1, _AM_SOBJECT_SENT_LINKS); |
|
77 | 77 | |
78 | - smart_collapsableBar('sentlinks', _AM_SOBJECT_SENT_LINKS, _AM_SOBJECT_SENT_LINKS_INFO); |
|
78 | + smart_collapsableBar('sentlinks', _AM_SOBJECT_SENT_LINKS, _AM_SOBJECT_SENT_LINKS_INFO); |
|
79 | 79 | |
80 | - require_once SMARTOBJECT_ROOT_PATH . 'class/smartobjecttable.php'; |
|
81 | - $objectTable = new SmartObjectTable($smartobjectLinkHandler, null, array('delete')); |
|
82 | - $objectTable->addColumn(new SmartObjectColumn('date')); |
|
83 | - $objectTable->addColumn(new SmartObjectColumn(_AM_SOBJECT_SENT_LINKS_FROM, $align = 'left', $width = false, 'getFromInfo')); |
|
84 | - $objectTable->addColumn(new SmartObjectColumn(_AM_SOBJECT_SENT_LINKS_TO, $align = 'left', $width = false, 'getToInfo')); |
|
85 | - $objectTable->addColumn(new SmartObjectColumn('link')); |
|
80 | + require_once SMARTOBJECT_ROOT_PATH . 'class/smartobjecttable.php'; |
|
81 | + $objectTable = new SmartObjectTable($smartobjectLinkHandler, null, array('delete')); |
|
82 | + $objectTable->addColumn(new SmartObjectColumn('date')); |
|
83 | + $objectTable->addColumn(new SmartObjectColumn(_AM_SOBJECT_SENT_LINKS_FROM, $align = 'left', $width = false, 'getFromInfo')); |
|
84 | + $objectTable->addColumn(new SmartObjectColumn(_AM_SOBJECT_SENT_LINKS_TO, $align = 'left', $width = false, 'getToInfo')); |
|
85 | + $objectTable->addColumn(new SmartObjectColumn('link')); |
|
86 | 86 | |
87 | - $objectTable->addCustomAction('getViewItemLink'); |
|
87 | + $objectTable->addCustomAction('getViewItemLink'); |
|
88 | 88 | |
89 | - $objectTable->setDefaultSort('date'); |
|
90 | - $objectTable->setDefaultOrder('DESC'); |
|
89 | + $objectTable->setDefaultSort('date'); |
|
90 | + $objectTable->setDefaultOrder('DESC'); |
|
91 | 91 | |
92 | - $objectTable->render(); |
|
92 | + $objectTable->render(); |
|
93 | 93 | |
94 | - echo '<br>'; |
|
95 | - smart_close_collapsable('sentlinks'); |
|
96 | - echo '<br>'; |
|
94 | + echo '<br>'; |
|
95 | + smart_close_collapsable('sentlinks'); |
|
96 | + echo '<br>'; |
|
97 | 97 | |
98 | - break; |
|
98 | + break; |
|
99 | 99 | } |
100 | 100 | |
101 | 101 | //smart_modFooter(); |
@@ -11,9 +11,9 @@ discard block |
||
11 | 11 | * Licence: GNU |
12 | 12 | */ |
13 | 13 | |
14 | -require_once __DIR__ . '/admin_header.php'; |
|
15 | -require_once SMARTOBJECT_ROOT_PATH . 'class/smartobjecttable.php'; |
|
16 | -require_once SMARTOBJECT_ROOT_PATH . 'class/smartobjectlink.php'; |
|
14 | +require_once __DIR__.'/admin_header.php'; |
|
15 | +require_once SMARTOBJECT_ROOT_PATH.'class/smartobjecttable.php'; |
|
16 | +require_once SMARTOBJECT_ROOT_PATH.'class/smartobjectlink.php'; |
|
17 | 17 | $adminObject = \Xmf\Module\Admin::getInstance(); |
18 | 18 | |
19 | 19 | $smartobjectLinkHandler = xoops_getModuleHandler('link'); |
@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | switch ($op) { |
31 | 31 | |
32 | 32 | case 'del': |
33 | - require_once XOOPS_ROOT_PATH . '/modules/smartobject/class/smartobjectcontroller.php'; |
|
33 | + require_once XOOPS_ROOT_PATH.'/modules/smartobject/class/smartobjectcontroller.php'; |
|
34 | 34 | $controller = new SmartObjectController($smartobjectLinkHandler); |
35 | 35 | $controller->handleObjectDeletion(_AM_SOBJECT_SENT_LINK_DELETE_CONFIRM); |
36 | 36 | |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | $linkObj = $smartobjectLinkHandler->get($linkid); |
42 | 42 | |
43 | 43 | if ($linkObj->isNew()) { |
44 | - redirect_header(SMARTOBJECT_URL . 'admin/link.php', 3, _AM_SOBJECT_LINK_NOT_FOUND); |
|
44 | + redirect_header(SMARTOBJECT_URL.'admin/link.php', 3, _AM_SOBJECT_LINK_NOT_FOUND); |
|
45 | 45 | } |
46 | 46 | |
47 | 47 | smart_xoops_cp_header(); |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | |
51 | 51 | smart_collapsableBar('sentlinks', _AM_SOBJECT_SENT_LINK_DISPLAY, _AM_SOBJECT_SENT_LINK_DISPLAY_INFO); |
52 | 52 | |
53 | - require_once XOOPS_ROOT_PATH . '/class/template.php'; |
|
53 | + require_once XOOPS_ROOT_PATH.'/class/template.php'; |
|
54 | 54 | |
55 | 55 | // --- |
56 | 56 | // 2012-01-01 PHP 5.3: Assigning the return value of new by reference is now deprecated. |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | |
78 | 78 | smart_collapsableBar('sentlinks', _AM_SOBJECT_SENT_LINKS, _AM_SOBJECT_SENT_LINKS_INFO); |
79 | 79 | |
80 | - require_once SMARTOBJECT_ROOT_PATH . 'class/smartobjecttable.php'; |
|
80 | + require_once SMARTOBJECT_ROOT_PATH.'class/smartobjecttable.php'; |
|
81 | 81 | $objectTable = new SmartObjectTable($smartobjectLinkHandler, null, array('delete')); |
82 | 82 | $objectTable->addColumn(new SmartObjectColumn('date')); |
83 | 83 | $objectTable->addColumn(new SmartObjectColumn(_AM_SOBJECT_SENT_LINKS_FROM, $align = 'left', $width = false, 'getFromInfo')); |
@@ -100,4 +100,4 @@ discard block |
||
100 | 100 | |
101 | 101 | //smart_modFooter(); |
102 | 102 | //xoops_cp_footer(); |
103 | -require_once __DIR__ . '/admin_footer.php'; |
|
103 | +require_once __DIR__.'/admin_footer.php'; |
@@ -17,11 +17,11 @@ |
||
17 | 17 | * @author XOOPS Development Team |
18 | 18 | */ |
19 | 19 | |
20 | -require_once __DIR__ . '/admin_header.php'; |
|
20 | +require_once __DIR__.'/admin_header.php'; |
|
21 | 21 | xoops_cp_header(); |
22 | 22 | |
23 | 23 | $adminObject->displayNavigation(basename(__FILE__)); |
24 | 24 | $adminObject->setPaypal('[email protected]'); |
25 | 25 | $adminObject->displayAbout(false); |
26 | 26 | |
27 | -require_once __DIR__ . '/admin_footer.php'; |
|
27 | +require_once __DIR__.'/admin_footer.php'; |