本文整理汇总了PHP中addons_page函数的典型用法代码示例。如果您正苦于以下问题:PHP addons_page函数的具体用法?PHP addons_page怎么用?PHP addons_page使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了addons_page函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: do_rule
public function do_rule()
{
global $_GP;
$xc_zjp = mysqld_select("SELECT * FROM " . table('xc_zjp_reply') . " LIMIT 1");
$member = get_member_account(true, intval($xc_zjp['needreg']) == 1);
$openid = $member['openid'];
$myuser = mysqld_select("SELECT id,points,count FROM " . table('xc_zjp_user') . " WHERE open_id = '{$openid}' ");
include addons_page('rule');
}
示例2: parseFloat
//移动端版本兼容
if(/Android (\d+\.\d+)/.test(navigator.userAgent)){
var version = parseFloat(RegExp.$1);
if(version>2.3){
var phoneScale = parseInt(window.screen.width)/640;
document.write('<meta name="viewport" content="width=640, minimum-scale = '+ phoneScale +', maximum-scale = '+ phoneScale +', target-densitydpi=device-dpi">');
}else{
document.write('<meta name="viewport" content="width=640, target-densitydpi=device-dpi">');
}
}else{
document.write('<meta name="viewport" content="width=640, user-scalable=no, target-densitydpi=device-dpi">');
}
</script>
<?php
include addons_page('share');
?>
<link rel="stylesheet" type="text/css" href="<?php
echo WEBSITE_ROOT;
?>
/addons/addon10/resource/21/assets/styles/app.min.css?ver=3.6"/>
</head>
<body class="app" data-app-id="5261" data-ad="1">
<span style="display:none;" id="activity_id">5261</span>
<img style='display:none;' src="<?php
echo WEBSITE_ROOT;
?>
/addons/addon10/resource/20/res/img/loading_large.gif" />
<?php
示例3: mysqld_delete
<?php
$operation = !empty($_GP['op']) ? $_GP['op'] : 'display';
if ($operation == 'delete') {
mysqld_delete('addon10_scene_subscribe', array("id" => intval($_GP['id'])));
message("删除成功!", "refresh", "success");
}
$subscribe_list = mysqld_selectall("SELECT subscribe.*,sl.title FROM " . table('addon10_scene_subscribe') . " subscribe left join " . table('addon10_scene_list') . " sl on sl.id=subscribe.list_id ");
include addons_page('subscribe');
示例4: max
// | WE CAN DO IT JUST FREE
// +----------------------------------------------------------------------
// | Copyright (c) 2015 http://www.baijiacms.com All rights reserved.
// +----------------------------------------------------------------------
// | Author: °Ù¼ÒÍþÐÅ <QQ:2752555327> <http://www.baijiacms.com>
// +----------------------------------------------------------------------
$condition = "";
$pindex = max(1, intval($_GP['page']));
$psize = 20;
if (!empty($_GP['start_time']) && !empty($_GP['end_time'])) {
$start_time = strtotime($_GP['start_time'] . " 00:00:01");
$end_time = strtotime($_GP['end_time'] . " 23:59:59");
} else {
$start_time = strtotime(date('Y-m-01 00:00:01', time()));
$end_time = strtotime(date('Y-m-t 23:59:59', time()));
}
$condition = " and orders.createtime>=" . $start_time . " and orders.createtime<=" . $end_time;
if (!empty($_GP['saledetailsEXP01'])) {
$psize = 9999;
$pindex = 1;
}
$list = mysqld_selectall("SELECT ordergoods.price,ordergoods.total,(select title from " . table('shop_goods') . " goods where ordergoods.goodsid=goods.id) titles,orders.createtime,orders.ordersn from " . table('shop_order_goods') . " ordergoods left join " . table('shop_order') . " orders on orders.id=ordergoods.orderid where 1=1 {$condition} order by orders.createtime desc LIMIT " . ($pindex - 1) * $psize . ',' . $psize);
$total = mysqld_selectcolumn("SELECT count(ordergoods.id) from " . table('shop_order_goods') . " ordergoods left join " . table('shop_order') . " orders on orders.id=ordergoods.orderid where 1=1 {$condition} order by orders.createtime desc");
$pager = pagination($total, $pindex, $psize);
if (!empty($_GP['saledetailsEXP01'])) {
$report = "saledetails";
require_once 'report.php';
exit;
}
include addons_page('saledetails');
示例5: mysqld_select
}
if (!empty($parentid)) {
$parent = mysqld_select("SELECT id, name FROM " . table('addon8_article_category') . " WHERE id = '{$parentid}'");
if (empty($parent)) {
message('抱歉,上级分类不存在或是已经被删除!', web_url('post'), 'error');
}
}
if (checksubmit('submit')) {
if (empty($_GP['catename'])) {
message('抱歉,请输入分类名称!');
}
$data = array('name' => $_GP['catename'], 'deleted' => 0, 'displayorder' => intval($_GP['displayorder']), 'icon' => $_GP['icon'], 'parentid' => intval($parentid));
if (!empty($id)) {
unset($data['parentid']);
mysqld_update('addon8_article_category', $data, array('id' => $id));
} else {
mysqld_insert('addon8_article_category', $data);
$id = mysqld_insertid();
}
message('更新分类成功!', web_url('category', array('op' => 'display')), 'success');
}
include addons_page('category');
} elseif ($operation == 'delete') {
$id = intval($_GP['id']);
$category = mysqld_select("SELECT id, parentid FROM " . table('addon8_article_category') . " WHERE id = '{$id}' and deleted=0 ");
if (empty($category)) {
message('抱歉,分类不存在或是已经被删除!', web_url('category', array('op' => 'display')), 'error');
}
mysqld_update('addon8_article_category', array('deleted' => 1), array('id' => $id, 'parentid' => $id), 'OR');
message('分类删除成功!', web_url('category', array('op' => 'display')), 'success');
}
示例6: mysqld_selectall
<?php
$awardlist = mysqld_selectall("select award.awardtype,award.gold,request.id,request.realname,request.mobile,request.address,award.title,award.credit_cost,award.price,request.createtime FROM " . table('addon7_request') . " request left join " . table('addon7_award') . " award on award.id=request.award_id where status=0");
include addons_page('applyed');
示例7: mysqld_insert
} else {
$insert['param'] = '';
}
if ($item == false) {
$temp = mysqld_insert('addon10_scene_page', $insert);
} else {
$temp = mysqld_update('addon10_scene_page', $insert, array('id' => $item['id']));
}
if ($temp == false) {
$this->ajaxmessage('数据提交失败');
} else {
$this->ajaxmessage('数据提交成功', web_url('scene_page', array('listid' => $list_id, 'op' => 'display')), 'success');
}
}
$uploadfolder = WEB_ROOT . '/attachment/image/addon10/';
mkdirs($uploadfolder);
$tmpfoldername = random(15);
copy(ADDONS_ROOT . 'addon10/style/img/default_bg.jpg', $uploadfolder . $tmpfoldername . 'jpg');
$tmpfoldername2 = random(15);
copy(ADDONS_ROOT . 'addon10/style/img/default_btn.png', $uploadfolder . $tmpfoldername2 . 'png');
if ($item == false) {
$item = array('listorder' => 0, 'thumb' => 'image/addon10/' . $tmpfoldername . 'jpg');
$data = array();
} else {
$data = $this->iunserializer($item['param']);
}
if (empty($data['btnimg'])) {
$data['btnimg'] = 'image/addon10/' . $tmpfoldername2 . 'png';
}
include addons_page('themes/' . $list['theme'] . '/page');
示例8: mysqld_selectall
<?php
$awardlist = mysqld_selectall("select * FROM " . table('addon7_award') . " where deleted=0");
include addons_page('awardlist');
示例9: file_upload
}
if (!empty($_GP['bg_music_url_del'])) {
$data['bg_music_url'] = '';
}
if (!empty($_FILES['bg_music_url']['tmp_name'])) {
$upload = file_upload($_FILES['bg_music_url'], 'music');
if (is_error($upload)) {
message($upload['message'], '', 'error');
}
$data['bg_music_url'] = $upload['path'];
}
mysqld_update('addon10_scene_list', $data, array('id' => $_GP['id']));
message("修改成功", "refresh", "success");
}
}
include addons_page('themes/' . $theme . '/scene_post');
exit;
}
if ($operation == 'delete') {
mysqld_delete('addon10_scene_page', array("list_id" => intval($_GP['id'])));
mysqld_delete('addon10_scene_subscribe', array("list_id" => intval($_GP['id'])));
mysqld_delete('addon10_scene_list', array("id" => intval($_GP['id'])));
message("删除成功!", "refresh", "success");
}
if ($operation == 'post') {
include addons_page('scene');
exit;
}
$scene_list = mysqld_selectall("SELECT * FROM " . table('addon10_scene_list'));
include addons_page('scene_list');
示例10: mysqld_selectall
$operation = !empty($_GP['op']) ? $_GP['op'] : 'display';
$list = mysqld_selectall("SELECT * FROM " . table('xc_zjp_award'));
if ($operation == 'post') {
$id = intval($_GP['id']);
if (checksubmit('submit')) {
$data = array('title' => $_GP['title'], 'probalilty' => intval($_GP['probalilty']), 'total' => intval($_GP['total']));
if (!empty($_FILES['description']['tmp_name'])) {
$upload = file_upload($_FILES['description']);
if (is_error($upload)) {
message($upload['message'], '', 'error');
}
$data['description'] = $upload['path'];
}
if (!empty($id)) {
mysqld_update('xc_zjp_award', $data, array('id' => $id));
} else {
mysqld_insert('xc_zjp_award', $data);
}
message('操作成功!', web_url('prizelist'), 'success');
}
$item = mysqld_select("select * from " . table('xc_zjp_award') . " where id=:id limit 1", array(":id" => $id));
include addons_page('prize');
exit;
}
if ($operation == 'delete') {
$id = intval($_GP['id']);
mysqld_delete('xc_zjp_award', array('id' => $id));
message('奖品删除成功!', web_url('prizelist'), 'success');
}
include addons_page('prizelist');
示例11: mysqld_selectall
<?php
// +----------------------------------------------------------------------
// | WE CAN DO IT JUST FREE
// +----------------------------------------------------------------------
// | Copyright (c) 2015 http://www.baijiacms.com All rights reserved.
// +----------------------------------------------------------------------
// | Author: °Ù¼Òcms <QQ:1987884799> <http://www.baijiacms.com>
// +----------------------------------------------------------------------
$goodslist = mysqld_selectall("SELECT goods.id,goods.sales from " . table('shop_goods') . " goods ");
foreach ($goodslist as $gooditem) {
$goodtotal = mysqld_selectcolumn("SELECT sum(goodorder.total) FROM " . table('shop_order_goods') . " goodorder left join " . table('shop_order') . " orders on orders.id=goodorder.orderid WHERE goodorder.goodsid = :id and orders.status>=1", array(':id' => $gooditem['id']));
if ($goodtotal > 0 && $goodslist['sales'] != $goodtotal && !empty($goodtotal)) {
mysqld_update('shop_goods', array('sales' => $goodtotal), array('id' => $gooditem['id']));
}
}
$list = mysqld_selectall("SELECT goods.*,0 as cpersent,goods.sales salescount from " . table('shop_goods') . " goods order by salescount desc ");
foreach ($list as $id => $displayorder) {
$list[$id]['cpersent'] = round($list[$id]['salescount'] / ($list[$id]['viewcount'] == 0 ? 1 : $list[$id]['viewcount']) * 100, 2);
if (empty($list[$id]['viewcount'])) {
$list[$id]['viewcount'] = 0;
}
if (empty($list[$id]['salescount'])) {
$list[$id]['salescount'] = 0;
}
if (empty($list[$id]['cpersent'])) {
$list[$id]['cpersent'] = 0;
}
}
include addons_page('productsalestatistics');
示例12: mysqld_selectall
}
if (!empty($_GP['addressname'])) {
$addressname = $_GP['addressname'];
$condition .= " and t1.tdrealname='" . $addressname . "'";
}
if (!empty($_GP['ordersn'])) {
$ordersn = $_GP['ordersn'];
$condition .= " and t1.ordersn='" . $ordersn . "'";
}
if ($isstatus == 1) {
$conditionOrderStatus = "and orders.status>=1";
} else {
$conditionOrderStatus = "and orders.status=3";
}
if (!empty($_GP['orderstatisticsEXP01'])) {
$psize = 9999;
$pindex = 1;
}
$list = mysqld_selectall("select t1.* from (SELECT orders.status,orders.id,orders.createtime,orders.ordersn,orders.price,orders.dispatchprice,orders.paytype,(orders.address_realname ) tdrealname,(concat(orders.address_province,orders.address_city,orders.address_area,orders.address_address) ) tdaddress,(orders.address_mobile ) tdmobile from " . table('shop_order') . " orders where 1=1 {$conditionOrderStatus} order by orders.createtime desc) t1 where 1=1 {$condition} LIMIT " . ($pindex - 1) * $psize . ',' . $psize);
foreach ($list as $id => $displayorder) {
$list[$id]['ordergoods'] = mysqld_selectall("SELECT (select category.name\tfrom" . table('shop_category') . " category where (0=goods.ccate and category.id=goods.pcate) or (0!=goods.ccate and category.id=goods.ccate) ) as categoryname,goods.thumb,ordersgoods.price,ordersgoods.total,goods.title,ordersgoods.optionname from " . table('shop_order_goods') . " ordersgoods left join " . table('shop_goods') . " goods on goods.id=ordersgoods.goodsid where ordersgoods.orderid=:oid order by ordersgoods.createtime desc ", array(':oid' => $list[$id]['id']));
}
$total = mysqld_selectcolumn("select count(t1.id) from (SELECT orders.* from " . table('shop_order') . " orders where 1=1 {$conditionOrderStatus} order by orders.createtime desc) t1 where 1=1 {$condition} ");
$pager = pagination($total, $pindex, $psize);
if (!empty($_GP['orderstatisticsEXP01'])) {
$report = "orderstatistics";
require_once 'report.php';
exit;
}
include addons_page('orderstatistics');
示例13: mysqld_select
<?php
$singlepage = mysqld_select("SELECT * FROM " . table('addon9_singlepage') . " where id=:id ", array(":id" => intval($_GP['id'])));
$cfg = globaSetting();
include addons_page('singlepage');
示例14: mysqld_delete
<?php
$operation = !empty($_GP['op']) ? $_GP['op'] : 'display';
if ($operation == 'delete') {
mysqld_delete('addon9_singlepage', array("id" => intval($_GP['id'])));
message("删除成功!", "refresh", "success");
}
if ($operation == 'post') {
$singlepage = mysqld_select("SELECT * FROM " . table('addon9_singlepage') . " where id='" . intval($_GP['id']) . "' ");
if (checksubmit('submit')) {
if (empty($_GP['id'])) {
$data = array('createtime' => time(), 'title' => $_GP['title'], 'open_footer' => intval($_GP['open_footer']), 'content' => htmlspecialchars_decode($_GP['content']));
mysqld_insert('addon9_singlepage', $data);
message("添加成功", create_url('site', array('name' => 'addon9', 'do' => 'singlepage', 'op' => 'post', 'id' => mysqld_insertid())), "success");
} else {
$data = array('title' => $_GP['title'], 'open_footer' => intval($_GP['open_footer']), 'content' => htmlspecialchars_decode($_GP['content']));
mysqld_update('addon9_singlepage', $data, array('id' => $_GP['id']));
message("修改成功", "refresh", "success");
}
}
include addons_page('singlepage');
exit;
}
$singlepage_list = mysqld_selectall("SELECT * FROM " . table('addon9_singlepage'));
include addons_page('singlepage_list');
示例15: message
message($upload['message'], '', 'error');
}
$data['thumb'] = $upload['path'];
}
mysqld_insert('addon8_article', $data);
message("添加成功", create_url('site', array('name' => 'addon8', 'do' => 'article', 'op' => 'post', 'id' => mysqld_insertid())), "success");
} else {
$data = array('createtime' => time(), 'pcate' => intval($_GP['pcate']), 'ccate' => intval($_GP['ccate']), 'iscommend' => intval($_GP['iscommend']), 'ishot' => intval($_GP['ishot']), 'mobileTheme' => intval($_GP['mobileTheme']), 'title' => $_GP['title'], 'readcount' => intval($_GP['readcount']), 'description' => $_GP['description'], 'content' => htmlspecialchars_decode($_GP['content']), 'displayorder' => intval($_GP['displayorder']));
if (!empty($_GP['thumb_del'])) {
$data['thumb'] = '';
}
if (!empty($_FILES['thumb']['tmp_name'])) {
file_delete($_GP['thumb_old']);
$upload = file_upload($_FILES['thumb']);
if (is_error($upload)) {
message($upload['message'], '', 'error');
}
$data['thumb'] = $upload['path'];
}
mysqld_update('addon8_article', $data, array('id' => $_GP['id']));
message("修改成功", "refresh", "success");
}
}
include addons_page('article');
exit;
}
$article_list = mysqld_selectall("SELECT * FROM " . table('addon8_article') . " order by displayorder desc");
$category_pcate = mysqld_selectall("SELECT * FROM " . table('addon8_article_category') . " where parentid=0 ", array(), 'id');
$category_ccate = mysqld_selectall("SELECT * FROM " . table('addon8_article_category') . " where parentid!=0 ", array(), 'id');
include addons_page('article_list');