function renren_syn_html($uid = 0) { $return = ''; $uid = max(0, (int) ($uid ? $uid : MEMBER_ID)); if ($uid > 0 && ($sys_config = renren_enable()) && $sys_config['renren']['is_sync_topic']) { $row = renren_bind_info($uid); $a = $b = $c = $d = $e = ''; if ($row && $row['renren_uid']) { $b = "{$sys_config['site_url']}/images/renren/icon_on.gif"; if ((true === IN_JISHIGOU_INDEX || true === IN_JISHIGOU_AJAX || true === IN_JISHIGOU_ADMIN) && 'output' != jget('mod')) { $dataSetting = 0; if (!$row['renren_uid']) { $dataSetting = 1; $b = "{$sys_config['site_url']}/images/renren/icon_off.gif"; } $e = "<i></i><img id='syn_to_renren' src='{$b}' data-setting='{$dataSetting}' data-type='renren' onclick='modifySync(this);' title='同步发到人人网'/>"; } else { $e = '<label><input type="checkbox" name="syn_to_renren" value="1" ' . ($row['renren_uid'] ? ' checked="checked" ' : '') . ' /> <img src="' . $b . '" title="同步发到人人网" /></label>'; } } else { $b = "{$sys_config['site_url']}/images/renren/icon_off.gif"; $c = "disabled='disabled'"; $e = "<a href='{$sys_config['site_url']}/index.php?mod=account&code=renren' title='开通此功能(将打开新窗口)'><i></i><img src='{$b}' title='同步发到人人网'/></a>"; } $return = "{$a}{$e}"; } return $return; }
function Main() { if (!$this->Config['ldap_enable']) { $member = jsg_member_info(MEMBER_ID); $act_list = array(); $act_list['qqwb'] = '腾讯微博'; $act_list['sina'] = '新浪微博'; $act_list['yy'] = 'YY帐号'; $act_list['renren'] = '人人帐号'; $act_list['kaixin'] = '开心帐号'; if ($this->Config['fjau_enable']) { $act_list['fjau'] = 'FJAU帐号'; } $act = isset($act_list[$this->Code]) ? $this->Code : 'qqwb'; $this->Code = $act; if ('qqwb' == $act) { $qqwb_init = qqwb_init($this->Config); if ($qqwb_init) { $qqwb = jconf::get('qqwb'); $qqwb_bind_info = qqwb_bind_info(MEMBER_ID); if ($qqwb_bind_info) { if ($qqwb['is_synctopic_toweibo']) { $synctoqq_radio = jform()->YesNoRadio('synctoqq', (int) $qqwb_bind_info['synctoqq']); } if ($qqwb['is_synctopic_tojishigou']) { $sync_weibo_to_jishigou_radio = jform()->YesNoRadio('sync_weibo_to_jishigou', (int) $qqwb_bind_info['sync_weibo_to_jishigou']); } if ($qqwb['is_syncreply_tojishigou']) { $sync_reply_to_jishigou_radio = jform()->YesNoRadio('sync_reply_to_jishigou', (int) $qqwb_bind_info['sync_reply_to_jishigou']); } } } } elseif ('sina' == $act) { $profile_bind_message = '新浪微博帐号绑定功能未启用,请联系管理员'; $sina_init = sina_init($this->Config); if ($sina_init) { $sina = jconf::get('sina'); if ($sina['oauth2_enable']) { $sina_bind_info = sina_weibo_bind_info(MEMBER_ID); if ($sina_bind_info) { $profiles = $sina_bind_info['profiles']; if ($sina['is_synctopic_toweibo']) { $synctoweibo_radio = jform()->YesNoRadio('bind_setting', (int) sina_weibo_bind_setting(MEMBER_ID)); } if ($sina['is_synctopic_tojishigou']) { $synctopic_tojishigou_radio = jform()->YesNoRadio('synctopic_tojishigou', (int) $profiles['synctopic_tojishigou']); } if ($sina['is_syncreply_tojishigou']) { $syncreply_tojishigou_radio = jform()->YesNoRadio('syncreply_tojishigou', (int) $profiles['syncreply_tojishigou']); } $expires_in_time = my_date_format($sina_bind_info['dateline'] + $sina_bind_info['expires_in'], 'Y-m-d H:i'); } } else { $xwb_start_file = ROOT_PATH . 'include/ext/xwb/sina.php'; if (!is_file($xwb_start_file)) { $profile_bind_message = '插件文件丢失,无法启动!'; } else { require $xwb_start_file; $profile_bind_message = '<a href="javascript:XWBcontrol.bind()">如果看不到新浪微博绑定设置窗口,请点击这里启动。</a>'; $GLOBALS['xwb_tips_type'] = 'bind'; $profile_bind_message .= jsg_sina_footer(); } } } } elseif ('yy' == $act) { $yy_init = yy_init($this->Config); if ($yy_init) { $yy_bind_info = yy_bind_info(MEMBER_ID); } } elseif ('renren' == $act) { $renren_init = renren_init($this->Config); if ($renren_init) { $renren_bind_info = renren_bind_info(MEMBER_ID); } } elseif ('kaixin' == $act) { $kaixin_init = kaixin_init($this->Config); if ($kaixin_init) { $kaixin_bind_info = kaixin_bind_info(MEMBER_ID); } } elseif ('fjau' == $act) { $fjau_init = fjau_init($this->Config); if ($fjau_init) { $fjau_bind_info = fjau_bind_info(MEMBER_ID); } } else { } $this->Title = $act_list[$act]; } include template('setting/account_main'); }