From ad405c7045c6e242080ec9d3ce4c9e586b517c4f Mon Sep 17 00:00:00 2001 From: Daniel Schmitzer Date: Thu, 14 Jan 2016 14:55:36 +0000 Subject: - Testweise 4 git-svn-id: https://[internal]/wordpress/plugins/wpsg4@5261 0d5edaf7-2b12-4e95-93f4-047927463d4b --- views/mods/mod_statistics/chartturnover/all.phtml | 123 ++++++++++++++++++++ .../mod_statistics/chartturnover/customrange.phtml | 112 ++++++++++++++++++ views/mods/mod_statistics/chartturnover/data.phtml | 111 ++++++++++++++++++ views/mods/mod_statistics/chartturnover/day.phtml | 118 +++++++++++++++++++ .../mods/mod_statistics/chartturnover/month.phtml | 117 +++++++++++++++++++ .../mod_statistics/chartturnover/quarter.phtml | 120 +++++++++++++++++++ views/mods/mod_statistics/chartturnover/week.phtml | 118 +++++++++++++++++++ views/mods/mod_statistics/chartturnover/year.phtml | 127 +++++++++++++++++++++ 8 files changed, 946 insertions(+) create mode 100644 views/mods/mod_statistics/chartturnover/all.phtml create mode 100644 views/mods/mod_statistics/chartturnover/customrange.phtml create mode 100644 views/mods/mod_statistics/chartturnover/data.phtml create mode 100644 views/mods/mod_statistics/chartturnover/day.phtml create mode 100644 views/mods/mod_statistics/chartturnover/month.phtml create mode 100644 views/mods/mod_statistics/chartturnover/quarter.phtml create mode 100644 views/mods/mod_statistics/chartturnover/week.phtml create mode 100644 views/mods/mod_statistics/chartturnover/year.phtml (limited to 'views/mods/mod_statistics/chartturnover') diff --git a/views/mods/mod_statistics/chartturnover/all.phtml b/views/mods/mod_statistics/chartturnover/all.phtml new file mode 100644 index 0000000..c9e7181 --- /dev/null +++ b/views/mods/mod_statistics/chartturnover/all.phtml @@ -0,0 +1,123 @@ +render(WPSG_PATH_VIEW.'/mods/mod_statistics/simplefilter.phtml'); ?> + +view['chart']['data'])) + { + + for ($i = 0; $i < count($this->view['chart']['data']); $i++) + { + + $chartJS['legend'][$i] = "{"; + + if (isset($this->view['chart']['data'][$i]['label'])) + { + $chartJS['legend'][$i] .= "label:'".$this->view['chart']['data'][$i]['label']."',"; + } + + $chartJS['legend'][$i] .= " highlighter: {"; + + $chartJS['legend'][$i] .= " formatString: '
%s, %s ".$this->get_option('wpsg_currency')."
'"; + + $chartJS['legend'][$i] .= " }"; + + $chartJS['legend'][$i] .= "}"; + + $j = 0; + + foreach ((array)$this->view['chart']['data'][$i]['records'] as $index => $record) + { + + //immer das Datum vom Rootelement nutzen + $k = 0 ; + + foreach ($this->view['chart']['data'][0]['records'] as $rindex => $rrecord) + { + if ($j == $k) + { + if ($record['year'] <= date_i18n('Y')) + { + $chartJS['area']['area'.$i][] = "['".$rrecord['year'].'/'."1".'/'."1"."', ".wpsg_hspc($record['total'])."]"; + } + } + $k++; + } + + if ($j == count($this->view['chart']['data'][$i]['records']) - 1) { + $chartJS['area']['area'.$i] = '['.implode(',', $chartJS['area']['area'.$i]).']'; + } + + $j++; + } + + } + + } + +?> + + +
+ +
+ +
+ render(WPSG_PATH_VIEW.'/mods/mod_statistics/chartturnover/data.phtml'); ?> +
+ +
+ + + + + \ No newline at end of file diff --git a/views/mods/mod_statistics/chartturnover/customrange.phtml b/views/mods/mod_statistics/chartturnover/customrange.phtml new file mode 100644 index 0000000..3f046ae --- /dev/null +++ b/views/mods/mod_statistics/chartturnover/customrange.phtml @@ -0,0 +1,112 @@ +render(WPSG_PATH_VIEW.'/mods/mod_statistics/simplefilter.phtml'); ?> + +view['chart']['data']['records'])) { + + $i = 0; + $j = 0; + + foreach ($this->view['chart']['data']['records'] as $data) + { + + $series = "{"; + + if (isset($this->view['chart']['data']['label'])) + { + $series .= "label:'".$this->view['chart']['data']['label'].' '.$data['year']."',"; + } + else + { + $series .= "label:'".date_i18n('F', strtotime($data['day'].'.'.$data['month'].'.'.$data['year'])).' '.$data['year']."', "; + } + + $series .= " highlighter: {"; + + $series .= " formatString: '
%s ".$data['month']." ".$data['year'].", %s. ".$this->get_option('wpsg_currency')."
'"; + + $series .= " }"; + + $series .= "}"; + + if (!in_array($series, (array)$chartJS['legend']) || !isset($chartJS['legend'][$i])) + { + $chartJS['legend'][$i] = $series; + } + + $chartJS['year'] .= "['".$data['year'].'/'.$data['month'].'/'."1"."', ".wpsg_hspc($data['total'])."], "; + + if ($j == count($this->view['chart']['data']['records']) - 1) { + $chartJS['year'] = 'var year = ['.substr($chartJS['year'], 0, -2).'];'; + } + + $j++; + + } + + } +?> + + +
+ +
+ +
+ render(WPSG_PATH_VIEW.'/mods/mod_statistics/chartturnover/data.phtml'); ?> +
+ +
+ + + + + \ No newline at end of file diff --git a/views/mods/mod_statistics/chartturnover/data.phtml b/views/mods/mod_statistics/chartturnover/data.phtml new file mode 100644 index 0000000..7d5e89c --- /dev/null +++ b/views/mods/mod_statistics/chartturnover/data.phtml @@ -0,0 +1,111 @@ +view['chart']['data'] as $index => $data) { ?> + +
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + get_option('wpsg_currency'); ?> + + + + + + + + + + get_option('wpsg_currency'); ?> + + +
+
+ + + +
+ + \ No newline at end of file diff --git a/views/mods/mod_statistics/chartturnover/day.phtml b/views/mods/mod_statistics/chartturnover/day.phtml new file mode 100644 index 0000000..18c1b4c --- /dev/null +++ b/views/mods/mod_statistics/chartturnover/day.phtml @@ -0,0 +1,118 @@ +render(WPSG_PATH_VIEW.'/mods/mod_statistics/simplefilter.phtml'); ?> + +view['chart']['data'])) + { + + for ($i = 0; $i < count($this->view['chart']['data']); $i++) + { + + $chartJS['legend'][$i] = "{"; + + if (isset($this->view['chart']['data'][$i]['label'])) + { + $chartJS['legend'][$i] .= "label:'".$this->view['chart']['data'][$i]['label']."',"; + } + + $chartJS['legend'][$i] .= " highlighter: {"; + + $chartJS['legend'][$i] .= " formatString: '
%s Uhr, %s ".$this->get_option('wpsg_currency')."
'"; + + $chartJS['legend'][$i] .= " }"; + + $chartJS['legend'][$i] .= "}"; + + $j = 0; + + foreach ((array)$this->view['chart']['data'][$i]['records'] as $index => $record) + { + + //immer das Datum vom Rootelement nutzen + $k = 0 ; + + foreach ($this->view['chart']['data'][0]['records'] as $rindex => $rrecord) + { + if ($j == $k) + { + 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'))) + { + $chartJS['area']['area'.$i][] = "['".$rrecord['year'].'/'.$rrecord['month'].'/'.$rrecord['day']." ".$rrecord['hour'].":00:00', ".wpsg_hspc($record['total'])."]"; + } + } + $k++; + } + + if ($j == count($this->view['chart']['data'][$i]['records']) - 1) { + $chartJS['area']['area'.$i] = '['.implode(',', (array)$chartJS['area']['area'.$i]).']'; + } + + $j++; + } + + } + + } + +?> + + +
+ +
+ +
+ render(WPSG_PATH_VIEW.'/mods/mod_statistics/chartturnover/data.phtml'); ?> +
+ +
+ + + + + \ No newline at end of file diff --git a/views/mods/mod_statistics/chartturnover/month.phtml b/views/mods/mod_statistics/chartturnover/month.phtml new file mode 100644 index 0000000..5ef077a --- /dev/null +++ b/views/mods/mod_statistics/chartturnover/month.phtml @@ -0,0 +1,117 @@ +render(WPSG_PATH_VIEW.'/mods/mod_statistics/simplefilter.phtml'); ?> + +view['chart']['data'])) + { + + for ($i = 0; $i < count($this->view['chart']['data']); $i++) + { + + $chartJS['legend'][$i] = "{"; + + if (isset($this->view['chart']['data'][$i]['label'])) + { + $chartJS['legend'][$i] .= "label:'".$this->view['chart']['data'][$i]['label']."',"; + } + + $chartJS['legend'][$i] .= " highlighter: {"; + + $chartJS['legend'][$i] .= " formatString: '
%s ".$this->view['chart']['data'][$i]['year'].", %s ".$this->get_option('wpsg_currency')."
'"; + + $chartJS['legend'][$i] .= " }"; + + $chartJS['legend'][$i] .= "}"; + + $j = 0; + + foreach ((array)$this->view['chart']['data'][$i]['records'] as $index => $record) + { + + //immer das Datum vom Rootelement nutzen + $k = 0 ; + + foreach ($this->view['chart']['data'][0]['records'] as $rindex => $rrecord) + { + if ($j == $k) + { + if (mktime(0, 0, 0, $record['month'], $record['day'], $record['year']) <= mktime(0, 0, 0, date_i18n('m'), date_i18n('d'), date_i18n('Y'))) + { + $chartJS['area']['area'.$i][] = "['".$rrecord['year'].'/'.$rrecord['month'].'/'.$rrecord['day']."', ".wpsg_hspc($record['total'])."]"; + } + } + $k++; + } + + if ($j == count($this->view['chart']['data'][$i]['records']) - 1) { + $chartJS['area']['area'.$i] = '['.implode(',', $chartJS['area']['area'.$i]).']'; + } + + $j++; + } + + } + + } + +?> + +
+ +
+ +
+ render(WPSG_PATH_VIEW.'/mods/mod_statistics/chartturnover/data.phtml'); ?> +
+ +
+ + + + + \ No newline at end of file diff --git a/views/mods/mod_statistics/chartturnover/quarter.phtml b/views/mods/mod_statistics/chartturnover/quarter.phtml new file mode 100644 index 0000000..36fc4cf --- /dev/null +++ b/views/mods/mod_statistics/chartturnover/quarter.phtml @@ -0,0 +1,120 @@ +render(WPSG_PATH_VIEW.'/mods/mod_statistics/simplefilter.phtml'); ?> + +

+view['chart']['data'])) + { + + for ($i = 0; $i < count($this->view['chart']['data']); $i++) + { + + $chartJS['legend'][$i] = "{"; + + if (isset($this->view['chart']['data'][$i]['label'])) + { + $chartJS['legend'][$i] .= "label:'".$this->view['chart']['data'][$i]['label']."',"; + } + + $chartJS['legend'][$i] .= " highlighter: {"; + + $chartJS['legend'][$i] .= " formatString: '
KW %s ".$this->view['chart']['data'][$i]['year'].", %s ".$this->get_option('wpsg_currency')."
'"; + + $chartJS['legend'][$i] .= " }"; + + $chartJS['legend'][$i] .= "}"; + + $j = 0; + + foreach ((array)$this->view['chart']['data'][$i]['records'] as $index => $record) + { + + //immer das Datum vom Rootelement nutzen + $k = 0 ; + + foreach ($this->view['chart']['data'][0]['records'] as $rindex => $rrecord) + { + if ($j == $k) + { + if ($record['week'] <= (int)date_i18n('W') || $record['year'] < date_i18n('Y')) + { + $chartJS['area']['area'.$i][] = "['".$j."', ".wpsg_hspc($record['total'])."]"; + + + } + $chartJS['ticks']['ticks'.$i][] = '['.$j.', \'KW '.$record['week'].'\']'; + } + $k++; + } + + if ($j == count($this->view['chart']['data'][$i]['records']) - 1) { + $chartJS['area']['area'.$i] = '['.implode(',', (array)$chartJS['area']['area'.$i]).']'; + } + + $j++; + } + + } + + } + +?> + + +
+ +
+ +
+ render(WPSG_PATH_VIEW.'/mods/mod_statistics/chartturnover/data.phtml'); ?> +
+ +
+ + + + + \ No newline at end of file diff --git a/views/mods/mod_statistics/chartturnover/week.phtml b/views/mods/mod_statistics/chartturnover/week.phtml new file mode 100644 index 0000000..57dd4a5 --- /dev/null +++ b/views/mods/mod_statistics/chartturnover/week.phtml @@ -0,0 +1,118 @@ +render(WPSG_PATH_VIEW.'/mods/mod_statistics/simplefilter.phtml'); ?> + +view['chart']['data'])) + { + + $series = ''; + + for ($i = 0; $i < count($this->view['chart']['data']); $i++) + { + + $chartJS['legend'][$i] = "{"; + + if (isset($this->view['chart']['data'][$i]['label'])) + { + $chartJS['legend'][$i] .= "label:'".$this->view['chart']['data'][$i]['label']."',"; + } + + $chartJS['legend'][$i] .= " highlighter: {"; + + $chartJS['legend'][$i] .= " formatString: '
%s ".$this->view['chart']['data'][$i]['year'].", %s ".$this->get_option('wpsg_currency')."
'"; + + $chartJS['legend'][$i] .= " }"; + + $chartJS['legend'][$i] .= "}"; + + $j = 0; + + foreach ($this->view['chart']['data'][$i]['records'] as $index => $record) + { + + //immer das Datum vom Rootelement nutzen + $k = 0 ; + + foreach ($this->view['chart']['data'][0]['records'] as $rindex => $rrecord) + { + if ($j == $k) + { + if (mktime(0, 0, 0, $record['month'], $record['day'], $record['year']) <= mktime(0, 0, 0, date_i18n('m'), date_i18n('d'), date_i18n('Y'))) + { + $chartJS['area']['area'.$i][] = "['".$rrecord['year'].'/'.$rrecord['month'].'/'.$rrecord['day']."', ".wpsg_hspc($record['total'])."]"; + } + } + $k++; + } + + if ($j == count($this->view['chart']['data'][$i]['records']) - 1) { + $chartJS['area']['area'.$i] = '['.implode(',', $chartJS['area']['area'.$i]).']'; + } + + $j++; + } + + } + + } + +?> + +
+ +
+ +
+ render(WPSG_PATH_VIEW.'/mods/mod_statistics/chartturnover/data.phtml'); ?> +
+ +
+ + + + + \ No newline at end of file diff --git a/views/mods/mod_statistics/chartturnover/year.phtml b/views/mods/mod_statistics/chartturnover/year.phtml new file mode 100644 index 0000000..2be39aa --- /dev/null +++ b/views/mods/mod_statistics/chartturnover/year.phtml @@ -0,0 +1,127 @@ +render(WPSG_PATH_VIEW.'/mods/mod_statistics/simplefilter.phtml'); ?> + +view['chart']['data'])) + { + + for ($i = 0; $i < count($this->view['chart']['data']); $i++) + { + + $chartJS['legend'][$i] = "{"; + + if (isset($this->view['chart']['data'][$i]['label'])) + { + $chartJS['legend'][$i] .= "label:'".$this->view['chart']['data'][$i]['label']."',"; + } + + $chartJS['legend'][$i] .= " highlighter: { useXTickMarks: true, "; + + $chartJS['legend'][$i] .= " formatString: '
%s, %s. ".$this->get_option('wpsg_currency')."
'"; + + $chartJS['legend'][$i] .= " }"; + + $chartJS['legend'][$i] .= "}"; + + $j = 0; + + foreach ((array)$this->view['chart']['data'][$i]['records'] as $index => $record) + { + + //immer das Datum vom Rootelement nutzen + $k = 0 ; + + foreach ($this->view['chart']['data'][0]['records'] as $rindex => $rrecord) + { + if ($j == $k) + { + if (mktime(0, 0, 0, $record['month'], 1, $record['year']) <= mktime(0, 0, 0, date_i18n('m'), 1, date_i18n('Y'))) + { + $chartJS['area']['area'.$i][] .= "['".$j."', ".wpsg_hspc($record['total'])."]"; + } + $chartJS['ticks']['ticks'.$i][] = '['.$j.', \''.$record['tick'].'\']'; + } + $k++; + } + + if ($j == count($this->view['chart']['data'][$i]['records']) - 1) { + $chartJS['area']['area'.$i] = '['.implode(',', (array)$chartJS['area']['area'.$i]).']'; + } + + $j++; + } + + } + + } + +?> + + +
+ +
+ +
+ render(WPSG_PATH_VIEW.'/mods/mod_statistics/chartturnover/data.phtml'); ?> +
+ +
+ + + + + \ No newline at end of file -- cgit v1.2.3