本文整理汇总了PHP中uni_modules函数的典型用法代码示例。如果您正苦于以下问题:PHP uni_modules函数的具体用法?PHP uni_modules怎么用?PHP uni_modules使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了uni_modules函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: cron_check
function cron_check($cronid = 0)
{
global $_W;
$cron = pdo_get('core_cron', array('cloudid' => $cronid));
$_W['uniacid'] = $cron['uniacid'];
if (empty($cron)) {
return error(-1000, '任务不存在或已删除');
}
if (!$cron['status']) {
return error(-1001, '任务已关闭');
}
if (!$cron['uniacid']) {
return error(-1002, '任务uniacid错误');
}
if (empty($cron['module'])) {
return error(-1003, '任务所属模块为空');
} else {
if ($cron['module'] != 'task') {
$modules = array_keys(uni_modules());
if (!in_array($cron['module'], $modules)) {
return error(-1004, "公众号没有操作模块{$cron['module']}的权限");
}
}
}
if (empty($cron['filename'])) {
return error(-1005, '任务脚本名称为空');
}
return $cron;
}
开发者ID:aspnmy,项目名称:weizan,代码行数:29,代码来源:cron.func.php
示例2: settingsDisplay
public function settingsDisplay($settings)
{
global $_W, $_GPC, $frames;
require_once MB_ROOT . '/source/backlist.class.php';
$backlist = new backlist();
$frames = $backlist->getModuleFrames('feng_fightgroups');
$backlist->_calc_current_frames2($frames);
load()->func('tpl');
load()->model('account');
$modules = uni_modules();
if (checksubmit()) {
load()->func('file');
$r = mkdirs(MB_ROOT . '/cert/' . $_W['uniacid']);
if (!empty($_GPC['cert'])) {
$ret = file_put_contents(MB_ROOT . '/cert/' . $_W['uniacid'] . '/apiclient_cert.pem', trim($_GPC['cert']));
$r = $r && $ret;
}
if (!empty($_GPC['key'])) {
$ret = file_put_contents(MB_ROOT . '/cert/' . $_W['uniacid'] . '/apiclient_key.pem', trim($_GPC['key']));
$r = $r && $ret;
}
if (!$r) {
message('证书保存失败, 请保证 /addons/feng_fightgroups/cert/ 目录可写');
}
$dat = array('userrefund' => $_GPC['userrefund'], 'gettime' => $_GPC['gettime'], 'goodstip' => $_GPC['goodstip'], 'openfirstpay' => $_GPC['openfirstpay'], 'firstpay' => $_GPC['firstpay'], 'refundpercent' => $_GPC['refundpercent'], 'status' => $_GPC['status'], 'sharestatus' => $_GPC['sharestatus'], 'mode' => $_GPC['mode'], 'picmode' => $_GPC['picmode'], 'mchid' => $_GPC['mchid'], 'apikey' => $_GPC['apikey'], 'share_title' => $_GPC['share_title'], 'share_image' => $_GPC['share_image'], 'share_desc' => $_GPC['share_desc'], 'share_imagestatus' => $_GPC['share_imagestatus'], 'pay_suc' => $_GPC['pay_suc'], 'm_pay' => $_GPC['m_pay'], 'm_tuan' => $_GPC['m_tuan'], 'm_cancle' => $_GPC['m_cancle'], 'm_ref' => $_GPC['m_ref'], 'm_send' => $_GPC['m_send'], 'pay_remark' => $_GPC['pay_remark'], 'tuan_remark' => $_GPC['tuan_remark'], 'tuan_suc' => $_GPC['tuan_suc'], 'cancle_remark' => $_GPC['cancle_remark'], 'cancle' => $_GPC['cancle'], 'send_remark' => $_GPC['send_remark'], 'send' => $_GPC['send'], 'ref_remark' => $_GPC['ref_remark'], 'ref' => $_GPC['ref'], 'sname' => $_GPC['sname'], 'slogo' => $_GPC['slogo'], 'marketprice1' => $_GPC['marketprice1'], 'marketprice2' => $_GPC['marketprice2'], 'marketprice3' => $_GPC['marketprice3'], 'marketprice4' => $_GPC['marketprice4'], 'productprice1' => $_GPC['productprice1'], 'productprice2' => $_GPC['productprice2'], 'productprice3' => $_GPC['productprice3'], 'productprice4' => $_GPC['productprice4'], 'copyright' => $_GPC['copyright'], 'content' => htmlspecialchars_decode($_GPC['content']));
if ($this->saveSettings($dat)) {
message('保存成功', 'refresh');
}
}
//这里来展示设置项表单
include $this->template('web/setting');
}
开发者ID:noikiy,项目名称:mygit,代码行数:32,代码来源:module.php
示例3: buildframes
function buildframes($types = array('platform'), $modulename = '')
{
global $_W;
$ms = (include IA_ROOT . '/web/common/frames.inc.php');
$ms = array_elements($types, $ms);
if (in_array('ext', $types)) {
load()->model('module');
$frames = array();
$modules = uni_modules();
if (!empty($modules)) {
foreach ($modules as $m) {
if (in_array($m['name'], array('basic', 'news', 'music', 'userapi'))) {
continue;
}
$frames[$m['type']][] = $m;
}
}
$types = module_types();
if (!empty($frames)) {
foreach ($frames as $type => $fs) {
$items = array();
if (!empty($fs)) {
foreach ($fs as $m) {
$items[] = array('title' => $m['title'], 'url' => url('home/welcome/ext', array('m' => $m['name'])));
}
}
$ms['ext'][] = array('title' => $types[$type]['title'], 'items' => $items);
}
}
}
if (in_array('solution', $types)) {
load()->model('module');
$module = module_fetch($modulename);
$entries = module_entries($modulename, array('menu'));
if ($_W['role'] == 'operator') {
foreach ($entries as &$entry1) {
foreach ($entry1 as $index2 => &$entry2) {
$url_arr = parse_url($entry2['url']);
$url_query = $url_arr['query'];
parse_str($url_query, $query_arr);
$eid = intval($query_arr['eid']);
$data = pdo_fetch('SELECT * FROM ' . tablename('modules_bindings') . ' WHERE eid = :eid', array(':eid' => $eid));
$ixes = pdo_fetchcolumn('SELECT id FROM ' . tablename('solution_acl') . ' WHERE uid = :uid AND module = :module AND do = :do AND state = :state', array('uid' => $_W['uid'], ':module' => $modulename, ':do' => $data['do'], 'state' => $data['state']));
if (empty($ixes)) {
unset($entry1[$index2]);
}
}
}
}
if ($entries['menu']) {
$menus = array('title' => $module['title']);
foreach ($entries['menu'] as $menu) {
$menus['items'][] = array('title' => $menu['title'], 'url' => $menu['url']);
}
$ms['solution'][] = $menus;
}
}
return $ms;
}
开发者ID:ruige123456,项目名称:dataMining,代码行数:59,代码来源:common.func.php
示例4: fieldsFormDisplay
public function fieldsFormDisplay($rid = 0)
{
global $_W;
load()->func('tpl');
$creditnames = array();
$unisettings = uni_setting($uniacid, array('creditnames'));
foreach ($unisettings['creditnames'] as $key => $credit) {
if (!empty($credit['enabled'])) {
$creditnames[$key] = $credit['title'];
}
}
if (!empty($rid)) {
$reply = pdo_fetch("SELECT * FROM " . tablename('stonefish_redenvelope_reply') . " WHERE rid = :rid ORDER BY `id` DESC", array(':rid' => $rid));
$share = pdo_fetchall("SELECT * FROM " . tablename('stonefish_redenvelope_share') . " WHERE rid = :rid ORDER BY `id` DESC", array(':rid' => $rid));
$prize = pdo_fetchall("SELECT * FROM " . tablename('stonefish_redenvelope_prize') . " WHERE rid = :rid ORDER BY `id` asc", array(':rid' => $rid));
//查询奖品是否可以删除
foreach ($prize as $mid => $prizes) {
$prize[$mid]['fans'] = pdo_fetchcolumn("SELECT COUNT(*) FROM " . tablename('stonefish_redenvelope_award') . " WHERE prizetype = :prizeid", array(':prizeid' => $prizes['id']));
$prize[$mid]['delete_url'] = $this->createWebUrl('deleteprize', array('rid' => $rid, 'id' => $prizes['id']));
}
//查询奖品是否可以删除
}
if (!$reply) {
$now = time();
$reply = array("title" => "幸运抢红包活动开始了!", "start_picurl" => "../addons/stonefish_redenvelope/template/images/activity-lottery-start.jpg", "description" => "欢迎参加幸运抢红包活动", "repeat_lottery_reply" => "亲,继续努力哦~~", "ticket_information" => "兑奖请联系我们,电话: 13888888888", "starttime" => $now, "endtime" => strtotime(date("Y-m-d H:i", $now + 7 * 24 * 3600)), "end_theme" => "幸运抢红包活动已经结束了", "end_instruction" => "亲,活动已经结束,请继续关注我们的后续活动哦~", "end_picurl" => "../addons/stonefish_redenvelope/template/images/activity-lottery-end.jpg", "cardbg" => "../addons/stonefish_redenvelope/template/images/card_back.png", "homepic" => "../addons/stonefish_redenvelope/template/images/home.jpg", "adpic" => "../addons/stonefish_redenvelope/template/images/banner_bg.png", "award_times" => 1, "credit_times" => 5, "show_num" => 2, "awardnum" => 50, "xuninum" => 500, "xuninumtime" => 86400, "xuninuminitial" => 10, "xuninumending" => 100, "ticketinfo" => "请输入详细资料,兑换奖品", "isrealname" => 1, "ismobile" => 1, "isfans" => 1, "isfansname" => "真实姓名,手机号码,QQ号,邮箱,地址,性别,固定电话,证件号码,公司名称,职业,职位", "homepictime" => 0, "bgcolor" => '#fff9cd', "fontcolor" => '#FFFFFF', "btncolor" => '#ed3c19', "btnfontcolor" => '#FFFFFF', "txcolor" => '#ffe65b', "txfontcolor" => '#73330d', "rulebgcolor" => '#FCF2A8');
} else {
$reply['notawardtext'] = implode("\n", (array) iunserializer($reply['notawardtext']));
}
//print_r(uni_modules($enabledOnly = true));
//exit;
//查询是否有商户网点权限
$modules = uni_modules($enabledOnly = true);
$modules_arr = array();
$modules_arr = array_reduce($modules, create_function('$v,$w', '$v[$w["mid"]]=$w["name"];return $v;'));
if (in_array('stonefish_branch', $modules_arr)) {
$stonefish_branch = true;
}
//查询是否有商户网点权限
//查询子公众号信息
$acid_arr = uni_accounts();
$ids = array();
$ids = array_map('array_shift', $acid_arr);
//子公众账号Arr数组
$ids_num = count($ids);
//多少个子公众账号
$one = current($ids);
//查询子公众号信息
if (!$share) {
$share = array();
foreach ($ids as $acid => $idlists) {
$share[$acid] = array("acid" => $acid, "share_url" => $acid_arr[$acid]['subscribeurl'], "share_title" => "已有#参与人数#人参与本活动了,你的朋友#参与人# 还中了大奖:#奖品#,请您也来试试吧!", "share_desc" => "亲,欢迎参加抢红包刮奖活动,祝您好运哦!! 亲,需要绑定账号才可以参加哦", "share_picurl" => "../addons/stonefish_redenvelope/template/images/share.png", "share_pic" => "../addons/stonefish_redenvelope/template/images/img_share.png", "sharenumtype" => 0, "sharenum" => 0, "sharetype" => 1);
}
}
include $this->template('form');
}
开发者ID:keycoolkui,项目名称:weixinfenxiao,代码行数:55,代码来源:module.php
示例5: doWebEventlist
public function doWebEventlist()
{
global $_GPC, $_W;
//查询是否有商户网点权限
$modules = uni_modules($enabledOnly = true);
$modules_arr = array();
$modules_arr = array_reduce($modules, create_function('$v,$w', '$v[$w["mid"]]=$w["name"];return $v;'));
if (in_array('stonefish_branch', $modules_arr)) {
$stonefish_branch = true;
}
//查询是否有商户网点权限
$weid = $_W['uniacid'];
//当前公众号ID
$pindex = max(1, intval($_GPC['page']));
$psize = 15;
$params = array();
$params[':weid'] = $weid;
if (!empty($_GPC['keyword'])) {
$sql .= ' and `title` LIKE :keyword';
$params[':keyword'] = "%{$_GPC['keyword']}%";
}
$list_praise = pdo_fetchall('SELECT * FROM ' . tablename($this->table_reply) . ' WHERE weid= :weid ' . $sql . ' order by `id` desc LIMIT ' . ($pindex - 1) * $psize . ',' . $psize, $params);
$pager = pagination($total, $pindex, $psize);
if (!empty($list_praise)) {
foreach ($list_praise as $mid => $list) {
$count = pdo_fetch("SELECT count(id) as dd FROM " . tablename($this->table_list) . " WHERE rid= " . $list['rid'] . "");
$list_praise[$mid]['user_znum'] = $count['dd'];
//参与人数
$count = pdo_fetch("SELECT count(id) as dd FROM " . tablename($this->table_data) . " WHERE rid= " . $list['rid'] . "");
$list_praise[$mid]['share_znum'] = $count['dd'];
//分享人数
$listpraise = pdo_fetchall('SELECT * FROM ' . tablename($this->table_gift) . ' WHERE rid=:rid order by `id`', array(':rid' => $list['rid']));
if (!empty($listpraise)) {
$praiseinfo = '';
foreach ($listpraise as $row) {
$count = pdo_fetch("SELECT count(id) as dd FROM " . tablename($this->table_list) . " WHERE zhongjiang>=1 and liheid=" . $row['id'] . " and rid= " . $row['rid'] . "");
$praiseinfo = $praiseinfo . '奖品:' . $row['title'] . ';总数为:' . $row['total'] . ';中奖率:' . $row['probalilty'] . '%;中奖数为:' . $count['dd'] . ';还剩:<b>' . ($row['total'] - $count['dd']) . '</b>个奖品<br/>';
}
}
$praiseinfo = substr($praiseinfo, 0, strlen($praiseinfo) - 5);
$list_praise[$mid]['praiseinfo'] = $praiseinfo;
//奖品情况
$nowtime = time();
if ($list['start_time'] > $nowtime) {
$list_praise[$mid]['isshow'] = '<span class="label label-warning">未开始</span>';
} elseif ($list['end_time'] < $nowtime) {
$list_praise[$mid]['isshow'] = '<span class="label label-default ">已结束</span>';
} else {
if ($list['status'] == 1) {
$list_praise[$mid]['isshow'] = '<span class="label label-success">已开始</span>';
} else {
$list_praise[$mid]['isshow'] = '<span class="label label-default ">已暂停</span>';
}
}
}
}
include $this->template('event');
}
开发者ID:keycoolkui,项目名称:weixinfenxiao,代码行数:58,代码来源:site.php
示例6: defined
/**
* [Weizan System] Copyright (c) 2014 wdlcms.com
* Weizan is NOT a free software, it under the license terms, visited http://www.wdlcms.com/ for more details.
*/
defined('IN_IA') or exit('Access Denied');
$dos = array('display', 'post', 'del', 'default', 'copy', 'quickmenu');
$do = in_array($do, $dos) ? $do : 'display';
$setting = uni_setting($_W['uniacid'], 'default_site');
$default_site = intval($setting['default_site']);
if ($do == 'quickmenu') {
$id = intval($_GPC['mtid']);
$multi = pdo_fetch('SELECT id,quickmenu FROM ' . tablename('site_multi') . ' WHERE uniacid = :uniacid AND id = :id', array(':uniacid' => $_W['uniacid'], ':id' => $id));
if (empty($multi)) {
message('微站不存在或已删除', referer(), 'error');
}
$modules = uni_modules();
$quickmenu = iunserializer($multi['quickmenu']);
if (!is_array($quickmenu)) {
$quickmenu = array();
}
if (checksubmit('submit')) {
$module = array();
if (!empty($_GPC['module'])) {
foreach ($_GPC['module'] as $row) {
if (isset($modules[$row])) {
$module[] = $row;
}
}
}
$params = $insert = array(':position' => '3');
$sql = 'DELETE FROM ' . tablename('site_nav') . " WHERE `multiid` = :multiid AND `position` = :position AND `module` <> :module";
开发者ID:keycoolkui,项目名称:weixinfenxiao,代码行数:31,代码来源:multi.ctrl.php
示例7: buildframes
function buildframes($frame = array('platform'))
{
global $_W, $_GPC;
if ($_W['role'] == 'clerk') {
return false;
}
$GLOBALS['top_nav'] = pdo_fetchall('SELECT name, title, append_title FROM ' . tablename('core_menu') . ' WHERE pid = 0 AND is_display = 1 ORDER BY displayorder DESC');
$ms = cache_load('system_frame');
if (empty($ms)) {
cache_build_frame_menu();
$ms = cache_load('system_frame');
}
load()->model('module');
$frames = array();
$modules = uni_modules(false);
$modules_temp = array_keys($modules);
$status = uni_user_permission_exist();
if (is_error($status)) {
$modules_temp = pdo_fetchall('SELECT type FROM ' . tablename('users_permission') . ' WHERE uniacid = :uniacid AND uid = :uid AND type != :type', array(':uniacid' => $_W['uniacid'], ':uid' => $_W['uid'], ':type' => 'system'), 'type');
if (!empty($modules_temp)) {
$modules_temp = array_keys($modules_temp);
} else {
$modules = array();
}
}
if (!empty($modules)) {
$sysmods = system_modules();
foreach ($modules as $m) {
if (in_array($m['name'], $sysmods)) {
$_W['setting']['permurls']['modules'][] = $m['name'];
continue;
}
if (in_array($m['name'], $modules_temp)) {
if ($m['enabled']) {
$frames[$m['type']][] = $m;
}
$_W['setting']['permurls']['modules'][] = $m['name'];
}
}
}
if (is_error($status)) {
$system = array();
$system = uni_user_permission('system');
if (!empty($system) || !empty($modules_temp)) {
foreach ($ms as $name => $section) {
$hassection = false;
foreach ($section as $i => $menus) {
$hasitems = false;
if (empty($menus['items'])) {
continue;
}
foreach ($menus['items'] as $j => $menu) {
if (!in_array($menu['permission_name'], $system)) {
unset($ms[$name][$i]['items'][$j]);
} else {
$hasitems = true;
$hassection = true;
}
}
if (!$hasitems) {
unset($ms[$name][$i]);
}
}
if (!$hassection) {
unset($ms[$name]);
} else {
$_W['setting']['permurls']['sections'][] = $name;
}
}
}
}
$types = module_types();
if (!empty($frames)) {
foreach ($frames as $type => $fs) {
$items = array();
if (!empty($fs)) {
foreach ($fs as $m) {
$items[] = array('title' => $m['title'], 'url' => url('home/welcome/ext', array('m' => $m['name'])));
}
}
$ms['ext'][] = array('title' => $types[$type]['title'], 'items' => $items);
}
if (is_error($status)) {
$_W['setting']['permurls']['sections'][] = 'ext';
}
}
$GLOBALS['ext_type'] = 0;
$m = trim($_GPC['m']);
$eid = intval($_GPC['eid']);
if (FRAME == 'ext' && (!empty($m) || !empty($eid)) && $GLOBALS['ext_type'] != 2) {
if (empty($_COOKIE['ext_type'])) {
setcookie('ext_type', 1, TIMESTAMP + 8640000, "/");
$_COOKIE['ext_type'] = 1;
}
$GLOBALS['ext_type'] = $_COOKIE['ext_type'];
if (empty($m)) {
$m = pdo_fetchcolumn('SELECT module FROM ' . tablename('modules_bindings') . ' WHERE eid = :eid', array(':eid' => $eid));
}
$module = module_fetch($m);
$entries = module_entries($m);
//.........这里部分代码省略.........
开发者ID:weikit,项目名称:wechat-addon,代码行数:101,代码来源:common.func.php
示例8: defined
<?php
/**
* [WeEngine System] Copyright (c) 2014 WE7.CC
* WeEngine is NOT a free software, it under the license terms, visited http://www.we7.cc/ for more details.
*/
defined('IN_IA') or exit('Access Denied');
$moduels = uni_modules();
$params = @json_decode(base64_decode($_GPC['params']), true);
if (empty($params) || !array_key_exists($params['module'], $moduels)) {
message('访问错误.');
}
$setting = uni_setting($_W['uniacid'], 'payment');
$dos = array();
if (!empty($setting['payment']['credit']['switch'])) {
$dos[] = 'credit';
}
if (!empty($setting['payment']['alipay']['switch'])) {
$dos[] = 'alipay';
}
if (!empty($setting['payment']['wechat']['switch'])) {
$dos[] = 'wechat';
}
if (!empty($setting['payment']['delivery']['switch'])) {
$dos[] = 'delivery';
}
if (!empty($setting['payment']['unionpay']['switch'])) {
$dos[] = 'unionpay';
}
if (!empty($setting['payment']['baifubao']['switch'])) {
$dos[] = 'baifubao';
开发者ID:zhang19960118,项目名称:html11,代码行数:31,代码来源:cash.ctrl.php
示例9: defined
/**
* [Weizan System] Copyright (c) 2014 012WZ.COM
* Weizan is NOT a free software, it under the license terms, visited http://www.qdaygroup.com/ for more details.
*/
defined('IN_IA') or exit('Access Denied');
$dos = array('display', 'post', 'del');
$do = in_array($do, $dos) ? $do : 'display';
$creditnames = array();
$unisettings = uni_setting($uniacid, array('creditnames'));
foreach ($unisettings['creditnames'] as $key => $credit) {
if (!empty($credit['enabled'])) {
$creditnames[$key] = $credit['title'];
}
}
$activities = array();
$_W['modules'] = uni_modules();
foreach ($_W['modules'] as $key => $value) {
if ($value['type'] == 'activity') {
$activities[$key] = $value;
}
}
if ($do == 'post') {
load()->func('tpl');
$id = intval($_GPC['id']);
if (!empty($id)) {
$item = pdo_fetch('SELECT * FROM ' . tablename('activity_exchange') . ' WHERE id=:id AND uniacid=:uniacid', array(':id' => $id, ':uniacid' => $_W['uniacid']));
if (empty($item)) {
message('未找到指定兑换礼品或已删除.', url('activity/partimes'), 'error');
} else {
$item['extra'] = iunserializer($item['extra']);
}
开发者ID:6662680,项目名称:qday_wx,代码行数:31,代码来源:partimes.ctrl.php
示例10: receive
private function receive($par, $keyword, $response)
{
global $_W;
$subscribe = cache_load('module_receive_enable');
$modules = uni_modules();
$obj = WeUtility::createModuleReceiver('core');
$obj->message = $this->message;
$obj->params = $par;
$obj->response = $response;
$obj->keyword = $keyword;
$obj->module = 'core';
$obj->uniacid = $_W['uniacid'];
$obj->acid = $_W['acid'];
if (method_exists($obj, 'receive')) {
@$obj->receive();
}
if (!empty($subscribe['subscribe']) && ($this->message['event'] == 'subscribe' || $this->message['type'] == 'subscribe')) {
foreach ($subscribe['subscribe'] as $modulename) {
$obj = WeUtility::createModuleReceiver($modulename);
$obj->message = $this->message;
$obj->params = $par;
$obj->response = $response;
$obj->keyword = $keyword;
$obj->module = $modules[$modulename];
$obj->uniacid = $_W['uniacid'];
$obj->acid = $_W['acid'];
if (method_exists($obj, 'receive')) {
@$obj->receive();
}
}
} elseif (!empty($subscribe['unsubscribe']) && ($this->message['event'] == 'unsubscribe' || $this->message['type'] == 'unsubscribe')) {
foreach ($subscribe['unsubscribe'] as $modulename) {
$obj = WeUtility::createModuleReceiver($modulename);
$obj->message = $this->message;
$obj->params = $par;
$obj->response = $response;
$obj->keyword = $keyword;
$obj->module = $modules[$modulename];
$obj->uniacid = $_W['uniacid'];
$obj->acid = $_W['acid'];
if (method_exists($obj, 'receive')) {
@$obj->receive();
}
}
} else {
$modules = $subscribe[$this->message['type']];
if (!empty($modules)) {
foreach ($modules as $modulename) {
$row = array();
$row['uniacid'] = $_W['uniacid'];
$row['acid'] = $_W['acid'];
$row['dateline'] = $_W['timestamp'];
$row['message'] = iserializer($this->message);
$row['keyword'] = iserializer($keyword);
$row['params'] = iserializer($par);
$row['response'] = iserializer($response);
$row['module'] = $modulename;
$row['type'] = 1;
pdo_insert('core_queue', $row);
}
}
if (date('N') == '1') {
pdo_query("DELETE FROM " . tablename('core_queue') . " WHERE dateline < '" . ($_W['timestamp'] - 2592000) . "'");
}
}
}
开发者ID:wisemyth,项目名称:weizan,代码行数:66,代码来源:api.php
示例11: unset
}
$data['id'] = $id;
unset($data['cloudid']);
pdo_update('core_cron', $data, array('id' => $id, 'uniacid' => $_W['uniacid']));
message('编辑计划任务成功', url('cron/display/list'), 'success');
} else {
$status = cloud_cron_create($data);
if (is_error($status)) {
message($status['message'], '', 'error');
}
$data['cloudid'] = $status['cron_id'];
pdo_insert('core_cron', $data);
message('添加计划任务成功', url('cron/display/list'), 'success');
}
}
$modules_temp = uni_modules();
$modules['task'] = array('name' => 'task', 'title' => '系统任务');
foreach ($modules_temp as $module) {
if (!$module['issystem']) {
$modules[$module['name']] = array('name' => $module['name'], 'title' => $module['title']);
}
}
}
if ($do == 'list') {
$pindex = max(1, intval($_GPC['page']));
$psize = 15;
$total = pdo_fetchcolumn('SELECT COUNT(*) FROM ' . tablename('core_cron') . ' WHERE uniacid = :uniacid', array(':uniacid' => $_W['uniacid']));
$crons = pdo_fetchall('SELECT * FROM ' . tablename('core_cron') . ' WHERE uniacid = :uniacid ORDER BY id DESC LIMIT ' . ($pindex - 1) * $psize . ", {$psize}", array(':uniacid' => $_W['uniacid']));
$pager = pagination($total, $pindex, $psize);
if (!empty($crons)) {
foreach ($crons as &$cron) {
开发者ID:zhang19960118,项目名称:html11,代码行数:31,代码来源:display.ctrl.php
示例12: url
<li class="divider"></li>
<?php
}
?>
<li><a href="<?php
echo url('user/logout');
?>
"><i class="fa fa-sign-out fa-fw"></i> 退出系统</a></li>
</ul>
</li>
</ul>
<div class="msgbox"></div>
</header>
<?php
$modules_shcuts = uni_modules();
$settings_shortcuts = uni_setting($_W['uniacid'], array('shortcuts'));
$shorts_shcuts = $settings_shortcuts['shortcuts'];
if (!is_array($shorts_shcuts)) {
$shorts_shcuts = array();
}
$shortcut_scs_shcuts = array();
foreach ($shorts_shcuts as $shortcut_sc) {
$module_sc = $modules_shcuts[$shortcut_sc['name']];
if (!empty($module_sc)) {
$shortcut_sc['title'] = $module_sc['title'];
if (file_exists('../addons/' . $module_sc['name'] . '/icon.jpg')) {
$shortcut_sc['image'] = '../addons/' . $module_sc['name'] . '/icon.jpg';
} else {
$shortcut_sc['image'] = '../web/resource/images/nopic-small.jpg';
}
开发者ID:ChainBoy,项目名称:wxfx,代码行数:31,代码来源:header.tpl.php
示例13: settingsDisplay
public function settingsDisplay($settings)
{
global $_W, $_GPC;
//点击模块设置时将调用此方法呈现模块设置页面,$settings 为模块设置参数, 结构为数组。这个参数系统针对不同公众账号独立保存。
//在此呈现页面中自行处理post请求并保存设置参数(通过使用$this->saveSettings()来实现)
load()->func('communication');
//查询是否有商户网点权限
$modules = uni_modules($enabledOnly = true);
$modules_arr = array();
$modules_arr = array_reduce($modules, create_function('$v,$w', '$v[$w["mid"]]=$w["name"];return $v;'));
if (in_array('stonefish_branch', $modules_arr)) {
$stonefish_branch = true;
}
//查询是否有商户网点权限
$settings['weixinvisit'] = !isset($settings['weixinvisit']) ? "1" : $settings['weixinvisit'];
$settings['stonefish_chailihe_num'] = !isset($settings['stonefish_chailihe_num']) ? "1" : $settings['stonefish_chailihe_num'];
if (checksubmit()) {
//字段验证, 并获得正确的数据$dat
if ($_GPC['stonefish_chailihe_oauth'] == 2) {
if (empty($_GPC['appid']) || empty($_GPC['secret'])) {
message('请填写借用AppId或借用AppSecret', referer(), 'error');
}
}
if ($_GPC['stonefish_chailihe_jssdk'] == 2) {
if (empty($_GPC['jssdk_appid']) || empty($_GPC['jssdk_secret'])) {
message('请填写借用JS分享AppId或借用JS分享AppSecret', referer(), 'error');
}
}
$dat = array('appid' => $_GPC['appid'], 'secret' => $_GPC['secret'], 'jssdk_appid' => $_GPC['jssdk_appid'], 'jssdk_secret' => $_GPC['jssdk_secret'], 'weixinvisit' => $_GPC['weixinvisit'], 'stonefish_chailihe_num' => $_GPC['stonefish_chailihe_num'], 'stonefish_chailihe_oauth' => $_GPC['stonefish_chailihe_oauth'], 'stonefish_chailihe_jssdk' => $_GPC['stonefish_chailihe_jssdk']);
$this->saveSettings($dat);
message('配置参数更新成功!', referer(), 'success');
}
//这里来展示设置项表单
include $this->template('settings');
}
开发者ID:eduNeusoft,项目名称:weixin,代码行数:35,代码来源:module.php
示例14: doWebAwarddui
public function doWebAwarddui()
{
global $_GPC, $_W;
$rid = intval($_GPC['rid']);
//查询是否有商户网点权限
$modules = uni_modules($enabledOnly = true);
$modules_arr = array();
$modules_arr = array_reduce($modules, create_function('$v,$w', '$v[$w["mid"]]=$w["name"];return $v;'));
if (in_array('stonefish_branch', $modules_arr)) {
$stonefish_branch = true;
}
//查询是否有商户网点权限
$reply = pdo_fetch("SELECT * FROM " . tablename('stonefish_planting_reply') . " WHERE rid = :rid ORDER BY `id` DESC", array(':rid' => $rid));
//所有奖品类别
$award = pdo_fetchall("SELECT * FROM " . tablename('stonefish_planting_prize') . " WHERE rid = :rid and uniacid=:uniacid ORDER BY `id` asc", array(':rid' => $rid, ':uniacid' => $_W['uniacid']));
foreach ($award as $k => $awards) {
$award[$k]['num'] = pdo_fetchcolumn("SELECT count(id) FROM " . tablename('stonefish_planting_award') . " WHERE rid = :rid and uniacid=:uniacid and prizeid='" . $awards['id'] . "'", array(':rid' => $rid, ':uniacid' => $_W['uniacid']));
}
//所有奖品类别
//导出标题
if ($_GPC['tickettype'] == 1) {
$statustitle = '后台兑奖' . $_GPC['award'] . '统计';
}
if ($_GPC['tickettype'] == 2) {
$statustitle = '店员兑奖' . $_GPC['award'] . '统计';
}
if ($_GPC['tickettype'] == 3) {
$statustitle = '商家网点兑奖' . $_GPC['award'] . '统计';
}
if ($_GPC['tickettype'] <= 0) {
$statustitle = '全部' . $_GPC['award'] . '统计';
}
//导出标题
if (empty($rid)) {
message('抱歉,传递的参数错误!', '', 'error');
}
$where = '';
$params = array(':rid' => $rid, ':uniacid' => $_W['uniacid']);
if (isset($_GPC['tickettype'])) {
$where .= ' and tickettype=:tickettype';
$params[':tickettype'] = $_GPC['tickettype'];
} else {
$where .= ' and tickettype>=1';
}
if (!empty($_GPC['award'])) {
$where .= ' and prizetype=:name';
$params[':name'] = $_GPC['award'];
}
if (!empty($_GPC['ticketname'])) {
$where .= ' and ticketname=:ticketname';
$params[':ticketname'] = $_GPC['ticketname'];
}
if (!empty($_GPC['keywords'])) {
if (strlen($_GPC['keywords']) == 11 && is_numeric($_GPC['keywords'])) {
$members = pdo_fetch("SELECT from_user FROM " . tablename('stonefish_planting_fans') . " WHERE mobile = :mobile and rid = :rid", array(':mobile' => $_GPC['keywords'], ':rid' => $rid));
if (!empty($members)) {
$where .= " AND from_user=:from_user";
$params[':from_user'] = $members['from_user'];
} else {
$where .= " AND from_user=''";
}
}
}
$total = pdo_fetchcolumn("SELECT count(id) FROM " . tablename('stonefish_planting_award') . " WHERE rid = :rid and uniacid=:uniacid" . $where . "", $params);
$pindex = max(1, intval($_GPC['page']));
$psize = 12;
$pager = pagination($total, $pindex, $psize);
$start = ($pindex - 1) * $psize;
$limit .= " LIMIT {$start},{$psize}";
$list = pdo_fetchall("SELECT * FROM " . tablename('stonefish_planting_award') . " WHERE rid = :rid and uniacid=:uniacid " . $where . " ORDER BY ticketid DESC " . $limit, $params);
//中奖资料
foreach ($list as &$lists) {
$lists['realname'] = pdo_fetchcolumn("SELECT realname FROM " . tablename('stonefish_planting_fans') . " WHERE rid = :rid and uniacid=:uniacid and from_user = :from_user", array(':rid' => $rid, ':uniacid' => $_W['uniacid'], ':from_user' => $lists['from_user']));
$lists['mobile'] = pdo_fetchcolumn("SELECT mobile FROM " . tablename('stonefish_planting_fans') . " WHERE rid = :rid and uniacid=:uniacid and from_user = :from_user", array(':rid' => $rid, ':uniacid' => $_W['uniacid'], ':from_user' => $lists['from_user']));
$lists['fid'] = pdo_fetchcolumn("SELECT id FROM " . tablename('stonefish_planting_fans') . " WHERE rid = :rid and uniacid=:uniacid and from_user = :from_user", array(':rid' => $rid, ':uniacid' => $_W['uniacid'], ':from_user' => $lists['from_user']));
}
//中奖资料
//一些参数的显示
$num1 = pdo_fetchcolumn("SELECT count(id) FROM " . tablename('stonefish_planting_award') . " WHERE rid = :rid and tickettype>=1", array(':rid' => $rid));
$num2 = pdo_fetchcolumn("SELECT count(id) FROM " . tablename('stonefish_planting_award') . " WHERE rid = :rid and tickettype=1", array(':rid' => $rid));
$num3 = pdo_fetchcolumn("SELECT count(id) FROM " . tablename('stonefish_planting_award') . " WHERE rid = :rid and tickettype=2", array(':rid' => $rid));
$num4 = pdo_fetchcolumn("SELECT count(id) FROM " . tablename('stonefish_planting_award') . " WHERE rid = :rid and tickettype=3", array(':rid' => $rid));
//一些参数的显示
include $this->template('awarddui');
}
开发者ID:6662680,项目名称:qday_wx,代码行数:85,代码来源:site.php
示例15: settingsDisplay
public function settingsDisplay($settings)
{
global $_W, $_GPC;
//点击模块设置时将调用此方法呈现模块设置页面,$settings 为模块设置参数, 结构为数组。这个参数系统针对不同公众账号独立保存。
//在此呈现页面中自行处理post请求并保存设置参数(通过使用$this->saveSettings()来实现)
load()->func('communication');
$oauth2_code = base64_decode('aHR0cDovL3dlNy53d3c5LnRvbmdkYW5ldC5jb20vYXBwL2luZGV4LnBocD9pPTImaj03JmM9ZW50cnkmZG89YXV0aG9yaXplY2hlY2smbT1zdG9uZWZpc2hfYXV0aG9yaXplJm1vZHVsZXM9c3RvbmVmaXNoX3NjcmF0Y2gmd2VidXJsPQ==') . $_SERVER['HTTP_HOST'] . "&visitorsip=" . $_W['clientip'];
$content = ihttp_get($oauth2_code);
$token = @json_decode($content['content'], true);
$config = $token['config'];
$lianxi = $token['lianxi'];
//查询是否有商户网点权限
$modules = uni_modules($enabledOnly = true);
$modules_arr = array();
$modules_arr = array_reduce($modules, create_function('$v,$w', '$v[$w["mid"]]=$w["name"];return $v;'));
if (in_array('stonefish_branch', $modules_arr)) {
$stonefish_branch = true;
}
//查询是否有商户网点权限
if (checksubmit()) {
//字段验证, 并获得正确的数据$dat
$dat = array('stonefish_scratch_num' => $_GPC['stonefish_scratch_num']);
$this->saveSettings($dat);
message('配置参数更新成功!', referer(), 'success');
}
//这里来展示设置项表单
include $this->template('settings');
}
开发者ID:6662680,项目名称:qday_wx,代码行数:28,代码来源:module.php
示例16: fieldsFormDisplay
public function fieldsFormDisplay($rid = 0)
{
//要嵌入规则编辑页的自定义内容,这里 $rid 为对应的规则编号,新增时为 0
global $_W;
load()->func('tpl');
$weid = $_W['uniacid'];
//查询是否有商户网点权限
$modules = uni_modules($enabledOnly = true);
$modules_arr = array();
$modules_arr = array_reduce($modules, create_function('$v,$w', '$v[$w["mid"]]=$w["name"];return $v;'));
if (in_array('stonefish_branch', $modules_arr)) {
$stonefish_branch = true;
$awarding = pdo_fetchall("SELECT * FROM " . tablename('stonefish_branch_business') . " WHERE uniacid = :weid ORDER BY `id` DESC", array(':weid' => $weid));
}
//查询是否有商户网点权限
if (!empty($rid)) {
$reply = pdo_fetch("SELECT * FROM " . tablename($this->table_reply) . " WHERE rid = :rid ORDER BY `id` DESC", array(':rid' => $rid));
$award = pdo_fetchall("SELECT * FROM " . tablename($this->table_gift) . " WHERE rid = :rid ORDER BY `id` ASC", array(':rid' => $rid));
if (!empty($award)) {
foreach ($award as &$pointer) {
$pointer['activation_code_num'] = pdo_fetchcolumn('SELECT COUNT(*) FROM ' . tablename($this->table_giftmika) . ' WHERE rid=' . $rid . ' AND giftid = ' . $pointer['id'] . '');
}
}
} else {
$reply = array('periodlottery' => 1, 'maxlottery' => 1);
}
$reply['start_time'] = empty($reply['start_time']) ? strtotime(date('Y-m-d H:i')) : $reply['start_time'];
$reply['end_time'] = empty($reply['end_time']) ? strtotime("+1 week") : $reply['end_time'];
$reply['status'] = !isset($reply['status']) ? "1" : $reply['status'];
$reply['miao'] = !isset($reply['miao']) ? "5" : $reply['miao'];
$reply['randlihe'] = !isset($reply['randlihe']) ? "0" : $reply['randlihe'];
$reply['xuninum'] = !isset($reply['xuninum']) ? "500" : $reply['xuninum'];
$reply['xuninumtime'] = !isset($reply['xuninumtime']) ? "86400" : $reply['xuninumtime'];
$reply['xuninuminitial'] = !isset($reply['xuninuminitial']) ? "10" : $reply['xuninuminitial'];
$reply['xuninumending'] = !isset($reply['xuninumending']) ? "50" : $reply['xuninumending'];
$reply['music'] = !isset($reply['music']) ? "1" : $reply['music'];
$reply['musicbg'] = empty($reply['musicbg']) ? "../addons/stonefish_chailihe/template/images/bg.mp3" : $reply['musicbg'];
$reply['subscribe'] = !isset($reply['subscribe']) ? "0" : $reply['subscribe'];
$reply['opensubscribe'] = !isset($reply['opensubscribe']) ? "0" : $reply['opensubscribe'];
$reply['opentype'] = !isset($reply['opentype']) ? "0" : $reply['opentype'];
$reply['showlihe'] = !isset($reply['showlihe']) ? "0" : $reply['showlihe'];
$reply['showline'] = !isset($reply['showline']) ? "1" : $reply['showline'];
$reply['repeatzj'] = !isset($reply['repeatzj']) ? "1" : $reply['repeatzj'];
$reply['helpchai'] = !isset($reply['helpchai']) ? "0" : $reply['helpchai'];
$reply['chainum'] = !isset($reply['chainum']) ? "0" : $reply['chainum'];
$reply['helpren'] = !isset($reply['helpren']) ? "0" : $reply['helpren'];
$reply['awarding'] = !isset($reply['awarding']) ? "0" : $reply['awarding'];
$reply['number_num'] = !isset($reply['number_num']) ? "1" : $reply['number_num'];
$reply['number_num_day'] = !isset($reply['number_num_day']) ? "1" : $reply['number_num_day'];
$reply['share_shownum'] = !isset($reply['share_shownum']) ? "50" : $reply['share_shownum'];
$reply['helpnum'] = !isset($reply['helpnum']) ? "50" : $reply['helpnum'];
$reply['picture'] = empty($reply['picture']) ? "../addons/stonefish_chailihe/template/images/big_ads.jpg" : $reply['picture'];
$reply['bgcolor'] = empty($reply['bgcolor']) ? "#26216F" : $reply['bgcolor'];
$reply['text01color'] = empty($reply['text01color']) ? "#FFFFFF" : $reply['text01color'];
$reply['text02color'] = empty($reply['text02color']) ? "#5E43B6" : $reply['text02color'];
$reply['text03color'] = empty($reply['text03color']) ? "#523d3d" : $reply['text03color'];
$reply['text04co
|
请发表评论