@@ -21,51 +21,51 @@ |
||
21 | 21 | $moduleDirName = basename(dirname(dirname(__DIR__))); |
22 | 22 | $moduleDirNameUpper = strtoupper($moduleDirName); |
23 | 23 | |
24 | -define('CO_' . $moduleDirNameUpper . '_GDLIBSTATUS', 'GD library support: '); |
|
25 | -define('CO_' . $moduleDirNameUpper . '_GDLIBVERSION', 'GD Library version: '); |
|
26 | -define('CO_' . $moduleDirNameUpper . '_GDOFF', "<span style='font-weight: bold;'>Disabled</span> (No thumbnails available)"); |
|
27 | -define('CO_' . $moduleDirNameUpper . '_GDON', "<span style='font-weight: bold;'>Enabled</span> (Thumbsnails available)"); |
|
28 | -define('CO_' . $moduleDirNameUpper . '_IMAGEINFO', 'Server status'); |
|
29 | -define('CO_' . $moduleDirNameUpper . '_MAXPOSTSIZE', 'Max post size permitted (post_max_size directive in php.ini): '); |
|
30 | -define('CO_' . $moduleDirNameUpper . '_MAXUPLOADSIZE', 'Max upload size permitted (upload_max_filesize directive in php.ini): '); |
|
31 | -define('CO_' . $moduleDirNameUpper . '_MEMORYLIMIT', 'Memory limit (memory_limit directive in php.ini): '); |
|
32 | -define('CO_' . $moduleDirNameUpper . '_METAVERSION', "<span style='font-weight: bold;'>Downloads meta version:</span> "); |
|
33 | -define('CO_' . $moduleDirNameUpper . '_OFF', "<span style='font-weight: bold;'>OFF</span>"); |
|
34 | -define('CO_' . $moduleDirNameUpper . '_ON', "<span style='font-weight: bold;'>ON</span>"); |
|
35 | -define('CO_' . $moduleDirNameUpper . '_SERVERPATH', 'Server path to XOOPS root: '); |
|
36 | -define('CO_' . $moduleDirNameUpper . '_SERVERUPLOADSTATUS', 'Server uploads status: '); |
|
37 | -define('CO_' . $moduleDirNameUpper . '_SPHPINI', "<span style='font-weight: bold;'>Information taken from PHP ini file:</span>"); |
|
38 | -define('CO_' . $moduleDirNameUpper . '_UPLOADPATHDSC', 'Note. Upload path *MUST* contain the full server path of your upload folder.'); |
|
24 | +define('CO_'.$moduleDirNameUpper.'_GDLIBSTATUS', 'GD library support: '); |
|
25 | +define('CO_'.$moduleDirNameUpper.'_GDLIBVERSION', 'GD Library version: '); |
|
26 | +define('CO_'.$moduleDirNameUpper.'_GDOFF', "<span style='font-weight: bold;'>Disabled</span> (No thumbnails available)"); |
|
27 | +define('CO_'.$moduleDirNameUpper.'_GDON', "<span style='font-weight: bold;'>Enabled</span> (Thumbsnails available)"); |
|
28 | +define('CO_'.$moduleDirNameUpper.'_IMAGEINFO', 'Server status'); |
|
29 | +define('CO_'.$moduleDirNameUpper.'_MAXPOSTSIZE', 'Max post size permitted (post_max_size directive in php.ini): '); |
|
30 | +define('CO_'.$moduleDirNameUpper.'_MAXUPLOADSIZE', 'Max upload size permitted (upload_max_filesize directive in php.ini): '); |
|
31 | +define('CO_'.$moduleDirNameUpper.'_MEMORYLIMIT', 'Memory limit (memory_limit directive in php.ini): '); |
|
32 | +define('CO_'.$moduleDirNameUpper.'_METAVERSION', "<span style='font-weight: bold;'>Downloads meta version:</span> "); |
|
33 | +define('CO_'.$moduleDirNameUpper.'_OFF', "<span style='font-weight: bold;'>OFF</span>"); |
|
34 | +define('CO_'.$moduleDirNameUpper.'_ON', "<span style='font-weight: bold;'>ON</span>"); |
|
35 | +define('CO_'.$moduleDirNameUpper.'_SERVERPATH', 'Server path to XOOPS root: '); |
|
36 | +define('CO_'.$moduleDirNameUpper.'_SERVERUPLOADSTATUS', 'Server uploads status: '); |
|
37 | +define('CO_'.$moduleDirNameUpper.'_SPHPINI', "<span style='font-weight: bold;'>Information taken from PHP ini file:</span>"); |
|
38 | +define('CO_'.$moduleDirNameUpper.'_UPLOADPATHDSC', 'Note. Upload path *MUST* contain the full server path of your upload folder.'); |
|
39 | 39 | |
40 | -define('CO_' . $moduleDirNameUpper . '_PRINT', "<span style='font-weight: bold;'>Print</span>"); |
|
41 | -define('CO_' . $moduleDirNameUpper . '_PDF', "<span style='font-weight: bold;'>Create PDF</span>"); |
|
40 | +define('CO_'.$moduleDirNameUpper.'_PRINT', "<span style='font-weight: bold;'>Print</span>"); |
|
41 | +define('CO_'.$moduleDirNameUpper.'_PDF', "<span style='font-weight: bold;'>Create PDF</span>"); |
|
42 | 42 | |
43 | 43 | |
44 | -define('CO_' . $moduleDirNameUpper . '_UPGRADEFAILED0', "Update failed - couldn't rename field '%s'"); |
|
45 | -define('CO_' . $moduleDirNameUpper . '_UPGRADEFAILED1', "Update failed - couldn't add new fields"); |
|
46 | -define('CO_' . $moduleDirNameUpper . '_UPGRADEFAILED2', "Update failed - couldn't rename table '%s'"); |
|
47 | -define('CO_' . $moduleDirNameUpper . '_ERROR_COLUMN', 'Could not create column in database : %s'); |
|
48 | -define('CO_' . $moduleDirNameUpper . '_ERROR_BAD_XOOPS', 'This module requires XOOPS %s+ (%s installed)'); |
|
49 | -define('CO_' . $moduleDirNameUpper . '_ERROR_BAD_PHP', 'This module requires PHP version %s+ (%s installed)'); |
|
50 | -define('CO_' . $moduleDirNameUpper . '_ERROR_TAG_REMOVAL', 'Could not remove tags from Tag Module'); |
|
44 | +define('CO_'.$moduleDirNameUpper.'_UPGRADEFAILED0', "Update failed - couldn't rename field '%s'"); |
|
45 | +define('CO_'.$moduleDirNameUpper.'_UPGRADEFAILED1', "Update failed - couldn't add new fields"); |
|
46 | +define('CO_'.$moduleDirNameUpper.'_UPGRADEFAILED2', "Update failed - couldn't rename table '%s'"); |
|
47 | +define('CO_'.$moduleDirNameUpper.'_ERROR_COLUMN', 'Could not create column in database : %s'); |
|
48 | +define('CO_'.$moduleDirNameUpper.'_ERROR_BAD_XOOPS', 'This module requires XOOPS %s+ (%s installed)'); |
|
49 | +define('CO_'.$moduleDirNameUpper.'_ERROR_BAD_PHP', 'This module requires PHP version %s+ (%s installed)'); |
|
50 | +define('CO_'.$moduleDirNameUpper.'_ERROR_TAG_REMOVAL', 'Could not remove tags from Tag Module'); |
|
51 | 51 | |
52 | -define('CO_' . $moduleDirNameUpper . '_FOLDERS_DELETED_OK', 'Upload Folders have been deleted'); |
|
52 | +define('CO_'.$moduleDirNameUpper.'_FOLDERS_DELETED_OK', 'Upload Folders have been deleted'); |
|
53 | 53 | |
54 | 54 | // Error Msgs |
55 | -define('CO_' . $moduleDirNameUpper . '_ERROR_BAD_DEL_PATH', 'Could not delete %s directory'); |
|
56 | -define('CO_' . $moduleDirNameUpper . '_ERROR_BAD_REMOVE', 'Could not delete %s'); |
|
57 | -define('CO_' . $moduleDirNameUpper . '_ERROR_NO_PLUGIN', 'Could not load plugin'); |
|
55 | +define('CO_'.$moduleDirNameUpper.'_ERROR_BAD_DEL_PATH', 'Could not delete %s directory'); |
|
56 | +define('CO_'.$moduleDirNameUpper.'_ERROR_BAD_REMOVE', 'Could not delete %s'); |
|
57 | +define('CO_'.$moduleDirNameUpper.'_ERROR_NO_PLUGIN', 'Could not load plugin'); |
|
58 | 58 | |
59 | 59 | |
60 | 60 | //Help |
61 | -define('CO_' . $moduleDirNameUpper . '_DIRNAME', basename(dirname(dirname(__DIR__)))); |
|
62 | -define('CO_' . $moduleDirNameUpper . '_HELP_HEADER', __DIR__.'/help/helpheader.tpl'); |
|
63 | -define('CO_' . $moduleDirNameUpper . '_BACK_2_ADMIN', 'Back to Administration of '); |
|
64 | -define('CO_' . $moduleDirNameUpper . '_OVERVIEW', 'Overview'); |
|
61 | +define('CO_'.$moduleDirNameUpper.'_DIRNAME', basename(dirname(dirname(__DIR__)))); |
|
62 | +define('CO_'.$moduleDirNameUpper.'_HELP_HEADER', __DIR__.'/help/helpheader.tpl'); |
|
63 | +define('CO_'.$moduleDirNameUpper.'_BACK_2_ADMIN', 'Back to Administration of '); |
|
64 | +define('CO_'.$moduleDirNameUpper.'_OVERVIEW', 'Overview'); |
|
65 | 65 | |
66 | 66 | //define('CO_' . $moduleDirNameUpper . '_HELP_DIR', __DIR__); |
67 | 67 | |
68 | 68 | //help multi-page |
69 | -define('CO_' . $moduleDirNameUpper . '_DISCLAIMER', 'Disclaimer'); |
|
70 | -define('CO_' . $moduleDirNameUpper . '_LICENSE', 'License'); |
|
71 | -define('CO_' . $moduleDirNameUpper . '_SUPPORT', 'Support'); |
|
69 | +define('CO_'.$moduleDirNameUpper.'_DISCLAIMER', 'Disclaimer'); |
|
70 | +define('CO_'.$moduleDirNameUpper.'_LICENSE', 'License'); |
|
71 | +define('CO_'.$moduleDirNameUpper.'_SUPPORT', 'Support'); |
@@ -49,94 +49,94 @@ |
||
49 | 49 | } |
50 | 50 | |
51 | 51 | switch ($op) { |
52 | - case 'post': |
|
52 | + case 'post': |
|
53 | 53 | |
54 | - global $xoopsUser, $xoopsConfig, $xoopsModule, $xoopsModuleConfig, $xoopsDB; |
|
54 | + global $xoopsUser, $xoopsConfig, $xoopsModule, $xoopsModuleConfig, $xoopsDB; |
|
55 | 55 | |
56 | - $newFaqObj = $faqHandler->create(); |
|
56 | + $newFaqObj = $faqHandler->create(); |
|
57 | 57 | |
58 | - if (!$xoopsUser) { |
|
59 | - if (1 == $xoopsModuleConfig['anonpost']) { |
|
60 | - $uid = 0; |
|
58 | + if (!$xoopsUser) { |
|
59 | + if (1 == $xoopsModuleConfig['anonpost']) { |
|
60 | + $uid = 0; |
|
61 | + } else { |
|
62 | + redirect_header('index.php', 3, _NOPERM); |
|
63 | + } |
|
61 | 64 | } else { |
62 | - redirect_header('index.php', 3, _NOPERM); |
|
65 | + $uid = $xoopsUser->uid(); |
|
63 | 66 | } |
64 | - } else { |
|
65 | - $uid = $xoopsUser->uid(); |
|
66 | - } |
|
67 | - |
|
68 | - // Putting the values about the FAQ in the FAQ object |
|
69 | - $newFaqObj->setVar('categoryid', $_POST['categoryid']); |
|
70 | - $newFaqObj->setVar('uid', $uid); |
|
71 | - $newFaqObj->setVar('question', $_POST['question']); |
|
72 | - $notifypub = isset($_POST['notifypub']) ? $_POST['notifypub'] : 0; |
|
73 | - $newFaqObj->setVar('notifypub', $notifypub); |
|
74 | - |
|
75 | - // Setting the status of the FAQ |
|
76 | - if (1 == $xoopsModuleConfig['autoapprove_request']) { |
|
77 | - $newFaqObj->setVar('status', Constants::SF_STATUS_OPENED); |
|
78 | - } else { |
|
79 | - $newFaqObj->setVar('status', Constants::SF_STATUS_ASKED); |
|
80 | - } |
|
81 | - |
|
82 | - // Storing the FAQ object in the database |
|
83 | - if (!$newFaqObj->store()) { |
|
84 | - redirect_header('javascript:history.go(-1)', 3, _MD_SF_REQUEST_ERROR . Smartfaq\Utility::formatErrors($newFaqObj->getErrors())); |
|
85 | - } |
|
86 | - |
|
87 | - // Get the cateopry object related to that FAQ |
|
88 | - // If autoapprove_requested |
|
89 | - if (1 == $xoopsModuleConfig['autoapprove_request']) { |
|
90 | - // We do not not subscribe user to notification on publish since we publish it right away |
|
91 | - |
|
92 | - // Send notifications |
|
93 | - $newFaqObj->sendNotifications([Constants::SF_NOT_QUESTION_PUBLISHED]); |
|
94 | - |
|
95 | - $redirect_msg = _MD_SF_REQUEST_RECEIVED_AND_PUBLISHED; |
|
96 | - } else { |
|
97 | - // Subscribe the user to On Published notification, if requested |
|
98 | - if (1 == $notifypub) { |
|
99 | - require_once XOOPS_ROOT_PATH . '/include/notification_constants.php'; |
|
100 | - $notificationHandler = xoops_getHandler('notification'); |
|
101 | - $notificationHandler->subscribe('question', $newFaqObj->faqid(), 'approved', XOOPS_NOTIFICATION_MODE_SENDONCETHENDELETE); |
|
67 | + |
|
68 | + // Putting the values about the FAQ in the FAQ object |
|
69 | + $newFaqObj->setVar('categoryid', $_POST['categoryid']); |
|
70 | + $newFaqObj->setVar('uid', $uid); |
|
71 | + $newFaqObj->setVar('question', $_POST['question']); |
|
72 | + $notifypub = isset($_POST['notifypub']) ? $_POST['notifypub'] : 0; |
|
73 | + $newFaqObj->setVar('notifypub', $notifypub); |
|
74 | + |
|
75 | + // Setting the status of the FAQ |
|
76 | + if (1 == $xoopsModuleConfig['autoapprove_request']) { |
|
77 | + $newFaqObj->setVar('status', Constants::SF_STATUS_OPENED); |
|
78 | + } else { |
|
79 | + $newFaqObj->setVar('status', Constants::SF_STATUS_ASKED); |
|
80 | + } |
|
81 | + |
|
82 | + // Storing the FAQ object in the database |
|
83 | + if (!$newFaqObj->store()) { |
|
84 | + redirect_header('javascript:history.go(-1)', 3, _MD_SF_REQUEST_ERROR . Smartfaq\Utility::formatErrors($newFaqObj->getErrors())); |
|
102 | 85 | } |
103 | - // Send notifications |
|
104 | - $newFaqObj->sendNotifications([Constants::SF_NOT_QUESTION_SUBMITTED]); |
|
105 | 86 | |
106 | - $redirect_msg = _MD_SF_REQUEST_RECEIVED_NEED_APPROVAL; |
|
107 | - } |
|
87 | + // Get the cateopry object related to that FAQ |
|
88 | + // If autoapprove_requested |
|
89 | + if (1 == $xoopsModuleConfig['autoapprove_request']) { |
|
90 | + // We do not not subscribe user to notification on publish since we publish it right away |
|
91 | + |
|
92 | + // Send notifications |
|
93 | + $newFaqObj->sendNotifications([Constants::SF_NOT_QUESTION_PUBLISHED]); |
|
94 | + |
|
95 | + $redirect_msg = _MD_SF_REQUEST_RECEIVED_AND_PUBLISHED; |
|
96 | + } else { |
|
97 | + // Subscribe the user to On Published notification, if requested |
|
98 | + if (1 == $notifypub) { |
|
99 | + require_once XOOPS_ROOT_PATH . '/include/notification_constants.php'; |
|
100 | + $notificationHandler = xoops_getHandler('notification'); |
|
101 | + $notificationHandler->subscribe('question', $newFaqObj->faqid(), 'approved', XOOPS_NOTIFICATION_MODE_SENDONCETHENDELETE); |
|
102 | + } |
|
103 | + // Send notifications |
|
104 | + $newFaqObj->sendNotifications([Constants::SF_NOT_QUESTION_SUBMITTED]); |
|
105 | + |
|
106 | + $redirect_msg = _MD_SF_REQUEST_RECEIVED_NEED_APPROVAL; |
|
107 | + } |
|
108 | 108 | |
109 | - //redirect_header("javascript:history.go(-2)", 3, $redirect_msg); |
|
110 | - redirect_header('index.php', 2, $redirect_msg); |
|
111 | - break; |
|
109 | + //redirect_header("javascript:history.go(-2)", 3, $redirect_msg); |
|
110 | + redirect_header('index.php', 2, $redirect_msg); |
|
111 | + break; |
|
112 | 112 | |
113 | - case 'form': |
|
114 | - default: |
|
113 | + case 'form': |
|
114 | + default: |
|
115 | 115 | |
116 | - global $xoopsUser, $myts; |
|
116 | + global $xoopsUser, $myts; |
|
117 | 117 | |
118 | - $GLOBALS['xoopsOption']['template_main'] = 'smartfaq_submit.tpl'; |
|
119 | - require_once XOOPS_ROOT_PATH . '/header.php'; |
|
120 | - require_once __DIR__ . '/footer.php'; |
|
118 | + $GLOBALS['xoopsOption']['template_main'] = 'smartfaq_submit.tpl'; |
|
119 | + require_once XOOPS_ROOT_PATH . '/header.php'; |
|
120 | + require_once __DIR__ . '/footer.php'; |
|
121 | 121 | |
122 | - $name = $xoopsUser ? ucwords($xoopsUser->getVar('uname')) : 'Anonymous'; |
|
122 | + $name = $xoopsUser ? ucwords($xoopsUser->getVar('uname')) : 'Anonymous'; |
|
123 | 123 | |
124 | - $moduleName =& $myts->displayTarea($xoopsModule->getVar('name')); |
|
125 | - $xoopsTpl->assign('whereInSection', $moduleName); |
|
126 | - $xoopsTpl->assign('lang_submit', _MD_SF_REQUEST); |
|
124 | + $moduleName =& $myts->displayTarea($xoopsModule->getVar('name')); |
|
125 | + $xoopsTpl->assign('whereInSection', $moduleName); |
|
126 | + $xoopsTpl->assign('lang_submit', _MD_SF_REQUEST); |
|
127 | 127 | |
128 | - $xoopsTpl->assign('lang_intro_title', _MD_SF_REQUEST); |
|
129 | - $xoopsTpl->assign('lang_intro_text', _MD_SF_GOODDAY . "<b>$name</b>, " . $myts->displayTarea($xoopsModuleConfig['requestintromsg'])); |
|
128 | + $xoopsTpl->assign('lang_intro_title', _MD_SF_REQUEST); |
|
129 | + $xoopsTpl->assign('lang_intro_text', _MD_SF_GOODDAY . "<b>$name</b>, " . $myts->displayTarea($xoopsModuleConfig['requestintromsg'])); |
|
130 | 130 | |
131 | - require_once __DIR__ . '/include/request.inc.php'; |
|
131 | + require_once __DIR__ . '/include/request.inc.php'; |
|
132 | 132 | |
133 | - $name = $xoopsUser ? ucwords($xoopsUser->getVar('uname')) : 'Anonymous'; |
|
133 | + $name = $xoopsUser ? ucwords($xoopsUser->getVar('uname')) : 'Anonymous'; |
|
134 | 134 | |
135 | - $sectionname = $myts->htmlSpecialChars($xoopsModule->getVar('name')); |
|
135 | + $sectionname = $myts->htmlSpecialChars($xoopsModule->getVar('name')); |
|
136 | 136 | |
137 | - require_once __DIR__ . '/include/request.inc.php'; |
|
137 | + require_once __DIR__ . '/include/request.inc.php'; |
|
138 | 138 | |
139 | - require_once XOOPS_ROOT_PATH . '/footer.php'; |
|
139 | + require_once XOOPS_ROOT_PATH . '/footer.php'; |
|
140 | 140 | |
141 | - break; |
|
141 | + break; |
|
142 | 142 | } |
@@ -9,8 +9,8 @@ discard block |
||
9 | 9 | use XoopsModules\Smartfaq; |
10 | 10 | use XoopsModules\Smartfaq\Constants; |
11 | 11 | |
12 | -require_once __DIR__ . '/header.php'; |
|
13 | -require_once XOOPS_ROOT_PATH . '/header.php'; |
|
12 | +require_once __DIR__.'/header.php'; |
|
13 | +require_once XOOPS_ROOT_PATH.'/header.php'; |
|
14 | 14 | |
15 | 15 | global $xoopsUser, $xoopsConfig, $xoopsModuleConfig, $xoopsModule; |
16 | 16 | |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | |
82 | 82 | // Storing the FAQ object in the database |
83 | 83 | if (!$newFaqObj->store()) { |
84 | - redirect_header('javascript:history.go(-1)', 3, _MD_SF_REQUEST_ERROR . Smartfaq\Utility::formatErrors($newFaqObj->getErrors())); |
|
84 | + redirect_header('javascript:history.go(-1)', 3, _MD_SF_REQUEST_ERROR.Smartfaq\Utility::formatErrors($newFaqObj->getErrors())); |
|
85 | 85 | } |
86 | 86 | |
87 | 87 | // Get the cateopry object related to that FAQ |
@@ -96,7 +96,7 @@ discard block |
||
96 | 96 | } else { |
97 | 97 | // Subscribe the user to On Published notification, if requested |
98 | 98 | if (1 == $notifypub) { |
99 | - require_once XOOPS_ROOT_PATH . '/include/notification_constants.php'; |
|
99 | + require_once XOOPS_ROOT_PATH.'/include/notification_constants.php'; |
|
100 | 100 | $notificationHandler = xoops_getHandler('notification'); |
101 | 101 | $notificationHandler->subscribe('question', $newFaqObj->faqid(), 'approved', XOOPS_NOTIFICATION_MODE_SENDONCETHENDELETE); |
102 | 102 | } |
@@ -116,27 +116,27 @@ discard block |
||
116 | 116 | global $xoopsUser, $myts; |
117 | 117 | |
118 | 118 | $GLOBALS['xoopsOption']['template_main'] = 'smartfaq_submit.tpl'; |
119 | - require_once XOOPS_ROOT_PATH . '/header.php'; |
|
120 | - require_once __DIR__ . '/footer.php'; |
|
119 | + require_once XOOPS_ROOT_PATH.'/header.php'; |
|
120 | + require_once __DIR__.'/footer.php'; |
|
121 | 121 | |
122 | 122 | $name = $xoopsUser ? ucwords($xoopsUser->getVar('uname')) : 'Anonymous'; |
123 | 123 | |
124 | - $moduleName =& $myts->displayTarea($xoopsModule->getVar('name')); |
|
124 | + $moduleName = & $myts->displayTarea($xoopsModule->getVar('name')); |
|
125 | 125 | $xoopsTpl->assign('whereInSection', $moduleName); |
126 | 126 | $xoopsTpl->assign('lang_submit', _MD_SF_REQUEST); |
127 | 127 | |
128 | 128 | $xoopsTpl->assign('lang_intro_title', _MD_SF_REQUEST); |
129 | - $xoopsTpl->assign('lang_intro_text', _MD_SF_GOODDAY . "<b>$name</b>, " . $myts->displayTarea($xoopsModuleConfig['requestintromsg'])); |
|
129 | + $xoopsTpl->assign('lang_intro_text', _MD_SF_GOODDAY."<b>$name</b>, ".$myts->displayTarea($xoopsModuleConfig['requestintromsg'])); |
|
130 | 130 | |
131 | - require_once __DIR__ . '/include/request.inc.php'; |
|
131 | + require_once __DIR__.'/include/request.inc.php'; |
|
132 | 132 | |
133 | 133 | $name = $xoopsUser ? ucwords($xoopsUser->getVar('uname')) : 'Anonymous'; |
134 | 134 | |
135 | 135 | $sectionname = $myts->htmlSpecialChars($xoopsModule->getVar('name')); |
136 | 136 | |
137 | - require_once __DIR__ . '/include/request.inc.php'; |
|
137 | + require_once __DIR__.'/include/request.inc.php'; |
|
138 | 138 | |
139 | - require_once XOOPS_ROOT_PATH . '/footer.php'; |
|
139 | + require_once XOOPS_ROOT_PATH.'/footer.php'; |
|
140 | 140 | |
141 | 141 | break; |
142 | 142 | } |
@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | |
20 | 20 | use XoopsModules\Smartfaq; |
21 | 21 | |
22 | -require_once __DIR__ . '/../../../include/cp_header.php'; |
|
22 | +require_once __DIR__.'/../../../include/cp_header.php'; |
|
23 | 23 | //require_once $GLOBALS['xoops']->path('www/class/xoopsformloader.php'); |
24 | 24 | |
25 | 25 | // require_once __DIR__ . '/../class/Utility.php'; |
@@ -28,18 +28,18 @@ discard block |
||
28 | 28 | $moduleDirName = basename(dirname(__DIR__)); |
29 | 29 | |
30 | 30 | $path = dirname(dirname(dirname(__DIR__))); |
31 | -require_once $path . '/kernel/module.php'; |
|
32 | -require_once $path . '/class/xoopstree.php'; |
|
33 | -require_once $path . '/class/xoopslists.php'; |
|
34 | -require_once $path . '/class/pagenav.php'; |
|
35 | -require_once $path . '/class/xoopsformloader.php'; |
|
31 | +require_once $path.'/kernel/module.php'; |
|
32 | +require_once $path.'/class/xoopstree.php'; |
|
33 | +require_once $path.'/class/xoopslists.php'; |
|
34 | +require_once $path.'/class/pagenav.php'; |
|
35 | +require_once $path.'/class/xoopsformloader.php'; |
|
36 | 36 | |
37 | 37 | //require_once __DIR__ . '/../include/functions.php'; |
38 | 38 | // require_once __DIR__ . '/../class/category.php'; |
39 | 39 | // require_once __DIR__ . '/../class/faq.php'; |
40 | 40 | // require_once __DIR__ . '/../class/answer.php'; |
41 | 41 | // require_once __DIR__ . '/../class/Utility.php'; |
42 | -require_once __DIR__ . '/../include/common.php'; |
|
42 | +require_once __DIR__.'/../include/common.php'; |
|
43 | 43 | /** @var Smartfaq\Helper $helper */ |
44 | 44 | $helper = Smartfaq\Helper::getInstance(); |
45 | 45 | $adminObject = \Xmf\Module\Admin::getInstance(); |
@@ -8,7 +8,7 @@ discard block |
||
8 | 8 | |
9 | 9 | use XoopsModules\Smartfaq; |
10 | 10 | |
11 | -require_once __DIR__ . '/header.php'; |
|
11 | +require_once __DIR__.'/header.php'; |
|
12 | 12 | |
13 | 13 | $faqid = isset($_GET['faqid']) ? (int)$_GET['faqid'] : 0; |
14 | 14 | |
@@ -47,8 +47,8 @@ discard block |
||
47 | 47 | $faqObj->updateCounter(); |
48 | 48 | } |
49 | 49 | $GLOBALS['xoopsOption']['template_main'] = 'smartfaq_faq.tpl'; |
50 | -require_once XOOPS_ROOT_PATH . '/header.php'; |
|
51 | -require_once __DIR__ . '/footer.php'; |
|
50 | +require_once XOOPS_ROOT_PATH.'/header.php'; |
|
51 | +require_once __DIR__.'/footer.php'; |
|
52 | 52 | |
53 | 53 | $faq = $faqObj->toArray(null, $categoryObj, false); |
54 | 54 | |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | $xoopsTpl->assign('display_categoryname', false); |
84 | 84 | |
85 | 85 | $xoopsTpl->assign('xcodes', $faqObj->getVar('xcodes')); |
86 | -$xoopsTpl->assign('mail_link', 'mailto:?subject=' . sprintf(_MD_SF_INTARTICLE, $xoopsConfig['sitename']) . '&body=' . sprintf(_MD_SF_INTARTFOUND, $xoopsConfig['sitename']) . ': ' . XOOPS_URL . '/modules/' . $xoopsModule->dirname() . '/faq.php?faqid=' . $faqObj->getVar('faqid')); |
|
86 | +$xoopsTpl->assign('mail_link', 'mailto:?subject='.sprintf(_MD_SF_INTARTICLE, $xoopsConfig['sitename']).'&body='.sprintf(_MD_SF_INTARTFOUND, $xoopsConfig['sitename']).': '.XOOPS_URL.'/modules/'.$xoopsModule->dirname().'/faq.php?faqid='.$faqObj->getVar('faqid')); |
|
87 | 87 | $xoopsTpl->assign('lang_printerpage', _MD_SF_PRINTERFRIENDLY); |
88 | 88 | $xoopsTpl->assign('lang_sendstory', _MD_SF_SENDSTORY); |
89 | 89 | $xoopsTpl->assign('faqid', $faqObj->getVar('faqid')); |
@@ -99,19 +99,19 @@ discard block |
||
99 | 99 | |
100 | 100 | // Page Title Hack by marcan |
101 | 101 | $module_name = $myts->htmlSpecialChars($xoopsModule->getVar('name')); |
102 | -$xoopsTpl->assign('xoops_pagetitle', $module_name . ' - ' . $categoryObj->name() . ' - ' . $faq['question']); |
|
102 | +$xoopsTpl->assign('xoops_pagetitle', $module_name.' - '.$categoryObj->name().' - '.$faq['question']); |
|
103 | 103 | // End Page Title Hack by marcan |
104 | 104 | |
105 | 105 | // Include the comments if the selected FAQ supports comments |
106 | 106 | if (1 == $faqObj->cancomment()) { |
107 | - require_once XOOPS_ROOT_PATH . '/include/comment_view.php'; |
|
107 | + require_once XOOPS_ROOT_PATH.'/include/comment_view.php'; |
|
108 | 108 | } |
109 | 109 | |
110 | 110 | //code to include smartie |
111 | -if (file_exists(XOOPS_ROOT_PATH . '/modules/smarttie/smarttie_links.php')) { |
|
112 | - require_once XOOPS_ROOT_PATH . '/modules/smarttie/smarttie_links.php'; |
|
111 | +if (file_exists(XOOPS_ROOT_PATH.'/modules/smarttie/smarttie_links.php')) { |
|
112 | + require_once XOOPS_ROOT_PATH.'/modules/smarttie/smarttie_links.php'; |
|
113 | 113 | $xoopsTpl->assign('smarttie', 1); |
114 | 114 | } |
115 | 115 | //end code for smarttie |
116 | 116 | |
117 | -require_once XOOPS_ROOT_PATH . '/footer.php'; |
|
117 | +require_once XOOPS_ROOT_PATH.'/footer.php'; |
@@ -9,7 +9,7 @@ discard block |
||
9 | 9 | use XoopsModules\Smartfaq; |
10 | 10 | use XoopsModules\Smartfaq\Constants; |
11 | 11 | |
12 | -require_once __DIR__ . '/header.php'; |
|
12 | +require_once __DIR__.'/header.php'; |
|
13 | 13 | |
14 | 14 | // At which record shall we start for the Categories |
15 | 15 | $catstart = isset($_GET['catstart']) ? (int)$_GET['catstart'] : 0; |
@@ -42,11 +42,11 @@ discard block |
||
42 | 42 | |
43 | 43 | $GLOBALS['xoopsOption']['template_main'] = 'smartfaq_index.tpl'; |
44 | 44 | |
45 | -require_once XOOPS_ROOT_PATH . '/header.php'; |
|
46 | -require_once __DIR__ . '/footer.php'; |
|
45 | +require_once XOOPS_ROOT_PATH.'/header.php'; |
|
46 | +require_once __DIR__.'/footer.php'; |
|
47 | 47 | |
48 | 48 | // Creating the categories objects |
49 | -$categoriesObj =& $categoryHandler->getCategories($xoopsModuleConfig['catperpage'], $catstart); |
|
49 | +$categoriesObj = & $categoryHandler->getCategories($xoopsModuleConfig['catperpage'], $catstart); |
|
50 | 50 | // If no categories are found, exit |
51 | 51 | $totalCategoriesOnPage = count($categoriesObj); |
52 | 52 | if (0 == $totalCategoriesOnPage) { |
@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | if (isset($totalQnas[$subcat_id]) && $totalQnas[$subcat_id] > 0) { |
77 | 77 | if (isset($last_qnaObj[$subcat_id])) { |
78 | 78 | $subcat->setVar('last_faqid', $last_qnaObj[$subcat_id]->getVar('faqid')); |
79 | - $subcat->setVar('last_question_link', "<a href='faq.php?faqid=" . $last_qnaObj[$subcat_id]->getVar('faqid') . "'>" . $last_qnaObj[$subcat_id]->question($lastfaqsize) . '</a>'); |
|
79 | + $subcat->setVar('last_question_link', "<a href='faq.php?faqid=".$last_qnaObj[$subcat_id]->getVar('faqid')."'>".$last_qnaObj[$subcat_id]->question($lastfaqsize).'</a>'); |
|
80 | 80 | } |
81 | 81 | $subcat->setVar('faqcount', $totalQnas[$subcat_id]); |
82 | 82 | if ($xoopsModuleConfig['displaysubcatonindex']) { |
@@ -94,7 +94,7 @@ discard block |
||
94 | 94 | if ($total > 0) { |
95 | 95 | if (isset($last_qnaObj[$cat_id])) { |
96 | 96 | $category->setVar('last_faqid', $last_qnaObj[$cat_id]->getVar('faqid')); |
97 | - $category->setVar('last_question_link', "<a href='faq.php?faqid=" . $last_qnaObj[$cat_id]->getVar('faqid') . "'>" . $last_qnaObj[$cat_id]->question($lastfaqsize) . '</a>'); |
|
97 | + $category->setVar('last_question_link', "<a href='faq.php?faqid=".$last_qnaObj[$cat_id]->getVar('faqid')."'>".$last_qnaObj[$cat_id]->question($lastfaqsize).'</a>'); |
|
98 | 98 | } |
99 | 99 | $category->setVar('faqcount', $total); |
100 | 100 | if (!isset($categories[$cat_id])) { |
@@ -133,7 +133,7 @@ discard block |
||
133 | 133 | } |
134 | 134 | |
135 | 135 | $memberHandler = xoops_getHandler('member'); |
136 | - $users = $memberHandler->getUsers(new \Criteria('uid', '(' . implode(',', array_keys($userids)) . ')', 'IN'), true); |
|
136 | + $users = $memberHandler->getUsers(new \Criteria('uid', '('.implode(',', array_keys($userids)).')', 'IN'), true); |
|
137 | 137 | for ($i = 0; $i < $totalQnasOnPage; ++$i) { |
138 | 138 | $faq = $faqsObj[$i]->toArray(null, $allcategories); |
139 | 139 | |
@@ -159,14 +159,14 @@ discard block |
||
159 | 159 | } |
160 | 160 | |
161 | 161 | // Language constants |
162 | -$moduleName =& $myts->displayTarea($xoopsModule->getVar('name')); |
|
162 | +$moduleName = & $myts->displayTarea($xoopsModule->getVar('name')); |
|
163 | 163 | $xoopsTpl->assign('whereInSection', $moduleName); |
164 | 164 | $xoopsTpl->assign('displaysubcatonindex', $xoopsModuleConfig['displaysubcatonindex']); |
165 | 165 | $xoopsTpl->assign('displaylastfaqs', $xoopsModuleConfig['displaylastfaqs']); |
166 | 166 | $xoopsTpl->assign('display_categoryname', true); |
167 | 167 | $xoopsTpl->assign('displayFull', 'full' === $xoopsModuleConfig['displaytype']); |
168 | 168 | |
169 | -$xoopsTpl->assign('lang_mainhead', _MD_SF_MAINHEAD . ' ' . $moduleName); |
|
169 | +$xoopsTpl->assign('lang_mainhead', _MD_SF_MAINHEAD.' '.$moduleName); |
|
170 | 170 | $xoopsTpl->assign('lang_mainintro', $myts->displayTarea($xoopsModuleConfig['indexwelcomemsg'], 1)); |
171 | 171 | $xoopsTpl->assign('lang_total', _MD_SF_TOTAL_SMARTFAQS); |
172 | 172 | $xoopsTpl->assign('lang_home', _MD_SF_HOME); |
@@ -185,20 +185,20 @@ discard block |
||
185 | 185 | $xoopsTpl->assign('lang_comments', _MD_SF_COMMENTS); |
186 | 186 | |
187 | 187 | // Category Navigation Bar |
188 | -require_once XOOPS_ROOT_PATH . '/class/pagenav.php'; |
|
188 | +require_once XOOPS_ROOT_PATH.'/class/pagenav.php'; |
|
189 | 189 | $pagenav = new \XoopsPageNav($totalCategories, $xoopsModuleConfig['catperpage'], $catstart, 'catstart', ''); |
190 | 190 | if (1 == $xoopsModuleConfig['useimagenavpage']) { |
191 | - $xoopsTpl->assign('catnavbar', '<div style="text-align:right;">' . $pagenav->renderImageNav() . '</div>'); |
|
191 | + $xoopsTpl->assign('catnavbar', '<div style="text-align:right;">'.$pagenav->renderImageNav().'</div>'); |
|
192 | 192 | } else { |
193 | - $xoopsTpl->assign('catnavbar', '<div style="text-align:right;">' . $pagenav->renderNav() . '</div>'); |
|
193 | + $xoopsTpl->assign('catnavbar', '<div style="text-align:right;">'.$pagenav->renderNav().'</div>'); |
|
194 | 194 | } |
195 | 195 | |
196 | 196 | // FAQ Navigation Bar |
197 | 197 | $pagenav = new \XoopsPageNav($totalFaqs, $xoopsModuleConfig['indexperpage'], $start, 'start', ''); |
198 | 198 | if (1 == $xoopsModuleConfig['useimagenavpage']) { |
199 | - $xoopsTpl->assign('navbar', '<div style="text-align:right;">' . $pagenav->renderImageNav() . '</div>'); |
|
199 | + $xoopsTpl->assign('navbar', '<div style="text-align:right;">'.$pagenav->renderImageNav().'</div>'); |
|
200 | 200 | } else { |
201 | - $xoopsTpl->assign('navbar', '<div style="text-align:right;">' . $pagenav->renderNav() . '</div>'); |
|
201 | + $xoopsTpl->assign('navbar', '<div style="text-align:right;">'.$pagenav->renderNav().'</div>'); |
|
202 | 202 | } |
203 | 203 | |
204 | 204 | // Page Title Hack by marcan |
@@ -206,4 +206,4 @@ discard block |
||
206 | 206 | $xoopsTpl->assign('xoops_pagetitle', $module_name); |
207 | 207 | // End Page Title Hack by marcan |
208 | 208 | |
209 | -require_once XOOPS_ROOT_PATH . '/footer.php'; |
|
209 | +require_once XOOPS_ROOT_PATH.'/footer.php'; |
@@ -28,42 +28,42 @@ discard block |
||
28 | 28 | if (empty($fct)) { |
29 | 29 | $fct = 'preferences'; |
30 | 30 | } |
31 | -include __DIR__ . '/../../../mainfile.php'; |
|
32 | -include XOOPS_ROOT_PATH . '/include/cp_functions.php'; |
|
31 | +include __DIR__.'/../../../mainfile.php'; |
|
32 | +include XOOPS_ROOT_PATH.'/include/cp_functions.php'; |
|
33 | 33 | |
34 | -require_once XOOPS_ROOT_PATH . '/kernel/module.php'; |
|
34 | +require_once XOOPS_ROOT_PATH.'/kernel/module.php'; |
|
35 | 35 | |
36 | 36 | $admintest = 0; |
37 | 37 | |
38 | 38 | if (is_object($xoopsUser)) { |
39 | 39 | $xoopsModule = XoopsModule::getByDirname('system'); |
40 | 40 | if (!$xoopsUser->isAdmin($xoopsModule->mid())) { |
41 | - redirect_header(XOOPS_URL . '/user.php', 3, _NOPERM); |
|
41 | + redirect_header(XOOPS_URL.'/user.php', 3, _NOPERM); |
|
42 | 42 | } |
43 | 43 | $admintest = 1; |
44 | 44 | } else { |
45 | - redirect_header(XOOPS_URL . '/user.php', 3, _NOPERM); |
|
45 | + redirect_header(XOOPS_URL.'/user.php', 3, _NOPERM); |
|
46 | 46 | } |
47 | 47 | |
48 | 48 | // include system category definitions |
49 | -require_once XOOPS_ROOT_PATH . '/modules/system/constants.php'; |
|
49 | +require_once XOOPS_ROOT_PATH.'/modules/system/constants.php'; |
|
50 | 50 | $error = false; |
51 | 51 | if (0 != $admintest) { |
52 | 52 | if (isset($fct) && '' != $fct) { |
53 | - if (file_exists(XOOPS_ROOT_PATH . '/modules/system/admin/' . $fct . '/xoops_version.php')) { |
|
53 | + if (file_exists(XOOPS_ROOT_PATH.'/modules/system/admin/'.$fct.'/xoops_version.php')) { |
|
54 | 54 | xoops_loadLanguage('admin', 'system'); |
55 | - xoops_loadLanguage('admin/' . $fct, 'system'); |
|
55 | + xoops_loadLanguage('admin/'.$fct, 'system'); |
|
56 | 56 | |
57 | - include XOOPS_ROOT_PATH . '/modules/system/admin/' . $fct . '/xoops_version.php'; |
|
57 | + include XOOPS_ROOT_PATH.'/modules/system/admin/'.$fct.'/xoops_version.php'; |
|
58 | 58 | $syspermHandler = xoops_getHandler('groupperm'); |
59 | 59 | $category = !empty($modversion['category']) ? (int)$modversion['category'] : 0; |
60 | 60 | unset($modversion); |
61 | 61 | if ($category > 0) { |
62 | - $groups =& $xoopsUser->getGroups(); |
|
62 | + $groups = & $xoopsUser->getGroups(); |
|
63 | 63 | if (in_array(XOOPS_GROUP_ADMIN, $groups) |
64 | 64 | || false !== $syspermHandler->checkRight('system_admin', $category, $groups, $xoopsModule->getVar('mid'))) { |
65 | 65 | if (file_exists("../include/{$fct}.inc.php")) { |
66 | - require_once __DIR__ . "/../include/{$fct}.inc.php"; |
|
66 | + require_once __DIR__."/../include/{$fct}.inc.php"; |
|
67 | 67 | } else { |
68 | 68 | $error = true; |
69 | 69 | } |
@@ -71,8 +71,8 @@ discard block |
||
71 | 71 | $error = true; |
72 | 72 | } |
73 | 73 | } elseif ('version' === $fct) { |
74 | - if (file_exists(XOOPS_ROOT_PATH . '/modules/system/admin/version/main.php')) { |
|
75 | - require_once XOOPS_ROOT_PATH . '/modules/system/admin/version/main.php'; |
|
74 | + if (file_exists(XOOPS_ROOT_PATH.'/modules/system/admin/version/main.php')) { |
|
75 | + require_once XOOPS_ROOT_PATH.'/modules/system/admin/version/main.php'; |
|
76 | 76 | } else { |
77 | 77 | $error = true; |
78 | 78 | } |
@@ -92,26 +92,26 @@ discard block |
||
92 | 92 | echo '<h4>System Configuration</h4>'; |
93 | 93 | echo '<table class="outer" cellpadding="4" cellspacing="1">'; |
94 | 94 | echo '<tr>'; |
95 | - $groups =& $xoopsUser->getGroups(); |
|
95 | + $groups = & $xoopsUser->getGroups(); |
|
96 | 96 | $all_ok = false; |
97 | 97 | if (!in_array(XOOPS_GROUP_ADMIN, $groups)) { |
98 | 98 | $syspermHandler = xoops_getHandler('groupperm'); |
99 | - $ok_syscats =& $syspermHandler->getItemIds('system_admin', $groups); |
|
99 | + $ok_syscats = & $syspermHandler->getItemIds('system_admin', $groups); |
|
100 | 100 | } else { |
101 | 101 | $all_ok = true; |
102 | 102 | } |
103 | - $admin_dir = XOOPS_ROOT_PATH . '/modules/system/admin'; |
|
103 | + $admin_dir = XOOPS_ROOT_PATH.'/modules/system/admin'; |
|
104 | 104 | $handle = opendir($admin_dir); |
105 | 105 | $counter = 0; |
106 | 106 | $class = 'even'; |
107 | 107 | while ($file = readdir($handle)) { |
108 | - if ('cvs' !== strtolower($file) && !preg_match('/[.]/', $file) && is_dir($admin_dir . '/' . $file)) { |
|
109 | - include $admin_dir . '/' . $file . '/xoops_version.php'; |
|
108 | + if ('cvs' !== strtolower($file) && !preg_match('/[.]/', $file) && is_dir($admin_dir.'/'.$file)) { |
|
109 | + include $admin_dir.'/'.$file.'/xoops_version.php'; |
|
110 | 110 | if ($modversion['hasAdmin']) { |
111 | 111 | $category = isset($modversion['category']) ? (int)$modversion['category'] : 0; |
112 | 112 | if (false !== $all_ok || in_array($modversion['category'], $ok_syscats)) { |
113 | 113 | echo "<td class='$class' align='center' valign='bottom' width='19%'>"; |
114 | - echo "<a href='" . XOOPS_URL . '/modules/system/admin.php?fct=' . $file . "'><b>" . trim($modversion['name']) . "</b></a>\n"; |
|
114 | + echo "<a href='".XOOPS_URL.'/modules/system/admin.php?fct='.$file."'><b>".trim($modversion['name'])."</b></a>\n"; |
|
115 | 115 | echo '</td>'; |
116 | 116 | ++$counter; |
117 | 117 | $class = ('even' === $class) ? 'odd' : 'even'; |
@@ -126,7 +126,7 @@ discard block |
||
126 | 126 | } |
127 | 127 | } |
128 | 128 | while ($counter < 5) { |
129 | - echo '<td class="' . $class . '"> </td>'; |
|
129 | + echo '<td class="'.$class.'"> </td>'; |
|
130 | 130 | $class = ('even' === $class) ? 'odd' : 'even'; |
131 | 131 | ++$counter; |
132 | 132 | } |
@@ -22,7 +22,7 @@ discard block |
||
22 | 22 | $criteria->add(new \Criteria('gperm_itemid', (int)$gperm_itemid)); |
23 | 23 | } |
24 | 24 | } |
25 | - $sql = 'DELETE FROM ' . $db->prefix('group_permission') . ' ' . $criteria->renderWhere(); |
|
25 | + $sql = 'DELETE FROM '.$db->prefix('group_permission').' '.$criteria->renderWhere(); |
|
26 | 26 | if (!$result = $db->query($sql)) { |
27 | 27 | return false; |
28 | 28 | } |
@@ -34,16 +34,16 @@ discard block |
||
34 | 34 | $modid = isset($HTTP_POST_VARS['modid']) ? (int)$HTTP_POST_VARS['modid'] : 1; |
35 | 35 | // we dont want system module permissions to be changed here ( 1 -> 0 GIJ) |
36 | 36 | if ($modid <= 0 || !is_object($xoopsUser) || !$xoopsUser->isAdmin($modid)) { |
37 | - redirect_header(XOOPS_URL . '/user.php', 1, _NOPERM); |
|
37 | + redirect_header(XOOPS_URL.'/user.php', 1, _NOPERM); |
|
38 | 38 | } |
39 | 39 | /** @var XoopsModuleHandler $moduleHandler */ |
40 | 40 | $moduleHandler = xoops_getHandler('module'); |
41 | 41 | $module = $moduleHandler->get($modid); |
42 | 42 | if (!is_object($module) || !$module->getVar('isactive')) { |
43 | - redirect_header(XOOPS_URL . '/admin.php', 1, _MODULENOEXIST); |
|
43 | + redirect_header(XOOPS_URL.'/admin.php', 1, _MODULENOEXIST); |
|
44 | 44 | } |
45 | 45 | $memberHandler = xoops_getHandler('member'); |
46 | -$group_list =& $memberHandler->getGroupList(); |
|
46 | +$group_list = & $memberHandler->getGroupList(); |
|
47 | 47 | if (is_array($HTTP_POST_VARS['perms']) && !empty($HTTP_POST_VARS['perms'])) { |
48 | 48 | $gpermHandler = xoops_getHandler('groupperm'); |
49 | 49 | foreach ($HTTP_POST_VARS['perms'] as $perm_name => $perm_data) { |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | foreach ($parent_ids as $pid) { |
67 | 67 | if (0 != $pid && !in_array($pid, array_keys($item_ids))) { |
68 | 68 | // one of the parent items were not selected, so skip this item |
69 | - $msg[] = sprintf(_MD_AM_PERMADDNG, '<b>' . $perm_name . '</b>', '<b>' . $perm_data['itemname'][$item_id] . '</b>', '<b>' . $group_list[$group_id] . '</b>') . ' (' . _MD_AM_PERMADDNGP . ')'; |
|
69 | + $msg[] = sprintf(_MD_AM_PERMADDNG, '<b>'.$perm_name.'</b>', '<b>'.$perm_data['itemname'][$item_id].'</b>', '<b>'.$group_list[$group_id].'</b>').' ('._MD_AM_PERMADDNGP.')'; |
|
70 | 70 | continue 2; |
71 | 71 | } |
72 | 72 | } |
@@ -77,9 +77,9 @@ discard block |
||
77 | 77 | $gperm->setVar('gperm_modid', $modid); |
78 | 78 | $gperm->setVar('gperm_itemid', $item_id); |
79 | 79 | if (!$gpermHandler->insert($gperm)) { |
80 | - $msg[] = sprintf(_MD_AM_PERMADDNG, '<b>' . $perm_name . '</b>', '<b>' . $perm_data['itemname'][$item_id] . '</b>', '<b>' . $group_list[$group_id] . '</b>'); |
|
80 | + $msg[] = sprintf(_MD_AM_PERMADDNG, '<b>'.$perm_name.'</b>', '<b>'.$perm_data['itemname'][$item_id].'</b>', '<b>'.$group_list[$group_id].'</b>'); |
|
81 | 81 | } else { |
82 | - $msg[] = sprintf(_MD_AM_PERMADDOK, '<b>' . $perm_name . '</b>', '<b>' . $perm_data['itemname'][$item_id] . '</b>', '<b>' . $group_list[$group_id] . '</b>'); |
|
82 | + $msg[] = sprintf(_MD_AM_PERMADDOK, '<b>'.$perm_name.'</b>', '<b>'.$perm_data['itemname'][$item_id].'</b>', '<b>'.$group_list[$group_id].'</b>'); |
|
83 | 83 | } |
84 | 84 | unset($gperm); |
85 | 85 | } |
@@ -9,7 +9,7 @@ discard block |
||
9 | 9 | use XoopsModules\Smartfaq; |
10 | 10 | use XoopsModules\Smartfaq\Constants; |
11 | 11 | |
12 | -require_once __DIR__ . '/admin_header.php'; |
|
12 | +require_once __DIR__.'/admin_header.php'; |
|
13 | 13 | $myts = \MyTextSanitizer::getInstance(); |
14 | 14 | |
15 | 15 | $faqid = isset($_POST['faqid']) ? (int)$_POST['faqid'] : 0; |
@@ -35,23 +35,23 @@ discard block |
||
35 | 35 | global $xoopsConfig, $xoopsModuleConfig, $xoopsModule; |
36 | 36 | echo "<table width='100%' cellspacing='1' cellpadding='3' border='0' class='outer'>"; |
37 | 37 | echo '<tr>'; |
38 | - echo "<th width='40' class='bg3' align='center'><b>" . _AM_SF_FAQID . '</b></td>'; |
|
39 | - echo "<th width='20%' class='bg3' align='center'><b>" . _AM_SF_FAQCAT . '</b></td>'; |
|
40 | - echo "<th class='bg3' align='center'><b>" . _AM_SF_QUESTION . '</b></td>'; |
|
38 | + echo "<th width='40' class='bg3' align='center'><b>"._AM_SF_FAQID.'</b></td>'; |
|
39 | + echo "<th width='20%' class='bg3' align='center'><b>"._AM_SF_FAQCAT.'</b></td>'; |
|
40 | + echo "<th class='bg3' align='center'><b>"._AM_SF_QUESTION.'</b></td>'; |
|
41 | 41 | |
42 | - echo "<th width='90' class='bg3' align='center'><b>" . _AM_SF_ASKED . '</b></td>'; |
|
43 | - echo "<th width='90' class='bg3' align='center'><b>" . _AM_SF_ANSWERED . '</b></td>'; |
|
42 | + echo "<th width='90' class='bg3' align='center'><b>"._AM_SF_ASKED.'</b></td>'; |
|
43 | + echo "<th width='90' class='bg3' align='center'><b>"._AM_SF_ANSWERED.'</b></td>'; |
|
44 | 44 | |
45 | - echo "<th width='90' class='bg3' align='center'><b>" . _AM_SF_CREATED . '</b></td>'; |
|
46 | - echo "<th width='90' class='bg3' align='center'><b>" . _AM_SF_STATUS . '</b></td>'; |
|
45 | + echo "<th width='90' class='bg3' align='center'><b>"._AM_SF_CREATED.'</b></td>'; |
|
46 | + echo "<th width='90' class='bg3' align='center'><b>"._AM_SF_STATUS.'</b></td>'; |
|
47 | 47 | //echo "<td width='30' class='bg3' align='center'><b>" . _AM_SF_ANSWERS . "</b></td>"; |
48 | - echo "<th width='90' class='bg3' align='center'><b>" . _AM_SF_ACTION . '</b></td>'; |
|
48 | + echo "<th width='90' class='bg3' align='center'><b>"._AM_SF_ACTION.'</b></td>'; |
|
49 | 49 | echo '</tr>'; |
50 | 50 | } |
51 | 51 | |
52 | 52 | // Code for the page |
53 | -require_once XOOPS_ROOT_PATH . '/class/xoopslists.php'; |
|
54 | -require_once XOOPS_ROOT_PATH . '/class/pagenav.php'; |
|
53 | +require_once XOOPS_ROOT_PATH.'/class/xoopslists.php'; |
|
54 | +require_once XOOPS_ROOT_PATH.'/class/pagenav.php'; |
|
55 | 55 | |
56 | 56 | // Creating the category handler object |
57 | 57 | /** @var \XoopsModules\Smartfaq\CategoryHandler $categoryHandler */ |
@@ -134,9 +134,9 @@ discard block |
||
134 | 134 | |
135 | 135 | // Construction of lower table |
136 | 136 | Smartfaq\Utility::collapsableBar('bottomtable', 'bottomtableicon'); |
137 | -echo "<img id='bottomtableicon' src=" . XOOPS_URL . '/modules/' . $xoopsModule->dirname() . "/assets/images/icon/close12.gif alt=''></a> " . _AM_SF_ALLFAQS . '</h3>'; |
|
137 | +echo "<img id='bottomtableicon' src=".XOOPS_URL.'/modules/'.$xoopsModule->dirname()."/assets/images/icon/close12.gif alt=''></a> "._AM_SF_ALLFAQS.'</h3>'; |
|
138 | 138 | echo "<div id='bottomtable'>"; |
139 | -echo '<span style="color: #567; margin: 3px 0 18px 0; font-size: small; display: block; ">' . _AM_SF_ALLFAQSMSG . '</span>'; |
|
139 | +echo '<span style="color: #567; margin: 3px 0 18px 0; font-size: small; display: block; ">'._AM_SF_ALLFAQSMSG.'</span>'; |
|
140 | 140 | |
141 | 141 | $showingtxt = ''; |
142 | 142 | $selectedtxt = ''; |
@@ -205,98 +205,98 @@ discard block |
||
205 | 205 | case Constants::SF_STATUS_ASKED: |
206 | 206 | $selectedtxt1 = 'selected'; |
207 | 207 | $caption = _AM_SF_ASKED; |
208 | - $cond = ' WHERE status = ' . Constants::SF_STATUS_ASKED . ' '; |
|
208 | + $cond = ' WHERE status = '.Constants::SF_STATUS_ASKED.' '; |
|
209 | 209 | $status_explaination = _AM_SF_ASKED_EXP; |
210 | 210 | break; |
211 | 211 | |
212 | 212 | case Constants::SF_STATUS_OPENED: |
213 | 213 | $selectedtxt2 = 'selected'; |
214 | 214 | $caption = _AM_SF_OPENED; |
215 | - $cond = ' WHERE status = ' . Constants::SF_STATUS_OPENED . ' '; |
|
215 | + $cond = ' WHERE status = '.Constants::SF_STATUS_OPENED.' '; |
|
216 | 216 | $status_explaination = _AM_SF_OPENED_EXP; |
217 | 217 | break; |
218 | 218 | |
219 | 219 | case Constants::SF_STATUS_ANSWERED: |
220 | 220 | $selectedtxt3 = 'selected'; |
221 | 221 | $caption = _AM_SF_ANSWERED; |
222 | - $cond = ' WHERE status = ' . Constants::SF_STATUS_ANSWERED . ' '; |
|
222 | + $cond = ' WHERE status = '.Constants::SF_STATUS_ANSWERED.' '; |
|
223 | 223 | $status_explaination = _AM_SF_ANSWERED_EXP; |
224 | 224 | break; |
225 | 225 | |
226 | 226 | case Constants::SF_STATUS_SUBMITTED: |
227 | 227 | $selectedtxt4 = 'selected'; |
228 | 228 | $caption = _AM_SF_SUBMITTED; |
229 | - $cond = ' WHERE status = ' . Constants::SF_STATUS_SUBMITTED . ' '; |
|
229 | + $cond = ' WHERE status = '.Constants::SF_STATUS_SUBMITTED.' '; |
|
230 | 230 | $status_explaination = _AM_SF_SUBMITTED_EXP; |
231 | 231 | break; |
232 | 232 | |
233 | 233 | case Constants::SF_STATUS_PUBLISHED: |
234 | 234 | $selectedtxt5 = 'selected'; |
235 | 235 | $caption = _AM_SF_PUBLISHED; |
236 | - $cond = ' WHERE status = ' . Constants::SF_STATUS_PUBLISHED . ' '; |
|
236 | + $cond = ' WHERE status = '.Constants::SF_STATUS_PUBLISHED.' '; |
|
237 | 237 | $status_explaination = _AM_SF_PUBLISHED_EXP; |
238 | 238 | break; |
239 | 239 | |
240 | 240 | case Constants::SF_STATUS_NEW_ANSWER: |
241 | 241 | $selectedtxt6 = 'selected'; |
242 | 242 | $caption = _AM_SF_NEW_ANSWER; |
243 | - $cond = ' WHERE status = ' . Constants::SF_STATUS_NEW_ANSWER . ' '; |
|
243 | + $cond = ' WHERE status = '.Constants::SF_STATUS_NEW_ANSWER.' '; |
|
244 | 244 | $status_explaination = _AM_SF_NEW_ANSWER_EXP; |
245 | 245 | break; |
246 | 246 | |
247 | 247 | case Constants::SF_STATUS_OFFLINE: |
248 | 248 | $selectedtxt7 = 'selected'; |
249 | 249 | $caption = _AM_SF_OFFLINE; |
250 | - $cond = ' WHERE status = ' . Constants::SF_STATUS_OFFLINE . ' '; |
|
250 | + $cond = ' WHERE status = '.Constants::SF_STATUS_OFFLINE.' '; |
|
251 | 251 | $status_explaination = _AM_SF_OFFLINE_EXP; |
252 | 252 | break; |
253 | 253 | |
254 | 254 | case Constants::SF_STATUS_REJECTED_QUESTION: |
255 | 255 | $selectedtxt8 = 'selected'; |
256 | 256 | $caption = _AM_SF_REJECTED_QUESTION; |
257 | - $cond = ' WHERE status = ' . Constants::SF_STATUS_REJECTED_QUESTION . ' '; |
|
257 | + $cond = ' WHERE status = '.Constants::SF_STATUS_REJECTED_QUESTION.' '; |
|
258 | 258 | $status_explaination = _AM_SF_REJECTED_QUESTION_EXP; |
259 | 259 | break; |
260 | 260 | |
261 | 261 | case Constants::SF_STATUS_REJECTED_SMARTFAQ: |
262 | 262 | $selectedtxt9 = 'selected'; |
263 | 263 | $caption = _AM_SF_REJECTED_SMARTFAQ; |
264 | - $cond = ' WHERE status = ' . Constants::SF_STATUS_REJECTED_SMARTFAQ . ' '; |
|
264 | + $cond = ' WHERE status = '.Constants::SF_STATUS_REJECTED_SMARTFAQ.' '; |
|
265 | 265 | $status_explaination = _AM_SF_REJECTED_SMARTFAQ_EXP; |
266 | 266 | break; |
267 | 267 | } |
268 | 268 | |
269 | 269 | /* -- Code to show selected terms -- */ |
270 | -echo "<form name='pick' id='pick' action='" . $_SERVER['PHP_SELF'] . "' method='POST' style='margin: 0;'>"; |
|
270 | +echo "<form name='pick' id='pick' action='".$_SERVER['PHP_SELF']."' method='POST' style='margin: 0;'>"; |
|
271 | 271 | |
272 | 272 | echo " |
273 | 273 | <table width='100%' cellspacing='1' cellpadding='2' border='0' style='border-left: 1px solid silver; border-top: 1px solid silver; border-right: 1px solid silver;'> |
274 | 274 | <tr> |
275 | - <td><span style='font-weight: bold; font-size: 12px; font-variant: small-caps;'>" . _AM_SF_SHOWING . ' ' . $caption . "</span></td> |
|
276 | - <td align='right'>" . _AM_SF_SELECT_SORT . " |
|
275 | + <td><span style='font-weight: bold; font-size: 12px; font-variant: small-caps;'>" . _AM_SF_SHOWING.' '.$caption."</span></td> |
|
276 | + <td align='right'>" . _AM_SF_SELECT_SORT." |
|
277 | 277 | <select name='sortsel' onchange='submit()'> |
278 | - <option value='faq.faqid' $sorttxtfaqid>" . _AM_SF_ID . "</option> |
|
279 | - <option value='category.name' $sorttxtcategory>" . _AM_SF_CATEGORY . "</option> |
|
280 | - <option value='faq.question' $sorttxtquestion>" . _AM_SF_QUESTION . "</option> |
|
281 | - <option value='faq.datesub' $sorttxtcreated>" . _AM_SF_CREATED . "</option> |
|
282 | - <option value='faq.weight' $sorttxtweight>" . _AM_SF_WEIGHT . "</option> |
|
278 | + <option value='faq.faqid' $sorttxtfaqid>"._AM_SF_ID."</option> |
|
279 | + <option value='category.name' $sorttxtcategory>"._AM_SF_CATEGORY."</option> |
|
280 | + <option value='faq.question' $sorttxtquestion>"._AM_SF_QUESTION."</option> |
|
281 | + <option value='faq.datesub' $sorttxtcreated>"._AM_SF_CREATED."</option> |
|
282 | + <option value='faq.weight' $sorttxtweight>"._AM_SF_WEIGHT."</option> |
|
283 | 283 | </select> |
284 | 284 | <select name='ordersel' onchange='submit()'> |
285 | - <option value='ASC' $ordertxtasc>" . _AM_SF_ASC . "</option> |
|
286 | - <option value='DESC' $ordertxtdesc>" . _AM_SF_DESC . '</option> |
|
285 | + <option value='ASC' $ordertxtasc>"._AM_SF_ASC."</option> |
|
286 | + <option value='DESC' $ordertxtdesc>"._AM_SF_DESC.'</option> |
|
287 | 287 | </select> |
288 | - ' . _AM_SF_SELECT_STATUS . " : |
|
288 | + ' . _AM_SF_SELECT_STATUS." : |
|
289 | 289 | <select name='statussel' onchange='submit()'> |
290 | - <option value='0' $selectedtxt0>" . _AM_SF_ALL . " [$totalfaqs]</option> |
|
291 | - <option value='1' $selectedtxt1>" . _AM_SF_ASKED . " [$totalasked]</option> |
|
292 | - <option value='2' $selectedtxt2>" . _AM_SF_OPENED . " [$totalopened]</option> |
|
293 | - <option value='3' $selectedtxt3>" . _AM_SF_ANSWERED . " [$totalanswered]</option> |
|
294 | - <option value='4' $selectedtxt4>" . _AM_SF_SUBMITTED . " [$totalsubmitted]</option> |
|
295 | - <option value='5' $selectedtxt5>" . _AM_SF_PUBLISHED . " [$totalpublished]</option> |
|
296 | - <option value='6' $selectedtxt6>" . _AM_SF_NEWANSWER . " [$totalnewanswers]</option> |
|
297 | - <option value='7' $selectedtxt7>" . _AM_SF_OFFLINE . " [$totaloffline]</option> |
|
298 | - <option value='8' $selectedtxt8>" . _AM_SF_REJECTED_QUESTION . " [$totalrejectedquestion]</option> |
|
299 | - <option value='9' $selectedtxt9>" . _AM_SF_REJECTED_SMARTFAQ . " [$totalrejectedsmartfaq]</option> |
|
290 | + <option value='0' $selectedtxt0>"._AM_SF_ALL." [$totalfaqs]</option> |
|
291 | + <option value='1' $selectedtxt1>"._AM_SF_ASKED." [$totalasked]</option> |
|
292 | + <option value='2' $selectedtxt2>"._AM_SF_OPENED." [$totalopened]</option> |
|
293 | + <option value='3' $selectedtxt3>"._AM_SF_ANSWERED." [$totalanswered]</option> |
|
294 | + <option value='4' $selectedtxt4>"._AM_SF_SUBMITTED." [$totalsubmitted]</option> |
|
295 | + <option value='5' $selectedtxt5>"._AM_SF_PUBLISHED." [$totalpublished]</option> |
|
296 | + <option value='6' $selectedtxt6>"._AM_SF_NEWANSWER." [$totalnewanswers]</option> |
|
297 | + <option value='7' $selectedtxt7>"._AM_SF_OFFLINE." [$totaloffline]</option> |
|
298 | + <option value='8' $selectedtxt8>"._AM_SF_REJECTED_QUESTION." [$totalrejectedquestion]</option> |
|
299 | + <option value='9' $selectedtxt9>"._AM_SF_REJECTED_SMARTFAQ." [$totalrejectedsmartfaq]</option> |
|
300 | 300 | </select> |
301 | 301 | </td> |
302 | 302 | </tr> |
@@ -311,7 +311,7 @@ discard block |
||
311 | 311 | $faqsObj = $faqHandler->getFaqsAdminSide($xoopsModuleConfig['perpage'], $startentry, $statusSelected, -1, $sortsel, $ordersel); |
312 | 312 | |
313 | 313 | // fetching all categories |
314 | -$allCats = $categoryHandler->getObjects(null, true); |
|
314 | +$allCats = $categoryHandler->getObjects(null, true); |
|
315 | 315 | //$totalItemsOnPage = count($faqsObj); |
316 | 316 | buildTable(); |
317 | 317 | |
@@ -334,65 +334,65 @@ discard block |
||
334 | 334 | switch ($faqsObj[$i]->status()) { |
335 | 335 | case Constants::SF_STATUS_ASKED: |
336 | 336 | $statustxt = _AM_SF_ASKED; |
337 | - $approve = "<a href='question.php?op=mod&faqid=" . $faqsObj[$i]->faqid() . "'><img src='" . $pathIcon16 . '/on.png' . "' title='" . _AM_SF_QUESTION_MODERATE . "' alt='" . _AM_SF_QUESTION_MODERATE . "'></a> "; |
|
337 | + $approve = "<a href='question.php?op=mod&faqid=".$faqsObj[$i]->faqid()."'><img src='".$pathIcon16.'/on.png'."' title='"._AM_SF_QUESTION_MODERATE."' alt='"._AM_SF_QUESTION_MODERATE."'></a> "; |
|
338 | 338 | $modify = ''; |
339 | - $delete = "<a href='question.php?op=del&faqid=" . $faqsObj[$i]->faqid() . "'><img src='" . $pathIcon16 . '/delete.png' . "' title='" . _AM_SF_DELETEQUESTION . "' alt='" . _AM_SF_DELETEQUESTION . "'></a>"; |
|
339 | + $delete = "<a href='question.php?op=del&faqid=".$faqsObj[$i]->faqid()."'><img src='".$pathIcon16.'/delete.png'."' title='"._AM_SF_DELETEQUESTION."' alt='"._AM_SF_DELETEQUESTION."'></a>"; |
|
340 | 340 | break; |
341 | 341 | |
342 | 342 | case Constants::SF_STATUS_OPENED: |
343 | 343 | $statustxt = _AM_SF_OPENED; |
344 | 344 | $approve = ''; |
345 | - $modify = "<a href='question.php?op=mod&faqid=" . $faqsObj[$i]->faqid() . "'><img src='" . $pathIcon16 . '/edit.png' . "' title='" . _AM_SF_QUESTION_EDIT . "' alt='" . _AM_SF_QUESTION_EDIT . "'></a> "; |
|
346 | - $delete = "<a href='question.php?op=del&faqid=" . $faqsObj[$i]->faqid() . "'><img src='" . $pathIcon16 . '/delete.png' . "' title='" . _AM_SF_DELETEQUESTION . "' alt='" . _AM_SF_DELETEQUESTION . "'></a>"; |
|
345 | + $modify = "<a href='question.php?op=mod&faqid=".$faqsObj[$i]->faqid()."'><img src='".$pathIcon16.'/edit.png'."' title='"._AM_SF_QUESTION_EDIT."' alt='"._AM_SF_QUESTION_EDIT."'></a> "; |
|
346 | + $delete = "<a href='question.php?op=del&faqid=".$faqsObj[$i]->faqid()."'><img src='".$pathIcon16.'/delete.png'."' title='"._AM_SF_DELETEQUESTION."' alt='"._AM_SF_DELETEQUESTION."'></a>"; |
|
347 | 347 | break; |
348 | 348 | |
349 | 349 | case Constants::SF_STATUS_ANSWERED: |
350 | 350 | $statustxt = _AM_SF_ANSWERED; |
351 | - $approve = "<a href='answer.php?op=mod&faqid=" . $faqsObj[$i]->faqid() . "'><img src='" . XOOPS_URL . '/modules/' . $xoopsModule->dirname() . "/assets/images/icon/approve.gif' title='" . _AM_SF_ANSWERED_MODERATE . "' alt='" . _AM_SF_ANSWERED_MODERATE . "'></a> "; |
|
351 | + $approve = "<a href='answer.php?op=mod&faqid=".$faqsObj[$i]->faqid()."'><img src='".XOOPS_URL.'/modules/'.$xoopsModule->dirname()."/assets/images/icon/approve.gif' title='"._AM_SF_ANSWERED_MODERATE."' alt='"._AM_SF_ANSWERED_MODERATE."'></a> "; |
|
352 | 352 | $modify = ''; |
353 | - $delete = "<a href='question.php?op=del&faqid=" . $faqsObj[$i]->faqid() . "'><img src='" . XOOPS_URL . '/modules/' . $xoopsModule->dirname() . "/assets/images/icon/delete.gif' title='" . _AM_SF_DELETEQUESTION . "' alt='" . _AM_SF_DELETEQUESTION . "'></a>"; |
|
353 | + $delete = "<a href='question.php?op=del&faqid=".$faqsObj[$i]->faqid()."'><img src='".XOOPS_URL.'/modules/'.$xoopsModule->dirname()."/assets/images/icon/delete.gif' title='"._AM_SF_DELETEQUESTION."' alt='"._AM_SF_DELETEQUESTION."'></a>"; |
|
354 | 354 | break; |
355 | 355 | |
356 | 356 | case Constants::SF_STATUS_SUBMITTED: |
357 | 357 | $statustxt = _AM_SF_SUBMITTED; |
358 | - $approve = "<a href='faq.php?op=mod&faqid=" . $faqsObj[$i]->faqid() . "'><img src='" . XOOPS_URL . '/modules/' . $xoopsModule->dirname() . "/assets/images/icon/approve.gif' title='" . _AM_SF_SUBMISSION_MODERATE . "' alt='" . _AM_SF_SUBMISSION_MODERATE . "'></a> "; |
|
359 | - $delete = "<a href='faq.php?op=del&faqid=" . $faqsObj[$i]->faqid() . "'><img src='" . XOOPS_URL . '/modules/' . $xoopsModule->dirname() . "/assets/images/icon/delete.gif' title='" . _AM_SF_DELETEART . "' alt='" . _AM_SF_DELETEART . "'></a>"; |
|
358 | + $approve = "<a href='faq.php?op=mod&faqid=".$faqsObj[$i]->faqid()."'><img src='".XOOPS_URL.'/modules/'.$xoopsModule->dirname()."/assets/images/icon/approve.gif' title='"._AM_SF_SUBMISSION_MODERATE."' alt='"._AM_SF_SUBMISSION_MODERATE."'></a> "; |
|
359 | + $delete = "<a href='faq.php?op=del&faqid=".$faqsObj[$i]->faqid()."'><img src='".XOOPS_URL.'/modules/'.$xoopsModule->dirname()."/assets/images/icon/delete.gif' title='"._AM_SF_DELETEART."' alt='"._AM_SF_DELETEART."'></a>"; |
|
360 | 360 | $modify = ''; |
361 | 361 | break; |
362 | 362 | |
363 | 363 | case Constants::SF_STATUS_PUBLISHED: |
364 | 364 | $statustxt = _AM_SF_PUBLISHED; |
365 | 365 | $approve = ''; |
366 | - $modify = "<a href='faq.php?op=mod&faqid=" . $faqsObj[$i]->faqid() . "'><img src='" . $pathIcon16 . '/edit.png' . "' title='" . _AM_SF_FAQ_EDIT . "' alt='" . _AM_SF_FAQ_EDIT . "'></a> "; |
|
367 | - $delete = "<a href='faq.php?op=del&faqid=" . $faqsObj[$i]->faqid() . "'><img src='" . $pathIcon16 . '/delete.png' . "' title='" . _AM_SF_DELETEART . "' alt='" . _AM_SF_DELETEART . "'></a>"; |
|
366 | + $modify = "<a href='faq.php?op=mod&faqid=".$faqsObj[$i]->faqid()."'><img src='".$pathIcon16.'/edit.png'."' title='"._AM_SF_FAQ_EDIT."' alt='"._AM_SF_FAQ_EDIT."'></a> "; |
|
367 | + $delete = "<a href='faq.php?op=del&faqid=".$faqsObj[$i]->faqid()."'><img src='".$pathIcon16.'/delete.png'."' title='"._AM_SF_DELETEART."' alt='"._AM_SF_DELETEART."'></a>"; |
|
368 | 368 | break; |
369 | 369 | |
370 | 370 | case Constants::SF_STATUS_NEW_ANSWER: |
371 | 371 | $statustxt = _AM_SF_NEWANSWER; |
372 | - $approve = "<a href='answer.php?op=mod&faqid=" . $faqsObj[$i]->faqid() . "'><img src='" . XOOPS_URL . '/modules/' . $xoopsModule->dirname() . "/assets/images/icon/approve.gif' title='" . _AM_SF_FAQ_EDIT . "' alt='" . _AM_SF_FAQ_EDIT . "'></a> "; |
|
373 | - $delete = "<a href='faq.php?op=del&faqid=" . $faqsObj[$i]->faqid() . "'><img src='" . XOOPS_URL . '/modules/' . $xoopsModule->dirname() . "/assets/images/icon/delete.gif' title='" . _AM_SF_DELETEART . "' alt='" . _AM_SF_DELETEART . "'></a>"; |
|
372 | + $approve = "<a href='answer.php?op=mod&faqid=".$faqsObj[$i]->faqid()."'><img src='".XOOPS_URL.'/modules/'.$xoopsModule->dirname()."/assets/images/icon/approve.gif' title='"._AM_SF_FAQ_EDIT."' alt='"._AM_SF_FAQ_EDIT."'></a> "; |
|
373 | + $delete = "<a href='faq.php?op=del&faqid=".$faqsObj[$i]->faqid()."'><img src='".XOOPS_URL.'/modules/'.$xoopsModule->dirname()."/assets/images/icon/delete.gif' title='"._AM_SF_DELETEART."' alt='"._AM_SF_DELETEART."'></a>"; |
|
374 | 374 | $modify = ''; |
375 | 375 | break; |
376 | 376 | |
377 | 377 | case Constants::SF_STATUS_OFFLINE: |
378 | 378 | $statustxt = _AM_SF_OFFLINE; |
379 | 379 | $approve = ''; |
380 | - $modify = "<a href='faq.php?op=mod&faqid=" . $faqsObj[$i]->faqid() . "'><img src='" . $pathIcon16 . '/edit.png' . "' title='" . _AM_SF_FAQ_EDIT . "' alt='" . _AM_SF_FAQ_EDIT . "'></a> "; |
|
381 | - $delete = "<a href='faq.php?op=del&faqid=" . $faqsObj[$i]->faqid() . "'><img src='" . $pathIcon16 . '/delete.png' . "' title='" . _AM_SF_DELETEART . "' alt='" . _AM_SF_DELETEART . "'></a>"; |
|
380 | + $modify = "<a href='faq.php?op=mod&faqid=".$faqsObj[$i]->faqid()."'><img src='".$pathIcon16.'/edit.png'."' title='"._AM_SF_FAQ_EDIT."' alt='"._AM_SF_FAQ_EDIT."'></a> "; |
|
381 | + $delete = "<a href='faq.php?op=del&faqid=".$faqsObj[$i]->faqid()."'><img src='".$pathIcon16.'/delete.png'."' title='"._AM_SF_DELETEART."' alt='"._AM_SF_DELETEART."'></a>"; |
|
382 | 382 | break; |
383 | 383 | |
384 | 384 | case Constants::SF_STATUS_REJECTED_QUESTION: |
385 | 385 | $statustxt = _AM_SF_REJECTED_QUESTION; |
386 | 386 | $approve = ''; |
387 | - $modify = "<a href='faq.php?op=mod&faqid=" . $faqsObj[$i]->faqid() . "'><img src='" . $pathIcon16 . '/edit.png' . "' title='" . _AM_SF_REJECTED_EDIT . "' alt='" . _AM_SF_REJECTED_EDIT . "'></a> "; |
|
388 | - $delete = "<a href='question.php?op=del&faqid=" . $faqsObj[$i]->faqid() . "'><img src='" . $pathIcon16 . '/delete.png' . "' title='" . _AM_SF_DELETEQUESTION . "' alt='" . _AM_SF_DELETEQUESTION . "'></a>"; |
|
387 | + $modify = "<a href='faq.php?op=mod&faqid=".$faqsObj[$i]->faqid()."'><img src='".$pathIcon16.'/edit.png'."' title='"._AM_SF_REJECTED_EDIT."' alt='"._AM_SF_REJECTED_EDIT."'></a> "; |
|
388 | + $delete = "<a href='question.php?op=del&faqid=".$faqsObj[$i]->faqid()."'><img src='".$pathIcon16.'/delete.png'."' title='"._AM_SF_DELETEQUESTION."' alt='"._AM_SF_DELETEQUESTION."'></a>"; |
|
389 | 389 | break; |
390 | 390 | |
391 | 391 | case Constants::SF_STATUS_REJECTED_SMARTFAQ: |
392 | 392 | $statustxt = _AM_SF_REJECTED_SMARTFAQ; |
393 | 393 | $approve = ''; |
394 | - $modify = "<a href='faq.php?op=mod&faqid=" . $faqsObj[$i]->faqid() . "'><img src='" . $pathIcon16 . '/edit.png' . "' title='" . _AM_SF_REJECTED_EDIT . "' alt='" . _AM_SF_REJECTED_EDIT . "'></a> "; |
|
395 | - $delete = "<a href='faq.php?op=del&faqid=" . $faqsObj[$i]->faqid() . "'><img src='" . $pathIcon16 . '/delete.png' . "' title='" . _AM_SF_DELETEART . "' alt='" . _AM_SF_DELETEART . "'></a>"; |
|
394 | + $modify = "<a href='faq.php?op=mod&faqid=".$faqsObj[$i]->faqid()."'><img src='".$pathIcon16.'/edit.png'."' title='"._AM_SF_REJECTED_EDIT."' alt='"._AM_SF_REJECTED_EDIT."'></a> "; |
|
395 | + $delete = "<a href='faq.php?op=del&faqid=".$faqsObj[$i]->faqid()."'><img src='".$pathIcon16.'/delete.png'."' title='"._AM_SF_DELETEART."' alt='"._AM_SF_DELETEART."'></a>"; |
|
396 | 396 | break; |
397 | 397 | |
398 | 398 | case 'default': |
@@ -406,14 +406,14 @@ discard block |
||
406 | 406 | //$modify = "<a href='faq.php?op=mod&faqid=" . $faqid . "'><img src='" . XOOPS_URL . "/modules/" . $xoopsModule->dirname() . "/assets/images/icon/edit.gif' alt='" . _AM_SF_EDITART . "'></a> "; |
407 | 407 | |
408 | 408 | echo '<tr>'; |
409 | - echo "<td class='head' align='center'>" . $faqsObj[$i]->faqid() . '</td>'; |
|
410 | - echo "<td class='even' align='left'>" . $categoryObj->name() . '</td>'; |
|
411 | - echo "<td class='even' align='left'>" . $faqsObj[$i]->question(100) . '</td>'; |
|
409 | + echo "<td class='head' align='center'>".$faqsObj[$i]->faqid().'</td>'; |
|
410 | + echo "<td class='even' align='left'>".$categoryObj->name().'</td>'; |
|
411 | + echo "<td class='even' align='left'>".$faqsObj[$i]->question(100).'</td>'; |
|
412 | 412 | |
413 | 413 | //mb--------------------------------------- |
414 | 414 | //adding name of the Question Submitter |
415 | 415 | $requester = Smartfaq\Utility::getLinkedUnameFromId($faqsObj[$i]->uid(), $smartModuleConfig['userealname']); |
416 | - echo "<td class='even' align='center'>" . $requester . '</td>'; |
|
416 | + echo "<td class='even' align='center'>".$requester.'</td>'; |
|
417 | 417 | |
418 | 418 | //adding name of the Answer Submitter |
419 | 419 | /** @var \XoopsModules\Smartfaq\AnswerHandler $answerHandler */ |
@@ -423,7 +423,7 @@ discard block |
||
423 | 423 | $criteria->add(new \Criteria('faqid', $faqsObj[$i]->faqid())); |
424 | 424 | $criteria->add(new \Criteria('status', true)); |
425 | 425 | |
426 | - $answerObjects =& $answerHandler->getObjects($criteria, true); |
|
426 | + $answerObjects = & $answerHandler->getObjects($criteria, true); |
|
427 | 427 | |
428 | 428 | foreach (array_keys($answerObjects) as $j) { |
429 | 429 | $answerObj = $answerObjects[$j]; |
@@ -436,20 +436,20 @@ discard block |
||
436 | 436 | } else { |
437 | 437 | $answerSubmitter = '--------'; |
438 | 438 | } |
439 | - echo "<td class='even' align='center'>" . $answerSubmitter . '</td>'; |
|
439 | + echo "<td class='even' align='center'>".$answerSubmitter.'</td>'; |
|
440 | 440 | |
441 | 441 | //mb--------------------------------------- |
442 | 442 | |
443 | - echo "<td class='even' align='center'>" . $faqsObj[$i]->datesub('s') . '</td>'; |
|
444 | - echo "<td class='even' align='center'>" . $statustxt . '</td>'; |
|
443 | + echo "<td class='even' align='center'>".$faqsObj[$i]->datesub('s').'</td>'; |
|
444 | + echo "<td class='even' align='center'>".$statustxt.'</td>'; |
|
445 | 445 | //echo "<td class='even' align='center'>" . $answers . "</td>"; |
446 | - echo "<td class='even' align='center'> " . $approve . $modify . $delete . '</td>'; |
|
446 | + echo "<td class='even' align='center'> ".$approve.$modify.$delete.'</td>'; |
|
447 | 447 | echo '</tr>'; |
448 | 448 | } |
449 | 449 | } else { |
450 | 450 | // that is, $numrows = 0, there's no entries yet |
451 | 451 | echo '<tr>'; |
452 | - echo "<td class='head' align='center' colspan= '7'>" . _AM_SF_NOFAQSSEL . '</td>'; |
|
452 | + echo "<td class='head' align='center' colspan= '7'>"._AM_SF_NOFAQSSEL.'</td>'; |
|
453 | 453 | echo '</tr>'; |
454 | 454 | } |
455 | 455 | echo "</table>\n"; |
@@ -457,9 +457,9 @@ discard block |
||
457 | 457 | $pagenav = new \XoopsPageNav($numrows, $xoopsModuleConfig['perpage'], $startentry, 'startentry', "statussel=$statussel&sortsel=$sortsel&ordersel=$ordersel"); |
458 | 458 | |
459 | 459 | if (1 == $xoopsModuleConfig['useimagenavpage']) { |
460 | - echo '<div style="text-align:right; background-color: white; margin: 10px 0;">' . $pagenav->renderImageNav() . '</div>'; |
|
460 | + echo '<div style="text-align:right; background-color: white; margin: 10px 0;">'.$pagenav->renderImageNav().'</div>'; |
|
461 | 461 | } else { |
462 | - echo '<div style="text-align:right; background-color: white; margin: 10px 0;">' . $pagenav->renderNav() . '</div>'; |
|
462 | + echo '<div style="text-align:right; background-color: white; margin: 10px 0;">'.$pagenav->renderNav().'</div>'; |
|
463 | 463 | } |
464 | 464 | // ENDs code to show active entries |
465 | 465 | echo '</div>'; |
@@ -467,4 +467,4 @@ discard block |
||
467 | 467 | echo '</div>'; |
468 | 468 | echo '</div>'; |
469 | 469 | |
470 | -require_once __DIR__ . '/admin_footer.php'; |
|
470 | +require_once __DIR__.'/admin_footer.php'; |
@@ -9,14 +9,14 @@ discard block |
||
9 | 9 | use XoopsModules\Smartfaq; |
10 | 10 | use XoopsModules\Smartfaq\Constants; |
11 | 11 | |
12 | -require_once __DIR__ . '/header.php'; |
|
12 | +require_once __DIR__.'/header.php'; |
|
13 | 13 | |
14 | 14 | global $xoopsConfig, $xoopsModuleConfig, $xoopsModule; |
15 | 15 | |
16 | 16 | $GLOBALS['xoopsOption']['template_main'] = 'smartfaq_category.tpl'; |
17 | 17 | |
18 | -require_once XOOPS_ROOT_PATH . '/header.php'; |
|
19 | -require_once __DIR__ . '/footer.php'; |
|
18 | +require_once XOOPS_ROOT_PATH.'/header.php'; |
|
19 | +require_once __DIR__.'/footer.php'; |
|
20 | 20 | |
21 | 21 | $categoryid = isset($_GET['categoryid']) ? (int)$_GET['categoryid'] : 0; |
22 | 22 | |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | $last_qnaObj = $faqHandler->getLastPublishedByCat([Constants::SF_STATUS_OPENED]); |
64 | 64 | if (isset($last_qnaObj[$categoryid])) { |
65 | 65 | $categoryObj->setVar('last_faqid', $last_qnaObj[$categoryid]->getVar('faqid')); |
66 | - $categoryObj->setVar('last_question_link', "<a href='faq.php?faqid=" . $last_qnaObj[$categoryid]->getVar('faqid') . "'>" . $last_qnaObj[$categoryid]->question(50) . '</a>'); |
|
66 | + $categoryObj->setVar('last_question_link', "<a href='faq.php?faqid=".$last_qnaObj[$categoryid]->getVar('faqid')."'>".$last_qnaObj[$categoryid]->question(50).'</a>'); |
|
67 | 67 | } |
68 | 68 | // Populating the smarty variables with informations related to the selected category |
69 | 69 | $category = $categoryObj->toArray(null, true); |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | $category['categoryPath'] = $categoryObj->getCategoryPath(false, true); |
72 | 72 | |
73 | 73 | // Creating the sub-categories objects that belong to the selected category |
74 | -$subcatsObj =& $categoryHandler->getCategories(0, 0, $categoryid); |
|
74 | +$subcatsObj = & $categoryHandler->getCategories(0, 0, $categoryid); |
|
75 | 75 | $total_subcats = count($subcatsObj); |
76 | 76 | $catQnasWithSub = 0; |
77 | 77 | if (0 != $total_subcats) { |
@@ -82,11 +82,11 @@ discard block |
||
82 | 82 | if (isset($totalQnas[$subcat_id]) && $totalQnas[$subcat_id] > 0) { |
83 | 83 | if (isset($last_qnaObj[$subcat_id])) { |
84 | 84 | $subcat->setVar('last_faqid', $last_qnaObj[$subcat_id]->getVar('faqid')); |
85 | - $subcat->setVar('last_question_link', "<a href='faq.php?faqid=" . $last_qnaObj[$subcat_id]->getVar('faqid') . "'>" . $last_qnaObj[$subcat_id]->question(50) . '</a>'); |
|
85 | + $subcat->setVar('last_question_link', "<a href='faq.php?faqid=".$last_qnaObj[$subcat_id]->getVar('faqid')."'>".$last_qnaObj[$subcat_id]->question(50).'</a>'); |
|
86 | 86 | } |
87 | 87 | $subcat->setVar('faqcount', $totalQnas[$subcat_id]); |
88 | 88 | $subcats[$subcat_id] = $subcat->toArray(null, true); |
89 | - $catQnasWithSub += $subcats[$subcat_id]['total']; |
|
89 | + $catQnasWithSub += $subcats[$subcat_id]['total']; |
|
90 | 90 | } |
91 | 91 | } |
92 | 92 | $xoopsTpl->assign('subcats', $subcats); |
@@ -100,7 +100,7 @@ discard block |
||
100 | 100 | } |
101 | 101 | |
102 | 102 | $memberHandler = xoops_getHandler('member'); |
103 | - $users = $memberHandler->getUsers(new \Criteria('uid', '(' . implode(',', array_keys($userids)) . ')', 'IN'), true); |
|
103 | + $users = $memberHandler->getUsers(new \Criteria('uid', '('.implode(',', array_keys($userids)).')', 'IN'), true); |
|
104 | 104 | foreach ($faqsObj as $iValue) { |
105 | 105 | $faq = $iValue->toArray(null, $allcategories); |
106 | 106 | |
@@ -112,7 +112,7 @@ discard block |
||
112 | 112 | } |
113 | 113 | } |
114 | 114 | // Language constants |
115 | -$xoopsTpl->assign('whereInSection', $myts->htmlSpecialChars($xoopsModule->getVar('name')) . " > <a href='open_index.php'>" . _MD_SF_OPEN_SECTION . '</a>'); |
|
115 | +$xoopsTpl->assign('whereInSection', $myts->htmlSpecialChars($xoopsModule->getVar('name'))." > <a href='open_index.php'>"._MD_SF_OPEN_SECTION.'</a>'); |
|
116 | 116 | $xoopsTpl->assign('modulename', $xoopsModule->dirname()); |
117 | 117 | |
118 | 118 | $xoopsTpl->assign('displaylastfaqs', true); |
@@ -129,19 +129,19 @@ discard block |
||
129 | 129 | $xoopsTpl->assign('lang_category', _MD_SF_CATEGORY); |
130 | 130 | |
131 | 131 | // The Navigation Bar |
132 | -require_once XOOPS_ROOT_PATH . '/class/pagenav.php'; |
|
133 | -$pagenav = new \XoopsPageNav($totalQnas[$categoryid], $xoopsModuleConfig['indexperpage'], $start, 'start', 'categoryid=' . $categoryObj->getVar('categoryid')); |
|
132 | +require_once XOOPS_ROOT_PATH.'/class/pagenav.php'; |
|
133 | +$pagenav = new \XoopsPageNav($totalQnas[$categoryid], $xoopsModuleConfig['indexperpage'], $start, 'start', 'categoryid='.$categoryObj->getVar('categoryid')); |
|
134 | 134 | if (1 == $xoopsModuleConfig['useimagenavpage']) { |
135 | - $category['navbar'] = '<div style="text-align:right;">' . $pagenav->renderImageNav() . '</div>'; |
|
135 | + $category['navbar'] = '<div style="text-align:right;">'.$pagenav->renderImageNav().'</div>'; |
|
136 | 136 | } else { |
137 | - $category['navbar'] = '<div style="text-align:right;">' . $pagenav->renderNav() . '</div>'; |
|
137 | + $category['navbar'] = '<div style="text-align:right;">'.$pagenav->renderNav().'</div>'; |
|
138 | 138 | } |
139 | 139 | |
140 | 140 | $xoopsTpl->assign('category', $category); |
141 | 141 | |
142 | 142 | // Page Title Hack by marcan |
143 | 143 | $module_name = $myts->htmlSpecialChars($xoopsModule->getVar('name')); |
144 | -$xoopsTpl->assign('xoops_pagetitle', $module_name . ' - ' . $category['name']); |
|
144 | +$xoopsTpl->assign('xoops_pagetitle', $module_name.' - '.$category['name']); |
|
145 | 145 | // End Page Title Hack by marcan |
146 | 146 | |
147 | -require_once XOOPS_ROOT_PATH . '/footer.php'; |
|
147 | +require_once XOOPS_ROOT_PATH.'/footer.php'; |