Subversion Repositories ALCASAR

Rev

Rev 2770 | Rev 3037 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log

Rev Author Line No. Line
2770 rexy 1
<?php
2
/**
3
 * Darwin System Class
4
 *
5
 * PHP version 5
6
 *
7
 * @category  PHP
8
 * @package   PSI Darwin OS class
9
 * @author    Michael Cramer <BigMichi1@users.sourceforge.net>
10
 * @copyright 2009 phpSysInfo
11
 * @license   http://opensource.org/licenses/gpl-2.0.php GNU General Public License version 2, or (at your option) any later version
12
 * @version   SVN: $Id: class.Darwin.inc.php 638 2012-08-24 09:40:48Z namiltd $
13
 * @link      http://phpsysinfo.sourceforge.net
14
 */
15
 /**
16
 * Darwin sysinfo class
17
 * get all the required information from Darwin system
18
 * information may be incomplete
19
 *
20
 * @category  PHP
21
 * @package   PSI Darwin OS class
22
 * @author    Michael Cramer <BigMichi1@users.sourceforge.net>
23
 * @copyright 2009 phpSysInfo
24
 * @license   http://opensource.org/licenses/gpl-2.0.php GNU General Public License version 2, or (at your option) any later version
25
 * @version   Release: 3.0
26
 * @link      http://phpsysinfo.sourceforge.net
27
 */
28
class Darwin extends BSDCommon
29
{
30
    /**
31
     * define the regexp for log parser
32
     */
33
    /* public function __construct($blockname = false)
34
    {
35
        parent::__construct($blockname);
36
        $this->error->addWarning("The Darwin version of phpSysInfo is a work in progress, some things currently don't work!");
37
        $this->setCPURegExp1("/CPU: (.*) \((.*)-MHz (.*)\)/");
38
        $this->setCPURegExp2("/(.*) ([0-9]+) ([0-9]+) ([0-9]+) ([0-9]+)/");
39
        $this->setSCSIRegExp1("/^(.*): <(.*)> .*SCSI.*device/");
40
    } */
325 richard 41
 
2770 rexy 42
    /**
43
     * get a value from sysctl command
44
     *
45
     * @param string $key key of the value to get
46
     *
47
     * @return string
48
     */
49
    protected function grabkey($key)
50
    {
51
        if (CommonFunctions::executeProgram('sysctl', $key, $s, PSI_DEBUG)) {
52
            $s = preg_replace('/'.$key.': /', '', $s);
53
            $s = preg_replace('/'.$key.' = /', '', $s);
325 richard 54
 
2770 rexy 55
            return $s;
56
        } else {
57
            return '';
58
        }
59
    }
325 richard 60
 
2770 rexy 61
    /**
62
     * get a value from ioreg command
63
     *
64
     * @param string $key key of the value to get
65
     *
66
     * @return string
67
     */
68
    private function _grabioreg($key)
69
    {
70
        if (CommonFunctions::executeProgram('ioreg', '-c "'.$key.'"', $s, PSI_DEBUG)) {
71
            /* delete newlines */
72
            $s = preg_replace("/\s+/", " ", $s);
73
            /* new newlines */
74
            $s = preg_replace("/[\|\t ]*\+\-o/", "\n", $s);
75
            /* combine duplicate whitespaces and some chars */
76
            $s = preg_replace("/[\|\t ]+/", " ", $s);
325 richard 77
 
2770 rexy 78
            $lines = preg_split("/\n/", $s, -1, PREG_SPLIT_NO_EMPTY);
79
            $out = "";
80
            foreach ($lines as $line) {
81
                if (preg_match('/^([^<]*) <class '.$key.',/', $line)) {
82
                    $out .= $line."\n";
83
                }
84
            }
325 richard 85
 
2770 rexy 86
            return $out;
87
        } else {
88
            return '';
89
        }
90
    }
325 richard 91
 
2770 rexy 92
    /**
93
     * UpTime
94
     * time the system is running
95
     *
96
     * @return void
97
     */
98
    private function _uptime()
99
    {
100
        if (CommonFunctions::executeProgram('sysctl', '-n kern.boottime', $a, PSI_DEBUG)) {
101
            $tmp = explode(" ", $a);
102
            if ($tmp[0]=="{") { /* kern.boottime= { sec = 1096732600, usec = 885425 } Sat Oct 2 10:56:40 2004 */
103
              $data = trim($tmp[3], ",");
104
              $this->sys->setUptime(time() - $data);
105
            } else { /* kern.boottime= 1096732600 */
106
              $this->sys->setUptime(time() - $a);
107
            }
108
        }
109
    }
325 richard 110
 
2770 rexy 111
    /**
112
     * get CPU information
113
     *
114
     * @return void
115
     */
116
    protected function cpuinfo()
117
    {
118
        $dev = new CpuDevice();
119
        if (CommonFunctions::executeProgram('hostinfo', '| grep "Processor type"', $buf, PSI_DEBUG)) {
120
            $dev->setModel(preg_replace('/Processor type: /', '', $buf));
121
            $buf=$this->grabkey('hw.model');
122
            if (!is_null($buf) && (trim($buf) != "")) {
123
                $this->sys->setMachine(trim($buf));
124
                if (CommonFunctions::rfts(PSI_APP_ROOT.'/data/ModelTranslation.txt', $buffer)) {
125
                    $buffer = preg_split("/\n/", $buffer, -1, PREG_SPLIT_NO_EMPTY);
126
                    foreach ($buffer as $line) {
127
                        $ar_buf = preg_split("/:/", $line, 3);
128
                        if (trim($buf) === trim($ar_buf[0])) {
129
                            $dev->setModel(trim($ar_buf[2]));
130
                            $this->sys->setMachine($this->sys->getMachine().' - '.trim($ar_buf[1]));
131
                            break;
132
                        }
133
                    }
134
                }
135
            }
136
            $buf=$this->grabkey('machdep.cpu.brand_string');
137
            if (!is_null($buf) && (trim($buf) != "") &&
138
                 ((trim($buf) != "i486 (Intel 80486)") || ($dev->getModel() == ""))) {
139
                $dev->setModel(trim($buf));
140
            }
141
            $buf=$this->grabkey('machdep.cpu.features');
142
            if (!is_null($buf) && (trim($buf) != "")) {
143
                if (preg_match("/ VMX/", $buf)) {
144
                    $dev->setVirt("vmx");
145
                } elseif (preg_match("/ SVM/", $buf)) {
146
                    $dev->setVirt("svm");
147
                }
148
            }
149
        }
150
        $dev->setCpuSpeed(round($this->grabkey('hw.cpufrequency') / 1000000));
151
        $dev->setBusSpeed(round($this->grabkey('hw.busfrequency') / 1000000));
152
        $bufn=$this->grabkey('hw.cpufrequency_min');
153
        $bufx=$this->grabkey('hw.cpufrequency_max');
154
        if (!is_null($bufn) && (trim($bufn) != "") && !is_null($bufx) && (trim($bufx) != "") && ($bufn != $bufx)) {
155
            $dev->setCpuSpeedMin(round($bufn / 1000000));
156
            $dev->setCpuSpeedMax(round($bufx / 1000000));
157
        }
158
        $buf=$this->grabkey('hw.l2cachesize');
159
        if (!is_null($buf) && (trim($buf) != "")) {
160
            $dev->setCache(round($buf));
161
        }
162
        $ncpu = $this->grabkey('hw.ncpu');
163
        if (is_null($ncpu) || (trim($ncpu) == "") || (!($ncpu >= 1)))
164
            $ncpu = 1;
165
        for ($ncpu ; $ncpu > 0 ; $ncpu--) {
166
            $this->sys->setCpus($dev);
167
        }
168
    }
325 richard 169
 
2770 rexy 170
    /**
171
     * get the pci device information out of ioreg
172
     *
173
     * @return void
174
     */
175
    protected function pci()
176
    {
177
        if (!$arrResults = Parser::lspci(false)) { //no lspci port
178
            $s = $this->_grabioreg('IOPCIDevice');
179
            $lines = preg_split("/\n/", $s, -1, PREG_SPLIT_NO_EMPTY);
180
            foreach ($lines as $line) {
181
                $dev = new HWDevice();
182
                if (!preg_match('/"IOName" = "([^"]*)"/', $line, $ar_buf)) {
183
                    $ar_buf = preg_split("/[\s@]+/", $line, 19);
184
                }
185
                if (preg_match('/"model" = <?"([^"]*)"/', $line, $ar_buf2)) {
186
                    $dev->setName(trim($ar_buf[1]). ": ".trim($ar_buf2[1]));
187
                } else {
188
                    $dev->setName(trim($ar_buf[1]));
189
                }
190
                $this->sys->setPciDevices($dev);
191
            }
192
        } else {
193
            foreach ($arrResults as $dev) {
194
                $this->sys->setPciDevices($dev);
195
            }
196
        }
197
    }
325 richard 198
 
2770 rexy 199
    /**
200
     * get the ide device information out of ioreg
201
     *
202
     * @return void
203
     */
204
    protected function ide()
205
    {
206
        $s = $this->_grabioreg('IOATABlockStorageDevice');
207
        $lines = preg_split("/\n/", $s, -1, PREG_SPLIT_NO_EMPTY);
208
        foreach ($lines as $line) {
209
                    $dev = new HWDevice();
210
                    if (!preg_match('/"Product Name"="([^"]*)"/', $line, $ar_buf))
211
                       $ar_buf = preg_split("/[\s@]+/", $line, 19);
212
                    $dev->setName(trim($ar_buf[1]));
213
                    $this->sys->setIdeDevices($dev);
214
        }
325 richard 215
 
2770 rexy 216
        $s = $this->_grabioreg('IOAHCIBlockStorageDevice');
217
        $lines = preg_split("/\n/", $s, -1, PREG_SPLIT_NO_EMPTY);
218
        foreach ($lines as $line) {
219
                    $dev = new HWDevice();
220
                    if (!preg_match('/"Product Name"="([^"]*)"/', $line, $ar_buf))
221
                       $ar_buf = preg_split("/[\s@]+/", $line, 19);
222
                    $dev->setName(trim($ar_buf[1]));
223
                    $this->sys->setIdeDevices($dev);
224
        }
225
    }
325 richard 226
 
2770 rexy 227
    /**
228
     * get the usb device information out of ioreg
229
     *
230
     * @return void
231
     */
232
    protected function usb()
233
    {
234
        $s = $this->_grabioreg('IOUSBDevice');
235
        $lines = preg_split("/\n/", $s, -1, PREG_SPLIT_NO_EMPTY);
236
        foreach ($lines as $line) {
237
                    $dev = new HWDevice();
238
                    if (!preg_match('/"USB Product Name" = "([^"]*)"/', $line, $ar_buf))
239
                       $ar_buf = preg_split("/[\s@]+/", $line, 19);
240
                    $dev->setName(trim($ar_buf[1]));
241
                    if (defined('PSI_SHOW_DEVICES_INFOS') && PSI_SHOW_DEVICES_INFOS) {
242
                        if (preg_match('/"USB Vendor Name" = "([^"]*)"/', $line, $ar_buf)) {
243
                            $dev->setManufacturer(trim($ar_buf[1]));
244
                        }
245
                        if (preg_match('/"USB Product Name" = "([^"]*)"/', $line, $ar_buf)) {
246
                            $dev->setProduct(trim($ar_buf[1]));
247
                        }
248
                        if (defined('PSI_SHOW_DEVICES_SERIAL') && PSI_SHOW_DEVICES_SERIAL
249
                           && preg_match('/"USB Serial Number" = "([^"]*)"/', $line, $ar_buf)) {
250
                            $dev->setSerial(trim($ar_buf[1]));
251
                        }
252
                    }
253
                    $this->sys->setUsbDevices($dev);
254
        }
255
    }
325 richard 256
 
2770 rexy 257
    /**
258
     * get the scsi device information out of ioreg
259
     *
260
     * @return void
261
     */
262
    protected function scsi()
263
    {
264
        $s = $this->_grabioreg('IOBlockStorageServices');
265
        $lines = preg_split("/\n/", $s, -1, PREG_SPLIT_NO_EMPTY);
266
        foreach ($lines as $line) {
267
                    $dev = new HWDevice();
268
                    if (!preg_match('/"Product Name"="([^"]*)"/', $line, $ar_buf))
269
                       $ar_buf = preg_split("/[\s@]+/", $line, 19);
270
                    $dev->setName(trim($ar_buf[1]));
271
                    $this->sys->setScsiDevices($dev);
272
        }
273
    }
325 richard 274
 
2770 rexy 275
    /**
276
     * get memory and swap information
277
     *
278
     * @return void
279
     */
280
    protected function memory()
281
    {
282
        $s = $this->grabkey('hw.memsize');
283
        if (CommonFunctions::executeProgram('vm_stat', '', $pstat, PSI_DEBUG)) {
284
            // calculate free memory from page sizes (each page = 4096)
285
            if (preg_match('/^Pages free:\s+(\S+)/m', $pstat, $free_buf)) {
286
                if (preg_match('/^Anonymous pages:\s+(\S+)/m', $pstat, $anon_buf)
287
                   && preg_match('/^Pages wired down:\s+(\S+)/m', $pstat, $wire_buf)
288
                   && preg_match('/^File-backed pages:\s+(\S+)/m', $pstat, $fileb_buf)) {
289
                        // OS X 10.9 or never
290
                        $this->sys->setMemFree($free_buf[1] * 4 * 1024);
291
                        $this->sys->setMemApplication(($anon_buf[1]+$wire_buf[1]) * 4 * 1024);
292
                        $this->sys->setMemCache($fileb_buf[1] * 4 * 1024);
293
                        if (preg_match('/^Pages occupied by compressor:\s+(\S+)/m', $pstat, $compr_buf)) {
294
                            $this->sys->setMemBuffer($compr_buf[1] * 4 * 1024);
295
                        }
296
                } else {
297
                    if (preg_match('/^Pages speculative:\s+(\S+)/m', $pstat, $spec_buf)) {
298
                        $this->sys->setMemFree(($free_buf[1]+$spec_buf[1]) * 4 * 1024);
299
                    } else {
300
                        $this->sys->setMemFree($free_buf[1] * 4 * 1024);
301
                    }
302
                    $appMemory = 0;
303
                    if (preg_match('/^Pages wired down:\s+(\S+)/m', $pstat, $wire_buf)) {
304
                        $appMemory += $wire_buf[1] * 4 * 1024;
305
                    }
306
                    if (preg_match('/^Pages active:\s+(\S+)/m', $pstat, $active_buf)) {
307
                        $appMemory += $active_buf[1] * 4 * 1024;
308
                    }
309
                    $this->sys->setMemApplication($appMemory);
325 richard 310
 
2770 rexy 311
                    if (preg_match('/^Pages inactive:\s+(\S+)/m', $pstat, $inactive_buf)) {
312
                        $this->sys->setMemCache($inactive_buf[1] * 4 * 1024);
313
                    }
314
                }
315
            } else {
316
                $lines = preg_split("/\n/", $pstat, -1, PREG_SPLIT_NO_EMPTY);
317
                $ar_buf = preg_split("/\s+/", $lines[1], 19);
318
                $this->sys->setMemFree($ar_buf[2] * 4 * 1024);
319
            }
325 richard 320
 
2770 rexy 321
            $this->sys->setMemTotal($s);
322
            $this->sys->setMemUsed($this->sys->getMemTotal() - $this->sys->getMemFree());
325 richard 323
 
2770 rexy 324
            if (CommonFunctions::executeProgram('sysctl', 'vm.swapusage | colrm 1 22', $swapBuff, PSI_DEBUG)) {
325
                $swap1 = preg_split('/M/', $swapBuff);
326
                $swap2 = preg_split('/=/', $swap1[1]);
327
                $swap3 = preg_split('/=/', $swap1[2]);
2976 rexy 328
                if (($swap=trim($swap1[0])) > 0) {
329
                    $dev = new DiskDevice();
330
                    $dev->setName('SWAP');
331
                    $dev->setMountPoint('SWAP');
332
                    $dev->setFsType('swap');
333
                    $dev->setTotal($swap * 1024 * 1024);
334
                    $dev->setUsed(trim($swap2[1]) * 1024 * 1024);
335
                    $dev->setFree(trim($swap3[1]) * 1024 * 1024);
336
                    $this->sys->setSwapDevices($dev);
337
                }
2770 rexy 338
            }
339
        }
340
    }
325 richard 341
 
2770 rexy 342
    /**
343
     * get the thunderbolt device information out of ioreg
344
     *
345
     * @return void
346
     */
347
    protected function _tb()
348
    {
349
        $s = $this->_grabioreg('IOThunderboltPort');
350
        $lines = preg_split("/\n/", $s, -1, PREG_SPLIT_NO_EMPTY);
351
        foreach ($lines as $line) {
352
                    $dev = new HWDevice();
353
                    if (!preg_match('/"Description" = "([^"]*)"/', $line, $ar_buf))
354
                       $ar_buf = preg_split("/[\s@]+/", $line, 19);
355
                    $dev->setName(trim($ar_buf[1]));
356
                    $this->sys->setTbDevices($dev);
357
        }
358
    }
325 richard 359
 
2770 rexy 360
    /**
361
     * get network information
362
     *
363
     * @return void
364
     */
365
    private function _network()
366
    {
367
        if (CommonFunctions::executeProgram('netstat', '-nbdi | cut -c1-24,42- | grep Link', $netstat, PSI_DEBUG)) {
368
            $lines = preg_split("/\n/", $netstat, -1, PREG_SPLIT_NO_EMPTY);
369
            foreach ($lines as $line) {
370
                $ar_buf = preg_split("/\s+/", $line, 10);
371
                if (!empty($ar_buf[0])) {
372
                    $dev = new NetDevice();
373
                    $dev->setName($ar_buf[0]);
374
                    $dev->setTxBytes($ar_buf[8]);
375
                    $dev->setRxBytes($ar_buf[5]);
376
                    $dev->setErrors($ar_buf[4] + $ar_buf[7]);
377
                    if (isset($ar_buf[10])) {
378
                        $dev->setDrops($ar_buf[10]);
379
                    }
380
                    if (defined('PSI_SHOW_NETWORK_INFOS') && (PSI_SHOW_NETWORK_INFOS) && (CommonFunctions::executeProgram('ifconfig', $ar_buf[0].' 2>/dev/null', $bufr2, PSI_DEBUG))) {
381
                        $bufe2 = preg_split("/\n/", $bufr2, -1, PREG_SPLIT_NO_EMPTY);
382
                        foreach ($bufe2 as $buf2) {
383
                            if (preg_match('/^\s+ether\s+(\S+)/i', $buf2, $ar_buf2)) {
384
                                if (!defined('PSI_HIDE_NETWORK_MACADDR') || !PSI_HIDE_NETWORK_MACADDR) $dev->setInfo(($dev->getInfo()?$dev->getInfo().';':'').preg_replace('/:/', '-', strtoupper($ar_buf2[1])));
385
                            } elseif (preg_match('/^\s+inet\s+(\S+)\s+netmask/i', $buf2, $ar_buf2)) {
386
                                $dev->setInfo(($dev->getInfo()?$dev->getInfo().';':'').$ar_buf2[1]);
387
                            } elseif ((preg_match('/^\s+inet6\s+([^\s%]+)\s+prefixlen/i', $buf2, $ar_buf2)
388
                                  || preg_match('/^\s+inet6\s+([^\s%]+)%\S+\s+prefixlen/i', $buf2, $ar_buf2))
389
                                  && ($ar_buf2[1]!="::") && !preg_match('/^fe80::/i', $ar_buf2[1])) {
390
                                $dev->setInfo(($dev->getInfo()?$dev->getInfo().';':'').strtolower($ar_buf2[1]));
391
                            } elseif (preg_match('/^\s+media:\s+/i', $buf2) && preg_match('/[\(\s](\d+)(G*)base/i', $buf2, $ar_buf2)) {
392
                                if (isset($ar_buf2[2]) && strtoupper($ar_buf2[2])=="G") {
393
                                    $unit = "G";
394
                                } else {
395
                                    $unit = "M";
396
                                }
397
                                if (preg_match('/[<\s]([^\s<]+)-duplex/i', $buf2, $ar_buf3))
398
                                    $dev->setInfo(($dev->getInfo()?$dev->getInfo().';':'').$ar_buf2[1].$unit.'b/s '.strtolower($ar_buf3[1]));
399
                                else
400
                                    $dev->setInfo(($dev->getInfo()?$dev->getInfo().';':'').$ar_buf2[1].$unit.'b/s');
401
                            }
402
                        }
403
                    }
404
                    $this->sys->setNetDevices($dev);
405
                }
406
            }
407
        }
408
    }
325 richard 409
 
2770 rexy 410
    /**
411
     * get icon name
412
     *
413
     * @return void
414
     */
415
    protected function distro()
416
    {
417
        $this->sys->setDistributionIcon('Darwin.png');
2976 rexy 418
        if ((!CommonFunctions::executeProgram('system_profiler', 'SPSoftwareDataType', $buffer, PSI_DEBUG) || !preg_match('/\n\s*System Version:/', $buffer))
419
           && (!CommonFunctions::executeProgram('sw_vers', '', $buffer, PSI_DEBUG) || !preg_match('/^ProductName:/', $buffer))) {
2770 rexy 420
            parent::distro();
421
        } else {
2976 rexy 422
            $distro_tmp = preg_split("/\n/", $buffer, -1, PREG_SPLIT_NO_EMPTY);
423
            foreach ($distro_tmp as $info) {
424
                $info_tmp = preg_split('/:/', $info, 2);
425
                if (isset($distro_tmp[0]) && !is_null($distro_tmp[0]) && (trim($distro_tmp[0]) != "") &&
426
                     isset($distro_tmp[1]) && !is_null($distro_tmp[1]) && (trim($distro_tmp[1]) != "")) {
427
                    $distro_arr[trim($info_tmp[0])] = trim($info_tmp[1]);
428
                }
429
            }
430
            if (isset($distro_arr['ProductName']) && isset($distro_arr['ProductVersion']) && isset($distro_arr['BuildVersion'])) {
431
                $distro_arr['System Version'] = $distro_arr['ProductName'].' '.$distro_arr['ProductVersion'].' ('.$distro_arr['BuildVersion'].')';
432
            }
433
            if (isset($distro_arr['System Version'])) {
434
                $distro = $distro_arr['System Version'];
435
                if (preg_match('/^Mac OS|^OS X|^macOS/', $distro)) {
436
                    $this->sys->setDistributionIcon('Apple.png');
437
                    if (preg_match('/(^Mac OS X Server|^Mac OS X|^OS X Server|^OS X|^macOS Server|^macOS) ((\d+)\.\d+)/', $distro, $ver)
438
                        && ($list = @parse_ini_file(PSI_APP_ROOT."/data/osnames.ini", true))) {
439
                        if (isset($list['macOS'][$ver[2]])) {
440
                            $distro.=' '.$list['macOS'][$ver[2]];
441
                        } elseif (isset($list['macOS'][$ver[3]])) {
442
                            $distro.=' '.$list['macOS'][$ver[3]];
2770 rexy 443
                        }
444
                    }
445
                }
2976 rexy 446
                $this->sys->setDistribution($distro);
447
            } else {
448
                parent::distro();
2770 rexy 449
            }
450
        }
451
    }
325 richard 452
 
2770 rexy 453
    /**
454
     * Processes
455
     *
456
     * @return void
457
     */
458
    protected function _processes()
459
    {
460
        if (CommonFunctions::executeProgram('ps', 'aux', $bufr, PSI_DEBUG)) {
461
            $lines = preg_split("/\n/", $bufr, -1, PREG_SPLIT_NO_EMPTY);
462
            $processes['*'] = 0;
463
            foreach ($lines as $line) {
464
                if (preg_match("/^\S+\s+\d+\s+\S+\s+\S+\s+\d+\s+\d+\s+\S+\s+(\w)/", $line, $ar_buf)) {
465
                    $processes['*']++;
466
                    $state = $ar_buf[1];
467
                    if ($state == 'U') $state = 'D'; //linux format
468
                    elseif ($state == 'I') $state = 'S';
469
                    elseif ($state == 'D') $state = 'd'; //invalid
470
                    if (isset($processes[$state])) {
471
                        $processes[$state]++;
472
                    } else {
473
                        $processes[$state] = 1;
474
                    }
475
                }
476
            }
477
            if ($processes['*'] > 0) {
478
                $this->sys->setProcesses($processes);
479
            }
480
        }
481
    }
325 richard 482
 
2770 rexy 483
    /**
484
     * get the information
485
     *
486
     * @see PSI_Interface_OS::build()
487
     *
488
     * @return Void
489
     */
490
    public function build()
491
    {
492
        parent::build();
493
        if (!$this->blockname || $this->blockname==='vitals') {
494
            $this->_uptime();
495
            $this->_processes();
496
        }
497
        if (!$this->blockname || $this->blockname==='hardware') {
498
            $this->_tb();
499
        }
500
        if (!$this->blockname || $this->blockname==='network') {
501
            $this->_network();
502
        }
325 richard 503
    }
2770 rexy 504
}