Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
YOHOOD
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
whb
10 years ago
Commit
eb8cea41ba151c4540411ee07afe2aa9f4ee7184
1 parent
5996c3dc
master
...
develop
release_v1.5
release_v4
test
v1.1.1
v1.1.0
v1.0.2
v1.0.1
v1.0.0
merge
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
10 deletions
website/view/script/default/index.php
website/view/script/default/index.php
View file @
eb8cea4
...
...
@@ -151,16 +151,8 @@ EOL;
}
foreach
(
$banners
as
$banner
)
:
$res_size
=
json_decode
(
$banner
[
'res_size'
],
true
);
if
(
$res_size
[
'height'
]
<
308
&&
$res_size
[
'width'
]
<
308
)
{
$height
=
$res_size
[
'height'
];
$width
=
$res_size
[
'width'
];
}
else
{
$height
=
ceil
(
$res_size
[
'height'
]
*
(
308
/
$res_size
[
'width'
]));
$width
=
308
;
}
$height
=
ceil
(
$res_size
[
'height'
]
*
(
308
/
$res_size
[
'width'
]));
$width
=
308
;
?>
<div
class=
"image-box"
style=
"padding-bottom: 30px;"
>
<a
href=
"
<?php
echo
$banner
[
'url'
]
?>
"
target=
"_blank"
style=
"
<?php
echo
sprintf
(
"height:%spx;width:%spx;overflow:hidden;"
,
$height
,
$width
);
?>
"
>
...
...
Please
register
or
login
to post a comment