人人商城

create.ctrl.php 979B

123456789101112131415161718192021222324252627282930313233
  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()->model('user');
  8. $_W['page']['title'] = '添加副创始人 - 副创始人管理';
  9. if (checksubmit()) {
  10. $user_founder = array(
  11. 'username' => safe_gpc_string($_GPC['username']),
  12. 'password' => $_GPC['password'],
  13. 'repassword' => $_GPC['repassword'],
  14. 'remark' => safe_gpc_string($_GPC['remark']),
  15. 'groupid' => intval($_GPC['groupid']),
  16. 'starttime' => TIMESTAMP,
  17. 'endtime' => intval($_GPC['timelimit']),
  18. 'founder_groupid' => ACCOUNT_MANAGE_GROUP_VICE_FOUNDER
  19. );
  20. $user_add = user_info_save($user_founder, true);
  21. if (is_error($user_add)) {
  22. itoast($user_add['message'], '', '');
  23. }
  24. itoast($user_add['message'], url('founder/edit', array('uid' => $user_add['uid'])), 'success');
  25. }
  26. $groups = user_founder_group();
  27. template('founder/create');