forked from ghmadalin/Minimanager-for-TrinityCore
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbugreport.php
More file actions
72 lines (65 loc) · 3.16 KB
/
bugreport.php
File metadata and controls
72 lines (65 loc) · 3.16 KB
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
<?php
/*
* Copyright (C) 2010-2011 TrinityScripts <http://www.trinityscripts.xe.cx/>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
require_once 'header.php';
require_once 'libs/telnet_lib.php';
valid_login($action_permission['read']);
$telnet = new telnet_lib();
$result = $telnet->Connect($server[$realm_id]['addr'], $server[$realm_id]['telnet_port'], $server[$realm_id]['telnet_user'], $server[$realm_id]['telnet_pass']);
if (0 == $result)
{
$telnet->DoCommand('server info', $result);
$result = str_replace("TC>","",$result);
$result = str_replace("\r\n", "\r\n ", $result);
$telnet->Disconnect();
}
unset($telnet);
$doutput = '';
/*
$show_version['svnrev'] = '';
if ( is_readable('.svn/entries') )
{
$file_obj = new SplFileObject('.svn/entries');
$file_obj->seek(3);
$show_version['svnrev'] = $file_obj->current();
unset($file_obj);
$doutput .= 'MiniManager : '.$show_version['version'].' r'.$show_version['svnrev'];
}
*/
$doutput .= 'Client: '.$_SERVER['HTTP_USER_AGENT'].' OS: '.php_uname('s').' '.php_uname('r').' '.php_uname('v').' '.php_uname('m').' http: '.$_SERVER['SERVER_SOFTWARE'].' PHP: '.phpversion().' '.php_sapi_name().' MySQL: '.mysql_get_server_info();
if ($result)
$doutput .= $result;
$l_rev = @file_get_contents('http://minimanager-tc.googlecode.com/svn/trunk/', NULL, NULL, 36, 3);
$output .= '<center>';
if ($l_rev)
{
if (is_readable('.svn/entries'))
{
$output .='This revision of miniManager is r'.$show_version['svnrev'].'<br />Latest revision of miniManager is r'.$l_rev.'<br />';
if ($l_rev > $show_version['svnrev'])
$output .='Please update to latest revision before posting any bug reports.<br /><br />';
else
$output .='You are using the latest revision.<br /><br />';
}
else
$output .='Latest revision of MiniManager is r'.$l_rev.'<br />Please update to latest revision before posting any bug reports.<br /><br />';
}
unset($l_rev);
$output .= 'Copy the selected text below and paste it in your bug report.<br /><br /><textarea id="codearea" readonly="readonly" rows="'.($result ? '22' : '12').'" cols="80">'.$doutput.'</textarea><br /><br /><a href="http://www.trinityscripts.xe.cx/tracker/" target="_blank">Report a bug: http://www.trinityscripts.xe.cx/tracker/<br />(link opens in new tab/window)</a><br /><br /><script type="text/javascript">document.getElementById(\'codearea\').focus(); document.getElementById(\'codearea\').select(); </script></center>';
require_once 'footer.php';
?>