echo "disabled"; } ?> name="weibo_switch" type="checkbox"> </div> <button class="btn btn-sm btn-success setconfig" data-toggle="modal" <?php if (!$weibo_switch) { echo "disabled"; } ?> href="#weibo-setconfig">配置参数</button> </div> </div> <?php $plugsc = new M('plugs'); $plugs = $plugsc->select('id>0 order by id'); foreach ($plugs as $plugin) { $open = ${$plugin}['name']; // echo $qdq; echo ' <div class="form-group"> <label class="control-label col-md-3">' . $plugin['title'] . '开关:</label> <div class="col-md-8"> <div class="toggle-switch plug-switch" data-off="danger" data-on="success" style="margin-bottom:8px"> <input '; if ($open != '1') { echo 'disabled'; } if ($plugin['switch']) { echo ' checked'; }
$style = "2015year"; } include 'db.php'; $conf = $wall_config->find(); /** * * 以下为获取页面插件 * * qdq_switch tinyint(1) [0] cj_switch tinyint(1) [0] ddp_switch tinyint(1) [0] weibo_switch tinyint(1) [0] weixin_switch * */ $plugsc = new M('plugs'); $plugsa = $plugsc->select('switch =1'); foreach ($plugsa as $plugin) { if ($plugin['name'] == 'cj') { if (@file_exists("cjg_plug/cjg_html.php")) { $plugs['cjg'] = 1; $plugs['cj'] = 0; } } if (@file_exists($plugin['name'] . "_plug/" . $plugin['name'] . "_html.php")) { $plugs[$plugin['name']] = 1; } } if (file_exists("../api/weixin.php") && $conf['weixin_switch']) { $weixin = 1; $flag = new M('weixin_config'); $weixinconf = $flag->find();
<?php /** * 微信公众平台 PHP SDK * * @author NetPuter <*****@*****.**> */ include '../files/db.class.php'; $plugsc = new M('plugs'); $plugs = $plugsc->select('hasfiles = 1 and switch =1'); foreach ($plugs as $plugin) { if (@file_exists('plugins/' . $plugin['files'] . '.php')) { include_once 'plugins/' . $plugin['files'] . '.php'; } } /** * 微信公众平台处理类 */ class Wechat { /** * 调试模式,将错误通过文本消息回复显示 * * @var boolean */ private $debug; /** * 以数组的形式保存微信服务器每次发来的请求 * * @var array */