@@ -13,79 +13,79 @@ |
||
| 13 | 13 | |
| 14 | 14 | $suplparam = ''; |
| 15 | 15 | if (isset($_GET)) { |
| 16 | - foreach ($_GET as $k => $v) { |
|
| 17 | - if (trim(strtoupper($k)) !== 'IFRAMEID') { |
|
| 18 | - $suplparam .= $k . '=' . $v . '&'; |
|
| 19 | - } |
|
| 20 | - } |
|
| 16 | + foreach ($_GET as $k => $v) { |
|
| 17 | + if (trim(strtoupper($k)) !== 'IFRAMEID') { |
|
| 18 | + $suplparam .= $k . '=' . $v . '&'; |
|
| 19 | + } |
|
| 20 | + } |
|
| 21 | 21 | } |
| 22 | 22 | |
| 23 | 23 | if (strlen(xoops_trim($suplparam)) > 0) { |
| 24 | - $suplparam = substr($suplparam, 0, strlen($suplparam) - 1); |
|
| 24 | + $suplparam = substr($suplparam, 0, strlen($suplparam) - 1); |
|
| 25 | 25 | } |
| 26 | 26 | |
| 27 | 27 | $iframeHandler = xoops_getModuleHandler('myiframe', 'myiframe'); |
| 28 | 28 | |
| 29 | 29 | if (isset($_GET['iframeid'])) { |
| 30 | - $tblalign = array( |
|
| 31 | - 'top', |
|
| 32 | - 'middle', |
|
| 33 | - 'bottom', |
|
| 34 | - 'left', |
|
| 35 | - 'rigth' |
|
| 36 | - ); |
|
| 37 | - $tblscrolling = array( |
|
| 38 | - 'yes', |
|
| 39 | - 'no', |
|
| 40 | - 'auto' |
|
| 41 | - ); |
|
| 42 | - $frameid = (int)$_GET['iframeid']; |
|
| 30 | + $tblalign = array( |
|
| 31 | + 'top', |
|
| 32 | + 'middle', |
|
| 33 | + 'bottom', |
|
| 34 | + 'left', |
|
| 35 | + 'rigth' |
|
| 36 | + ); |
|
| 37 | + $tblscrolling = array( |
|
| 38 | + 'yes', |
|
| 39 | + 'no', |
|
| 40 | + 'auto' |
|
| 41 | + ); |
|
| 42 | + $frameid = (int)$_GET['iframeid']; |
|
| 43 | 43 | |
| 44 | - $frame = $iframeHandler->get($frameid); |
|
| 44 | + $frame = $iframeHandler->get($frameid); |
|
| 45 | 45 | |
| 46 | - if (is_object($frame)) { |
|
| 47 | - $iframeHandler->updatehits($frameid); |
|
| 48 | - $xoopsTpl->assign('frameok', true); |
|
| 49 | - $xoopsTpl->assign('longdesc', $frame->getVar('frame_description')); |
|
| 50 | - $xoopsTpl->assign('width', $frame->getVar('frame_width')); |
|
| 51 | - $xoopsTpl->assign('height', $frame->getVar('frame_height')); |
|
| 52 | - $xoopsTpl->assign('align', $tblalign[$frame->getVar('frame_align') - 1]); |
|
| 53 | - $xoopsTpl->assign('frameborder', $frame->getVar('frame_frameborder')); |
|
| 54 | - $xoopsTpl->assign('marginwidth', $frame->getVar('frame_marginwidth')); |
|
| 55 | - $xoopsTpl->assign('marginheight', $frame->getVar('frame_marginheight')); |
|
| 56 | - $xoopsTpl->assign('scrolling', $tblscrolling[$frame->getVar('frame_scrolling') - 1]); |
|
| 57 | - if (xoops_trim($suplparam) !== '') { |
|
| 58 | - $xoopsTpl->assign('url', $frame->getVar('frame_url') . '?' . $suplparam); |
|
| 59 | - } else { |
|
| 60 | - $xoopsTpl->assign('url', $frame->getVar('frame_url')); |
|
| 61 | - } |
|
| 62 | - $title = $frame->getVar('frame_description'); |
|
| 63 | - myiframe_set_metas($title, $title); |
|
| 64 | - } else { |
|
| 65 | - $xoopsTpl->assign('frameok', false); |
|
| 66 | - $xoopsTpl->assign('frame_error', _MYIFRAME_FRAME_ERROR); |
|
| 67 | - } |
|
| 46 | + if (is_object($frame)) { |
|
| 47 | + $iframeHandler->updatehits($frameid); |
|
| 48 | + $xoopsTpl->assign('frameok', true); |
|
| 49 | + $xoopsTpl->assign('longdesc', $frame->getVar('frame_description')); |
|
| 50 | + $xoopsTpl->assign('width', $frame->getVar('frame_width')); |
|
| 51 | + $xoopsTpl->assign('height', $frame->getVar('frame_height')); |
|
| 52 | + $xoopsTpl->assign('align', $tblalign[$frame->getVar('frame_align') - 1]); |
|
| 53 | + $xoopsTpl->assign('frameborder', $frame->getVar('frame_frameborder')); |
|
| 54 | + $xoopsTpl->assign('marginwidth', $frame->getVar('frame_marginwidth')); |
|
| 55 | + $xoopsTpl->assign('marginheight', $frame->getVar('frame_marginheight')); |
|
| 56 | + $xoopsTpl->assign('scrolling', $tblscrolling[$frame->getVar('frame_scrolling') - 1]); |
|
| 57 | + if (xoops_trim($suplparam) !== '') { |
|
| 58 | + $xoopsTpl->assign('url', $frame->getVar('frame_url') . '?' . $suplparam); |
|
| 59 | + } else { |
|
| 60 | + $xoopsTpl->assign('url', $frame->getVar('frame_url')); |
|
| 61 | + } |
|
| 62 | + $title = $frame->getVar('frame_description'); |
|
| 63 | + myiframe_set_metas($title, $title); |
|
| 64 | + } else { |
|
| 65 | + $xoopsTpl->assign('frameok', false); |
|
| 66 | + $xoopsTpl->assign('frame_error', _MYIFRAME_FRAME_ERROR); |
|
| 67 | + } |
|
| 68 | 68 | } else { |
| 69 | - if (myiframe_getmoduleoption('showlist')) { |
|
| 70 | - $baseurl = XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/index.php'; |
|
| 71 | - $frarray = array(); |
|
| 72 | - $critere = new Criteria('1', '1', '='); |
|
| 73 | - $critere->setSort('frame_description'); |
|
| 74 | - $frarray = $iframeHandler->getObjects($critere); |
|
| 75 | - if (count($frarray) > 0) { |
|
| 76 | - foreach ($frarray as $frame) { |
|
| 77 | - if (xoops_trim($frame->getVar('frame_description') === '')) { |
|
| 78 | - $liendesc = $frame->getVar('frame_url'); |
|
| 79 | - } else { |
|
| 80 | - $liendesc = "<a href='" . $baseurl . '?iframeid=' . $frame->getVar('frame_frameid') . "'>" . $frame->getVar('frame_description') . '</a>'; |
|
| 81 | - } |
|
| 82 | - $iframe['list'] = $liendesc; |
|
| 83 | - $xoopsTpl->append('iframes', $iframe); |
|
| 84 | - } |
|
| 85 | - } |
|
| 86 | - } else { |
|
| 87 | - $xoopsTpl->assign('frameok', false); |
|
| 88 | - $xoopsTpl->assign('frame_error', _MYIFRAME_FRAME_ERROR); |
|
| 89 | - } |
|
| 69 | + if (myiframe_getmoduleoption('showlist')) { |
|
| 70 | + $baseurl = XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/index.php'; |
|
| 71 | + $frarray = array(); |
|
| 72 | + $critere = new Criteria('1', '1', '='); |
|
| 73 | + $critere->setSort('frame_description'); |
|
| 74 | + $frarray = $iframeHandler->getObjects($critere); |
|
| 75 | + if (count($frarray) > 0) { |
|
| 76 | + foreach ($frarray as $frame) { |
|
| 77 | + if (xoops_trim($frame->getVar('frame_description') === '')) { |
|
| 78 | + $liendesc = $frame->getVar('frame_url'); |
|
| 79 | + } else { |
|
| 80 | + $liendesc = "<a href='" . $baseurl . '?iframeid=' . $frame->getVar('frame_frameid') . "'>" . $frame->getVar('frame_description') . '</a>'; |
|
| 81 | + } |
|
| 82 | + $iframe['list'] = $liendesc; |
|
| 83 | + $xoopsTpl->append('iframes', $iframe); |
|
| 84 | + } |
|
| 85 | + } |
|
| 86 | + } else { |
|
| 87 | + $xoopsTpl->assign('frameok', false); |
|
| 88 | + $xoopsTpl->assign('frame_error', _MYIFRAME_FRAME_ERROR); |
|
| 89 | + } |
|
| 90 | 90 | } |
| 91 | 91 | include XOOPS_ROOT_PATH . '/footer.php'; |
@@ -6,28 +6,28 @@ discard block |
||
| 6 | 6 | * **************************************************************************** |
| 7 | 7 | */ |
| 8 | 8 | |
| 9 | -require_once __DIR__ . '/../../mainfile.php'; |
|
| 10 | -require_once XOOPS_ROOT_PATH . '/modules/myiframe/include/functions.php'; |
|
| 9 | +require_once __DIR__.'/../../mainfile.php'; |
|
| 10 | +require_once XOOPS_ROOT_PATH.'/modules/myiframe/include/functions.php'; |
|
| 11 | 11 | $GLOBALS['xoopsOption']['template_main'] = 'myiframe.tpl'; |
| 12 | -require_once XOOPS_ROOT_PATH . '/header.php'; |
|
| 12 | +require_once XOOPS_ROOT_PATH.'/header.php'; |
|
| 13 | 13 | |
| 14 | 14 | $suplparam = ''; |
| 15 | 15 | if (isset($_GET)) { |
| 16 | 16 | foreach ($_GET as $k => $v) { |
| 17 | 17 | if (trim(strtoupper($k)) !== 'IFRAMEID') { |
| 18 | - $suplparam .= $k . '=' . $v . '&'; |
|
| 18 | + $suplparam .= $k.'='.$v.'&'; |
|
| 19 | 19 | } |
| 20 | 20 | } |
| 21 | 21 | } |
| 22 | 22 | |
| 23 | 23 | if (strlen(xoops_trim($suplparam)) > 0) { |
| 24 | - $suplparam = substr($suplparam, 0, strlen($suplparam) - 1); |
|
| 24 | + $suplparam = substr($suplparam, 0, strlen($suplparam)-1); |
|
| 25 | 25 | } |
| 26 | 26 | |
| 27 | 27 | $iframeHandler = xoops_getModuleHandler('myiframe', 'myiframe'); |
| 28 | 28 | |
| 29 | 29 | if (isset($_GET['iframeid'])) { |
| 30 | - $tblalign = array( |
|
| 30 | + $tblalign = array( |
|
| 31 | 31 | 'top', |
| 32 | 32 | 'middle', |
| 33 | 33 | 'bottom', |
@@ -39,7 +39,7 @@ discard block |
||
| 39 | 39 | 'no', |
| 40 | 40 | 'auto' |
| 41 | 41 | ); |
| 42 | - $frameid = (int)$_GET['iframeid']; |
|
| 42 | + $frameid = (int) $_GET['iframeid']; |
|
| 43 | 43 | |
| 44 | 44 | $frame = $iframeHandler->get($frameid); |
| 45 | 45 | |
@@ -49,13 +49,13 @@ discard block |
||
| 49 | 49 | $xoopsTpl->assign('longdesc', $frame->getVar('frame_description')); |
| 50 | 50 | $xoopsTpl->assign('width', $frame->getVar('frame_width')); |
| 51 | 51 | $xoopsTpl->assign('height', $frame->getVar('frame_height')); |
| 52 | - $xoopsTpl->assign('align', $tblalign[$frame->getVar('frame_align') - 1]); |
|
| 52 | + $xoopsTpl->assign('align', $tblalign[$frame->getVar('frame_align')-1]); |
|
| 53 | 53 | $xoopsTpl->assign('frameborder', $frame->getVar('frame_frameborder')); |
| 54 | 54 | $xoopsTpl->assign('marginwidth', $frame->getVar('frame_marginwidth')); |
| 55 | 55 | $xoopsTpl->assign('marginheight', $frame->getVar('frame_marginheight')); |
| 56 | - $xoopsTpl->assign('scrolling', $tblscrolling[$frame->getVar('frame_scrolling') - 1]); |
|
| 56 | + $xoopsTpl->assign('scrolling', $tblscrolling[$frame->getVar('frame_scrolling')-1]); |
|
| 57 | 57 | if (xoops_trim($suplparam) !== '') { |
| 58 | - $xoopsTpl->assign('url', $frame->getVar('frame_url') . '?' . $suplparam); |
|
| 58 | + $xoopsTpl->assign('url', $frame->getVar('frame_url').'?'.$suplparam); |
|
| 59 | 59 | } else { |
| 60 | 60 | $xoopsTpl->assign('url', $frame->getVar('frame_url')); |
| 61 | 61 | } |
@@ -67,7 +67,7 @@ discard block |
||
| 67 | 67 | } |
| 68 | 68 | } else { |
| 69 | 69 | if (myiframe_getmoduleoption('showlist')) { |
| 70 | - $baseurl = XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/index.php'; |
|
| 70 | + $baseurl = XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname').'/index.php'; |
|
| 71 | 71 | $frarray = array(); |
| 72 | 72 | $critere = new Criteria('1', '1', '='); |
| 73 | 73 | $critere->setSort('frame_description'); |
@@ -77,7 +77,7 @@ discard block |
||
| 77 | 77 | if (xoops_trim($frame->getVar('frame_description') === '')) { |
| 78 | 78 | $liendesc = $frame->getVar('frame_url'); |
| 79 | 79 | } else { |
| 80 | - $liendesc = "<a href='" . $baseurl . '?iframeid=' . $frame->getVar('frame_frameid') . "'>" . $frame->getVar('frame_description') . '</a>'; |
|
| 80 | + $liendesc = "<a href='".$baseurl.'?iframeid='.$frame->getVar('frame_frameid')."'>".$frame->getVar('frame_description').'</a>'; |
|
| 81 | 81 | } |
| 82 | 82 | $iframe['list'] = $liendesc; |
| 83 | 83 | $xoopsTpl->append('iframes', $iframe); |
@@ -88,4 +88,4 @@ discard block |
||
| 88 | 88 | $xoopsTpl->assign('frame_error', _MYIFRAME_FRAME_ERROR); |
| 89 | 89 | } |
| 90 | 90 | } |
| 91 | -include XOOPS_ROOT_PATH . '/footer.php'; |
|
| 91 | +include XOOPS_ROOT_PATH.'/footer.php'; |
|