Subversion Repositories wpShopGermany4

Rev

Rev 5899 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 5899 Rev 5945
Line 1... Line 1...
1
<?php $this->render(WPSG_PATH_VIEW.'/mods/mod_statistics/simplefilter.phtml'); ?>
1
<?php $this->render(WPSG_PATH_VIEW.'/mods/mod_statistics/simplefilter.phtml'); ?>
2
 
2
 
3
<?php 
3
<?php 
4
 
4
	
5
	if (wpsg_isSizedArray($this->view['chart']['data'])) 
5
	if (wpsg_isSizedArray($this->view['chart']['data'])) 
6
	{
6
	{
-
 
7
		$cnt = count($this->view['chart']['data']);
-
 
8
		unset($this->view['chart']['data']['template']);
-
 
9
		$cnt = count($this->view['chart']['data']);
7
		
10
		
8
		for ($i = 0; $i < count($this->view['chart']['data']); $i++)
11
		for ($i = 0; $i < count($this->view['chart']['data']); $i++)
9
		{
12
		{
-
 
13
			//if (!key_exists('label', $this->view['chart']['data'][$i])) continue;
-
 
14
			//$lbl = $this->view['chart']['data'][$i]['label'];
-
 
15
			//if ($lbl == null) continue;
10
			
16
			
11
			$chartJS['legend'][$i] = "{";
17
			$chartJS['legend'][$i] = "{";
12
			
18
			
13
			if (isset($this->view['chart']['data'][$i]['label']))
19
			if (isset($this->view['chart']['data'][$i]['label']))
14
			{
20
			{
Line 26... Line 32...
26
			$j = 0;
32
			$j = 0;
27
 
33
 
28
			if (wpsg_isSizedArray($this->view['chart']['data'][$i]))
34
			if (wpsg_isSizedArray($this->view['chart']['data'][$i]))
29
			{
35
			{
30
					
36
					
31
			foreach ((array)$this->view['chart']['data'][$i]['records'] as $index => $record)
37
				foreach ((array)$this->view['chart']['data'][$i]['records'] as $index => $record)
32
			{
-
 
33
				
-
 
34
				//immer das Datum vom Rootelement nutzen
-
 
35
				$k = 0 ;
-
 
36
				
-
 
37
				foreach ($this->view['chart']['data'][0]['records'] as $rindex => $rrecord)
-
 
38
				{
38
				{
-
 
39
					
-
 
40
					//immer das Datum vom Rootelement nutzen
-
 
41
					$k = 0 ;
-
 
42
					
-
 
43
					foreach ($this->view['chart']['data'][0]['records'] as $rindex => $rrecord)
-
 
44
					{
39
					if ($j == $k)
45
						if ($j == $k)
40
					{							
46
						{							
41
						if (mktime($record['hour'], 0, 0, $record['month'], $record['day'], $record['year']) <= mktime(date_i18n('H'), 0, 0, date_i18n('m'), date_i18n('d'), date_i18n('Y')))
47
							if (mktime($record['hour'], 0, 0, $record['month'], $record['day'], $record['year']) <= mktime(date_i18n('H'), 0, 0, date_i18n('m'), date_i18n('d'), date_i18n('Y')))
42
						{
48
							{
43
							$chartJS['area']['area'.$i][] = "['".$rrecord['year'].'/'.$rrecord['month'].'/'.$rrecord['day']." ".$rrecord['hour'].":00:00', ".wpsg_hspc($record['total'])."]"; 
49
								$chartJS['area']['area'.$i][] = "['".$rrecord['year'].'/'.$rrecord['month'].'/'.$rrecord['day']." ".$rrecord['hour'].":00:00', ".wpsg_hspc($record['total'])."]"; 
-
 
50
							} 
44
						} 
51
						}	
-
 
52
						$k++;
45
					}	
53
					}
-
 
54
				
-
 
55
					if ($j == count($this->view['chart']['data'][$i]['records']) - 1) { 
-
 
56
				  		$chartJS['area']['area'.$i] = '['.implode(',', (array)$chartJS['area']['area'.$i]).']'; 
-
 
57
				  	}
-
 
58
				  	
46
					$k++;
59
				  	$j++;
47
				}
60
				}
48
			
61
			
49
				if ($j == count($this->view['chart']['data'][$i]['records']) - 1) { 
-
 
50
			  		$chartJS['area']['area'.$i] = '['.implode(',', (array)$chartJS['area']['area'.$i]).']'; 
-
 
51
			  	}
-
 
52
			  	
-
 
53
			  	$j++;
-
 
54
			}
-
 
55
			
-
 
56
			}
62
			}
57
			
63
			
58
		}
64
		}
59
 
65
 
60
	}
66
	}
Line 100... Line 106...
100
	          	min:'<?php echo $this->view['chart']['data'][0]['year']; ?>/<?php echo $this->view['chart']['data'][0]['month']; ?>/<?php echo $this->view['chart']['data'][0]['day']; ?> 00:00',
106
	          	min:'<?php echo $this->view['chart']['data'][0]['year']; ?>/<?php echo $this->view['chart']['data'][0]['month']; ?>/<?php echo $this->view['chart']['data'][0]['day']; ?> 00:00',
101
	          	max:'<?php echo $this->view['chart']['data'][0]['year']; ?>/<?php echo $this->view['chart']['data'][0]['month']; ?>/<?php echo $this->view['chart']['data'][0]['day']; ?> 23:00',
107
	          	max:'<?php echo $this->view['chart']['data'][0]['year']; ?>/<?php echo $this->view['chart']['data'][0]['month']; ?>/<?php echo $this->view['chart']['data'][0]['day']; ?> 23:00',
102
	          	tickInterval: '1 hours'
108
	          	tickInterval: '1 hours'
103
	        },
109
	        },
104
	        yaxis:{
110
	        yaxis:{
105
                label:'<?php echo wpsg_hspc($this->view['chart']['info']['yaxis']['label']); ?>',
111
                label:'<?php echo wpsg_hspc(wpsg_getStr($this->view['chart']['info']['yaxis']['label'])); ?>',
106
                tickOptions: {
112
                tickOptions: {
107
                	formatter: wpsg_statistics_number_format
113
                	formatter: wpsg_statistics_number_format
108
            	},
114
            	},
109
        		min:0
115
        		min:0
110
            }
116
            }