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


PHP build_attr_html函数代码示例

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


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

示例1: make_json_result

                    }
                }
            } else {
                make_json_result("");
            }
            break;
    }
    foreach ($sst as $key => $value) {
        $stre .= '<tr><td class="label">条形码</td><td><input type="hidden" name="txm_shu[]" value=' . $value . '>' . $value . '<td/><td><input type="text" name="tiaoxingm[]" value=""></td></tr>';
    }
    make_json_result($stre);
} elseif ($_REQUEST['act'] == 'get_attr') {
    check_authz_json('goods_manage');
    $goods_id = empty($_GET['goods_id']) ? 0 : intval($_GET['goods_id']);
    $goods_type = empty($_GET['goods_type']) ? 0 : intval($_GET['goods_type']);
    $content = build_attr_html($goods_type, $goods_id, $bar_code);
    make_json_result($content);
} elseif ($_REQUEST['act'] == 'drop_image') {
    check_authz_json('goods_manage');
    $img_id = empty($_REQUEST['img_id']) ? 0 : intval($_REQUEST['img_id']);
    /* 删除图片文件 */
    $sql = "SELECT img_url, thumb_url, img_original " . " FROM " . $GLOBALS['ecs']->table('goods_gallery') . " WHERE img_id = '{$img_id}'";
    $row = $GLOBALS['db']->getRow($sql);
    if ($row['img_url'] != '' && is_file('../' . $row['img_url'])) {
        @unlink('../' . $row['img_url']);
    }
    if ($row['thumb_url'] != '' && is_file('../' . $row['thumb_url'])) {
        @unlink('../' . $row['thumb_url']);
    }
    if ($row['img_original'] != '' && is_file('../' . $row['img_original'])) {
        @unlink('../' . $row['img_original']);
开发者ID:firsteam,项目名称:falcons,代码行数:31,代码来源:virtual_goods.php

示例2: die

    /* 如果不是实体商品,删除相应虚拟商品记录 */
    if ($goods['is_real'] != 1) {
        $sql = "DELETE FROM " . $ecs->table('virtual_card') . " WHERE goods_id = '{$goods_id}'";
        if (!$db->query($sql, 'SILENT') && $db->errno() != 1146) {
            die($db->error());
        }
    }
    clear_cache_files();
    $url = 'goods.php?act=query&' . str_replace('act=drop_goods', '', $_SERVER['QUERY_STRING']);
    ecs_header("Location: {$url}\n");
    exit;
} elseif ($_REQUEST['act'] == 'get_attr') {
    check_authz_json('goods_manage');
    $goods_id = empty($_GET['goods_id']) ? 0 : intval($_GET['goods_id']);
    $goods_type = empty($_GET['goods_type']) ? 0 : intval($_GET['goods_type']);
    $content = build_attr_html($goods_type, $goods_id);
    make_json_result($content);
} elseif ($_REQUEST['act'] == 'drop_image') {
    check_authz_json('goods_manage');
    $img_id = empty($_REQUEST['img_id']) ? 0 : intval($_REQUEST['img_id']);
    /* 删除图片文件 */
    $sql = "SELECT img_url, thumb_url, img_original " . " FROM " . $GLOBALS['ecs']->table('goods_gallery') . " WHERE img_id = '{$img_id}'";
    $row = $GLOBALS['db']->getRow($sql);
    if ($row['img_url'] != '' && is_file('../' . $row['img_url'])) {
        @unlink('../' . $row['img_url']);
    }
    if ($row['thumb_url'] != '' && is_file('../' . $row['thumb_url'])) {
        @unlink('../' . $row['thumb_url']);
    }
    if ($row['img_original'] != '' && is_file('../' . $row['img_original'])) {
        @unlink('../' . $row['img_original']);
开发者ID:dlpc,项目名称:ecshop,代码行数:31,代码来源:goods.php

示例3: get_member_price_list

     $smarty->assign('form_act', $is_add ? 'insert' : ($_REQUEST['act'] == 'edit' ? 'update' : 'insert'));
     if ($_REQUEST['act'] == 'add' || $_REQUEST['act'] == 'edit') {
         $smarty->assign('is_add', true);
     }
     if (!$is_add) {
         $smarty->assign('member_price_list', get_member_price_list($_REQUEST['goods_id']));
     }
     $smarty->assign('link_goods_list', $link_goods_list);
     $smarty->assign('group_goods_list', $group_goods_list);
     $smarty->assign('goods_article_list', $goods_article_list);
     $smarty->assign('img_list', $img_list);
     $smarty->assign('goods_type_list', goods_type_list($goods['goods_type']));
     $smarty->assign('gd', gd_version());
     $smarty->assign('thumb_width', $_CFG['thumb_width']);
     $smarty->assign('thumb_height', $_CFG['thumb_height']);
     $smarty->assign('goods_attr_html', build_attr_html($goods['goods_type'], $goods['goods_id']));
     $volume_price_list = '';
     if (isset($_REQUEST['goods_id'])) {
         $volume_price_list = get_volume_price_list($_REQUEST['goods_id']);
     }
     if (empty($volume_price_list)) {
         $volume_price_list = array('0' => array('number' => '', 'price' => ''));
     }
     $smarty->assign('volume_price_list', $volume_price_list);
     /* 显示商品信息页面 */
     assign_query_info();
     $res['main'] = $smarty->fetch('add_goods.htm');
     die($json->encode($res));
 } elseif ($_REQUEST['act'] == 'check_goods_sn') {
     //print_r($_REQUEST);die;
     $goods_sn = trim($_REQUEST['goods_sn']);
开发者ID:554119220,项目名称:kjrscrm,代码行数:31,代码来源:goods.php


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