コード例 #1
0
ファイル: site.php プロジェクト: alextiannus/wormwood_wechat
 public function doMobilealbum()
 {
     global $_W, $_GPC;
     $_W['styles'] = mobile_styles();
     $pindex = max(1, intval($_GPC['page']));
     $psize = 20;
     $result['list'] = pdo_fetchall("SELECT * FROM " . tablename('we7car_album') . " WHERE weid = '{$_W['weid']}' AND isview = '1' ORDER BY displayorder DESC LIMIT " . ($pindex - 1) * $psize . ',' . $psize);
     $total = pdo_fetchcolumn('SELECT COUNT(*) FROM ' . tablename('we7car_album') . " WHERE isview = '1'");
     $result['pager'] = pagination($total, $pindex, $psize);
     include $this->template('album_list');
 }
コード例 #2
0
<?php

/**
 * 微站频道
 * [WDL] Copyright (c) 2013 wormwood.com
 */
defined('IN_IA') or exit('Access Denied');
if (!empty($_GPC['styleid'])) {
    $_W['account']['styleid'] = $_GPC['styleid'];
    $_W['account']['template'] = pdo_fetchcolumn("SELECT name FROM " . tablename('site_templates') . " WHERE id = '{$_W['account']['styleid']}'");
}
$_W['styles'] = mobile_styles();
$_W['account']['quickmenu'] = iunserializer($_W['account']['quickmenu']);
$_W['quickmenu']['template'] = !empty($_W['account']['quickmenu']['template']) ? '../quick/' . $_W['account']['quickmenu']['template'] : '../quick/default';
$_W['quickmenu']['menus'] = mobile_nav(3);
$channel = array('index', 'home', 'list', 'detail', 'album', 'photo');
$name = $_GPC['name'] && in_array($_GPC['name'], $channel) ? $_GPC['name'] : 'index';
if ($name == 'index') {
    include model('site');
    $position = 1;
    $navs = mobile_nav($position);
    $cover = pdo_fetch("SELECT description, title, thumb FROM " . tablename('cover_reply') . " WHERE weid = :weid AND module = 'wesite'", array(':weid' => $_W['weid']));
    $_share_content = $cover['description'];
    $title = $cover['title'];
    $_share_img = $cover['thumb'];
} elseif ($name == 'home') {
    $title = '个人中心';
    $position = 2;
    if (empty($_W['uid']) && empty($_W['fans']['from_user'])) {
        message('非法访问,请重新点击链接进入个人中心!');
    }