module/flk/source/index/flk_product.ctrl.php

(开头部分) 7KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

<?php
	/**
	*Author 雷日锦 362606856@qq.com 
	*控制器自动生成
	*/
	if(!defined("ROOT_PATH")) exit("die Access ");
	class flk_productControl extends skymvc{
		
		public function __construct(){
			parent::__construct();
			 
		}
		
		public function onDefault(){
			$shopid=get("shopid","i");
			$shop=MM("flk","flk_shop")->get($shopid,"shopid,shopname,imgurl,flk_discount,flk_maxmoney,flk_new,express_money");
			$where=" shopid=".$shopid." AND  status in(0,1,2)";
			$url="/module.php?m=flk_product&a=default";
			$limit=24;
			$start=get("per_page","i");
			$catid=get("catid","i");
			$recWhere=" isrecommend=1 AND status=1 ";
			if($catid){
				$cids=MM("flk","flk_shop_product_category")->id_family($catid);
				$where.=" AND shop_catid in("._implode($cids).") ";
				$recWhere.=" AND shop_catid in("._implode($cids).") ";
			}else{
				$where.=" AND isrecommend=1 ";
			}
			$order=" id DESC";
			$type=get("type");
			switch($type){
				case "new":
					$where.=" AND isnew=1 ";
					break;
				case "sold":
					$order=" month_buy_num DESC ";
					break;
				case "price":
					$order=" price ASC";
					break;
			}
			$option=array(
				"start"=>$start,
				"limit"=>$limit,
				"order"=>$order,
				"where"=>$where
			);
			 
			$rscount=true;
			$data=M("mod_flk_product")->select($option,$rscount);
			//分类
			$catList=MM("flk","flk_shop_product_category")->children($shopid);
			//判断产品是否在购物车
			$userid=M("login")->userid;
			$cartPros=MM("flk","flk_cart")->getProductAmount("userid=".$userid." AND shopid=".$shopid." AND ksid=0");
			$cartList=MM("flk","flk_cart")->Dselect(array(
				"where"=>" shopid=".$shopid." AND userid=".$userid
			));
			$cart_total_num=0;
后面还有 213 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。