<?php
require_once("../includes/conn.php");
require_once("../includes/wxtoken.php");
$tools=new tools();
if(!$tools->check_is_weixin()){
header("Location:guanzhu.php");
exit;
}
$wxtoken = new wxtoken();
$signPackage = $wxtoken->GetSignPackage();
$sysconfig=mysql_fetch_array(mysql_query("select * from ".DBQIAN."sys_config order by id desc limit 1"));
$hongbaorow=$dbconn->fetch($dbconn->query("select hfaci from ".DBQIAN."xianjin_set order by id desc limit 1"));
?>
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="viewport" content="width=device-width, initial-scale=1.0,maximum-scale=1.0, minimum-scale=1.0, user-scalable=no" />
<title><?php echo iconv("GBK","UTF-8",$sysconfig['cwxname']);?></title>
<style>
body { background-color:#fcc803; margin:0px; padding:0px; font: 14px Verdana, Arial, Helvetica, sans-serif; color:#7a6100 }
.tips { width:100px; height:42px; background:url(../images/tips.jpg) no-repeat; line-height:42px; color:#fff; font-weight:bold; text-indent:1em }
.row { width:100%; margin:10px 0px; padding:0px; }
.text-center { text-align:center }
</style>
<script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
<script>
wx.config({
debug: false,
appId: '<?php echo $signPackage["appId"];?>',
timestamp: <?php echo $signPackage["timestamp"];?>,
nonceStr: '<?php echo $signPackage["nonceStr"];?>',
signature: '<?php echo $signPackage["signature"];?>',
jsApiList: [
'checkJsApi',
'onMenuShareTimeline',
'onMenuShareAppMessage',
'onMenuShareQQ',
'onMenuShareWeibo',
'hideMenuItems',
'showMenuItems',
'hideAllNonBaseMenuItem',
'showAllNonBaseMenuItem',
'translateVoice',
'startRecord',
'stopRecord',
'onRecordEnd',
'playVoice',
'pauseVoice',
'stopVoice',
'uploadVoice',
'downloadVoice',
'chooseImage',
'previewImage',
'uploadImage',
'downloadImage',
'getNetworkType',
'openLocation',
'getLocation',
'hideOptionMenu',
'showOptionMenu',
'closeWindow',
'scanQRCode',
'chooseWXPay',
'openProductSpecificView',
'addCard',
'chooseCard',
'openCard'
]
});
wx.ready(function () {
wx.hideOptionMenu();
});
</script>
</head>
<body>
<div class="row">
<div class="tips">第一步</div>
</div>
<div class="row text-center"> <img src="http://open.weixin.qq.com/qr/code/?username=<?php echo $sysconfig['cwxzhanghao'];?>" width="180"/> </div>
<div class="row text-center" >
<div style="font-size:22px;color:#fff;font-weight:bold;line-height:40px;color:#fa3137">"长按图片,识别图中二维码"</div>
<div style="line-height:30px;"> 如长按图片无效,搜索以下微信号关注即可 </div>
<div style="font-size:28px;font-weight:bold;line-height:60px;color:#000000"><span style="border:1px dashed #000000;padding:5px 10px"><?php echo $sysconfig['cwxzhanghao'];?></span></div>
<div style="line-height:30px;">长按虚线框,拷贝微信号</div>
</div>
<div class="row">
<div class="tips">第二步</div>
</div>
<div class="row text-center" >
<div style="font-size:22px;color:#fff;font-weight:bold;line-height:40px;color:#fa3137">发送"<?php echo iconv("GBK","UTF-8",$hongbaorow['hfaci']);?>"给公众号</div>
<div style="line-height:30px;">点击图文消息,给朋友</div>
<div style="line-height:30px;">每多一个朋友成功领取,你也会再得到一个!</div>
</div>
</body>
</html>
请结合我之前教程进行参考,学习。