Authored by microTT

Merge branch 'develop' of http://git.dev.yoho.cn/web/yohood into develop

... ... @@ -30,6 +30,14 @@ define('admin/partner',function(require, exports)
var pic = $("#pic").val();
var description = $("#description").val();
var url = $("#url").val();
if (!name) {
box.alert('亲,名称不能为空!');
return false;
}
if (!pic) {
box.alert('亲,图片不能为空!');
return false;
}
$.ajax
({
type:"post",
... ... @@ -67,18 +75,6 @@ define('admin/partner',function(require, exports)
}
exports.info = function()
{
$("#box_confirm_ok").bind("click",function() {
var titleJian = $('#name').val();
if (!titleJian) {
box.alert('亲,名称不能为空!');
return false;
}
var img = $('#upload_pic').val();
if (!img) {
box.alert('亲,图片不能为空!');
return false;
}
});
//添加
$("#add_partner").bind("click",function()
{
... ...
... ... @@ -288,12 +288,12 @@ EOT;
if ($pagination['current'] != $pagination['first'])
{
$url = $this->getUrl($pagination['prev']);
$out .= "<a href=\"{$url}\" class=\"$prev_class\" p='".$pagination['prev']."'>{$prev_label}</a>\n";
$out .= "<a href=\"{$url}\" class=\"$prev_class\" p='".$pagination['prev']."' style=\"color:black\">{$prev_label}</a>\n";
}
if ($pagination['current'] != $pagination['last'])
{
$url = $this->getUrl( $pagination['next']);
$out .= "<a href=\"{$url}\" class=\"$next_class\" p='".$pagination['next']."'>{$next_label}</a>\n";
$out .= "<a href=\"{$url}\" class=\"$next_class\" p='".$pagination['next']."' style=\"color:black\">{$next_label}</a>\n";
}
return $out."</div>\n";
}
... ... @@ -313,7 +313,7 @@ EOT;
/*$url_args['page'] = $pagination['prev'];
$url = url($udi, $url_args);*/
$url = $this->getUrl($pagination['prev']);
$out .= "<a href=\"{$url}\" class=\"$prev_class\" p='".$pagination['prev']."' >{$prev_label}</a>\n";
$out .= "<a href=\"{$url}\" class=\"$prev_class\" p='".$pagination['prev']."' style=\"color:black\">{$prev_label}</a>\n";
}
$base = $pagination['first'];
$current = $pagination['current'];
... ... @@ -349,7 +349,7 @@ EOT;
$in = $i + 1 - $base;
//$url = url($udi, $url_args);
$url = $this->getUrl( $i);
$out .= "<a href=\"{$url}\" class=\"$link_class\" p='{$i}'>{$in}</a>\n";
$out .= "<a href=\"{$url}\" class=\"$link_class\" p='{$i}' style=\"color:black\">{$in}</a>\n";
}
if ($i < $begin)
{
... ... @@ -368,7 +368,7 @@ EOT;
{
//$url = url($udi, $url_args);
$url = $this->getUrl( $i);
$out .= "<a href=\"{$url}\" class=\"$link_class\" p='$i'>{$in}</a>\n";
$out .= "<a href=\"{$url}\" class=\"$link_class\" p='$i' style=\"color:black\">{$in}</a>\n";
}
}
if ($pagination['last'] - $end > $slider)
... ... @@ -382,7 +382,7 @@ EOT;
$in = $i + 1 - $base;
//$url = url($udi, $url_args);
$url = $this->getUrl( $i);
$out .= "<a href=\"{$url}\" class=\"$link_class\" p='$i'>{$in}</a>\n";
$out .= "<a href=\"{$url}\" class=\"$link_class\" p='$i' style=\"color:black\">{$in}</a>\n";
}
// 2012/09/08 hf: 修改 bug #12470 最后一页不显示"下一页"
if ($pagination['current'] != $pagination['last'])
... ... @@ -390,7 +390,7 @@ EOT;
//$url_args['page'] = $pagination['next'];
//$url = url($udi, $url_args);
$url = $this->getUrl( $pagination['next']);
$out .= "<a href=\"{$url}\" class=\"$next_class\" p='".$pagination['next']."' >{$next_label}</a>\n";
$out .= "<a href=\"{$url}\" class=\"$next_class\" p='".$pagination['next']."' style=\"color:black\">{$next_label}</a>\n";
}
//检测是否需要增加
if ($this->get('form') && $pagination['options']['model'] == self::Model_Default)
... ... @@ -404,7 +404,7 @@ EOT;
<div class='pagination-form'>
<form action="{$formurl}" method="GET">
<span class="btn38_page">到</span>
<input type="text" class="btn39_inp" name="page" maxLength="10"
<input type="text" class="btn39_inp" name="page" maxLength="10"
onKeypress="if (event.keyCode < 48 || event.keyCode > 57) event.returnValue = false;"
onblur="if(isNaN(this.value)) this.value='1'">
<span class="btn38_page1">页</span>
... ...
... ... @@ -99,8 +99,12 @@ class Controller_Default extends Controller_Abstract
$page->setOptions(array('afterAppend' => 'setLayout'));
list($offset, $limit) = $page->getLimit();
$list = Facade_News::getList(array(), $offset, $limit, array('手机视频'));
$newtag=array("品牌资讯","活动介绍","亮点活动","限量商品");
foreach($list as $key=>$news){
$list[$key]['thumb']=Lib_Images::getImageUrl($news['thumb'], 'source','fragmentimg');
if(!in_array($news['tag'],$newtag)){
$list[$key]['tag']='品牌资讯';
}
}
$type = $this->_request->query('type', null);
if($type==1){
... ...
... ... @@ -43,7 +43,7 @@
<a href="javascript:;" target="_blank">潮流嘉年华</a>
</li>
</ul>
<a class="current" href="/default/contactus" style="float:right">CONTACT</a>
<a class="current" href="/default/contactus" style="float:right;margin-right:10px;color:#626262">CONTACT</a>
</div>
<?php
$_ctx = Framework_YHttpRequest::instance();
... ...
... ... @@ -84,7 +84,7 @@ a.btn
<td>网页版缩图</td>
<td colspan="2">
<span id="upload_pic" key="<?php echo $this->view->key?>"></span>
<button class="btn btn-info" type="button">上传</button> (图片尺寸:342*420px)
<button class="btn btn-info" type="button">上传</button> (图片尺寸:342*218px)
<input type="hidden" id="thumb" name="thumb" value="<?php echo $this->view->info['thumb']?>" />
<div id='picdiv'>
<?php if ($this->view->info['thumb']):?>
... ...
... ... @@ -108,7 +108,7 @@ EOL;
foreach ($templates as $temp) {
preg_match_all("/<li>/i", $temp, $liLen, PREG_SET_ORDER);
if(count($liLen) > 8)
if(count($liLen) >= 8)
{
$temp = preg_replace('@<div class="(.*)">(.+)<\/div>@isU', "\\2", $temp);
$template .='<div class="box big-size clearfix">'.$temp.'</div>';
... ... @@ -116,7 +116,7 @@ EOL;
else
{
$temp = preg_replace('@<div class="(.*)">(.+)<\/div>@isU', "\\2", $temp);
$template .='<div class="box big-size clearfix">'.$temp.'</div>';
$template .='<div class="box big-size clearfix">'.$temp.'</div>';
}
}
... ... @@ -188,8 +188,10 @@ EOL;
//随机选择出两个元素
$temp=array_rand($banners,2);
foreach($temp as $val){
$banners[]=$banners[$val];
$mergebanners[]=$banners[$val];
}
$banners=array();
$banners=$mergebanners;
}
if($len >=3 && is_numeric($len)&($len&1)){
$temp = array_slice($banners, 0,1);
... ...
... ... @@ -13,7 +13,6 @@
<a href="<?php echo url('news/index',array('tag' => $tag['tag']))?>">
<?php echo sprintf("%s(%s)", $tag['tag'] == '' ? '全部资讯': $tag['tag'], $tag['num']); ?>
</a>
</li>
<?php endforeach;?>
</ul>
... ...
... ... @@ -44,7 +44,15 @@ $width = 342;
echo "limited-edition";
break;
}
?>" href="/news/index/tag/<?php echo $news['tag']?>"><?php echo $news['tag']?></a>
?>" href="/news/index/tag/<?php echo $news['tag']?>">
<?php
$newtag=array("品牌资讯","活动介绍","亮点活动","限量商品");
if(!in_array($news['tag'],$newtag)){
$news['tag']='品牌资讯';
}
echo $news['tag'];
?>
</a>
<span class="item-time"><?php $en = array('01'=>'January','02'=>'February','03'=>'March','04'=>'April','05'=>'May','06'=>'June','07'=>'July','08'=>'August','09'=>'September','10'=>'October','11'=>'November','12'=>'December');$m=date('m', $news['create_time']);echo $en[$m]?>&nbsp;<?php ECHO $m=date('d,Y', $news['create_time'])?></span>
</div>
<div class="content">
... ...