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


PHP admin_info函数代码示例

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


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

示例1: back_order_info

/**
 * 取得退货单信息
 * @param   int     $back_id   退货单 id(如果 back_id > 0 就按 id 查,否则按 sn 查)
 * @return  array   退货单信息(金额都有相应格式化的字段,前缀是 formated_ )
 */
function back_order_info($back_id)
{
    $return_order = array();
    if (empty($back_id) || !is_numeric($back_id)) {
        return $return_order;
    }
    $where = '';
    /* 获取管理员信息 */
    $admin_info = admin_info();
    /* 如果管理员属于某个办事处,只列出这个办事处管辖的发货单 */
    if ($admin_info['agency_id'] > 0) {
        $where .= " AND agency_id = '" . $admin_info['agency_id'] . "' ";
    }
    /* 如果管理员属于某个供货商,只列出这个供货商的发货单 */
    if ($admin_info['suppliers_id'] > 0) {
        $where .= " AND suppliers_id = '" . $admin_info['suppliers_id'] . "' ";
    }
    $sql = "SELECT * FROM " . $GLOBALS['ecs']->table('back_order') . "\n            WHERE back_id = '{$back_id}'\n            {$where}\n            LIMIT 0, 1";
    $back = $GLOBALS['db']->getRow($sql);
    if ($back) {
        /* 格式化金额字段 */
        $back['formated_insure_fee'] = price_format($back['insure_fee'], false);
        $back['formated_shipping_fee'] = price_format($back['shipping_fee'], false);
        /* 格式化时间字段 */
        $back['formated_add_time'] = local_date($GLOBALS['_CFG']['time_format'], $back['add_time']);
        $back['formated_update_time'] = local_date($GLOBALS['_CFG']['time_format'], $back['update_time']);
        $back['formated_return_time'] = local_date($GLOBALS['_CFG']['time_format'], $back['return_time']);
        $return_order = $back;
    }
    return $return_order;
}
开发者ID:norain2050,项目名称:benhu,代码行数:36,代码来源:order.php

示例2: delivery_order_info

/**
 * 取得发货单信息
 * @param   int     $delivery_order   发货单id(如果delivery_order > 0 就按id查,否则按sn查)
 * @param   string  $delivery_sn      发货单号
 * @return  array   发货单信息(金额都有相应格式化的字段,前缀是formated_)
 */
function delivery_order_info($delivery_id, $delivery_sn = '')
{
    $return_order = array();
    if (empty($delivery_id) || !is_numeric($delivery_id)) {
        return $return_order;
    }
    $where = '';
    /* 获取管理员信息 */
    $admin_info = admin_info();
    /* 如果管理员属于某个办事处,只列出这个办事处管辖的发货单 */
    if ($admin_info['agency_id'] > 0) {
        $where .= " AND agency_id = '" . $admin_info['agency_id'] . "' ";
    }
    /* 如果管理员属于某个供货商,只列出这个供货商的发货单 */
    if ($admin_info['suppliers_id'] > 0) {
        $where .= " AND suppliers_id = '" . $admin_info['suppliers_id'] . "' ";
    }
    $sql = "SELECT * FROM " . $GLOBALS['ecs']->table('delivery_order');
    if ($delivery_id > 0) {
        $sql .= " WHERE delivery_id = '{$delivery_id}'";
    } else {
        $sql .= " WHERE delivery_sn = '{$delivery_sn}'";
    }
    $sql .= $where;
    $sql .= " LIMIT 0, 1";
    $delivery = $GLOBALS['db']->getRow($sql);
    if ($delivery) {
        /* 格式化金额字段 */
        $delivery['formated_insure_fee'] = price_format($delivery['insure_fee'], false);
        $delivery['formated_shipping_fee'] = price_format($delivery['shipping_fee'], false);
        /* 格式化时间字段 */
        $delivery['formated_add_time'] = local_date($GLOBALS['_CFG']['time_format'], $delivery['add_time']);
        $delivery['formated_update_time'] = local_date($GLOBALS['_CFG']['time_format'], $delivery['update_time']);
        $return_order = $delivery;
    }
    return $return_order;
}
开发者ID:seanguo166,项目名称:yinoos,代码行数:43,代码来源:order.php

示例3: back_list

/**
 *  获取退货单列表信息
 *
 * @access  public
 * @param
 *
 * @return void
 */
function back_list()
{
    $result = get_filter();
    if ($result === false) {
        $aiax = isset($_REQUEST['is_ajax']) ? $_REQUEST['is_ajax'] : 0;
        /* 过滤信息 */
        $filter['delivery_sn'] = empty($_REQUEST['delivery_sn']) ? '' : trim($_REQUEST['delivery_sn']);
        $filter['order_id'] = empty($_REQUEST['order_id']) ? 0 : intval($_REQUEST['order_id']);
        $filter['order_sn'] = empty($_REQUEST['order_sn']) ? '' : trim($_REQUEST['order_sn']);
        $filter['order_type'] = empty($_REQUEST['order_type']) ? 0 : intval($_REQUEST['order_type']);
        $filter['back_type'] = empty($_REQUEST['back_type']) ? 0 : intval($_REQUEST['back_type']);
        if ($aiax == 1 && !empty($_REQUEST['consignee'])) {
            $_REQUEST['consignee'] = json_str_iconv($_REQUEST['consignee']);
        }
        $filter['consignee'] = empty($_REQUEST['consignee']) ? '' : trim($_REQUEST['consignee']);
        $filter['sort_by'] = empty($_REQUEST['sort_by']) ? 'status_back ASC, update_time' : trim($_REQUEST['sort_by']);
        $filter['sort_order'] = empty($_REQUEST['sort_order']) ? 'DESC' : trim($_REQUEST['sort_order']);
        $where = "WHERE supplier_id='" . $_SESSION['supplier_id'] . "' ";
        if ($filter['order_sn']) {
            $where .= " AND order_sn LIKE '%" . mysql_like_quote($filter['order_sn']) . "%'";
        }
        if ($filter['consignee']) {
            $where .= " AND consignee LIKE '%" . mysql_like_quote($filter['consignee']) . "%'";
        }
        if ($filter['delivery_sn']) {
            $where .= " AND delivery_sn LIKE '%" . mysql_like_quote($filter['delivery_sn']) . "%'";
        }
        if ($filter['order_type'] == 2) {
            $where .= " AND status_back != 3 ";
        }
        if ($filter['order_type'] == 3) {
            $where .= " AND status_back = 3 ";
        }
        if ($filter['back_type'] > 0) {
            $where .= ' AND back_type=' . $filter['back_type'];
        }
        /* 获取管理员信息 */
        $admin_info = admin_info();
        /* 如果管理员属于某个办事处,只列出这个办事处管辖的发货单 */
        if ($admin_info['agency_id'] > 0) {
            $where .= " AND agency_id = '" . $admin_info['agency_id'] . "' ";
        }
        /* 如果管理员属于某个供货商,只列出这个供货商的发货单 */
        if ($admin_info['suppliers_id'] > 0) {
            $where .= " AND suppliers_id = '" . $admin_info['suppliers_id'] . "' ";
        }
        /* 分页大小 */
        $filter['page'] = empty($_REQUEST['page']) || intval($_REQUEST['page']) <= 0 ? 1 : intval($_REQUEST['page']);
        if (isset($_REQUEST['page_size']) && intval($_REQUEST['page_size']) > 0) {
            $filter['page_size'] = intval($_REQUEST['page_size']);
        } elseif (isset($_COOKIE['ECSCP']['page_size']) && intval($_COOKIE['ECSCP']['page_size']) > 0) {
            $filter['page_size'] = intval($_COOKIE['ECSCP']['page_size']);
        } else {
            $filter['page_size'] = 15;
        }
        /* 记录总数 */
        $sql = "SELECT COUNT(*) FROM " . $GLOBALS['ecs']->table('back_order') . $where;
        $filter['record_count'] = $GLOBALS['db']->getOne($sql);
        $filter['page_count'] = $filter['record_count'] > 0 ? ceil($filter['record_count'] / $filter['page_size']) : 1;
        /* 查询 */
        $sql = "SELECT * FROM " . $GLOBALS['ecs']->table("back_order") . "  {$where}   ORDER BY " . $filter['sort_by'] . " " . $filter['sort_order'] . " LIMIT " . ($filter['page'] - 1) * $filter['page_size'] . ", " . $filter['page_size'] . " ";
        set_filter($filter, $sql);
    } else {
        $sql = $result['sql'];
        $filter = $result['filter'];
    }
    $row = $GLOBALS['db']->getAll($sql);
    /* 格式化数据 */
    foreach ($row as $key => $value) {
        $row[$key]['return_time'] = local_date($GLOBALS['_CFG']['time_format'], $value['return_time']);
        $row[$key]['add_time'] = local_date($GLOBALS['_CFG']['time_format'], $value['add_time']);
        $row[$key]['update_time'] = local_date($GLOBALS['_CFG']['time_format'], $value['update_time']);
        $row[$key]['refund_money_1'] = price_format($value['refund_money_1']);
        $row[$key]['refund_money_2'] = price_format($value['refund_money_2']);
        $row[$key]['status_back_val'] = $GLOBALS['_LANG']['bos'][$value['status_back']] . "-" . $GLOBALS['_LANG']['bps'][$value['status_refund']];
        $row[$key]['goods_url'] = "../" . build_uri('goods', array('gid' => $value['goods_id']), $value['goods_name']);
        if ($value['status'] == 1) {
            $row[$key]['status_name'] = $GLOBALS['_LANG']['delivery_status'][1];
        } else {
            $row[$key]['status_name'] = $GLOBALS['_LANG']['delivery_status'][0];
        }
    }
    $arr = array('back' => $row, 'filter' => $filter, 'page_count' => $filter['page_count'], 'record_count' => $filter['record_count']);
    return $arr;
}
开发者ID:seanguo166,项目名称:yinoos,代码行数:93,代码来源:back.php

示例4: while

 * $Revision$
 * $Date$
 * $Author$
 */
if (!defined('e107_INIT')) {
    exit;
}
require_once e_HANDLER . "message_handler.php";
$emessage =& eMessage::getInstance();
$buts = "";
$text = "<div style='text-align:center'>\n\t<table style='" . ADMIN_WIDTH . "'>";
while (list($key, $funcinfo) = each($newarray)) {
    $buts .= render_links($funcinfo[0], $funcinfo[1], $funcinfo[2], $funcinfo[3], $funcinfo[5], 'default');
}
$text .= $buts;
$text_cat = '';
while ($td <= 5) {
    $text_cat .= "<td class='td' style='width:20%;' ></td>";
    $td++;
}
$td = 1;
$text .= "</tr></table></div>";
if ($buts != "") {
    $ns->tablerender(ADLAN_47 . " " . ADMINNAME, $emessage->render() . $text);
}
$text = "<div style='text-align:center'>\n\t<table style='" . ADMIN_WIDTH . "'>";
$text .= getPluginLinks(E_16_PLUGMANAGER, 'default');
$text .= "</tr>\n\t</table></div>";
$ns->tablerender(ADLAN_CL_7, $text);
echo admin_info();
开发者ID:notzen,项目名称:e107,代码行数:30,代码来源:compact.php

示例5: back_list

/**
 *  获取退货单列表信息
 *
 * @access  public
 * @param
 *
 * @return void
 */
function back_list()
{
    $result = get_filter();
    if ($result === false) {
        $aiax = isset($_REQUEST['is_ajax']) ? $_REQUEST['is_ajax'] : 0;
        /* 过滤信息 */
        $filter['delivery_sn'] = empty($_REQUEST['delivery_sn']) ? '' : trim($_REQUEST['delivery_sn']);
        $filter['order_id'] = empty($_REQUEST['order_id']) ? 0 : intval($_REQUEST['order_id']);
        $filter['order_sn'] = empty($_REQUEST['order_sn']) ? '' : trim($_REQUEST['order_sn']);
        $filter['order_type'] = empty($_REQUEST['order_type']) ? 0 : intval($_REQUEST['order_type']);
        $filter['back_type'] = empty($_REQUEST['back_type']) ? 0 : intval($_REQUEST['back_type']);
        /* 代码增加_start  By  morestock_morecity */
        $filter['sid'] = empty($_REQUEST['sid']) ? '0' : intval($_REQUEST['sid']);
        $filter['ssid'] = empty($_REQUEST['ssid']) ? '0' : intval($_REQUEST['ssid']);
        /* 代码增加_end  By  morestock_morecity */
        if ($aiax == 1 && !empty($_REQUEST['consignee'])) {
            $_REQUEST['consignee'] = json_str_iconv($_REQUEST['consignee']);
        }
        $filter['consignee'] = empty($_REQUEST['consignee']) ? '' : trim($_REQUEST['consignee']);
        $filter['sort_by'] = empty($_REQUEST['sort_by']) ? 'status_back ASC, update_time' : trim($_REQUEST['sort_by']);
        $filter['sort_order'] = empty($_REQUEST['sort_order']) ? 'DESC' : trim($_REQUEST['sort_order']);
        $where = "WHERE bo.supplier_id='" . $_SESSION['supplier_id'] . "' ";
        if ($filter['order_sn']) {
            $where .= " AND bo.order_sn LIKE '%" . mysql_like_quote($filter['order_sn']) . "%'";
        }
        if ($filter['consignee']) {
            $where .= " AND bo.consignee LIKE '%" . mysql_like_quote($filter['consignee']) . "%'";
        }
        if ($filter['delivery_sn']) {
            $where .= " AND bo.delivery_sn LIKE '%" . mysql_like_quote($filter['delivery_sn']) . "%'";
        }
        if ($filter['order_type'] == 2) {
            $where .= " AND bo.status_back != 3 ";
        }
        if ($filter['order_type'] == 3) {
            $where .= " AND bo.status_back = 3 ";
        }
        if ($filter['back_type'] > 0) {
            $where .= ' AND bo.back_type=' . $filter['back_type'];
        }
        /* 代码增加_start    By morestock_morecity */
        if ($filter['ssid']) {
            $where .= " AND o.sub_id like '%|" . $filter['ssid'] . "|%' ";
        } else {
            if ($filter['sid']) {
                $where .= " AND o.store_id = '" . $filter['sid'] . "' ";
            }
        }
        //获取当前管理员负责的store_id列表
        $storeid_list = "";
        $sql1 = "select store_id from " . $GLOBALS['ecs']->table('store_adminer') . " where supplier_id=" . $_REQUEST[storetypeid] . " and admin_id = '{$_SESSION['supplier_user_id']}' ";
        $res1 = $GLOBALS['db']->query($sql1);
        while ($row1 = $GLOBALS['db']->fetchRow($res1)) {
            $storeid_list .= $storeid_list ? " or " : "";
            $storeid_list .= " sub_id like '%|" . $row1['store_id'] . "|%' ";
            $sql2 = "select store_id from " . $GLOBALS['ecs']->table('store_main') . " where supplier_id=" . $_REQUEST[storetypeid] . " and parent_id = '{$row1['store_id']}' ";
            $res2 = $GLOBALS['db']->query($sql2);
            while ($row2 = $GLOBALS['db']->fetchRow($res2)) {
                $storeid_list .= $storeid_list ? " or " : "";
                $storeid_list .= " sub_id like '%|" . $row2['store_id'] . "|%' ";
            }
        }
        if ($storeid_list) {
            $where .= " AND  ({$storeid_list}) ";
        }
        /* 代码增加_end   By morestock_morecity */
        /* 获取管理员信息 */
        $admin_info = admin_info();
        /* 如果管理员属于某个办事处,只列出这个办事处管辖的发货单 */
        if ($admin_info['agency_id'] > 0) {
            $where .= " AND agency_id = '" . $admin_info['agency_id'] . "' ";
        }
        /* 如果管理员属于某个供货商,只列出这个供货商的发货单 */
        if ($admin_info['suppliers_id'] > 0) {
            $where .= " AND suppliers_id = '" . $admin_info['suppliers_id'] . "' ";
        }
        /* 分页大小 */
        $filter['page'] = empty($_REQUEST['page']) || intval($_REQUEST['page']) <= 0 ? 1 : intval($_REQUEST['page']);
        if (isset($_REQUEST['page_size']) && intval($_REQUEST['page_size']) > 0) {
            $filter['page_size'] = intval($_REQUEST['page_size']);
        } elseif (isset($_COOKIE['ECSCP']['page_size']) && intval($_COOKIE['ECSCP']['page_size']) > 0) {
            $filter['page_size'] = intval($_COOKIE['ECSCP']['page_size']);
        } else {
            $filter['page_size'] = 15;
        }
        /* 记录总数 */
        $sql = "SELECT COUNT(*) FROM " . $GLOBALS['ecs']->table('back_order') . ' AS bo LEFT JOIN ' . $GLOBALS['ecs']->table('order_info') . ' AS o ON bo.order_sn=o.order_sn ' . $where;
        $filter['record_count'] = $GLOBALS['db']->getOne($sql);
        $filter['page_count'] = $filter['record_count'] > 0 ? ceil($filter['record_count'] / $filter['page_size']) : 1;
        /* 查询 */
        $sql = "SELECT bo.* FROM " . $GLOBALS['ecs']->table("back_order") . ' AS bo LEFT JOIN ' . $GLOBALS['ecs']->table('order_info') . ' AS o ON bo.order_sn=o.order_sn ' . "  {$where}   ORDER BY " . $filter['sort_by'] . " " . $filter['sort_order'] . " LIMIT " . ($filter['page'] - 1) * $filter['page_size'] . ", " . $filter['page_size'] . " ";
        set_filter($filter, $sql);
//.........这里部分代码省略.........
开发者ID:moonlight-wang,项目名称:feilun,代码行数:101,代码来源:back.php


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