XoopsModules25x /
xoopstube
These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
| 1 | <?php |
||
| 2 | /** |
||
| 3 | * Module: XoopsTube |
||
| 4 | * |
||
| 5 | * You may not change or alter any portion of this comment or credits |
||
| 6 | * of supporting developers from this source code or any supporting source code |
||
| 7 | * which is considered copyrighted (c) material of the original comment or credit authors. |
||
| 8 | * |
||
| 9 | * PHP version 5 |
||
| 10 | * |
||
| 11 | * @category Module |
||
| 12 | * @package Xoopstube |
||
| 13 | * @author XOOPS Development Team |
||
| 14 | * @copyright 2001-2016 XOOPS Project (http://xoops.org) |
||
| 15 | * @license GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html) |
||
| 16 | * @link http://xoops.org/ |
||
| 17 | * @since 1.0.6 |
||
| 18 | */ |
||
| 19 | |||
| 20 | include_once __DIR__ . '/admin_header.php'; |
||
| 21 | xoops_cp_header(); |
||
| 22 | |||
| 23 | $indexAdmin = new ModuleAdmin(); |
||
| 24 | |||
| 25 | $start = XoopsRequest::getInt('start', 0, 'POST');// xtubeCleanRequestVars($_REQUEST, 'start', 0); |
||
|
0 ignored issues
–
show
|
|||
| 26 | $start1 = XoopsRequest::getInt('start1', 0, 'POST');// xtubeCleanRequestVars($_REQUEST, 'start1', 0); |
||
|
0 ignored issues
–
show
Unused Code
Comprehensibility
introduced
by
67% 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...
|
|||
| 27 | $start2 = XoopsRequest::getInt('start2', 0, 'POST');// xtubeCleanRequestVars($_REQUEST, 'start2', 0); |
||
|
0 ignored issues
–
show
Unused Code
Comprehensibility
introduced
by
67% 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...
|
|||
| 28 | $start3 = XoopsRequest::getInt('start3', 0, 'POST');// xtubeCleanRequestVars($_REQUEST, 'start3', 0); |
||
|
0 ignored issues
–
show
Unused Code
Comprehensibility
introduced
by
67% 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...
|
|||
| 29 | $start4 = XoopsRequest::getInt('start4', 0, 'POST');// xtubeCleanRequestVars($_REQUEST, 'start4', 0); |
||
|
0 ignored issues
–
show
Unused Code
Comprehensibility
introduced
by
67% 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...
|
|||
| 30 | $start5 = XoopsRequest::getInt('start5', 0, 'POST');// xtubeCleanRequestVars($_REQUEST, 'start5', 0); |
||
|
0 ignored issues
–
show
Unused Code
Comprehensibility
introduced
by
67% 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...
|
|||
| 31 | $totalcats = XoopstubeUtilities::xtubeGetTotalCategoryCount(); |
||
| 32 | |||
| 33 | $result = $GLOBALS['xoopsDB']->query('SELECT COUNT(*) FROM ' . $GLOBALS['xoopsDB']->prefix('xoopstube_broken')); |
||
| 34 | list($totalbrokenvideos) = $GLOBALS['xoopsDB']->fetchRow($result); |
||
| 35 | $result2 = $GLOBALS['xoopsDB']->query('SELECT COUNT(*) FROM ' . $GLOBALS['xoopsDB']->prefix('xoopstube_mod')); |
||
| 36 | list($totalmodrequests) = $GLOBALS['xoopsDB']->fetchRow($result2); |
||
| 37 | $result3 = $GLOBALS['xoopsDB']->query('SELECT COUNT(*) FROM ' . $GLOBALS['xoopsDB']->prefix('xoopstube_videos') . ' WHERE published = 0'); |
||
| 38 | list($totalnewvideos) = $GLOBALS['xoopsDB']->fetchRow($result3); |
||
| 39 | $result4 = $GLOBALS['xoopsDB']->query('SELECT COUNT(*) FROM ' . $GLOBALS['xoopsDB']->prefix('xoopstube_videos') . ' WHERE published > 0'); |
||
| 40 | list($totalvideos) = $GLOBALS['xoopsDB']->fetchRow($result4); |
||
| 41 | |||
| 42 | //$xxx='<a href="brokenvideo.php">' . _AM_XOOPSTUBE_SBROKENSUBMIT . '</a><b>'; |
||
| 43 | |||
| 44 | $indexAdmin->addInfoBox(_AM_XOOPSTUBE_MINDEX_VIDEOSUMMARY); |
||
| 45 | View Code Duplication | if ($totalcats > 0) { |
|
| 46 | $indexAdmin->addInfoBoxLine(_AM_XOOPSTUBE_MINDEX_VIDEOSUMMARY, '<infolabel>' . '<a href="category.php">' . _AM_XOOPSTUBE_SCATEGORY . '</a><b>' . '</infolabel>', $totalcats, 'Green'); |
||
| 47 | } else { |
||
| 48 | $indexAdmin->addInfoBoxLine(_AM_XOOPSTUBE_MINDEX_VIDEOSUMMARY, '<infolabel>' . _AM_XOOPSTUBE_SCATEGORY . '</infolabel>', $totalcats, 'Green'); |
||
| 49 | } |
||
| 50 | |||
| 51 | View Code Duplication | if ($totalvideos > 0) { |
|
| 52 | $indexAdmin->addInfoBoxLine(_AM_XOOPSTUBE_MINDEX_VIDEOSUMMARY, '<infolabel>' . '<a href="main.php">' . _AM_XOOPSTUBE_SFILES . '</a><b>' . '</infolabel>', $totalvideos, 'Green'); |
||
| 53 | } else { |
||
| 54 | $indexAdmin->addInfoBoxLine(_AM_XOOPSTUBE_MINDEX_VIDEOSUMMARY, '<infolabel>' . _AM_XOOPSTUBE_SFILES . '</infolabel>', $totalvideos, 'Green'); |
||
| 55 | } |
||
| 56 | |||
| 57 | View Code Duplication | if ($totalnewvideos > 0) { |
|
| 58 | $indexAdmin->addInfoBoxLine(_AM_XOOPSTUBE_MINDEX_VIDEOSUMMARY, '<infolabel>' . '<a href="newvideos.php">' . _AM_XOOPSTUBE_SNEWFILESVAL . '</a><b>' . '</infolabel>', $totalnewvideos, 'Red'); |
||
| 59 | } else { |
||
| 60 | $indexAdmin->addInfoBoxLine(_AM_XOOPSTUBE_MINDEX_VIDEOSUMMARY, '<infolabel>' . _AM_XOOPSTUBE_SNEWFILESVAL . '</infolabel>', $totalnewvideos, 'Red'); |
||
| 61 | } |
||
| 62 | View Code Duplication | if ($totalmodrequests > 0) { |
|
| 63 | $indexAdmin->addInfoBoxLine(_AM_XOOPSTUBE_MINDEX_VIDEOSUMMARY, '<infolabel>' . '<a href="modifications.php">' . _AM_XOOPSTUBE_SMODREQUEST . '</a><b>' . '</infolabel>', $totalmodrequests, 'Red'); |
||
| 64 | } else { |
||
| 65 | $indexAdmin->addInfoBoxLine(_AM_XOOPSTUBE_MINDEX_VIDEOSUMMARY, '<infolabel>' . _AM_XOOPSTUBE_SMODREQUEST . '</infolabel>', $totalmodrequests, 'Red'); |
||
| 66 | } |
||
| 67 | |||
| 68 | View Code Duplication | if ($totalbrokenvideos > 0) { |
|
| 69 | $indexAdmin->addInfoBoxLine(_AM_XOOPSTUBE_MINDEX_VIDEOSUMMARY, '<infolabel>' . '<a href="brokenvideo.php">' . _AM_XOOPSTUBE_SBROKENSUBMIT . '</a><b>' . '</infolabel><infotext>', |
||
| 70 | $totalbrokenvideos . '</infotext>', 'Red'); |
||
| 71 | } else { |
||
| 72 | $indexAdmin->addInfoBoxLine(_AM_XOOPSTUBE_MINDEX_VIDEOSUMMARY, '<infolabel>' . _AM_XOOPSTUBE_SBROKENSUBMIT . '</infolabel><infotext>', $totalbrokenvideos . '</infotext>', 'Red'); |
||
| 73 | } |
||
| 74 | |||
| 75 | //------ create directories --------------- |
||
| 76 | |||
| 77 | $folderMode = $GLOBALS['xoopsModuleConfig']['dirmode']; |
||
| 78 | //include_once dirname(__DIR__) . '/class/utilities.php'; |
||
|
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...
|
|||
| 79 | foreach (array_keys($uploadFolders) as $i) { |
||
| 80 | XoopstubeUtilities::prepareFolder($uploadFolders[$i], $folderMode); |
||
|
0 ignored issues
–
show
The call to
XoopstubeUtilities::prepareFolder() has too many arguments starting with $folderMode.
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. In this case you can add the Loading history...
|
|||
| 81 | $indexAdmin->addConfigBoxLine($uploadFolders[$i], 'folder'); |
||
| 82 | // $indexAdmin->addConfigBoxLine(array($uploadFolders[$i], $folderMode), 'chmod'); |
||
|
0 ignored issues
–
show
Unused Code
Comprehensibility
introduced
by
80% 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...
|
|||
| 83 | } |
||
| 84 | |||
| 85 | echo $indexAdmin->addNavigation(basename(__FILE__)); |
||
| 86 | echo $indexAdmin->renderIndex(); |
||
| 87 | |||
| 88 | /* |
||
|
0 ignored issues
–
show
Unused Code
Comprehensibility
introduced
by
53% 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...
|
|||
| 89 | //------ check directories --------------- |
||
| 90 | include_once dirname(__DIR__) . '/include/directorychecker.php'; |
||
| 91 | |||
| 92 | $indexAdmin->addConfigBoxLine(''); |
||
| 93 | $redirectFile = $_SERVER['PHP_SELF']; |
||
| 94 | |||
| 95 | $languageConstants = array( |
||
| 96 | _AM_XOOPSTUBE_AVAILABLE, |
||
| 97 | _AM_XOOPSTUBE_NOTAVAILABLE, |
||
| 98 | _AM_XOOPSTUBE_CREATETHEDIR, |
||
| 99 | _AM_XOOPSTUBE_NOTWRITABLE, |
||
| 100 | _AM_XOOPSTUBE_SETMPERM, |
||
| 101 | _AM_XOOPSTUBE_DIRCREATED, |
||
| 102 | _AM_XOOPSTUBE_DIRNOTCREATED, |
||
| 103 | _AM_XOOPSTUBE_PERMSET, |
||
| 104 | _AM_XOOPSTUBE_PERMNOTSET |
||
| 105 | ); |
||
| 106 | |||
| 107 | $path = $GLOBALS['xoopsModuleConfig']['uploaddir'] . '/'; |
||
| 108 | $indexAdmin->addConfigBoxLine(DirectoryChecker::getDirectoryStatus($path, 0777, $languageConstants, $redirectFile)); |
||
| 109 | |||
| 110 | $path = XOOPS_ROOT_PATH . '/' . $GLOBALS['xoopsModuleConfig']['screenshots'] . '/'; |
||
| 111 | $indexAdmin->addConfigBoxLine(DirectoryChecker::getDirectoryStatus($path, 0777, $languageConstants, $redirectFile)); |
||
| 112 | |||
| 113 | $path = XOOPS_ROOT_PATH . '/' . $GLOBALS['xoopsModuleConfig']['catimage'] . '/'; |
||
| 114 | $indexAdmin->addConfigBoxLine(DirectoryChecker::getDirectoryStatus($path, 0777, $languageConstants, $redirectFile)); |
||
| 115 | |||
| 116 | $path = XOOPS_ROOT_PATH . '/' . $GLOBALS['xoopsModuleConfig']['mainimagedir'] . '/'; |
||
| 117 | $indexAdmin->addConfigBoxLine(DirectoryChecker::getDirectoryStatus($path, 0777, $languageConstants, $redirectFile)); |
||
| 118 | |||
| 119 | //echo $indexAdmin->addNavigation(basename(__FILE__)); |
||
| 120 | //echo $indexAdmin->renderIndex(); |
||
| 121 | //echo wfd_serverstats(); |
||
| 122 | //--------------------------- |
||
| 123 | |||
| 124 | xtubeFileChecks(); |
||
| 125 | |||
| 126 | */ |
||
| 127 | |||
| 128 | include_once __DIR__ . '/admin_footer.php'; |
||
| 129 |
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.