@@ -21,8 +21,8 @@ |
||
21 | 21 | * @author trabis <[email protected]> |
22 | 22 | * @version $Id$ |
23 | 23 | */ |
24 | -require_once dirname(dirname(__DIR__)) . '/mainfile.php'; |
|
25 | -require_once __DIR__ . '/include/common.php'; |
|
24 | +require_once dirname(dirname(__DIR__)).'/mainfile.php'; |
|
25 | +require_once __DIR__.'/include/common.php'; |
|
26 | 26 | $helper = Helper::getInstance(); |
27 | 27 | if ('none' !== $helper->getConfig('seo_url_rewrite')) { |
28 | 28 | XoopsLoad::loadFile($helper->path('include/seo.inc.php')); |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | * @author The SmartFactory <www.smartfactory.ca> |
26 | 26 | * @version $Id$ |
27 | 27 | */ |
28 | -require_once __DIR__ . '/header.php'; |
|
28 | +require_once __DIR__.'/header.php'; |
|
29 | 29 | |
30 | 30 | $xoops = Xoops::getInstance(); |
31 | 31 | $helper = Helper::getInstance(); |
@@ -52,9 +52,9 @@ discard block |
||
52 | 52 | $fileObj->updateCounter(); |
53 | 53 | |
54 | 54 | if (!preg_match("/^ed2k*:\/\//i", $fileObj->getFileUrl())) { |
55 | - header('Location: ' . $fileObj->getFileUrl()); |
|
55 | + header('Location: '.$fileObj->getFileUrl()); |
|
56 | 56 | } |
57 | 57 | |
58 | 58 | $myts = Sanitizer::getInstance(); |
59 | -echo '<html><head><meta http-equiv="Refresh" content="0; URL=' . $myts->htmlSpecialChars($fileObj->getFileUrl()) . '"></head><body></body></html>'; |
|
59 | +echo '<html><head><meta http-equiv="Refresh" content="0; URL='.$myts->htmlSpecialChars($fileObj->getFileUrl()).'"></head><body></body></html>'; |
|
60 | 60 | exit(); |
@@ -21,7 +21,7 @@ discard block |
||
21 | 21 | use XoopsModules\Publisher; |
22 | 22 | use XoopsModules\Publisher\Helper; |
23 | 23 | |
24 | -require_once __DIR__ . '/admin_header.php'; |
|
24 | +require_once __DIR__.'/admin_header.php'; |
|
25 | 25 | |
26 | 26 | $xoops = Xoops::getInstance(); |
27 | 27 | $errors = []; |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | } |
54 | 54 | } |
55 | 55 | $allowed_mimetypes = ['text/html', 'text/plain', 'application/xhtml+xml']; |
56 | - $uploader = new XoopsMediaUploader(Publisher\Utils::getUploadDir(true, 'content') . '/', $allowed_mimetypes, $max_size, $max_imgwidth, $max_imgheight); |
|
56 | + $uploader = new XoopsMediaUploader(Publisher\Utils::getUploadDir(true, 'content').'/', $allowed_mimetypes, $max_size, $max_imgwidth, $max_imgheight); |
|
57 | 57 | if ($uploader->fetchMedia($post_field)) { |
58 | 58 | $uploader->setTargetFileName($uploader->getMediaName()); |
59 | 59 | if ($uploader->upload()) { |
@@ -20,11 +20,11 @@ |
||
20 | 20 | */ |
21 | 21 | use XoopsModules\Publisher; |
22 | 22 | |
23 | -require_once __DIR__ . '/admin_header.php'; |
|
23 | +require_once __DIR__.'/admin_header.php'; |
|
24 | 24 | $xoops = Xoops::getInstance(); |
25 | 25 | if (isset($_POST['op']) && ('delfileok' === $_POST['op'])) { |
26 | 26 | $dir = Publisher\Utils::getUploadDir(true, 'content'); |
27 | - @unlink($dir . '/' . $_POST['address']); |
|
27 | + @unlink($dir.'/'.$_POST['address']); |
|
28 | 28 | $xoops->redirect($_POST['backto'], 2, _AM_PUBLISHER_FDELETED); |
29 | 29 | } else { |
30 | 30 | $xoops->header(); |
@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | * @author The SmartFactory <www.smartfactory.ca> |
24 | 24 | * @version $Id$ |
25 | 25 | */ |
26 | -require_once __DIR__ . '/admin_header.php'; |
|
26 | +require_once __DIR__.'/admin_header.php'; |
|
27 | 27 | |
28 | 28 | $start = $limit = 0; |
29 | 29 | if (isset($_REQUEST['limit'])) { |
@@ -94,7 +94,7 @@ discard block |
||
94 | 94 | |
95 | 95 | //Display any form errors |
96 | 96 | if (false === !$mime_errors) { |
97 | - Publisher\Utils::renderErrors($mime_errors, Publisher\Utils::makeURI(PUBLISHER_ADMIN_URL . 'mimetypes.php', ['op' => 'clearAddSession'])); |
|
97 | + Publisher\Utils::renderErrors($mime_errors, Publisher\Utils::makeURI(PUBLISHER_ADMIN_URL.'mimetypes.php', ['op' => 'clearAddSession'])); |
|
98 | 98 | } |
99 | 99 | |
100 | 100 | if (false === $mime_type) { |
@@ -114,38 +114,38 @@ discard block |
||
114 | 114 | // Display add form |
115 | 115 | echo "<form action='mimetypes.php?op=add' method='post'>"; |
116 | 116 | echo "<table width='100%' cellspacing='1' class='outer'>"; |
117 | - echo "<tr><th colspan='2'>" . _AM_PUBLISHER_MIME_CREATEF . '</th></tr>'; |
|
117 | + echo "<tr><th colspan='2'>"._AM_PUBLISHER_MIME_CREATEF.'</th></tr>'; |
|
118 | 118 | echo "<tr valign='top'> |
119 | - <td class='head'>" . _AM_PUBLISHER_MIME_EXTF . "</td> |
|
119 | + <td class='head'>" . _AM_PUBLISHER_MIME_EXTF."</td> |
|
120 | 120 | <td class='even'><input type='text' name='mime_ext' id='mime_ext' value='$mime_ext' size='5'></td> |
121 | 121 | </tr>"; |
122 | 122 | echo "<tr valign='top'> |
123 | - <td class='head'>" . _AM_PUBLISHER_MIME_NAMEF . "</td> |
|
123 | + <td class='head'>" . _AM_PUBLISHER_MIME_NAMEF."</td> |
|
124 | 124 | <td class='even'><input type='text' name='mime_name' id='mime_name' value='$mime_name'></td> |
125 | 125 | </tr>"; |
126 | 126 | echo "<tr valign='top'> |
127 | - <td class='head'>" . _AM_PUBLISHER_MIME_TYPEF . "</td> |
|
127 | + <td class='head'>" . _AM_PUBLISHER_MIME_TYPEF."</td> |
|
128 | 128 | <td class='even'><textarea name='mime_types' id='mime_types' cols='60' rows='5'>$mime_types</textarea></td> |
129 | 129 | </tr>"; |
130 | 130 | echo "<tr valign='top'> |
131 | - <td class='head'>" . _AM_PUBLISHER_MIME_ADMINF . "</td> |
|
131 | + <td class='head'>" . _AM_PUBLISHER_MIME_ADMINF."</td> |
|
132 | 132 | <td class='even'>"; |
133 | - echo "<input type='radio' name='mime_admin' value='1' " . (1 == $mime_admin ? "checked" : '') . '>' . XoopsLocale::YES; |
|
134 | - echo "<input type='radio' name='mime_admin' value='0' " . (0 == $mime_admin ? "checked" : '') . '>' . XoopsLocale::NO . ' |
|
133 | + echo "<input type='radio' name='mime_admin' value='1' ".(1 == $mime_admin ? "checked" : '').'>'.XoopsLocale::YES; |
|
134 | + echo "<input type='radio' name='mime_admin' value='0' ".(0 == $mime_admin ? "checked" : '').'>'.XoopsLocale::NO.' |
|
135 | 135 | </td> |
136 | 136 | </tr>'; |
137 | 137 | echo "<tr valign='top'> |
138 | - <td class='head'>" . _AM_PUBLISHER_MIME_USERF . "</td> |
|
138 | + <td class='head'>" . _AM_PUBLISHER_MIME_USERF."</td> |
|
139 | 139 | <td class='even'>"; |
140 | - echo "<input type='radio' name='mime_user' value='1'" . (1 == $mime_user ? "checked" : '') . '>' . XoopsLocale::YES; |
|
141 | - echo "<input type='radio' name='mime_user' value='0'" . (0 == $mime_user ? "checked" : '') . '>' . XoopsLocale::NO . ' |
|
140 | + echo "<input type='radio' name='mime_user' value='1'".(1 == $mime_user ? "checked" : '').'>'.XoopsLocale::YES; |
|
141 | + echo "<input type='radio' name='mime_user' value='0'".(0 == $mime_user ? "checked" : '').'>'.XoopsLocale::NO.' |
|
142 | 142 | </td> |
143 | 143 | </tr>'; |
144 | 144 | echo "<tr valign='top'> |
145 | 145 | <td class='head'></td> |
146 | 146 | <td class='even'> |
147 | - <input type='submit' name='add_mime' id='add_mime' value='" . _AM_PUBLISHER_BUTTON_SUBMIT . "' class='formButton'> |
|
148 | - <input type='button' name='cancel' value='" . _AM_PUBLISHER_BUTTON_CANCEL . "' onclick='history.go(-1)' class='formButton'> |
|
147 | + <input type='submit' name='add_mime' id='add_mime' value='" . _AM_PUBLISHER_BUTTON_SUBMIT."' class='formButton'> |
|
148 | + <input type='button' name='cancel' value='" . _AM_PUBLISHER_BUTTON_CANCEL."' onclick='history.go(-1)' class='formButton'> |
|
149 | 149 | </td> |
150 | 150 | </tr>"; |
151 | 151 | echo '</table></form>'; |
@@ -154,10 +154,10 @@ discard block |
||
154 | 154 | // Find new mimetypes table |
155 | 155 | echo "<form action='http://www.filext.com' method='post'>"; |
156 | 156 | echo "<table width='100%' cellspacing='1' class='outer'>"; |
157 | - echo "<tr><th colspan='2'>" . _AM_PUBLISHER_MIME_FINDMIMETYPE . '</th></tr>'; |
|
157 | + echo "<tr><th colspan='2'>"._AM_PUBLISHER_MIME_FINDMIMETYPE.'</th></tr>'; |
|
158 | 158 | |
159 | 159 | echo "<tr class='foot'> |
160 | - <td colspan='2'><input type='submit' name='find_mime' id='find_mime' value='" . _AM_PUBLISHER_MIME_FINDIT . "' class='formButton'></td> |
|
160 | + <td colspan='2'><input type='submit' name='find_mime' id='find_mime' value='" . _AM_PUBLISHER_MIME_FINDIT."' class='formButton'></td> |
|
161 | 161 | </tr>"; |
162 | 162 | |
163 | 163 | echo '</table></form>'; |
@@ -200,7 +200,7 @@ discard block |
||
200 | 200 | $mime['mime_user'] = $mime_user; |
201 | 201 | $session->set('publisher_addMime', $mime); |
202 | 202 | $session->set('publisher_addMimeErr', $error); |
203 | - header('Location: ' . Publisher\Utils::makeURI(PUBLISHER_ADMIN_URL . 'mimetypes.php', ['op' => 'add'], false)); |
|
203 | + header('Location: '.Publisher\Utils::makeURI(PUBLISHER_ADMIN_URL.'mimetypes.php', ['op' => 'add'], false)); |
|
204 | 204 | } |
205 | 205 | |
206 | 206 | $mimetype = $helper->getMimetypeHandler()->create(); |
@@ -211,10 +211,10 @@ discard block |
||
211 | 211 | $mimetype->setVar('mime_user', $mime_user); |
212 | 212 | |
213 | 213 | if (!$helper->getMimetypeHandler()->insert($mimetype)) { |
214 | - $xoops->redirect(PUBLISHER_ADMIN_URL . "/mimetypes.php?op=manage&limit=$limit&start=$start", 3, _AM_PUBLISHER_MESSAGE_ADD_MIME_ERROR); |
|
214 | + $xoops->redirect(PUBLISHER_ADMIN_URL."/mimetypes.php?op=manage&limit=$limit&start=$start", 3, _AM_PUBLISHER_MESSAGE_ADD_MIME_ERROR); |
|
215 | 215 | } else { |
216 | 216 | _clearAddSessionVars(); |
217 | - header('Location: ' . PUBLISHER_ADMIN_URL . "/mimetypes.php?op=manage&limit=$limit&start=$start"); |
|
217 | + header('Location: '.PUBLISHER_ADMIN_URL."/mimetypes.php?op=manage&limit=$limit&start=$start"); |
|
218 | 218 | } |
219 | 219 | } |
220 | 220 | } |
@@ -225,15 +225,15 @@ discard block |
||
225 | 225 | $xoops = Xoops::getInstance(); |
226 | 226 | global $start, $limit; |
227 | 227 | if (!isset($_REQUEST['id'])) { |
228 | - $xoops->redirect(PUBLISHER_ADMIN_URL . '/mimetypes.php', 3, _AM_PUBLISHER_MESSAGE_NO_ID); |
|
228 | + $xoops->redirect(PUBLISHER_ADMIN_URL.'/mimetypes.php', 3, _AM_PUBLISHER_MESSAGE_NO_ID); |
|
229 | 229 | } |
230 | 230 | $mime_id = (int)$_REQUEST['id']; |
231 | 231 | |
232 | 232 | $mimetype = $helper->getMimetypeHandler()->get($mime_id); // Retrieve mimetype object |
233 | 233 | if (!$helper->getMimetypeHandler()->delete($mimetype, true)) { |
234 | - $xoops->redirect(PUBLISHER_ADMIN_URL . "/mimetypes.php?op=manage&id=$mime_id&limit=$limit&start=$start", 3, _AM_PUBLISHER_MESSAGE_DELETE_MIME_ERROR); |
|
234 | + $xoops->redirect(PUBLISHER_ADMIN_URL."/mimetypes.php?op=manage&id=$mime_id&limit=$limit&start=$start", 3, _AM_PUBLISHER_MESSAGE_DELETE_MIME_ERROR); |
|
235 | 235 | } else { |
236 | - $xoops->redirect(PUBLISHER_ADMIN_URL . "/mimetypes.php?op=manage&limit=$limit&start=$start", 3, 'Deleted'); |
|
236 | + $xoops->redirect(PUBLISHER_ADMIN_URL."/mimetypes.php?op=manage&limit=$limit&start=$start", 3, 'Deleted'); |
|
237 | 237 | } |
238 | 238 | } |
239 | 239 | |
@@ -244,7 +244,7 @@ discard block |
||
244 | 244 | global $start, $limit, $oAdminButton; |
245 | 245 | |
246 | 246 | if (!isset($_REQUEST['id'])) { |
247 | - $xoops->redirect(PUBLISHER_ADMIN_URL . '/mimetypes.php', 3, _AM_PUBLISHER_MESSAGE_NO_ID); |
|
247 | + $xoops->redirect(PUBLISHER_ADMIN_URL.'/mimetypes.php', 3, _AM_PUBLISHER_MESSAGE_NO_ID); |
|
248 | 248 | } |
249 | 249 | $mime_id = (int)$_REQUEST['id']; |
250 | 250 | |
@@ -263,7 +263,7 @@ discard block |
||
263 | 263 | |
264 | 264 | //Display any form errors |
265 | 265 | if (false === !$mime_errors) { |
266 | - Publisher\Utils::renderErrors($mime_errors, Publisher\Utils::makeURI(PUBLISHER_ADMIN_URL . '/mimetypes.php', ['op' => 'clearEditSession', 'id' => $mime_id])); |
|
266 | + Publisher\Utils::renderErrors($mime_errors, Publisher\Utils::makeURI(PUBLISHER_ADMIN_URL.'/mimetypes.php', ['op' => 'clearEditSession', 'id' => $mime_id])); |
|
267 | 267 | } |
268 | 268 | |
269 | 269 | if (false === $mime_type) { |
@@ -281,42 +281,42 @@ discard block |
||
281 | 281 | } |
282 | 282 | |
283 | 283 | // Display edit form |
284 | - echo "<form action='mimetypes.php?op=edit&id=" . $mime_id . "' method='post'>"; |
|
285 | - echo "<input type='hidden' name='limit' value='" . $limit . "'>"; |
|
286 | - echo "<input type='hidden' name='start' value='" . $start . "'>"; |
|
284 | + echo "<form action='mimetypes.php?op=edit&id=".$mime_id."' method='post'>"; |
|
285 | + echo "<input type='hidden' name='limit' value='".$limit."'>"; |
|
286 | + echo "<input type='hidden' name='start' value='".$start."'>"; |
|
287 | 287 | echo "<table width='100%' cellspacing='1' class='outer'>"; |
288 | - echo "<tr><th colspan='2'>" . _AM_PUBLISHER_MIME_MODIFYF . '</th></tr>'; |
|
288 | + echo "<tr><th colspan='2'>"._AM_PUBLISHER_MIME_MODIFYF.'</th></tr>'; |
|
289 | 289 | echo "<tr valign='top'> |
290 | - <td class='head'>" . _AM_PUBLISHER_MIME_EXTF . "</td> |
|
290 | + <td class='head'>" . _AM_PUBLISHER_MIME_EXTF."</td> |
|
291 | 291 | <td class='even'><input type='text' name='mime_ext' id='mime_ext' value='$mime_ext' size='5'></td> |
292 | 292 | </tr>"; |
293 | 293 | echo "<tr valign='top'> |
294 | - <td class='head'>" . _AM_PUBLISHER_MIME_NAMEF . "</td> |
|
294 | + <td class='head'>" . _AM_PUBLISHER_MIME_NAMEF."</td> |
|
295 | 295 | <td class='even'><input type='text' name='mime_name' id='mime_name' value='$mime_name'></td> |
296 | 296 | </tr>"; |
297 | 297 | echo "<tr valign='top'> |
298 | - <td class='head'>" . _AM_PUBLISHER_MIME_TYPEF . "</td> |
|
298 | + <td class='head'>" . _AM_PUBLISHER_MIME_TYPEF."</td> |
|
299 | 299 | <td class='even'><textarea name='mime_types' id='mime_types' cols='60' rows='5'>$mime_types</textarea></td> |
300 | 300 | </tr>"; |
301 | 301 | echo "<tr valign='top'> |
302 | - <td class='head'>" . _AM_PUBLISHER_MIME_ADMINF . "</td> |
|
302 | + <td class='head'>" . _AM_PUBLISHER_MIME_ADMINF."</td> |
|
303 | 303 | <td class='even'> |
304 | - <input type='radio' name='mime_admin' value='1' " . (1 == $mime_admin ? "checked" : '') . '>' . XoopsLocale::YES . " |
|
305 | - <input type='radio' name='mime_admin' value='0' " . (0 == $mime_admin ? "checked" : '') . '>' . XoopsLocale::NO . ' |
|
304 | + <input type='radio' name='mime_admin' value='1' " . (1 == $mime_admin ? "checked" : '').'>'.XoopsLocale::YES." |
|
305 | + <input type='radio' name='mime_admin' value='0' " . (0 == $mime_admin ? "checked" : '').'>'.XoopsLocale::NO.' |
|
306 | 306 | </td> |
307 | 307 | </tr>'; |
308 | 308 | echo "<tr valign='top'> |
309 | - <td class='head'>" . _AM_PUBLISHER_MIME_USERF . "</td> |
|
309 | + <td class='head'>" . _AM_PUBLISHER_MIME_USERF."</td> |
|
310 | 310 | <td class='even'> |
311 | - <input type='radio' name='mime_user' value='1' " . (1 == $mime_user ? "checked" : '') . '>' . XoopsLocale::YES . " |
|
312 | - <input type='radio' name='mime_user' value='0' " . (0 == $mime_user ? "checked" : '') . '>' . XoopsLocale::NO . ' |
|
311 | + <input type='radio' name='mime_user' value='1' " . (1 == $mime_user ? "checked" : '').'>'.XoopsLocale::YES." |
|
312 | + <input type='radio' name='mime_user' value='0' " . (0 == $mime_user ? "checked" : '').'>'.XoopsLocale::NO.' |
|
313 | 313 | </td> |
314 | 314 | </tr>'; |
315 | 315 | echo "<tr valign='top'> |
316 | 316 | <td class='head'></td> |
317 | 317 | <td class='even'> |
318 | - <input type='submit' name='edit_mime' id='edit_mime' value='" . _AM_PUBLISHER_BUTTON_UPDATE . "' class='formButton'> |
|
319 | - <input type='button' name='cancel' value='" . _AM_PUBLISHER_BUTTON_CANCEL . "' onclick='history.go(-1)' class='formButton'> |
|
318 | + <input type='submit' name='edit_mime' id='edit_mime' value='" . _AM_PUBLISHER_BUTTON_UPDATE."' class='formButton'> |
|
319 | + <input type='button' name='cancel' value='" . _AM_PUBLISHER_BUTTON_CANCEL."' onclick='history.go(-1)' class='formButton'> |
|
320 | 320 | </td> |
321 | 321 | </tr>"; |
322 | 322 | echo '</table></form>'; |
@@ -359,9 +359,9 @@ discard block |
||
359 | 359 | $mime['mime_types'] = $_POST['mime_types']; |
360 | 360 | $mime['mime_admin'] = $mime_admin; |
361 | 361 | $mime['mime_user'] = $mime_user; |
362 | - $session->set('publisher_editMime_' . $mime_id, $mime); |
|
363 | - $session->set('publisher_editMimeErr_' . $mime_id, $error); |
|
364 | - header('Location: ' . Publisher\Utils::makeURI(PUBLISHER_ADMIN_URL . '/mimetypes.php', ['op' => 'edit', 'id' => $mime_id], false)); |
|
362 | + $session->set('publisher_editMime_'.$mime_id, $mime); |
|
363 | + $session->set('publisher_editMimeErr_'.$mime_id, $error); |
|
364 | + header('Location: '.Publisher\Utils::makeURI(PUBLISHER_ADMIN_URL.'/mimetypes.php', ['op' => 'edit', 'id' => $mime_id], false)); |
|
365 | 365 | } |
366 | 366 | |
367 | 367 | $mimetype->setVar('mime_ext', $_POST['mime_ext']); |
@@ -371,10 +371,10 @@ discard block |
||
371 | 371 | $mimetype->setVar('mime_user', $mime_user); |
372 | 372 | |
373 | 373 | if (!$helper->getMimetypeHandler()->insert($mimetype, true)) { |
374 | - $xoops->redirect(PUBLISHER_ADMIN_URL . "/mimetypes.php?op=edit&id=$mime_id", 3, _AM_PUBLISHER_MESSAGE_EDIT_MIME_ERROR); |
|
374 | + $xoops->redirect(PUBLISHER_ADMIN_URL."/mimetypes.php?op=edit&id=$mime_id", 3, _AM_PUBLISHER_MESSAGE_EDIT_MIME_ERROR); |
|
375 | 375 | } else { |
376 | 376 | _clearEditSessionVars($mime_id); |
377 | - header('Location: ' . PUBLISHER_ADMIN_URL . "/mimetypes.php?op=manage&limit=$limit&start=$start"); |
|
377 | + header('Location: '.PUBLISHER_ADMIN_URL."/mimetypes.php?op=manage&limit=$limit&start=$start"); |
|
378 | 378 | } |
379 | 379 | } |
380 | 380 | } |
@@ -385,30 +385,30 @@ discard block |
||
385 | 385 | $helper = Helper::getInstance(); |
386 | 386 | |
387 | 387 | $imagearray = [ |
388 | - 'editimg' => "<img src='" . $helper->url('images/button_edit.png') . "' alt='" . _AM_PUBLISHER_ICO_EDIT . "' align='middle'>", |
|
389 | - 'deleteimg' => "<img src='" . $helper->url('images/button_delete.png') . "' alt='" . _AM_PUBLISHER_ICO_DELETE . "' align='middle'>", |
|
390 | - 'online' => "<img src='" . $helper->url('images/on.png') . "' alt='" . _AM_PUBLISHER_ICO_ONLINE . "' align='middle'>", |
|
391 | - 'offline' => "<img src='" . $helper->url('images/off.png') . "' alt='" . _AM_PUBLISHER_ICO_OFFLINE . "' align='middle'>", |
|
388 | + 'editimg' => "<img src='".$helper->url('images/button_edit.png')."' alt='"._AM_PUBLISHER_ICO_EDIT."' align='middle'>", |
|
389 | + 'deleteimg' => "<img src='".$helper->url('images/button_delete.png')."' alt='"._AM_PUBLISHER_ICO_DELETE."' align='middle'>", |
|
390 | + 'online' => "<img src='".$helper->url('images/on.png')."' alt='"._AM_PUBLISHER_ICO_ONLINE."' align='middle'>", |
|
391 | + 'offline' => "<img src='".$helper->url('images/off.png')."' alt='"._AM_PUBLISHER_ICO_OFFLINE."' align='middle'>", |
|
392 | 392 | ]; |
393 | 393 | global $start, $limit, $aSortBy, $aOrderBy, $aLimitBy, $aSearchBy; |
394 | 394 | |
395 | 395 | if (isset($_POST['deleteMimes'])) { |
396 | 396 | $aMimes = $_POST['mimes']; |
397 | 397 | |
398 | - $crit = new Criteria('mime_id', '(' . implode(',', $aMimes) . ')', 'IN'); |
|
398 | + $crit = new Criteria('mime_id', '('.implode(',', $aMimes).')', 'IN'); |
|
399 | 399 | |
400 | 400 | if ($helper->getMimetypeHandler()->deleteAll($crit)) { |
401 | - header('Location: ' . PUBLISHER_ADMIN_URL . "/mimetypes.php?limit=$limit&start=$start"); |
|
401 | + header('Location: '.PUBLISHER_ADMIN_URL."/mimetypes.php?limit=$limit&start=$start"); |
|
402 | 402 | } else { |
403 | - $xoops->redirect(PUBLISHER_ADMIN_URL . "/mimetypes.php?limit=$limit&start=$start", 3, _AM_PUBLISHER_MESSAGE_DELETE_MIME_ERROR); |
|
403 | + $xoops->redirect(PUBLISHER_ADMIN_URL."/mimetypes.php?limit=$limit&start=$start", 3, _AM_PUBLISHER_MESSAGE_DELETE_MIME_ERROR); |
|
404 | 404 | } |
405 | 405 | } |
406 | 406 | if (isset($_POST['add_mime'])) { |
407 | - header('Location: ' . PUBLISHER_ADMIN_URL . "/mimetypes.php?op=add&start=$start&limit=$limit"); |
|
407 | + header('Location: '.PUBLISHER_ADMIN_URL."/mimetypes.php?op=add&start=$start&limit=$limit"); |
|
408 | 408 | exit(); |
409 | 409 | } |
410 | 410 | if (isset($_POST['mime_search'])) { |
411 | - header('Location: ' . PUBLISHER_ADMIN_URL . '/mimetypes.php?op=search'); |
|
411 | + header('Location: '.PUBLISHER_ADMIN_URL.'/mimetypes.php?op=search'); |
|
412 | 412 | exit(); |
413 | 413 | } |
414 | 414 | |
@@ -428,25 +428,25 @@ discard block |
||
428 | 428 | |
429 | 429 | echo "<table width='100%' cellspacing='1' class='outer'>"; |
430 | 430 | echo "<tr><td colspan='6' align='right'>"; |
431 | - echo "<form action='" . PUBLISHER_ADMIN_URL . "/mimetypes.php?op=search' style='margin:0; padding:0;' method='post'>"; |
|
431 | + echo "<form action='".PUBLISHER_ADMIN_URL."/mimetypes.php?op=search' style='margin:0; padding:0;' method='post'>"; |
|
432 | 432 | echo '<table>'; |
433 | 433 | echo '<tr>'; |
434 | - echo "<td align='right'>" . _AM_PUBLISHER_TEXT_SEARCH_BY . '</td>'; |
|
434 | + echo "<td align='right'>"._AM_PUBLISHER_TEXT_SEARCH_BY.'</td>'; |
|
435 | 435 | echo "<td align='left'><select name='search_by'>"; |
436 | 436 | foreach ($aSearchBy as $value => $text) { |
437 | 437 | ($sort == $value) ? $selected = "selected='selected'" : $selected = ''; |
438 | 438 | echo "<option value='$value' $selected>$text</option>"; |
439 | 439 | } |
440 | 440 | echo '</select></td>'; |
441 | - echo "<td align='right'>" . _AM_PUBLISHER_TEXT_SEARCH_TEXT . '</td>'; |
|
441 | + echo "<td align='right'>"._AM_PUBLISHER_TEXT_SEARCH_TEXT.'</td>'; |
|
442 | 442 | echo "<td align='left'><input type='text' name='search_text' id='search_text' value=''></td>"; |
443 | - echo "<td><input type='submit' name='mime_search' id='mime_search' value='" . _AM_PUBLISHER_BUTTON_SEARCH . "'></td>"; |
|
443 | + echo "<td><input type='submit' name='mime_search' id='mime_search' value='"._AM_PUBLISHER_BUTTON_SEARCH."'></td>"; |
|
444 | 444 | echo '</tr></table></form></td></tr>'; |
445 | 445 | |
446 | 446 | echo "<tr><td colspan='6'>"; |
447 | - echo "<form action='" . PUBLISHER_ADMIN_URL . "/mimetypes.php?op=manage' style='margin:0; padding:0;' method='post'>"; |
|
447 | + echo "<form action='".PUBLISHER_ADMIN_URL."/mimetypes.php?op=manage' style='margin:0; padding:0;' method='post'>"; |
|
448 | 448 | echo "<table width='100%'>"; |
449 | - echo "<tr><td align='right'>" . _AM_PUBLISHER_TEXT_SORT_BY . " |
|
449 | + echo "<tr><td align='right'>"._AM_PUBLISHER_TEXT_SORT_BY." |
|
450 | 450 | <select name='sort'>"; |
451 | 451 | foreach ($aSortBy as $value => $text) { |
452 | 452 | ($sort == $value) ? $selected = "selected='selected'" : $selected = ''; |
@@ -454,7 +454,7 @@ discard block |
||
454 | 454 | } |
455 | 455 | echo '</select> |
456 | 456 | |
457 | - ' . _AM_PUBLISHER_TEXT_ORDER_BY . " |
|
457 | + ' . _AM_PUBLISHER_TEXT_ORDER_BY." |
|
458 | 458 | <select name='order'>"; |
459 | 459 | foreach ($aOrderBy as $value => $text) { |
460 | 460 | ($order == $value) ? $selected = "selected='selected'" : $selected = ''; |
@@ -462,56 +462,56 @@ discard block |
||
462 | 462 | } |
463 | 463 | echo '</select> |
464 | 464 | |
465 | - ' . _AM_PUBLISHER_TEXT_NUMBER_PER_PAGE . " |
|
465 | + ' . _AM_PUBLISHER_TEXT_NUMBER_PER_PAGE." |
|
466 | 466 | <select name='limit'>"; |
467 | 467 | foreach ($aLimitBy as $value => $text) { |
468 | 468 | ($limit == $value) ? $selected = "selected='selected'" : $selected = ''; |
469 | 469 | echo "<option value='$value' $selected>$text</option>"; |
470 | 470 | } |
471 | 471 | echo "</select> |
472 | - <input type='submit' name='mime_sort' id='mime_sort' value='" . _AM_PUBLISHER_BUTTON_SUBMIT . "'> |
|
472 | + <input type='submit' name='mime_sort' id='mime_sort' value='" . _AM_PUBLISHER_BUTTON_SUBMIT."'> |
|
473 | 473 | </td> |
474 | 474 | </tr>"; |
475 | 475 | echo '</table>'; |
476 | 476 | echo '</td></tr>'; |
477 | - echo "<tr><th colspan='6'>" . _AM_PUBLISHER_MIME_MANAGE_TITLE . '</th></tr>'; |
|
477 | + echo "<tr><th colspan='6'>"._AM_PUBLISHER_MIME_MANAGE_TITLE.'</th></tr>'; |
|
478 | 478 | echo "<tr class='head'> |
479 | - <td>" . _AM_PUBLISHER_MIME_ID . '</td> |
|
480 | - <td>' . _AM_PUBLISHER_MIME_NAME . '</td> |
|
481 | - <td>' . _AM_PUBLISHER_MIME_EXT . '</td> |
|
482 | - <td>' . _AM_PUBLISHER_MIME_ADMIN . '</td> |
|
483 | - <td>' . _AM_PUBLISHER_MIME_USER . '</td> |
|
484 | - <td>' . _AM_PUBLISHER_MINDEX_ACTION . '</td> |
|
479 | + <td>" . _AM_PUBLISHER_MIME_ID.'</td> |
|
480 | + <td>' . _AM_PUBLISHER_MIME_NAME.'</td> |
|
481 | + <td>' . _AM_PUBLISHER_MIME_EXT.'</td> |
|
482 | + <td>' . _AM_PUBLISHER_MIME_ADMIN.'</td> |
|
483 | + <td>' . _AM_PUBLISHER_MIME_USER.'</td> |
|
484 | + <td>' . _AM_PUBLISHER_MINDEX_ACTION.'</td> |
|
485 | 485 | </tr>'; |
486 | 486 | foreach ($mimetypes as $mime) { |
487 | 487 | echo "<tr class='even'> |
488 | - <td><input type='checkbox' name='mimes[]' value='" . $mime->getVar('mime_id') . "'>" . $mime->getVar('mime_id') . '</td> |
|
489 | - <td>' . $mime->getVar('mime_name') . '</td> |
|
490 | - <td>' . $mime->getVar('mime_ext') . "</td> |
|
488 | + <td><input type='checkbox' name='mimes[]' value='" . $mime->getVar('mime_id')."'>".$mime->getVar('mime_id').'</td> |
|
489 | + <td>' . $mime->getVar('mime_name').'</td> |
|
490 | + <td>' . $mime->getVar('mime_ext')."</td> |
|
491 | 491 | <td> |
492 | - <a href='" . PUBLISHER_ADMIN_URL . '/mimetypes.php?op=updateMimeValue&id=' . $mime->getVar('mime_id') . '&mime_admin=' . $mime->getVar('mime_admin') . '&limit=' . $limit . '&start=' . $start . "'> |
|
493 | - " . ($mime->getVar('mime_admin') ? $imagearray['online'] : $imagearray['offline']) . "</a> |
|
492 | + <a href='" . PUBLISHER_ADMIN_URL.'/mimetypes.php?op=updateMimeValue&id='.$mime->getVar('mime_id').'&mime_admin='.$mime->getVar('mime_admin').'&limit='.$limit.'&start='.$start."'> |
|
493 | + " . ($mime->getVar('mime_admin') ? $imagearray['online'] : $imagearray['offline'])."</a> |
|
494 | 494 | </td> |
495 | 495 | <td> |
496 | - <a href='" . PUBLISHER_ADMIN_URL . '/mimetypes.php?op=updateMimeValue&id=' . $mime->getVar('mime_id') . '&mime_user=' . $mime->getVar('mime_user') . '&limit=' . $limit . '&start=' . $start . "'> |
|
497 | - " . ($mime->getVar('mime_user') ? $imagearray['online'] : $imagearray['offline']) . "</a> |
|
496 | + <a href='" . PUBLISHER_ADMIN_URL.'/mimetypes.php?op=updateMimeValue&id='.$mime->getVar('mime_id').'&mime_user='.$mime->getVar('mime_user').'&limit='.$limit.'&start='.$start."'> |
|
497 | + " . ($mime->getVar('mime_user') ? $imagearray['online'] : $imagearray['offline'])."</a> |
|
498 | 498 | </td> |
499 | 499 | <td> |
500 | - <a href='" . PUBLISHER_ADMIN_URL . '/mimetypes.php?op=edit&id=' . $mime->getVar('mime_id') . '&limit=' . $limit . '&start=' . $start . "'>" . $imagearray['editimg'] . "</a> |
|
501 | - <a href='" . PUBLISHER_ADMIN_URL . '/mimetypes.php?op=delete&id=' . $mime->getVar('mime_id') . '&limit=' . $limit . '&start=' . $start . "'>" . $imagearray['deleteimg'] . '</a> |
|
500 | + <a href='" . PUBLISHER_ADMIN_URL.'/mimetypes.php?op=edit&id='.$mime->getVar('mime_id').'&limit='.$limit.'&start='.$start."'>".$imagearray['editimg']."</a> |
|
501 | + <a href='" . PUBLISHER_ADMIN_URL.'/mimetypes.php?op=delete&id='.$mime->getVar('mime_id').'&limit='.$limit.'&start='.$start."'>".$imagearray['deleteimg'].'</a> |
|
502 | 502 | </td> |
503 | 503 | </tr>'; |
504 | 504 | } |
505 | 505 | echo "<tr class='foot'> |
506 | 506 | <td colspan='6' valign='top'> |
507 | - <a href='http://www.filext.com' style='float: right' target='_blank'>" . _AM_PUBLISHER_MIME_FINDMIMETYPE . "</a> |
|
507 | + <a href='http://www.filext.com' style='float: right' target='_blank'>" . _AM_PUBLISHER_MIME_FINDMIMETYPE."</a> |
|
508 | 508 | <input type='checkbox' name='checkAllMimes' value='0' onclick='selectAll(this.form,\"mimes[]\",this.checked);'> |
509 | - <input type='submit' name='deleteMimes' id='deleteMimes' value='" . _AM_PUBLISHER_BUTTON_DELETE . "'> |
|
510 | - <input type='submit' name='add_mime' id='add_mime' value='" . _AM_PUBLISHER_MIME_CREATEF . "' class='formButton'> |
|
509 | + <input type='submit' name='deleteMimes' id='deleteMimes' value='" . _AM_PUBLISHER_BUTTON_DELETE."'> |
|
510 | + <input type='submit' name='add_mime' id='add_mime' value='" . _AM_PUBLISHER_MIME_CREATEF."' class='formButton'> |
|
511 | 511 | </td> |
512 | 512 | </tr>"; |
513 | 513 | echo '</table>'; |
514 | - echo "<div id='staff_nav'>" . $nav->renderNav() . '</div>'; |
|
514 | + echo "<div id='staff_nav'>".$nav->renderNav().'</div>'; |
|
515 | 515 | |
516 | 516 | Publisher\Utils::closeCollapsableBar('mimemanagetable', 'mimemanageicon'); |
517 | 517 | |
@@ -528,16 +528,16 @@ discard block |
||
528 | 528 | if (isset($_POST['deleteMimes'])) { |
529 | 529 | $aMimes = $_POST['mimes']; |
530 | 530 | |
531 | - $crit = new Criteria('mime_id', '(' . implode(',', $aMimes) . ')', 'IN'); |
|
531 | + $crit = new Criteria('mime_id', '('.implode(',', $aMimes).')', 'IN'); |
|
532 | 532 | |
533 | 533 | if ($helper->getMimetypeHandler()->deleteAll($crit)) { |
534 | - header('Location: ' . PUBLISHER_ADMIN_URL . "/mimetypes.php?limit=$limit&start=$start"); |
|
534 | + header('Location: '.PUBLISHER_ADMIN_URL."/mimetypes.php?limit=$limit&start=$start"); |
|
535 | 535 | } else { |
536 | - $xoops->redirect(PUBLISHER_ADMIN_URL . "/mimetypes.php?limit=$limit&start=$start", 3, _AM_PUBLISHER_MESSAGE_DELETE_MIME_ERROR); |
|
536 | + $xoops->redirect(PUBLISHER_ADMIN_URL."/mimetypes.php?limit=$limit&start=$start", 3, _AM_PUBLISHER_MESSAGE_DELETE_MIME_ERROR); |
|
537 | 537 | } |
538 | 538 | } |
539 | 539 | if (isset($_POST['add_mime'])) { |
540 | - header('Location: ' . PUBLISHER_ADMIN_URL . "/mimetypes.php?op=add&start=$start&limit=$limit"); |
|
540 | + header('Location: '.PUBLISHER_ADMIN_URL."/mimetypes.php?op=add&start=$start&limit=$limit"); |
|
541 | 541 | exit(); |
542 | 542 | } |
543 | 543 | $order = $_REQUEST['order'] ?? 'ASC'; |
@@ -551,8 +551,8 @@ discard block |
||
551 | 551 | if (!isset($_REQUEST['mime_search'])) { |
552 | 552 | echo "<form action='mimetypes.php?op=search' method='post'>"; |
553 | 553 | echo "<table width='100%' cellspacing='1' class='outer'>"; |
554 | - echo "<tr><th colspan='2'>" . _AM_PUBLISHER_TEXT_SEARCH_MIME . '</th></tr>'; |
|
555 | - echo "<tr><td class='head' width='20%'>" . _AM_PUBLISHER_TEXT_SEARCH_BY . "</td> |
|
554 | + echo "<tr><th colspan='2'>"._AM_PUBLISHER_TEXT_SEARCH_MIME.'</th></tr>'; |
|
555 | + echo "<tr><td class='head' width='20%'>"._AM_PUBLISHER_TEXT_SEARCH_BY."</td> |
|
556 | 556 | <td class='even'> |
557 | 557 | <select name='search_by'>"; |
558 | 558 | foreach ($aSortBy as $value => $text) { |
@@ -561,14 +561,14 @@ discard block |
||
561 | 561 | echo '</select> |
562 | 562 | </td> |
563 | 563 | </tr>'; |
564 | - echo "<tr><td class='head'>" . _AM_PUBLISHER_TEXT_SEARCH_TEXT . "</td> |
|
564 | + echo "<tr><td class='head'>"._AM_PUBLISHER_TEXT_SEARCH_TEXT."</td> |
|
565 | 565 | <td class='even'> |
566 | 566 | <input type='text' name='search_text' id='search_text' value=''> |
567 | 567 | </td> |
568 | 568 | </tr>"; |
569 | 569 | echo "<tr class='foot'> |
570 | 570 | <td colspan='2'> |
571 | - <input type='submit' name='mime_search' id='mime_search' value='" . _AM_PUBLISHER_BUTTON_SEARCH . "'> |
|
571 | + <input type='submit' name='mime_search' id='mime_search' value='" . _AM_PUBLISHER_BUTTON_SEARCH."'> |
|
572 | 572 | </td> |
573 | 573 | </tr>"; |
574 | 574 | echo '</table></form>'; |
@@ -585,29 +585,29 @@ discard block |
||
585 | 585 | $mimetypes = $helper->getMimetypeHandler()->getObjects($crit); |
586 | 586 | $nav = new XoopsPageNav($mime_count, $limit, $start, 'start', "op=search&limit=$limit&order=$order&sort=$sort&mime_search=1&search_by=$search_field&search_text=$search_text"); |
587 | 587 | // Display results |
588 | - echo '<script type="text/javascript" src="' . PUBLISHER_URL . '/include/functions.js"></script>'; |
|
588 | + echo '<script type="text/javascript" src="'.PUBLISHER_URL.'/include/functions.js"></script>'; |
|
589 | 589 | |
590 | 590 | echo "<table width='100%' cellspacing='1' class='outer'>"; |
591 | 591 | echo "<tr><td colspan='6' align='right'>"; |
592 | - echo "<form action='" . PUBLISHER_ADMIN_URL . "/mimetypes.php?op=search' style='margin:0; padding:0;' method='post'>"; |
|
592 | + echo "<form action='".PUBLISHER_ADMIN_URL."/mimetypes.php?op=search' style='margin:0; padding:0;' method='post'>"; |
|
593 | 593 | echo '<table>'; |
594 | 594 | echo '<tr>'; |
595 | - echo "<td align='right'>" . _AM_PUBLISHER_TEXT_SEARCH_BY . '</td>'; |
|
595 | + echo "<td align='right'>"._AM_PUBLISHER_TEXT_SEARCH_BY.'</td>'; |
|
596 | 596 | echo "<td align='left'><select name='search_by'>"; |
597 | 597 | foreach ($aSearchBy as $value => $text) { |
598 | 598 | ($search_field == $value) ? $selected = "selected='selected'" : $selected = ''; |
599 | 599 | echo "<option value='$value' $selected>$text</option>"; |
600 | 600 | } |
601 | 601 | echo '</select></td>'; |
602 | - echo "<td align='right'>" . _AM_PUBLISHER_TEXT_SEARCH_TEXT . '</td>'; |
|
602 | + echo "<td align='right'>"._AM_PUBLISHER_TEXT_SEARCH_TEXT.'</td>'; |
|
603 | 603 | echo "<td align='left'><input type='text' name='search_text' id='search_text' value='$search_text'></td>"; |
604 | - echo "<td><input type='submit' name='mime_search' id='mime_search' value='" . _AM_PUBLISHER_BUTTON_SEARCH . "'></td>"; |
|
604 | + echo "<td><input type='submit' name='mime_search' id='mime_search' value='"._AM_PUBLISHER_BUTTON_SEARCH."'></td>"; |
|
605 | 605 | echo '</tr></table></form></td></tr>'; |
606 | 606 | |
607 | 607 | echo "<tr><td colspan='6'>"; |
608 | - echo "<form action='" . PUBLISHER_ADMIN_URL . "/mimetypes.php?op=search' style='margin:0; padding:0;' method='post'>"; |
|
608 | + echo "<form action='".PUBLISHER_ADMIN_URL."/mimetypes.php?op=search' style='margin:0; padding:0;' method='post'>"; |
|
609 | 609 | echo "<table width='100%'>"; |
610 | - echo "<tr><td align='right'>" . _AM_PUBLISHER_TEXT_SORT_BY . " |
|
610 | + echo "<tr><td align='right'>"._AM_PUBLISHER_TEXT_SORT_BY." |
|
611 | 611 | <select name='sort'>"; |
612 | 612 | foreach ($aSortBy as $value => $text) { |
613 | 613 | ($sort == $value) ? $selected = "selected='selected'" : $selected = ''; |
@@ -615,7 +615,7 @@ discard block |
||
615 | 615 | } |
616 | 616 | echo '</select> |
617 | 617 | |
618 | - ' . _AM_PUBLISHER_TEXT_ORDER_BY . " |
|
618 | + ' . _AM_PUBLISHER_TEXT_ORDER_BY." |
|
619 | 619 | <select name='order'>"; |
620 | 620 | foreach ($aOrderBy as $value => $text) { |
621 | 621 | ($order == $value) ? $selected = "selected='selected'" : $selected = ''; |
@@ -623,14 +623,14 @@ discard block |
||
623 | 623 | } |
624 | 624 | echo '</select> |
625 | 625 | |
626 | - ' . _AM_PUBLISHER_TEXT_NUMBER_PER_PAGE . " |
|
626 | + ' . _AM_PUBLISHER_TEXT_NUMBER_PER_PAGE." |
|
627 | 627 | <select name='limit'>"; |
628 | 628 | foreach ($aLimitBy as $value => $text) { |
629 | 629 | ($limit == $value) ? $selected = "selected='selected'" : $selected = ''; |
630 | 630 | echo "<option value='$value' $selected>$text</option>"; |
631 | 631 | } |
632 | 632 | echo "</select> |
633 | - <input type='submit' name='mime_sort' id='mime_sort' value='" . _AM_PUBLISHER_BUTTON_SUBMIT . "'> |
|
633 | + <input type='submit' name='mime_sort' id='mime_sort' value='" . _AM_PUBLISHER_BUTTON_SUBMIT."'> |
|
634 | 634 | <input type='hidden' name='mime_search' id='mime_search' value='1'> |
635 | 635 | <input type='hidden' name='search_by' id='search_by' value='$search_field'> |
636 | 636 | <input type='hidden' name='search_text' id='search_text' value='$search_text'> |
@@ -639,50 +639,50 @@ discard block |
||
639 | 639 | echo '</table>'; |
640 | 640 | echo '</td></tr>'; |
641 | 641 | if (count($mimetypes) > 0) { |
642 | - echo "<tr><th colspan='6'>" . _AM_PUBLISHER_TEXT_SEARCH_MIME . '</th></tr>'; |
|
642 | + echo "<tr><th colspan='6'>"._AM_PUBLISHER_TEXT_SEARCH_MIME.'</th></tr>'; |
|
643 | 643 | echo "<tr class='head'> |
644 | - <td>" . _AM_PUBLISHER_MIME_ID . '</td> |
|
645 | - <td>' . _AM_PUBLISHER_MIME_NAME . '</td> |
|
646 | - <td>' . _AM_PUBLISHER_MIME_EXT . '</td> |
|
647 | - <td>' . _AM_PUBLISHER_MIME_ADMIN . '</td> |
|
648 | - <td>' . _AM_PUBLISHER_MIME_USER . '</td> |
|
649 | - <td>' . _AM_PUBLISHER_MINDEX_ACTION . '</td> |
|
644 | + <td>" . _AM_PUBLISHER_MIME_ID.'</td> |
|
645 | + <td>' . _AM_PUBLISHER_MIME_NAME.'</td> |
|
646 | + <td>' . _AM_PUBLISHER_MIME_EXT.'</td> |
|
647 | + <td>' . _AM_PUBLISHER_MIME_ADMIN.'</td> |
|
648 | + <td>' . _AM_PUBLISHER_MIME_USER.'</td> |
|
649 | + <td>' . _AM_PUBLISHER_MINDEX_ACTION.'</td> |
|
650 | 650 | </tr>'; |
651 | 651 | foreach ($mimetypes as $mime) { |
652 | 652 | echo "<tr class='even'> |
653 | - <td><input type='checkbox' name='mimes[]' value='" . $mime->getVar('mime_id') . "'>" . $mime->getVar('mime_id') . '</td> |
|
654 | - <td>' . $mime->getVar('mime_name') . '</td> |
|
655 | - <td>' . $mime->getVar('mime_ext') . "</td> |
|
653 | + <td><input type='checkbox' name='mimes[]' value='" . $mime->getVar('mime_id')."'>".$mime->getVar('mime_id').'</td> |
|
654 | + <td>' . $mime->getVar('mime_name').'</td> |
|
655 | + <td>' . $mime->getVar('mime_ext')."</td> |
|
656 | 656 | <td> |
657 | - <a href='" . PUBLISHER_ADMIN_URL . '/mimetypes.php?op=updateMimeValue&id=' . $mime->getVar('mime_id') . '&mime_admin=' . $mime->getVar('mime_admin') . '&limit=' . $limit . '&start=' . $start . "'> |
|
658 | - " . ($mime->getVar('mime_admin') ? $imagearray['online'] : $imagearray['offline']) . "</a> |
|
657 | + <a href='" . PUBLISHER_ADMIN_URL.'/mimetypes.php?op=updateMimeValue&id='.$mime->getVar('mime_id').'&mime_admin='.$mime->getVar('mime_admin').'&limit='.$limit.'&start='.$start."'> |
|
658 | + " . ($mime->getVar('mime_admin') ? $imagearray['online'] : $imagearray['offline'])."</a> |
|
659 | 659 | </td> |
660 | 660 | <td> |
661 | - <a href='" . PUBLISHER_ADMIN_URL . '/mimetypes.php?op=updateMimeValue&id=' . $mime->getVar('mime_id') . '&mime_user=' . $mime->getVar('mime_user') . '&limit=' . $limit . '&start=' . $start . "'> |
|
662 | - " . ($mime->getVar('mime_user') ? $imagearray['online'] : $imagearray['offline']) . "</a> |
|
661 | + <a href='" . PUBLISHER_ADMIN_URL.'/mimetypes.php?op=updateMimeValue&id='.$mime->getVar('mime_id').'&mime_user='.$mime->getVar('mime_user').'&limit='.$limit.'&start='.$start."'> |
|
662 | + " . ($mime->getVar('mime_user') ? $imagearray['online'] : $imagearray['offline'])."</a> |
|
663 | 663 | </td> |
664 | 664 | <td> |
665 | - <a href='" . PUBLISHER_ADMIN_URL . '/mimetypes.php?op=edit&id=' . $mime->getVar('mime_id') . '&limit=' . $limit . '&start=' . $start . "'>" . $imagearray['editimg'] . "</a> |
|
666 | - <a href='" . PUBLISHER_ADMIN_URL . '/mimetypes.php?op=delete&id=' . $mime->getVar('mime_id') . '&limit=' . $limit . '&start=' . $start . "'>" . $imagearray['deleteimg'] . '</a> |
|
665 | + <a href='" . PUBLISHER_ADMIN_URL.'/mimetypes.php?op=edit&id='.$mime->getVar('mime_id').'&limit='.$limit.'&start='.$start."'>".$imagearray['editimg']."</a> |
|
666 | + <a href='" . PUBLISHER_ADMIN_URL.'/mimetypes.php?op=delete&id='.$mime->getVar('mime_id').'&limit='.$limit.'&start='.$start."'>".$imagearray['deleteimg'].'</a> |
|
667 | 667 | </td> |
668 | 668 | </tr>'; |
669 | 669 | } |
670 | 670 | echo "<tr class='foot'> |
671 | 671 | <td colspan='6' valign='top'> |
672 | - <a href='http://www.filext.com' style='float: right' target='_blank'>" . _AM_PUBLISHER_MIME_FINDMIMETYPE . "</a> |
|
672 | + <a href='http://www.filext.com' style='float: right' target='_blank'>" . _AM_PUBLISHER_MIME_FINDMIMETYPE."</a> |
|
673 | 673 | <input type='checkbox' name='checkAllMimes' value='0' onclick='selectAll(this.form,\"mimes[]\",this.checked);'> |
674 | - <input type='submit' name='deleteMimes' id='deleteMimes' value='" . _AM_PUBLISHER_BUTTON_DELETE . "'> |
|
675 | - <input type='submit' name='add_mime' id='add_mime' value='" . _AM_PUBLISHER_MIME_CREATEF . "' class='formButton'> |
|
674 | + <input type='submit' name='deleteMimes' id='deleteMimes' value='" . _AM_PUBLISHER_BUTTON_DELETE."'> |
|
675 | + <input type='submit' name='add_mime' id='add_mime' value='" . _AM_PUBLISHER_MIME_CREATEF."' class='formButton'> |
|
676 | 676 | </td> |
677 | 677 | </tr>"; |
678 | 678 | } else { |
679 | - echo '<tr><th>' . _AM_PUBLISHER_TEXT_SEARCH_MIME . '</th></tr>'; |
|
679 | + echo '<tr><th>'._AM_PUBLISHER_TEXT_SEARCH_MIME.'</th></tr>'; |
|
680 | 680 | echo "<tr class='even'> |
681 | - <td>" . _AM_PUBLISHER_TEXT_NO_RECORDS . '</td> |
|
681 | + <td>" . _AM_PUBLISHER_TEXT_NO_RECORDS.'</td> |
|
682 | 682 | </tr>'; |
683 | 683 | } |
684 | 684 | echo '</table>'; |
685 | - echo "<div id='pagenav'>" . $nav->renderNav() . '</div>'; |
|
685 | + echo "<div id='pagenav'>".$nav->renderNav().'</div>'; |
|
686 | 686 | } |
687 | 687 | Publisher\Utils::closeCollapsableBar('mimesearchtable', 'mimesearchicon'); |
688 | 688 | $xoops->footer(); |
@@ -702,7 +702,7 @@ discard block |
||
702 | 702 | } |
703 | 703 | |
704 | 704 | if (!isset($_REQUEST['id'])) { |
705 | - $xoops->redirect(PUBLISHER_ADMIN_URL . '/mimetypes.php', 3, _AM_PUBLISHER_MESSAGE_NO_ID); |
|
705 | + $xoops->redirect(PUBLISHER_ADMIN_URL.'/mimetypes.php', 3, _AM_PUBLISHER_MESSAGE_NO_ID); |
|
706 | 706 | } |
707 | 707 | $mime_id = (int)$_REQUEST['id']; |
708 | 708 | |
@@ -719,9 +719,9 @@ discard block |
||
719 | 719 | $mimetype->setVar('mime_user', $mime_user); |
720 | 720 | } |
721 | 721 | if ($helper->getMimetypeHandler()->insert($mimetype, true)) { |
722 | - header('Location: ' . PUBLISHER_ADMIN_URL . "/mimetypes.php?limit=$limit&start=$start"); |
|
722 | + header('Location: '.PUBLISHER_ADMIN_URL."/mimetypes.php?limit=$limit&start=$start"); |
|
723 | 723 | } else { |
724 | - $xoops->redirect(PUBLISHER_ADMIN_URL . "/mimetypes.php?limit=$limit&start=$start", 3); |
|
724 | + $xoops->redirect(PUBLISHER_ADMIN_URL."/mimetypes.php?limit=$limit&start=$start", 3); |
|
725 | 725 | } |
726 | 726 | } |
727 | 727 | |
@@ -754,7 +754,7 @@ discard block |
||
754 | 754 | function clearAddSession() |
755 | 755 | { |
756 | 756 | _clearAddSessionVars(); |
757 | - header('Location: ' . Publisher\Utils::makeURI(PUBLISHER_ADMIN_URL . '/mimetypes.php', ['op' => 'add'], false)); |
|
757 | + header('Location: '.Publisher\Utils::makeURI(PUBLISHER_ADMIN_URL.'/mimetypes.php', ['op' => 'add'], false)); |
|
758 | 758 | } |
759 | 759 | |
760 | 760 | /** |
@@ -775,5 +775,5 @@ discard block |
||
775 | 775 | { |
776 | 776 | $mimeid = $_REQUEST['id']; |
777 | 777 | _clearEditSessionVars($mimeid); |
778 | - header('Location: ' . Publisher\Utils::makeURI(PUBLISHER_ADMIN_URL . '/mimetypes.php', ['op' => 'edit', 'id' => $mimeid], false)); |
|
778 | + header('Location: '.Publisher\Utils::makeURI(PUBLISHER_ADMIN_URL.'/mimetypes.php', ['op' => 'edit', 'id' => $mimeid], false)); |
|
779 | 779 | } |
@@ -34,26 +34,26 @@ discard block |
||
34 | 34 | } |
35 | 35 | |
36 | 36 | switch ($op) { |
37 | - case 'importExecute': |
|
37 | + case 'importExecute': |
|
38 | 38 | |
39 | - $importfile = $_POST['importfile'] ?? 'nonselected'; |
|
40 | - $importfile_path = XoopsBaseConfig::get('root-path') . '/modules/' . $helper->getModule()->dirname() . '/admin/import/' . $importfile . '.php'; |
|
41 | - require_once $importfile_path; |
|
42 | - break; |
|
43 | - case 'default': |
|
44 | - default: |
|
39 | + $importfile = $_POST['importfile'] ?? 'nonselected'; |
|
40 | + $importfile_path = XoopsBaseConfig::get('root-path') . '/modules/' . $helper->getModule()->dirname() . '/admin/import/' . $importfile . '.php'; |
|
41 | + require_once $importfile_path; |
|
42 | + break; |
|
43 | + case 'default': |
|
44 | + default: |
|
45 | 45 | |
46 | - $importfile = 'none'; |
|
46 | + $importfile = 'none'; |
|
47 | 47 | |
48 | - Publisher\Utils::cpHeader(); |
|
49 | - //publisher_adminMenu(-1, _AM_PUBLISHER_IMPORT); |
|
48 | + Publisher\Utils::cpHeader(); |
|
49 | + //publisher_adminMenu(-1, _AM_PUBLISHER_IMPORT); |
|
50 | 50 | |
51 | - Publisher\Utils::openCollapsableBar('import', 'importicon', _AM_PUBLISHER_IMPORT_TITLE, _AM_PUBLISHER_IMPORT_INFO); |
|
51 | + Publisher\Utils::openCollapsableBar('import', 'importicon', _AM_PUBLISHER_IMPORT_TITLE, _AM_PUBLISHER_IMPORT_INFO); |
|
52 | 52 | |
53 | - $moduleHandler = $xoops->getHandlerModule(); |
|
53 | + $moduleHandler = $xoops->getHandlerModule(); |
|
54 | 54 | |
55 | - // WF-Section |
|
56 | - /*$wfs_version = 0; |
|
55 | + // WF-Section |
|
56 | + /*$wfs_version = 0; |
|
57 | 57 | $moduleObj = $moduleHandler->getByDirname('wfsection'); |
58 | 58 | if ($moduleObj) { |
59 | 59 | $from_module_version = round($moduleObj->getVar('version') / 100, 2); |
@@ -63,30 +63,30 @@ discard block |
||
63 | 63 | } |
64 | 64 | } */ |
65 | 65 | |
66 | - // News |
|
67 | - $news_version = 0; |
|
68 | - $moduleObj = $xoops->getModuleByDirname('news'); |
|
69 | - if ($moduleObj) { |
|
70 | - $from_module_version = round($moduleObj->getVar('version') / 100, 2); |
|
71 | - if ($from_module_version >= 1.1) { |
|
72 | - $importfile_select_array['news'] = 'News ' . $from_module_version; |
|
73 | - $news_version = $from_module_version; |
|
66 | + // News |
|
67 | + $news_version = 0; |
|
68 | + $moduleObj = $xoops->getModuleByDirname('news'); |
|
69 | + if ($moduleObj) { |
|
70 | + $from_module_version = round($moduleObj->getVar('version') / 100, 2); |
|
71 | + if ($from_module_version >= 1.1) { |
|
72 | + $importfile_select_array['news'] = 'News ' . $from_module_version; |
|
73 | + $news_version = $from_module_version; |
|
74 | + } |
|
74 | 75 | } |
75 | - } |
|
76 | 76 | |
77 | - // Smartsection |
|
78 | - $smartsection_version = 0; |
|
79 | - $moduleObj = $xoops->getModuleByDirname('smartsection'); |
|
80 | - if ($moduleObj) { |
|
81 | - $from_module_version = round($moduleObj->getVar('version') / 100, 2); |
|
82 | - if ($from_module_version >= 1.1) { |
|
83 | - $importfile_select_array['smartsection'] = 'Smartsection ' . $from_module_version; |
|
84 | - $smartsection_version = $from_module_version; |
|
77 | + // Smartsection |
|
78 | + $smartsection_version = 0; |
|
79 | + $moduleObj = $xoops->getModuleByDirname('smartsection'); |
|
80 | + if ($moduleObj) { |
|
81 | + $from_module_version = round($moduleObj->getVar('version') / 100, 2); |
|
82 | + if ($from_module_version >= 1.1) { |
|
83 | + $importfile_select_array['smartsection'] = 'Smartsection ' . $from_module_version; |
|
84 | + $smartsection_version = $from_module_version; |
|
85 | + } |
|
85 | 86 | } |
86 | - } |
|
87 | 87 | |
88 | - // XF-Section |
|
89 | - /*$xfs_version = 0; |
|
88 | + // XF-Section |
|
89 | + /*$xfs_version = 0; |
|
90 | 90 | $moduleObj = $moduleHandler->getByDirname('xfsection'); |
91 | 91 | If ($moduleObj) { |
92 | 92 | $from_module_version = round($moduleObj->getVar('version') / 100, 2); |
@@ -96,47 +96,47 @@ discard block |
||
96 | 96 | } |
97 | 97 | } */ |
98 | 98 | |
99 | - if (isset($importfile_select_array) && count($importfile_select_array) > 0) { |
|
100 | - $sform = new ThemeForm(_AM_PUBLISHER_IMPORT_SELECTION, 'op', xoops_getenv('PHP_SELF')); |
|
101 | - $sform->setExtra('enctype="multipart/form-data"'); |
|
102 | - |
|
103 | - // Partners to import |
|
104 | - $importfile_select = new Select('', 'importfile', $importfile); |
|
105 | - $importfile_select->addOptionArray($importfile_select_array); |
|
106 | - $importfile_tray = new ElementTray(_AM_PUBLISHER_IMPORT_SELECT_FILE, ' '); |
|
107 | - $importfile_tray->addElement($importfile_select); |
|
108 | - $importfile_tray->setDescription(_AM_PUBLISHER_IMPORT_SELECT_FILE_DSC); |
|
109 | - $sform->addElement($importfile_tray); |
|
110 | - |
|
111 | - // Buttons |
|
112 | - $buttonTray = new ElementTray('', ''); |
|
113 | - $hidden = new Hidden('op', 'importExecute'); |
|
114 | - $buttonTray->addElement($hidden); |
|
115 | - |
|
116 | - $buttonImport = new Button('', '', _AM_PUBLISHER_IMPORT, 'submit'); |
|
117 | - $buttonImport->setExtra('onclick="this.form.elements.op.value=\'importExecute\'"'); |
|
118 | - $buttonTray->addElement($buttonImport); |
|
119 | - |
|
120 | - $buttonCancel = new Button('', '', _AM_PUBLISHER_CANCEL, 'button'); |
|
121 | - $buttonCancel->setExtra('onclick="history.go(-1)"'); |
|
122 | - $buttonTray->addElement($buttonCancel); |
|
123 | - |
|
124 | - $sform->addElement($buttonTray); |
|
125 | - /*$sform->addElement(new \Xoops\Form\Hidden('xfs_version', $xfs_version)); |
|
99 | + if (isset($importfile_select_array) && count($importfile_select_array) > 0) { |
|
100 | + $sform = new ThemeForm(_AM_PUBLISHER_IMPORT_SELECTION, 'op', xoops_getenv('PHP_SELF')); |
|
101 | + $sform->setExtra('enctype="multipart/form-data"'); |
|
102 | + |
|
103 | + // Partners to import |
|
104 | + $importfile_select = new Select('', 'importfile', $importfile); |
|
105 | + $importfile_select->addOptionArray($importfile_select_array); |
|
106 | + $importfile_tray = new ElementTray(_AM_PUBLISHER_IMPORT_SELECT_FILE, ' '); |
|
107 | + $importfile_tray->addElement($importfile_select); |
|
108 | + $importfile_tray->setDescription(_AM_PUBLISHER_IMPORT_SELECT_FILE_DSC); |
|
109 | + $sform->addElement($importfile_tray); |
|
110 | + |
|
111 | + // Buttons |
|
112 | + $buttonTray = new ElementTray('', ''); |
|
113 | + $hidden = new Hidden('op', 'importExecute'); |
|
114 | + $buttonTray->addElement($hidden); |
|
115 | + |
|
116 | + $buttonImport = new Button('', '', _AM_PUBLISHER_IMPORT, 'submit'); |
|
117 | + $buttonImport->setExtra('onclick="this.form.elements.op.value=\'importExecute\'"'); |
|
118 | + $buttonTray->addElement($buttonImport); |
|
119 | + |
|
120 | + $buttonCancel = new Button('', '', _AM_PUBLISHER_CANCEL, 'button'); |
|
121 | + $buttonCancel->setExtra('onclick="history.go(-1)"'); |
|
122 | + $buttonTray->addElement($buttonCancel); |
|
123 | + |
|
124 | + $sform->addElement($buttonTray); |
|
125 | + /*$sform->addElement(new \Xoops\Form\Hidden('xfs_version', $xfs_version)); |
|
126 | 126 | $sform->addElement(new \Xoops\Form\Hidden('wfs_version', $wfs_version));*/ |
127 | - $sform->addElement(new Hidden('news_version', $news_version)); |
|
128 | - $sform->addElement(new Hidden('smartsection_version', $smartsection_version)); |
|
129 | - $sform->display(); |
|
130 | - unset($hidden); |
|
131 | - } else { |
|
132 | - echo '<span style="color: #567; margin: 3px 0 12px 0; font-weight: bold; font-size: small; display: block; ">' . _AM_PUBLISHER_IMPORT_NO_MODULE . '</span>'; |
|
133 | - } |
|
127 | + $sform->addElement(new Hidden('news_version', $news_version)); |
|
128 | + $sform->addElement(new Hidden('smartsection_version', $smartsection_version)); |
|
129 | + $sform->display(); |
|
130 | + unset($hidden); |
|
131 | + } else { |
|
132 | + echo '<span style="color: #567; margin: 3px 0 12px 0; font-weight: bold; font-size: small; display: block; ">' . _AM_PUBLISHER_IMPORT_NO_MODULE . '</span>'; |
|
133 | + } |
|
134 | 134 | |
135 | - // End of collapsable bar |
|
135 | + // End of collapsable bar |
|
136 | 136 | |
137 | - Publisher\Utils::closeCollapsableBar('import', 'importicon'); |
|
137 | + Publisher\Utils::closeCollapsableBar('import', 'importicon'); |
|
138 | 138 | |
139 | - break; |
|
139 | + break; |
|
140 | 140 | } |
141 | 141 | |
142 | 142 | $xoops->footer(); |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | use Xoops\Form\ThemeForm; |
26 | 26 | use XoopsModules\Publisher; |
27 | 27 | |
28 | -require_once __DIR__ . '/admin_header.php'; |
|
28 | +require_once __DIR__.'/admin_header.php'; |
|
29 | 29 | $xoops = Xoops::getInstance(); |
30 | 30 | |
31 | 31 | $op = $_GET['op'] ?? 'none'; |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | case 'importExecute': |
38 | 38 | |
39 | 39 | $importfile = $_POST['importfile'] ?? 'nonselected'; |
40 | - $importfile_path = XoopsBaseConfig::get('root-path') . '/modules/' . $helper->getModule()->dirname() . '/admin/import/' . $importfile . '.php'; |
|
40 | + $importfile_path = XoopsBaseConfig::get('root-path').'/modules/'.$helper->getModule()->dirname().'/admin/import/'.$importfile.'.php'; |
|
41 | 41 | require_once $importfile_path; |
42 | 42 | break; |
43 | 43 | case 'default': |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | if ($moduleObj) { |
70 | 70 | $from_module_version = round($moduleObj->getVar('version') / 100, 2); |
71 | 71 | if ($from_module_version >= 1.1) { |
72 | - $importfile_select_array['news'] = 'News ' . $from_module_version; |
|
72 | + $importfile_select_array['news'] = 'News '.$from_module_version; |
|
73 | 73 | $news_version = $from_module_version; |
74 | 74 | } |
75 | 75 | } |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | if ($moduleObj) { |
81 | 81 | $from_module_version = round($moduleObj->getVar('version') / 100, 2); |
82 | 82 | if ($from_module_version >= 1.1) { |
83 | - $importfile_select_array['smartsection'] = 'Smartsection ' . $from_module_version; |
|
83 | + $importfile_select_array['smartsection'] = 'Smartsection '.$from_module_version; |
|
84 | 84 | $smartsection_version = $from_module_version; |
85 | 85 | } |
86 | 86 | } |
@@ -129,7 +129,7 @@ discard block |
||
129 | 129 | $sform->display(); |
130 | 130 | unset($hidden); |
131 | 131 | } else { |
132 | - echo '<span style="color: #567; margin: 3px 0 12px 0; font-weight: bold; font-size: small; display: block; ">' . _AM_PUBLISHER_IMPORT_NO_MODULE . '</span>'; |
|
132 | + echo '<span style="color: #567; margin: 3px 0 12px 0; font-weight: bold; font-size: small; display: block; ">'._AM_PUBLISHER_IMPORT_NO_MODULE.'</span>'; |
|
133 | 133 | } |
134 | 134 | |
135 | 135 | // End of collapsable bar |
@@ -364,27 +364,27 @@ discard block |
||
364 | 364 | /* @var Publisher\Category $subcat */ |
365 | 365 | foreach ($subcatsObj as $subcat) { |
366 | 366 | $modify = "<a href='category.php?op=mod&categoryid=" |
367 | - . $subcat->getVar('categoryid') |
|
368 | - . "'><img src='" |
|
369 | - . XoopsBaseConfig::get('url') |
|
370 | - . '/modules/' |
|
371 | - . $helper->getModule()->dirname() |
|
372 | - . "/images/links/edit.gif' title='" |
|
373 | - . _AM_PUBLISHER_MODIFY |
|
374 | - . "' alt='" |
|
375 | - . _AM_PUBLISHER_MODIFY |
|
376 | - . "'></a>"; |
|
367 | + . $subcat->getVar('categoryid') |
|
368 | + . "'><img src='" |
|
369 | + . XoopsBaseConfig::get('url') |
|
370 | + . '/modules/' |
|
371 | + . $helper->getModule()->dirname() |
|
372 | + . "/images/links/edit.gif' title='" |
|
373 | + . _AM_PUBLISHER_MODIFY |
|
374 | + . "' alt='" |
|
375 | + . _AM_PUBLISHER_MODIFY |
|
376 | + . "'></a>"; |
|
377 | 377 | $delete = "<a href='category.php?op=del&categoryid=" |
378 | - . $subcat->getVar('categoryid') |
|
379 | - . "'><img src='" |
|
380 | - . XoopsBaseConfig::get('url') |
|
381 | - . '/modules/' |
|
382 | - . $helper->getModule()->dirname() |
|
383 | - . "/images/links/delete.png' title='" |
|
384 | - . _AM_PUBLISHER_DELETE |
|
385 | - . "' alt='" |
|
386 | - . _AM_PUBLISHER_DELETE |
|
387 | - . "'></a>"; |
|
378 | + . $subcat->getVar('categoryid') |
|
379 | + . "'><img src='" |
|
380 | + . XoopsBaseConfig::get('url') |
|
381 | + . '/modules/' |
|
382 | + . $helper->getModule()->dirname() |
|
383 | + . "/images/links/delete.png' title='" |
|
384 | + . _AM_PUBLISHER_DELETE |
|
385 | + . "' alt='" |
|
386 | + . _AM_PUBLISHER_DELETE |
|
387 | + . "'></a>"; |
|
388 | 388 | echo '<tr>'; |
389 | 389 | echo "<td class='head' align='left'>" . $subcat->getVar('categoryid') . '</td>'; |
390 | 390 | echo "<td class='even' align='left'><a href='" . XoopsBaseConfig::get('url') . '/modules/' . $helper->getModule()->dirname() . '/category.php?categoryid=' . $subcat->getVar('categoryid') . '&parentid=' . $subcat->getVar('parentid') . "'>" . $subcat->getVar('name') . '</a></td>'; |
@@ -420,27 +420,27 @@ discard block |
||
420 | 420 | foreach ($itemsObj as $iValue) { |
421 | 421 | $categoryObj = $allcats[$iValue->getVar('categoryid')]; |
422 | 422 | $modify = "<a href='item.php?op=mod&itemid=" |
423 | - . $iValue->getVar('itemid') |
|
424 | - . "'><img src='" |
|
425 | - . XoopsBaseConfig::get('url') |
|
426 | - . '/modules/' |
|
427 | - . $helper->getModule()->dirname() |
|
428 | - . "/images/links/edit.gif' title='" |
|
429 | - . _AM_PUBLISHER_EDITITEM |
|
430 | - . "' alt='" |
|
431 | - . _AM_PUBLISHER_EDITITEM |
|
432 | - . "'></a>"; |
|
423 | + . $iValue->getVar('itemid') |
|
424 | + . "'><img src='" |
|
425 | + . XoopsBaseConfig::get('url') |
|
426 | + . '/modules/' |
|
427 | + . $helper->getModule()->dirname() |
|
428 | + . "/images/links/edit.gif' title='" |
|
429 | + . _AM_PUBLISHER_EDITITEM |
|
430 | + . "' alt='" |
|
431 | + . _AM_PUBLISHER_EDITITEM |
|
432 | + . "'></a>"; |
|
433 | 433 | $delete = "<a href='item.php?op=del&itemid=" |
434 | - . $iValue->getVar('itemid') |
|
435 | - . "'><img src='" |
|
436 | - . XoopsBaseConfig::get('url') |
|
437 | - . '/modules/' |
|
438 | - . $helper->getModule()->dirname() |
|
439 | - . "/images/links/delete.png' title='" |
|
440 | - . _AM_PUBLISHER_DELETEITEM |
|
441 | - . "' alt='" |
|
442 | - . _AM_PUBLISHER_DELETEITEM |
|
443 | - . "'></a>"; |
|
434 | + . $iValue->getVar('itemid') |
|
435 | + . "'><img src='" |
|
436 | + . XoopsBaseConfig::get('url') |
|
437 | + . '/modules/' |
|
438 | + . $helper->getModule()->dirname() |
|
439 | + . "/images/links/delete.png' title='" |
|
440 | + . _AM_PUBLISHER_DELETEITEM |
|
441 | + . "' alt='" |
|
442 | + . _AM_PUBLISHER_DELETEITEM |
|
443 | + . "'></a>"; |
|
444 | 444 | echo '<tr>'; |
445 | 445 | echo "<td class='head' align='center'>" . $iValue->getVar('itemid') . '</td>'; |
446 | 446 | echo "<td class='even' align='left'>" . $categoryObj->getVar('name') . '</td>'; |
@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | * @author The SmartFactory <www.smartfactory.ca> |
24 | 24 | * @version $Id$ |
25 | 25 | */ |
26 | -require_once __DIR__ . '/admin_header.php'; |
|
26 | +require_once __DIR__.'/admin_header.php'; |
|
27 | 27 | |
28 | 28 | $xoops = Xoops::getInstance(); |
29 | 29 | $op = Request::getCmd('op'); |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | echo $xoops->confirm( |
54 | 54 | ['op' => 'del', 'categoryid' => $categoryObj->getVar('categoryid'), 'confirm' => 1, 'name' => $categoryObj->getVar('name')], |
55 | 55 | 'category.php', |
56 | - _AM_PUBLISHER_DELETECOL . " '" . $categoryObj->getVar('name') . "'. <br> <br>" . _AM_PUBLISHER_DELETE_CAT_CONFIRM, |
|
56 | + _AM_PUBLISHER_DELETECOL." '".$categoryObj->getVar('name')."'. <br> <br>"._AM_PUBLISHER_DELETE_CAT_CONFIRM, |
|
57 | 57 | _AM_PUBLISHER_DELETE |
58 | 58 | ); |
59 | 59 | $xoops->footer(); |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | if ($uploader->fetchMedia($filename) && $uploader->upload()) { |
99 | 99 | $categoryObj->setVar('image', $uploader->getSavedFileName()); |
100 | 100 | } else { |
101 | - $xoops->redirect('javascript:history.go(-1)', 2, _AM_PUBLISHER_FILEUPLOAD_ERROR . $uploader->getErrors()); |
|
101 | + $xoops->redirect('javascript:history.go(-1)', 2, _AM_PUBLISHER_FILEUPLOAD_ERROR.$uploader->getErrors()); |
|
102 | 102 | } |
103 | 103 | } |
104 | 104 | } else { |
@@ -148,7 +148,7 @@ discard block |
||
148 | 148 | } |
149 | 149 | |
150 | 150 | if (!$categoryObj->store()) { |
151 | - $xoops->redirect('javascript:history.go(-1)', 3, _AM_PUBLISHER_CATEGORY_SAVE_ERROR . Publisher\Utils::formatErrors($categoryObj->getErrors())); |
|
151 | + $xoops->redirect('javascript:history.go(-1)', 3, _AM_PUBLISHER_CATEGORY_SAVE_ERROR.Publisher\Utils::formatErrors($categoryObj->getErrors())); |
|
152 | 152 | } |
153 | 153 | // TODO : put this function in the category class |
154 | 154 | Publisher\Utils::saveCategoryPermissions($grpread, $categoryObj->getVar('categoryid'), 'category_read'); |
@@ -165,7 +165,7 @@ discard block |
||
165 | 165 | $categoryObj->setVar('parentid', $parentCat); |
166 | 166 | |
167 | 167 | if (!$categoryObj->store()) { |
168 | - $xoops->redirect('javascript:history.go(-1)', 3, _AM_PUBLISHER_SUBCATEGORY_SAVE_ERROR . Publisher\Utils::formatErrors($categoryObj->getErrors())); |
|
168 | + $xoops->redirect('javascript:history.go(-1)', 3, _AM_PUBLISHER_SUBCATEGORY_SAVE_ERROR.Publisher\Utils::formatErrors($categoryObj->getErrors())); |
|
169 | 169 | } |
170 | 170 | // TODO : put this function in the category class |
171 | 171 | Publisher\Utils::saveCategoryPermissions($grpread, $categoryObj->getVar('categoryid'), 'category_read'); |
@@ -207,7 +207,7 @@ discard block |
||
207 | 207 | |
208 | 208 | echo "<br>\n"; |
209 | 209 | echo '<form><div style="margin-bottom: 12px;">'; |
210 | - echo "<input type='button' name='button' onclick=\"location='category.php?op=mod'\" value='" . _AM_PUBLISHER_CATEGORY_CREATE . "'> "; |
|
210 | + echo "<input type='button' name='button' onclick=\"location='category.php?op=mod'\" value='"._AM_PUBLISHER_CATEGORY_CREATE."'> "; |
|
211 | 211 | //echo "<input type='button' name='button' onclick=\"location='item.php?op=mod'\" value='" . _AM_PUBLISHER_CREATEITEM . "'> "; |
212 | 212 | echo '</div></form>'; |
213 | 213 | |
@@ -218,9 +218,9 @@ discard block |
||
218 | 218 | |
219 | 219 | echo "<table width='100%' cellspacing=1 cellpadding=3 border=0 class = outer>"; |
220 | 220 | echo '<tr>'; |
221 | - echo "<td class='bg3' align='left'><strong>" . _AM_PUBLISHER_ITEMCATEGORYNAME . '</strong></td>'; |
|
222 | - echo "<td width='60' class='bg3' width='65' align='center'><strong>" . _CO_PUBLISHER_WEIGHT . '</strong></td>'; |
|
223 | - echo "<td width='60' class='bg3' align='center'><strong>" . _AM_PUBLISHER_ACTION . '</strong></td>'; |
|
221 | + echo "<td class='bg3' align='left'><strong>"._AM_PUBLISHER_ITEMCATEGORYNAME.'</strong></td>'; |
|
222 | + echo "<td width='60' class='bg3' width='65' align='center'><strong>"._CO_PUBLISHER_WEIGHT.'</strong></td>'; |
|
223 | + echo "<td width='60' class='bg3' align='center'><strong>"._AM_PUBLISHER_ACTION.'</strong></td>'; |
|
224 | 224 | echo '</tr>'; |
225 | 225 | $totalCategories = $helper->getCategoryHandler()->getCategoriesCount(0); |
226 | 226 | if (count($categoriesObj) > 0) { |
@@ -229,13 +229,13 @@ discard block |
||
229 | 229 | } |
230 | 230 | } else { |
231 | 231 | echo '<tr>'; |
232 | - echo "<td class='head' align='center' colspan= '7'>" . _AM_PUBLISHER_NOCAT . '</td>'; |
|
232 | + echo "<td class='head' align='center' colspan= '7'>"._AM_PUBLISHER_NOCAT.'</td>'; |
|
233 | 233 | echo '</tr>'; |
234 | 234 | $categoryid = '0'; |
235 | 235 | } |
236 | 236 | echo "</table>\n"; |
237 | 237 | $pagenav = new XoopsPageNav($totalCategories, $helper->getConfig('idxcat_perpage'), $startcategory, 'startcategory'); |
238 | - echo '<div style="text-align:right;">' . $pagenav->renderNav() . '</div>'; |
|
238 | + echo '<div style="text-align:right;">'.$pagenav->renderNav().'</div>'; |
|
239 | 239 | echo '<br>'; |
240 | 240 | Publisher\Utils::closeCollapsableBar('createdcategories', 'createdcategoriesicon'); |
241 | 241 | echo '<br>'; |
@@ -260,11 +260,11 @@ discard block |
||
260 | 260 | $description = $categoryObj->getVar('description'); |
261 | 261 | if (!XoopsLocale::isMultiByte()) { |
262 | 262 | if (mb_strlen($description) >= 100) { |
263 | - $description = mb_substr($description, 0, 100 - 1) . '...'; |
|
263 | + $description = mb_substr($description, 0, 100 - 1).'...'; |
|
264 | 264 | } |
265 | 265 | } |
266 | - $modify = "<a href='category.php?op=mod&categoryid=" . $categoryObj->getVar('categoryid') . '&parentid=' . $categoryObj->getVar('parentid') . "'><img src='" . PUBLISHER_URL . "/images/links/edit.gif' title='" . _AM_PUBLISHER_EDITCOL . "' alt='" . _AM_PUBLISHER_EDITCOL . "'></a>"; |
|
267 | - $delete = "<a href='category.php?op=del&categoryid=" . $categoryObj->getVar('categoryid') . "'><img src='" . PUBLISHER_URL . "/images/links/delete.png' title='" . _AM_PUBLISHER_DELETECOL . "' alt='" . _AM_PUBLISHER_DELETECOL . "'></a>"; |
|
266 | + $modify = "<a href='category.php?op=mod&categoryid=".$categoryObj->getVar('categoryid').'&parentid='.$categoryObj->getVar('parentid')."'><img src='".PUBLISHER_URL."/images/links/edit.gif' title='"._AM_PUBLISHER_EDITCOL."' alt='"._AM_PUBLISHER_EDITCOL."'></a>"; |
|
267 | + $delete = "<a href='category.php?op=del&categoryid=".$categoryObj->getVar('categoryid')."'><img src='".PUBLISHER_URL."/images/links/delete.png' title='"._AM_PUBLISHER_DELETECOL."' alt='"._AM_PUBLISHER_DELETECOL."'></a>"; |
|
268 | 268 | |
269 | 269 | $spaces = ''; |
270 | 270 | for ($j = 0; $j < $level; ++$j) { |
@@ -272,8 +272,8 @@ discard block |
||
272 | 272 | } |
273 | 273 | |
274 | 274 | echo '<tr>'; |
275 | - echo "<td class='even' align='left'>" . $spaces . "<a href='" . PUBLISHER_URL . '/category.php?categoryid=' . $categoryObj->getVar('categoryid') . "'><img src='" . PUBLISHER_URL . "/images/links/subcat.gif' alt=''> " . $categoryObj->getVar('name') . '</a></td>'; |
|
276 | - echo "<td class='even' align='center'>" . $categoryObj->getVar('weight') . '</td>'; |
|
275 | + echo "<td class='even' align='left'>".$spaces."<a href='".PUBLISHER_URL.'/category.php?categoryid='.$categoryObj->getVar('categoryid')."'><img src='".PUBLISHER_URL."/images/links/subcat.gif' alt=''> ".$categoryObj->getVar('name').'</a></td>'; |
|
276 | + echo "<td class='even' align='center'>".$categoryObj->getVar('weight').'</td>'; |
|
277 | 277 | echo "<td class='even' align='center'> $modify $delete </td>"; |
278 | 278 | echo '</tr>'; |
279 | 279 | $subCategoriesObj = $helper->getCategoryHandler()->getCategories(0, 0, $categoryObj->getVar('categoryid')); |
@@ -355,10 +355,10 @@ discard block |
||
355 | 355 | |
356 | 356 | echo "<table width='100%' cellspacing=1 cellpadding=3 border=0 class = outer>"; |
357 | 357 | echo '<tr>'; |
358 | - echo "<td width='60' class='bg3' align='left'><strong>" . _AM_PUBLISHER_CATID . '</strong></td>'; |
|
359 | - echo "<td width='20%' class='bg3' align='left'><strong>" . _AM_PUBLISHER_CATCOLNAME . '</strong></td>'; |
|
360 | - echo "<td class='bg3' align='left'><strong>" . _AM_PUBLISHER_SUBDESCRIPT . '</strong></td>'; |
|
361 | - echo "<td width='60' class='bg3' align='right'><strong>" . _AM_PUBLISHER_ACTION . '</strong></td>'; |
|
358 | + echo "<td width='60' class='bg3' align='left'><strong>"._AM_PUBLISHER_CATID.'</strong></td>'; |
|
359 | + echo "<td width='20%' class='bg3' align='left'><strong>"._AM_PUBLISHER_CATCOLNAME.'</strong></td>'; |
|
360 | + echo "<td class='bg3' align='left'><strong>"._AM_PUBLISHER_SUBDESCRIPT.'</strong></td>'; |
|
361 | + echo "<td width='60' class='bg3' align='right'><strong>"._AM_PUBLISHER_ACTION.'</strong></td>'; |
|
362 | 362 | echo '</tr>'; |
363 | 363 | if ($totalsubs > 0) { |
364 | 364 | /* @var Publisher\Category $subcat */ |
@@ -386,15 +386,15 @@ discard block |
||
386 | 386 | . _AM_PUBLISHER_DELETE |
387 | 387 | . "'></a>"; |
388 | 388 | echo '<tr>'; |
389 | - echo "<td class='head' align='left'>" . $subcat->getVar('categoryid') . '</td>'; |
|
390 | - echo "<td class='even' align='left'><a href='" . XoopsBaseConfig::get('url') . '/modules/' . $helper->getModule()->dirname() . '/category.php?categoryid=' . $subcat->getVar('categoryid') . '&parentid=' . $subcat->getVar('parentid') . "'>" . $subcat->getVar('name') . '</a></td>'; |
|
391 | - echo "<td class='even' align='left'>" . $subcat->getVar('description') . '</td>'; |
|
389 | + echo "<td class='head' align='left'>".$subcat->getVar('categoryid').'</td>'; |
|
390 | + echo "<td class='even' align='left'><a href='".XoopsBaseConfig::get('url').'/modules/'.$helper->getModule()->dirname().'/category.php?categoryid='.$subcat->getVar('categoryid').'&parentid='.$subcat->getVar('parentid')."'>".$subcat->getVar('name').'</a></td>'; |
|
391 | + echo "<td class='even' align='left'>".$subcat->getVar('description').'</td>'; |
|
392 | 392 | echo "<td class='even' align='right'> {$modify} {$delete} </td>"; |
393 | 393 | echo '</tr>'; |
394 | 394 | } |
395 | 395 | } else { |
396 | 396 | echo '<tr>'; |
397 | - echo "<td class='head' align='center' colspan= '7'>" . _AM_PUBLISHER_NOSUBCAT . '</td>'; |
|
397 | + echo "<td class='head' align='center' colspan= '7'>"._AM_PUBLISHER_NOSUBCAT.'</td>'; |
|
398 | 398 | echo '</tr>'; |
399 | 399 | } |
400 | 400 | echo "</table>\n"; |
@@ -410,11 +410,11 @@ discard block |
||
410 | 410 | $allcats = $helper->getCategoryHandler()->getObjects(null, true); |
411 | 411 | echo "<table width='100%' cellspacing=1 cellpadding=3 border=0 class = outer>"; |
412 | 412 | echo '<tr>'; |
413 | - echo "<td width='40' class='bg3' align='center'><strong>" . _AM_PUBLISHER_ITEMID . '</strong></td>'; |
|
414 | - echo "<td width='20%' class='bg3' align='left'><strong>" . _AM_PUBLISHER_ITEMCOLNAME . '</strong></td>'; |
|
415 | - echo "<td class='bg3' align='left'><strong>" . _AM_PUBLISHER_ITEMDESC . '</strong></td>'; |
|
416 | - echo "<td width='90' class='bg3' align='center'><strong>" . _AM_PUBLISHER_CREATED . '</strong></td>'; |
|
417 | - echo "<td width='60' class='bg3' align='center'><strong>" . _AM_PUBLISHER_ACTION . '</strong></td>'; |
|
413 | + echo "<td width='40' class='bg3' align='center'><strong>"._AM_PUBLISHER_ITEMID.'</strong></td>'; |
|
414 | + echo "<td width='20%' class='bg3' align='left'><strong>"._AM_PUBLISHER_ITEMCOLNAME.'</strong></td>'; |
|
415 | + echo "<td class='bg3' align='left'><strong>"._AM_PUBLISHER_ITEMDESC.'</strong></td>'; |
|
416 | + echo "<td width='90' class='bg3' align='center'><strong>"._AM_PUBLISHER_CREATED.'</strong></td>'; |
|
417 | + echo "<td width='60' class='bg3' align='center'><strong>"._AM_PUBLISHER_ACTION.'</strong></td>'; |
|
418 | 418 | echo '</tr>'; |
419 | 419 | if ($totalitems > 0) { |
420 | 420 | foreach ($itemsObj as $iValue) { |
@@ -442,16 +442,16 @@ discard block |
||
442 | 442 | . _AM_PUBLISHER_DELETEITEM |
443 | 443 | . "'></a>"; |
444 | 444 | echo '<tr>'; |
445 | - echo "<td class='head' align='center'>" . $iValue->getVar('itemid') . '</td>'; |
|
446 | - echo "<td class='even' align='left'>" . $categoryObj->getVar('name') . '</td>'; |
|
447 | - echo "<td class='even' align='left'>" . $iValue->getitemLink() . '</td>'; |
|
448 | - echo "<td class='even' align='center'>" . $iValue->datesub('s') . '</td>'; |
|
445 | + echo "<td class='head' align='center'>".$iValue->getVar('itemid').'</td>'; |
|
446 | + echo "<td class='even' align='left'>".$categoryObj->getVar('name').'</td>'; |
|
447 | + echo "<td class='even' align='left'>".$iValue->getitemLink().'</td>'; |
|
448 | + echo "<td class='even' align='center'>".$iValue->datesub('s').'</td>'; |
|
449 | 449 | echo "<td class='even' align='center'> $modify $delete </td>"; |
450 | 450 | echo '</tr>'; |
451 | 451 | } |
452 | 452 | } else { |
453 | 453 | echo '<tr>'; |
454 | - echo "<td class='head' align='center' colspan= '7'>" . _AM_PUBLISHER_NOITEMS . '</td>'; |
|
454 | + echo "<td class='head' align='center' colspan= '7'>"._AM_PUBLISHER_NOITEMS.'</td>'; |
|
455 | 455 | echo '</tr>'; |
456 | 456 | } |
457 | 457 | echo "</table>\n"; |
@@ -459,8 +459,8 @@ discard block |
||
459 | 459 | $parentid = Request::getInt('parentid'); |
460 | 460 | $pagenav_extra_args = "op=mod&categoryid=$sel_cat&parentid=$parentid"; |
461 | 461 | $pagenav = new XoopsPageNav($totalitems, $helper->getConfig('idxcat_perpage'), $startitem, 'startitem', $pagenav_extra_args); |
462 | - echo '<div style="text-align:right;">' . $pagenav->renderNav() . '</div>'; |
|
463 | - echo "<input type='button' name='button' onclick=\"location='item.php?op=mod&categoryid=" . $sel_cat . "'\" value='" . _AM_PUBLISHER_CREATEITEM . "'> "; |
|
462 | + echo '<div style="text-align:right;">'.$pagenav->renderNav().'</div>'; |
|
463 | + echo "<input type='button' name='button' onclick=\"location='item.php?op=mod&categoryid=".$sel_cat."'\" value='"._AM_PUBLISHER_CREATEITEM."'> "; |
|
464 | 464 | echo '</div>'; |
465 | 465 | } |
466 | 466 | //end of fx2024 code |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | use Xoops\Form\ThemeForm; |
25 | 25 | use XoopsModules\Publisher; |
26 | 26 | |
27 | -require_once __DIR__ . '/admin_header.php'; |
|
27 | +require_once __DIR__.'/admin_header.php'; |
|
28 | 28 | |
29 | 29 | $xoops = Xoops::getInstance(); |
30 | 30 | Publisher\Utils::cpHeader(); |
@@ -35,15 +35,15 @@ discard block |
||
35 | 35 | $dir = Publisher\Utils::getUploadDir(true, 'content'); |
36 | 36 | |
37 | 37 | if (false === mb_strpos(decoct(fileperms($dir)), '777')) { |
38 | - echo '<span style="color: FF0000; "><h4>' . _AM_PUBLISHER_PERMERROR . '</h4></span>'; |
|
38 | + echo '<span style="color: FF0000; "><h4>'._AM_PUBLISHER_PERMERROR.'</h4></span>'; |
|
39 | 39 | } |
40 | 40 | |
41 | 41 | // Upload File |
42 | 42 | echo "<form name='form_name2' id='form_name2' action='pw_upload_file.php' method='post' enctype='multipart/form-data'>"; |
43 | 43 | echo "<table cellspacing='1' width='100%' class='outer'>"; |
44 | -echo "<tr><th colspan='2'>" . _AM_PUBLISHER_UPLOAD_FILE . '</th></tr>'; |
|
45 | -echo "<tr valign='top' align='left'><td class='head'>" . _AM_PUBLISHER_SEARCH . "</td><td class='even'><input type='file' name='fileupload' id='fileupload' size='30'></td></tr>"; |
|
46 | -echo "<tr valign='top' align='left'><td class='head'><input type='hidden' name='MAX_FILE_SIZE' id='op' value='500000'></td><td class='even'><input type='submit' name='submit' value='" . _AM_PUBLISHER_UPLOAD . "'></td></tr>"; |
|
44 | +echo "<tr><th colspan='2'>"._AM_PUBLISHER_UPLOAD_FILE.'</th></tr>'; |
|
45 | +echo "<tr valign='top' align='left'><td class='head'>"._AM_PUBLISHER_SEARCH."</td><td class='even'><input type='file' name='fileupload' id='fileupload' size='30'></td></tr>"; |
|
46 | +echo "<tr valign='top' align='left'><td class='head'><input type='hidden' name='MAX_FILE_SIZE' id='op' value='500000'></td><td class='even'><input type='submit' name='submit' value='"._AM_PUBLISHER_UPLOAD."'></td></tr>"; |
|
47 | 47 | echo '</table>'; |
48 | 48 | echo '</form>'; |
49 | 49 |
@@ -26,10 +26,10 @@ discard block |
||
26 | 26 | use Xoops\Form\ThemeForm; |
27 | 27 | use XoopsModules\Publisher; |
28 | 28 | |
29 | -require_once dirname(__DIR__) . '/admin_header.php'; |
|
29 | +require_once dirname(__DIR__).'/admin_header.php'; |
|
30 | 30 | $myts = Sanitizer::getInstance(); |
31 | 31 | |
32 | -$importFromModuleName = 'XF-Section ' . @$_POST['xfs_version']; |
|
32 | +$importFromModuleName = 'XF-Section '.@$_POST['xfs_version']; |
|
33 | 33 | |
34 | 34 | $scriptname = 'xfsection.php'; |
35 | 35 | |
@@ -44,26 +44,26 @@ discard block |
||
44 | 44 | //publisher_adminMenu(-1, _AM_PUBLISHER_IMPORT); |
45 | 45 | Publisher\Utils::openCollapsableBar('xfsectionimport', 'xfsectionimporticon', sprintf(_AM_PUBLISHER_IMPORT_FROM, $importFromModuleName), _AM_PUBLISHER_IMPORT_INFO); |
46 | 46 | |
47 | - $result = $xoopsDB->query('SELECT COUNT(*) FROM ' . $xoopsDB->prefix('xfs_category')); |
|
47 | + $result = $xoopsDB->query('SELECT COUNT(*) FROM '.$xoopsDB->prefix('xfs_category')); |
|
48 | 48 | [$totalCat] = $xoopsDB->fetchRow($result); |
49 | 49 | |
50 | 50 | if (0 == $totalCat) { |
51 | - echo '<span style="color: #567; margin: 3px 0 12px 0; font-size: small; display: block; ">' . _AM_PUBLISHER_IMPORT_NOCATSELECTED . '</span>'; |
|
51 | + echo '<span style="color: #567; margin: 3px 0 12px 0; font-size: small; display: block; ">'._AM_PUBLISHER_IMPORT_NOCATSELECTED.'</span>'; |
|
52 | 52 | } else { |
53 | - require_once XoopsBaseConfig::get('root-path') . '/class/xoopstree.php'; |
|
53 | + require_once XoopsBaseConfig::get('root-path').'/class/xoopstree.php'; |
|
54 | 54 | |
55 | - $result = $xoopsDB->query('SELECT COUNT(*) FROM ' . $xoopsDB->prefix('xfs_article')); |
|
55 | + $result = $xoopsDB->query('SELECT COUNT(*) FROM '.$xoopsDB->prefix('xfs_article')); |
|
56 | 56 | [$totalArticles] = $xoopsDB->fetchRow($result); |
57 | 57 | |
58 | 58 | if (0 == $totalArticles) { |
59 | - echo '<span style="color: #567; margin: 3px 0 12px 0; font-size: small; display: block; ">' . sprintf(_AM_PUBLISHER_IMPORT_MODULE_FOUND_NO_ITEMS, $importFromModuleName, $totalArticles) . '</span>'; |
|
59 | + echo '<span style="color: #567; margin: 3px 0 12px 0; font-size: small; display: block; ">'.sprintf(_AM_PUBLISHER_IMPORT_MODULE_FOUND_NO_ITEMS, $importFromModuleName, $totalArticles).'</span>'; |
|
60 | 60 | } else { |
61 | - echo '<span style="color: #567; margin: 3px 0 12px 0; font-size: small; display: block; ">' . sprintf(_AM_PUBLISHER_IMPORT_MODULE_FOUND, $importFromModuleName, $totalArticles, $totalCat) . '</span>'; |
|
61 | + echo '<span style="color: #567; margin: 3px 0 12px 0; font-size: small; display: block; ">'.sprintf(_AM_PUBLISHER_IMPORT_MODULE_FOUND, $importFromModuleName, $totalArticles, $totalCat).'</span>'; |
|
62 | 62 | |
63 | - $form = new ThemeForm(_AM_PUBLISHER_IMPORT_SETTINGS, 'import_form', PUBLISHER_ADMIN_URL . "/import/$scriptname"); |
|
63 | + $form = new ThemeForm(_AM_PUBLISHER_IMPORT_SETTINGS, 'import_form', PUBLISHER_ADMIN_URL."/import/$scriptname"); |
|
64 | 64 | |
65 | 65 | // Categories to be imported |
66 | - $sql = 'SELECT cat.id, cat.pid, cat.title, COUNT(art.articleid) FROM ' . $xoopsDB->prefix('xfs_category') . ' AS cat INNER JOIN ' . $xoopsDB->prefix('xfs_article') . ' AS art ON cat.id=art.categoryid GROUP BY art.categoryid'; |
|
66 | + $sql = 'SELECT cat.id, cat.pid, cat.title, COUNT(art.articleid) FROM '.$xoopsDB->prefix('xfs_category').' AS cat INNER JOIN '.$xoopsDB->prefix('xfs_article').' AS art ON cat.id=art.categoryid GROUP BY art.categoryid'; |
|
67 | 67 | $result = $xoopsDB->query($sql); |
68 | 68 | $cat_cbox_values = []; |
69 | 69 | $cat_cbox_options = []; |
@@ -108,7 +108,7 @@ discard block |
||
108 | 108 | |
109 | 109 | $parentId = $_POST['parent_category']; |
110 | 110 | |
111 | - $sql = 'SELECT * FROM ' . $xoopsDB->prefix('xfs_category') . ' ORDER by orders'; |
|
111 | + $sql = 'SELECT * FROM '.$xoopsDB->prefix('xfs_category').' ORDER by orders'; |
|
112 | 112 | |
113 | 113 | $resultCat = $xoopsDB->query($sql); |
114 | 114 | |
@@ -131,13 +131,13 @@ discard block |
||
131 | 131 | |
132 | 132 | // Category image |
133 | 133 | if (('blank.gif' !== $arrCat['imgurl']) && $arrCat['imgurl']) { |
134 | - if (copy(XoopsBaseConfig::get('root-path') . '/modules/xfsection/images/category/' . $arrCat['imgurl'], PUBLISHER_UPLOADS_PATH . '/images/category/' . $arrCat['imgurl'])) { |
|
134 | + if (copy(XoopsBaseConfig::get('root-path').'/modules/xfsection/images/category/'.$arrCat['imgurl'], PUBLISHER_UPLOADS_PATH.'/images/category/'.$arrCat['imgurl'])) { |
|
135 | 135 | $categoryObj->setVar('image', $arrCat['imgurl']); |
136 | 136 | } |
137 | 137 | } |
138 | 138 | |
139 | 139 | if (!$categoryObj->store(false)) { |
140 | - echo sprintf(_AM_PUBLISHER_IMPORT_CATEGORY_ERROR, $arrCat['title']) . '<br>'; |
|
140 | + echo sprintf(_AM_PUBLISHER_IMPORT_CATEGORY_ERROR, $arrCat['title']).'<br>'; |
|
141 | 141 | continue; |
142 | 142 | } |
143 | 143 | |
@@ -148,9 +148,9 @@ discard block |
||
148 | 148 | |
149 | 149 | ++$cnt_imported_cat; |
150 | 150 | |
151 | - echo sprintf(_AM_PUBLISHER_IMPORT_CATEGORY_SUCCESS, $categoryObj->getVar('name')) . "<br\>"; |
|
151 | + echo sprintf(_AM_PUBLISHER_IMPORT_CATEGORY_SUCCESS, $categoryObj->getVar('name'))."<br\>"; |
|
152 | 152 | |
153 | - $sql = 'SELECT * FROM ' . $xoopsDB->prefix('xfs_article') . ' WHERE categoryid=' . $arrCat['id'] . ' ORDER BY weight'; |
|
153 | + $sql = 'SELECT * FROM '.$xoopsDB->prefix('xfs_article').' WHERE categoryid='.$arrCat['id'].' ORDER BY weight'; |
|
154 | 154 | $resultArticles = $xoopsDB->query($sql); |
155 | 155 | while (false !== ($arrArticle = $xoopsDB->fetchArray($resultArticles))) { |
156 | 156 | // insert article |
@@ -178,29 +178,29 @@ discard block |
||
178 | 178 | |
179 | 179 | // HTML Wrap |
180 | 180 | if ($arrArticle['htmlpage']) { |
181 | - $pagewrap_filename = XoopsBaseConfig::get('root-path') . '/modules/xfsection/html/' . $arrArticle['htmlpage']; |
|
181 | + $pagewrap_filename = XoopsBaseConfig::get('root-path').'/modules/xfsection/html/'.$arrArticle['htmlpage']; |
|
182 | 182 | if (XoopsLoad::fileExists($pagewrap_filename)) { |
183 | - if (copy($pagewrap_filename, PUBLISHER_UPLOADS_PATH . '/content/' . $arrArticle['htmlpage'])) { |
|
184 | - $itemObj->setVar('body', '[pagewrap=' . $arrArticle['htmlpage'] . ']'); |
|
185 | - echo sprintf(' ' . _AM_PUBLISHER_IMPORT_ARTICLE_WRAP, $arrArticle['htmlpage']) . '<br>'; |
|
183 | + if (copy($pagewrap_filename, PUBLISHER_UPLOADS_PATH.'/content/'.$arrArticle['htmlpage'])) { |
|
184 | + $itemObj->setVar('body', '[pagewrap='.$arrArticle['htmlpage'].']'); |
|
185 | + echo sprintf(' '._AM_PUBLISHER_IMPORT_ARTICLE_WRAP, $arrArticle['htmlpage']).'<br>'; |
|
186 | 186 | } |
187 | 187 | } |
188 | 188 | } |
189 | 189 | |
190 | 190 | if (!$itemObj->store()) { |
191 | - echo sprintf(' ' . _AM_PUBLISHER_IMPORT_ARTICLE_ERROR, $arrArticle['title']) . '<br>'; |
|
191 | + echo sprintf(' '._AM_PUBLISHER_IMPORT_ARTICLE_ERROR, $arrArticle['title']).'<br>'; |
|
192 | 192 | continue; |
193 | 193 | } |
194 | 194 | |
195 | 195 | // Linkes files |
196 | 196 | |
197 | - $sql = 'SELECT * FROM ' . $xoopsDB->prefix('xfs_files') . ' WHERE articleid=' . $arrArticle['articleid']; |
|
197 | + $sql = 'SELECT * FROM '.$xoopsDB->prefix('xfs_files').' WHERE articleid='.$arrArticle['articleid']; |
|
198 | 198 | $resultFiles = $xoopsDB->query($sql); |
199 | 199 | $allowed_mimetypes = ''; |
200 | 200 | while (false !== ($arrFile = $xoopsDB->fetchArray($resultFiles))) { |
201 | - $filename = XoopsBaseConfig::get('root-path') . '/modules/xfsection/cache/uploaded/' . $arrFile['filerealname']; |
|
201 | + $filename = XoopsBaseConfig::get('root-path').'/modules/xfsection/cache/uploaded/'.$arrFile['filerealname']; |
|
202 | 202 | if (XoopsLoad::fileExists($filename)) { |
203 | - if (copy($filename, PUBLISHER_UPLOADS_PATH . '/' . $arrFile['filerealname'])) { |
|
203 | + if (copy($filename, PUBLISHER_UPLOADS_PATH.'/'.$arrFile['filerealname'])) { |
|
204 | 204 | $fileObj = $helper->getFileHandler()->create(); |
205 | 205 | $fileObj->setVar('name', $arrFile['fileshowname']); |
206 | 206 | $fileObj->setVar('description', $arrFile['filedescript']); |
@@ -213,14 +213,14 @@ discard block |
||
213 | 213 | $fileObj->setVar('filename', $arrFile['filerealname']); |
214 | 214 | |
215 | 215 | if ($fileObj->store($allowed_mimetypes, true, false)) { |
216 | - echo ' ' . sprintf(_AM_PUBLISHER_IMPORTED_ARTICLE_FILE, $arrFile['filerealname']) . '<br>'; |
|
216 | + echo ' '.sprintf(_AM_PUBLISHER_IMPORTED_ARTICLE_FILE, $arrFile['filerealname']).'<br>'; |
|
217 | 217 | } |
218 | 218 | } |
219 | 219 | } |
220 | 220 | } |
221 | 221 | |
222 | 222 | $newArticleArray[$arrArticle['articleid']] = $itemObj->getVar('itemid'); |
223 | - echo ' ' . sprintf(_AM_PUBLISHER_IMPORTED_ARTICLE, $itemObj->title()) . '<br>'; |
|
223 | + echo ' '.sprintf(_AM_PUBLISHER_IMPORTED_ARTICLE, $itemObj->title()).'<br>'; |
|
224 | 224 | ++$cnt_imported_articles; |
225 | 225 | } |
226 | 226 | $newCatArray[$newCat['oldid']] = $newCat; |
@@ -242,7 +242,7 @@ discard block |
||
242 | 242 | } |
243 | 243 | |
244 | 244 | // Looping through the comments to link them to the new articles and module |
245 | - echo _AM_PUBLISHER_IMPORT_COMMENTS . '<br>'; |
|
245 | + echo _AM_PUBLISHER_IMPORT_COMMENTS.'<br>'; |
|
246 | 246 | |
247 | 247 | $moduleHandler = xoops_getHandler('module'); |
248 | 248 | $moduleObj = $moduleHandler->getByDirname('xfsection'); |
@@ -259,16 +259,16 @@ discard block |
||
259 | 259 | $comment->setVar('com_modid', $publisher_module_id); |
260 | 260 | $comment->setNew(); |
261 | 261 | if (!$commentHandler->insert($comment)) { |
262 | - echo ' ' . sprintf(_AM_PUBLISHER_IMPORTED_COMMENT_ERROR, $comment->getVar('com_title')) . '<br>'; |
|
262 | + echo ' '.sprintf(_AM_PUBLISHER_IMPORTED_COMMENT_ERROR, $comment->getVar('com_title')).'<br>'; |
|
263 | 263 | } else { |
264 | - echo ' ' . sprintf(_AM_PUBLISHER_IMPORTED_COMMENT, $comment->getVar('com_title')) . '<br>'; |
|
264 | + echo ' '.sprintf(_AM_PUBLISHER_IMPORTED_COMMENT, $comment->getVar('com_title')).'<br>'; |
|
265 | 265 | } |
266 | 266 | } |
267 | 267 | |
268 | 268 | echo '<br><br>Done.<br>'; |
269 | - echo sprintf(_AM_PUBLISHER_IMPORTED_CATEGORIES, $cnt_imported_cat) . '<br>'; |
|
270 | - echo sprintf(_AM_PUBLISHER_IMPORTED_ARTICLES, $cnt_imported_articles) . '<br>'; |
|
271 | - echo "<br><a href='" . publisher_URL . "'>" . _AM_PUBLISHER_IMPORT_GOTOMODULE . '</a><br>'; |
|
269 | + echo sprintf(_AM_PUBLISHER_IMPORTED_CATEGORIES, $cnt_imported_cat).'<br>'; |
|
270 | + echo sprintf(_AM_PUBLISHER_IMPORTED_ARTICLES, $cnt_imported_articles).'<br>'; |
|
271 | + echo "<br><a href='".publisher_URL."'>"._AM_PUBLISHER_IMPORT_GOTOMODULE.'</a><br>'; |
|
272 | 272 | |
273 | 273 | Publisher\Utils::closeCollapsableBar('xfsectionimportgo', 'xfsectionimportgoicon'); |
274 | 274 | $xoops->footer(); |