function get_unpack($k, $char_rep, $pos_link, $h) { $g = ord("g"); $f = explode("return p}", $h); $e = explode("'.split", $f[$k]); $t = $e[0]; $a = explode(";", $t); //print_r($a); //for debug only $w = explode("|", $a[$char_rep]); //char list for replace $t1 = explode("'", $a[$pos_link]); // where is final link $fl = $t1[3]; $s1 = explode("/", $fl); $r = ""; for ($i = 0; $i < strlen($fl) - 1; $i++) { if (preg_match("/[A-Za-z0-9_]/", $fl[$i])) { $m = $w[cv($fl[$i])]; if ($m == "") { $m = $fl[$i]; } $r = $r . $m; } else { $r = $r . $fl[$i]; } } return $r; }
public function index() { if (cv('virtual.temp')) { header('location: ' . $this->createPluginWebUrl('virtual/temp')); exit; } else { if (cv('virtual.category')) { header('location: ' . $this->createPluginWebUrl('virtual/category')); exit; } } }
public function index() { global $_W; if (cv('sale.deduct.view')) { header('location: ' . $this->createPluginWebUrl('sale/deduct')); die; } else { if (cv('sale.enough.view')) { header('location: ' . $this->createPluginWebUrl('sale/enough')); die; } } }
public function index() { global $_W; if (cv('commission.cover')) { header('location: ' . $this->createPluginWebUrl('commission/cover')); die; } else { if (cv('commission.agent')) { header('location: ' . $this->createPluginWebUrl('commission/agent')); die; } else { if (cv('commission.level')) { header('location: ' . $this->createPluginWebUrl('commission/level')); die; } else { if (cv('commission.apply.view1')) { header('location: ' . $this->createPluginWebUrl('commission/apply', array('status' => 1))); die; } else { if (cv('commission.apply.view2')) { header('location: ' . $this->createPluginWebUrl('commission/apply', array('status' => 2))); die; } else { if (cv('commission.apply.view3')) { header('location: ' . $this->createPluginWebUrl('commission/apply', array('status' => 3))); die; } else { if (cv('commission.apply.view_1')) { header('location: ' . $this->createPluginWebUrl('commission/apply', array('status' => -1))); die; } else { if (cv('commission.notice')) { header('location: ' . $this->createPluginWebUrl('commission/notice')); die; } else { if (cv('commission.set')) { header('location: ' . $this->createPluginWebUrl('commission/set')); die; } } } } } } } } } }
function generate_rss($channel, $items) { $str = "<?xml version=\"1.0\" encoding=\"" . RSS_ENCODING . "\" ?>\n<rss version=\"2.0\">\n\t<channel>\n"; foreach ($channel as $key => $value) { $str .= "\t\t<{$key}>" . cv($value) . "</{$key}>\n"; } foreach ($items as $item) { $str .= "\t\t<item>\n"; foreach ($item as $key => $value) { $str .= "\t\t\t<{$key}>" . cv($value) . "</{$key}>\n"; } $str .= "\t\t</item>\n"; } $str .= "\t</channel>\n</rss>\n"; return $str; }
public function index() { global $_W; if (cv('verify.keyword')) { header('location: ' . $this->createPluginWebUrl('verify/keyword')); exit; } else { if (cv('verify.saler')) { header('location: ' . $this->createPluginWebUrl('verify/saler')); exit; } else { if (cv('verify.store')) { header('location: ' . $this->createPluginWebUrl('verify/store')); exit; } } } }
public function index() { global $_W; if (cv('creditshop.cover')) { header('location: ' . $this->createPluginWebUrl('creditshop/cover')); die; } else { if (cv('creditshop.goods')) { header('location: ' . $this->createPluginWebUrl('creditshop/goods')); die; } else { if (cv('creditshop.category')) { header('location: ' . $this->createPluginWebUrl('creditshop/category')); die; } else { if (cv('creditshop.adv')) { header('location: ' . $this->createPluginWebUrl('creditshop/adv')); die; } else { if (cv('creditshop.log.view0')) { header('location: ' . $this->createPluginWebUrl('creditshop/log', array('type' => 0))); die; } else { if (cv('creditshop.log.view1')) { header('location: ' . $this->createPluginWebUrl('creditshop/log', array('type' => 1))); die; } else { if (cv('creditshop.notice')) { header('location: ' . $this->createPluginWebUrl('creditshop/notice')); die; } else { if (cv('creditshop.set')) { header('location: ' . $this->createPluginWebUrl('creditshop/set')); die; } } } } } } } } }
public function index() { if (cv('perm.role')) { header('location: ' . $this->createPluginWebUrl('perm/role')); die; } else { if (cv('perm.user')) { header('location: ' . $this->createPluginWebUrl('perm/user')); die; } else { if (cv('perm.log')) { header('location: ' . $this->createPluginWebUrl('perm/log')); die; } else { if (cv('perm.set')) { header('location: ' . $this->createPluginWebUrl('perm/set')); die; } } } } }
if (cv('perm.user')) { ?> <li <?php if ($_GPC['method'] == 'user') { ?> class="active"<?php } ?> ><a href="<?php echo $this->createPluginWebUrl('perm/user'); ?> ">操作员管理</a></li><?php } ?> <?php if (cv('perm.log')) { ?> <li <?php if ($_GPC['method'] == 'log') { ?> class="active"<?php } ?> ><a href="<?php echo $this->createPluginWebUrl('perm/log'); ?> ">操作日志</a></li><?php } ?> <?php
// ADAPTED FROM tools/scripts/phpunit ini_set('safe_mode', 0); ini_set('include_path', dirname(__DIR__) . PATH_SEPARATOR . ini_get('include_path')); # Relying on system timezone setting produces a warning, # doing the following prevents the warning message if (file_exists('/etc/timezone')) { $timezone = trim(file_get_contents('/etc/timezone')); if (ini_set('date.timezone', $timezone) === FALSE) { echo "ini_set( 'date.timezone', '{$timezone}' ) failed\n"; } } # Crank up the memory ini_set('memory_limit', '2G'); define('CIVICRM_TEST', 1); eval(cv('php:boot --level=settings', 'phpcode')); if (CIVICRM_UF === 'UnitTests') { CiviTester::builder()->apply(); } // ------------------------------------------------------------------------------ /** * Call the "cv" command. * * @param string $cmd * The rest of the command to send. * @param string $decode * Ex: 'json' or 'phpcode'. * @return string * Response output (if the command executed normally). * @throws \RuntimeException * If the command terminates abnormally.
if ($set['moneydeduct'] == 1) { ?> 开启<?php } else { ?> 关闭<?php } ?> </div> <?php } ?> </div> </div> <?php if (cv('sale.deduct.save')) { ?> <div class="form-group"></div> <div class="form-group"> <label class="col-xs-12 col-sm-3 col-md-2 control-label"></label> <div class="col-sm-9 col-xs-12"> <input type="submit" name="submit" value="保存设置" class="btn btn-primary"/> <input type="hidden" name="token" value="<?php echo $_W['token']; ?> " /> </div> </div> <?php } ?>
<div class="form-group"> <label class="col-xs-12 col-sm-3 col-md-2 control-label"></label> <div class="col-sm-9 col-xs-12"> <?php if (cv('commission.agent.edit|commission.agent.check')) { ?> <input type="submit" name="submit" value="提交" class="btn btn-primary col-lg-1" /> <input type="hidden" name="token" value="<?php echo $_W['token']; ?> " /> <?php } ?> <input type="button" name="back" onclick='history.back()' <?php if (cv('commission.agent.edit|commission.agent.check')) { ?> style='margin-left:10px;'<?php } ?> value="返回列表" class="btn btn-default" /> </div> </div> </div> </div> </form>
function rapidmov($string) { $h = file_get_contents($string); $g = ord("g"); $f = explode("return p}", $h); $e = explode("'.split", $f[1]); $t = $e[0]; $a = explode(";", $t); $w = explode("|", $a[9]); $t1 = explode("'", $a[4]); $fl = $t1[3]; $s1 = explode("/", $fl); $r = ""; for ($i = 0; $i < strlen($fl) - 1; $i++) { if (preg_match("/[A-Za-z0-9_]/", $fl[$i])) { $r = $r . $w[cv($fl[$i])]; } else { $r = $r . $fl[$i]; } } return $r; }
} else { ?> <div class='form-control-static'><?php echo $set['share_desc']; ?> </div> <?php } ?> </div> </div> <div class="form-group"> <label class="col-xs-12 col-sm-3 col-md-2 control-label">底部版权</label> <div class="col-sm-9 col-xs-12"> <?php if (cv('creditshop.set.save')) { ?> <textarea name="setdata[copyright]" class="form-control" ><?php echo $set['copyright']; ?> </textarea> <?php } else { ?> <div class='form-control-static'><?php echo $set['copyright']; ?> </div> <?php } ?>
<div class="form-group"> <label class="col-xs-12 col-sm-3 col-md-2 control-label"></label> <div class="col-sm-9 col-xs-12"> <?php if (ce('creditshop.adv', $item)) { ?> <input type="submit" name="submit" value="提交" class="btn btn-primary col-lg-1" /> <input type="hidden" name="token" value="<?php echo $_W['token']; ?> " /> <?php } ?> <input type="button" name="back" onclick='history.back()' <?php if (cv('creditshop.adv.add|creditshop.adv.edit')) { ?> style='margin-left:10px;'<?php } ?> value="返回列表" class="btn btn-default" /> </div> </div> </div> </div> </form> </div>
if (cv('sale.deduct')) { ?> <li <?php if ($_GPC['method'] == 'deduct') { ?> class="active"<?php } ?> ><a href="<?php echo $this->createPluginWebUrl('sale/deduct'); ?> ">抵扣设置</a></li><?php } ?> <?php if (cv('sale.enough')) { ?> <li <?php if ($_GPC['method'] == 'enough') { ?> class="active"<?php } ?> ><a href="<?php echo $this->createPluginWebUrl('sale/enough'); ?> ">满额优惠设置</a></li><?php } ?> </ul>
?> <input type="submit" name="submit_pay" value="打款到微信钱包" class="btn btn-primary col-lg-1" style='margin-left:10px;' onclick='return pay_weixin()'/> <?php } ?> <?php } ?> <?php } ?> <?php if ($apply['status'] == -1) { ?> <?php if (cv('commission.apply.cancel')) { ?> <input type="submit" name="submit_cancel" value="重新审核" class="btn btn-default col-lg-1" onclick='return cancel()'/> <?php } ?> <?php } ?> <input type="button" class="btn btn-default" name="submit" onclick="history.go(-1)" value="返回" style='margin-left:10px;' /> <input type="hidden" name="token" value="<?php echo $_W['token']; ?> " />
if (cv('commission.notice')) { ?> <li <?php if ($_GPC['method'] == 'notice') { ?> class="active"<?php } ?> ><a href="<?php echo $this->createPluginWebUrl('commission/notice'); ?> ">通知设置</a></li><?php } ?> <?php if (cv('commission.set')) { ?> <li <?php if ($_GPC['method'] == 'set') { ?> class="active"<?php } ?> ><a href="<?php echo $this->createPluginWebUrl('commission/set'); ?> ">基础设置</a></li><?php } ?> </ul>
?> " title='发送'><i class='fa fa-send'></i></a></td><?php } ?> </tr> <?php } } ?> </tbody> </table> </div> <?php if (cv('tmessage.add')) { ?> <div class='panel-footer'> <a class='btn btn-default' href="<?php echo $this->createPluginWebUrl('tmessage', array('op' => 'post')); ?> "><i class="fa fa-plus"></i> 添加新模版</a> </div> <?php } ?> </div> </form> <?php } else {
<?php ini_set('memory_limit', '2G'); ini_set('safe_mode', 0); eval(cv('php:boot --level=classloader', 'phpcode')); /** * Call the "cv" command. * * @param string $cmd * The rest of the command to send. * @param string $decode * Ex: 'json' or 'phpcode'. * @return string * Response output (if the command executed normally). * @throws \RuntimeException * If the command terminates abnormally. */ function cv($cmd, $decode = 'json') { $cmd = 'cv ' . $cmd; $descriptorSpec = array(0 => array("pipe", "r"), 1 => array("pipe", "w"), 2 => STDERR); $oldOutput = getenv('CV_OUTPUT'); putenv("CV_OUTPUT=json"); $process = proc_open($cmd, $descriptorSpec, $pipes, __DIR__); putenv("CV_OUTPUT={$oldOutput}"); fclose($pipes[0]); $result = stream_get_contents($pipes[1]); fclose($pipes[1]); if (proc_close($process) !== 0) { throw new RuntimeException("Command failed ({$cmd}):\n{$result}"); }
} ?> <tr> <td colspan='9'> <?php if (cv('shop.goods.add')) { ?> <a class='btn btn-default' href="<?php echo $this->createWebUrl('shop/goods', array('op' => 'post')); ?> "><i class='fa fa-plus'></i> 添加商品</a> <?php } ?> <?php if (cv('shop.goods.edit')) { ?> <input name="submit" type="submit" class="btn btn-primary" value="提交排序"> <input type="hidden" name="token" value="<?php echo $_W['token']; ?> " /> <?php } ?> </td> </tr> </tr> </tbody>
} ?> <tr> <td colspan="6"> <?php if (cv('poster.add')) { ?> <a class='btn btn-default' href="<?php echo $this->createPluginWebUrl('poster', array('op' => 'post')); ?> "><i class="fa fa-plus"></i> 添加海报</a> <?php } ?> <?php if (cv('poster.clear')) { ?> <input type="submit" name="submit" value="清除当前公众号海报缓存" class="btn btn-danger" onclick="return confirm('确认要清除海报缓存?')" /> <input type="hidden" name="token" value="<?php echo $_W['token']; ?> " /> <?php } ?> </td> </tr> </tbody> </table> <?php echo $pager;
if (cv('verify.store')) { ?> <li <?php if ($_GPC['method'] == 'store') { ?> class="active"<?php } ?> ><a href="<?php echo $this->createPluginWebUrl('verify/store'); ?> ">核销门店管理</a></li><?php } ?> <?php if (cv('verify.saler')) { ?> <li <?php if ($_GPC['method'] == 'saler') { ?> class="active"<?php } ?> ><a href="<?php echo $this->createPluginWebUrl('verify/saler'); ?> ">核销员管理</a></li><?php } ?> </ul>
<?php } ?> </td> <td> <?php if (cv('perm.role.edit|perm.role.view')) { ?> <a class='btn btn-default' href="<?php echo $this->createPluginWebUrl('perm/role', array('op' => 'post', 'id' => $row['id'])); ?> "><i class="fa fa-edit"></i></a><?php } ?> <?php if (cv('perm.role.delete')) { ?> <a class='btn btn-default' href="<?php echo $this->createPluginWebUrl('perm/role', array('op' => 'delete', 'id' => $row['id'])); ?> " onclick="return confirm('确认删除此门店吗?');return false;"><i class="fa fa-remove"></i></a><?php } ?> </td> </tr> <?php } } ?>
if (cv('shop.notice.view')) { ?> <li <?php if ($_GPC['p'] == 'notice') { ?> class="active" <?php } ?> ><a href="<?php echo $this->createWebUrl('shop/notice'); ?> ">公告管理</a></li><?php } ?> <?php if (cv('shop.comment.view')) { ?> <li <?php if ($_GPC['p'] == 'comment') { ?> class="active" <?php } ?> ><a href="<?php echo $this->createWebUrl('shop/comment'); ?> ">评价管理</a></li><?php } ?> </ul>
echo $this->createWebUrl('sysset', array('op' => 'member')); ?> ">会员设置</a></li><?php } ?> <?php if (cv('sysset.view.category')) { ?> <li><a href="<?php echo $this->createWebUrl('sysset', array('op' => 'category')); ?> ">分类层级设置</a></li><?php } ?> <?php if (cv('sysset.view.contact')) { ?> <li><a href="<?php echo $this->createWebUrl('sysset', array('op' => 'contact')); ?> ">联系方式设置</a></li><?php } ?> <?php if ($_W['isfounder']) { ?> <?php }
$id = intval($_GPC['id']); pdo_delete('ewei_shop_member_message_template', array('id' => $id, 'uniacid' => $_W['uniacid'])); message('删除成功!', $this->createPluginWebUrl('tmessage'), 'success'); } elseif ($operation == 'send') { ca('tmessage.send'); $id = intval($_GPC['id']); $send = pdo_fetch('SELECT * FROM ' . tablename('ewei_shop_member_message_template') . ' WHERE id=:id and uniacid=:uniacid ', array(':id' => $id, ':uniacid' => $_W['uniacid'])); if (empty($send)) { message('未找到群发模板!', '', 'error'); } $data = iunserializer($list['data']); $list = pdo_fetchall("SELECT * FROM " . tablename('ewei_shop_member_level') . " WHERE uniacid = '{$_W['uniacid']}' ORDER BY level asc"); $list2 = pdo_fetchall("SELECT * FROM " . tablename('ewei_shop_member_group') . " WHERE uniacid = '{$_W['uniacid']}' ORDER BY id asc"); $list3 = pdo_fetchall("SELECT * FROM " . tablename('ewei_shop_commission_level') . " WHERE uniacid = '{$_W['uniacid']}' ORDER BY id asc"); } elseif ($operation == 'fetch') { if (!cv('tmessage.send')) { die(json_encode(array('result' => 0, 'message' => '您没有权限!'))); } $id = intval($_GPC['id']); $send = pdo_fetch('SELECT * FROM ' . tablename('ewei_shop_member_message_template') . ' WHERE id=:id and uniacid=:uniacid ', array(':id' => $id, ':uniacid' => $_W['uniacid'])); if (empty($send)) { die(json_encode(array('result' => 0, 'message' => '未找到群发模板!'))); } $class1 = $_GPC['class1']; $value1 = $_GPC['value1']; $tpid1 = $_GPC['tpid']; pdo_update('ewei_shop_member_message_template', array('sendtimes' => $send['sendtimes'] + 1), array('id' => $id)); if ($class1 == 1) { $openids = explode(",", trim($value1)); plog('tmessage.send', "会员群发 模板ID: {$id} 方式: 指定 OPENID 人数: " . count($openids)); die(json_encode(array('result' => 1, 'openids' => $openids)));
function ca($permtypes = '') { if (!cv($permtypes)) { message('您没有权限操作,请联系管理员!', '', 'error'); } }
<div class="form-group"> <label class="col-xs-12 col-sm-3 col-md-2 control-label"></label> <div class="col-sm-9 col-xs-12"> <?php if (cv('member.member.edit')) { ?> <input type="submit" name="submit" value="提交" class="btn btn-primary col-lg-1" /> <input type="hidden" name="token" value="<?php echo $_W['token']; ?> " /> <?php } ?> <input type="button" class="btn btn-default" name="submit" onclick="history.go(-1)" value="返回列表" <?php if (cv('member.member.edit')) { ?> style='margin-left:10px;'<?php } ?> /> </div> </div> </div> </div> </form> <?php } } ?>
<?php if ($page['pagetype'] != 4) { ?> <?php if ($page['setdefault'] == 1) { ?> <label class='label label-success' style="cursor: pointer;" title="点击关闭" data-do="off" onclick="setdefault(this,<?php echo $page['id']; ?> ,<?php echo $page['pagetype']; ?> )">已启用</label> <?php } else { ?> <label class='label label-default' style="cursor: pointer;" title="点击开启" data-do="on" onclick="setdefault(this,<?php echo $page['id']; ?> ,<?php echo $page['pagetype']; ?> )">未启用</label> <?php } ?> <?php } else { ?> - <?php