function writeinto($info) { $infoarr = json_decode($info, true); $flag = new M('flag'); $count = $flag->find("openid='" . $infoarr['openid'] . "'", '*', 'count'); $sqlarr = array("nickname" => bin2hex($infoarr['nickname']), "avatar" => $infoarr['headimgurl'], "fakeid" => randStr(), "sex" => $infoarr['sex'], "fromtype" => 'weixin', "datetime" => time(), "flag" => "2"); if (isset($infoarr['shadyphone'])) { $shady = new M('cj_shady'); $shadyarr = $shady->find("phone=" . $infoarr['shadyphone']); if (empty($shadyarr)) { $addarr = array('phone' => $infoarr['shadyphone'], 'shady' => $shadyarr['grade']); $sqlarr = array_merge($sqlarr, $addarr); } } if ($count) { $savve = $flag->update("openid='" . $infoarr['openid'] . "'", $sqlarr); } if ($savve) { echo "ok"; } }
} else { $_SESSION['views'] = false; echo "<script>window.location='../wall/login.php?url=" . $_SERVER['PHP_SELF'] . "';</script>"; } ?> <!DOCTYPE HTML> <html> <head> <?php require 'db.php'; $plugsc = new M('plugs'); $voteplug = $plugsc->find('name="shake"'); ?> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title><?php echo $xuanzezu[5]; ?> </title> <script src="./mobile/shake/jquery.js"></script> <script type="text/javascript" src="../files/js/semantic.min.js"></script> <script src="mobile/shake/jquery-ui.min.js"></script>
$plugs[$plugin['name']] = 1; } } if (file_exists("../api/weixin.php") && $conf['weixin_switch']) { $weixin = 1; $flag = new M('weixin_config'); $weixinconf = $flag->find(); $weixin_name = $weixinconf['nickname']; $dianplu_wxh = $weixinconf['dianplu_wxh']; } else { $weixin = 0; } if (file_exists("../api/weibo.php") && $conf['weibo_switch']) { $weibo = 1; $flag = new M('weibo_config'); $weiboconf = $flag->find('id=1'); } else { $weibo = 0; } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"><head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>微信大屏幕</title> <script type="text/javascript" src="js/jquery.js"></script> <script type="text/javascript" src="../files/js/semantic.min.js"></script> <script type="text/javascript" src="js/jquery.soChange-min.js"></script> <script type="text/javascript"> if(document.all){ alert("ie浏览器无法正常解析本页,请使用谷歌内核的流量器浏览。如(360浏览器,猎豹浏览器等)");
while ($row1 = mysql_fetch_array($data)) { $row1['nickname'] = pack('H*', $row1['nickname']); $row1 = emoji_unified_to_html(emoji_softbank_to_unified($row1)); $arr[] = array('id' => $row1['id'], 'avatar' => $row1['avatar'], 'nickname' => $row1['nickname'], 'from' => $row1['fromtype']); } echo json_encode($arr); } else { if ($action == "ok") { //标识中奖号码 $id = $_POST['id']; $sql = "update weixin_flag set status=1,cjstatu=0 where id={$id}"; $query = mysql_query($sql); if ($xuanzezu[10]) { $query2 = mysql_query("select * from weixin_flag where id = {$id}"); $row2 = mysql_fetch_array($query2); $contant = '恭喜恭喜!您已中奖,请按照主持人的提示,到指定地点领取您的奖品!您的获奖验证码是:【' . $row2['fakeid'] . '】'; if ($row2['fromtype'] == 'weibo') { $weibo_configs = new M('weibo_config'); $weibo_config = $weibo_configs->find(); include "../../weibo/sendmessage.php"; send($weibo_config['access_token'], $contant, $row2['openid']); } if ($row2['fromtype'] == 'weixin') { include "../../weixin/sendmessage.php"; sendmassage($row2['openid'], $contant); } } echo '1'; } } }
$vote = 1; } if (file_exists("../wall/qdq_plug/qdq_html.php")) { $qdq = 1; } if (file_exists("../wall/ddp_plug/ddp_html.php")) { $ddp = 1; } if (file_exists("../api/weixin.php")) { $weixin_configc = new M('weixin_config'); $weixin_config = $weixin_configc->find(); $weixin_switch = 1; } if (file_exists("../api/weibo.php")) { $weibo_configc = new M('weibo_config'); $weibo_config = $weibo_configc->find(); $weibo_switch = 1; } ?> <!DOCTYPE html> <html> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <head> <title> 微信墙后台管理系统 </title> <script> var web_root= "<?php echo Web_ROOT; ?>
function cj_verify() { $cid = $_GET['cid']; //file_get_contents(Web_ROOT . "/weixin/dianplu.php?action=cj&type=wins&tofakeid={$cid}"); $flags = new M('flag'); $flag = $flags->find('fakeid=' . $cid); $contant = '恭喜恭喜!此条为验证消息,您的获奖验证码是:【' . $cid . '】'; if ($flag['fromtype'] == 'weibo') { $weibo_configs = new M('weibo_config'); $weibo_config = $weibo_configs->find(); include "../weibo/sendmessage.php"; send($weibo_config['access_token'], $contant, $flag['openid']); } if ($flag['fromtype'] == 'weixin') { include "../weixin/sendmessage.php"; sendmassage($flag['openid'], $contant); } echo "<script>alert('验证信息已经发送,请勿频繁发送!');location.href='cj.php';</script>"; }
<?php @header("Content-type: text/html; charset=utf-8"); include dirname(__FILE__) . '/../files/db.class.php'; $wall_config = new M('wall_config'); $xuanzezu = $wall_config->find('1', '*', '', 'row'); $conf = $wall_config->find(); $link = M::$wlink; define("Web_ROOT", $xuanzezu[31]);
/** * 分析消息类型,并分发给对应的函数 * * @return void */ public function run() { $wall_config = new M('wall_config'); $conf = $wall_config->find(); if (!$conf[Wechat::$fromtype . '_switch']) { $this->responseText('对不起,管理员没有开启该平台下的互动墙!'); die; } $xuanzezu = $wall_config->find('1', '*', '', 'row'); $this->xuanzezu = $xuanzezu; define("Web_ROOT", $xuanzezu[31]); $typecon = new M(Wechat::$fromtype . '_config'); $tp = $typecon->find(); $this->type_config = $tp; $this->weixin_name = $tp['nickname']; $from = $this->getRequest('fromusername'); $check = $this->sqlselect('flag', $from, "row"); $this->check = $check; if ($xuanzezu[18] && $this->getRequest('content') != $xuanzezu[19] && !$check[2]) { //直接回复第三方返回的xml exit($this->sendxml($GLOBALS['HTTP_RAW_POST_DATA'], $xuanzezu[20], $xuanzezu[21])); } else { if (!$check[2]) { $this->responseNews($this->resetflag($tp['nickname'], $from)); } switch ($this->getRequest('msgtype')) { case 'event': switch ($this->getRequest('event')) { case 'FOLLOW': $this->onSubscribe(); break; case 'subscribe': $this->onSubscribe(); break; case 'unsubscribe': $this->onUnsubscribe(); break; case 'SCAN': $this->onScan(); break; case 'LOCATION': $this->onEventLocation(); break; case 'click': $this->onClick(); break; case 'CLICK': $this->onClick(); break; } break; case 'text': $this->onText(); break; case 'image': $this->onImage(); break; case 'location': $this->onLocation(); break; case 'link': $this->onLink(); break; case 'voice': $this->onVoice(); break; default: $this->onUnknown(); break; } } }