Browse Source

提交修改

lvhao 5 months ago
parent
commit
7e9df8d4fc
1 changed files with 93 additions and 92 deletions
  1. 93 92
      core/CoreApp/controllers/User.php

+ 93 - 92
core/CoreApp/controllers/User.php

@@ -472,13 +472,13 @@ class User extends Start_Controller {
 		{
 		{
 			$user = $this->user->get_api($_SESSION['api']);
 			$user = $this->user->get_api($_SESSION['api']);
 			$usp = $user;
 			$usp = $user;
-			$fgshop = "";$sid = "";
-			$user = explode('|',trim($user['shop'],'|'));
+		    $fgshop = "";$sid = "";
+		    $user = explode('|',trim($user['shop'],'|'));
 			foreach ($user as $value) 
 			foreach ($user as $value) 
-			{
+		    {
 				if($value != '18' && $value != '19' && $value != '12' && $value != '13' && $value != '9' && $value != '15' && $value != '27' && $value != '28' && $value != '29' && $value != '30' && $value != '21' && $value != '34')
 				if($value != '18' && $value != '19' && $value != '12' && $value != '13' && $value != '9' && $value != '15' && $value != '27' && $value != '28' && $value != '29' && $value != '30' && $value != '21' && $value != '34')
 				{
 				{
-					$fgshop .= " shop = ".$value." or";
+				    $fgshop .= " shop = ".$value." or";
 				}
 				}
 				$sid .= " id = ".$value." or";
 				$sid .= " id = ".$value." or";
 			}
 			}
@@ -494,7 +494,7 @@ class User extends Start_Controller {
 			}
 			}
 			else
 			else
 			{
 			{
-				$where = " and source = '$source'";
+			    $where = " and source = '$source'";
 			}
 			}
 		}
 		}
 		$tm = strtotime(date("Ymd"),time());
 		$tm = strtotime(date("Ymd"),time());
@@ -505,22 +505,22 @@ class User extends Start_Controller {
 			$k = $zdt;
 			$k = $zdt;
 			$tab = $this->input->post('tab',true);
 			$tab = $this->input->post('tab',true);
 			$pdtime = date('Y-m-d-H',time());
 			$pdtime = date('Y-m-d-H',time());
-			if(is_file("./data/tj/".$pdtime.".txt") && $tab == 1 && $zdt > 172800)
-			{
-				$myfile = fopen("./data/tj/".$pdtime.".txt", "r") or die("Unable to open file!");
-				$bc = fread($myfile,filesize("./data/tj/".$pdtime.".txt"));
-				fclose($myfile);
-				$bc = json_decode($bc,true);
-				echo json_encode($bc['zhcx'][$source][$zdt]);exit;
-			}
-			else
-			{
+		    if(is_file("./data/tj/".$pdtime.".txt") && $tab == 1 && $zdt > 172800)
+		    {
+			    $myfile = fopen("./data/tj/".$pdtime.".txt", "r") or die("Unable to open file!");
+                $bc = fread($myfile,filesize("./data/tj/".$pdtime.".txt"));
+                fclose($myfile);
+			    $bc = json_decode($bc,true);
+			    echo json_encode($bc['zhcx'][$source][$zdt]);exit;
+		    }
+		    else
+		    {
 			$customer = $this->customer->find_all("shop !=''",'num,zhcx');
 			$customer = $this->customer->find_all("shop !=''",'num,zhcx');
 			$customerkey = array_column($customer,'zhcx'); 
 			$customerkey = array_column($customer,'zhcx'); 
-			$customer= array_combine($customerkey,$customer);
+            $customer= array_combine($customerkey,$customer);
 			$customersmt = $this->customersmt->find_all("shop !=''",'num,zhcx');
 			$customersmt = $this->customersmt->find_all("shop !=''",'num,zhcx');
 			$customersmtkey = array_column($customersmt,'zhcx'); 
 			$customersmtkey = array_column($customersmt,'zhcx'); 
-			$customersmt= array_combine($customersmtkey,$customersmt);
+            $customersmt= array_combine($customersmtkey,$customersmt);
 			//$start = '2018-10-15';
 			//$start = '2018-10-15';
 			//$end = '2018-11-26';
 			//$end = '2018-11-26';
 			//$tim = strtotime($start);
 			//$tim = strtotime($start);
@@ -530,41 +530,41 @@ class User extends Start_Controller {
 				if($zdt >= 691200)
 				if($zdt >= 691200)
 				{
 				{
 					$k = $usat-$k-$k;
 					$k = $usat-$k-$k;
-					$j = $usat;
-					$n = ($j-$k)/(24*3600);
+			        $j = $usat;
+				    $n = ($j-$k)/(24*3600);
 				}
 				}
 				else
 				else
 				{
 				{
 					$n = 2;
 					$n = 2;
-					$usat = strtotime(date("Ymd"),time())-$k+2*24*3600;
+			        $usat = strtotime(date("Ymd"),time())-$k+2*24*3600;
 				}
 				}
 			}
 			}
 			else
 			else
 			{
 			{
-				$timedata = explode('|',$zdt);
+			    $timedata = explode('|',$zdt);
 				$ktime = strtotime($timedata[0]);
 				$ktime = strtotime($timedata[0]);
-				$jtime = strtotime($timedata[1]);
+			    $jtime = strtotime($timedata[1]);
 				$ktime = $ktime-($jtime-$ktime);
 				$ktime = $ktime-($jtime-$ktime);
 				$k = $ktime;
 				$k = $ktime;
-				$j = $jtime;
+			    $j = $jtime;
 				$n = ($j-$k)/(24*3600);
 				$n = ($j-$k)/(24*3600);
 				$usat = $jtime;
 				$usat = $jtime;
 			}
 			}
-			$time=array();$timeold=array();$stime=array();$dlznum = array();$smtnum = array();$ymoney = array();$money = array();
+		    $time=array();$timeold=array();$stime=array();$dlznum = array();$smtnum = array();$ymoney = array();$money = array();
 			$dlzmoneyb=array();$smtmoneyb=array();$ttmoneyb=array();$zkh = array();
 			$dlzmoneyb=array();$smtmoneyb=array();$ttmoneyb=array();$zkh = array();
 			$dlzsl=0;$dlzje=0;$dlzssje=0;$smtsl=0;$smtje=0;$smtssje=0;$ttsl=0;$ttje=0;$ttssje=0;$shopdata = array();
 			$dlzsl=0;$dlzje=0;$dlzssje=0;$smtsl=0;$smtje=0;$smtssje=0;$ttsl=0;$ttje=0;$ttssje=0;$shopdata = array();
 			$ys = $this->shop->find_all("type != '0' and id != '18' and id != '19' and id != '12' and id != '13' and id != '9' and id != '15' and id != '27' and id != '28' and id != '29' and id != '30' and id != '21' and id != '34'");
 			$ys = $this->shop->find_all("type != '0' and id != '18' and id != '19' and id != '12' and id != '13' and id != '9' and id != '15' and id != '27' and id != '28' and id != '29' and id != '30' and id != '21' and id != '34'");
 			foreach ($ys as $v) 
 			foreach ($ys as $v) 
-			{
+		    {
 				$shopdata[$v['id']] = array('id'=>$v['id'],'b'=>$v['type'],'fdl'=>0,'chl'=>0,'num'=>0,'fgl'=>0);
 				$shopdata[$v['id']] = array('id'=>$v['id'],'b'=>$v['type'],'fdl'=>0,'chl'=>0,'num'=>0,'fgl'=>0);
 				$zkh[$v['id']] = array();
 				$zkh[$v['id']] = array();
 			}
 			}
-			for($i=1;$i<$n;$i++)
-			{
+		    for($i=1;$i<$n;$i++)
+		    {
 				if($n > 13 && $i > $n/2 || $n < 14)
 				if($n > 13 && $i > $n/2 || $n < 14)
 				{
 				{
 				$t = $usat-($n*24*60*60)+($i*24*60*60);
 				$t = $usat-($n*24*60*60)+($i*24*60*60);
-				$time[] = date('m-d',$t);
+			    $time[] = date('m-d',$t);
 				$ct = strtotime(date('Ymd',$t));
 				$ct = strtotime(date('Ymd',$t));
 				$ctj = strtotime(date('Ymd',$t+24*3600));
 				$ctj = strtotime(date('Ymd',$t+24*3600));
 				$dlz = $this->fullorder->find_all("dtime >= ".$ct." and dtime <= ".$ctj.$where." and shop != '0' and (".rtrim($fgshop,'or').") and shop != '18' and shop != '19'",'shop,email');
 				$dlz = $this->fullorder->find_all("dtime >= ".$ct." and dtime <= ".$ctj.$where." and shop != '0' and (".rtrim($fgshop,'or').") and shop != '18' and shop != '19'",'shop,email');
@@ -574,13 +574,13 @@ class User extends Start_Controller {
 				$sd = array_merge($dlz,$smt,$tt);
 				$sd = array_merge($dlz,$smt,$tt);
 				$fgldata = array();
 				$fgldata = array();
 				foreach ($sd as $v) 
 				foreach ($sd as $v) 
-				{
+		        {
 					if(isset($v['email']))
 					if(isset($v['email']))
 					{
 					{
-						if(!isset($fgldata[$v['shop'].'-'.$v['email']]))
-						{
+					    if(!isset($fgldata[$v['shop'].'-'.$v['email']]))
+					    {
 							$fgldata[$v['shop'].'-'.$v['email']] = 0;
 							$fgldata[$v['shop'].'-'.$v['email']] = 0;
-						}
+					    }
 						else
 						else
 						{
 						{
 							$fgldata[$v['shop'].'-'.$v['email']] += 1;
 							$fgldata[$v['shop'].'-'.$v['email']] += 1;
@@ -590,9 +590,9 @@ class User extends Start_Controller {
 					else
 					else
 					{
 					{
 						if(!isset($fgldata[$v['shop'].'-'.$v['userid']]))
 						if(!isset($fgldata[$v['shop'].'-'.$v['userid']]))
-						{
+					    {
 							$fgldata[$v['shop'].'-'.$v['userid']] = 0;
 							$fgldata[$v['shop'].'-'.$v['userid']] = 0;
-						}
+					    }
 						else
 						else
 						{
 						{
 							$fgldata[$v['shop'].'-'.$v['userid']] += 1;
 							$fgldata[$v['shop'].'-'.$v['userid']] += 1;
@@ -601,7 +601,7 @@ class User extends Start_Controller {
 					}
 					}
 				}
 				}
 				foreach ($sd as $v) 
 				foreach ($sd as $v) 
-				{
+		        {
 					$chl = 0;
 					$chl = 0;
 					if(isset($shopdata[$v['shop']]))
 					if(isset($shopdata[$v['shop']]))
 					{
 					{
@@ -609,22 +609,22 @@ class User extends Start_Controller {
 						{
 						{
 							if(isset($customer[$v['shop'].'-'.$v['email']]['num']))
 							if(isset($customer[$v['shop'].'-'.$v['email']]['num']))
 							{
 							{
-								$fdl = $customer[$v['shop'].'-'.$v['email']]['num']>1?1:0;
+							    $fdl = $customer[$v['shop'].'-'.$v['email']]['num']>1?1:0;
 							}
 							}
 							else
 							else
 							{
 							{
 								$fdl = 0;
 								$fdl = 0;
 							}
 							}
 							foreach ($ys as $vv) 
 							foreach ($ys as $vv) 
-							{
-								if($vv['id'] != $v['shop'] && isset($customer[$vv['id'].'-'.$v['email']]))
+		                    {
+				                if($vv['id'] != $v['shop'] && isset($customer[$vv['id'].'-'.$v['email']]))
 								{
 								{
 									$chl = 1;
 									$chl = 1;
 								}
 								}
-							}
+			                }
 							if(isset($fgldata[$v['shop'].'-'.$v['email']]))
 							if(isset($fgldata[$v['shop'].'-'.$v['email']]))
 							{
 							{
-								$fgl = $fgldata[$v['shop'].'-'.$v['email']]>0?1:0;
+							    $fgl = $fgldata[$v['shop'].'-'.$v['email']]>0?1:0;
 							}
 							}
 							else
 							else
 							{
 							{
@@ -635,38 +635,38 @@ class User extends Start_Controller {
 						{
 						{
 							if(isset($customersmt[$v['shop'].'-'.$v['userid']]['num']))
 							if(isset($customersmt[$v['shop'].'-'.$v['userid']]['num']))
 							{
 							{
-								$fdl = $customersmt[$v['shop'].'-'.$v['userid']]['num']>1?1:0;
+							    $fdl = $customersmt[$v['shop'].'-'.$v['userid']]['num']>1?1:0;
 							}
 							}
 							else
 							else
 							{
 							{
 								$fdl = 0;
 								$fdl = 0;
 							}
 							}
 							foreach ($ys as $vv) 
 							foreach ($ys as $vv) 
-							{
-								if($vv['id'] != $v['shop'] && isset($customersmt[$vv['id'].'-'.$v['userid']]))
+		                    {
+				                if($vv['id'] != $v['shop'] && isset($customersmt[$vv['id'].'-'.$v['userid']]))
 								{
 								{
 									$chl = 1;
 									$chl = 1;
 								}
 								}
-							}
+			                }
 							if(isset($fgldata[$v['shop'].'-'.$v['userid']]))
 							if(isset($fgldata[$v['shop'].'-'.$v['userid']]))
 							{
 							{
-								$fgl = $fgldata[$v['shop'].'-'.$v['userid']]>0?1:0;
+							    $fgl = $fgldata[$v['shop'].'-'.$v['userid']]>0?1:0;
 							}
 							}
 							else
 							else
 							{
 							{
 								$fgl = 0;
 								$fgl = 0;
 							}
 							}
 						}
 						}
-						$shopdata[$v['shop']]['fdl'] = $shopdata[$v['shop']]['fdl']+$fdl;
+					    $shopdata[$v['shop']]['fdl'] = $shopdata[$v['shop']]['fdl']+$fdl;
 						$shopdata[$v['shop']]['chl'] = $shopdata[$v['shop']]['chl']+$chl;
 						$shopdata[$v['shop']]['chl'] = $shopdata[$v['shop']]['chl']+$chl;
 						$shopdata[$v['shop']]['fgl'] = $shopdata[$v['shop']]['fgl']+$fgl;
 						$shopdata[$v['shop']]['fgl'] = $shopdata[$v['shop']]['fgl']+$fgl;
 						$shopdata[$v['shop']]['num'] += 1;
 						$shopdata[$v['shop']]['num'] += 1;
 					}
 					}
+                }
 				}
 				}
-				}
-			}
+		    }
 			foreach ($shopdata as $k=>$v) 
 			foreach ($shopdata as $k=>$v) 
-			{
+		    {
 				$shopdata[$k]['fdl'] = $v['num']=='0'?0:sprintf("%01.2f",($v['fdl']/$v['num']*100)).'%';
 				$shopdata[$k]['fdl'] = $v['num']=='0'?0:sprintf("%01.2f",($v['fdl']/$v['num']*100)).'%';
 				$shopdata[$k]['chl'] = $v['num']=='0'?0:sprintf("%01.2f",($v['chl']/$v['num']*100)).'%';
 				$shopdata[$k]['chl'] = $v['num']=='0'?0:sprintf("%01.2f",($v['chl']/$v['num']*100)).'%';
 				$shopdata[$k]['fgl'] = count($zkh[$v['id']])=='0'?0:sprintf("%01.2f",($v['fgl']/count($zkh[$v['id']])*100)).'%';
 				$shopdata[$k]['fgl'] = count($zkh[$v['id']])=='0'?0:sprintf("%01.2f",($v['fgl']/count($zkh[$v['id']])*100)).'%';
@@ -681,16 +681,16 @@ class User extends Start_Controller {
 			$k = $zdt;
 			$k = $zdt;
 			$tab = $this->input->post('tab',true);
 			$tab = $this->input->post('tab',true);
 			$pdtime = date('Y-m-d-H',time());
 			$pdtime = date('Y-m-d-H',time());
-			if(is_file("./data/tj/".$pdtime.".txt") && $tab == 1 && $zdt > 172800)//前端改店内需要修改zdt   172800
-			{
-				$myfile = fopen("./data/tj/".$pdtime.".txt", "r") or die("Unable to open file!");
-				$bc = fread($myfile,filesize("./data/tj/".$pdtime.".txt"));
-				fclose($myfile);
-				$bc = json_decode($bc,true);
-				echo json_encode($bc['tj'][$source][$zdt]);exit;
-			}
-			else
-			{
+		    if(is_file("./data/tj/".$pdtime.".txt") && $tab == 1 && $zdt > 172800)//前端改店内需要修改zdt   172800
+		    {
+			    $myfile = fopen("./data/tj/".$pdtime.".txt", "r") or die("Unable to open file!");
+                $bc = fread($myfile,filesize("./data/tj/".$pdtime.".txt"));
+                fclose($myfile);
+			    $bc = json_decode($bc,true);
+			    echo json_encode($bc['tj'][$source][$zdt]);exit;
+		    }
+		    else
+		    {
 			//$start = '2018-10-15';
 			//$start = '2018-10-15';
 			//$end = '2018-11-26';
 			//$end = '2018-11-26';
 			//$tim = strtotime($start);
 			//$tim = strtotime($start);
@@ -700,44 +700,44 @@ class User extends Start_Controller {
 				if($zdt >= 691200)
 				if($zdt >= 691200)
 				{
 				{
 					$k = $usat-$k-$k;
 					$k = $usat-$k-$k;
-					$j = $usat;
-					$n = ($j-$k)/(24*3600);
+			        $j = $usat;
+				    $n = ($j-$k)/(24*3600);
 				}
 				}
 				else
 				else
 				{
 				{
 					$n = 2;
 					$n = 2;
-					$usat = strtotime(date("Ymd"),time())-$k+2*24*3600;
+			        $usat = strtotime(date("Ymd"),time())-$k+2*24*3600;
 				}
 				}
 			}
 			}
 			else
 			else
 			{
 			{
-				$timedata = explode('|',$zdt);
+			    $timedata = explode('|',$zdt);
 				$ktime = strtotime($timedata[0]);
 				$ktime = strtotime($timedata[0]);
-				$jtime = strtotime($timedata[1]);
+			    $jtime = strtotime($timedata[1]);
 				$ktime = $ktime-($jtime-$ktime);
 				$ktime = $ktime-($jtime-$ktime);
 				$k = $ktime;
 				$k = $ktime;
-				$j = $jtime;
+			    $j = $jtime;
 				$n = ($j-$k)/(24*3600);
 				$n = ($j-$k)/(24*3600);
 				$usat = $jtime;
 				$usat = $jtime;
 				$tm = $jtime;
 				$tm = $jtime;
 				$zdt = $jtime-$ktime;
 				$zdt = $jtime-$ktime;
 			}
 			}
-			$time=array();$timeold=array();$stime=array();$dlznum = array();$smtnum = array();$ymoney = array();$money = array();
+		    $time=array();$timeold=array();$stime=array();$dlznum = array();$smtnum = array();$ymoney = array();$money = array();
 			$dlzmoneyb=array();$smtmoneyb=array();$ttmoneyb=array();$zkh = array();
 			$dlzmoneyb=array();$smtmoneyb=array();$ttmoneyb=array();$zkh = array();
 			$dlzsl=0;$dlzje=0;$dlzssje=0;$smtsl=0;$smtje=0;$smtssje=0;$ttsl=0;$ttje=0;$ttssje=0;$shopdata = array();
 			$dlzsl=0;$dlzje=0;$dlzssje=0;$smtsl=0;$smtje=0;$smtssje=0;$ttsl=0;$ttje=0;$ttssje=0;$shopdata = array();
 			$ys = $this->shop->find_all("type != '0' and id != '16' and id != '17' and id != '18' and id != '19' and id != '20' and id != '12' and id != '13' and id != '8' and id != '10' and id != '11' and id != '13' and id != '22' and id != '23' and id != '24' and id != '25' and id != '26' and id != '9' and id != '15' and id != '27' and id != '28' and id != '29' and id != '30' and id != '21' and id != '34'");
 			$ys = $this->shop->find_all("type != '0' and id != '16' and id != '17' and id != '18' and id != '19' and id != '20' and id != '12' and id != '13' and id != '8' and id != '10' and id != '11' and id != '13' and id != '22' and id != '23' and id != '24' and id != '25' and id != '26' and id != '9' and id != '15' and id != '27' and id != '28' and id != '29' and id != '30' and id != '21' and id != '34'");
 			foreach ($ys as $v) 
 			foreach ($ys as $v) 
-			{
+		    {
 				$shopdata[$v['id']] = array('num'=>0,'money'=>0,'tmoney'=>0,'fdl'=>0,'chl'=>0);
 				$shopdata[$v['id']] = array('num'=>0,'money'=>0,'tmoney'=>0,'fdl'=>0,'chl'=>0);
 			}
 			}
-			for($i=1;$i<$n;$i++)
-			{
+		    for($i=1;$i<$n;$i++)
+		    {
 				//近7天时间
 				//近7天时间
 				//$t = ($usat-16*3600)-($n*24*60*60)+($i*24*60*60);
 				//$t = ($usat-16*3600)-($n*24*60*60)+($i*24*60*60);
 				if($n > 13 && $i > $n/2 || $n < 14)
 				if($n > 13 && $i > $n/2 || $n < 14)
 				{
 				{
 				$t = $usat-($n*24*60*60)+($i*24*60*60);
 				$t = $usat-($n*24*60*60)+($i*24*60*60);
-				$time[] = date('m-d',$t);
+			    $time[] = date('m-d',$t);
 				$ct = strtotime(date('Ymd',$t));
 				$ct = strtotime(date('Ymd',$t));
 				$ctj = strtotime(date('Ymd',$t+24*3600));
 				$ctj = strtotime(date('Ymd',$t+24*3600));
 				$dlz = $this->fullorder->find_all("dtime >= ".$ct." and dtime <= ".$ctj.$where." and shop != '0' and (".rtrim($fgshop,'or').") and shop != '18' and shop != '19'",'budget,shouldmoney,shop,number,refundy,budget,email,refundy');
 				$dlz = $this->fullorder->find_all("dtime >= ".$ct." and dtime <= ".$ctj.$where." and shop != '0' and (".rtrim($fgshop,'or').") and shop != '18' and shop != '19'",'budget,shouldmoney,shop,number,refundy,budget,email,refundy');
@@ -796,15 +796,15 @@ class User extends Start_Controller {
 				//数量及金额结束
 				//数量及金额结束
 				$sd = array_merge($dlz,$smt,$tt);
 				$sd = array_merge($dlz,$smt,$tt);
 				foreach ($sd as $v) 
 				foreach ($sd as $v) 
-				{
+		        {
 					if(isset($shopdata[$v['shop']]))
 					if(isset($shopdata[$v['shop']]))
 					{
 					{
 						$shopdata[$v['shop']]['num'] += 1;
 						$shopdata[$v['shop']]['num'] += 1;
 						$shopdata[$v['shop']]['money'] += $v['shouldmoney'];
 						$shopdata[$v['shop']]['money'] += $v['shouldmoney'];
 						$shopdata[$v['shop']]['tmoney'] += $v['budget']+$v['refundy'];
 						$shopdata[$v['shop']]['tmoney'] += $v['budget']+$v['refundy'];
-						
+					   
 					}
 					}
-				}
+                }
 				}
 				}
 				else if ($n > 13 && $i <= $n/2)
 				else if ($n > 13 && $i <= $n/2)
 				{
 				{
@@ -824,9 +824,9 @@ class User extends Start_Controller {
 				$ttmoneyb[] = $ttm;
 				$ttmoneyb[] = $ttm;
 				//数量及金额结束
 				//数量及金额结束
 				}
 				}
-			}
+		    }
 			foreach ($shopdata as $k=>$v) 
 			foreach ($shopdata as $k=>$v) 
-			{
+		    {
 				$sn = $this->shop->read($k);
 				$sn = $this->shop->read($k);
 				$shopdata[$k]['money'] = sprintf("%01.2f",$v['money']).'$';
 				$shopdata[$k]['money'] = sprintf("%01.2f",$v['money']).'$';
 				$shopdata[$k]['tmoney'] = sprintf("%01.2f",$v['tmoney']).'$';
 				$shopdata[$k]['tmoney'] = sprintf("%01.2f",$v['tmoney']).'$';
@@ -834,7 +834,7 @@ class User extends Start_Controller {
 				$shopdata[$k]['name'] = $sn['shopname'];
 				$shopdata[$k]['name'] = $sn['shopname'];
 				$shopdata[$k]['b'] = $sn['type'];
 				$shopdata[$k]['b'] = $sn['type'];
 				$shopdata[$k]['id'] = $sn['id'];
 				$shopdata[$k]['id'] = $sn['id'];
-			}
+            }
 			$shopdata = array_values($shopdata);
 			$shopdata = array_values($shopdata);
 			//$sycp=array();
 			//$sycp=array();
 			/**
 			/**
@@ -848,12 +848,12 @@ class User extends Start_Controller {
 			$smtlist = $this->fullordersmt->find_all("fpdata != '' and dtime >= '".strtotime(date("Ymd",time()-86400))."' and dtime <= '".strtotime(date("Ymd",time()))."' and (".rtrim($fgshop,'or').")".$where,'whlabel,fpdata');
 			$smtlist = $this->fullordersmt->find_all("fpdata != '' and dtime >= '".strtotime(date("Ymd",time()-86400))."' and dtime <= '".strtotime(date("Ymd",time()))."' and (".rtrim($fgshop,'or').")".$where,'whlabel,fpdata');
 			$rows = array_merge($dlzlist,$smtlist);
 			$rows = array_merge($dlzlist,$smtlist);
 			foreach ($rows as $v) 
 			foreach ($rows as $v) 
-			{
+		    {
 				$number = explode('|',trim($v['whlabel'],'|'));
 				$number = explode('|',trim($v['whlabel'],'|'));
 				$or = explode(';',trim($v['fpdata'],';'));
 				$or = explode(';',trim($v['fpdata'],';'));
 				$i=0;
 				$i=0;
 				foreach ($or as $va) 
 				foreach ($or as $va) 
-				{
+		        {
 					$ord = explode('|',$va);
 					$ord = explode('|',$va);
 					$orod = explode(',',$ord[0]);
 					$orod = explode(',',$ord[0]);
 					$numberod = explode('-',$number[$i]);
 					$numberod = explode('-',$number[$i]);
@@ -871,8 +871,8 @@ class User extends Start_Controller {
 					{
 					{
 						if(isset($numberod[1]))
 						if(isset($numberod[1]))
 						{
 						{
-							$typeclass = $this->typeclass->read($orod['0']);
-							$sycp[$orod[1]] = array($numberod[1],0,str_replace($typeclass['title'].' ','',$ord[1]));
+						    $typeclass = $this->typeclass->read($orod['0']);
+						    $sycp[$orod[1]] = array($numberod[1],0,str_replace($typeclass['title'].' ','',$ord[1]));
 						}
 						}
 					}
 					}
 					$i++;
 					$i++;
@@ -880,7 +880,7 @@ class User extends Start_Controller {
 			}
 			}
 			arsort($sycp);
 			arsort($sycp);
 			$sycp = array_values($sycp);
 			$sycp = array_values($sycp);
-			$sycp = array_slice($sycp,0,10);
+		    $sycp = array_slice($sycp,0,10);
 			//产品排行结束
 			//产品排行结束
 			**/
 			**/
 			//当时实时数据结束
 			//当时实时数据结束
@@ -894,14 +894,14 @@ class User extends Start_Controller {
 			//当时实时数据开始
 			//当时实时数据开始
 			if(!$shop)
 			if(!$shop)
 			{
 			{
-				$sssl = $this->fullorder->find_all("(".rtrim($fgshop,'or').") and dtime >= ".$zdtime." and dtime <= ".strtotime(date('Ymd',$usat+24*3600)).$where,'budget,shouldmoney');
-				$ssje = $this->fullordersmt->find_all("(".rtrim($fgshop,'or').") and dtime >= ".$zdtime." and dtime <= ".strtotime(date('Ymd',$usat+24*3600)).$where,'budget,shouldmoney');
+			    $sssl = $this->fullorder->find_all("(".rtrim($fgshop,'or').") and dtime >= ".$zdtime." and dtime <= ".strtotime(date('Ymd',$usat+24*3600)).$where,'budget,shouldmoney');
+			    $ssje = $this->fullordersmt->find_all("(".rtrim($fgshop,'or').") and dtime >= ".$zdtime." and dtime <= ".strtotime(date('Ymd',$usat+24*3600)).$where,'budget,shouldmoney');
 				$tje = $this->fullordertt->find_all("state != 217 and (".rtrim($fgshop,'or').") and dtime >= ".$zdtime." and dtime <= ".strtotime(date('Ymd',$usat+24*3600)).$where,'budget,shouldmoney');
 				$tje = $this->fullordertt->find_all("state != 217 and (".rtrim($fgshop,'or').") and dtime >= ".$zdtime." and dtime <= ".strtotime(date('Ymd',$usat+24*3600)).$where,'budget,shouldmoney');
-				$sssldlz = count($sssl);
-				$ssslsmt = count($ssje);
+			    $sssldlz = count($sssl);
+			    $ssslsmt = count($ssje);
 				$sssltt = count($tje);
 				$sssltt = count($tje);
-				$ssjedlz = sprintf("%01.2f",array_sum(array_column($sssl,'budget')));
-				$ssjesmt = sprintf("%01.2f",array_sum(array_column($ssje,'budget')));
+			    $ssjedlz = sprintf("%01.2f",array_sum(array_column($sssl,'budget')));
+			    $ssjesmt = sprintf("%01.2f",array_sum(array_column($ssje,'budget')));
 				$ssjett= sprintf("%01.2f",array_sum(array_column($tje,'budget')));
 				$ssjett= sprintf("%01.2f",array_sum(array_column($tje,'budget')));
 				$sssl = $sssldlz+$ssslsmt+$sssltt;
 				$sssl = $sssldlz+$ssslsmt+$sssltt;
 				$ssje = $ssjedlz+$ssjesmt+$ssjett;
 				$ssje = $ssjedlz+$ssjesmt+$ssjett;
@@ -944,10 +944,10 @@ class User extends Start_Controller {
 			}
 			}
 			else
 			else
 			{
 			{
-				$rows = $this->$sid->find_all("shop = '".$id."' and dtime >= '".($gshtime-$xqtime)."' and dtime <= '".($gshtime+24*60*60-$xqtime)."'",'whlabel,fpdata,number');
+			    $rows = $this->$sid->find_all("shop = '".$id."' and dtime >= '".($gshtime-$xqtime)."' and dtime <= '".($gshtime+24*60*60-$xqtime)."'",'whlabel,fpdata,number');
 			}
 			}
 			foreach ($rows as $v) 
 			foreach ($rows as $v) 
-			{
+		    {
 				$or = explode('|',ltrim($v['whlabel'],'|'));
 				$or = explode('|',ltrim($v['whlabel'],'|'));
 				for($i=0;$i<count($or);$i++)
 				for($i=0;$i<count($or);$i++)
 				{
 				{
@@ -968,15 +968,15 @@ class User extends Start_Controller {
 						@$ro = explode('|',$oo[$i]);
 						@$ro = explode('|',$oo[$i]);
 						if(isset($ro[1]))
 						if(isset($ro[1]))
 						{
 						{
-							$dpxq[$orod[0]] = array($orod[1],$v['number'].';',$ro[1]);//统计多少条
-							//$dpxq[$orod[0]] = array(1,0,$ro[1]);//统计多少单
+						   $dpxq[$orod[0]] = array($orod[1],$v['number'].';',$ro[1]);//统计多少条
+						   //$dpxq[$orod[0]] = array(1,0,$ro[1]);//统计多少单
 						}
 						}
 					}
 					}
 				}
 				}
 			}
 			}
 			$dpxq = array_values($dpxq);
 			$dpxq = array_values($dpxq);
 			arsort($dpxq);
 			arsort($dpxq);
-				$dpxq = array_slice($dpxq,0,9999);
+			 $dpxq = array_slice($dpxq,0,9999);
 			echo @json_encode(array('dpxq'=>$dpxq,'success'=>true));exit;
 			echo @json_encode(array('dpxq'=>$dpxq,'success'=>true));exit;
 		}
 		}
 		$wlshop = $this->shop->find_all('1=1 and '.rtrim($sid,'or'));
 		$wlshop = $this->shop->find_all('1=1 and '.rtrim($sid,'or'));
@@ -988,6 +988,7 @@ class User extends Start_Controller {
 	
 	
 	
 	
 	
 	
+	
 	/**
 	/**
 	public function super_unique($array,$key)//多维删除重复
 	public function super_unique($array,$key)//多维删除重复
     {
     {