Ejemplo n.º 1
0
<?php

/**
 * 接口文件
 * 
 * [WeEngine System] Copyright (c) 2013 WE7.CC
 */
define('IN_API', true);
require 'source/bootstrap.inc.php';
$engine = new WeEngine();
$engine->start();
Ejemplo n.º 2
0
}
if (empty($_W['account'])) {
    exit('initial error hash or id');
}
if (empty($_W['account']['token'])) {
    exit('initial missing token');
}
$_W['acid'] = $_W['account']['acid'];
$_W['from'] == 'api';
$_W['uniacid'] = $_W['account']['uniacid'];
$_W['uniaccount'] = uni_fetch($_W['uniacid']);
$_W['account']['groupid'] = $_W['uniaccount']['groupid'];
$_W['account']['qrcode'] = "{$_W['attachurl']}qrcode_{$_W['acid']}.jpg?time={$_W['timestamp']}";
$_W['account']['avatar'] = "{$_W['attachurl']}headimg_{$_W['acid']}.jpg?time={$_W['timestamp']}";
$_W['modules'] = uni_modules();
$engine = new WeEngine();
$settings = setting_load('copyright');
if (!empty($settings['copyright']['status'])) {
    $engine->died('抱歉,站点已关闭,关闭原因:' . $settings['copyright']['reason']);
}
if ($_W['isajax'] && $_W['ispost'] && $_GPC['flag'] == 1) {
    $engine->encrypt();
}
if ($_W['isajax'] && $_W['ispost'] && $_GPC['flag'] == 2) {
    $engine->decrypt();
}
load()->func('compat.biz');
$_W['isajax'] = false;
$engine->start();
class WeEngine
{
Ejemplo n.º 3
0
}
if (empty($_W['account'])) {
    exit('initial error hash or id');
}
if (empty($_W['account']['token'])) {
    exit('initial missing token');
}
$_W['debug'] = intval($_GPC['debug']);
$_W['acid'] = $_W['account']['acid'];
$_W['uniacid'] = $_W['account']['uniacid'];
$_W['uniaccount'] = uni_fetch($_W['uniacid']);
$_W['account']['groupid'] = $_W['uniaccount']['groupid'];
$_W['account']['qrcode'] = $_W['attachurl'] . 'qrcode_' . $_W['acid'] . '.jpg?time=' . $_W['timestamp'];
$_W['account']['avatar'] = $_W['attachurl'] . 'headimg_' . $_W['acid'] . '.jpg?time=' . $_W['timestamp'];
$_W['modules'] = uni_modules();
$engine = new WeEngine();
if (!empty($_W['setting']['copyright']['status'])) {
    $engine->died('抱歉,站点已关闭,关闭原因:' . $_W['setting']['copyright']['reason']);
}
if (!empty($_W['uniaccount']['endtime']) && TIMESTAMP > $_W['uniaccount']['endtime']) {
    $engine->died('抱歉,您的公众号已过期,请及时联系管理员');
}
if ($_W['isajax'] && $_W['ispost'] && $_GPC['flag'] == 1) {
    $engine->encrypt();
}
if ($_W['isajax'] && $_W['ispost'] && $_GPC['flag'] == 2) {
    $engine->decrypt();
}
load()->func('compat.biz');
$_W['isajax'] = false;
$engine->start();