forked from nilsteampassnet/TeamPass
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathadmin.php
68 lines (63 loc) · 2.95 KB
/
admin.php
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
<?php
/**
* @file admin.php
* @author Nils Laumaillé
* @version 2.1.18
* @copyright (c) 2009-2013 Nils Laumaillé
* @licensing GNU AFFERO GPL 3.0
* @link http://www.teampass.net
*
* This library 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.
*/
if (!isset($_SESSION['CPM']) || $_SESSION['CPM'] != 1) {
die('Hacking attempt...');
}
echo '
<div class="title ui-widget-content ui-corner-all">'.$txt['admin'].'</div>
<div style="width:900px;margin-left:50px; line-height:25px;height:100%;overflow:auto;">';
// Div for tool info
echo '
<div id="CPM_infos" style="float:left;margin-top:10px;margin-left:15px;width:500px;">'.$txt['admin_info_loading'].' <img src="includes/images/ajax-loader.gif" alt="" /></div>';
//div for information
echo '
<div style="float:right;width:300px;padding:10px;" class="ui-state-highlight ui-corner-all">
<h3>Some instructions</h3>
<span class="ui-icon ui-icon-wrench" style="float: left; margin-right: .3em;"> </span>
Access to <a target="_blank" href="http://www.teampass.net" style="font-weight:bold;font-style:italic;">TeamPass website</a><br />
<span class="ui-icon ui-icon-wrench" style="float: left; margin-right: .3em;"> </span>
For any kind of Help and Support, please use the <a target="_blank" href="http://www.teampass.net/forum" style="font-weight:bold;font-style:italic;">Forum</a><br />
<span class="ui-icon ui-icon-wrench" style="float: left; margin-right: .3em;"> </span>
You discovered a Bug or you have an improvement Proposal, please use the <a target="_blank" href="https://github.com/nilsteampassnet/TeamPass/issues" style="font-weight:bold;font-style:italic;">Github channel</a>. <i>If you are not sure, always use the Forum before to obtain a confirmation. This will prevent having to much open tickets at Github</i>.<br />
<div style="text-align:center;margin-top:10px;">
'.$txt['thku'].'
</div>
</div>';
// Display the readme file
$Fnm = "readme.txt";
if (file_exists($Fnm)) {
$tab = file($Fnm);
echo '
<div style="float:left;width:900px;height:150px;overflow:auto;">
<div style="float:left;" class="readme">
<h3>'.$txt['changelog'].'</h3>';
$show = false;
$cnt = 0;
while (list($cle,$val) = each($tab)) {
if ($show == true && $cnt < 30) {
echo $val."<br />";
$cnt ++;
} elseif ($cnt == 30) {
echo '...<br /><br /><b><a href="readme.txt" target="_blank">'.$txt['readme_open'].'</a></b>';
break;
}
if (substr_count($val, "CHANGELOG") == 1 && $show == false) {
$show = true;
}
}
echo '
</div></div>';
}
echo '
</div>';