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
b3723ccd7ea28efb926bae9445b91894db772bf1
1 parent
3a62ae34
现场活动
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
15 deletions
website/controller/Activity.class.php
website/controller/Product.class.php
website/view/script/activity/planmobile.php
website/controller/Activity.class.php
View file @
b3723cc
...
...
@@ -33,15 +33,19 @@ class Controller_Activity extends Controller_Abstract
$startTime
=
strtotime
(
date
(
'Y-m-d'
,
$topic
[
'start_time'
]));
$list
[
$startTime
][]
=
$topic
;
$year
=
date
(
'Y'
,
$topic
[
'start_time'
]);
if
(
$year
==
2014
)
{
continue
;
}
if
(
!
isset
(
$navList
[
$year
]))
{
$navList
[
$year
]
=
array
();
}
$enable
=
0
;
$enable
=
1
;
//导航
if
(
!
in_array
(
$startTime
,
array_keys
(
$navList
[
$year
])))
{
$enable
=
$today
>=
$startTime
?
1
:
0
;
//
$enable = $today >= $startTime ? 1 : 0;
if
(
$enable
&&
empty
(
$firstCurrentday
))
{
$firstCurrentday
=
$startTime
;
...
...
website/controller/Product.class.php
View file @
b3723cc
...
...
@@ -15,7 +15,7 @@ class Controller_Product extends Controller_Abstract
*/
public
function
recommendAction
()
{
$this
->
_viewname
=
'../default/other'
;
}
/**
...
...
website/view/script/activity/planmobile.php
View file @
b3723cc
<?php
$this
->
_extends
(
'layout/default_layout_mobile'
);
?>
<?php
$this
->
_block
(
'main'
);
?>
<?php
if
(
strtotime
(
'2015-07-25 23:59:00'
)
>
$this
->
view
->
currentday
&&
time
()
<
strtotime
(
'2015-07-25 23:59:00'
))
:
//9-18?>
<
img
src
=
"<?php echo SITE_RES.'/images/yohood/comingsoon.jpg';?>"
style
=
"width:100%;"
/>
<?
php
else
:?>
<div
class=
"scene-tab"
>
<ul
class=
"clearfix"
>
<?php
$navs
=
current
(
$this
->
view
->
navs
);
ksort
(
$navs
);
foreach(
$navs
as
$nav
):
if(strtotime('2015-07-25 23:59:00') >
$nav['timestamp']
) continue;
?>
foreach
(
$navs
as
$nav
)
:?>
<
li
<?
php
if
(
$nav
[
'timestamp'
]
==
$this
->
view
->
currentday
&&
$nav
[
'enable'
])
echo
'class="current"'
;
else
if
(
!
$nav
[
'enable'
])
echo
'class="disable"'
;
?>
...
...
@@ -19,9 +14,6 @@
</ul>
</div>
<div
class=
"scene-content"
>
<?php
if
(
$this
->
view
->
currentday
>
strtotime
(
date
(
'Y-m-d'
,
time
())))
:?>
<
img
src
=
"<?php echo SITE_RES.'/images/yohood/comingsoon.jpg';?>"
style
=
"width:100%;"
/>
<?
php
else
:?>
<div
class=
"main-layout current clearfix"
>
<?php
foreach
(
$this
->
view
->
topics
as
$topic
)
:?>
<
div
class
="
layout
-
section
current
">
...
...
@@ -50,10 +42,7 @@
</div>
<?php
endforeach
;
?>
</div>
<?php
endif
;
?>
</div>
<?php
endif
;
?>
<?php
$this
->
_endblock
();
?>
<?php
$this
->
_block
(
'js'
);
?>
<script
type=
"text/javascript"
>
...
...
Please
register
or
login
to post a comment