コード例 #1
0
    /**
     * 文章页右侧生成软件装机必备(软件频道) wuhw add 2015-02-25
     * */
    public static function getSoftZhuangji($array)
    {
        $padStr = '';
        $mobStr = '';
        $pcStr = '';
        $paramArr = array('moduleids' => 17093, 'limit' => 'limit 0,12', 'orderby' => ' and digest="平板软件" order by date desc', 'getimageflag' => '1', 'len' => '10');
        $rows = PageHelper::getModuleArt($paramArr);
        if ($rows) {
            foreach ($rows as $row) {
                $padStr .= '<li><a href="' . $row['url'] . '" ' . $row['title_tmp'] . '><img src="' . $row['pic_src'] . '" width="32" height="32" alt="' . $row['ftitle'] . '"><span>' . $row['title'] . '</span></a></li>';
            }
        }
        $paramArr = array('moduleids' => 17093, 'limit' => 'limit 0,12', 'orderby' => ' and digest="手机软件" order by date desc', 'getimageflag' => '1', 'len' => '10');
        $rows = PageHelper::getModuleArt($paramArr);
        if ($rows) {
            foreach ($rows as $row) {
                $mobStr .= '<li><a href="' . $row['url'] . '" ' . $row['title_tmp'] . '><img src="' . $row['pic_src'] . '" width="32" height="32" alt="' . $row['ftitle'] . '"><span>' . $row['title'] . '</span></a></li>';
            }
        }
        $paramArr = array('moduleids' => 17093, 'limit' => 'limit 0,12', 'orderby' => ' and digest="PC软件" order by date desc', 'getimageflag' => '1', 'len' => '10');
        $rows = PageHelper::getModuleArt($paramArr);
        if ($rows) {
            foreach ($rows as $row) {
                $pcStr .= '<li><a href="' . $row['url'] . '" ' . $row['title_tmp'] . '><img src="' . $row['pic_src'] . '" width="32" height="32" alt="' . $row['ftitle'] . '"><span>' . $row['title'] . '</span></a></li>';
            }
        }
        $str = '
        		<div class="module mobile-app">
					<div class="module-header"><h3>装机必备</h3></div>
					<ul class="rank-tab switch clearfix">
						<li class="first current" rel="tab_diy_1">PC软件</li>
						<li rel="tab_diy_2">手机软件</li>
						<li rel="tab_diy_3">平板软件</li>
					</ul>
					<ul id="tab_diy_1" class="app-list clearfix">
						' . $pcStr . '
					</ul>
	        		<ul id="tab_diy_2" class="app-list clearfix" style="display:none">
						' . $mobStr . '
					</ul>
        			<ul id="tab_diy_3" class="app-list clearfix" style="display:none">
						' . $padStr . '
					</ul>
					<div class="my-diy-soft"><a href="http://xiazai.zol.com.cn/zj/">晒一晒我的装机软件<span></span></a></div>
				</div>';
        if ($array['classId'] == '228' || $array['classId'] == '372') {
            $str .= '<div class="weibo-follow">
                <iframe id="weiboFollowButton" width="125" height="24" frameborder="0" allowtransparency="true" marginwidth="0" marginheight="0" scrolling="no" border="0" .src="http://widget.weibo.com/relationship/followbutton.php?language=zh_cn&width=125&height=24&uid=1747383115&style=2&btn=red&dpc=1"></iframe>
            </div>';
        } else {
            $str .= '<div class="module">
                <div class="module-header"><h3>新浪微博</h3></div>
                <div class="weibo-follow" style="display:none"></div>
                <iframe width="298" height="550" class="share_self" frameborder="0" scrolling="no"
                src="http://widget.weibo.com/weiboshow/index.php?language=&width=280&height=550&fansRow=2&ptype=1&speed=0&skin=-1&isTitle=0&noborder=0&isWeibo=1&isFans=0&uid=1718473917&verifier=8ef712fb&colors=d9e4f3,ffffff,666666,00009c,ecfbfd&dpc=1"></iframe>
            </div>';
        }
        return $str;
    }