Authored by whb

现场活动

... ... @@ -33,7 +33,10 @@ class Controller_Brand extends Controller_Abstract
break;
}
}
$info['link'] = 'openby:'.urlencode('yohobuy={"action":"go.brand","params":{"brand_id":"'.$yohobuyBrandId.'"}}');
if($client)
{
$info['link'] = 'openby:'.urlencode('yohobuy={"action":"go.brand","params":{"brand_id":"'.$yohobuyBrandId.'"}}');
}
}
$relas = Facade_Brand::getBrandNewsRelaByBrandID($id);
$news = array();
... ...
... ... @@ -7,7 +7,7 @@
<ul class="clearfix">
<?php $navs = current($this->view->navs);ksort($navs);
foreach($navs as $nav):
if(strtotime('2015-07-25 00:00:00') > $nav['timestamp']) continue;
if(strtotime('2015-07-25 23:59:00') > $nav['timestamp']) continue;
?>
<li
<?php if($nav['timestamp'] == $this->view->currentday && $nav['enable']) echo 'class="current"';
... ... @@ -19,7 +19,7 @@
</ul>
</div>
<div class="scene-content">
<?php if(strtotime('2015-07-25 23:59:00') > $this->view->currentday && time() < strtotime('2015-07-25 23:59:00')):?>
<?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">
... ...
... ... @@ -88,7 +88,7 @@
<td><input type="text" id="name" name="name" maxLength="20"/>
<input type="hidden" id="id" name="id"/>
</td>
<td>LOGO(300x198)<span class="text-error"> * </span></td>
<td>LOGO(580x383)<span class="text-error"> * </span></td>
<td>
<span id="upload_logo" key="<?php echo $this->view->key?>"></span>
<button class="btn btn-info" type="button">上传</button>
... ...
<?php $this->_extends('layout/admin_layout');?>
<?php $this->_block('main');?>
<h4>主理人列表</h4>
<table class="table">
<caption style="text-align:left; padding-bottom:5px;">
<button class="btn" style="float:left;" id="add_star" href="javascript:void(0)">添加主理人</button>
<form method="post" class="form-search search_panel" style="text-align:right;">
<select class="span2" name="state" id="state_from">
<option value="1" <?php if($this->view->state=='1'){echo 'selected="selected"';}?>>展示</option>
<option value="0" <?php if($this->view->state=='0'){echo 'selected="selected"';}?>>关闭</option>
</select>
<div class="input-append">
<button type="submit" class="btn">搜索</button>
</div>
</form>
</caption>
<thead>
<td>编号</td>
<td>主理人名字</td>
<td>图片组</td>
<td style="width:300px">描述</td>
<td>品牌ID</td>
<td>新闻ID组</td>
<td>一句话</td>
<td>排序</td>
<td>操作</td>
</thead>
<?php if (empty($this->view->data)) :?>
<tr><td colspan="10" style="text-align: center">无记录</td></tr>
<?php else :?>
<?php foreach ($this->view->data as $star) :?>
<tr>
<td><?php echo $star['id']?></td>
<td><?php echo $star['name'];?></td>
<td title='<?php echo $star['pics']?>'>
<?php
$pics = json_decode($star['pics'],true);
foreach($pics as $pic)
{
if($pic['type']=='video')
{
echo '<button class="btn look_video">查看视频</button><span style="display:none">'.
'<embed src="'.$pic['url'].'" allowFullScreen="true" quality="high" width="390" height="294" align="middle" allowScriptAccess="always" type="application/x-shockwave-flash"></embed>'.
'</span>';
}
elseif($pic['type']=='pic')
{
$url = Lib_Images::getImageUrl($pic['url'],'0200x0150','fragmentimg');
echo '<img src="'.$url.'" width="40" height="30">';
}
}
?>
</td>
<td><?php echo $star['description'];?></td>
<td><?php echo $star['brand_id']?></td>
<td><?php echo $star['news_ids']?></td>
<td><?php echo $star['say']?></td>
<td><?php echo $star['seq']?></td>
<td><button id="look_one_<?php echo $star['id'];?>" class="btn look">编辑</button></td>
</tr>
<?php endforeach;?>
<?php endif;?>
</table>
<?php $this->_component('Common_Pagination',array(
'pagination' => $this->view->pagination,'show_count' =>true,
));?>
<div id="form_pan" admin="<?php echo $this->view->admin?>" style="display:none">
<table class="table table-bordered">
<tbody>
<tr>
<td>名字<span class="text-error"> * </span></td>
<td>
<input type="text" id="name" name="name" value=""/>
<input type="hidden" id="id" name="id"/>
</td>
<td>排序<span class="text-error"> * </span></td>
<td>
<input type="text" id="seq" name="seq" value=""/>
</td>
</tr>
<tr>
<td>图片组</td>
<td>
<span id="upload_pics" key="<?php echo $this->view->key;?>"></span>
<button class="btn btn-info" type="button">上传</button>
<input type="hidden" id="pics_val" name="pics_val" value=""/>
</td>
<td>视频</td>
<td>
<textarea rows="2" style="width:300px;" id="pics" name="pics" value=""></textarea>
</td>
</tr>
<tr>
<td>描述</td>
<td colspan="3">
<textarea rows="1" style="margin-left: 0px; margin-right: 0px; width: 605px;" id="description" name="description"></textarea>
</td>
</tr>
<tr >
<td>品牌ID</td>
<td>
<input type="text" id="brand_id" name="brand_id" />
</td>
<td>新闻ID组</td>
<td>
<input type="text" id="news_ids" name="news_ids" />
</td>
</tr>
<tr>
<td>状态</td>
<td>
<select class="span2" id="state">
<option value="1" selected="selected">展示</option>
<option value="0">关闭</option>
</select>
</td>
<td>一句话</td>
<td>
<input type="text" id="say"/>
</td>
</tr>
</tbody>
</table>
</div>
<?php $this->_endblock();?>
<?php $this->_block('js');?>
<?php $this->_js('star.js', array(
SITE_JS . '/lib/seajs.js',
));?>
<script type="text/javascript">
seajs.use('admin/star');
</script>
<?php $this->_endblock();?>
<?php $this->_extends('layout/admin_layout');?>
<?php $this->_block('main');?>
<h4>SNAP列表</h4>
<table class="table">
<caption style="text-align:left; padding-bottom:5px;">
<button class="btn" style="float:left;" id="add_snap" href="javascript:void(0)">添加SNAP</button>
</caption>
<thead>
<td>编号</td>
<td>图片</td>
<td>文字</td>
<td>创建时间</td>
<td>操作</td>
</thead>
<?php if (empty($this->view->data)) :?>
<tr><td colspan="10" style="text-align: center">无记录</td></tr>
<?php else :?>
<?php foreach ($this->view->data as $snap) :?>
<tr>
<td><?php echo $snap['id']?></td>
<td>
<?php
$url = Lib_Images::getImageUrl($snap['pic'],'0200x0150','fragmentimg');
echo '<img src="'.$url.'" rel="'.$snap['pic'].'" width="40" height="30">';
?>
</td>
<td><?php echo $snap['text']?></td>
<td><?php echo $snap['create_time'];?></td>
<td><button id="look_one_<?php echo $snap['id'];?>" class="btn look">编辑</button>
<button val="<?php echo $snap['id'];?>" class="btn btn-danger del">删除</button>
</td>
</tr>
<?php endforeach;?>
<?php endif;?>
</table>
<?php $this->_component('Common_Pagination',array(
'pagination' => $this->view->pagination,'show_count' =>true,
));?>
<div id="form_pan" admin="<?php echo $this->view->admin?>" style="display:none">
<table class="table table-bordered">
<tbody>
<tr>
<td>图片<span class="text-error"> * </span></td>
<td>
<span id="upload_pics" key="<?php echo $this->view->key;?>"></span>
<button class="btn btn-info" type="button">上传</button>
<br>
<input type="hidden" id="pic" name="pic" value=""/>
<img src=''/>
<input type="hidden" id="id" name="id"/>
</td>
<td>文本</td>
<td>
<input type="text" id="text" name="text" value=""/>
</td>
</tr>
<tr>
<td>创建时间</td>
<td colspan="3">
<input type="text" readonly="readonly" class='span3 Wdate' id="create_time" name="create_time" />
</td>
</tr>
</tbody>
</table>
</div>
<?php $this->_endblock();?>
<?php $this->_block('js');?>
<?php $this->_js('star.js', array(
SITE_JS . '/lib/seajs.js',
));?>
<script type="text/javascript" src="<?php echo SITE_JS?>/lib/ui/date/WdatePicker.js"></script>
<script type="text/javascript">
seajs.use('admin/snap');
</script>
<?php $this->_endblock();?>
<?php $this->_extends('layout/admin_layout');?>
<?php $this->_block('main');?>
<h4>视频列表</h4>
<table class="table">
<caption style="text-align:left; padding-bottom:5px;">
<button class="btn" style="float:left;" id="add_video" href="javascript:void(0)">添加视频</button>
</caption>
<thead>
<td>编号</td>
<td>标题</td>
<td>图片</td>
<td>创建时间</td>
<td>操作</td>
</thead>
<?php if (empty($this->view->data)) :?>
<tr><td colspan="10" style="text-align: center">无记录</td></tr>
<?php else :?>
<?php foreach ($this->view->data as $video) :?>
<tr>
<td><?php echo $video['id']?></td>
<td><?php echo $video['title']?></td>
<td relaurl="<?php echo $video['pic'];?>">
<img width="80" height="60" src="<?php echo $video['pic_s']?>"/>
<button class="btn look_v">查看</button>
<span class="video_url" style="display:none">
<embed src="<?php echo $video['url'];?>" allowFullScreen="true" quality="high" width="390" height="294" align="middle" allowScriptAccess="always" type="application/x-shockwave-flash"></embed>
</span>
</td>
<td><?php echo date('Y-m-d H:i:s', $video['create_time']);?></td>
<td><button id="look_one_<?php echo $video['id'];?>" class="btn look">查看</button><button val="<?php echo $video['id'];?>" class="btn btn-danger del">删除</button></td>
</tr>
<?php endforeach;?>
<?php endif;?>
</table>
<?php $this->_component('Common_Pagination',array(
'pagination' => $this->view->pagination,'show_count' =>true,
));?>
<div id="form_pan" admin="<?php echo $this->view->admin?>" style="display:none">
<table class="table table-bordered">
<tbody>
<tr>
<td>标题<span class="text-error"> * </span></td>
<td colspan="3">
<input type="hidden" id="id" name="id"/>
<input type="text" style="width:605px;" id="title" name="title" value=""/>
</td>
<tr>
<tr>
<td>视频地址<span class="text-error"> * </span></td>
<td colspan="3">
<textarea row=3 style="width:605px;" id="url" name="url" value=""></textarea>
</td>
<tr>
<tr>
<td>创建时间<span class="text-error"> * </span></td>
<td colspan="3">
<input style="width:605px;" readonly="readonly" class='span3 Wdate' id="create_time" name="create_time" value=""/>
</td>
<tr>
<td>图片</td>
<td colspan="3">
<span id="upload_pic"></span>
<button class="btn btn-info" type="button">上传</button>
<input type="hidden" id="pic" name="pic" key="<?php echo $this->view->key;?>"/>
<img src="" width="80" height="60"/>
</td>
</tr>
</tbody>
</table>
</div>
<?php $this->_endblock();?>
<?php $this->_block('js');?>
<?php $this->_js('feedback.js', array(
SITE_JS . '/lib/seajs.js',
));?>
<script type="text/javascript" src="<?php echo SITE_JS?>/lib/ui/date/WdatePicker.js"></script>
<script type="text/javascript">
seajs.use('admin/video');
</script>
<?php $this->_endblock();?>