本文整理汇总了PHP中gmstr2tome函数的典型用法代码示例。如果您正苦于以下问题:PHP gmstr2tome函数的具体用法?PHP gmstr2tome怎么用?PHP gmstr2tome使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了gmstr2tome函数的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
$sql = "DELETE FROM " . $ecs->table('goods_attr') . " WHERE goods_id = 0";
$db->query($sql);
/* 图片列表 */
$img_list = array();
} else {
/* 商品信息 */
$sql = "SELECT * FROM " . $ecs->table('goods') . " WHERE goods_id = '{$_REQUEST['goods_id']}'";
$goods = $db->getRow($sql);
//dump($goods);
/* 虚拟卡商品复制时, 将其库存置为0*/
if ($is_copy && $code != '') {
$goods['goods_number'] = 0;
}
if (empty($goods) === true) {
/* 默认值 */
$goods = array('goods_id' => 0, 'goods_desc' => '', 'goods_shipai' => '', 'cat_id' => 0, 'is_on_sale' => '1', 'is_alone_sale' => '1', 'is_shipping' => '0', 'other_cat' => array(), 'goods_type' => 0, 'shop_price' => 0, 'promote_price' => 0, 'market_price' => 0, 'integral' => 0, 'goods_number' => 1, 'warn_number' => 1, 'promote_start_date' => local_date('Y-m-d'), 'promote_end_date' => local_date('Y-m-d', gmstr2tome('+1 month')), 'goods_weight' => 0, 'give_integral' => -1, 'rank_integral' => -1);
}
/* 获取商品类型存在规格的类型 */
$specifications = get_goods_type_specifications();
$goods['specifications_id'] = $specifications[$goods['goods_type']];
$_attribute = get_goods_specifications_list($goods['goods_id']);
$goods['_attribute'] = empty($_attribute) ? '' : 1;
/* 根据商品重量的单位重新计算 */
if ($goods['goods_weight'] > 0) {
$goods['goods_weight_by_unit'] = $goods['goods_weight'] >= 1 ? $goods['goods_weight'] : $goods['goods_weight'] / 0.001;
}
if (!empty($goods['goods_brief'])) {
//$goods['goods_brief'] = trim_right($goods['goods_brief']);
$goods['goods_brief'] = $goods['goods_brief'];
}
if (!empty($goods['keywords'])) {
示例2: array
'packing_list' => '',
'customer_service' => '',
'cat_id' => 0,
'is_on_sale' => '1',
'is_alone_sale' => '1',
'is_shipping' => '0',
'other_cat' => array(), // 扩展分类
'goods_type' => 0, // 商品类型
'shop_price' => 0,
'promote_price' => 0,
'market_price' => 0,
'integral' => 0,
'goods_number' => 1,
'warn_number' => 1,
'promote_start_date' => local_date('Y-m-d'),
'promote_end_date' => local_date('Y-m-d', gmstr2tome('+1 month')),
'goods_weight' => 0,
'give_integral' => -1,
'rank_integral' => -1
);
}
/* 获取商品类型存在规格的类型 */
$specifications = get_goods_type_specifications();
$goods['specifications_id'] = $specifications[$goods['goods_type']];
$_attribute = get_goods_specifications_list($goods['goods_id']);
$goods['_attribute'] = empty($_attribute) ? '' : 1;
/* 根据商品重量的单位重新计算 */
if ($goods['goods_weight'] > 0)
{