xref: /plugin/bez/ctl/start.php (revision de02284c1e90f3c0d8df29c1c019b3ef912eafd9)
1<?php
2//include_once DOKU_PLUGIN."bez/models/threads.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$my_tasks_conut = $this->model->tasks->count(array(
40                                'state' => '0',
41                                'executor' => $this->model->user_nick
42                            ));
43
44$my_issues_count = $this->model->issues->count(array(
45                                'state' => '0',
46                                'coordinator' => $this->model->user_nick
47                            ));
48
49$proposals_count = $this->model->issues->count(array(
50                                'state' => '0',
51                                'coordinator' => '-proposal'
52                            ));
53
54$this->tpl->set('timeline', $this->model->timeline->get_all(30));
55$this->tpl->set('my_tasks_conut', $my_tasks_conut);
56$this->tpl->set('my_issues_conut', $my_issues_count);
57$this->tpl->set('proposals_count', $proposals_count);
58
59
60//create database
61//~ $this->model;
62
63//~ include_once DOKU_PLUGIN."bez/models/threads.php";
64//~ $isso = new Issues();
65//~ $no = count($isso->get_filtered(array('state' => '0', 'coordinator' => $INFO['client'])));
66//~ $template['my_issues'] = $no;
67
68//~ $no = count($isso->get_filtered( array('state' => '-proposal') ));
69//~ $template['proposals'] = $no;
70
71
72