index.php 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. <?php
  2. //decode by http://dezend.qiling.org QQ 2859470
  3. function location($type = 'user', $str = '')
  4. {
  5. global $mymps_global;
  6. global $member_menu;
  7. global $m;
  8. $raquo = '<span class="separator">&raquo;</span>';
  9. $return = '<a href="index.php"><span>用户中心</span></a> ' . $raquo;
  10. $return .= $str != '' ? ' <a href="index.php?m=' . $m . '">' . ($member_menu[$type][$m] != '' ? $member_menu[$type][$m] : '首页') . '</a> ' . $raquo . ' <span>' . $str . '</span>' : ' ' . ($member_menu[$type][$m] != '' ? $member_menu[$type][$m] : '首页');
  11. return $return;
  12. unset($raquo);
  13. unset($return);
  14. }
  15. define('CURSCRIPT', 'index');
  16. define('IN_MYMPS', true);
  17. define('IN_MEMBERADMIN', true);
  18. define('MEMBERDIR', dirname(__FILE__));
  19. require_once MEMBERDIR . './../include/global.php';
  20. require_once MEMBERDIR . './../data/config.php';
  21. require_once MYMPS_DATA . '/config.db.php';
  22. require_once MYMPS_INC . '/db.class.php';
  23. require_once MYMPS_INC . '/cache.fun.php';
  24. $uid = $s_uid = $s_pwd = $mymps_image = '';
  25. require_once MYMPS_INC . '/member.class.php';
  26. if (!($log = $member_log->chk_in())) {
  27. write_msg('', '../' . $mymps_global['cfg_member_logfile'] . '?url=' . urlencode(GetUrl()));
  28. }
  29. $box = isset($box) ? intval($box) : 0;
  30. $id = isset($id) ? intval($id) : 0;
  31. $type = in_array($type, array('user', 'corp')) ? $type : 'user';
  32. $success = isset($success) ? intval($success) : '';
  33. $error = isset($error) ? intval($error) : '';
  34. $alert = isset($alert) ? intval($alert) : '';
  35. $page = isset($page) ? intval($page) : 1;
  36. $id = isset($id) ? intval($id) : '';
  37. $where = 'WHERE userid = \'' . $s_uid . '\'';
  38. $wherea = 'WHERE a.userid = \'' . $s_uid . '\'';
  39. $row = '';
  40. $row = $db->getRow('SELECT * FROM `' . $db_mymps . 'member` ' . $where);
  41. $face = $row['prelogo'];
  42. $normalface = $row['logo'];
  43. $money_own = $row['money_own'];
  44. $pm_total = mymps_count('member_pm', 'WHERE touser = \'' . $s_uid . '\' AND if_read = \'0\'');
  45. $levelid = $row['levelid'];
  46. $group = get_member_group($levelid);
  47. $levelname = $group['levelname'];
  48. $per_certify = $row['per_certify'];
  49. $com_certify = $row['com_certify'];
  50. $sj_certify = $row['sj_certify'];
  51. $if_corp = $row['if_corp'];
  52. $uid = $row['id'];
  53. $cityid = $row['cityid'];
  54. if ($if_corp == 0) {
  55. $mysite = Rewrite('space', array('user' => $row['userid']));
  56. } else {
  57. if ($if_corp == 1) {
  58. $mysite = Rewrite('store', array('uid' => $row['id']));
  59. }
  60. }
  61. $allowm = $mymps_global['cfg_if_corp'] == 1 ? array('info', 'pm', 'base', 'avatar', 'levelup', 'certify', 'pay', 'password', 'album', 'comment', 'document', 'certifycorp', 'shop', 'goods', 'shoucang') : array('info', 'pm', 'base', 'avatar', 'levelup', 'certify', 'pay', 'password', 'shoucang');
  62. require_once MEMBERDIR . '/include/mymps.menu.inc.php';
  63. is_array($data) && ($allowm = array_merge(array_keys($data), $allowm));
  64. if (!in_array($m, $allowm)) {
  65. $m = 'index';
  66. }
  67. unset($data);
  68. unset($allowm);
  69. $m != 'index' && chk_member_purview('purview_' . $m);
  70. $score_change = get_credit_score();
  71. if ($alert == 1) {
  72. $score_changer = $score_change['score']['rank']['login'];
  73. } else {
  74. if ($alert == 2) {
  75. $score_changer = $score_change['score']['rank']['coupon'];
  76. } else {
  77. if ($alert == 3) {
  78. $score_changer = $score_change['score']['rank']['group'];
  79. } else {
  80. if ($alert == 4) {
  81. $score_changer = $score_change['score']['rank']['goods'];
  82. }
  83. }
  84. }
  85. }
  86. if (empty($score_changer)) {
  87. $alert = NULL;
  88. }
  89. $score_changer = ' <font color=red><b>' . $score_changer . '</font></b>';
  90. if ($if_corp != 1 && in_array($m, array('goods', 'coupon', 'group', 'document', 'certifycorp', 'album', 'comment'))) {
  91. write_msg('您非商铺会员,请先申请网上店铺再进行操作!', 'index.php?m=shop');
  92. }
  93. //mayi('demo9.test.com,59dan.test.com,.test.com,dongying0546.com,pdf8.cn');
  94. include MEMBERDIR . '/include/inc_' . $m . '.php';
  95. is_object($db) && $db->Close();
  96. $mymps_global = $m = $ac = $success = $error = $where = $page = $timestamp = $log = $member_log = $face = $money_own = NULL;
  97. $levelid = $pm_total = $row = NULL;
  98. unset($row);
  99. if ($selectedids) {
  100. unset($selectedids);
  101. }