本文整理汇总了PHP中defaultGoodsImage函数的典型用法代码示例。如果您正苦于以下问题:PHP defaultGoodsImage函数的具体用法?PHP defaultGoodsImage怎么用?PHP defaultGoodsImage使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了defaultGoodsImage函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: voucher_listOp
public function voucher_listOp()
{
//检查过期的代金券,状态设置为过期(vouchet_state=3)
$this->check_voucher_expire();
$model = Model();
$where = array('voucher_owner_id' => $_SESSION['member_id']);
if (intval($_GET['select_detail_state']) > 0) {
$where['voucher_state'] = intval($_GET['select_detail_state']);
}
$field = "voucher_id,voucher_code,voucher_title,voucher_desc,voucher_start_date,voucher_end_date,voucher_price,voucher_limit,voucher_state,voucher_order_id,voucher_store_id,store_name,store_id,store_domain,voucher_t_customimg";
$list = $model->table('voucher,store,voucher_template')->field($field)->join('inner,inner')->on('voucher.voucher_store_id = store.store_id,voucher.voucher_t_id=voucher_template.voucher_t_id')->where($where)->order('voucher_id desc')->page(10)->select();
if (is_array($list)) {
foreach ($list as $key => $val) {
if (empty($val['voucher_t_customimg']) || !file_exists(BASE_UPLOAD_PATH . DS . ATTACH_VOUCHER . DS . $val['store_id'] . DS . $val['voucher_t_customimg'])) {
$list[$key]['voucher_t_customimg'] = UPLOAD_SITE_URL . DS . defaultGoodsImage(60);
} else {
$list[$key]['voucher_t_customimg'] = UPLOAD_SITE_URL . DS . ATTACH_VOUCHER . DS . $val['store_id'] . DS . str_ireplace('.', '_small.', $val['voucher_t_customimg']);
}
}
}
Tpl::output('list', $list);
Tpl::output('show_page', $model->showpage(2));
//查询会员信息
$this->get_member_info();
$this->profile_menu('voucher_list');
Tpl::output('menu_sign', 'myvoucher');
Tpl::output('menu_sign_url', 'index.php?act=member_voucher');
Tpl::output('menu_sign1', 'member_voucher');
Tpl::showpage('member_voucher.list');
}
示例2: indexOp
public function indexOp()
{
$model = Model();
//开启代金券功能后查询代金券相应信息
if (C('voucher_allow') == 1) {
//查询已兑换代金券券数量
$vouchercount = 0;
if ($_SESSION['is_login'] == '1') {
$vouchercount = $model->table('voucher')->where(array('voucher_owner_id' => $_SESSION['member_id'], 'voucher_state' => $this->voucherstate_arr['unused'][0]))->count();
}
Tpl::output('vouchercount', $vouchercount);
//查询代金券面额
$pricelist = $model->table('voucher_price')->order('voucher_price asc')->select();
Tpl::output('pricelist', $pricelist);
//查询代金券列表
$field = 'voucher_template.*,store.store_id,store.store_label,store.store_name,store.store_domain';
$on = 'voucher_template.voucher_t_store_id=store.store_id';
$new_voucher = $model->table('voucher_template,store')->field($field)->join('left')->on($on)->where(array('voucher_t_state' => $this->templatestate_arr['usable'][0], 'voucher_t_end_date' => array('gt', time())))->limit(16)->select();
if (!empty($new_voucher)) {
foreach ($new_voucher as $k => $v) {
if (!empty($v['voucher_t_customimg'])) {
$v['voucher_t_customimg'] = SiteUrl . DS . ATTACH_VOUCHER . DS . $v['voucher_t_store_id'] . DS . $v['voucher_t_customimg'] . "_small." . get_image_type($v['voucher_t_customimg']);
} else {
$v['voucher_t_customimg'] = defaultGoodsImage('small');
}
if (!empty($v['store_label'])) {
$v['store_label'] = SiteUrl . DS . ATTACH_STORE . DS . $v['store_label'];
}
$v['voucher_t_limit'] = intval($v['voucher_t_limit']);
$new_voucher[$k] = $v;
}
}
Tpl::output('new_voucher', $new_voucher);
}
//开启积分兑换功能后查询代金券相应信息
if (C('pointprod_isuse') == 1) {
//最新积分兑换商品
$model_pointsprod = Model('pointprod');
$new_pointsprod = $model_pointsprod->getPointProdListNew('*', array('pgoods_show' => 1, 'pgoods_state' => 0), 'pgoods_sort asc,pgoods_id desc', 16);
Tpl::output('new_pointsprod', $new_pointsprod);
//兑换排行
$converlist = $model_pointsprod->getPointProdListNew('*', array('pgoods_show' => 1, 'pgoods_state' => 0), 'pgoods_salenum desc,pgoods_id desc', 3);
Tpl::output('converlist', $converlist);
}
//SEO
Model('seo')->type('point')->show();
Tpl::showpage('pointprod');
}
示例3: pointvoucherOp
/**
* 代金券列表
*/
public function pointvoucherOp()
{
$model = Model();
//查询会员信息
$member_info = $model->table('member')->field('member_points')->where(array('member_id' => $_SESSION['member_id']))->find();
Tpl::output('member_info', $member_info);
//查询已兑换代金券券数量
$vouchercount = 0;
if ($_SESSION['is_login'] == '1') {
$vouchercount = $model->table('voucher')->where(array('voucher_owner_id' => $_SESSION['member_id'], 'voucher_state' => $this->voucherstate_arr['unused'][0]))->count();
}
Tpl::output('vouchercount', $vouchercount);
//查询代金券面额
$pricelist = $model->table('voucher_price')->order('voucher_price asc')->select();
$voucherlist = array();
if (!empty($pricelist)) {
foreach ($pricelist as $k => $v) {
$voucherlist[$v['voucher_price']]['price'] = $v;
}
}
//查询代金券列表
$field = 'voucher_template.*,store.store_id,store.store_label,store.store_name,store.store_domain';
$on = 'voucher_template.voucher_t_store_id=store.store_id';
$voucher = $model->table('voucher_template,store')->field($field)->join('left')->on($on)->where(array('voucher_t_state' => $this->templatestate_arr['usable'][0], 'voucher_t_end_date' => array('gt', time())))->select();
if (!empty($voucher)) {
foreach ($voucher as $k => $v) {
if (!empty($v['voucher_t_customimg'])) {
$v['voucher_t_customimg'] = SiteUrl . DS . ATTACH_VOUCHER . DS . $v['voucher_t_store_id'] . DS . $v['voucher_t_customimg'] . "_small." . get_image_type($v['voucher_t_customimg']);
} else {
$v['voucher_t_customimg'] = defaultGoodsImage('small');
}
if (!empty($v['store_label'])) {
$v['store_label'] = SiteUrl . DS . ATTACH_STORE . DS . $v['store_label'];
}
$v['voucher_t_limit'] = intval($v['voucher_t_limit']);
if (!empty($voucherlist[$v['voucher_t_price']])) {
$voucherlist[$v['voucher_t_price']]['voucher'][] = $v;
}
}
}
Tpl::output('voucherlist', $voucherlist);
Tpl::showpage('pointvoucher');
}
示例4: defaultGoodsImage
p_li.find('img:first').attr('src','<?php
echo defaultGoodsImage('tiny');
?>
');
p_li.find('*[nc_type="handler"]').hide().css('z-index', '0');
img_handle();
}
});
});
});
function img_handle(){
$('*[nc_type="handle_pic"]').each(function(){
$(this).unbind();
if($(this).find('img:first').attr('src') != '<?php
echo defaultGoodsImage('tiny');
?>
'){
$(this).hover(function(){
var obj = $(this).find('img:first');
handler = $(this).find('*[nc_type="handler"]');
handler.show();
handler.hover(function(){
set_zindex($(this), "999");
},
function(){
set_zindex($(this), "0");
});
set_zindex($(this), '999');
},
function(){
示例5: templateeditOp
//.........这里部分代码省略.........
showMessage(Language::get('voucher_template_quotanull'), 'index.php?act=store_voucher&op=quotaadd', 'html', 'error');
}
}
//查询面额列表
$pricelist = $model->table('voucher_price')->order('voucher_price asc')->select();
if (empty($pricelist)) {
showMessage(Language::get('voucher_template_pricelisterror'), 'index.php?act=store_voucher&op=templatelist', 'html', 'error');
}
if (chksubmit()) {
//验证提交的内容面额不能大于限额
$obj_validate = new Validate();
$obj_validate->validateparam = array(array("input" => $_POST['txt_template_title'], "require" => "true", "validator" => "Length", "min" => "1", "max" => "50", "message" => Language::get('voucher_template_title_error')), array("input" => $_POST['txt_template_total'], "require" => "true", "validator" => "Number", "message" => Language::get('voucher_template_total_error')), array("input" => $_POST['select_template_price'], "require" => "true", "validator" => "Number", "message" => Language::get('voucher_template_price_error')), array("input" => $_POST['txt_template_limit'], "require" => "true", "validator" => "Double", "message" => Language::get('voucher_template_limit_error')), array("input" => $_POST['txt_template_describe'], "require" => "true", "validator" => "Length", "min" => "1", "max" => "255", "message" => Language::get('voucher_template_describe_error')));
$error = $obj_validate->validate();
//金额验证
$price = intval($_POST['select_template_price']) > 0 ? intval($_POST['select_template_price']) : 0;
foreach ($pricelist as $k => $v) {
if ($v['voucher_price'] == $price) {
$chooseprice = $v;
//取得当前选择的面额记录
}
}
if (empty($chooseprice)) {
$error .= Language::get('voucher_template_pricelisterror');
}
$limit = intval($_POST['txt_template_limit']) > 0 ? intval($_POST['txt_template_limit']) : 0;
if ($price >= $limit) {
$error .= Language::get('voucher_template_price_error');
}
if ($error) {
showDialog($error, 'reload', 'error');
} else {
$update_arr = array();
$update_arr['voucher_t_title'] = trim($_POST['txt_template_title']);
$update_arr['voucher_t_desc'] = trim($_POST['txt_template_describe']);
if ($_POST['txt_template_enddate']) {
$enddate = strtotime($_POST['txt_template_enddate']);
if (!$isOwnShop && $enddate > $quotainfo['quota_endtime']) {
$enddate = $quotainfo['quota_endtime'];
}
$update_arr['voucher_t_end_date'] = $enddate;
} else {
//如果没有添加有效期则默认为套餐的结束时间
if ($isOwnShop) {
$update_arr['voucher_t_end_date'] = time() + 2592000;
} else {
$update_arr['voucher_t_end_date'] = $quotainfo['quota_endtime'];
}
}
$update_arr['voucher_t_price'] = $price;
$update_arr['voucher_t_limit'] = $limit;
$update_arr['voucher_t_sc_id'] = intval($_POST['sc_id']);
$update_arr['voucher_t_state'] = intval($_POST['tstate']) == $this->templatestate_arr['usable'][0] ? $this->templatestate_arr['usable'][0] : $this->templatestate_arr['disabled'][0];
$update_arr['voucher_t_total'] = intval($_POST['txt_template_total']) > 0 ? intval($_POST['txt_template_total']) : 0;
$update_arr['voucher_t_points'] = $chooseprice['voucher_defaultpoints'];
$update_arr['voucher_t_eachlimit'] = intval($_POST['eachlimit']) > 0 ? intval($_POST['eachlimit']) : 0;
//自定义图片
if (!empty($_FILES['customimg']['name'])) {
$upload = new UploadFile();
$upload->set('default_dir', ATTACH_VOUCHER . DS . $_SESSION['store_id']);
$upload->set('thumb_width', '160');
$upload->set('thumb_height', '160');
$upload->set('thumb_ext', '_small');
$result = $upload->upfile('customimg');
if ($result) {
//删除原图
if (!empty($t_info['voucher_t_customimg'])) {
//如果模板存在,则删除原模板图片
@unlink(BASE_UPLOAD_PATH . DS . ATTACH_VOUCHER . DS . $_SESSION['store_id'] . DS . $t_info['voucher_t_customimg']);
@unlink(BASE_UPLOAD_PATH . DS . ATTACH_VOUCHER . DS . $_SESSION['store_id'] . DS . str_ireplace('.', '_small.', $t_info['voucher_t_customimg']));
}
$update_arr['voucher_t_customimg'] = $upload->file_name;
}
}
$rs = $model->table('voucher_template')->where(array('voucher_t_id' => $t_info['voucher_t_id']))->update($update_arr);
if ($rs) {
showDialog(Language::get('nc_common_op_succ'), 'index.php?act=store_voucher&op=templatelist', 'succ');
} else {
showDialog(Language::get('nc_common_op_fail'), 'index.php?act=store_voucher&op=templatelist', 'error');
}
}
} else {
if (!$t_info['voucher_t_customimg'] || !file_exists(BASE_UPLOAD_PATH . DS . ATTACH_VOUCHER . DS . $_SESSION['store_id'] . DS . $t_info['voucher_t_customimg'])) {
$t_info['voucher_t_customimg'] = UPLOAD_SITE_URL . DS . defaultGoodsImage(240);
} else {
$t_info['voucher_t_customimg'] = UPLOAD_SITE_URL . DS . ATTACH_VOUCHER . DS . $_SESSION['store_id'] . DS . str_ireplace('.', '_small.', $t_info['voucher_t_customimg']);
}
TPL::output('type', 'edit');
TPL::output('t_info', $t_info);
//店铺分类
$store_class = rkcache('store_class', true);
Tpl::output('store_class', $store_class);
//查询店铺详情
$store_info = Model('store')->getStoreInfoByID($_SESSION['store_id']);
TPL::output('store_info', $store_info);
TPL::output('quotainfo', $quotainfo);
TPL::output('pricelist', $pricelist);
$this->profile_menu('templateedit', 'templateedit');
Tpl::showpage('store_voucher_template.add');
}
}
示例6: defaultGoodsImage
</div>
<script src="<?php
echo RESOURCE_SITE_URL;
?>
/js/waypoints.js"></script>
<script src="<?php
echo SHOP_RESOURCE_SITE_URL;
?>
/js/search_category_menu.js"></script>
<script type="text/javascript">
var defaultSmallGoodsImage = '<?php
echo defaultGoodsImage(240);
?>
';
var defaultTinyGoodsImage = '<?php
echo defaultGoodsImage(60);
?>
';
$(function(){
$('#files').tree({
expanded: 'li:lt(2)'
});
//浮动导航 waypoints.js
$('#main-nav-holder').waypoint(function(event, direction) {
$(this).parent().toggleClass('sticky', direction === "down");
event.stopPropagation();
});
// 单行显示更多
$('span[nc_type="show"]').click(function(){
示例7: defaultGoodsImage
/js/ajaxfileupload/ajaxfileupload.js" charset="utf-8"></script>
<script src="<?php
echo RESOURCE_SITE_URL;
?>
/js/jquery.ajaxContent.pack.js" type="text/javascript"></script>
<script type="text/javascript" src="<?php
echo SHOP_RESOURCE_SITE_URL;
?>
/js/store_goods_add.step3.js" charset="utf-8"></script>
<script>
var SITEURL = "<?php
echo SHOP_SITE_URL;
?>
";
var DEFAULT_GOODS_IMAGE = "<?php
echo UPLOAD_SITE_URL . DS . defaultGoodsImage(240);
?>
";
var SHOP_RESOURCE_SITE_URL = "<?php
echo SHOP_RESOURCE_SITE_URL;
?>
";
$(function(){
<?php
if ($output['edit_goods_sign']) {
?>
$('input[type="submit"]').click(function(){
ajaxpost('goods_image', '', '', 'onerror');
});
<?php
}
示例8: getMbSpecialImageUrl
/**
* 获取运单图片地址
*/
function getMbSpecialImageUrl($image_name = '')
{
$name_array = explode('_', $image_name);
if (count($name_array) == 2) {
$image_path = DS . ATTACH_MOBILE . DS . 'special' . DS . $name_array[0] . DS . $image_name;
} else {
$image_path = DS . ATTACH_MOBILE . DS . 'special' . DS . $image_name;
}
if (is_file(BASE_UPLOAD_PATH . $image_path)) {
return UPLOAD_SITE_URL . $image_path;
} else {
return UPLOAD_SITE_URL . '/' . defaultGoodsImage('240');
}
}
示例9: defaultGoodsImage
</div>
<div class="clearfix"></div>
</div>
<!-- [//主体部分] -->
<!-- [//列表页] -->
<script src="<?php echo RESOURCE_SITE_URL;?>/js/waypoints.js"></script>
<script src="<?php echo SHOP_RESOURCE_SITE_URL;?>/js/search_category_menu.js"></script>
<script type="text/javascript">
var defaultSmallGoodsImage = '<?php echo defaultGoodsImage(240);?>';
var defaultTinyGoodsImage = '<?php echo defaultGoodsImage(60);?>';
$(function(){
$('#files').tree({
expanded: 'li:lt(2)'
});
//浮动导航 waypoints.js
$('#main-nav-holder').waypoint(function(event, direction) {
$(this).parent().toggleClass('sticky', direction === "down");
event.stopPropagation();
});
// 单行显示更多
$('span[nc_type="show"]').click(function(){
s = $(this).parents('dd').prev().find('li[nc_type="none"]');
if(s.css('display') == 'none'){
示例10: image_path
function image_path($file, $type = '')
{
$type_array = explode(',_', ltrim(GOODS_IMAGES_EXT, '_'));
if (!in_array($type, $type_array)) {
$type = '240';
}
if (empty($file)) {
return UPLOAD_SITE_URL . '/' . defaultGoodsImage($type);
}
$search_array = explode(',', GOODS_IMAGES_EXT);
$file = str_ireplace($search_array, '', $file);
$fname = basename($file);
// 本地存储时,增加判断文件是否存在,用默认图代替
if (!file_exists(BASE_UPLOAD_PATH . '/' . ATTACH_GOODS . '/' . $store_id . '/' . ($type == '' ? $file : str_ireplace('.', '_' . $type . '.', $file)))) {
return UPLOAD_SITE_URL . '/' . defaultGoodsImage($type);
}
$thumb_host = UPLOAD_SITE_URL . '/' . ATTACH_GOODS;
return $thumb_host . '/' . $store_id . '/' . ($type == '' ? $file : str_ireplace('.', '_' . $type . '.', $file));
if (!file_exists(UPLOAD_SITE_URL . '/' . 'shop/common/' . $file)) {
return UPLOAD_SITE_URL . '/' . defaultGoodsImage($type);
}
return UPLOAD_SITE_URL . '/' . 'shop/common/' . $file;
}
示例11: getMicroshopDefaultImage
function getMicroshopDefaultImage()
{
return UPLOAD_SITE_URL . '/' . defaultGoodsImage('240');
}
示例12: foreach
</tr>
<?php
foreach ($output['prod_list'] as $v) {
?>
<tr>
<td class="w60 picture"><div class="size-56x56"><span class="thumb size-56x56"><i></i><a href="<?php
echo SiteUrl;
?>
/index.php?act=pointprod&op=pinfo&id=<?php
echo $v['point_goodsid'];
?>
" target="_blank" class="order_info_pic"> <img src="<?php
echo SiteUrl . DS . ATTACH_POINTPROD . DS . $v['point_goodsimage'] . '_small.' . get_image_type($v['point_goodsimage']);
?>
" onerror="this.src='<?php
echo SiteUrl . DS . defaultGoodsImage('tiny');
?>
'" onload="javascript:DrawImage(this,56,56);" /></a></span></div></td>
<td class="w50pre"><a href="<?php
echo SiteUrl;
?>
/index.php?act=pointprod&op=pinfo&id=<?php
echo $v['point_goodsid'];
?>
" target="_blank"><?php
echo $v['point_goodsname'];
?>
</a></td>
<td><?php
echo $v['point_goodspoints'];
?>
示例13: wcthumb
function wcthumb($file, $type = '', $store_id)
{
// $type_array = explode(',_', ltrim(GOODS_IMAGES_EXT, '_'));
// if (!in_array($type, $type_array)) {
// $type = '240';
// }
if (empty($file)) {
return UPLOAD_SITE_URL . '/' . defaultGoodsImage($type);
}
// if (empty($work['sn_work_pic'])) {
// return UPLOAD_SITE_URL.'/'.defaultGoodsImage($type);
// }
//
// exit('1');
//$search_array = explode(',', GOODS_IMAGES_EXT);
// $file = str_ireplace($search_array,'',$work['sn_work_pic']);
// $fname = basename($file);
//
//
// if (preg_match('/^(\d+_)/',$fname)){
// $user_id = substr($fname,0,strpos($fname,'_'));
// }else{
// $user_id = $work['sn_store_id'];
// }
//// return BASE_UPLOAD_PATH.'/'.ATTACH_DWORK.'/'.$user_id.'/'.$file;
//// exit();
//
// $file = $type == '' ? $file : str_ireplace('.', '_' . $type . '.', $file);
if (!file_exists(BASE_UPLOAD_PATH . '/' . ATTACH_WORK . '/' . $file)) {
// exit('1');
return UPLOAD_SITE_URL . '/' . defaultGoodsImage($type);
}
$thumb_host = UPLOAD_SITE_URL . '/' . ATTACH_WORK;
return $thumb_host . '/' . $file;
}
示例14: pointprodThumb
/**
* 取得积分商品缩略图的完整URL路径
*
* @param string $imgurl 商品名称
* @param string $type 缩略图类型 值为small
* @return string
*/
function pointprodThumb($image_name = '', $type = '')
{
if (!in_array($type, array('small', 'mid'))) {
$type = '';
}
if (empty($image_name)) {
return UPLOAD_SITE_URL . '/' . defaultGoodsImage('240');
}
if ($type) {
$file_path = ATTACH_POINTPROD . DS . str_ireplace('.', '_' . $type . '.', $image_name);
} else {
$file_path = ATTACH_POINTPROD . DS . $image_name;
}
if (!file_exists(BASE_UPLOAD_PATH . DS . $file_path)) {
return UPLOAD_SITE_URL . '/' . defaultGoodsImage('240');
}
return UPLOAD_SITE_URL . DS . $file_path;
}
示例15: defaultGoodsImage
?>
" target="_blank" tile="<?php
echo $v['pgoods_name'];
?>
"><?php
echo $v['pgoods_name'];
?>
</a></dt>
<dd class="gift-pic"><i></i> <a target="_blank" href="<?php
echo SiteUrl . DS . 'index.php?act=pointprod&op=pinfo&id=' . $v['pgoods_id'];
?>
"> <img src="<?php
echo $v['pgoods_image'];
?>
" onerror="this.src='<?php
echo defaultGoodsImage('small');
?>
'" onload="javascript:DrawImage(this,160,160);" alt="<?php
echo $v['pgoods_name'];
?>
" /> </a></dd>
<dd class="gift-price"><?php
echo $lang['pointprod_goodsprice'] . $lang['nc_colon'];
?>
<em><?php
echo $lang['currency'] . $v['pgoods_price'];
?>
</em></dd>
<dd class="gift-pointpord"><?php
echo $lang['pointprod_pointsname'] . $lang['nc_colon'];
echo $v['pgoods_points'];