1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
| <?php
| class lotto implements module {
| static function register_cmd() {
| return array(
| 'lotto' => 'cmd_lotto',
| 'lootto' => 'cmd_lotto',
| 'lotek' => 'cmd_lotto',
| 'wyniki' => 'cmd_lotto',
| 'l' => 'cmd_lotto',
| 'duzy' => 'cmd_lotto',
| 'dl' => 'cmd_lotto',
|
| 'express' => 'cmd_lotto',
| 'expres' => 'cmd_lotto',
| 'ekspress' => 'cmd_lotto',
| 'ekspress' => 'cmd_lotto',
| 'exp' => 'cmd_lotto',
| 'ex' => 'cmd_lotto',
| 'el' => 'cmd_lotto',
| 'mini' => 'cmd_lotto',
|
| 'multi' => 'cmd_lotto',
| 'multimulti' => 'cmd_lotto',
| 'multilotek' => 'cmd_lotto',
| 'mm' => 'cmd_lotto',
|
| 'ka' => 'cmd_lotto',
| 'kaskada' => 'cmd_lotto',
|
| 'twoj' => 'cmd_lotto',
| 'tsn' => 'cmd_lotto',
| 'jk' => 'cmd_lotto',
| 'joker' => 'cmd_lotto',
| );
| }
|
| static function help($cmd=NULL) {
| if($cmd === NULL) {
| GGapi::putRichText('lotto ', TRUE);
| GGapi::putRichText('[gra]', FALSE, TRUE);
| GGapi::putRichText("\n".' Wyniki gry liczbowej TS'."\n");
| }
| else
| {
| GGapi::putRichText('lotto ', TRUE);
| GGapi::putRichText('[gra]', FALSE, TRUE);
| GGapi::putRichText(' (alias: ');
| GGapi::putRichText('lotek, wyniki, l', TRUE);
| GGapi::putRichText(')'."\n".' Podaje wyniki ostatniego losowania gry Totalizatora Sportowego ');
| GGapi::putRichText('[gra]', FALSE, TRUE);
| GGapi::putRichText(', gdzie gra to: lotto, mini (Mini Lotto), mm (Multi Multi), kaskada lub joker.');
| }
| }
|
| static function cmd_lotto($name, $arg) {
| $skrot_nazwa = array(
| 'dl' => 'Lotto',
| 'dl2' => 'Lotto',
| 'el' => 'Mini Lotto',
| 'el2' => 'Mini Lotto',
| 'mm' => 'Multi Multi',
| 'mm2' => 'Multi Multi',
| 'mm14' => 'Multi Multi (14:00)',
| 'mm142' => 'Multi Multi (14:00)',
| 'mm22' => 'Multi Multi (22:00)',
| 'mm222' => 'Multi Multi (22:00)',
| 'jk' => 'Joker',
| 'jk2' => 'Jokera',
| 'ka' => 'Kaskada',
| 'ka2' => 'Kaskady',
| );
| $arg_start = array(
| 'dl' => 'dl', 'duzego' => 'dl', 'duzy' => 'dl', 'duzylotek' => 'dl',
| 'el' => 'el', 'express' => 'el', 'ekspress' => 'el', 'expres' => 'el', 'ekspres' => 'el', 'ex' => 'el', 'minilotto' => 'el', 'm' => 'el', 'ml' => 'el', 'mlotto' => 'el', 'mini' => 'el',
| 'mm' => 'mm', 'multilotka' => 'mm', 'multi' => 'mm', 'multimulti' => 'mm',
| 'jk' => 'jk', 'joker' => 'jk', 'jokera' => 'jk', 'tsn' => 'jk', 'numerek' => 'jk', 'numerka' => 'jk', 'twojego' => 'jk', 'twoj' => 'jk', 'szczesliwego' => 'jk', 'szczesliwy' => 'jk',
| 'ka' => 'ka', 'kaskada' => 'ka', 'k' => 'ka',
| );
| $arg = explode(' ', funcs::utfToAscii($arg));
| array_unshift($arg, $name);
|
| foreach($arg as $value) {
| if(empty($value))
| continue;
| $value = trim($value, "\t\n\r .,:;'\"");
| if(isset($arg_start[$value])) {
| $gra = $arg_start[$value];
| break;
| }
| }
|
| if(!isset($gra) || !$gra) {
| $gra = 'dl';
| }
|
| if($gra == 'mm') {
| $typy = array('14', '22');
| }
| else {
| $typy = array('');
| }
|
| $txt = '';
| foreach($typy as $addon) {
| $dane = unserialize(file_get_contents('./data/lotto/'.$gra.$addon.'.txt'));
| $txt .= 'Losowanie '.$skrot_nazwa[$gra.'2'].''.($addon ? ' '.$addon.':00' : '').' z dnia '.$dane['data']."\n";
| $gt = 1;
| if($gra == 'jk') {
| $txt .= $skrot_nazwa['jk'].': '.$dane[1]."\n".'Cztery liczby: '.$dane[2];
| $gt = 2;
| }
| else
| {
| $txt .= 'Liczby: '.$dane[1];
| }
|
| foreach($dane as $i => $l) {
| if(is_numeric($i) && $i>$gt) {
| $txt .= ', '.$l;
| }
| }
|
| if($gra == 'ml' || $gra == 'mm') {
| $txt .= "\n".'Plus: '.$dane['plus']."\n\n";
| }
| }
|
| GGapi::putText(trim($txt));
| }
| }
| ?>
|
|