xref: /plugin/bez/ctl/start.php (revision 8d31684b59cd74df19e69f525a2cd4ce398f2bf9)
1<?php
2//include_once DOKU_PLUGIN."bez/models/issues.php";
3//include_once DOKU_PLUGIN."bez/models/comments.php";
4//include_once DOKU_PLUGIN."bez/models/causes.php";
5//include_once DOKU_PLUGIN."bez/models/tasks.php";
6//
7///*w celach importu*/
8//include_once DOKU_PLUGIN."bez/models/issuetypes.php";
9//new Issuetypes();
10//
11//$isso = new Issues();
12//$tasko= new Tasks();
13//$causo = new Causes();
14//$commo = new Comments();
15//
16////pobierz rekordy z ostatniego miesiąca
17//$issues = $isso->get_by_days(31);
18//$tasks = $tasko->get_by_days(31);
19//$causes = $causo->get_by_days(31);
20//$comments = $commo->get_by_days(31);
21//
22//$timeline = $helper->days_array_merge($issues, $tasks, $comments, $causes);
23//
24//$template['timeline'] = $timeline;
25//
26//$isso = new Issues();
27//$no = count($isso->get_filtered(array('state' => '0', 'coordinator' => $INFO['client'])));
28//$template['my_issues'] = $no;
29//
30//$tasko = new Tasks();
31//$no = count($tasko->get_filtered(array('taskstate' => '0', 'executor' => $INFO['client'])));
32//$template['my_tasks'] = $no;
33//
34//$no = count($isso->get_filtered( array('state' => '-proposal') ));
35//$template['proposals'] = $no;
36//
37//$template['client'] = $INFO['client'];
38
39//create database
40$this->model;
41
42include_once DOKU_PLUGIN."bez/models/issues.php";
43$isso = new Issues();
44$no = count($isso->get_filtered(array('state' => '0', 'coordinator' => $INFO['client'])));
45$template['my_issues'] = $no;
46
47$no = count($isso->get_filtered( array('state' => '-proposal') ));
48$template['proposals'] = $no;
49
50$template['timeline'] = $this->model->timeline->get_all(30);
51//$template['my_issues'] = 'b.d.';
52$template['my_tasks'] = $this->model->tasks->count(array(
53                                'state' => '0',
54                                'executor' => $this->model->user_nick
55                            ));
56//$template['proposals'] = 'b.d.';
57
58/*pobieranie wersji beza na podstawie pliku plugin.info.txt*/
59$info = $this->getInfo();
60$template['version'] = $info['date'];
61
62