Subversion Repositories vnag

Rev

Rev 28 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 28 Rev 29
Line 1... Line 1...
1
<?php /* <ViaThinkSoftSignature>
1
<?php /* <ViaThinkSoftSignature>
2
GnWfHSoN8khDxWVPk1WtNNb9cya8l+VjuXNZoxpwryMvcMbodkqUTH5PF4+IauISp
2
INj8GHKi/MYGHSHlhnJTyKdQEKnHl1bdkvxhTv3oLplJtJije4a7tidEPZqawrFw0
3
NeDx6OCgFyr8OxWDFI13S827OTOITl9ySe7zQTCY5Ky3rZFomCd3KokM2vlwwtg8I
3
/wniyLDaIptRhe+x+OStEKG7OckSocxRuxK9PQciJOs+/aE4srSrxKW/mZP8v7gAm
4
CFmNTh7eFvPionKy9orplx+746S8YgRIr9z5kozb17AgDxRjdzXNj9v80aRyRDiUB
4
iuvgRXnoo4VfnNTfAQFLiVcUSRE+Gku4zmPGSHKTKzIWz/IYGeJqc5E6oG47Ult37
5
EQ9Z/MAFmSF3Ki6MQOwLGHd+N3XWA7B+/XRlT3XgZ1OqmRabnljWV+g70ynE5gpLc
5
0FirA6ZTpxEYfD+oc156jqcbF1TmJjQsZewR+n8YFrCLoTq4XpwUtVtfGlHgAimQI
6
oD/pHFQRJwv5O9s9+q7bgeYgPG8shO8Ire53OHgdW168bn7PhahlP95kYwgfkjWSc
6
UFgPphkdI6QvrhpNw4lyT1VoHuutzaK6o/q6PdbUfluzwuL0oTll4Sex/AjTmWs4q
7
ENR7znWzN4wNHwvn4K/DaDBITibnjeSuHyGX2YUmGOKlnp1J3snx7+egXeOeAq5hW
7
zns+n2/fL6X1L60dqKqYp8oQW2WDw1TEtKdMoPaedjA1TOxvF750SOA22ggv8w3zB
8
93hBXtXTfSUyekp+oMdJgYzbBesas8bDcqRYQfICh8njmCXvigoGUGTd+5Niv46S4
8
TyCcAhxag0ZmwIqVYBukASoUNa+YNG8HPaT2kTmRgdqkMUiHZGfaPuvJmGHooVoae
9
EguTkX9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YN
17
vDO7QzrMOXzdT7X08+Eb74BIRds9Uslvye2vLNIrzNmj2b2FWab2benvjx+aTIWOP
17
568Z0OSc/ryiriboW4vmQrbQBr7zv7mZZXN0ZcdJLtWNCS9smf9ahKiE1VB7YqqiZ
18
4nMmve3mVmPU3NbaSsul1Mp9lfiqcvgOXoNSd0+7neV+dVVz8QKDlyGDaDjZ99JQ5
18
qF0v4arH3ShdKwHK7SircPyAc4XE6bBNjd2Lt54G52lfbuTejgPNdk00RxsjwX1i4
19
jUMqRHl1tqoMuCFKoJwrjOL5U6xtip+3L7o+rHbd6yzjPB9tKBOY2HQhwpy9gQkw8
19
5iL+gnZ1YH/C7cnXNjPRseGQIwEz55VDexhIO8KZ/GsjPtCSSwPZZ1XLwWV7T6WVo
20
72LPID+KkBzc5+LD6v8gYxs1deBuV5t7HKGAfx1q3+P6b/iW4nfE2VX2vbgFUv0vC
20
zIZYOl0Y8nogn9tOw9KyzZJDe993J2of/jP6uICMsT4UgjMPu/D4M/1mIpjbwZzPt
21
QtZvuMLD4KYgXyv41WCDgfAIUW1No4WWkr0dQQjhmx+m1rTOQMiz6fCJ06TzJTFQ/
21
mqUKk5wea4a4JKVActG5/UmdoUw5RNlbXOmnWzRTg5isex4E1ORzHQrcjEQDgwia4
22
NLpKercAnfh51VqOtxHeMaxBcYBkKX1V3QiIOYrCG8fXbklFnKMgoLL/cJHd4v4Sq
22
r0k0p2pHueH7bFbIJpBvDLlR/a1zeb26jQk73y27edYh/beQI2WYZWiQarkaR7f/D
23
w==
23
A==
24
</ViaThinkSoftSignature> */ ?>
24
</ViaThinkSoftSignature> */ ?>
25
<?php
25
<?php
26
 
26
 
27
/*
27
/*
28
 * VNag - Nagios Framework for PHP
28
 * VNag - Nagios Framework for PHP
Line 80... Line 80...
80
                        throw new Exception("Please specify the directory of the phpMyAdmin installation.");
80
                        throw new Exception("Please specify the directory of the phpMyAdmin installation.");
81
                }
81
                }
82
                $system_dir = realpath($system_dir) === false ? $system_dir : realpath($system_dir);
82
                $system_dir = realpath($system_dir) === false ? $system_dir : realpath($system_dir);
83
 
83
 
84
                if (!is_dir($system_dir)) {
84
                if (!is_dir($system_dir)) {
85
                        throw new Exception('Directory "'.$system_dir.'" not found.', false);
85
                        throw new Exception('Directory "'.$system_dir.'" not found.');
86
                }
86
                }
87
 
87
 
88
                $version = $this->get_phpmyadmin_version($system_dir);
88
                $version = $this->get_phpmyadmin_version($system_dir);
89
 
89
 
90
                $cont = @file_get_contents('https://www.phpmyadmin.net/home_page/version.json'); // alternatively version.php
90
                $cont = @file_get_contents('https://www.phpmyadmin.net/home_page/version.json'); // alternatively version.php
91
                if (!$cont) {
91
                if (!$cont) {
92
                        throw new Exception('Cannot parse version from phpMyAdmin website. The plugin probably needs to be updated.', false);
92
                        throw new Exception('Cannot parse version from phpMyAdmin website. The plugin probably needs to be updated.');
93
                }
93
                }
94
 
94
 
95
                $json = json_decode($cont, true);
95
                $json = json_decode($cont, true);
96
                $latest_version = $json['version'];
96
                $latest_version = $json['version'];
97
 
97