@@ -34,14 +34,14 @@ discard block |
||
34 | 34 | $blank_img = 'blank.gif'; |
35 | 35 | $html_banner = 0; |
36 | 36 | } else { |
37 | - if (substr_count($obj->getVar('banner_imageurl'), $xoops_upload_url . '/banners/') == 0) { |
|
37 | + if (substr_count($obj->getVar('banner_imageurl'), $xoops_upload_url.'/banners/') == 0) { |
|
38 | 38 | $blank_img = 'blank.gif'; |
39 | 39 | } else { |
40 | 40 | $namefile = |
41 | - substr_replace($obj->getVar('banner_imageurl'), '', 0, strlen($xoops_upload_url . '/banners/')); |
|
42 | - $pathfile = $xoops->path('uploads/banners/') . $namefile; |
|
41 | + substr_replace($obj->getVar('banner_imageurl'), '', 0, strlen($xoops_upload_url.'/banners/')); |
|
42 | + $pathfile = $xoops->path('uploads/banners/').$namefile; |
|
43 | 43 | if (is_file($pathfile)) { |
44 | - $blank_img = str_replace($xoops_upload_url . '/banners/', '', $obj->getVar('banner_imageurl', 'e')); |
|
44 | + $blank_img = str_replace($xoops_upload_url.'/banners/', '', $obj->getVar('banner_imageurl', 'e')); |
|
45 | 45 | } else { |
46 | 46 | $blank_img = 'blank.gif'; |
47 | 47 | } |
@@ -73,13 +73,13 @@ discard block |
||
73 | 73 | \Xoops\Core\Lists\ImageFile::setOptionsArray($imageselect_img, $xoops->path('uploads/banners')); |
74 | 74 | $imageselect_img->setExtra( |
75 | 75 | 'onchange="showImgSelected(\'xo-banners-img\', \'banners_imageurl\', \'banners\', \'\', \'' |
76 | - . $xoops_upload_url . '\' )"' |
|
76 | + . $xoops_upload_url.'\' )"' |
|
77 | 77 | ); |
78 | 78 | $imgtray_img->addElement($imageselect_img, false); |
79 | 79 | $imgtray_img->addElement( |
80 | 80 | new Xoops\Form\Label( |
81 | 81 | '', |
82 | - "<br /><img src='" . $xoops_upload_url . "/banners/" . $blank_img |
|
82 | + "<br /><img src='".$xoops_upload_url."/banners/".$blank_img |
|
83 | 83 | . "' name='image_img' id='xo-banners-img' alt='' />" |
84 | 84 | ) |
85 | 85 | ); |
@@ -22,7 +22,7 @@ discard block |
||
22 | 22 | * @version $Id: $ |
23 | 23 | */ |
24 | 24 | |
25 | -include dirname(dirname(__DIR__)) . '/mainfile.php'; |
|
25 | +include dirname(dirname(__DIR__)).'/mainfile.php'; |
|
26 | 26 | |
27 | 27 | $xoops = Xoops::getInstance(); |
28 | 28 | $helper = Banners::getInstance(); |
@@ -87,7 +87,7 @@ discard block |
||
87 | 87 | $criteria = new CriteriaCompo(); |
88 | 88 | $criteria->add(new Criteria('banner_status', 0, '!=')); |
89 | 89 | if ($admin == false) { |
90 | - $criteria->add(new Criteria('banner_cid', '(' . implode(',', $cid) . ')', 'IN')); |
|
90 | + $criteria->add(new Criteria('banner_cid', '('.implode(',', $cid).')', 'IN')); |
|
91 | 91 | } |
92 | 92 | $criteria->setSort("banner_cid"); |
93 | 93 | $criteria->setOrder("ASC"); |
@@ -121,7 +121,7 @@ discard block |
||
121 | 121 | $percent = substr(100 * $clicks / $impmade, 0, 5); |
122 | 122 | } |
123 | 123 | if ($imptotal == 0) { |
124 | - $left = "" . _AM_BANNERS_BANNERS_UNLIMIT . ""; |
|
124 | + $left = ""._AM_BANNERS_BANNERS_UNLIMIT.""; |
|
125 | 125 | } else { |
126 | 126 | $left = $imptotal - $impmade; |
127 | 127 | } |
@@ -131,9 +131,9 @@ discard block |
||
131 | 131 | } else { |
132 | 132 | $img = ''; |
133 | 133 | if (stristr($imageurl, '.swf')) { |
134 | - $img .= '<object type="application/x-shockwave-flash" width="468" height="60" data="' . $imageurl . '" style="z-index:100;">' . '<param name="movie" value="' . $imageurl . '" />' . '<param name="wmode" value="opaque" />' . '</object>'; |
|
134 | + $img .= '<object type="application/x-shockwave-flash" width="468" height="60" data="'.$imageurl.'" style="z-index:100;">'.'<param name="movie" value="'.$imageurl.'" />'.'<param name="wmode" value="opaque" />'.'</object>'; |
|
135 | 135 | } else { |
136 | - $img .= '<img src="' . $imageurl . '" alt="" />'; |
|
136 | + $img .= '<img src="'.$imageurl.'" alt="" />'; |
|
137 | 137 | } |
138 | 138 | } |
139 | 139 | |
@@ -159,7 +159,7 @@ discard block |
||
159 | 159 | } |
160 | 160 | // Display Page Navigation |
161 | 161 | if ($banner_count > $nb_banners) { |
162 | - $nav = new XoopsPageNav($banner_count, $nb_banners, $start, 'start', 'startF=' . $startF); |
|
162 | + $nav = new XoopsPageNav($banner_count, $nb_banners, $start, 'start', 'startF='.$startF); |
|
163 | 163 | $xoops->tpl()->assign('nav_menu_banner', $nav->renderNav(4)); |
164 | 164 | } |
165 | 165 | // Display Finished Banners |
@@ -167,7 +167,7 @@ discard block |
||
167 | 167 | $criteria = new CriteriaCompo(); |
168 | 168 | $criteria->add(new Criteria('banner_status', 0)); |
169 | 169 | if ($admin == false) { |
170 | - $criteria->add(new Criteria('banner_cid', '(' . implode(',', $cid) . ')', 'IN')); |
|
170 | + $criteria->add(new Criteria('banner_cid', '('.implode(',', $cid).')', 'IN')); |
|
171 | 171 | } |
172 | 172 | $criteria->setSort("banner_datestart"); |
173 | 173 | $criteria->setOrder("DESC"); |
@@ -206,9 +206,9 @@ discard block |
||
206 | 206 | } else { |
207 | 207 | $img = '<div id="xo-bannerfix">'; |
208 | 208 | if (stristr($imageurl, '.swf')) { |
209 | - $img .= '<object type="application/x-shockwave-flash" width="468" height="60" data="' . $imageurl . '" style="z-index:100;">' . '<param name="movie" value="' . $imageurl . '" />' . '<param name="wmode" value="opaque" />' . '</object>'; |
|
209 | + $img .= '<object type="application/x-shockwave-flash" width="468" height="60" data="'.$imageurl.'" style="z-index:100;">'.'<param name="movie" value="'.$imageurl.'" />'.'<param name="wmode" value="opaque" />'.'</object>'; |
|
210 | 210 | } else { |
211 | - $img .= '<img src="' . $imageurl . '" alt="" />'; |
|
211 | + $img .= '<img src="'.$imageurl.'" alt="" />'; |
|
212 | 212 | } |
213 | 213 | |
214 | 214 | $img .= '</div>'; |
@@ -230,7 +230,7 @@ discard block |
||
230 | 230 | } |
231 | 231 | // Display Page Navigation |
232 | 232 | if ($banner_finish_count > $nb_banners) { |
233 | - $nav = new XoopsPageNav($banner_finish_count, $nb_banners, $startF, 'startF', 'start=' . $start); |
|
233 | + $nav = new XoopsPageNav($banner_finish_count, $nb_banners, $startF, 'startF', 'start='.$start); |
|
234 | 234 | $xoops->tpl()->assign('nav_menu_bannerF', $nav->renderNav(4)); |
235 | 235 | } |
236 | 236 | $xoops->footer(); |
@@ -398,7 +398,7 @@ discard block |
||
398 | 398 | if ($xoops->security()->checkReferer()) { |
399 | 399 | $banner->setVar('banner_clicks', $banner->getVar('banner_clicks') + 1); |
400 | 400 | $banner_Handler->insert($banner); |
401 | - header('Location: ' . $banner->getVar('banner_clickurl')); |
|
401 | + header('Location: '.$banner->getVar('banner_clickurl')); |
|
402 | 402 | exit(); |
403 | 403 | } else { |
404 | 404 | //No valid referer found so some javascript error or direct access found |
@@ -55,7 +55,7 @@ |
||
55 | 55 | if ($helper->isCurrentModule() && isset($res['subMenu']) && is_array($res['subMenu'])) { |
56 | 56 | foreach ($res['subMenu'] as $key => $subMenu) { |
57 | 57 | if (isset($subMenu['name']) && isset($subMenu['link'])) { |
58 | - $subMenu['icon'] = isset($subMenu['icon']) ? $subMenu['icon'] :'glyphicon-menu-right'; |
|
58 | + $subMenu['icon'] = isset($subMenu['icon']) ? $subMenu['icon'] : 'glyphicon-menu-right'; |
|
59 | 59 | $res['subMenu'][$key] = $subMenu; |
60 | 60 | } |
61 | 61 | } |
@@ -17,7 +17,7 @@ |
||
17 | 17 | * @package thumbs |
18 | 18 | * @author Mage Grégory (AKA Mage) |
19 | 19 | */ |
20 | -include __DIR__ . '/header.php'; |
|
20 | +include __DIR__.'/header.php'; |
|
21 | 21 | $xoops = Xoops::getInstance(); |
22 | 22 | $xoops->header(); |
23 | 23 | $aboutAdmin = new \Xoops\Module\Admin(); |
@@ -17,7 +17,7 @@ |
||
17 | 17 | * @package thumbs |
18 | 18 | * @author Mage Grégory (AKA Mage) |
19 | 19 | */ |
20 | -include __DIR__ . '/header.php'; |
|
20 | +include __DIR__.'/header.php'; |
|
21 | 21 | |
22 | 22 | $xoops = Xoops::getInstance(); |
23 | 23 |
@@ -17,4 +17,4 @@ |
||
17 | 17 | * @package thumbs |
18 | 18 | * @author Mage Grégory (AKA Mage) |
19 | 19 | */ |
20 | -require_once dirname(dirname(dirname(__DIR__))) . '/include/cp_header.php'; |
|
20 | +require_once dirname(dirname(dirname(__DIR__))).'/include/cp_header.php'; |
@@ -33,7 +33,7 @@ |
||
33 | 33 | public static function eventCoreServiceLocateThumbnail(Provider $provider) |
34 | 34 | { |
35 | 35 | if (is_a($provider, '\Xoops\Core\Service\Provider')) { |
36 | - $path = dirname(__DIR__) . '/class/ThumbsProvider.php'; |
|
36 | + $path = dirname(__DIR__).'/class/ThumbsProvider.php'; |
|
37 | 37 | require $path; |
38 | 38 | $object = new ThumbsProvider(); |
39 | 39 | $provider->register($object); |
@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | */ |
20 | 20 | |
21 | 21 | // this is located in include, otherwise normal/anon users do not have authority to run |
22 | -include dirname(dirname(dirname(__DIR__))) . '/mainfile.php'; |
|
22 | +include dirname(dirname(dirname(__DIR__))).'/mainfile.php'; |
|
23 | 23 | |
24 | 24 | $xoops = Xoops::getInstance(); |
25 | 25 | $xoops->logger()->quiet(); |
@@ -28,12 +28,12 @@ discard block |
||
28 | 28 | $imgWidth = Request::getInt('w', 0); |
29 | 29 | $imgHeight = Request::getInt('h', 0); |
30 | 30 | |
31 | -if ($imgWidth==0 && $imgHeight==0) { |
|
31 | +if ($imgWidth == 0 && $imgHeight == 0) { |
|
32 | 32 | $configs = $xoops->getModuleConfigs('thumbs'); |
33 | 33 | $imgWidth = $configs['thumbs_width']; |
34 | 34 | $imgHeight = $configs['thumbs_height']; |
35 | 35 | } |
36 | -$helper = $xoops->getModuleHelper('thumbs'); |
|
36 | +$helper = $xoops->getModuleHelper('thumbs'); |
|
37 | 37 | $thumbPath = $helper->buildThumbPath($imgPath, $imgWidth, $imgHeight); |
38 | 38 | |
39 | 39 | $oldUmask = umask(022); |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | |
52 | 52 | if ($image->resize($imgWidth, $imgHeight, ZEBRA_IMAGE_NOT_BOXED, -1)) { |
53 | 53 | header("HTTP/1.1 301 Moved Permanently"); |
54 | - header('Location: ' . $xoops->url($thumbPath)); |
|
54 | + header('Location: '.$xoops->url($thumbPath)); |
|
55 | 55 | } else { |
56 | 56 | header("HTTP/1.0 404 Not Found"); |
57 | 57 | // http_response_code(400); |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | public function buildThumbPath($imgPath, $width, $height) |
46 | 46 | { |
47 | 47 | //$xoops = \Xoops::getInstance(); |
48 | - if ($width==0 && $height==0) { |
|
48 | + if ($width == 0 && $height == 0) { |
|
49 | 49 | $width = $this->getConfig('thumbs_width'); |
50 | 50 | $height = $this->getConfig('thumbs_height'); |
51 | 51 | } |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | if ($pathParts['dirname'] === '.') { |
55 | 55 | $pathParts['dirname'] = ''; |
56 | 56 | } |
57 | - $thumbPath = 'assets/thumbs/' . $pathParts['dirname'].$sizeDir.$pathParts['basename']; |
|
57 | + $thumbPath = 'assets/thumbs/'.$pathParts['dirname'].$sizeDir.$pathParts['basename']; |
|
58 | 58 | |
59 | 59 | return $thumbPath; |
60 | 60 | } |