示例#1
0
 * Weizan is NOT a free software, it under the license terms, visited http://www.qdaygroup.com/ for more details.
 */
defined('IN_IA') or exit('Access Denied');
$dos = array('shortcut');
$do = in_array($do, $dos) ? $do : 'shortcut';
if ($do == 'shortcut') {
    $templates = array();
    $path = IA_ROOT . '/app/themes/quick';
    if (is_dir($path)) {
        if ($handle = opendir($path)) {
            while (false !== ($templatepath = readdir($handle))) {
                $ext = pathinfo($templatepath);
                $ext = $ext['extension'];
                if ($templatepath != '.' && $templatepath != '..' && !empty($ext)) {
                    $pathinfo = pathinfo($templatepath);
                    $templates[] = $pathinfo['filename'];
                }
            }
        }
    }
    $template = $_GPC['file'];
    $template = in_array($template, $templates) ? $template : 'default';
    load()->model('app');
    $_W['quickmenu']['menus'] = app_navs('shortcut', $multiid);
    if (empty($_W['quickmenu']['menus'])) {
        $_W['quickmenu']['menus'] = array(array('name' => '菜单一', 'css' => array('icon' => array('icon' => 'fa-home'))), array('name' => '菜单二', 'css' => array('icon' => array('icon' => 'fa-book'))), array('name' => '菜单三', 'css' => array('icon' => array('icon' => 'fa-pencil'))), array('name' => '菜单四', 'css' => array('icon' => array('icon' => 'fa-cog'))), array('name' => '菜单五', 'css' => array('icon' => array('icon' => 'fa-flag'))));
    }
    $_W['quickmenu']['template'] = '../quick/' . $template;
    template('../default/common/header');
    template('../default/common/footer');
}
示例#2
0
<?php

/**
 * [WeEngine System] Copyright (c) 2014 WE7.CC
 * WeEngine is NOT a free software, it under the license terms, visited http://www.we7.cc/ for more details.
 */
defined('IN_IA') or exit('Access Denied');
load()->model('app');
$title = $_W['account']['name'] . '微站';
$navs = app_navs('profile');
load()->func('tpl');
$profile = mc_fetch($_W['member']['uid']);
if (!empty($_W['openid'])) {
    $map_fans = pdo_fetchcolumn('SELECT tag FROM ' . tablename('mc_mapping_fans') . ' WHERE uniacid = :uniacid AND openid = :openid', array(':uniacid' => $_W['uniacid'], ':openid' => $_W['openid']));
    if (!empty($map_fans)) {
        if (is_base64($map_fans)) {
            $map_fans = base64_decode($map_fans);
        }
        if (is_serialized($map_fans)) {
            $map_fans = iunserializer($map_fans);
        }
        if (!empty($map_fans) && is_array($map_fans)) {
            empty($profile['nickname']) ? $data['nickname'] = $map_fans['nickname'] : '';
            empty($profile['gender']) ? $data['gender'] = $map_fans['sex'] : '';
            empty($profile['residecity']) ? $data['residecity'] = $map_fans['city'] ? $map_fans['city'] . '市' : '' : '';
            empty($profile['resideprovince']) ? $data['resideprovince'] = $map_fans['province'] ? $map_fans['province'] . '省' : '' : '';
            empty($profile['nationality']) ? $data['nationality'] = $map_fans['country'] : '';
            empty($profile['avatar']) ? $data['avatar'] = rtrim($map_fans['headimgurl'], '0') . 132 : '';
            if (!empty($data)) {
                mc_update($_W['member']['uid'], $data);
            }
示例#3
0
if ($name == 'index') {
    load()->model('site');
    $position = 1;
    $title = $_W['account']['name'];
    $navs = app_navs($position);
    $cover = pdo_fetch("SELECT description, title, thumb FROM " . tablename('cover_reply') . " WHERE uniacid = :uniacid AND module = 'wesite'", array(':uniacid' => $_W['uniacid']));
    $_share_content = $cover['description'];
    $title = $cover['title'];
    $_share_img = $cover['thumb'];
} elseif ($name == 'mc') {
    $title = '个人中心';
    $position = 2;
    if (empty($_W['uid']) && empty($_W['openid'])) {
        message('非法访问,请重新点击链接进入个人中心!');
    }
    $navs = app_navs($position);
    if (!empty($navs)) {
        foreach ($navs as $row) {
            $menus[$row['module']][] = $row;
        }
        foreach ($menus as $module => $row) {
            if (count($row) <= 2) {
                $menus['other'][$module] = $row;
                unset($menus[$module]);
            }
        }
    }
} elseif ($name == 'list') {
    header("Location: " . url('mobile/module/list', array('name' => 'site', 'uniacid' => $_W['uniacid'], 'cid' => $_GPC['cid'])));
    exit;
} elseif ($name == 'detail') {
示例#4
0
    $setting = pdo_fetch('SELECT styleid,id,quickmenu FROM ' . tablename('site_multi') . ' WHERE uniacid =:uniacid AND id = :id ', array(':uniacid' => $_W['uniacid'], ':id' => $setting['default_site']));
    $templates_id = pdo_fetchcolumn('SELECT templateid FROM ' . tablename('site_styles') . ' WHERE id = :id', array(':id' => $setting['styleid']));
    $template = pdo_fetch('SELECT * FROM ' . tablename('site_templates') . ' WHERE id = :id ', array(':id' => $templates_id));
    $sql = "SELECT rid FROM " . tablename('cover_reply') . ' WHERE `module` = :module AND uniacid = :uniacid AND multiid = :multiid';
    $pars = array();
    $pars[':module'] = 'site';
    $pars[':uniacid'] = $_W['uniacid'];
    $pars[':multiid'] = $setting['id'];
    $cover = pdo_fetch($sql, $pars);
    if (!empty($cover['rid'])) {
        $keywords = pdo_fetchall("SELECT content FROM " . tablename('rule_keyword') . " WHERE rid = :rid", array(':rid' => $cover['rid']));
    }
    load()->model('app');
    $home_navs = app_navs('home', $setting['id']);
    $profile_navs = app_navs('profile');
    $shortcut_navs = app_navs('shortcut', $setting['id']);
    $quickmenu = iunserializer($setting['quickmenu']);
    $quickmenu = !empty($quickmenu) ? $quickmenu : array();
    $slides = pdo_fetchall("SELECT * FROM " . tablename('site_slide') . " WHERE uniacid = '{$_W['uniacid']}' AND multiid = {$default_site}  ORDER BY displayorder DESC, id DESC ");
    foreach ($slides as $key => $value) {
        $slides[$key]['thumb'] = tomedia($value['thumb']);
    }
}
if ($do == 'mc') {
    $title = '会员功能概况';
    $accounts = uni_accounts($_W['uniacid']);
    foreach ($accounts as $acid => &$account) {
        $num = pdo_fetchcolumn('SELECT COUNT(fanid) FROM ' . tablename('mc_mapping_fans') . ' WHERE acid=:acid AND follow=1 ', array(':acid' => $acid));
        $account['fansnum'] = intval($num);
    }
    $uniaccount = uni_fetch();
示例#5
0
文件: home.ctrl.php 项目: hahamy/we7
<?php

/**
 * [WeEngine System] Copyright (c) 2014 WE7.CC
 * WeEngine is NOT a free software, it under the license terms, visited http://www.we7.cc/ for more details.
 */
defined('IN_IA') or exit('Access Denied');
load()->model('app');
$multiid = intval($_GPC['t']);
$title = $_W['page']['title'] . '微站';
$navs = app_navs('home', $multiid);
$share_tmp = pdo_fetch('SELECT title,description,thumb FROM ' . tablename('cover_reply') . ' WHERE uniacid = :aid AND multiid = :id', array(':aid' => $_W['uniacid'], ':id' => $multiid));
$_share['imgUrl'] = tomedia($share_tmp['thumb']);
$_share['desc'] = $share_tmp['description'];
$_share['title'] = $share_tmp['title'];
template('home/home');
示例#6
0
function init_quickmenus($multiid = 0)
{
    global $_W, $controller, $action;
    $quickmenu = pdo_fetchcolumn('SELECT quickmenu FROM ' . tablename('site_multi') . ' WHERE uniacid = :uniacid AND id = :id', array(':uniacid' => $_W['uniacid'], ':id' => $multiid));
    $quickmenu = iunserializer($quickmenu);
    if (!empty($quickmenu)) {
        $acl = array();
        $acl['home'] = array('home');
        if (is_array($acl[$controller]) && in_array($action, $acl[$controller]) || in_array(IN_MODULE, $quickmenu['enablemodule'])) {
            $tpl = !empty($quickmenu['template']) ? $quickmenu['template'] : 'default';
            $_W['quickmenu']['menus'] = app_navs('shortcut', $multiid);
            $_W['quickmenu']['template'] = '../quick/' . $tpl;
        }
    }
}