• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

PHP get_good_name函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: index

 public function index()
 {
     if (!is_login()) {
         $this->error("您还没有登陆", U("User/login"));
     }
     if (IS_POST) {
         $id = I('post.id', 0, 'intval');
         //获取id
         if (!is_numeric($id)) {
             $this->error('ID错误!');
         }
         $info = M("shoplist")->find($id);
         $postnum = I('post.num');
         if (!is_numeric($postnum)) {
             $this->error('数量错误!');
         }
         if ($postnum < 1) {
             $this->error('无效数量!');
         }
         $num = $info['num'];
         //获取num
         $price = $info['price'];
         //获取价格
         $goodid = $info['goodid'];
         //获取goodid
         $parameters = $info['parameters'];
         $Exchange = D("Exchange");
         $Exchange->create();
         $Exchange->create_time = NOW_TIME;
         $Exchange->total = $num * $price;
         $Exchange->goodid = $goodid;
         $Exchange->status = 1;
         $Exchange->parameters = $parameters;
         $Exchange->add();
         addUserLog('申请换货,商品名称' . get_good_name($goodid) . '参数' . $parameters, is_login());
         $data['status'] = -4;
         //更改商品的售后信息
         $shop = M("shoplist");
         if ($shop->where("id='{$id}'")->save($data)) {
             $this->success('申请成功', U("center/index"));
         } else {
             $this->error('申请失败,或重复操作');
         }
     } else {
         $id = I('get.id', 0, 'intval');
         //获取id
         $msg = "Tips,提交换货单";
         $this->meta_title = '填写换货单';
         $detail = M("shoplist")->find($id);
         $this->assign('list', $detail);
         $this->assign('msg', $msg);
         $this->display();
     }
 }
开发者ID:gitchenze,项目名称:soloshop,代码行数:54,代码来源:ExchangeController.class.php


示例2: index

 public function index()
 {
     if (!is_login()) {
         $this->error("您还没有登陆", U("User/login"));
     }
     $listid = I('get.id', 0, 'intval');
     $shoplist = M('shoplist');
     $list = $shoplist->find($listid);
     //没有评论过
     if ($list["iscomment"] == 1) {
         $this->assign('comment', $list);
         $title = get_good_name($list["goodid"]);
         $this->meta_title = '评价商品_' . $title;
         $this->display();
     } else {
         $this->error('商品评价过');
     }
 }
开发者ID:gitchenze,项目名称:soloshop,代码行数:18,代码来源:CommentController.class.php


示例3: index

 public function index($cellphone = '')
 {
     $reserve = M('reserve');
     $cellphone = I('post.phone');
     $goodid = I('post.goodid');
     $map['cellphone'] = $cellphone;
     $map['goodid'] = $goodid;
     $info = $reserve->where($map)->find();
     if (empty($info)) {
         $data['cellphone'] = $cellphone;
         $data['create_time'] = NOW_TIME;
         $data['status'] = 1;
         $data['goodid'] = $goodid;
         $data['title'] = get_good_name($goodid);
         $reserve->add($data);
         $data['info'] = '预约成功!';
     } else {
         $data['status'] = -1;
         $data['info'] = '您已经预约过了!';
     }
     $this->ajaxreturn($data);
 }
开发者ID:kevins1022,项目名称:tpshop,代码行数:22,代码来源:ActivityController.class.php


示例4: index

 public function index()
 {
     if (is_login()) {
         $listid = I('get.id');
         $shoplist = M('shoplist');
         $list = $shoplist->find($listid);
         //没有评论过
         if ($list["iscomment"] == 1) {
             /* 热词调用*/
             $hotsearch = R("Index/getHotsearch");
             $this->assign('hotsearch', $hotsearch);
             /* 购物车调用*/
             $cart = R("Shopcart/usercart");
             $this->assign('usercart', $cart);
             if (!session('user_auth')) {
                 $usercart = $_SESSION['cart'];
                 $this->assign('usercart', $usercart);
             }
             /* 底部分类调用*/
             $menulist = R('Service/AllMenu');
             $this->assign('footermenu', $menulist);
             /* 左侧分类列表*/
             $mlist = R('Index/menulist');
             $this->assign('categoryq', $mlist);
             /** * 控制器必须!**/
             $this->assign('comment', $list);
             $title = get_good_name($list["goodid"]);
             $this->meta_title = '评价商品_' . $title;
             $this->display();
         } else {
             $this->error('商品评价过');
         }
     } else {
         $this->redirect('User/login');
     }
 }
开发者ID:FortuneZhang,项目名称:yershop,代码行数:36,代码来源:CommentController.class.php


示例5: addgood

 public function addgood($id)
 {
     $tag = htmlspecialchars($_POST['tag']);
     $num = 1;
     $id = htmlspecialchars($_POST['id']);
     $price = get_good_price($id);
     if (!isset($_SESSION['cart'])) {
         $_SESSION['cart'] = array();
     }
     $item = array();
     //如果该商品已存在则直接加其数量
     if (isset($_SESSION['cart'][$id])) {
         $_SESSION['cart'][$id]['num'] += $num;
         $item['id'] = $id;
         $item['price'] = $price;
         $item['num'] = $_SESSION['cart'][$id]['num'];
         $_SESSION['cart'][$id] = $item;
         $exsit = "1";
     } else {
         $item['id'] = $id;
         $item['price'] = $price;
         $item['num'] = $num;
         $_SESSION['cart'][$id] = $item;
         $exsit = "0";
     }
     $data['status'] = 1;
     $data['price'] = get_good_price($id);
     $coverid = get_cover_id($id);
     $data['src'] = get_good_img($coverid);
     $data['title'] = get_good_name($id);
     //登录用户,处理详情页ajaxt提交的数据保存到数据库
     if (is_login()) {
         $table = D("shopcart");
         $data['goodid'] = $id;
         $data['num'] = $num;
         $member = D("member");
         $uid = $member->uid();
         $data['uid'] = $uid;
         $pnum = M("shopcart")->where("goodid='{$id}'and uid='{$uid}'")->getField("num");
         if ($pnum) {
             $exsit = "1";
             $data['num'] = $pnum + $num;
             $table->where("goodid='{$id}'and uid='{$uid}'")->save($data);
         } else {
             $data['num'] = $num;
             $table->add($data);
             $exsit = "0";
         }
         $data['sql'] = 'sql';
         $data['num'] = M("shopcart")->where("goodid='{$id}'and uid='{$uid}'")->getField("num");
         $data['msg'] = '添加成功';
         $data['exsit'] = $exsit;
         $this->ajaxReturn($data);
     } else {
         $data['exsit'] = $exsit;
         $data['num'] = $item['num'];
         $data['msg'] = '添加成功';
         $this->ajaxReturn($data);
     }
 }
开发者ID:a1357479,项目名称:techan,代码行数:60,代码来源:ShopcartController.class.php


示例6: U

            $mod = $i % 2;
            ++$i;
            ?>
<tr>
		 <td align="center"><?php 
            echo $vo["goodid"];
            ?>
</td>
                <td><A href="<?php 
            echo U('Home/Article/detail?id=' . $vo['goodid']);
            ?>
" > <img src="<?php 
            echo get_cover(get_cover_id($vo["goodid"]), 'path');
            ?>
"  width="40" height="40"/><?php 
            echo get_good_name($vo["goodid"]);
            ?>
</A></td>
               <td align="center"> <span class="weight"><?php 
            echo get_weight($vo["goodid"]);
            ?>
</span>g</td>
                <td align="center"><?php 
            echo get_good_price($vo["goodid"]);
            ?>
</td>
                 <td align="center"><?php 
            echo $vo["num"];
            ?>
</td>
                
开发者ID:norain2050,项目名称:yershop,代码行数:30,代码来源:2cc296570db71fc54a095a0992ddf32e.php


示例7: U

                ++$i;
                ?>
<tr>
					<td><input class="ids row-selected" type="checkbox" name="id[]" value="<?php 
                echo $order["id"];
                ?>
"></td>
						<td><?php 
                echo $order["id"];
                ?>
</td>
						<td><a title="编辑" href="<?php 
                echo U('edit?id=' . $order['id'] . '&pid=' . $pid);
                ?>
"><?php 
                echo get_good_name($order["goodid"]);
                ?>
</a></td>
						
                        <td><?php 
                echo $order["total"];
                ?>
</td>
                        <td><?php 
                echo $order["status"];
                ?>
</td>
                         <td><?php 
                echo date('Y-m-d H:i:s', $order["create_time"]);
                ?>
</td>
开发者ID:a1357479,项目名称:techan,代码行数:31,代码来源:995d620f17dd9a59643348e2a4351c58.php


示例8: index

 public function index()
 {
     if (!is_login()) {
         $this->error("您还没有登陆", U("User/login"));
     }
     if (IS_POST) {
         $id = I('post.id', 0, 'intval');
         //获取id
         if (!is_numeric($id)) {
             $this->error('ID错误!');
         }
         $info = M("shoplist")->find($id);
         $postnum = I('post.num');
         if (!is_numeric($postnum)) {
             $this->error('数量错误!');
         }
         if ($postnum < 1) {
             $this->error('无效数量!');
         }
         $num = $info['num'];
         //获取num
         $price = $info['price'];
         //获取价格
         $goodid = $info['goodid'];
         //获取goodid
         $parameters = $info['parameters'];
         if ($postnum > $num) {
             $this->error('超出购买数量');
         } else {
             //保存信息到退货表
             $back = D("backlist");
             $back->create();
             //Create方法创建的数据对象是保存在内存,并没有实际写入到数据库,直到使用add或者save   方法才会真正写入数据库
             $back->create_time = NOW_TIME;
             $back->status = 1;
             $back->goodid = $goodid;
             $back->total = $num * $price;
             $back->parameters = $parameters;
             $result = $back->add();
             addUserLog('申请退货,商品名称' . get_good_name($goodid) . '参数' . $parameters, is_login());
             //更改商品的售后信息
             $data['status'] = 4;
             $shop = M("shoplist");
             $add = $shop->where("id='{$id}'")->save($data);
             if ($add) {
                 $this->success('提交成功', U("center/index"));
             } else {
                 $this->error('申请失败', U("center/index"));
             }
         }
     } else {
         $this->meta_title = '提交退货单';
         $id = I('get.id', 0, 'intval');
         //获取id
         if (!is_numeric($id)) {
             $this->error('ID错误!');
         }
         $msg = "Tips,提交退货单";
         $detail = M("shoplist")->find($id);
         //获取购物清单
         $this->assign('list', $detail);
         //获取物品id
         $this->assign('id', $id);
         $this->assign('msg', $msg);
         $this->display();
     }
 }
开发者ID:gitchenze,项目名称:soloshop,代码行数:67,代码来源:BackController.class.php


示例9: U

                
            </tr>
        </thead>  </tbody>  
           <tr>
		 <td align="center"><?php 
echo $info["goodid"];
?>
</td>
                <td><A href="<?php 
echo U('Home:Article/detail?id=' . $vo['goodid']);
?>
" > <img src="<?php 
echo get_cover(get_cover_id($info["goodid"]), 'path');
?>
"  width="40" height="40"/><?php 
echo get_good_name($info["goodid"]);
?>
</A></td>
               <td align="center"> <span class="weight"><?php 
echo get_weight($info["goodid"]);
?>
</span>g</td>
                <td align="center"><?php 
echo get_good_price($info["goodid"]);
?>
</td>
                 <td align="center"><?php 
echo $info["num"];
?>
</td>
                
开发者ID:norain2050,项目名称:yershop,代码行数:29,代码来源:05d2319e96918e86c7f1b2d2b74e8326.php


示例10: addgood

 /**
  * 添加商品  添加商品     未用到
  * param int $id 商品主键
  * int $num 购物数量
  */
 public function addgood($id)
 {
     $tag = $_POST['tag'];
     $num = 1;
     $id = $_POST['id'];
     $price = get_good_price($id);
     if (!isset($_SESSION['cart'])) {
         $_SESSION['cart'] = array();
     }
     $item = array();
     //如果该商品已存在则直接加其数量
     if (isset($_SESSION['cart'][$id])) {
         $_SESSION['cart'][$id]['num'] += $num;
         $item['id'] = $id;
         $item['price'] = $price;
         $item['num'] = $_SESSION['cart'][$id]['num'];
         $_SESSION['cart'][$id] = $item;
         $exsit = "1";
     } else {
         $item['id'] = $id;
         $item['price'] = $price;
         $item['num'] = $num;
         $_SESSION['cart'][$id] = $item;
         $exsit = "0";
     }
     $data['status'] = 1;
     $data['price'] = get_good_price($id);
     $coverid = get_cover_id($id);
     $data['src'] = get_good_img($coverid);
     $data['title'] = get_good_name($id);
     $data['exsit'] = $exsit;
     $data['num'] = $item['num'];
     $data['msg'] = '添加成功';
     $this->ajaxReturn($data);
 }
开发者ID:WineShop,项目名称:wine,代码行数:40,代码来源:ShopcartController.class.php


示例11: U

	<div  class="wrapper">

 

<div class="main"><div class="main_nav"><a rel="nofollow" href="<?php 
echo U("index/index");
?>
">首页</a>&gt;<p class="red fwb">帮助中心</p></div><div class="main_center"><div class="center_left">
<dl><dt><a rel="nofollow">购物流程</a></dt>
<dd><a rel="nofollow" href='javascript:vod(0);'>支付宝支付</a></dd>
<dd><a rel="nofollow"  href='javascript:vod(0);'>发票说明</dd><dd><a rel="nofollow"  href='javascript:vod(0);'>优惠券说明</a></dd></dl>
<dl class="last"><dt><a rel="nofollow">配送方式</a></dt><dd><a  href='javascript:vod(0);'>配送方式</a></dd><dd><a rel="nofollow"  href='javascript:vod(0);'>配送费用</a></dd><dd><a rel="nofollow"  href='javascript:vod(0);'>签收须知</a></dd></dl></div><div class="center_right" style="display: none;"><div class="center_right_loading"></div></div><div id="memberCenter" style="display: block;"><!-- 个人中心 初始状态 start -->
<div class="center_right" id="MemberCenterCtrl" style="display: block;">

	<span class="red" style="display: block;text-align:center;margin:20px 0 20px 37px;font-weight:bold;padding:10px;font-size:17px;"><?php 
echo get_good_name($id);
?>
</span>
  <form  method="post"  name="myform"  class="payform">


<div class="pay">

  <?php 
echo get_docoment_content($id);
?>
			
</form>

<script>function delcommon(event) { //获取事件源
event = event ? event : window.event; 
开发者ID:norain2050,项目名称:yershop,代码行数:31,代码来源:eb7a0cb2e309d1165cf324d03c195eb7.php


示例12:

                    ?>
_self<?php 
                }
                ?>
"><?php 
                echo $nav["title"];
                ?>
</a>
                      </li><?php 
            }
        }
    }
} else {
    echo "";
}
?>
    </ul>
    
  </div>
	<!-- /菜单 -->


	<!-- 主体 -->
	<div  class="commom_wrapper">

 
     
        <!-- Contents  -->
      
	  <div class="ml_content">
<div class="goodlist-main">
开发者ID:a1357479,项目名称:techan,代码行数:31,代码来源:5231e2bbdb7b9edc1f0f29f2bbab2a6e.php


示例13: U

echo U('Article/detail?id=' . $info['id']);
?>
&amp;pic=<?php 
echo C('DOMAIN');
echo get_cover($info["cover_id"], 'path');
?>
" data-item="tencent" class="J_vivo_share">
            <img alt="腾讯微博" src="/b2c/Public/Home/images/icon_tencent_weibo.jpg" app="b2c">        </a>                                                                
        <a target="_blank" title="分享到人人网" href="http://widget.renren.com/dialog/share?resourceUrl=<?php 
echo C('DOMAIN');
echo U('Article/detail?id=' . $info['id']);
?>
;srcUrl=<?php 
echo C('DOMAIN');
?>
&amp;title=<?php 
echo $info["title"];
?>
。(来自<?php 
echo C('SITENAME');
?>
)&amp;pic=<?php 
echo C('DOMAIN');
echo get_cover($info["cover_id"], 'path');
?>
" data-item="renren" class="J_vivo_share">
            <img alt="人人网" src="/b2c/Public/Home/images/icon_renrenwang.jpg" app="b2c">        </a>           
</span></p>

</div>
<!-- 商品参数 结束-->
开发者ID:FortuneZhang,项目名称:yershop,代码行数:31,代码来源:5c8e64f9796d3cd3e715f25b5ba7d7a5.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP get_good_price函数代码示例发布时间:2022-05-15
下一篇:
PHP get_gmtime函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap