commit | author | age
|
2207d6
|
1 |
<?php |
W |
2 |
error_reporting(E_ALL & ~E_NOTICE); |
|
3 |
defined('IN_IA') or exit('Access Denied'); |
|
4 |
|
|
5 |
class Zjhj_bdModule extends WeModule |
|
6 |
{ |
|
7 |
public function welcomeDisplay() |
|
8 |
{ |
|
9 |
$entry = '/web/index.php'; |
|
10 |
if (file_exists(__DIR__ . $entry)) { |
|
11 |
global $_W; |
|
12 |
$wUser = [ |
|
13 |
'uid' => $_W['user']['uid'], |
|
14 |
'name' => $_W['user']['name'], |
|
15 |
'username' => $_W['user']['username'], |
|
16 |
]; |
|
17 |
$wAccount = [ |
|
18 |
'acid' => $_W['account']['acid'], |
|
19 |
'name' => $_W['account']['name'], |
|
20 |
]; |
|
21 |
|
|
22 |
if ($wUser['name'] === null || $wUser['name'] === '') $wUser['name'] = $wUser['username']; |
|
23 |
|
|
24 |
require __DIR__ . '/vendor/autoload.php'; |
|
25 |
$app = new app\core\WebApplication(); |
|
26 |
|
|
27 |
$app->session->set('we7_user', $wUser); |
|
28 |
$app->session->set('we7_account', $wAccount); |
|
29 |
|
|
30 |
$uri = $_W['siteroot'] . 'addons/' . $_W['current_module']['name'] . $entry . '?r=mall/we7-entry/login'; |
|
31 |
header('Location: ' . $uri); |
|
32 |
die(); |
|
33 |
} else { |
|
34 |
die('应用入口文件缺失,请联系开发者处理!'); |
|
35 |
} |
|
36 |
} |
|
37 |
} |