国内流行的内容管理系统(CMS)多端全媒体解决方案 https://www.dedebiz.com
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

68 lines
2.2KB

  1. <?php
  2. /**
  3. * @version $id:api.php 8:38 2010年7月9日 tianya $
  4. * @package DedeBIZ.User
  5. * @copyright Copyright (c) 2022 DedeBIZ.COM
  6. * @license https://www.dedebiz.com/license
  7. * @link https://www.dedebiz.com
  8. */
  9. define('AJAXLOGIN', TRUE);
  10. require_once(dirname(__FILE__)."/config.php");
  11. AjaxHead();
  12. $action = isset($action)? $action : '';
  13. if ($action === 'is_need_check_code') {
  14. $isNeed = $cfg_ml->isNeedCheckCode($userid);
  15. echo json_encode(array(
  16. "code" => 0,
  17. "msg" => "",
  18. "data" => array(
  19. "isNeed" => $isNeed,
  20. ),
  21. ));
  22. exit;
  23. } else {
  24. $format = isset($format) ? "json" : "";
  25. if (!$cfg_ml->IsLogin()) {
  26. if ($format === 'json') {
  27. echo json_encode(array(
  28. "code" => -1,
  29. "msg" => "尚未登录",
  30. "data" => null,
  31. ));
  32. } else {
  33. echo "";
  34. }
  35. exit;
  36. }
  37. $uid = $cfg_ml->M_LoginID;
  38. !$cfg_ml->fields['face'] && $face = ($cfg_ml->fields['sex'] == '女') ? 'dfgirl' : 'dfboy';
  39. $facepic = empty($face) ? $cfg_ml->fields['face'] : $GLOBALS['cfg_memberurl'].'/templets/images/'.$face.'.png';
  40. if ($format === 'json') {
  41. echo json_encode(array(
  42. "code" => 200,
  43. "msg" => "",
  44. "data" => array(
  45. "username" => $cfg_ml->M_UserName,
  46. "myurl" => $myurl,
  47. "facepic" => $facepic,
  48. "memberurl" => $cfg_memberurl,
  49. ),
  50. ));
  51. exit;
  52. }
  53. ?>
  54. <div class="userinfo">
  55. <div class="welcome">您好:<?php echo $cfg_ml->M_UserName;?>,欢迎登录 </div>
  56. <div class="userface">
  57. <a href="<?php echo $cfg_memberurl;?>/index.php"><img src="<?php echo $facepic;?>" width="52" height="52" /></a>
  58. </div>
  59. <div class="uclink">
  60. <a href="<?php echo $cfg_memberurl;?>/index.php">会员中心</a> |
  61. <a href="<?php echo $cfg_memberurl;?>/edit_baseinfo.php">资料</a> |
  62. <a href="<?php echo $cfg_memberurl;?>/index_do.php?fmdo=login&dopost=exit">退出登录</a>
  63. </div>
  64. </div>
  65. <?php
  66. }
  67. ?>