コード例 #1
0
 /**
  * 友情链接首页
  * @date 2010-8-4
  * @time 上午09:44:55
  */
 function index()
 {
     //友情链接首页
     $dao = D("Flink");
     $condition = array();
     $condition['ischeck'] = '1';
     $data = $dao->where($condition)->order("sortrank  ASC")->findAll();
     $other = array();
     $partner = array();
     foreach ($data as $v) {
         if ($v['itype'] != "Partner Links") {
             if (empty($other[$v['itype']])) {
                 $other[$v['itype']]['text'] = '';
             }
             $other[$v['itype']]['name'] = $v['itype'];
             $other[$v['itype']]['text'] .= '<a href="' . $v['url'] . '" target=\\"_blank\\"><img height="36" width="130" src="' . picurl($v['logo']) . '" alt="' . $v['webname'] . '"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';
         } else {
             $partner[] = $v;
         }
     }
     $this->assign("other", $other);
     $this->assign("partner", $partner);
     $page = array();
     $page['title'] = 'Partner Links  -  BeingfunChina 缤纷中国';
     $page['keywords'] = "Partner,Links ";
     $page['description'] = "Partner Links in BeingfunChina";
     $this->assign('page', $page);
     $this->display();
 }
コード例 #2
0
ファイル: common.php プロジェクト: putera99/iic-classified
function toImg($img, $type)
{
    if ($type == 'event') {
        $img = empty($img) ? __PUBLIC__ . '/img/bz.gif' : $img;
    } elseif ($type == 'biz') {
        $img = empty($img) ? __PUBLIC__ . '/img/bz2.gif' : $img;
    } elseif ($type == 'group') {
        $img = empty($img) ? __PUBLIC__ . '/img/bz3.gif' : $img;
    } elseif ($type == 'classifieds') {
        $img = empty($img) ? __PUBLIC__ . '/img/bz5.gif' : $img;
    } elseif ($type == 'cityguide') {
        $img = empty($img) ? __PUBLIC__ . '/img/bz4.gif' : $img;
    }
    return picurl($img);
}