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
Plain Diff
Browse Files
Authored by
whb
10 years ago
Commit
c504772c6c54bff3a72a5f364e23f962f92a9958
2 parents
db0720e3
069b4efd
fixed bug
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
6 deletions
website/controller/News.class.php
website/controller/News.class.php
View file @
c504772
...
...
@@ -80,13 +80,12 @@ class Controller_News extends Controller_Abstract
$pics
=
$this
->
_request
->
pics
;
$thumb
=
$this
->
_request
->
thumb
;
$videos
=
$this
->
_request
->
videos
;
if
(
empty
(
$title
)
||
empty
(
$content
)
||
empty
(
$
pics
)
||
empty
(
$
thumb
))
if
(
empty
(
$title
)
||
empty
(
$content
)
||
empty
(
$thumb
))
{
return
$this
->
returnJson
(
false
,
403
,
''
,
'参数不能为空'
);
}
$brand_ids
=
array_filter
(
explode
(
','
,
$brand_ids
));
$pics
=
array_filter
(
explode
(
','
,
$pics
));
$thumb
=
$pics
[
0
];
list
(
$width
,
$height
,
$type
,
$attr
)
=
getimagesize
(
$thumb
);
$thumb_size
=
json_encode
(
array
(
'width'
=>
$width
,
'height'
=>
$height
));
$videos
=
array_filter
(
explode
(
','
,
$videos
));
...
...
@@ -95,18 +94,18 @@ class Controller_News extends Controller_Abstract
{
$html
=
<<<EOT
<object class="content-web-flash" width="700px" height="394px" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000">
<param value="res_site/swf/YohoodPlayer.swf?url=url" name="movie" /><param value="high" name="quality" />
<param value="res_site/swf/YohoodPlayer.swf?url=
video_
url" name="movie" /><param value="high" name="quality" />
<param value="#ffffff" name="bgcolor" />
<param name="allowFullScreen" value="true" />
<param value="always" name="allowScriptAccess" />
<param value="transparent" name="wmode" />
<embed align="middle" style="width:700px;height:394px;"
allowscriptaccess="always" loop="false" quality="high" src="res_site/swf/YohoodPlayer.swf?url=url"
allowscriptaccess="always" loop="false" quality="high" src="res_site/swf/YohoodPlayer.swf?url=
video_
url"
width="0" height="0" />
</object>
EOT;
$html
=
str_replace
(
'res_site'
,
SITE_RES
,
$html
);
$html
=
str_replace
(
'url'
,
$video
,
$html
);
$html
=
str_replace
(
'
video_
url'
,
$video
,
$html
);
$content
.=
'<br/>'
.
$html
;
}
$data
=
array
(
'title'
=>
$title
,
'content'
=>
$content
,
'pics'
=>
implode
(
'|'
,
$pics
),
'tag'
=>
$tag
,
...
...
@@ -213,4 +212,4 @@ EOT;
}
return
$this
->
returnJson
(
true
,
200
,
$list
);
}
}
\ No newline at end of file
}
...
...
Please
register
or
login
to post a comment