@@ -352,14 +352,14 @@ discard block |
||
352 | 352 | |
353 | 353 | $mailok_radio = new XoopsFormRadio(_MA_USER_SHOWMAILOK, 'user_mailok', empty($_POST['user_mailok']) ? 'both' : $_POST['user_mailok']); |
354 | 354 | $mailok_radio->addOptionArray(array( |
355 | - 'mailok' => _MA_USER_MAILOK, |
|
356 | - 'mailng' => _MA_USER_MAILNG, |
|
357 | - 'both' => _MA_USER_BOTH)); |
|
355 | + 'mailok' => _MA_USER_MAILOK, |
|
356 | + 'mailng' => _MA_USER_MAILNG, |
|
357 | + 'both' => _MA_USER_BOTH)); |
|
358 | 358 | $avatar_radio = new XoopsFormRadio(_MA_USER_HASAVATAR, 'user_avatar', empty($_POST['user_avatar']) ? 'both' : $_POST['user_avatar']); |
359 | 359 | $avatar_radio->addOptionArray(array( |
360 | - 'y' => _YES, |
|
361 | - 'n' => _NO, |
|
362 | - 'both' => _MA_USER_BOTH)); |
|
360 | + 'y' => _YES, |
|
361 | + 'n' => _NO, |
|
362 | + 'both' => _MA_USER_BOTH)); |
|
363 | 363 | |
364 | 364 | $level_radio = new XoopsFormRadio(_MA_USER_LEVEL, 'level', @$_POST['level']); |
365 | 365 | $levels = array( |
@@ -391,8 +391,8 @@ discard block |
||
391 | 391 | $form->addElement($rank_select); |
392 | 392 | } else { |
393 | 393 | foreach (array( |
394 | - 'uname', |
|
395 | - 'email') as $var) { |
|
394 | + 'uname', |
|
395 | + 'email') as $var) { |
|
396 | 396 | $title = $items_match[$var]; |
397 | 397 | $text = new XoopsFormText('', $var, 30, 100, @$_POST[$var]); |
398 | 398 | $match = new XoopsFormSelectMatchOption('', "{$var}_match", @$_POST["{$var}_match"]); |
@@ -406,14 +406,14 @@ discard block |
||
406 | 406 | |
407 | 407 | $sort_select = new XoopsFormSelect(_MA_USER_SORT, 'user_sort', @$_POST['user_sort']); |
408 | 408 | $sort_select->addOptionArray(array( |
409 | - 'uname' => _MA_USER_UNAME, |
|
410 | - 'last_login' => _MA_USER_LASTLOGIN, |
|
411 | - 'user_regdate' => _MA_USER_REGDATE, |
|
412 | - 'posts' => _MA_USER_POSTS)); |
|
409 | + 'uname' => _MA_USER_UNAME, |
|
410 | + 'last_login' => _MA_USER_LASTLOGIN, |
|
411 | + 'user_regdate' => _MA_USER_REGDATE, |
|
412 | + 'posts' => _MA_USER_POSTS)); |
|
413 | 413 | $order_select = new XoopsFormSelect(_MA_USER_ORDER, 'user_order', @$_POST['user_order']); |
414 | 414 | $order_select->addOptionArray(array( |
415 | - 'ASC' => _MA_USER_ASC, |
|
416 | - 'DESC' => _MA_USER_DESC)); |
|
415 | + 'ASC' => _MA_USER_ASC, |
|
416 | + 'DESC' => _MA_USER_DESC)); |
|
417 | 417 | |
418 | 418 | $form->addElement($sort_select); |
419 | 419 | $form->addElement($order_select); |
@@ -479,8 +479,8 @@ discard block |
||
479 | 479 | $criteria->add(new Criteria('user_occ', '%' . $myts->addSlashes(trim($_POST['user_occ'])) . '%', 'LIKE')); |
480 | 480 | } |
481 | 481 | foreach (array( |
482 | - 'last_login', |
|
483 | - 'user_regdate') as $var) { |
|
482 | + 'last_login', |
|
483 | + 'user_regdate') as $var) { |
|
484 | 484 | if (!empty($_POST["{$var}_more"]) && is_numeric($_POST["{$var}_more"])) { |
485 | 485 | $time = time() - (60 * 60 * 24 * (int)trim($_POST["{$var}_more"])); |
486 | 486 | if ($time > 0) { |
@@ -17,7 +17,7 @@ discard block |
||
17 | 17 | */ |
18 | 18 | /* @var $xoopsUser XoopsUser */ |
19 | 19 | |
20 | -include_once dirname(__DIR__) . '/mainfile.php'; |
|
20 | +include_once dirname(__DIR__).'/mainfile.php'; |
|
21 | 21 | |
22 | 22 | xoops_header(false); |
23 | 23 | |
@@ -36,8 +36,8 @@ discard block |
||
36 | 36 | |
37 | 37 | $token = isset($_REQUEST['token']) ? $_REQUEST['token'] : ''; |
38 | 38 | $name_form = 'memberslist'; |
39 | -$name_userid = 'uid' . (!empty($_REQUEST['multiple']) ? '[]' : ''); |
|
40 | -$name_username = 'uname' . (!empty($_REQUEST['multiple']) ? '[]' : ''); |
|
39 | +$name_userid = 'uid'.(!empty($_REQUEST['multiple']) ? '[]' : ''); |
|
40 | +$name_username = 'uname'.(!empty($_REQUEST['multiple']) ? '[]' : ''); |
|
41 | 41 | |
42 | 42 | xoops_loadLanguage('findusers'); |
43 | 43 | |
@@ -104,7 +104,7 @@ discard block |
||
104 | 104 | public function get($id = 0) |
105 | 105 | { |
106 | 106 | $object = $this->create(false); |
107 | - $sql = 'SELECT * FROM ' . $this->db->prefix('ranks') . ' WHERE rank_id = ' . $this->db->quoteString($id); |
|
107 | + $sql = 'SELECT * FROM '.$this->db->prefix('ranks').' WHERE rank_id = '.$this->db->quoteString($id); |
|
108 | 108 | if (!$result = $this->db->query($sql)) { |
109 | 109 | $ret = null; |
110 | 110 | |
@@ -132,11 +132,11 @@ discard block |
||
132 | 132 | $criteria = new CriteriaCompo(); |
133 | 133 | } |
134 | 134 | |
135 | - $sql = 'SELECT rank_id, rank_title FROM ' . $this->db->prefix('ranks'); |
|
135 | + $sql = 'SELECT rank_id, rank_title FROM '.$this->db->prefix('ranks'); |
|
136 | 136 | if (isset($criteria) && is_subclass_of($criteria, 'CriteriaElement')) { |
137 | - $sql .= ' ' . $criteria->renderWhere(); |
|
137 | + $sql .= ' '.$criteria->renderWhere(); |
|
138 | 138 | if ($criteria->getSort() != '') { |
139 | - $sql .= ' ORDER BY ' . $criteria->getSort() . ' ' . $criteria->getOrder(); |
|
139 | + $sql .= ' ORDER BY '.$criteria->getSort().' '.$criteria->getOrder(); |
|
140 | 140 | } |
141 | 141 | $limit = $criteria->getLimit(); |
142 | 142 | $start = $criteria->getStart(); |
@@ -227,14 +227,14 @@ discard block |
||
227 | 227 | } |
228 | 228 | $groups = array_filter($groups); |
229 | 229 | if (empty($groups)) { |
230 | - $sql = ' SELECT COUNT(DISTINCT u.uid) FROM ' . $this->db->prefix('users') . ' AS u' . ' WHERE 1=1'; |
|
230 | + $sql = ' SELECT COUNT(DISTINCT u.uid) FROM '.$this->db->prefix('users').' AS u'.' WHERE 1=1'; |
|
231 | 231 | } else { |
232 | - $sql = ' SELECT COUNT(DISTINCT u.uid) FROM ' . $this->db->prefix('users') . ' AS u' . ' LEFT JOIN ' . $this->db->prefix('groups_users_link') . ' AS g ON g.uid = u.uid' . ' WHERE g.groupid IN (' . implode(', ', array_map('intval', $groups)) . ')'; |
|
232 | + $sql = ' SELECT COUNT(DISTINCT u.uid) FROM '.$this->db->prefix('users').' AS u'.' LEFT JOIN '.$this->db->prefix('groups_users_link').' AS g ON g.uid = u.uid'.' WHERE g.groupid IN ('.implode(', ', array_map('intval', $groups)).')'; |
|
233 | 233 | } |
234 | 234 | if (isset($criteria) && is_subclass_of($criteria, 'CriteriaElement')) { |
235 | 235 | // Use the direct renderer, assuming no `uid` in criteria |
236 | 236 | if ($render = $criteria->render()) { |
237 | - $sql .= ' AND ' . $render; |
|
237 | + $sql .= ' AND '.$render; |
|
238 | 238 | } |
239 | 239 | } |
240 | 240 | $result = $this->db->query($sql); |
@@ -260,16 +260,16 @@ discard block |
||
260 | 260 | $limit = null; |
261 | 261 | $start = null; |
262 | 262 | if (empty($groups)) { |
263 | - $sql = ' SELECT u.* FROM ' . $this->db->prefix('users') . ' AS u' . ' WHERE 1=1'; |
|
263 | + $sql = ' SELECT u.* FROM '.$this->db->prefix('users').' AS u'.' WHERE 1=1'; |
|
264 | 264 | } else { |
265 | - $sql = ' SELECT u.* FROM ' . $this->db->prefix('users') . ' AS u' . ' LEFT JOIN ' . $this->db->prefix('groups_users_link') . ' AS g ON g.uid = u.uid' . ' WHERE g.groupid IN (' . implode(', ', array_map('intval', $groups)) . ')'; |
|
265 | + $sql = ' SELECT u.* FROM '.$this->db->prefix('users').' AS u'.' LEFT JOIN '.$this->db->prefix('groups_users_link').' AS g ON g.uid = u.uid'.' WHERE g.groupid IN ('.implode(', ', array_map('intval', $groups)).')'; |
|
266 | 266 | } |
267 | 267 | if (isset($criteria) && is_subclass_of($criteria, 'CriteriaElement')) { |
268 | 268 | if ($render = $criteria->render()) { |
269 | - $sql .= ' AND ' . $render; |
|
269 | + $sql .= ' AND '.$render; |
|
270 | 270 | } |
271 | 271 | if ($sort = $criteria->getSort()) { |
272 | - $sql .= ' ORDER BY ' . $sort . ' ' . $criteria->getOrder(); |
|
272 | + $sql .= ' ORDER BY '.$sort.' '.$criteria->getOrder(); |
|
273 | 273 | $orderSet = true; |
274 | 274 | } |
275 | 275 | $limit = $criteria->getLimit(); |
@@ -428,16 +428,16 @@ discard block |
||
428 | 428 | $acttotal = $user_handler->getCount(new Criteria('level', 0, '>')); |
429 | 429 | $inacttotal = $user_handler->getCount(new Criteria('level', 0, '<=')); |
430 | 430 | echo '</html><body>'; |
431 | - echo "<h2 style='text-align:left;'>" . _MA_USER_FINDUS . ' - ' . $modes[$mode] . '</h2>'; |
|
431 | + echo "<h2 style='text-align:left;'>"._MA_USER_FINDUS.' - '.$modes[$mode].'</h2>'; |
|
432 | 432 | $modes_switch = array(); |
433 | 433 | foreach ($modes as $_mode => $title) { |
434 | 434 | if ($mode == $_mode) { |
435 | 435 | continue; |
436 | 436 | } |
437 | - $modes_switch[] = "<a href='findusers.php?target=" . htmlspecialchars(@$_REQUEST['target'], ENT_QUOTES) . '&multiple=' . htmlspecialchars(@$_REQUEST['multiple'], ENT_QUOTES) . '&token=' . htmlspecialchars($token, ENT_QUOTES) . "&mode={$_mode}'>{$title}</a>"; |
|
437 | + $modes_switch[] = "<a href='findusers.php?target=".htmlspecialchars(@$_REQUEST['target'], ENT_QUOTES).'&multiple='.htmlspecialchars(@$_REQUEST['multiple'], ENT_QUOTES).'&token='.htmlspecialchars($token, ENT_QUOTES)."&mode={$_mode}'>{$title}</a>"; |
|
438 | 438 | } |
439 | - echo '<h4>' . implode(' | ', $modes_switch) . '</h4>'; |
|
440 | - echo '(' . sprintf(_MA_USER_ACTUS, "<span style='color:#ff0000;'>$acttotal</span>") . ' ' . sprintf(_MA_USER_INACTUS, "<span style='color:#ff0000;'>$inacttotal</span>") . ')'; |
|
439 | + echo '<h4>'.implode(' | ', $modes_switch).'</h4>'; |
|
440 | + echo '('.sprintf(_MA_USER_ACTUS, "<span style='color:#ff0000;'>$acttotal</span>").' '.sprintf(_MA_USER_INACTUS, "<span style='color:#ff0000;'>$inacttotal</span>").')'; |
|
441 | 441 | $form->display(); |
442 | 442 | } else { |
443 | 443 | $myts = MyTextSanitizer::getInstance(); |
@@ -451,32 +451,32 @@ discard block |
||
451 | 451 | $value = str_replace('_', "\\\_", $myts->addSlashes(trim($_POST[$var]))); |
452 | 452 | switch ($match) { |
453 | 453 | case XOOPS_MATCH_START: |
454 | - $criteria->add(new Criteria($var, $value . '%', 'LIKE')); |
|
454 | + $criteria->add(new Criteria($var, $value.'%', 'LIKE')); |
|
455 | 455 | break; |
456 | 456 | case XOOPS_MATCH_END: |
457 | - $criteria->add(new Criteria($var, '%' . $value, 'LIKE')); |
|
457 | + $criteria->add(new Criteria($var, '%'.$value, 'LIKE')); |
|
458 | 458 | break; |
459 | 459 | case XOOPS_MATCH_EQUAL: |
460 | 460 | $criteria->add(new Criteria($var, $value)); |
461 | 461 | break; |
462 | 462 | case XOOPS_MATCH_CONTAIN: |
463 | - $criteria->add(new Criteria($var, '%' . $value . '%', 'LIKE')); |
|
463 | + $criteria->add(new Criteria($var, '%'.$value.'%', 'LIKE')); |
|
464 | 464 | break; |
465 | 465 | } |
466 | 466 | } |
467 | 467 | } |
468 | 468 | if (!empty($_POST['url'])) { |
469 | 469 | $url = formatURL(trim($_POST['url'])); |
470 | - $criteria->add(new Criteria('url', $url . '%', 'LIKE')); |
|
470 | + $criteria->add(new Criteria('url', $url.'%', 'LIKE')); |
|
471 | 471 | } |
472 | 472 | if (!empty($_POST['user_from'])) { |
473 | - $criteria->add(new Criteria('user_from', '%' . $myts->addSlashes(trim($_POST['user_from'])) . '%', 'LIKE')); |
|
473 | + $criteria->add(new Criteria('user_from', '%'.$myts->addSlashes(trim($_POST['user_from'])).'%', 'LIKE')); |
|
474 | 474 | } |
475 | 475 | if (!empty($_POST['user_intrest'])) { |
476 | - $criteria->add(new Criteria('user_intrest', '%' . $myts->addSlashes(trim($_POST['user_intrest'])) . '%', 'LIKE')); |
|
476 | + $criteria->add(new Criteria('user_intrest', '%'.$myts->addSlashes(trim($_POST['user_intrest'])).'%', 'LIKE')); |
|
477 | 477 | } |
478 | 478 | if (!empty($_POST['user_occ'])) { |
479 | - $criteria->add(new Criteria('user_occ', '%' . $myts->addSlashes(trim($_POST['user_occ'])) . '%', 'LIKE')); |
|
479 | + $criteria->add(new Criteria('user_occ', '%'.$myts->addSlashes(trim($_POST['user_occ'])).'%', 'LIKE')); |
|
480 | 480 | } |
481 | 481 | foreach (array( |
482 | 482 | 'last_login', |
@@ -519,7 +519,7 @@ discard block |
||
519 | 519 | 1 => 1, |
520 | 520 | 2 => 0, |
521 | 521 | 3 => -1); |
522 | - $level = isset($level_value[(int)$_POST['level']]) ? $level_value[(int)$_POST['level']] : 1; |
|
522 | + $level = isset($level_value[(int)$_POST['level']]) ? $level_value[(int)$_POST['level']] : 1; |
|
523 | 523 | $criteria->add(new Criteria('level', $level)); |
524 | 524 | } |
525 | 525 | if (!empty($_POST['rank'])) { |
@@ -555,21 +555,21 @@ discard block |
||
555 | 555 | } else { |
556 | 556 | $query = trim($_POST['query']); |
557 | 557 | // Query with alias |
558 | - if (preg_match("/select[\s]+.*[\s]+from[\s]+(" . $xoopsDB->prefix('users') . "[\s]+as[\s]+(\S+).*)/i", $query, $matches)) { |
|
558 | + if (preg_match("/select[\s]+.*[\s]+from[\s]+(".$xoopsDB->prefix('users')."[\s]+as[\s]+(\S+).*)/i", $query, $matches)) { |
|
559 | 559 | $alias = $matches[2]; |
560 | 560 | $subquery = $matches[1]; |
561 | 561 | |
562 | 562 | // Query without alias |
563 | - } elseif (preg_match("/select[\s]+.*[\s]+from[\s]+(" . $xoopsDB->prefix('users') . "\b.*)/i", $query, $matches)) { |
|
563 | + } elseif (preg_match("/select[\s]+.*[\s]+from[\s]+(".$xoopsDB->prefix('users')."\b.*)/i", $query, $matches)) { |
|
564 | 564 | $alias = ''; |
565 | 565 | $subquery = $matches[1]; |
566 | 566 | |
567 | 567 | // Invalid query |
568 | 568 | } else { |
569 | - $query = 'SELECT * FROM ' . $xoopsDB->prefix('users'); |
|
569 | + $query = 'SELECT * FROM '.$xoopsDB->prefix('users'); |
|
570 | 570 | $subquery = $xoopsDB->prefix('users'); |
571 | 571 | } |
572 | - $sql_count = 'SELECT COUNT(DISTINCT ' . (empty($alias) ? '' : $alias . '.') . 'uid) FROM ' . $subquery; |
|
572 | + $sql_count = 'SELECT COUNT(DISTINCT '.(empty($alias) ? '' : $alias.'.').'uid) FROM '.$subquery; |
|
573 | 573 | $result = $xoopsDB->query($sql_count); |
574 | 574 | list($total) = $xoopsDB->FetchRow($result); |
575 | 575 | $result = $xoopsDB->query($query, $limit, $start); |
@@ -584,15 +584,15 @@ discard block |
||
584 | 584 | |
585 | 585 | echo $js_adduser = ' |
586 | 586 | <script type="text/javascript"> |
587 | - var multiple=' . (int)$_REQUEST['multiple'] . '; |
|
587 | + var multiple=' . (int)$_REQUEST['multiple'].'; |
|
588 | 588 | function addusers() |
589 | 589 | { |
590 | 590 | var sel_str = ""; |
591 | 591 | var num = 0; |
592 | - var mForm = document.forms["' . $name_form . '"]; |
|
592 | + var mForm = document.forms["' . $name_form.'"]; |
|
593 | 593 | for (var i=0;i!=mForm.elements.length;i++) { |
594 | 594 | var id=mForm.elements[i]; |
595 | - if ( ( (multiple > 0 && id.type == "checkbox") || (multiple == 0 && id.type == "radio") ) && (id.checked == true) && ( id.name == "' . $name_userid . '" ) ) { |
|
595 | + if ( ( (multiple > 0 && id.type == "checkbox") || (multiple == 0 && id.type == "radio") ) && (id.checked == true) && ( id.name == "' . $name_userid.'" ) ) { |
|
596 | 596 | var name = mForm.elements[++i]; |
597 | 597 | var len = id.value.length + name.value.length; |
598 | 598 | sel_str += len + ":" + id.value + ":" + name.value; |
@@ -600,12 +600,12 @@ discard block |
||
600 | 600 | } |
601 | 601 | } |
602 | 602 | if (num == 0) { |
603 | - alert("' . _MA_USER_NOUSERSELECTED . '"); |
|
603 | + alert("' . _MA_USER_NOUSERSELECTED.'"); |
|
604 | 604 | return false; |
605 | 605 | } |
606 | 606 | sel_str = num + ":" + sel_str; |
607 | 607 | window.opener.addusers(sel_str); |
608 | - alert("' . _MA_USER_USERADDED . '"); |
|
608 | + alert("' . _MA_USER_USERADDED.'"); |
|
609 | 609 | if (multiple == 0) { |
610 | 610 | window.close(); |
611 | 611 | window.opener.focus(); |
@@ -616,16 +616,16 @@ discard block |
||
616 | 616 | '; |
617 | 617 | |
618 | 618 | echo '</html><body>'; |
619 | - echo "<a href='findusers.php?target=" . htmlspecialchars(@$_POST['target'], ENT_QUOTES) . '&multiple=' . (int)(@$_POST['multiple']) . '&token=' . htmlspecialchars($token, ENT_QUOTES) . "'>" . _MA_USER_FINDUS . "</a> <span style='font-weight:bold;'>»</span> " . _MA_USER_RESULTS . '<br><br>'; |
|
619 | + echo "<a href='findusers.php?target=".htmlspecialchars(@$_POST['target'], ENT_QUOTES).'&multiple='.(int)(@$_POST['multiple']).'&token='.htmlspecialchars($token, ENT_QUOTES)."'>"._MA_USER_FINDUS."</a> <span style='font-weight:bold;'>»</span> "._MA_USER_RESULTS.'<br><br>'; |
|
620 | 620 | if (empty($start) && empty($foundusers)) { |
621 | - echo '<h4>' . _MA_USER_NOFOUND, '</h4>'; |
|
621 | + echo '<h4>'._MA_USER_NOFOUND, '</h4>'; |
|
622 | 622 | $hiddenform = "<form name='findnext' action='findusers.php' method='post'>"; |
623 | 623 | foreach ($_POST as $k => $v) { |
624 | 624 | if ($k === 'XOOPS_TOKEN_REQUEST') { |
625 | 625 | // regenerate token value |
626 | - $hiddenform .= $GLOBALS['xoopsSecurity']->getTokenHTML() . "\n"; |
|
626 | + $hiddenform .= $GLOBALS['xoopsSecurity']->getTokenHTML()."\n"; |
|
627 | 627 | } else { |
628 | - $hiddenform .= "<input type='hidden' name='" . htmlspecialchars($k, ENT_QUOTES) . "' value='" . htmlspecialchars($myts->stripSlashesGPC($v), ENT_QUOTES) . "' />\n"; |
|
628 | + $hiddenform .= "<input type='hidden' name='".htmlspecialchars($k, ENT_QUOTES)."' value='".htmlspecialchars($myts->stripSlashesGPC($v), ENT_QUOTES)."' />\n"; |
|
629 | 629 | } |
630 | 630 | } |
631 | 631 | if (!isset($_POST['limit'])) { |
@@ -634,15 +634,15 @@ discard block |
||
634 | 634 | if (!isset($_POST['start'])) { |
635 | 635 | $hiddenform .= "<input type='hidden' name='start' value='{$start}' />\n"; |
636 | 636 | } |
637 | - $hiddenform .= "<input type='hidden' name='token' value='" . htmlspecialchars($token, ENT_QUOTES) . "' />\n"; |
|
637 | + $hiddenform .= "<input type='hidden' name='token' value='".htmlspecialchars($token, ENT_QUOTES)."' />\n"; |
|
638 | 638 | $hiddenform .= '</form>'; |
639 | 639 | |
640 | - echo '<div>' . $hiddenform; |
|
641 | - echo "<a href='#' onclick='document.findnext.start.value=0;document.findnext.user_submit.value=0;document.findnext.submit();'>" . _MA_USER_SEARCHAGAIN . "</a>\n"; |
|
640 | + echo '<div>'.$hiddenform; |
|
641 | + echo "<a href='#' onclick='document.findnext.start.value=0;document.findnext.user_submit.value=0;document.findnext.submit();'>"._MA_USER_SEARCHAGAIN."</a>\n"; |
|
642 | 642 | echo '</div>'; |
643 | 643 | } elseif ($start < $total) { |
644 | 644 | if (!empty($total)) { |
645 | - echo sprintf(_MA_USER_USERSFOUND, $total) . '<br>'; |
|
645 | + echo sprintf(_MA_USER_USERSFOUND, $total).'<br>'; |
|
646 | 646 | } |
647 | 647 | if (!empty($foundusers)) { |
648 | 648 | echo "<form action='findusers.php' method='post' name='{$name_form}' id='{$name_form}'> |
@@ -653,11 +653,11 @@ discard block |
||
653 | 653 | echo "<input type='checkbox' name='memberslist_checkall' id='memberslist_checkall' onclick='xoopsCheckAll(\"{$name_form}\", \"memberslist_checkall\");' />"; |
654 | 654 | } |
655 | 655 | echo "</th> |
656 | - <th align='center'>" . _MA_USER_UNAME . "</th> |
|
657 | - <th align='center'>" . _MA_USER_REALNAME . "</th> |
|
658 | - <th align='center'>" . _MA_USER_REGDATE . "</th> |
|
659 | - <th align='center'>" . _MA_USER_LASTLOGIN . "</th> |
|
660 | - <th align='center'>" . _MA_USER_POSTS . '</th> |
|
656 | + <th align='center'>" . _MA_USER_UNAME."</th> |
|
657 | + <th align='center'>" . _MA_USER_REALNAME."</th> |
|
658 | + <th align='center'>" . _MA_USER_REGDATE."</th> |
|
659 | + <th align='center'>" . _MA_USER_LASTLOGIN."</th> |
|
660 | + <th align='center'>" . _MA_USER_POSTS.'</th> |
|
661 | 661 | </tr>'; |
662 | 662 | $ucount = 0; |
663 | 663 | foreach (array_keys($foundusers) as $j) { |
@@ -670,33 +670,33 @@ discard block |
||
670 | 670 | echo "<tr class='$class'> |
671 | 671 | <td align='center'>"; |
672 | 672 | if (!empty($_POST['multiple'])) { |
673 | - echo "<input type='checkbox' name='{$name_userid}' id='{$name_userid}' value='" . $foundusers[$j]->getVar('uid') . "' />"; |
|
674 | - echo "<input type='hidden' name='{$name_username}' id='{$name_username}' value='" . $foundusers[$j]->getVar('uname') . "' />"; |
|
673 | + echo "<input type='checkbox' name='{$name_userid}' id='{$name_userid}' value='".$foundusers[$j]->getVar('uid')."' />"; |
|
674 | + echo "<input type='hidden' name='{$name_username}' id='{$name_username}' value='".$foundusers[$j]->getVar('uname')."' />"; |
|
675 | 675 | } else { |
676 | - echo "<input type='radio' name='{$name_userid}' id='{$name_userid}' value='" . $foundusers[$j]->getVar('uid') . "' />"; |
|
677 | - echo "<input type='hidden' name='{$name_username}' id='{$name_username}' value='" . $foundusers[$j]->getVar('uname') . "' />"; |
|
676 | + echo "<input type='radio' name='{$name_userid}' id='{$name_userid}' value='".$foundusers[$j]->getVar('uid')."' />"; |
|
677 | + echo "<input type='hidden' name='{$name_username}' id='{$name_username}' value='".$foundusers[$j]->getVar('uname')."' />"; |
|
678 | 678 | } |
679 | 679 | echo "</td> |
680 | - <td><a href='" . XOOPS_URL . '/userinfo.php?uid=' . $foundusers[$j]->getVar('uid') . "' target='_blank'>" . $foundusers[$j]->getVar('uname') . '</a></td> |
|
681 | - <td>' . $fuser_name . "</td> |
|
682 | - <td align='center'>" . ($foundusers[$j]->getVar('user_regdate') ? date('Y-m-d', $foundusers[$j]->getVar('user_regdate')) : '') . "</td> |
|
683 | - <td align='center'>" . ($foundusers[$j]->getVar('last_login') ? date('Y-m-d H:i', $foundusers[$j]->getVar('last_login')) : '') . "</td> |
|
684 | - <td align='center'>" . $foundusers[$j]->getVar('posts') . '</td>'; |
|
680 | + <td><a href='" . XOOPS_URL.'/userinfo.php?uid='.$foundusers[$j]->getVar('uid')."' target='_blank'>".$foundusers[$j]->getVar('uname').'</a></td> |
|
681 | + <td>' . $fuser_name."</td> |
|
682 | + <td align='center'>" . ($foundusers[$j]->getVar('user_regdate') ? date('Y-m-d', $foundusers[$j]->getVar('user_regdate')) : '')."</td> |
|
683 | + <td align='center'>" . ($foundusers[$j]->getVar('last_login') ? date('Y-m-d H:i', $foundusers[$j]->getVar('last_login')) : '')."</td> |
|
684 | + <td align='center'>" . $foundusers[$j]->getVar('posts').'</td>'; |
|
685 | 685 | echo "</tr>\n"; |
686 | 686 | } |
687 | 687 | echo "<tr class='foot'><td colspan='6'>"; |
688 | 688 | |
689 | 689 | // placeholder for external applications |
690 | 690 | if (empty($_POST['target'])) { |
691 | - echo "<select name='fct'><option value='users'>" . _DELETE . "</option><option value='mailusers'>" . _MA_USER_SENDMAIL . '</option>'; |
|
691 | + echo "<select name='fct'><option value='users'>"._DELETE."</option><option value='mailusers'>"._MA_USER_SENDMAIL.'</option>'; |
|
692 | 692 | echo '</select> '; |
693 | - echo $GLOBALS['xoopsSecurity']->getTokenHTML() . "<input type='submit' value='" . _SUBMIT . "' />"; |
|
693 | + echo $GLOBALS['xoopsSecurity']->getTokenHTML()."<input type='submit' value='"._SUBMIT."' />"; |
|
694 | 694 | |
695 | 695 | // Add selected users |
696 | 696 | } else { |
697 | - echo "<input type='button' value='" . _MA_USER_ADD_SELECTED . "' onclick='addusers();' />"; |
|
697 | + echo "<input type='button' value='"._MA_USER_ADD_SELECTED."' onclick='addusers();' />"; |
|
698 | 698 | } |
699 | - echo "<input type='hidden' name='token' value='" . htmlspecialchars($token, ENT_QUOTES) . "' />\n"; |
|
699 | + echo "<input type='hidden' name='token' value='".htmlspecialchars($token, ENT_QUOTES)."' />\n"; |
|
700 | 700 | echo "</td></tr></table></form>\n"; |
701 | 701 | } |
702 | 702 | |
@@ -704,31 +704,31 @@ discard block |
||
704 | 704 | foreach ($_POST as $k => $v) { |
705 | 705 | if ($k === 'XOOPS_TOKEN_REQUEST') { |
706 | 706 | // regenerate token value |
707 | - $hiddenform .= $GLOBALS['xoopsSecurity']->getTokenHTML() . "\n"; |
|
707 | + $hiddenform .= $GLOBALS['xoopsSecurity']->getTokenHTML()."\n"; |
|
708 | 708 | } else { |
709 | - $hiddenform .= "<input type='hidden' name='" . htmlspecialchars($k, ENT_QUOTES) . "' value='" . htmlspecialchars($myts->stripSlashesGPC($v), ENT_QUOTES) . "' />\n"; |
|
709 | + $hiddenform .= "<input type='hidden' name='".htmlspecialchars($k, ENT_QUOTES)."' value='".htmlspecialchars($myts->stripSlashesGPC($v), ENT_QUOTES)."' />\n"; |
|
710 | 710 | } |
711 | 711 | } |
712 | 712 | if (!isset($_POST['limit'])) { |
713 | - $hiddenform .= "<input type='hidden' name='limit' value='" . $limit . "' />\n"; |
|
713 | + $hiddenform .= "<input type='hidden' name='limit' value='".$limit."' />\n"; |
|
714 | 714 | } |
715 | 715 | if (!isset($_POST['start'])) { |
716 | - $hiddenform .= "<input type='hidden' name='start' value='" . $start . "' />\n"; |
|
716 | + $hiddenform .= "<input type='hidden' name='start' value='".$start."' />\n"; |
|
717 | 717 | } |
718 | - $hiddenform .= "<input type='hidden' name='token' value='" . htmlspecialchars($token, ENT_QUOTES) . "' />\n"; |
|
718 | + $hiddenform .= "<input type='hidden' name='token' value='".htmlspecialchars($token, ENT_QUOTES)."' />\n"; |
|
719 | 719 | if (!isset($total) || ($totalpages = ceil($total / $limit)) > 1) { |
720 | 720 | $prev = $start - $limit; |
721 | 721 | if ($start - $limit >= 0) { |
722 | - $hiddenform .= "<a href='#0' onclick='document.findnext.start.value=" . $prev . ";document.findnext.submit();'>" . _MA_USER_PREVIOUS . "</a> \n"; |
|
722 | + $hiddenform .= "<a href='#0' onclick='document.findnext.start.value=".$prev.";document.findnext.submit();'>"._MA_USER_PREVIOUS."</a> \n"; |
|
723 | 723 | } |
724 | 724 | $counter = 1; |
725 | 725 | $currentpage = ($start + $limit) / $limit; |
726 | 726 | if (!isset($total)) { |
727 | 727 | while ($counter <= $currentpage) { |
728 | 728 | if ($counter == $currentpage) { |
729 | - $hiddenform .= '<strong>' . $counter . '</strong> '; |
|
729 | + $hiddenform .= '<strong>'.$counter.'</strong> '; |
|
730 | 730 | } elseif (($counter > $currentpage - 4 && $counter < $currentpage + 4) || $counter == 1) { |
731 | - $hiddenform .= "<a href='#" . $counter . "' onclick='document.findnext.start.value=" . ($counter - 1) * $limit . ";document.findnext.submit();'>" . $counter . '</a> '; |
|
731 | + $hiddenform .= "<a href='#".$counter."' onclick='document.findnext.start.value=".($counter - 1) * $limit.";document.findnext.submit();'>".$counter.'</a> '; |
|
732 | 732 | if ($counter == 1 && $currentpage > 5) { |
733 | 733 | $hiddenform .= '... '; |
734 | 734 | } |
@@ -738,12 +738,12 @@ discard block |
||
738 | 738 | } else { |
739 | 739 | while ($counter <= $totalpages) { |
740 | 740 | if ($counter == $currentpage) { |
741 | - $hiddenform .= '<strong>' . $counter . '</strong> '; |
|
741 | + $hiddenform .= '<strong>'.$counter.'</strong> '; |
|
742 | 742 | } elseif (($counter > $currentpage - 4 && $counter < $currentpage + 4) || $counter == 1 || $counter == $totalpages) { |
743 | 743 | if ($counter == $totalpages && $currentpage < $totalpages - 4) { |
744 | 744 | $hiddenform .= '... '; |
745 | 745 | } |
746 | - $hiddenform .= "<a href='#" . $counter . "' onclick='document.findnext.start.value=" . ($counter - 1) * $limit . ";document.findnext.submit();'>" . $counter . '</a> '; |
|
746 | + $hiddenform .= "<a href='#".$counter."' onclick='document.findnext.start.value=".($counter - 1) * $limit.";document.findnext.submit();'>".$counter.'</a> '; |
|
747 | 747 | if ($counter == 1 && $currentpage > 5) { |
748 | 748 | $hiddenform .= '... '; |
749 | 749 | } |
@@ -754,16 +754,16 @@ discard block |
||
754 | 754 | |
755 | 755 | $next = $start + $limit; |
756 | 756 | if ((isset($total) && $total > $next) || (!isset($total) && count($foundusers) >= $limit)) { |
757 | - $hiddenform .= " <a href='#" . $total . "' onclick='document.findnext.start.value=" . $next . ";document.findnext.submit();'>" . _MA_USER_NEXT . "</a>\n"; |
|
757 | + $hiddenform .= " <a href='#".$total."' onclick='document.findnext.start.value=".$next.";document.findnext.submit();'>"._MA_USER_NEXT."</a>\n"; |
|
758 | 758 | } |
759 | 759 | } |
760 | 760 | $hiddenform .= '</form>'; |
761 | 761 | |
762 | - echo '<div>' . $hiddenform; |
|
762 | + echo '<div>'.$hiddenform; |
|
763 | 763 | if (isset($total)) { |
764 | - echo '<br>' . sprintf(_MA_USER_USERSFOUND, $total) . ' '; |
|
764 | + echo '<br>'.sprintf(_MA_USER_USERSFOUND, $total).' '; |
|
765 | 765 | } |
766 | - echo "<a href='#' onclick='document.findnext.start.value=0;document.findnext.user_submit.value=0;document.findnext.submit();'>" . _MA_USER_SEARCHAGAIN . "</a>\n"; |
|
766 | + echo "<a href='#' onclick='document.findnext.start.value=0;document.findnext.user_submit.value=0;document.findnext.submit();'>"._MA_USER_SEARCHAGAIN."</a>\n"; |
|
767 | 767 | echo '</div>'; |
768 | 768 | } |
769 | 769 | } |
@@ -246,7 +246,7 @@ |
||
246 | 246 | } else { |
247 | 247 | if (((int)$xoopsUser->getVar('last_login') + 60 * 5) < time()) { |
248 | 248 | $sql = 'UPDATE ' . $xoopsDB->prefix('users') . " SET last_login = '" . time() |
249 | - . "' WHERE uid = " . $_SESSION['xoopsUserId']; |
|
249 | + . "' WHERE uid = " . $_SESSION['xoopsUserId']; |
|
250 | 250 | @$xoopsDB->queryF($sql); |
251 | 251 | } |
252 | 252 | $sess_handler->update_cookie(); |
@@ -26,14 +26,14 @@ discard block |
||
26 | 26 | /** |
27 | 27 | * Include files with definitions |
28 | 28 | */ |
29 | -include_once XOOPS_ROOT_PATH . '/include/defines.php'; |
|
30 | -include_once XOOPS_ROOT_PATH . '/include/version.php'; |
|
31 | -include_once XOOPS_ROOT_PATH . '/include/license.php'; |
|
29 | +include_once XOOPS_ROOT_PATH.'/include/defines.php'; |
|
30 | +include_once XOOPS_ROOT_PATH.'/include/version.php'; |
|
31 | +include_once XOOPS_ROOT_PATH.'/include/license.php'; |
|
32 | 32 | |
33 | 33 | /** |
34 | 34 | * Include XoopsLoad |
35 | 35 | */ |
36 | -require_once XOOPS_ROOT_PATH . '/class/xoopsload.php'; |
|
36 | +require_once XOOPS_ROOT_PATH.'/class/xoopsload.php'; |
|
37 | 37 | |
38 | 38 | /** |
39 | 39 | * YOU SHOULD BE CAREFUL WITH THE PRELOAD METHODS IN 2.4*, THEY WILL BE DEPRECATED AND IMPLEMENTED IN A DIFFERENT WAY |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | XoopsLoad::load('xoopskernel'); |
56 | 56 | $xoops = new xos_kernel_Xoops2(); |
57 | 57 | $xoops->pathTranslation(); |
58 | -$xoopsRequestUri =& $_SERVER['REQUEST_URI'];// Deprecated (use the corrected $_SERVER variable now) |
|
58 | +$xoopsRequestUri = & $_SERVER['REQUEST_URI']; // Deprecated (use the corrected $_SERVER variable now) |
|
59 | 59 | |
60 | 60 | /** |
61 | 61 | * Create Instance of xoopsSecurity Object and check Supergolbals |
@@ -118,7 +118,7 @@ discard block |
||
118 | 118 | $xoopsConfig = array_merge($xoopsConfig, (array)$fileConfigs); |
119 | 119 | unset($fileConfigs, $file); |
120 | 120 | } else { |
121 | - trigger_error('File Path Error: ' . 'var/configs/xoopsconfig.php' . ' does not exist.'); |
|
121 | + trigger_error('File Path Error: '.'var/configs/xoopsconfig.php'.' does not exist.'); |
|
122 | 122 | } |
123 | 123 | |
124 | 124 | /** |
@@ -126,7 +126,7 @@ discard block |
||
126 | 126 | */ |
127 | 127 | $xFrameOptions = isset($xoopsConfig['xFrameOptions']) ? $xoopsConfig['xFrameOptions'] : 'sameorigin'; |
128 | 128 | if (!headers_sent() && !empty($xFrameOptions)) { |
129 | - header('X-Frame-Options: ' . $xFrameOptions); |
|
129 | + header('X-Frame-Options: '.$xFrameOptions); |
|
130 | 130 | } |
131 | 131 | |
132 | 132 | //check if user set a local timezone (from XavierS) |
@@ -245,8 +245,8 @@ discard block |
||
245 | 245 | setcookie($GLOBALS['xoopsConfig']['usercookie'], null, time() - 3600); |
246 | 246 | } else { |
247 | 247 | if (((int)$xoopsUser->getVar('last_login') + 60 * 5) < time()) { |
248 | - $sql = 'UPDATE ' . $xoopsDB->prefix('users') . " SET last_login = '" . time() |
|
249 | - . "' WHERE uid = " . $_SESSION['xoopsUserId']; |
|
248 | + $sql = 'UPDATE '.$xoopsDB->prefix('users')." SET last_login = '".time() |
|
249 | + . "' WHERE uid = ".$_SESSION['xoopsUserId']; |
|
250 | 250 | @$xoopsDB->queryF($sql); |
251 | 251 | } |
252 | 252 | $sess_handler->update_cookie(); |
@@ -264,7 +264,7 @@ discard block |
||
264 | 264 | $claims = array( |
265 | 265 | 'uid' => $_SESSION['xoopsUserId'], |
266 | 266 | ); |
267 | - $rememberTime = 60*60*24*30; |
|
267 | + $rememberTime = 60 * 60 * 24 * 30; |
|
268 | 268 | $token = \Xmf\Jwt\TokenFactory::build('rememberme', $claims, $rememberTime); |
269 | 269 | setcookie( |
270 | 270 | $GLOBALS['xoopsConfig']['usercookie'], |
@@ -325,7 +325,7 @@ discard block |
||
325 | 325 | |
326 | 326 | if (!$xoopsModule || !$xoopsModule->getVar('isactive')) { |
327 | 327 | include_once $xoops->path('header.php'); |
328 | - echo '<h4>' . _MODULENOEXIST . '</h4>'; |
|
328 | + echo '<h4>'._MODULENOEXIST.'</h4>'; |
|
329 | 329 | include_once $xoops->path('footer.php'); |
330 | 330 | exit(); |
331 | 331 | } |
@@ -338,14 +338,14 @@ discard block |
||
338 | 338 | $xoopsUserIsAdmin = $xoopsUser->isAdmin($xoopsModule->getVar('mid')); |
339 | 339 | } else { |
340 | 340 | if (!$moduleperm_handler->checkRight('module_read', $xoopsModule->getVar('mid'), XOOPS_GROUP_ANONYMOUS)) { |
341 | - redirect_header(XOOPS_URL . '/user.php?from=' . $xoopsModule->getVar('dirname', 'n'), 1, _NOPERM); |
|
341 | + redirect_header(XOOPS_URL.'/user.php?from='.$xoopsModule->getVar('dirname', 'n'), 1, _NOPERM); |
|
342 | 342 | } |
343 | 343 | } |
344 | 344 | |
345 | 345 | if ($xoopsModule->getVar('dirname', 'n') !== 'system') { |
346 | - if (file_exists($file = $xoops->path('modules/' . $xoopsModule->getVar('dirname', 'n') . '/language/' . $xoopsConfig['language'] . '/main.php'))) { |
|
346 | + if (file_exists($file = $xoops->path('modules/'.$xoopsModule->getVar('dirname', 'n').'/language/'.$xoopsConfig['language'].'/main.php'))) { |
|
347 | 347 | include_once $file; |
348 | - } elseif (file_exists($file = $xoops->path('modules/' . $xoopsModule->getVar('dirname', 'n') . '/language/english/main.php'))) { |
|
348 | + } elseif (file_exists($file = $xoops->path('modules/'.$xoopsModule->getVar('dirname', 'n').'/language/english/main.php'))) { |
|
349 | 349 | include_once $file; |
350 | 350 | } |
351 | 351 | unset($file); |
@@ -25,9 +25,9 @@ |
||
25 | 25 | $search_form->addElement(new XoopsFormText(_SR_KEYWORDS, 'query', 30, 255, htmlspecialchars(stripslashes(implode(' ', $queries)), ENT_QUOTES)), true); |
26 | 26 | $type_select = new XoopsFormSelect(_SR_TYPE, 'andor', $andor); |
27 | 27 | $type_select->addOptionArray(array( |
28 | - 'AND' => _SR_ALL, |
|
29 | - 'OR' => _SR_ANY, |
|
30 | - 'exact' => _SR_EXACT)); |
|
28 | + 'AND' => _SR_ALL, |
|
29 | + 'OR' => _SR_ANY, |
|
30 | + 'exact' => _SR_EXACT)); |
|
31 | 31 | $search_form->addElement($type_select); |
32 | 32 | if (!empty($mids)) { |
33 | 33 | $mods_checkbox = new XoopsFormCheckBox(_SR_SEARCHIN, 'mids[]', $mids); |
@@ -39,7 +39,7 @@ |
||
39 | 39 | $criteria->add(new Criteria('hassearch', 1)); |
40 | 40 | $criteria->add(new Criteria('isactive', 1)); |
41 | 41 | if (!empty($available_modules)) { |
42 | - $criteria->add(new Criteria('mid', '(' . implode(',', $available_modules) . ')', 'IN')); |
|
42 | + $criteria->add(new Criteria('mid', '('.implode(',', $available_modules).')', 'IN')); |
|
43 | 43 | } |
44 | 44 | /* @var $module_handler XoopsModuleHandler */ |
45 | 45 | $module_handler = xoops_getHandler('module'); |
@@ -21,7 +21,7 @@ |
||
21 | 21 | */ |
22 | 22 | defined('XOOPS_ROOT_PATH') || exit('Restricted access'); |
23 | 23 | |
24 | -$licenseFile = XOOPS_VAR_PATH . '/data/license.php'; |
|
24 | +$licenseFile = XOOPS_VAR_PATH.'/data/license.php'; |
|
25 | 25 | if (file_exists($licenseFile)) { |
26 | 26 | include_once $licenseFile; |
27 | 27 | } else { |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | $module = $module_handler->get($comment->getVar('com_modid')); |
50 | 50 | $comment_config = $module->getInfo('comments'); |
51 | 51 | $com_modid = $module->getVar('mid'); |
52 | - $redirect_page = XOOPS_URL . '/modules/system/admin.php?fct=comments&com_modid=' . $com_modid . '&com_itemid'; |
|
52 | + $redirect_page = XOOPS_URL.'/modules/system/admin.php?fct=comments&com_modid='.$com_modid.'&com_itemid'; |
|
53 | 53 | $moddir = $module->getVar('dirname'); |
54 | 54 | unset($comment); |
55 | 55 | } else { |
@@ -58,18 +58,18 @@ discard block |
||
58 | 58 | } |
59 | 59 | $comment_config = $xoopsModule->getInfo('comments'); |
60 | 60 | $com_modid = $xoopsModule->getVar('mid'); |
61 | - $redirect_page = $comment_config['pageName'] . '?'; |
|
61 | + $redirect_page = $comment_config['pageName'].'?'; |
|
62 | 62 | $comment_confirm_extra = array(); |
63 | 63 | if (isset($comment_config['extraParams']) && is_array($comment_config['extraParams'])) { |
64 | 64 | foreach ($comment_config['extraParams'] as $extra_param) { |
65 | 65 | if (isset(${$extra_param})) { |
66 | - $redirect_page .= $extra_param . '=' . ${$extra_param} . '&'; |
|
66 | + $redirect_page .= $extra_param.'='.${$extra_param}.'&'; |
|
67 | 67 | |
68 | 68 | // for the confirmation page |
69 | 69 | $comment_confirm_extra[$extra_param] = ${$extra_param}; |
70 | 70 | } elseif (isset($_GET[$extra_param])) { |
71 | 71 | // $redirect_page .= $extra_param . '=' . $_GET[$extra_param] . '&'; |
72 | - $redirect_page .= $extra_param . '=' . filter_input(INPUT_GET, $extra_param, FILTER_SANITIZE_STRING) . '&'; |
|
72 | + $redirect_page .= $extra_param.'='.filter_input(INPUT_GET, $extra_param, FILTER_SANITIZE_STRING).'&'; |
|
73 | 73 | |
74 | 74 | // for the confirmation page |
75 | 75 | // $comment_confirm_extra[$extra_param] = $_GET[$extra_param]; |
@@ -100,7 +100,7 @@ discard block |
||
100 | 100 | if ($ref != '') { |
101 | 101 | redirect_header($ref, 2, _NOPERM); |
102 | 102 | } else { |
103 | - redirect_header($redirect_page . '?' . $comment_config['itemName'] . '=' . (int)$com_itemid, 2, _NOPERM); |
|
103 | + redirect_header($redirect_page.'?'.$comment_config['itemName'].'='.(int)$com_itemid, 2, _NOPERM); |
|
104 | 104 | } |
105 | 105 | exit(); |
106 | 106 | } |
@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | $comment = $comment_handler->get($com_id); |
114 | 114 | if (!$comment_handler->delete($comment)) { |
115 | 115 | include_once $GLOBALS['xoops']->path('header.php'); |
116 | - xoops_error(_CM_COMDELETENG . ' (ID: ' . $comment->getVar('com_id') . ')'); |
|
116 | + xoops_error(_CM_COMDELETENG.' (ID: '.$comment->getVar('com_id').')'); |
|
117 | 117 | include_once $GLOBALS['xoops']->path('footer'); |
118 | 118 | exit(); |
119 | 119 | } |
@@ -125,7 +125,7 @@ discard block |
||
125 | 125 | if (!function_exists($comment_config['callback']['update'])) { |
126 | 126 | if (isset($comment_config['callbackFile'])) { |
127 | 127 | $callbackfile = trim($comment_config['callbackFile']); |
128 | - if ($callbackfile != '' && file_exists($file = $GLOBALS['xoops']->path('modules/' . $moddir . '/' . $callbackfile))) { |
|
128 | + if ($callbackfile != '' && file_exists($file = $GLOBALS['xoops']->path('modules/'.$moddir.'/'.$callbackfile))) { |
|
129 | 129 | include_once $file; |
130 | 130 | } |
131 | 131 | if (!function_exists($comment_config['callback']['update'])) { |
@@ -155,10 +155,10 @@ discard block |
||
155 | 155 | } |
156 | 156 | |
157 | 157 | // get all comments posted later within the same thread |
158 | - $thread_comments =& $comment_handler->getThread($comment->getVar('com_rootid'), $com_id); |
|
158 | + $thread_comments = & $comment_handler->getThread($comment->getVar('com_rootid'), $com_id); |
|
159 | 159 | include_once $GLOBALS['xoops']->path('class/tree.php'); |
160 | 160 | $xot = new XoopsObjectTree($thread_comments, 'com_id', 'com_pid', 'com_rootid'); |
161 | - $child_comments =& $xot->getFirstChild($com_id); |
|
161 | + $child_comments = & $xot->getFirstChild($com_id); |
|
162 | 162 | // now set new parent ID for direct child comments |
163 | 163 | $new_pid = $comment->getVar('com_pid'); |
164 | 164 | $errs = array(); |
@@ -169,7 +169,7 @@ discard block |
||
169 | 169 | $new_rootid = $child_comments[$i]->getVar('com_id'); |
170 | 170 | $child_comments[$i]->setVar('com_rootid', $child_comments[$i]->getVar('com_id')); |
171 | 171 | if (!$comment_handler->insert($child_comments[$i])) { |
172 | - $errs[] = 'Could not change comment parent ID from <strong>' . $com_id . '</strong> to <strong>' . $new_pid . '</strong>. (ID: ' . $new_rootid . ')'; |
|
172 | + $errs[] = 'Could not change comment parent ID from <strong>'.$com_id.'</strong> to <strong>'.$new_pid.'</strong>. (ID: '.$new_rootid.')'; |
|
173 | 173 | } else { |
174 | 174 | // need to change root id for all its child comments as well |
175 | 175 | $c_child_comments = &$xot->getAllChild($new_rootid); |
@@ -177,13 +177,13 @@ discard block |
||
177 | 177 | foreach (array_keys($c_child_comments) as $j) { |
178 | 178 | $c_child_comments[$j]->setVar('com_rootid', $new_rootid); |
179 | 179 | if (!$comment_handler->insert($c_child_comments[$j])) { |
180 | - $errs[] = 'Could not change comment root ID from <strong>' . $com_id . '</strong> to <strong>' . $new_rootid . '</strong>.'; |
|
180 | + $errs[] = 'Could not change comment root ID from <strong>'.$com_id.'</strong> to <strong>'.$new_rootid.'</strong>.'; |
|
181 | 181 | } |
182 | 182 | } |
183 | 183 | } |
184 | 184 | } else { |
185 | 185 | if (!$comment_handler->insert($child_comments[$i])) { |
186 | - $errs[] = 'Could not change comment parent ID from <strong>' . $com_id . '</strong> to <strong>' . $new_pid . '</strong>.'; |
|
186 | + $errs[] = 'Could not change comment parent ID from <strong>'.$com_id.'</strong> to <strong>'.$new_pid.'</strong>.'; |
|
187 | 187 | } |
188 | 188 | } |
189 | 189 | } |
@@ -193,7 +193,7 @@ discard block |
||
193 | 193 | include_once $GLOBALS['xoops']->path('footer.php'); |
194 | 194 | exit(); |
195 | 195 | } |
196 | - redirect_header($redirect_page . '=' . $com_itemid . '&com_order=' . $com_order . '&com_mode=' . $com_mode, 1, _CM_COMDELETED); |
|
196 | + redirect_header($redirect_page.'='.$com_itemid.'&com_order='.$com_order.'&com_mode='.$com_mode, 1, _CM_COMDELETED); |
|
197 | 197 | break; |
198 | 198 | |
199 | 199 | case 'delete_all': |
@@ -203,12 +203,12 @@ discard block |
||
203 | 203 | $com_rootid = $comment->getVar('com_rootid'); |
204 | 204 | |
205 | 205 | // get all comments posted later within the same thread |
206 | - $thread_comments =& $comment_handler->getThread($com_rootid, $com_id); |
|
206 | + $thread_comments = & $comment_handler->getThread($com_rootid, $com_id); |
|
207 | 207 | |
208 | 208 | // construct a comment tree |
209 | 209 | include_once $GLOBALS['xoops']->path('class/tree.php'); |
210 | 210 | $xot = new XoopsObjectTree($thread_comments, 'com_id', 'com_pid', 'com_rootid'); |
211 | - $child_comments =& $xot->getAllChild($com_id); |
|
211 | + $child_comments = & $xot->getAllChild($com_id); |
|
212 | 212 | // add itself here |
213 | 213 | $child_comments[$com_id] = &$comment; |
214 | 214 | $msgs = array(); |
@@ -217,9 +217,9 @@ discard block |
||
217 | 217 | $member_handler = xoops_getHandler('member'); |
218 | 218 | foreach (array_keys($child_comments) as $i) { |
219 | 219 | if (!$comment_handler->delete($child_comments[$i])) { |
220 | - $msgs[] = _CM_COMDELETENG . ' (ID: ' . $child_comments[$i]->getVar('com_id') . ')'; |
|
220 | + $msgs[] = _CM_COMDELETENG.' (ID: '.$child_comments[$i]->getVar('com_id').')'; |
|
221 | 221 | } else { |
222 | - $msgs[] = _CM_COMDELETED . ' (ID: ' . $child_comments[$i]->getVar('com_id') . ')'; |
|
222 | + $msgs[] = _CM_COMDELETED.' (ID: '.$child_comments[$i]->getVar('com_id').')'; |
|
223 | 223 | // store poster ID and deleted post number into array for later use |
224 | 224 | $poster_id = $child_comments[$i]->getVar('com_uid'); |
225 | 225 | if ($poster_id > 0) { |
@@ -242,7 +242,7 @@ discard block |
||
242 | 242 | if (!function_exists($comment_config['callback']['update'])) { |
243 | 243 | if (isset($comment_config['callbackFile'])) { |
244 | 244 | $callbackfile = trim($comment_config['callbackFile']); |
245 | - if ($callbackfile != '' && file_exists($file = $GLOBALS['xoops']->path('modules/' . $moddir . '/' . $callbackfile))) { |
|
245 | + if ($callbackfile != '' && file_exists($file = $GLOBALS['xoops']->path('modules/'.$moddir.'/'.$callbackfile))) { |
|
246 | 246 | include_once $file; |
247 | 247 | } |
248 | 248 | if (!function_exists($comment_config['callback']['update'])) { |
@@ -262,7 +262,7 @@ discard block |
||
262 | 262 | } |
263 | 263 | include_once $GLOBALS['xoops']->path('header.php'); |
264 | 264 | xoops_result($msgs); |
265 | - echo '<br><a href="' . $redirect_page . '=' . $com_itemid . '&com_order=' . $com_order . '&com_mode=' . $com_mode . '">' . _BACK . '</a>'; |
|
265 | + echo '<br><a href="'.$redirect_page.'='.$com_itemid.'&com_order='.$com_order.'&com_mode='.$com_mode.'">'._BACK.'</a>'; |
|
266 | 266 | include_once $GLOBALS['xoops']->path('footer.php'); |
267 | 267 | break; |
268 | 268 |
@@ -58,17 +58,17 @@ |
||
58 | 58 | $xoops_notification['target_page'] = 'notification_update.php'; |
59 | 59 | $xoops_notification['redirect_script'] = xoops_getenv('PHP_SELF'); |
60 | 60 | $xoopsTpl->assign(array( |
61 | - 'lang_activenotifications' => _NOT_ACTIVENOTIFICATIONS, |
|
62 | - 'lang_notificationoptions' => _NOT_NOTIFICATIONOPTIONS, |
|
63 | - 'lang_updateoptions' => _NOT_UPDATEOPTIONS, |
|
64 | - 'lang_updatenow' => _NOT_UPDATENOW, |
|
65 | - 'lang_category' => _NOT_CATEGORY, |
|
66 | - 'lang_event' => _NOT_EVENT, |
|
67 | - 'lang_events' => _NOT_EVENTS, |
|
68 | - 'lang_checkall' => _NOT_CHECKALL, |
|
69 | - 'lang_notificationmethodis' => _NOT_NOTIFICATIONMETHODIS, |
|
70 | - 'lang_change' => _NOT_CHANGE, |
|
71 | - 'editprofile_url' => XOOPS_URL . '/edituser.php?uid=' . $xoopsUser->getVar('uid'))); |
|
61 | + 'lang_activenotifications' => _NOT_ACTIVENOTIFICATIONS, |
|
62 | + 'lang_notificationoptions' => _NOT_NOTIFICATIONOPTIONS, |
|
63 | + 'lang_updateoptions' => _NOT_UPDATEOPTIONS, |
|
64 | + 'lang_updatenow' => _NOT_UPDATENOW, |
|
65 | + 'lang_category' => _NOT_CATEGORY, |
|
66 | + 'lang_event' => _NOT_EVENT, |
|
67 | + 'lang_events' => _NOT_EVENTS, |
|
68 | + 'lang_checkall' => _NOT_CHECKALL, |
|
69 | + 'lang_notificationmethodis' => _NOT_NOTIFICATIONMETHODIS, |
|
70 | + 'lang_change' => _NOT_CHANGE, |
|
71 | + 'editprofile_url' => XOOPS_URL . '/edituser.php?uid=' . $xoopsUser->getVar('uid'))); |
|
72 | 72 | switch ($xoopsUser->getVar('notify_method')) { |
73 | 73 | case XOOPS_NOTIFICATION_METHOD_DISABLE: |
74 | 74 | $xoopsTpl->assign('user_method', _NOT_DISABLE); |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | $xoops_notification['show'] = isset($xoopsModule) && is_object($xoopsUser) && notificationEnabled('inline') ? 1 : 0; |
26 | 26 | if ($xoops_notification['show']) { |
27 | 27 | xoops_loadLanguage('notification'); |
28 | - $categories =& notificationSubscribableCategoryInfo(); |
|
28 | + $categories = & notificationSubscribableCategoryInfo(); |
|
29 | 29 | $event_count = 0; |
30 | 30 | if (!empty($categories)) { |
31 | 31 | /* @var $notification_handler XoopsNotificationHandler */ |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | 'lang_checkall' => _NOT_CHECKALL, |
69 | 69 | 'lang_notificationmethodis' => _NOT_NOTIFICATIONMETHODIS, |
70 | 70 | 'lang_change' => _NOT_CHANGE, |
71 | - 'editprofile_url' => XOOPS_URL . '/edituser.php?uid=' . $xoopsUser->getVar('uid'))); |
|
71 | + 'editprofile_url' => XOOPS_URL.'/edituser.php?uid='.$xoopsUser->getVar('uid'))); |
|
72 | 72 | switch ($xoopsUser->getVar('notify_method')) { |
73 | 73 | case XOOPS_NOTIFICATION_METHOD_DISABLE: |
74 | 74 | $xoopsTpl->assign('user_method', _NOT_DISABLE); |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | $redirect_args = array(); |
82 | 82 | foreach ($update_list as $update_item) { |
83 | 83 | list($category, $item_id, $event) = preg_split('/,/', $update_item['params']); |
84 | - $category_info =& notificationCategoryInfo($category); |
|
84 | + $category_info = & notificationCategoryInfo($category); |
|
85 | 85 | if (!empty($category_info['item_name'])) { |
86 | 86 | $redirect_args[$category_info['item_name']] = $item_id; |
87 | 87 | } |
@@ -93,12 +93,12 @@ discard block |
||
93 | 93 | $first_arg = 1; |
94 | 94 | foreach (array_keys($redirect_args) as $arg) { |
95 | 95 | if ($first_arg) { |
96 | - $argstring .= '?' . $arg . '=' . $redirect_args[$arg]; |
|
96 | + $argstring .= '?'.$arg.'='.$redirect_args[$arg]; |
|
97 | 97 | $first_arg = 0; |
98 | 98 | } else { |
99 | - $argstring .= '&' . $arg . '=' . $redirect_args[$arg]; |
|
99 | + $argstring .= '&'.$arg.'='.$redirect_args[$arg]; |
|
100 | 100 | } |
101 | 101 | } |
102 | 102 | |
103 | -redirect_header($_POST['not_redirect'] . $argstring, 3, _NOT_UPDATEOK); |
|
103 | +redirect_header($_POST['not_redirect'].$argstring, 3, _NOT_UPDATEOK); |
|
104 | 104 | exit(); |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | include_once $GLOBALS['xoops']->path('include/comment_constants.php'); |
26 | 26 | |
27 | 27 | if (('system' !== $xoopsModule->getVar('dirname') && XOOPS_COMMENT_APPROVENONE == $xoopsModuleConfig['com_rule']) || (!is_object($xoopsUser) && !$xoopsModuleConfig['com_anonpost']) || !is_object($xoopsModule)) { |
28 | - redirect_header(XOOPS_URL . '/user.php', 1, _NOPERM); |
|
28 | + redirect_header(XOOPS_URL.'/user.php', 1, _NOPERM); |
|
29 | 29 | } |
30 | 30 | |
31 | 31 | xoops_loadLanguage('comment'); |
@@ -58,10 +58,10 @@ discard block |
||
58 | 58 | } |
59 | 59 | // End edit by voltan |
60 | 60 | |
61 | -$r_text = _CM_POSTER . ': <strong>' . $r_name . '</strong> ' . _CM_POSTED . ': <strong>' . formatTimestamp($comment->getVar('com_created')) . '</strong><br><br>' . $comment->getVar('com_text'); |
|
61 | +$r_text = _CM_POSTER.': <strong>'.$r_name.'</strong> '._CM_POSTED.': <strong>'.formatTimestamp($comment->getVar('com_created')).'</strong><br><br>'.$comment->getVar('com_text'); |
|
62 | 62 | $com_title = $comment->getVar('com_title', 'E'); |
63 | -if (!preg_match('/^' . _RE . '/i', $com_title)) { |
|
64 | - $com_title = _RE . ' ' . xoops_substr($com_title, 0, 56); |
|
63 | +if (!preg_match('/^'._RE.'/i', $com_title)) { |
|
64 | + $com_title = _RE.' '.xoops_substr($com_title, 0, 56); |
|
65 | 65 | } |
66 | 66 | $com_pid = $com_id; |
67 | 67 | $com_text = ''; |
@@ -82,8 +82,8 @@ discard block |
||
82 | 82 | |
83 | 83 | include_once $GLOBALS['xoops']->path('header.php'); |
84 | 84 | echo '<table cellpadding="4" cellspacing="1" width="98%" class="outer"> |
85 | - <tr><td class="head">' . $comment->getVar('com_title') . '</td></tr> |
|
86 | - <tr><td><br>' . $r_text . '<br></td></tr> |
|
85 | + <tr><td class="head">' . $comment->getVar('com_title').'</td></tr> |
|
86 | + <tr><td><br>' . $r_text.'<br></td></tr> |
|
87 | 87 | </table>'; |
88 | 88 | include_once $GLOBALS['xoops']->path('include/comment_form.php'); |
89 | 89 | include_once $GLOBALS['xoops']->path('footer.php'); |
@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | * the file that will include this file must be located under xoops_url/modules/module_directory_name/admin_directory_name/ |
21 | 21 | */ |
22 | 22 | $xoopsOption['pagetype'] = 'admin'; |
23 | -include_once dirname(__DIR__) . '/mainfile.php'; |
|
23 | +include_once dirname(__DIR__).'/mainfile.php'; |
|
24 | 24 | include_once $GLOBALS['xoops']->path('include/cp_functions.php'); |
25 | 25 | |
26 | 26 | /* @var $moduleperm_handler XoopsGroupPermHandler */ |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | redirect_header(XOOPS_URL, 1, _NOPERM); |
36 | 36 | } |
37 | 37 | } else { |
38 | - redirect_header(XOOPS_URL . '/user.php', 1, _NOPERM); |
|
38 | + redirect_header(XOOPS_URL.'/user.php', 1, _NOPERM); |
|
39 | 39 | } |
40 | 40 | |
41 | 41 | // set config values for this module |
@@ -46,9 +46,9 @@ discard block |
||
46 | 46 | } |
47 | 47 | |
48 | 48 | // include the default language file for the admin interface |
49 | -if (file_exists($file = $GLOBALS['xoops']->path('modules/' . $xoopsModule->getVar('dirname') . '/language/' . $xoopsConfig['language'] . '/admin.php'))) { |
|
49 | +if (file_exists($file = $GLOBALS['xoops']->path('modules/'.$xoopsModule->getVar('dirname').'/language/'.$xoopsConfig['language'].'/admin.php'))) { |
|
50 | 50 | include_once $file; |
51 | -} elseif (file_exists($file = $GLOBALS['xoops']->path('modules/' . $xoopsModule->getVar('dirname') . '/language/english/admin.php'))) { |
|
51 | +} elseif (file_exists($file = $GLOBALS['xoops']->path('modules/'.$xoopsModule->getVar('dirname').'/language/english/admin.php'))) { |
|
52 | 52 | include_once $file; |
53 | 53 | } |
54 | 54 | // I will disable this because module developer should nod be forced to have a admin.php |