示例#1
0
        if (null == $review) {
            $review = array();
        }
        printView('admin/view/review.html.php', '评价管理');
        exit;
    }
    if (isset($_GET['wechatConfig'])) {
        printView('admin/view/wechatConfig.html.php', '微信公众平台');
        exit;
    }
    if (isset($_GET['logout'])) {
        //登出
        session_unset();
        include 'view/login.html.php';
        exit;
    }
    $frontImg = pdoQuery('ad_tbl', null, array('category' => 'banner'), null);
    printView('admin/view/admin_index.html.php');
    exit;
} else {
    if (isset($_GET['login'])) {
        if (md5($_POST['adminName']) . md5($_POST['password']) == '9f6c470eab19fdca07401196068f78d554b51a86e539d9f8f711e67826ea60d5') {
            $_SESSION['login'] = 1;
            $frontImg = pdoQuery('ad_tbl', null, array('category' => 'banner'), null);
            printView('admin/view/admin_index.html.php');
        }
        exit;
    }
    include 'view/login.html.php';
    exit;
}
示例#2
0
文件: consle.php 项目: btbj/wechat
    }
    if (isset($_GET['del_guess_tbl'])) {
        $sql = 'delete from guess_tbl where weixin_id="' . $_SESSION['weixinId'] . '"';
        $pdo->exec($sql);
        header('location: index.php');
    }
    if (isset($_GET['modultest'])) {
        //功能测试块
        printView('/admin/view/newsEdit.html.php', '测试页');
        //        unlink("../user_img/gh_904600228e98/eElEEzrE53tgVvwL*");
        exit;
    }
    if (isset($_GET['getContact'])) {
        $query = pdoQuery('guess_tbl', null, array('weixin_id' => $_SESSION['weixinId']), ' order by correct_try desc, update_time asc limit 20');
        printView('/admin/view/query.html.php', '自动回复设置');
    }
    if (isset($_GET['kfManage'])) {
        $data = getKFinf();
        $dataArray = json_decode($data, true);
        printView('/admin/view/kfManage.html.php', '客服管理');
        exit;
    }
} else {
    include '../login/index.php';
}
/**
 * Created by PhpStorm.
 * User: godlee
 * Date: 2015/4/21
 * Time: 12:31
 */
示例#3
0
文件: index.php 项目: btbj/wechat
<?php

$mypath = $_SERVER['DOCUMENT_ROOT'] . '/wechat';
include_once $mypath . '/includes/magicquotes.inc.php';
include_once $mypath . '/includes/db.inc.php';
include_once $mypath . '/includes/helpers.inc.php';
session_start();
//date_default_timezone_set('Asia/Shanghai');
if (isset($_SESSION['login']) && $_SESSION['login']) {
    $query = pdoQuery('user_tbl', array('token'), array('weixin_id' => $_SESSION['weixinId']), ' limit 1');
    $row = $query->fetch();
    $token = $row['token'];
    printView('/admin/view/index.html.php', '控制器');
} else {
    header('location: ../login/index.php');
}
示例#4
0
文件: autoReply.php 项目: btbj/wechat
            foreach ($mediaList['item'] as $row) {
                $allList[] = json_encode($row, JSON_UNESCAPED_UNICODE);
            }
        }
        if (isset($_POST['content'])) {
            $_POST['key_word'] = trim($_POST['key_word']);
            $key = $_POST['key_word'] == '' ? '.' : preg_replace('/,|,/', '\\|', $_POST['key_word']);
            $content = addslashes($_POST['content']);
            switch ($_POST['type']) {
                case 'news':
                    $postjsondata = json_encode(array('media_id' => $_POST['content']));
                    $content = getMedia($postjsondata);
                    $content = addslashes($content);
                    break;
            }
            pdoInsert('default_reply_tbl', array('weixin_id' => $_SESSION['weixinId'], 'reply_type' => $_POST['type'], 'key_word' => $key, 'content' => $content), ' ON DUPLICATE KEY UPDATE content="' . $content . '"');
            header('location: ?auto_reply=1');
        }
        if (isset($_GET['deleteAutoReply'])) {
            $sql = 'delete from default_reply_tbl where weixin_id="' . $_SESSION['weixinId'] . '" and id=' . $_GET['deleteAutoReply'];
            $pdo->exec($sql);
            header('location: ?auto_reply=1');
        }
        $query = pdoQuery('default_reply_tbl', null, array('weixin_id' => $_SESSION['weixinId']), null);
        printView('/admin/view/autoreply.html.php', '自动回复设置');
    }
    if (isset($_GET['getDefultReply'])) {
        reflashAutoReply();
        header('location: ?auto_reply=1');
    }
}