post-step.ctrl.php 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <?php
  2. /**
  3. * [WeEngine System] Copyright (c) 2014 WE7.CC
  4. * WeEngine is NOT a free software, it under the license terms, visited http://www.we7.cc/ for more details.
  5. */
  6. defined('IN_IA') or exit('Access Denied');
  7. load()->func('file');
  8. load()->model('module');
  9. load()->model('user');
  10. load()->model('account');
  11. load()->classs('weixin.platform');
  12. $uniacid = intval($_GPC['uniacid']);
  13. $step = intval($_GPC['step']) ? intval($_GPC['step']) : 1;
  14. $user_create_account_info = permission_user_account_num();
  15. if($step == 1) {
  16. if ($user_create_account_info['account_limit'] <= 0 && !$_W['isfounder']) {
  17. $authurl = "javascript:alert('创建公众号已达上限!');";
  18. }
  19. if (empty($authurl) && !empty($_W['setting']['platform']['authstate'])) {
  20. $account_platform = new WeixinPlatform();
  21. $authurl = $account_platform->getAuthLoginUrl();
  22. }
  23. } elseif ($step == 2) {
  24. } elseif ($step == 3) {
  25. } elseif($step == 4) {
  26. $uniacid = intval($_GPC['uniacid']);
  27. $acid = intval($_GPC['acid']);
  28. $uni_account = pdo_get('uni_account', array('uniacid' => $uniacid));
  29. if (empty($uni_account)) {
  30. itoast('非法访问');
  31. }
  32. $owner_info = account_owner($uniacid);
  33. if (!(user_is_founder($_W['uid'], true) || $_W['uid'] == $owner_info['uid'])) {
  34. itoast('非法访问');
  35. }
  36. $account = account_fetch($uni_account['default_acid']);
  37. }
  38. template('account/post-step');