@@ -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, ['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, ['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 | - $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(['title', 'summary', 'description']); |
|
143 | - $objectTable->addCustomAction('getCloneLink'); |
|
142 | + $objectTable->addQuickSearch(['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(); |
@@ -57,65 +57,65 @@ 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 | - $adminObject->displayNavigation(basename(__FILE__)); |
|
64 | + smart_xoops_cp_header(); |
|
65 | + $adminObject->displayNavigation(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 | - $adminObject->displayNavigation(basename(__FILE__)); |
|
74 | + smart_xoops_cp_header(); |
|
75 | + $adminObject->displayNavigation(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 (@require_once SMARTOBJECT_ROOT_PATH . 'include/captcha/captcha.php') { |
|
82 | - $xoopsCaptcha = XoopsCaptcha::getInstance(); |
|
83 | - if (!$xoopsCaptcha->verify()) { |
|
84 | - redirect_header('javascript:history.go(-1);', 3, $xoopsCaptcha->getMessage()); |
|
85 | - } |
|
86 | - } |
|
87 | - require_once XOOPS_ROOT_PATH . '/modules/smartobject/class/smartobjectcontroller.php'; |
|
88 | - $controller = new SmartObjectController($smartobjectAdsenseHandler); |
|
89 | - $controller->storeFromDefaultForm(_AM_SOBJECT_ADSENSES_CREATED, _AM_SOBJECT_ADSENSES_MODIFIED); |
|
90 | - break; |
|
80 | + case 'addadsense': |
|
81 | + if (@require_once SMARTOBJECT_ROOT_PATH . 'include/captcha/captcha.php') { |
|
82 | + $xoopsCaptcha = XoopsCaptcha::getInstance(); |
|
83 | + if (!$xoopsCaptcha->verify()) { |
|
84 | + redirect_header('javascript:history.go(-1);', 3, $xoopsCaptcha->getMessage()); |
|
85 | + } |
|
86 | + } |
|
87 | + require_once XOOPS_ROOT_PATH . '/modules/smartobject/class/smartobjectcontroller.php'; |
|
88 | + $controller = new SmartObjectController($smartobjectAdsenseHandler); |
|
89 | + $controller->storeFromDefaultForm(_AM_SOBJECT_ADSENSES_CREATED, _AM_SOBJECT_ADSENSES_MODIFIED); |
|
90 | + break; |
|
91 | 91 | |
92 | - case 'del': |
|
92 | + case 'del': |
|
93 | 93 | |
94 | - require_once XOOPS_ROOT_PATH . '/modules/smartobject/class/smartobjectcontroller.php'; |
|
95 | - $controller = new SmartObjectController($smartobjectAdsenseHandler); |
|
96 | - $controller->handleObjectDeletion(); |
|
94 | + require_once XOOPS_ROOT_PATH . '/modules/smartobject/class/smartobjectcontroller.php'; |
|
95 | + $controller = new SmartObjectController($smartobjectAdsenseHandler); |
|
96 | + $controller->handleObjectDeletion(); |
|
97 | 97 | |
98 | - break; |
|
98 | + break; |
|
99 | 99 | |
100 | - default: |
|
100 | + default: |
|
101 | 101 | |
102 | - smart_xoops_cp_header(); |
|
103 | - $adminObject->displayNavigation(basename(__FILE__)); |
|
102 | + smart_xoops_cp_header(); |
|
103 | + $adminObject->displayNavigation(basename(__FILE__)); |
|
104 | 104 | |
105 | - //smart_adminMenu(3, _AM_SOBJECT_ADSENSES); |
|
105 | + //smart_adminMenu(3, _AM_SOBJECT_ADSENSES); |
|
106 | 106 | |
107 | - smart_collapsableBar('createdadsenses', _AM_SOBJECT_ADSENSES, _AM_SOBJECT_ADSENSES_DSC); |
|
107 | + smart_collapsableBar('createdadsenses', _AM_SOBJECT_ADSENSES, _AM_SOBJECT_ADSENSES_DSC); |
|
108 | 108 | |
109 | - require_once SMARTOBJECT_ROOT_PATH . 'class/smartobjecttable.php'; |
|
110 | - $objectTable = new SmartObjectTable($smartobjectAdsenseHandler); |
|
111 | - $objectTable->addColumn(new SmartObjectColumn('description', 'left')); |
|
112 | - $objectTable->addColumn(new SmartObjectColumn(_AM_SOBJECT_ADSENSE_TAG, 'center', 200, 'getXoopsCode')); |
|
109 | + require_once SMARTOBJECT_ROOT_PATH . 'class/smartobjecttable.php'; |
|
110 | + $objectTable = new SmartObjectTable($smartobjectAdsenseHandler); |
|
111 | + $objectTable->addColumn(new SmartObjectColumn('description', 'left')); |
|
112 | + $objectTable->addColumn(new SmartObjectColumn(_AM_SOBJECT_ADSENSE_TAG, 'center', 200, 'getXoopsCode')); |
|
113 | 113 | |
114 | - // $objectTable->addCustomAction('getCreateItemLink'); |
|
115 | - // $objectTable->addCustomAction('getCreateAttributLink'); |
|
114 | + // $objectTable->addCustomAction('getCreateItemLink'); |
|
115 | + // $objectTable->addCustomAction('getCreateAttributLink'); |
|
116 | 116 | |
117 | - $objectTable->addIntroButton('addadsense', 'adsense.php?op=mod', _AM_SOBJECT_ADSENSES_CREATE); |
|
118 | - /* |
|
117 | + $objectTable->addIntroButton('addadsense', 'adsense.php?op=mod', _AM_SOBJECT_ADSENSES_CREATE); |
|
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(['title', 'summary', 'description']); |
|
143 | - $objectTable->addCustomAction('getCloneLink'); |
|
142 | + $objectTable->addQuickSearch(['title', 'summary', 'description']); |
|
143 | + $objectTable->addCustomAction('getCloneLink'); |
|
144 | 144 | |
145 | - $objectTable->render(); |
|
145 | + $objectTable->render(); |
|
146 | 146 | |
147 | - echo '<br>'; |
|
148 | - smart_close_collapsable('createdadsenses'); |
|
149 | - echo '<br>'; |
|
147 | + echo '<br>'; |
|
148 | + smart_close_collapsable('createdadsenses'); |
|
149 | + echo '<br>'; |
|
150 | 150 | |
151 | - break; |
|
151 | + break; |
|
152 | 152 | } |
153 | 153 | |
154 | 154 | //smart_modFooter(); |