@@ -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 | - echo $indexAdmin->addNavigation(basename(__FILE__)); |
|
75 | + smart_xoops_cp_header(); |
|
76 | + echo $indexAdmin->addNavigation(basename(__FILE__)); |
|
77 | 77 | |
78 | - editclass(true, $ratingid); |
|
79 | - break; |
|
78 | + editclass(true, $ratingid); |
|
79 | + break; |
|
80 | 80 | |
81 | - case 'addrating': |
|
82 | - include_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 | + include_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 | - include_once XOOPS_ROOT_PATH . '/modules/smartobject/class/smartobjectcontroller.php'; |
|
90 | - $controller = new SmartObjectController($smartobjectRatingHandler); |
|
91 | - $controller->handleObjectDeletion(); |
|
88 | + case 'del': |
|
89 | + include_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 | - echo $indexAdmin->addNavigation(basename(__FILE__)); |
|
97 | + smart_xoops_cp_header(); |
|
98 | + echo $indexAdmin->addNavigation(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 | - include_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 | + include_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(); |
@@ -57,66 +57,66 @@ discard block |
||
57 | 57 | } |
58 | 58 | |
59 | 59 | switch ($op) { |
60 | - case 'mod': |
|
60 | + case 'mod': |
|
61 | 61 | |
62 | - $adsenseid = isset($_GET['adsenseid']) ? (int)$_GET['adsenseid'] : 0; |
|
62 | + $adsenseid = isset($_GET['adsenseid']) ? (int)$_GET['adsenseid'] : 0; |
|
63 | 63 | |
64 | - smart_xoops_cp_header(); |
|
65 | - echo $indexAdmin->addNavigation(basename(__FILE__)); |
|
64 | + smart_xoops_cp_header(); |
|
65 | + echo $indexAdmin->addNavigation(basename(__FILE__)); |
|
66 | 66 | |
67 | - editclass(true, $adsenseid); |
|
68 | - break; |
|
67 | + editclass(true, $adsenseid); |
|
68 | + break; |
|
69 | 69 | |
70 | - case 'clone': |
|
70 | + case 'clone': |
|
71 | 71 | |
72 | - $adsenseid = isset($_GET['adsenseid']) ? (int)$_GET['adsenseid'] : 0; |
|
72 | + $adsenseid = isset($_GET['adsenseid']) ? (int)$_GET['adsenseid'] : 0; |
|
73 | 73 | |
74 | - smart_xoops_cp_header(); |
|
75 | - echo $indexAdmin->addNavigation(basename(__FILE__)); |
|
74 | + smart_xoops_cp_header(); |
|
75 | + echo $indexAdmin->addNavigation(basename(__FILE__)); |
|
76 | 76 | |
77 | - editclass(true, $adsenseid, true); |
|
78 | - break; |
|
77 | + editclass(true, $adsenseid, true); |
|
78 | + break; |
|
79 | 79 | |
80 | - case 'addadsense': |
|
81 | - if (@include_once SMARTOBJECT_ROOT_PATH . 'include/captcha/captcha.php') { |
|
82 | - $xoopsCaptcha = XoopsCaptcha::instance(); |
|
83 | - if (!$xoopsCaptcha->verify()) { |
|
84 | - redirect_header('javascript:history.go(-1);', 3, $xoopsCaptcha->getMessage()); |
|
85 | - exit; |
|
86 | - } |
|
87 | - } |
|
88 | - include_once XOOPS_ROOT_PATH . '/modules/smartobject/class/smartobjectcontroller.php'; |
|
89 | - $controller = new SmartObjectController($smartobjectAdsenseHandler); |
|
90 | - $controller->storeFromDefaultForm(_AM_SOBJECT_ADSENSES_CREATED, _AM_SOBJECT_ADSENSES_MODIFIED); |
|
91 | - break; |
|
80 | + case 'addadsense': |
|
81 | + if (@include_once SMARTOBJECT_ROOT_PATH . 'include/captcha/captcha.php') { |
|
82 | + $xoopsCaptcha = XoopsCaptcha::instance(); |
|
83 | + if (!$xoopsCaptcha->verify()) { |
|
84 | + redirect_header('javascript:history.go(-1);', 3, $xoopsCaptcha->getMessage()); |
|
85 | + exit; |
|
86 | + } |
|
87 | + } |
|
88 | + include_once XOOPS_ROOT_PATH . '/modules/smartobject/class/smartobjectcontroller.php'; |
|
89 | + $controller = new SmartObjectController($smartobjectAdsenseHandler); |
|
90 | + $controller->storeFromDefaultForm(_AM_SOBJECT_ADSENSES_CREATED, _AM_SOBJECT_ADSENSES_MODIFIED); |
|
91 | + break; |
|
92 | 92 | |
93 | - case 'del': |
|
93 | + case 'del': |
|
94 | 94 | |
95 | - include_once XOOPS_ROOT_PATH . '/modules/smartobject/class/smartobjectcontroller.php'; |
|
96 | - $controller = new SmartObjectController($smartobjectAdsenseHandler); |
|
97 | - $controller->handleObjectDeletion(); |
|
95 | + include_once XOOPS_ROOT_PATH . '/modules/smartobject/class/smartobjectcontroller.php'; |
|
96 | + $controller = new SmartObjectController($smartobjectAdsenseHandler); |
|
97 | + $controller->handleObjectDeletion(); |
|
98 | 98 | |
99 | - break; |
|
99 | + break; |
|
100 | 100 | |
101 | - default: |
|
101 | + default: |
|
102 | 102 | |
103 | - smart_xoops_cp_header(); |
|
104 | - echo $indexAdmin->addNavigation(basename(__FILE__)); |
|
103 | + smart_xoops_cp_header(); |
|
104 | + echo $indexAdmin->addNavigation(basename(__FILE__)); |
|
105 | 105 | |
106 | - //smart_adminMenu(3, _AM_SOBJECT_ADSENSES); |
|
106 | + //smart_adminMenu(3, _AM_SOBJECT_ADSENSES); |
|
107 | 107 | |
108 | - smart_collapsableBar('createdadsenses', _AM_SOBJECT_ADSENSES, _AM_SOBJECT_ADSENSES_DSC); |
|
108 | + smart_collapsableBar('createdadsenses', _AM_SOBJECT_ADSENSES, _AM_SOBJECT_ADSENSES_DSC); |
|
109 | 109 | |
110 | - include_once SMARTOBJECT_ROOT_PATH . 'class/smartobjecttable.php'; |
|
111 | - $objectTable = new SmartObjectTable($smartobjectAdsenseHandler); |
|
112 | - $objectTable->addColumn(new SmartObjectColumn('description', 'left')); |
|
113 | - $objectTable->addColumn(new SmartObjectColumn(_AM_SOBJECT_ADSENSE_TAG, 'center', 200, 'getXoopsCode')); |
|
110 | + include_once SMARTOBJECT_ROOT_PATH . 'class/smartobjecttable.php'; |
|
111 | + $objectTable = new SmartObjectTable($smartobjectAdsenseHandler); |
|
112 | + $objectTable->addColumn(new SmartObjectColumn('description', 'left')); |
|
113 | + $objectTable->addColumn(new SmartObjectColumn(_AM_SOBJECT_ADSENSE_TAG, 'center', 200, 'getXoopsCode')); |
|
114 | 114 | |
115 | - // $objectTable->addCustomAction('getCreateItemLink'); |
|
116 | - // $objectTable->addCustomAction('getCreateAttributLink'); |
|
115 | + // $objectTable->addCustomAction('getCreateItemLink'); |
|
116 | + // $objectTable->addCustomAction('getCreateAttributLink'); |
|
117 | 117 | |
118 | - $objectTable->addIntroButton('addadsense', 'adsense.php?op=mod', _AM_SOBJECT_ADSENSES_CREATE); |
|
119 | - /* |
|
118 | + $objectTable->addIntroButton('addadsense', 'adsense.php?op=mod', _AM_SOBJECT_ADSENSES_CREATE); |
|
119 | + /* |
|
120 | 120 | $criteria_upcoming = new CriteriaCompo(); |
121 | 121 | $criteria_upcoming->add(new Criteria('start_date', time(), '>')); |
122 | 122 | $objectTable->addFilter(_AM_SOBJECT_FILTER_UPCOMING, array( |
@@ -140,16 +140,16 @@ discard block |
||
140 | 140 | 'criteria' => $criteria_last30days |
141 | 141 | )); |
142 | 142 | */ |
143 | - $objectTable->addQuickSearch(array('title', 'summary', 'description')); |
|
144 | - $objectTable->addCustomAction('getCloneLink'); |
|
143 | + $objectTable->addQuickSearch(array('title', 'summary', 'description')); |
|
144 | + $objectTable->addCustomAction('getCloneLink'); |
|
145 | 145 | |
146 | - $objectTable->render(); |
|
146 | + $objectTable->render(); |
|
147 | 147 | |
148 | - echo '<br />'; |
|
149 | - smart_close_collapsable('createdadsenses'); |
|
150 | - echo '<br>'; |
|
148 | + echo '<br />'; |
|
149 | + smart_close_collapsable('createdadsenses'); |
|
150 | + echo '<br>'; |
|
151 | 151 | |
152 | - break; |
|
152 | + break; |
|
153 | 153 | } |
154 | 154 | |
155 | 155 | //smart_modFooter(); |
@@ -29,73 +29,73 @@ |
||
29 | 29 | |
30 | 30 | switch ($op) { |
31 | 31 | |
32 | - case 'del': |
|
33 | - include_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 | + include_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 | - include_once XOOPS_ROOT_PATH . '/class/template.php'; |
|
53 | + include_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 | - echo $indexAdmin->addNavigation(basename(__FILE__)); |
|
74 | + echo $indexAdmin->addNavigation(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 | - include_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 | + include_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(); |
@@ -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 | - echo $indexAdmin->addNavigation(basename(__FILE__)); |
|
66 | + smart_xoops_cp_header(); |
|
67 | + echo $indexAdmin->addNavigation(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 | - echo $indexAdmin->addNavigation(basename(__FILE__)); |
|
76 | + smart_xoops_cp_header(); |
|
77 | + echo $indexAdmin->addNavigation(basename(__FILE__)); |
|
78 | 78 | |
79 | - editcustomtag(true, $customtagid, true); |
|
80 | - break; |
|
79 | + editcustomtag(true, $customtagid, true); |
|
80 | + break; |
|
81 | 81 | |
82 | - case 'addcustomtag': |
|
83 | - include_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 | + include_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 | - include_once XOOPS_ROOT_PATH . '/modules/smartobject/class/smartobjectcontroller.php'; |
|
91 | - $controller = new SmartObjectController($smartobjectCustomtagHandler); |
|
92 | - $controller->handleObjectDeletion(); |
|
90 | + include_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 | - echo $indexAdmin->addNavigation(basename(__FILE__)); |
|
100 | - $indexAdmin->addItemButton(_AM_SOBJECT_CUSTOMTAGS_CREATE, 'customtag.php?op=mod', 'add', ''); |
|
101 | - echo $indexAdmin->renderButton('left', ''); |
|
98 | + smart_xoops_cp_header(); |
|
99 | + echo $indexAdmin->addNavigation(basename(__FILE__)); |
|
100 | + $indexAdmin->addItemButton(_AM_SOBJECT_CUSTOMTAGS_CREATE, 'customtag.php?op=mod', 'add', ''); |
|
101 | + echo $indexAdmin->renderButton('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 | - include_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 | + include_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(); |
@@ -50,30 +50,30 @@ 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 | - exit; |
|
66 | - } |
|
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 | + exit; |
|
66 | + } |
|
67 | 67 | |
68 | - if (isset($_POST['default_currency'])) { |
|
69 | - $newDefaultCurrency = $_POST['default_currency']; |
|
70 | - $sql = 'UPDATE ' . $smartobjectCurrencyHandler->table . ' SET default_currency=0'; |
|
71 | - $smartobjectCurrencyHandler->query($sql); |
|
72 | - $sql = 'UPDATE ' . $smartobjectCurrencyHandler->table . ' SET default_currency=1 WHERE currencyid=' . $newDefaultCurrency; |
|
73 | - $smartobjectCurrencyHandler->query($sql); |
|
74 | - } |
|
68 | + if (isset($_POST['default_currency'])) { |
|
69 | + $newDefaultCurrency = $_POST['default_currency']; |
|
70 | + $sql = 'UPDATE ' . $smartobjectCurrencyHandler->table . ' SET default_currency=0'; |
|
71 | + $smartobjectCurrencyHandler->query($sql); |
|
72 | + $sql = 'UPDATE ' . $smartobjectCurrencyHandler->table . ' SET default_currency=1 WHERE currencyid=' . $newDefaultCurrency; |
|
73 | + $smartobjectCurrencyHandler->query($sql); |
|
74 | + } |
|
75 | 75 | |
76 | - /* |
|
76 | + /* |
|
77 | 77 | $criteria = new CriteriaCompo(); |
78 | 78 | $criteria->add(new Criteria('currencyid', '(' . implode(', ', $_POST['SmartobjectCurrency_objects']) . ')', 'IN')); |
79 | 79 | $currenciesObj = $smartobjectCurrencyHandler->getObjects($criteria, true); |
@@ -83,51 +83,51 @@ discard block |
||
83 | 83 | $smartobjectCurrencyHandler->insert($currencyObj); |
84 | 84 | } |
85 | 85 | */ |
86 | - redirect_header($smart_previous_page, 3, _AM_SOBJECT_RECORDS_UPDATED); |
|
87 | - exit; |
|
86 | + redirect_header($smart_previous_page, 3, _AM_SOBJECT_RECORDS_UPDATED); |
|
87 | + exit; |
|
88 | 88 | |
89 | - break; |
|
89 | + break; |
|
90 | 90 | |
91 | - case 'addcurrency': |
|
92 | - include_once XOOPS_ROOT_PATH . '/modules/smartobject/class/smartobjectcontroller.php'; |
|
93 | - $controller = new SmartObjectController($smartobjectCurrencyHandler); |
|
94 | - $controller->storeFromDefaultForm(_AM_SOBJECT_CURRENCIES_CREATED, _AM_SOBJECT_CURRENCIES_MODIFIED, SMARTOBJECT_URL . 'admin/currency.php'); |
|
91 | + case 'addcurrency': |
|
92 | + include_once XOOPS_ROOT_PATH . '/modules/smartobject/class/smartobjectcontroller.php'; |
|
93 | + $controller = new SmartObjectController($smartobjectCurrencyHandler); |
|
94 | + $controller->storeFromDefaultForm(_AM_SOBJECT_CURRENCIES_CREATED, _AM_SOBJECT_CURRENCIES_MODIFIED, SMARTOBJECT_URL . 'admin/currency.php'); |
|
95 | 95 | |
96 | - break; |
|
96 | + break; |
|
97 | 97 | |
98 | - case 'del': |
|
99 | - include_once XOOPS_ROOT_PATH . '/modules/smartobject/class/smartobjectcontroller.php'; |
|
100 | - $controller = new SmartObjectController($smartobjectCurrencyHandler); |
|
101 | - $controller->handleObjectDeletion(); |
|
98 | + case 'del': |
|
99 | + include_once XOOPS_ROOT_PATH . '/modules/smartobject/class/smartobjectcontroller.php'; |
|
100 | + $controller = new SmartObjectController($smartobjectCurrencyHandler); |
|
101 | + $controller->handleObjectDeletion(); |
|
102 | 102 | |
103 | - break; |
|
103 | + break; |
|
104 | 104 | |
105 | - default: |
|
105 | + default: |
|
106 | 106 | |
107 | - smart_xoops_cp_header(); |
|
107 | + smart_xoops_cp_header(); |
|
108 | 108 | |
109 | - //smart_adminMenu(5, _AM_SOBJECT_CURRENCIES); |
|
109 | + //smart_adminMenu(5, _AM_SOBJECT_CURRENCIES); |
|
110 | 110 | |
111 | - smart_collapsableBar('createdcurrencies', _AM_SOBJECT_CURRENCIES, _AM_SOBJECT_CURRENCIES_DSC); |
|
111 | + smart_collapsableBar('createdcurrencies', _AM_SOBJECT_CURRENCIES, _AM_SOBJECT_CURRENCIES_DSC); |
|
112 | 112 | |
113 | - include_once SMARTOBJECT_ROOT_PATH . 'class/smartobjecttable.php'; |
|
114 | - $objectTable = new SmartObjectTable($smartobjectCurrencyHandler); |
|
115 | - $objectTable->addColumn(new SmartObjectColumn('name', 'left', false, 'getCurrencyLink')); |
|
116 | - $objectTable->addColumn(new SmartObjectColumn('rate', 'center', 150)); |
|
117 | - $objectTable->addColumn(new SmartObjectColumn('iso4217', 'center', 150)); |
|
118 | - $objectTable->addColumn(new SmartObjectColumn('default_currency', 'center', 150, 'getDefaultCurrencyControl')); |
|
113 | + include_once SMARTOBJECT_ROOT_PATH . 'class/smartobjecttable.php'; |
|
114 | + $objectTable = new SmartObjectTable($smartobjectCurrencyHandler); |
|
115 | + $objectTable->addColumn(new SmartObjectColumn('name', 'left', false, 'getCurrencyLink')); |
|
116 | + $objectTable->addColumn(new SmartObjectColumn('rate', 'center', 150)); |
|
117 | + $objectTable->addColumn(new SmartObjectColumn('iso4217', 'center', 150)); |
|
118 | + $objectTable->addColumn(new SmartObjectColumn('default_currency', 'center', 150, 'getDefaultCurrencyControl')); |
|
119 | 119 | |
120 | - $objectTable->addIntroButton('addcurrency', 'currency.php?op=mod', _AM_SOBJECT_CURRENCIES_CREATE); |
|
120 | + $objectTable->addIntroButton('addcurrency', 'currency.php?op=mod', _AM_SOBJECT_CURRENCIES_CREATE); |
|
121 | 121 | |
122 | - $objectTable->addActionButton('updateCurrencies', _SUBMIT, _AM_SOBJECT_CURRENCY_UPDATE_ALL); |
|
122 | + $objectTable->addActionButton('updateCurrencies', _SUBMIT, _AM_SOBJECT_CURRENCY_UPDATE_ALL); |
|
123 | 123 | |
124 | - $objectTable->render(); |
|
124 | + $objectTable->render(); |
|
125 | 125 | |
126 | - echo '<br />'; |
|
127 | - smart_close_collapsable('createdcurrencies'); |
|
128 | - echo '<br>'; |
|
126 | + echo '<br />'; |
|
127 | + smart_close_collapsable('createdcurrencies'); |
|
128 | + echo '<br>'; |
|
129 | 129 | |
130 | - break; |
|
130 | + break; |
|
131 | 131 | } |
132 | 132 | |
133 | 133 | //smart_modFooter(); |