<?php
!defined('M_COM') && exit('No Permission');
if(!($commu = read_cache('commu',9)) || empty($commu['available']))exit();
load_cache('currencys');?>
<script type="text/javascript" reload="1">
function copyToClipboard(txt){
	if(window.clipboardData){
		window.clipboardData.clearData();
		window.clipboardData.setData("Text", txt);
	}else if (window.netscape){
		try{
			netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
		}catch (e){
			return false;
		}
		var clip = Components.classes['@mozilla.org/widget/clipboard;1'].createInstance(Components.interfaces.nsIClipboard);
		if (!clip)return false;
		var trans = Components.classes['@mozilla.org/widget/transferable;1'].createInstance(Components.interfaces.nsITransferable);
		if (!trans)return false;
		trans.addDataFlavor('text/unicode');
		var str = new Object();
		var len = new Object();
		var str = Components.classes["@mozilla.org/supports-string;1"].createInstance(Components.interfaces.nsISupportsString);
		var copytext = txt;
		str.data = copytext;
		trans.setTransferData("text/unicode",str,copytext.length*2);
		var clipid = Components.interfaces.nsIClipboard;
		if (!clip)return false;
		clip.setData(trans,null,clipid.kGlobalClipboard);
	}else{
		return false;
	}
	alert("复制成功！");
	return false
}
</script><?php
$idx = "$cms_abs?uid={$curuser->info['mname']}";?>
<table width="100%" cellspacing="0" cellpadding="0" border="0" class=" tb tb2 bdbot">
	<tr>
		<td align="left"><b style="color:red">将本站推荐给朋友：</b> <br />
			<a href="<?=$idx?>" onclick="return copyToClipboard(this.href);"><?=$idx?></a> (<b>点击右键复制链接</b>)<?php
if(!empty($commu['setting'][0]['value'])){?>
			<div>奖励说明：成功推荐一个访问者,您就可以增加 <?=$commu['setting'][0]['value']?> 个<?=$currencys[$commu['setting'][0]['crid']]['cname']?>。赶快行动吧！</div><?php
}
$reg = "{$cms_abs}register.php?uid={$curuser->info['mname']}";?>
		</td>
	</tr>
	<tr>
		<td align="left"><b style="color:red">邀请朋友来本站注册：</b> <br />
			<a href="<?=$reg?>" onclick="return copyToClipboard(this.href);"><?=$reg?></a> (<b>点击右键复制链接</b>)<?php
if(!empty($commu['setting'][1]['value'])){?>
			<div>奖励说明：成功推荐一个用户注册,您就可以增加 <?=$commu['setting'][1]['value']?> 个<?=$currencys[$commu['setting'][1]['crid']]['cname']?>。赶快行动吧！</div><?php
}?>
		</td>
	</tr>
</table>
<div class="blank9"></div>