qqshow.inc.php 1.4 KB

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. /**
  3. * [Discuz! X] (C)2001-2099 Comsenz Inc.
  4. * This is NOT a freeware, use is subject to license terms
  5. *
  6. * $Id: qqshow.inc.php 29265 2012-03-31 06:03:26Z yexinhao $
  7. */
  8. if(!defined('IN_DISCUZ')) {
  9. exit('Access Denied');
  10. }
  11. if(!$_G['uid']) {
  12. showmessage('not_loggedin', NULL, array(), array('login' => 1));
  13. }
  14. $connectService = Cloud::loadClass('Service_Connect');
  15. $connectService->connectMergeMember();
  16. if($_G['member']['conisbind']) {
  17. $qqshow = '<img src="http://open.show.qq.com/cgi-bin/qs_open_snapshot?appid='.$_G['setting']['connectappid'].'&openid='.$_G['member']['conopenid'].'" />';
  18. if(submitcheck('connectsubmit')) {
  19. C::t('#qqconnect#common_member_connect')->update($_G['uid'], array('conisqqshow' => $_GET['do'] == 'open' ? 1 : 0));
  20. $message = $_GET['do'] == 'open' ? lang('plugin/qqconnect', 'connect_qqshow_open') : lang('plugin/qqconnect', 'connect_qqshow_close');
  21. include template('common/header_ajax');
  22. echo '<script type="text/javascript">showDialog(\''.$message.'\', \'right\', null, function(){location.href=\'home.php?mod=spacecp&ac=plugin&id=qqconnect:qqshow\'}, 0, null, \'\', \'\', \'\', 0, 3);</script>';
  23. include template('common/footer_ajax');
  24. exit;
  25. }
  26. } else {
  27. $_G['connect']['loginbind_url'] = $_G['siteurl'].'connect.php?mod=login&op=init&type=loginbind&referer='.urlencode($_G['connect']['referer'] ? $_G['connect']['referer'] : 'index.php');
  28. }