Authored by whb

fixed bug

... ... @@ -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
}
... ...