当前位置: 首页>>代码示例>>PHP>>正文


PHP mobileurl函数代码示例

本文整理汇总了PHP中mobileurl函数的典型用法代码示例。如果您正苦于以下问题:PHP mobileurl函数的具体用法?PHP mobileurl怎么用?PHP mobileurl使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了mobileurl函数的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: mobile_pages

    $pages = mobile_pages($items, $page, $pagesize);
    $lists = array();
    if ($items) {
        $order = $MOD['order'];
        $time = strpos($MOD['order'], 'add') !== false ? 'addtime' : 'edittime';
        $result = $db->query("SELECT " . $MOD['fields'] . " FROM {$table} WHERE {$condition} ORDER BY {$order} LIMIT {$offset},{$pagesize}");
        while ($r = $db->fetch_array($result)) {
            if ($kw) {
                $r['title'] = str_replace($kw, '<b class="f_red">' . $kw . '</b>', $r['title']);
            }
            $r['linkurl'] = mobileurl($moduleid, 0, $r['itemid']);
            $r['date'] = timetodate($r[$time], 5);
            $lists[] = $r;
        }
        $db->free_result($result);
    }
    $back_link = mobileurl($moduleid);
    if ($kw) {
        $head_name = $MOD['name'] . $L['search'];
    } else {
        if ($catid) {
            $head_name = $CAT['catname'];
            if ($CAT['parentid']) {
                $back_link = mobileurl($moduleid, $CAT['parentid']);
            }
        } else {
            $head_name = $MOD['name'];
        }
    }
}
include template($module, 'mobile');
开发者ID:hiproz,项目名称:zhaotaoci.cc,代码行数:31,代码来源:group.inc.php

示例2: defined

<?php

defined('IN_DESTOON') or exit('Access Denied');
require DT_ROOT . '/module/' . $module . '/common.inc.php';
if (!check_group($_groupid, $MOD['group_index'])) {
    include load('403.inc');
}
$typeid = isset($typeid) ? intval($typeid) : 99;
isset($TYPE[$typeid]) or $typeid = 99;
$dtype = $typeid != 99 ? " AND typeid={$typeid}" : '';
$maincat = get_maincat($catid ? $CAT['parentid'] : 0, $moduleid);
$seo_file = 'index';
include DT_ROOT . '/include/seo.inc.php';
if ($catid) {
    $seo_title = $seo_catname . $seo_title;
}
if ($typeid != 99) {
    $seo_title = $TYPE[$typeid] . $seo_delimiter . $seo_title;
}
if ($page == 1) {
    $head_canonical = $MOD['linkurl'];
}
$destoon_task = "moduleid={$moduleid}&html=index";
if ($EXT['mobile_enable']) {
    $head_mobile = $EXT['mobile_url'] . mobileurl($moduleid, 0, 0, $page);
}
include template($MOD['template_index'] ? $MOD['template_index'] : 'index', $module);
开发者ID:hiproz,项目名称:zhaotaoci.cc,代码行数:27,代码来源:index.inc.php

示例3: dcurl

            if ($action == 'callback') {
                if ($code) {
                    include DT_ROOT . '/api/weixin/config.inc.php';
                    $url = 'https://api.weixin.qq.com/sns/oauth2/access_token?appid=' . WX_APPID . '&secret=' . WX_APPSECRET . '&code=' . $code . '&grant_type=authorization_code';
                    $rec = dcurl($url);
                    $arr = json_decode($rec, true);
                    if ($arr['openid']) {
                        $openid = $arr['openid'];
                        set_cookie('weixin_openid', encrypt($openid, DT_KEY . 'WXID'));
                        dheader('weixin.php?action=login&wx=' . $DT_TIME);
                    }
                }
            } else {
                isset($url) or $url = 'index.php';
                if ($moduleid == 2 || $moduleid > 3) {
                    $url = mobileurl($moduleid);
                }
                if ($_userid) {
                    dheader($url);
                }
                set_cookie('weixin_url', $url);
                if (get_cookie('weixin_openid')) {
                    dheader('weixin.php?action=login&wx=' . $DT_TIME);
                }
                include DT_ROOT . '/api/weixin/config.inc.php';
                dheader('https://open.weixin.qq.com/connect/oauth2/authorize?appid=' . WX_APPID . '&redirect_uri=' . urlencode($EXT['mobile_url'] . 'weixin.php?action=callback') . '&response_type=code&scope=snsapi_base&state=1#wechat_redirect');
            }
        }
    }
}
dheader('index.php?wx=' . $DT_TIME);
开发者ID:hiproz,项目名称:zhaotaoci.cc,代码行数:31,代码来源:weixin.php

示例4: SUM

            if ($MOD['credit_answer'] && $_username && $status == 3) {
                $could_credit = true;
                if ($MOD['credit_maxanswer'] > 0) {
                    $r = $db->get_one("SELECT SUM(amount) AS total FROM {$DT_PRE}finance_credit WHERE username='{$_username}' AND addtime>{$DT_TIME}-86400  AND reason='" . $L['answer'] . "'");
                    if ($r['total'] > $MOD['credit_maxanswer']) {
                        $could_credit = false;
                    }
                }
                if ($could_credit) {
                    credit_add($_username, $MOD['credit_answer']);
                    credit_record($_username, $MOD['credit_answer'], 'system', $L['answer'], 'ID:' . $itemid . '(' . $L['know_by_mobile'] . ')');
                }
            }
            if ($MOD['answer_message'] && $item['username']) {
                $linkurl = $MOD['linkurl'] . $item['linkurl'];
                $message = lang($L['answer_message'], array(dsubstr($item['title'], 20, '...'), $item['title'], nl2br($content), $linkurl));
                send_message($item['username'], dsubstr($message, 60, '...'), $message);
            }
            exit($status == 3 ? 'ok' : 'check');
        }
        $head_title = $L['know_title'] . $DT['seo_delimiter'] . $head_title;
        $foot = '';
        include template('know_answer', 'mobile');
        if (DT_CHARSET != 'UTF-8') {
            toutf8();
        }
        break;
    default:
        dheader(mobileurl($moduleid));
        break;
}
开发者ID:hiproz,项目名称:zhaotaoci.cc,代码行数:31,代码来源:know.php

示例5: mobile_msg

}
if (!$addr) {
    mobile_msg($L['msg_no_address'], $addr_url);
}
if ($addr['areaid']) {
    $addr['address'] = area_pos($addr['areaid'], '') . $addr['address'];
}
$need_addr = 1;
$order_name = 'trade';
require DT_ROOT . '/module/' . $module . '/common.inc.php';
require DT_ROOT . '/include/post.func.php';
require DT_ROOT . '/module/' . $module . '/cart.class.php';
include load('misc.lang');
include load('member.lang');
include load('order.lang');
$back_link = mobileurl($moduleid, 0, $itemid);
$head_name = $L['cart_title'];
$head_title = $head_name . $DT['seo_delimiter'] . $MOD['name'] . $DT['seo_delimiter'] . $head_title;
$foot = '';
$do = new cart();
$do->max = intval($MOD['max_cart']);
$cart = $do->get();
switch ($action) {
    case 'clear':
        $do->clear();
        exit('ok');
        break;
    case 'delete':
        isset($key) && $key && is_array($key) or exit('ko');
        foreach ($key as $k) {
            if (isset($cart[$k])) {
开发者ID:hiproz,项目名称:zhaotaoci.cc,代码行数:31,代码来源:cart.php

示例6: Copyright

<?php

/*
	[Destoon B2B System] Copyright (c) 2008-2015 www.destoon.com
	This is NOT a freeware, use is subject to license.txt
*/
require 'common.inc.php';
if ($moduleid < 4) {
    $moduleid = 4;
}
$pid = isset($pid) ? intval($pid) : 0;
if ($pid) {
    $P = get_cat($pid);
    $back_link = 'category.php?moduleid=' . $moduleid . '&pid=' . $P['parentid'];
} else {
    $back_link = mobileurl($moduleid);
}
$lists = get_maincat($pid, $moduleid);
$head_title = $MOD['name'] . $DT['seo_delimiter'] . $head_title;
include template('category', 'mobile');
if (DT_CHARSET != 'UTF-8') {
    toutf8();
}
开发者ID:hiproz,项目名称:zhaotaoci.cc,代码行数:23,代码来源:category.php

示例7: set_cookie

 if ($auth) {
     $back_link = $auth;
     set_cookie('addr_back', $back_link);
 } else {
     $back_link = get_cookie('addr_back');
 }
 $back_link or mobile_msg($L['address_expire'], 'index.php?reload=' . $DT_TIME);
 $cancel_url = 'channel.php';
 if (strpos($back_link, 'cart.php') !== false || strpos($back_link, 'mall') !== false) {
     $cancel_url = mobileurl(16);
 } else {
     if (strpos($back_link, 'group') !== false) {
         $cancel_url = mobileurl(17);
     } else {
         if (strpos($back_link, 'moduleid=5') !== false) {
             $cancel_url = mobileurl(5);
         }
     }
 }
 $condition = "username='{$_username}'";
 $r = $db->get_one("SELECT COUNT(*) AS num FROM {$DT_PRE}address WHERE {$condition}");
 $items = $r['num'];
 $pages = mobile_pages($items, $page, $pagesize);
 $lists = array();
 if ($items) {
     $result = $db->query("SELECT * FROM {$DT_PRE}address WHERE {$condition} ORDER BY listorder ASC,itemid ASC LIMIT {$offset},{$pagesize}");
     while ($r = $db->fetch_array($result)) {
         $r['adddate'] = timetodate($r['addtime'], 'Y/m/d H:i');
         if ($r['areaid']) {
             $r['address'] = area_pos($r['areaid'], '') . $r['address'];
         }
开发者ID:hiproz,项目名称:zhaotaoci.cc,代码行数:31,代码来源:address.php

示例8: Copyright

<?php

/*
	[Destoon B2B System] Copyright (c) 2008-2015 www.destoon.com
	This is NOT a freeware, use is subject to license.txt
*/
require 'common.inc.php';
if ($moduleid < 4) {
    $moduleid = 4;
}
$AREA = cache_read('area.php');
$pid = isset($pid) ? intval($pid) : 0;
$back_link = $pid ? 'area.php?moduleid=' . $moduleid . '&pid=' . $AREA[$pid]['parentid'] : mobileurl($moduleid);
$lists = array();
foreach ($AREA as $a) {
    if ($a['parentid'] == $pid) {
        $lists[] = $a;
    }
}
$head_title = $MOD['name'] . $DT['seo_delimiter'] . $head_title;
include template('area', 'mobile');
if (DT_CHARSET != 'UTF-8') {
    toutf8();
}
开发者ID:hiproz,项目名称:zhaotaoci.cc,代码行数:24,代码来源:area.php

示例9: is_payword

        is_payword($_username, $password) or mobile_msg($L['not_payword']);
        $discount = $MG['discount'] > 0 && $MG['discount'] < 100 ? $MG['discount'] : 100;
        $discount = dround($discount / 100);
        $_fee = dround($fee * $discount);
        $_money >= $_fee or mobile_msg($L['need_charge']);
        $db->query("INSERT INTO {$DT_PRE}finance_pay (moduleid,itemid,username,fee,currency,paytime,ip,title) VALUES ('{$moduleid}','{$itemid}','{$_username}','{$fee}','{$currency}','{$DT_TIME}','{$DT_IP}','" . addslashes($title) . "')");
        money_add($_username, -$fee);
        money_record($_username, -$fee, $L['pay_by_site'], 'system', $L['pay_info'], $note);
        mobile_msg($L['pay_success'], mobileurl($moduleid, 0, $itemid));
    } else {
        $head_title = $L['pay_title'] . $DT['seo_delimiter'] . $head_title;
        $foot = 'channel';
        include template('pay', 'mobile');
        if (DT_CHARSET != 'UTF-8') {
            toutf8();
        }
    }
} else {
    if ($currency == 'credit') {
        if ($_credit >= $fee) {
            $db->query("INSERT INTO {$DT_PRE}finance_pay (moduleid,itemid,username,fee,currency,paytime,ip,title) VALUES ('{$moduleid}','{$itemid}','{$_username}','{$fee}','{$currency}','{$DT_TIME}','{$DT_IP}','" . addslashes($title) . "')");
            credit_add($_username, -$fee);
            credit_record($_username, -$fee, 'system', $L['pay_info'], $note);
            dheader(mobileurl($moduleid, 0, $itemid));
        } else {
            mobile_msg($L['need_credit']);
        }
    } else {
        dheader('channel.php?reload=' . $DT_TIME);
    }
}
开发者ID:hiproz,项目名称:zhaotaoci.cc,代码行数:31,代码来源:pay.php

示例10: get_table

<?php

require 'common.inc.php';
if (in_array($module, $mobile_modules) && $moduleid > 4 && $itemid) {
    $item = $db->get_one("SELECT * FROM " . get_table($moduleid) . " WHERE itemid={$itemid}");
    $item && $item['status'] > 2 or mobile_msg($L['msg_not_exist']);
    $linkurl = $EXT['mobile_url'] . mobileurl($moduleid, 0, $itemid);
    $auth = urlencode(str_replace('amp;', '', $linkurl));
} else {
    mobile_msg($L['share_not_support']);
}
$sms = 'sms:?body=' . $linkurl;
if (preg_match("/(iPhone|iPod|iPad)/i", $UA)) {
    $sms = 'sms: &body=' . $item['title'] . $linkurl;
}
$foot = '';
$head_title = $L['share_title'] . $DT['seo_delimiter'] . $head_title;
include template('share', 'mobile');
if (DT_CHARSET != 'UTF-8') {
    toutf8();
}
开发者ID:hiproz,项目名称:zhaotaoci.cc,代码行数:21,代码来源:share.php

示例11: Copyright

<?php

/*
	[Destoon B2B System] Copyright (c) 2008-2015 www.destoon.com
	This is NOT a freeware, use is subject to license.txt
*/
$moduleid = 3;
require 'common.inc.php';
isset($MODULE[$mid]) or dheader('index.php');
$itemid or dheader(mobileurl($mid));
if (in_array($itemid, cache_read('bancomment-' . $mid . '.php'))) {
    mobile_msg($L['comment_close'], mobileurl($mid, 0, $itemid));
}
require DT_ROOT . '/include/post.func.php';
require DT_ROOT . '/include/module.func.php';
$head_name = $L['comment_title'];
$head_title = $head_name . $DT['seo_delimiter'] . $head_title;
$need_captcha = $MOD['comment_captcha_add'] == 2 ? $MG['captcha'] : $MOD['comment_captcha_add'];
if ($MOD['comment_pagesize']) {
    $pagesize = $MOD['comment_pagesize'];
    $offset = ($page - 1) * $pagesize;
}
if ($mid == 4) {
    $item = $db->get_one("SELECT company,linkurl,username,groupid,thumb FROM " . get_table($mid) . " WHERE userid={$itemid}");
    $item or exit;
    $item['groupid'] > 4 or mobile_msg($L['msg_not_user']);
    $item['title'] = $item['company'];
    $linkurl = $item['linkurl'];
} else {
    $item = $db->get_one("SELECT title,linkurl,username,status,thumb FROM " . get_table($mid) . " WHERE itemid={$itemid}");
    $item or exit;
开发者ID:hiproz,项目名称:zhaotaoci.cc,代码行数:31,代码来源:comment.php

示例12: mobile_msg

if ($item['fromtime'] && $DT_TIME > $item['fromtime']) {
    mobile_msg($L['has_started']);
}
if ($item['totime'] && $DT_TIME > $item['totime']) {
    mobile_msg($L['has_expired']);
}
$item['status'] == 3 or mobile_msg($L['not_exists']);
$item['username'] or mobile_msg($L['com_not_member']);
$_username != $item['username'] or mobile_msg($L['sign_self']);
$today = $today_endtime - 86400;
$sql = $_userid ? "username='{$_username}'" : "addtime>{$today} AND ip='{$DT_IP}'";
$t = $db->get_one("SELECT id FROM {$table_order} WHERE id={$itemid} AND {$sql}");
if ($t) {
    mobile_msg($L['sign_again']);
}
$linkurl = mobileurl($moduleid, 0, $itemid);
$need_captcha = $MOD['captcha_sign'] == 2 ? $MG['captcha'] : $MOD['captcha_sign'];
$head_name = $L['sign_title'];
$head_title = $head_name . $DT['seo_delimiter'] . $MOD['name'] . $DT['seo_delimiter'] . $head_title;
$foot = '';
require DT_ROOT . '/include/post.func.php';
if (isset($_POST['ok'])) {
    $captcha = isset($captcha) ? convert(input_trim($captcha), 'UTF-8', DT_CHARSET) : '';
    $msg = captcha($captcha, $need_captcha, true);
    if ($msg) {
        exit('captcha');
    }
    $amount = intval($amount);
    if ($amount < 1) {
        $amount = 1;
    }
开发者ID:hiproz,项目名称:zhaotaoci.cc,代码行数:31,代码来源:sign.php

示例13: convert

         if ($number < 1) {
             $number = 1;
         }
         $price = $item['price'];
         $amount = $number * $price;
         $note = convert(input_trim($note), 'UTF-8', DT_CHARSET);
         $note = dhtmlspecialchars($note);
         $title = addslashes($item['title']);
         $db->query("INSERT INTO {$DT_PRE}group_order (gid,buyer,seller,title,thumb,price,number,amount,logistic,addtime,updatetime,note, buyer_postcode,buyer_address,buyer_name,buyer_phone,buyer_mobile,status) VALUES ('{$itemid}','{$_username}','{$item['username']}','{$title}','{$item['thumb']}','{$item['price']}','{$number}','{$amount}','{$item['logistic']}','{$DT_TIME}','{$DT_TIME}','{$note}','{$buyer_postcode}','{$buyer_address}','{$buyer_name}','{$buyer_phone}','{$buyer_mobile}', 6)");
         $oid = $db->insert_id();
         exit('ok|' . $oid);
     }
     break;
 case 'sell':
     $itemid or dheader(mobileurl($moduleid));
     SELL_ORDER or dheader(mobileurl($moduleid, 0, $itemid));
     $item = $db->get_one("SELECT * FROM {$table} WHERE itemid={$itemid}");
     if (!$item || $item['status'] != 3 || $item['price'] < 0.01 || $item['amount'] < 1 || $item['minamount'] < 1 || !$item['unit']) {
         mobile_msg($L['purchase_msg_online_buy']);
     }
     if ($item['username'] == $_username) {
         mobile_msg($L['purchase_msg_self']);
     }
     $t = $item;
     if (isset($_POST['ok'])) {
         $buyer_postcode = addslashes($addr['postcode']);
         $buyer_address = addslashes($addr['address']);
         $buyer_name = addslashes($addr['truename']);
         $buyer_phone = addslashes($addr['telephone']);
         $buyer_mobile = addslashes($addr['mobile']);
         $number = intval($number);
开发者ID:hiproz,项目名称:zhaotaoci.cc,代码行数:31,代码来源:purchase.php


注:本文中的mobileurl函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。