Issues (884)

Security Analysis    no request data  

This project does not seem to handle request data directly as such no vulnerable execution paths were found.

  Cross-Site Scripting
Cross-Site Scripting enables an attacker to inject code into the response of a web-request that is viewed by other users. It can for example be used to bypass access controls, or even to take over other users' accounts.
  File Exposure
File Exposure allows an attacker to gain access to local files that he should not be able to access. These files can for example include database credentials, or other configuration files.
  File Manipulation
File Manipulation enables an attacker to write custom data to files. This potentially leads to injection of arbitrary code on the server.
  Object Injection
Object Injection enables an attacker to inject an object into PHP code, and can lead to arbitrary code execution, file exposure, or file manipulation attacks.
  Code Injection
Code Injection enables an attacker to execute arbitrary code on the server.
  Response Splitting
Response Splitting can be used to send arbitrary responses.
  File Inclusion
File Inclusion enables an attacker to inject custom files into PHP's file loading mechanism, either explicitly passed to include, or for example via PHP's auto-loading mechanism.
  Command Injection
Command Injection enables an attacker to inject a shell command that is execute with the privileges of the web-server. This can be used to expose sensitive data, or gain access of your server.
  SQL Injection
SQL Injection enables an attacker to execute arbitrary SQL code on your database server gaining access to user data, or manipulating user data.
  XPath Injection
XPath Injection enables an attacker to modify the parts of XML document that are read. If that XML document is for example used for authentication, this can lead to further vulnerabilities similar to SQL Injection.
  LDAP Injection
LDAP Injection enables an attacker to inject LDAP statements potentially granting permission to run unauthorized queries, or modify content inside the LDAP tree.
  Header Injection
  Other Vulnerability
This category comprises other attack vectors such as manipulating the PHP runtime, loading custom extensions, freezing the runtime, or similar.
  Regex Injection
Regex Injection enables an attacker to execute arbitrary code in your PHP process.
  XML Injection
XML Injection enables an attacker to read files on your local filesystem including configuration files, or can be abused to freeze your web-server process.
  Variable Injection
Variable Injection enables an attacker to overwrite program variables with custom data, and can lead to further vulnerabilities.
Unfortunately, the security analysis is currently not available for your project. If you are a non-commercial open-source project, please contact support to gain access.

categories.php (48 issues)

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

1
<?php
2
/*
3
 You may not change or alter any portion of this comment or credits
4
 of supporting developers from this source code or any supporting source code
5
 which is considered copyrighted (c) material of the original comment or credit authors.
6
7
 This program is distributed in the hope that it will be useful,
8
 but WITHOUT ANY WARRANTY; without even the implied warranty of
9
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
10
*/
11
/**
12
 * Alumni module for Xoops
13
 *
14
 * @copyright       XOOPS Project https://xoops.org/
15
 * @license         GPL 2.0 or later
16
 * @package         alumni
17
 * @since           2.6.x
18
 * @author          John Mordo (jlm69)
19
 */
20
21
include __DIR__ . '/header.php';
22
23
$moduleDirName = basename(__DIR__);
24
$main_lang     = '_MA_' . strtoupper($moduleDirName);
0 ignored issues
show
$main_lang does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$).

This check examines a number of code elements and verifies that they conform to the given naming conventions.

You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.

Loading history...
25
$myts          = MyTextSanitizer::getInstance();
26
$xoops         = Xoops::getInstance();
27
$alumni        = Alumni::getInstance();
28
$helper        = Xoops::getModuleHelper('alumni');
29
$moduleId      = $helper->getModule()->getVar('mid');
30
31
$groups = '3';
32
if (is_object($xoopsUser)) {
33
    $groups = $xoopsUser->getGroups();
34
}
35
//$gperm_handler = $xoops->getHandler('groupperm');
0 ignored issues
show
Unused Code Comprehensibility introduced by
64% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
36
$perm_itemid = 0;
0 ignored issues
show
$perm_itemid does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$).

This check examines a number of code elements and verifies that they conform to the given naming conventions.

You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.

Loading history...
37
if (isset($_POST['item_id'])) {
38
    $perm_itemid = (int)$_POST['item_id'];
0 ignored issues
show
$perm_itemid does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$).

This check examines a number of code elements and verifies that they conform to the given naming conventions.

You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.

Loading history...
39
}
40
//If no access
41 View Code Duplication
if (!$gpermHandler->checkRight('' . $moduleDirName . '_view', $perm_itemid, $groups, $moduleId)) {
0 ignored issues
show
$perm_itemid does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$).

This check examines a number of code elements and verifies that they conform to the given naming conventions.

You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.

Loading history...
This code seems to be duplicated across your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
42
    $xoops->redirect(XOOPS_URL . '/index.php', 3, XoopsLocale::E_NO_ACCESS_PERMISSION);
43
    exit();
44
}
45
$prem_perm = '1';
0 ignored issues
show
$prem_perm does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$).

This check examines a number of code elements and verifies that they conform to the given naming conventions.

You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.

Loading history...
46
if (!$gpermHandler->checkRight('' . $moduleDirName . '_premium', $perm_itemid, $groups, $moduleId)) {
0 ignored issues
show
$perm_itemid does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$).

This check examines a number of code elements and verifies that they conform to the given naming conventions.

You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.

Loading history...
47
    $prem_perm = '0';
0 ignored issues
show
$prem_perm does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$).

This check examines a number of code elements and verifies that they conform to the given naming conventions.

You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.

Loading history...
48
}
49
50
include XOOPS_ROOT_PATH . "/modules/{$moduleDirName}/include/functions.php";
51
52
$cid = (int)$_GET['cid'];
53
54
$xoops->header('module:alumni/alumni_category.tpl');
55
Xoops::getInstance()->header();
56
57
//$xoTheme->addScript(ALUMNI_URL . '/media/jquery/jquery-1.8.3.min.js');
0 ignored issues
show
Unused Code Comprehensibility introduced by
55% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
58
$xoTheme->addBaseScriptAssets('@jquery');
59
$xoTheme->addScript(ALUMNI_URL . '/media/jquery/tablesorter-master/js/jquery.tablesorter.js');
60
$xoTheme->addScript(ALUMNI_URL . '/media/jquery/tablesorter-master/addons/pager/jquery.tablesorter.pager.js');
61
$xoTheme->addScript(ALUMNI_URL . '/media/jquery/tablesorter-master/js/jquery.tablesorter.widgets.js');
62
$xoTheme->addScript(ALUMNI_URL . '/media/jquery/pager-custom-controls.js');
63
$xoTheme->addScript(ALUMNI_URL . '/media/jquery/myjs.js');
64
$xoTheme->addStylesheet(ALUMNI_URL . '/media/jquery/css/theme.blue.css');
65
$xoTheme->addStylesheet(ALUMNI_URL . '/media/jquery/tablesorter-master/addons/pager/jquery.tablesorter.pager.css');
66
$xoTheme->addScript(ALUMNI_URL . '/media/jquery/photo.js');
67
$default_sort = $xoops->getModuleConfig('' . $moduleDirName . '_csortorder');
0 ignored issues
show
$default_sort does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$).

This check examines a number of code elements and verifies that they conform to the given naming conventions.

You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.

Loading history...
68
$listing_sort = $xoops->getModuleConfig('' . $moduleDirName . '_lsortorder');
0 ignored issues
show
$listing_sort does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$).

This check examines a number of code elements and verifies that they conform to the given naming conventions.

You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.

Loading history...
69
70
$cid = ($cid > 0) ? $cid : 0;
71
72
$xoops->tpl()->assign('add_from', AlumniLocale::ALUMNI_LISTINGS . ' ' . $xoopsConfig['sitename']);
73
$xoops->tpl()->assign('add_from_title', AlumniLocale::ALUMNI_LISTINGS);
74
$xoops->tpl()->assign('add_from_sitename', $xoopsConfig['sitename']);
75
if ($xoops->isUser()) {
76
    $xoops->tpl()->assign('add_listing', "<a href='listing.php?op=new_listing&amp;cid=$cid'>" . AlumniLocale::ADD_LISTING_2 . '</a>');
77
}
78
$cat_banner = $xoops->getBanner();
0 ignored issues
show
$cat_banner does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$).

This check examines a number of code elements and verifies that they conform to the given naming conventions.

You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.

Loading history...
79
$xoops->tpl()->assign('cat_banner', $cat_banner);
0 ignored issues
show
$cat_banner does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$).

This check examines a number of code elements and verifies that they conform to the given naming conventions.

You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.

Loading history...
80
81
$cat_code_place = $xoops->getModuleConfig('' . $moduleDirName . '_code_place');
0 ignored issues
show
$cat_code_place does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$).

This check examines a number of code elements and verifies that they conform to the given naming conventions.

You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.

Loading history...
82
$useExtraCode   = $xoops->getModuleConfig('' . $moduleDirName . '_use_code');
83
$useBanner      = $xoops->getModuleConfig('' . $moduleDirName . '_useBanner');
84
$catExtraCode   = $xoops->getModuleConfig('' . $moduleDirName . '_index_code');
85
$xoops->tpl()->assign('useExtraCode', $useExtraCode);
86
$xoops->tpl()->assign('useBanner', $useBanner);
87
$xoops->tpl()->assign('catExtraCode', '<html>' . $catExtraCode . '</html>');
88
$xoops->tpl()->assign('cat_code_place', $cat_code_place);
0 ignored issues
show
$cat_code_place does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$).

This check examines a number of code elements and verifies that they conform to the given naming conventions.

You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.

Loading history...
89
90
$categoriesHandler = $xoops->getModuleHandler('category', 'alumni');
91
92
$alumni      = Alumni::getInstance();
93
$groups      = $xoops->isUser() ? $xoops->user->getGroups() : '3';
94
$alumniIds   = $xoops->getHandlerGroupPermission()->getItemIds('alumni_view', $groups, $moduleId);
95
$catCriteria = new CriteriaCompo();
96
$catCriteria->add(new Criteria('cid', $cid, '='));
97
$catCriteria->add(new Criteria('cid', '(' . implode(', ', $alumniIds) . ')', 'IN'));
98
$catCriteria->setOrder('' . $xoops->getModuleConfig('' . $moduleDirName . '_csortorder') . '');
99
$numcat        = $categoriesHandler->getCount();
100
$categoryArray = $categoriesHandler->getAll($catCriteria);
101
102
$catObj = $categoriesHandler->get($cid);
103
104
$homePath = "<a href='" . ALUMNI_URL . "/index.php'>" . XoopsLocale::MAIN . '</a>&nbsp;:&nbsp;';
105
$itemPath = $catObj->getVar('title');
106
$path     = '';
107
$myParent = $catObj->getVar('pid');
108
109
$catpathCriteria = new CriteriaCompo();
110
$catpathCriteria->add(new Criteria('cid', $myParent, '='));
111
$catpathArray = $categoriesHandler->getAll($catpathCriteria);
112
foreach (array_keys($catpathArray) as $i) {
113
    $mytitle = $catpathArray[$i]->getVar('title');
114
}
115
116 View Code Duplication
if (0 != $myParent) {
0 ignored issues
show
This code seems to be duplicated across your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
117
    $path = "<a href='" . ALUMNI_URL . '/categories.php?cid=' . $catpathArray[$i]->getVar('cid') . "'>" . $catpathArray[$i]->getVar('title') . '</a>&nbsp;:&nbsp;';
118
}
119
$path = "{$homePath}{$path}{$itemPath}";
120
$path = str_replace('&nbsp;:&nbsp;', " <img src='" . XOOPS_URL . "/modules/{$moduleDirName}/assets/images/arrow.gif" . "' style='border-width: 0px;' alt=''> ", $path);
121
122
$xoops->tpl()->assign('category_path', $path);
123
124
unset($catCriteria);
125
126
foreach (array_keys($categoryArray) as $i) {
127
    $cat_id     = $categoryArray[$i]->getVar('cid');
0 ignored issues
show
$cat_id does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$).

This check examines a number of code elements and verifies that they conform to the given naming conventions.

You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.

Loading history...
128
    $cat_pid    = $categoryArray[$i]->getVar('pid');
0 ignored issues
show
$cat_pid does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$).

This check examines a number of code elements and verifies that they conform to the given naming conventions.

You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.

Loading history...
129
    $title      = $categoryArray[$i]->getVar('title', 'e');
130
    $scaddress  = $categoryArray[$i]->getVar('scaddress');
131
    $scaddress2 = $categoryArray[$i]->getVar('scaddress2');
132
    $sccity     = $categoryArray[$i]->getVar('sccity');
133
    $scstate    = $categoryArray[$i]->getVar('scstate');
134
    $sczip      = $categoryArray[$i]->getVar('sczip');
135
    $scphone    = $categoryArray[$i]->getVar('scphone');
136
    $scfax      = $categoryArray[$i]->getVar('scfax');
137
    $scmotto    = $categoryArray[$i]->getVar('scmotto');
138
    $scurl      = $categoryArray[$i]->getVar('scurl');
139
    $img        = $categoryArray[$i]->getVar('img');
140
    $scphoto    = $categoryArray[$i]->getVar('scphoto');
141
    $order      = $categoryArray[$i]->getVar('ordre');
142
143
    $xoops->tpl()->assign('moderated', '');
144
    if (1 == $xoops->getModuleConfig('alumni_moderated')) {
145
        $xoops->tpl()->assign('moderated', '1');
146
    }
147
    $xoops->tpl()->assign('lang_subcat', '');
148
    if (1 == $xoops->getModuleConfig('alumni_showsubcat')) {
149
        $subcatCriteria = new CriteriaCompo();
150
        $subcatCriteria->add(new Criteria('pid', $cid, '='));
151
        $subcatCriteria->add(new Criteria('cid', '(' . implode(', ', $alumniIds) . ')', 'IN'));
152
        $subcatCriteria->setOrder('' . $xoops->getModuleConfig('' . $moduleDirName . '_csortorder') . '');
153
        $numsubcat   = $categoriesHandler->getCount($subcatCriteria);
154
        $subcatArray = $categoriesHandler->getAll($subcatCriteria);
155
        unset($subcatCriteria);
156
        foreach (array_keys($subcatArray) as $j) {
157
            $subcat_id     = $subcatArray[$j]->getVar('cid');
0 ignored issues
show
$subcat_id does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$).

This check examines a number of code elements and verifies that they conform to the given naming conventions.

You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.

Loading history...
158
            $subcat_pid    = $subcatArray[$j]->getVar('pid');
0 ignored issues
show
$subcat_pid does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$).

This check examines a number of code elements and verifies that they conform to the given naming conventions.

You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.

Loading history...
159
            $sub_cat_title = $subcatArray[$j]->getVar('title', 'e');
0 ignored issues
show
$sub_cat_title does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$).

This check examines a number of code elements and verifies that they conform to the given naming conventions.

You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.

Loading history...
160
161
            $listingHandler  = $xoops->getModuleHandler('listing', 'alumni');
162
            $listingCriteria = new CriteriaCompo();
163
            $listingCriteria->add(new Criteria('cid', $subcat_id, '='));
0 ignored issues
show
$subcat_id does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$).

This check examines a number of code elements and verifies that they conform to the given naming conventions.

You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.

Loading history...
164
            $listingCriteria->add(new Criteria('valid', 1, '='));
165
            $listingCriteria->add(new Criteria('cid', '(' . implode(', ', $alumniIds) . ')', 'IN'));
166
            $alumni_count = $listingHandler->getCount($listingCriteria);
0 ignored issues
show
$alumni_count does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$).

This check examines a number of code elements and verifies that they conform to the given naming conventions.

You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.

Loading history...
167
            $xoops->tpl()->append('subcategories', ['title' => $sub_cat_title, 'id' => $subcat_id, 'totallinks' => $alumni_count, 'count' => $numsubcat]);
0 ignored issues
show
$sub_cat_title does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$).

This check examines a number of code elements and verifies that they conform to the given naming conventions.

You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.

Loading history...
168
        }
169
        $xoops->tpl()->assign('showsubcat', true);
170
    }
171
    $xoops->tpl()->assign('subcats', $numsubcat);
172
    $school_name = $myts->htmlSpecialChars($title);
0 ignored issues
show
$school_name does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$).

This check examines a number of code elements and verifies that they conform to the given naming conventions.

You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.

Loading history...
173
    $xoops->tpl()->assign('scaddress', $scaddress);
174
    $xoops->tpl()->assign('scaddress2', $scaddress2);
175
    $xoops->tpl()->assign('sccity', $sccity);
176
    $xoops->tpl()->assign('scstate', $scstate);
177
    $xoops->tpl()->assign('sczip', $sczip);
178
    $xoops->tpl()->assign('scphone', $scphone);
179
    $xoops->tpl()->assign('scfax', $scfax);
180
    $xoops->tpl()->assign('scmotto', $scmotto);
181
    $xoops->tpl()->assign('scurl', $scurl);
182
    $xoops->tpl()->assign('top_scphoto', "<img src='" . XOOPS_URL . "/uploads/{$moduleDirName}/photos/school_photos/$scphoto' align='middle' alt='$school_name'>");
0 ignored issues
show
$school_name does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$).

This check examines a number of code elements and verifies that they conform to the given naming conventions.

You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.

Loading history...
183
    $xoops->tpl()->assign('head_scphone', AlumniLocale::SCPHONE);
184
    $xoops->tpl()->assign('head_scfax', AlumniLocale::SCFAX);
185
    $xoops->tpl()->assign('web', AlumniLocale::WEB);
186
    $xoops->tpl()->assign('school_name', $title);
187
    $xoops->tpl()->assign('title', $title);
188
    $xoops->tpl()->assign('module_name', $xoopsModule->getVar('name'));
189
    $xoops->tpl()->assign('nav_subcount', '');
190
    $xoops->tpl()->assign('trows', '');
191
    $xoops->tpl()->assign('school_listings', '');
192
    $xoops->tpl()->assign('sub_listings', '');
193
    $xoops->tpl()->assign('show_nav', false);
194
    $xoops->tpl()->assign('no_listings', AlumniLocale::NO_LISTINGS);
195
196
    $listingHandler  = $xoops->getModuleHandler('listing', 'alumni');
197
    $listingCriteria = new CriteriaCompo();
198
    $listingCriteria->add(new Criteria('cid', $cid, '='));
199
    $listingCriteria->add(new Criteria('valid', 1, '='));
200
    $listingCriteria->add(new Criteria('cid', '(' . implode(', ', $alumniIds) . ')', 'IN'));
201
    $numrows = $listingHandler->getCount($listingCriteria);
202
203
    $listingArray = $listingHandler->getAll($listingCriteria);
204
    unset($listingCriteria);
205
    foreach (array_keys($listingArray) as $j) {
206
        $lid        = $listingArray[$j]->getVar('lid');
207
        $cid        = $listingArray[$j]->getVar('cid');
208
        $name       = $listingArray[$j]->getVar('name');
209
        $mname      = $listingArray[$j]->getVar('mname');
210
        $lname      = $listingArray[$j]->getVar('lname');
211
        $school     = $listingArray[$j]->getVar('school');
212
        $year       = $listingArray[$j]->getVar('year');
213
        $studies    = $listingArray[$j]->getVar('studies');
214
        $activities = $listingArray[$j]->getVar('activities');
215
        $extrainfo  = $listingArray[$j]->getVar('extrainfo');
216
        $occ        = $listingArray[$j]->getVar('occ');
217
        $date       = $listingArray[$j]->getVar('date');
218
        $email      = $listingArray[$j]->getVar('email');
219
        $submitter  = $listingArray[$j]->getVar('submitter');
220
        $usid       = $listingArray[$j]->getVar('usid');
221
        $town       = $listingArray[$j]->getVar('town');
222
        $valid      = $listingArray[$j]->getVar('valid');
223
        $photo      = $listingArray[$j]->getVar('photo');
224
        $photo2     = $listingArray[$j]->getVar('photo2');
225
        $view       = $listingArray[$j]->getVar('view');
226
227
        $trows = $numrows;
228
229
        $cat_sort = $xoops->getModuleConfig('' . $moduleDirName . '_csortorder');
0 ignored issues
show
$cat_sort does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$).

This check examines a number of code elements and verifies that they conform to the given naming conventions.

You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.

Loading history...
230
231
        $xoops->tpl()->assign('xoops_pagetitle', $title);
232
        $xoops->tpl()->assign('nav_subcount', $trows);
233
        $xoops->tpl()->assign('trows', $trows);
234
        $xoops->tpl()->assign('title', $title);
235
        $xoops->tpl()->assign('lang_subcat', AlumniLocale::SUBCAT_AVAIL);
236
237
        if ($trows > '0') {
238
            $xoops->tpl()->assign('last_head', AlumniLocale::THE . ' ' . $xoops->getModuleConfig('' . $moduleDirName . '_newalumni') . ' ' . AlumniLocale::LASTADD);
239
            $xoops->tpl()->assign('last_head_name', AlumniLocale::NAME_2);
240
            $xoops->tpl()->assign('last_head_mname', AlumniLocale::MNAME_2);
241
            $xoops->tpl()->assign('last_head_lname', AlumniLocale::LNAME_2);
242
            $xoops->tpl()->assign('last_head_school', AlumniLocale::SCHOOL_2);
243
            $xoops->tpl()->assign('class_of', AlumniLocale::CLASS_OF_2);
244
            $xoops->tpl()->assign('last_head_studies', AlumniLocale::STUDIES_2);
245
            $xoops->tpl()->assign('last_head_occ', AlumniLocale::OCC_2);
246
            $xoops->tpl()->assign('last_head_activities', AlumniLocale::ACTIVITIES_2);
247
            $xoops->tpl()->assign('last_head_date', XoopsLocale::DATE);
248
            $xoops->tpl()->assign('last_head_local', AlumniLocale::TOWN_2);
249
            $xoops->tpl()->assign('last_head_views', AlumniLocale::HITS);
250
            $xoops->tpl()->assign('last_head_photo', AlumniLocale::PHOTO);
251
            $xoops->tpl()->assign('last_head_photo2', AlumniLocale::PHOTO2);
252
            $xoops->tpl()->assign('cat', $cid);
253
254
            $a_item     = [];
0 ignored issues
show
$a_item does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$).

This check examines a number of code elements and verifies that they conform to the given naming conventions.

You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.

Loading history...
255
            $name       = $myts->undoHtmlSpecialChars($name);
256
            $mname      = $myts->undoHtmlSpecialChars($mname);
257
            $lname      = $myts->undoHtmlSpecialChars($lname);
258
            $school     = $myts->undoHtmlSpecialChars($school);
259
            $year       = $myts->htmlSpecialChars($year);
260
            $studies    = $myts->htmlSpecialChars($studies);
261
            $activities = $myts->htmlSpecialChars($activities);
262
            $occ        = $myts->htmlSpecialChars($occ);
263
            $town       = $myts->undoHtmlSpecialChars($town);
264
265
            $useroffset    = '';
266
            $a_item['new'] = '';
0 ignored issues
show
$a_item does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$).

This check examines a number of code elements and verifies that they conform to the given naming conventions.

You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.

Loading history...
267
268
            $newcount  = $xoops->getModuleConfig('' . $moduleDirName . '_countday');
269
            $startdate = (time() - (86400 * $newcount));
270 View Code Duplication
            if ($startdate < $date) {
0 ignored issues
show
This code seems to be duplicated across your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
271
                $newitem       = '<img src="' . XOOPS_URL . "/modules/{$moduleDirName}/assets/images/newred.gif\">";
272
                $a_item['new'] = $newitem;
0 ignored issues
show
$a_item does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$).

This check examines a number of code elements and verifies that they conform to the given naming conventions.

You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.

Loading history...
273
            }
274 View Code Duplication
            if ($xoopsUser) {
0 ignored issues
show
This code seems to be duplicated across your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
275
                $timezone = $xoopsUser->timezone();
276
                if (isset($timezone)) {
277
                    $useroffset = $xoopsUser->timezone();
278
                } else {
279
                    $useroffset = $xoopsConfig['default_TZ'];
280
                }
281
            }
282
            $date = ($useroffset * 3600) + $date;
283
            $date = XoopsLocale::formatTimestamp($date, 's');
284 View Code Duplication
            if ($xoopsUser) {
0 ignored issues
show
This code seems to be duplicated across your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
285
                if ($xoopsUser->isAdmin()) {
286
                    $a_item['admin'] = "<a href='admin/alumni.php?op=edit_listing&amp;lid=$lid&amp;cid=$cid'><img src='images/modif.gif' border=0 alt=\"" . AlumniLocale::MODADMIN . '"></a>';
0 ignored issues
show
$a_item does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$).

This check examines a number of code elements and verifies that they conform to the given naming conventions.

You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.

Loading history...
287
                }
288
            }
289
290
            $a_item['name']       = "<a href='listing.php?lid=$lid'><b>$name&nbsp;$mname&nbsp;$lname</b></a>";
0 ignored issues
show
$a_item does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$).

This check examines a number of code elements and verifies that they conform to the given naming conventions.

You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.

Loading history...
291
            $a_item['school']     = $school;
0 ignored issues
show
$a_item does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$).

This check examines a number of code elements and verifies that they conform to the given naming conventions.

You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.

Loading history...
292
            $a_item['year']       = $year;
0 ignored issues
show
$a_item does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$).

This check examines a number of code elements and verifies that they conform to the given naming conventions.

You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.

Loading history...
293
            $a_item['studies']    = $studies;
0 ignored issues
show
$a_item does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$).

This check examines a number of code elements and verifies that they conform to the given naming conventions.

You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.

Loading history...
294
            $a_item['occ']        = $occ;
0 ignored issues
show
$a_item does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$).

This check examines a number of code elements and verifies that they conform to the given naming conventions.

You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.

Loading history...
295
            $a_item['activities'] = $activities;
0 ignored issues
show
$a_item does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$).

This check examines a number of code elements and verifies that they conform to the given naming conventions.

You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.

Loading history...
296
            $a_item['date']       = $date;
0 ignored issues
show
$a_item does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$).

This check examines a number of code elements and verifies that they conform to the given naming conventions.

You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.

Loading history...
297
            $a_item['local']      = '';
0 ignored issues
show
$a_item does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$).

This check examines a number of code elements and verifies that they conform to the given naming conventions.

You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.

Loading history...
298
            if ($town) {
299
                $a_item['local'] .= $town;
0 ignored issues
show
$a_item does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$).

This check examines a number of code elements and verifies that they conform to the given naming conventions.

You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.

Loading history...
300
            }
301
            $cat = addslashes($cid);
302
            if ($photo) {
303
                $a_item['photo'] = "<a href=\"javascript:CLA('display-image.php?lid=$lid')\"><img src=\"images/photo.gif\" border=\"0\" width=\"15\" height=\"11\" alt='" . AlumniLocale::PHOTO_AVAILABLE . "'></a>";
0 ignored issues
show
$a_item does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$).

This check examines a number of code elements and verifies that they conform to the given naming conventions.

You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.

Loading history...
304
            } else {
305
                $a_item['photo'] = '';
0 ignored issues
show
$a_item does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$).

This check examines a number of code elements and verifies that they conform to the given naming conventions.

You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.

Loading history...
306
            }
307
            $a_item['views'] = $view;
0 ignored issues
show
$a_item does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$).

This check examines a number of code elements and verifies that they conform to the given naming conventions.

You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.

Loading history...
308
            $xoops->tpl()->append('items', $a_item);
0 ignored issues
show
$a_item does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$).

This check examines a number of code elements and verifies that they conform to the given naming conventions.

You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.

Loading history...
309
        } else {
310
            $xoops->tpl()->assign('no_listings', AlumniLocale::E_NO_LISTING);
311
        }
312
    }
313
}
314
315
Xoops::getInstance()->footer();
316