wangtengyu
2018-12-07 f459412e0dac4ed94106da043b4c6f8576bfe496
commit | author | age
3e083b 1 <?php
B 2 define('IN_ECS', true);
3 require(dirname(__FILE__) . '/includes/init.php');
4 require(ROOT_PATH . 'includes/cls_json.php');
5
6  if ($_SESSION['user_id'] > 0)
7  {
8         $GLOBALS['smarty']->assign('user_info', get_user_info());
9  }
10  else
11     {
12         if (!empty($_COOKIE['ECS']['username']))
13         {
14             $GLOBALS['smarty']->assign('ecs_username', stripslashes($_COOKIE['ECS']['username']));
15         }
16         $captcha = intval($GLOBALS['_CFG']['captcha']);
17         if (($captcha & CAPTCHA_LOGIN) && (!($captcha & CAPTCHA_LOGIN_FAIL) || (($captcha & CAPTCHA_LOGIN_FAIL) && $_SESSION['login_fail'] > 2)) && gd_version() > 0)
18         {
19             $GLOBALS['smarty']->assign('enabled_captcha', 1);
20             $GLOBALS['smarty']->assign('rand', mt_rand());
21         }
22     }
23 $output = $GLOBALS['smarty']->fetch('library/member_info.lbi');
24
25 $arr['memberinfo']=$output;
26
27 $json = new JSON;
28 echo $json->encode($arr);
29
30 ?>