@@ -9,93 +9,93 @@ |
||
| 9 | 9 | use Xmf\Request; |
| 10 | 10 | |
| 11 | 11 | if (!defined('XOOPS_ROOT_PATH')) { |
| 12 | - die('XOOPS root path not defined'); |
|
| 12 | + die('XOOPS root path not defined'); |
|
| 13 | 13 | } |
| 14 | 14 | $modversion = [ |
| 15 | - 'version' => 1.66, |
|
| 16 | - 'module_status' => 'Beta 1', |
|
| 17 | - 'release_date' => '2017/08/04', |
|
| 18 | - 'name' => _MI_MYIFRAME_NAME, |
|
| 19 | - 'description' => _MI_MYIFRAME_DESC, |
|
| 20 | - 'credits' => '', |
|
| 21 | - 'author' => 'Instant Zero - http://xoops.instant-zero.com', |
|
| 22 | - 'help' => '', |
|
| 23 | - 'license' => 'GPL see LICENSE', |
|
| 24 | - 'official' => 0, |
|
| 25 | - 'image' => 'assets/images/logoModule.png', |
|
| 26 | - 'dirname' => basename(__DIR__), |
|
| 27 | - 'min_php' => '5.5', |
|
| 28 | - 'min_db' => ['mysql' => '5.5'], |
|
| 29 | - 'min_xoops' => '2.5.8+', |
|
| 30 | - 'min_admin' => '1.2', |
|
| 31 | - 'module_website_url' => 'www.xoops.org', |
|
| 32 | - 'module_website_name' => 'XOOPS', |
|
| 33 | - 'module_release' => '05/07/2017', |
|
| 34 | - 'system_menu' => 1, |
|
| 35 | - //sql tables |
|
| 36 | - 'sqlfile' => ['mysql' => 'sql/mysql.sql'], |
|
| 37 | - 'tables' => [ |
|
| 38 | - 'myiframe' |
|
| 39 | - ], |
|
| 40 | - // Admin |
|
| 41 | - 'hasAdmin' => 1, |
|
| 42 | - 'adminindex' => 'admin/index.php', |
|
| 43 | - 'adminmenu' => 'admin/menu.php', |
|
| 44 | - // Menu |
|
| 45 | - 'hasMain' => 1 |
|
| 15 | + 'version' => 1.66, |
|
| 16 | + 'module_status' => 'Beta 1', |
|
| 17 | + 'release_date' => '2017/08/04', |
|
| 18 | + 'name' => _MI_MYIFRAME_NAME, |
|
| 19 | + 'description' => _MI_MYIFRAME_DESC, |
|
| 20 | + 'credits' => '', |
|
| 21 | + 'author' => 'Instant Zero - http://xoops.instant-zero.com', |
|
| 22 | + 'help' => '', |
|
| 23 | + 'license' => 'GPL see LICENSE', |
|
| 24 | + 'official' => 0, |
|
| 25 | + 'image' => 'assets/images/logoModule.png', |
|
| 26 | + 'dirname' => basename(__DIR__), |
|
| 27 | + 'min_php' => '5.5', |
|
| 28 | + 'min_db' => ['mysql' => '5.5'], |
|
| 29 | + 'min_xoops' => '2.5.8+', |
|
| 30 | + 'min_admin' => '1.2', |
|
| 31 | + 'module_website_url' => 'www.xoops.org', |
|
| 32 | + 'module_website_name' => 'XOOPS', |
|
| 33 | + 'module_release' => '05/07/2017', |
|
| 34 | + 'system_menu' => 1, |
|
| 35 | + //sql tables |
|
| 36 | + 'sqlfile' => ['mysql' => 'sql/mysql.sql'], |
|
| 37 | + 'tables' => [ |
|
| 38 | + 'myiframe' |
|
| 39 | + ], |
|
| 40 | + // Admin |
|
| 41 | + 'hasAdmin' => 1, |
|
| 42 | + 'adminindex' => 'admin/index.php', |
|
| 43 | + 'adminmenu' => 'admin/menu.php', |
|
| 44 | + // Menu |
|
| 45 | + 'hasMain' => 1 |
|
| 46 | 46 | ]; |
| 47 | 47 | // Templates |
| 48 | 48 | $modversion['templates'] = [ |
| 49 | - [ |
|
| 50 | - 'file' => 'myiframe.tpl', |
|
| 51 | - 'description' => 'Default template' |
|
| 52 | - ], |
|
| 49 | + [ |
|
| 50 | + 'file' => 'myiframe.tpl', |
|
| 51 | + 'description' => 'Default template' |
|
| 52 | + ], |
|
| 53 | 53 | ]; |
| 54 | 54 | |
| 55 | 55 | //Blocks |
| 56 | 56 | $modversion['blocks'][] = [ |
| 57 | - 'file' => 'myiframe_iframe.php', |
|
| 58 | - 'name' => _MI_MYIFAME_BNAME1, |
|
| 59 | - 'description' => 'Shows an iframe in a block', |
|
| 60 | - 'show_func' => 'b_myiframe_iframe_show', |
|
| 61 | - 'edit_func' => 'b_myiframe_iframe_edit', |
|
| 62 | - 'options' => '0', |
|
| 63 | - 'template' => 'myiframe_block_show.tpl' |
|
| 57 | + 'file' => 'myiframe_iframe.php', |
|
| 58 | + 'name' => _MI_MYIFAME_BNAME1, |
|
| 59 | + 'description' => 'Shows an iframe in a block', |
|
| 60 | + 'show_func' => 'b_myiframe_iframe_show', |
|
| 61 | + 'edit_func' => 'b_myiframe_iframe_edit', |
|
| 62 | + 'options' => '0', |
|
| 63 | + 'template' => 'myiframe_block_show.tpl' |
|
| 64 | 64 | ]; |
| 65 | 65 | global $xoopsUser, $xoopsConfig, $xoopsModule, $xoopsModuleConfig; |
| 66 | 66 | |
| 67 | 67 | if (is_object($xoopsModule) && $xoopsModule->getVar('dirname') == $modversion['dirname'] && $xoopsModule->getVar('isactive')) { |
| 68 | - $i = 0; |
|
| 69 | - include_once XOOPS_ROOT_PATH . '/modules/myiframe/include/functions.php'; |
|
| 70 | - $myts = MyTextSanitizer::getInstance(); |
|
| 71 | - if (myiframe_getmoduleoption('showinmenu')) { |
|
| 72 | - $sql = 'SELECT * FROM ' . $GLOBALS['xoopsDB']->prefix('myiframe') . ' ORDER BY frame_description'; |
|
| 73 | - $result = $GLOBALS['xoopsDB']->query($sql); |
|
| 74 | - while (false !== ($myrow = $GLOBALS['xoopsDB']->fetchArray($result))) { |
|
| 75 | - if (xoops_trim($myrow['frame_description']) !== '') { |
|
| 76 | - $modversion['sub'][$i]['name'] = $myts->htmlSpecialChars($myrow['frame_description']); |
|
| 77 | - $modversion['sub'][$i]['url'] = 'index.php?iframeid=' . (int)$myrow['frame_frameid']; |
|
| 78 | - $i++; |
|
| 79 | - } |
|
| 80 | - } |
|
| 81 | - } |
|
| 68 | + $i = 0; |
|
| 69 | + include_once XOOPS_ROOT_PATH . '/modules/myiframe/include/functions.php'; |
|
| 70 | + $myts = MyTextSanitizer::getInstance(); |
|
| 71 | + if (myiframe_getmoduleoption('showinmenu')) { |
|
| 72 | + $sql = 'SELECT * FROM ' . $GLOBALS['xoopsDB']->prefix('myiframe') . ' ORDER BY frame_description'; |
|
| 73 | + $result = $GLOBALS['xoopsDB']->query($sql); |
|
| 74 | + while (false !== ($myrow = $GLOBALS['xoopsDB']->fetchArray($result))) { |
|
| 75 | + if (xoops_trim($myrow['frame_description']) !== '') { |
|
| 76 | + $modversion['sub'][$i]['name'] = $myts->htmlSpecialChars($myrow['frame_description']); |
|
| 77 | + $modversion['sub'][$i]['url'] = 'index.php?iframeid=' . (int)$myrow['frame_frameid']; |
|
| 78 | + $i++; |
|
| 79 | + } |
|
| 80 | + } |
|
| 81 | + } |
|
| 82 | 82 | } |
| 83 | 83 | // Options |
| 84 | 84 | $modversion['config'][] = [ |
| 85 | - 'name' => 'showinmenu', |
|
| 86 | - 'title' => '_MI_MYIFRAME_OPT0', |
|
| 87 | - 'description' => '_MI_MYIFRAME_OPT0_DSC', |
|
| 88 | - 'formtype' => 'yesno', |
|
| 89 | - 'valuetype' => 'int', |
|
| 90 | - 'default' => 0, |
|
| 85 | + 'name' => 'showinmenu', |
|
| 86 | + 'title' => '_MI_MYIFRAME_OPT0', |
|
| 87 | + 'description' => '_MI_MYIFRAME_OPT0_DSC', |
|
| 88 | + 'formtype' => 'yesno', |
|
| 89 | + 'valuetype' => 'int', |
|
| 90 | + 'default' => 0, |
|
| 91 | 91 | ]; |
| 92 | 92 | $modversion['config'][] = [ |
| 93 | - 'name' => 'showlist', |
|
| 94 | - 'title' => '_MI_MYIFRAME_OPT1', |
|
| 95 | - 'description' => '_MI_MYIFRAME_OPT1_DSC', |
|
| 96 | - 'formtype' => 'yesno', |
|
| 97 | - 'valuetype' => 'int', |
|
| 98 | - 'default' => 1, |
|
| 93 | + 'name' => 'showlist', |
|
| 94 | + 'title' => '_MI_MYIFRAME_OPT1', |
|
| 95 | + 'description' => '_MI_MYIFRAME_OPT1_DSC', |
|
| 96 | + 'formtype' => 'yesno', |
|
| 97 | + 'valuetype' => 'int', |
|
| 98 | + 'default' => 1, |
|
| 99 | 99 | ]; |
| 100 | 100 | // Search |
| 101 | 101 | $modversion['hasSearch'] = 0; |
@@ -66,15 +66,15 @@ |
||
| 66 | 66 | |
| 67 | 67 | if (is_object($xoopsModule) && $xoopsModule->getVar('dirname') == $modversion['dirname'] && $xoopsModule->getVar('isactive')) { |
| 68 | 68 | $i = 0; |
| 69 | - include_once XOOPS_ROOT_PATH . '/modules/myiframe/include/functions.php'; |
|
| 69 | + include_once XOOPS_ROOT_PATH.'/modules/myiframe/include/functions.php'; |
|
| 70 | 70 | $myts = MyTextSanitizer::getInstance(); |
| 71 | 71 | if (myiframe_getmoduleoption('showinmenu')) { |
| 72 | - $sql = 'SELECT * FROM ' . $GLOBALS['xoopsDB']->prefix('myiframe') . ' ORDER BY frame_description'; |
|
| 72 | + $sql = 'SELECT * FROM '.$GLOBALS['xoopsDB']->prefix('myiframe').' ORDER BY frame_description'; |
|
| 73 | 73 | $result = $GLOBALS['xoopsDB']->query($sql); |
| 74 | 74 | while (false !== ($myrow = $GLOBALS['xoopsDB']->fetchArray($result))) { |
| 75 | 75 | if (xoops_trim($myrow['frame_description']) !== '') { |
| 76 | 76 | $modversion['sub'][$i]['name'] = $myts->htmlSpecialChars($myrow['frame_description']); |
| 77 | - $modversion['sub'][$i]['url'] = 'index.php?iframeid=' . (int)$myrow['frame_frameid']; |
|
| 77 | + $modversion['sub'][$i]['url'] = 'index.php?iframeid='.(int) $myrow['frame_frameid']; |
|
| 78 | 78 | $i++; |
| 79 | 79 | } |
| 80 | 80 | } |