-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathindex.php
247 lines (240 loc) · 10.8 KB
/
index.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
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
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
<?php
/*
_____ ____
| __|_____ _ _| \ ___ _ _ ___
| __| | | | | | -_| | |_ -|
|_____|_|_|_|___|____/|___|\_/|___|
Copyright (C) 2013 EmuDevs <http://www.emudevs.com/>
*/
?>
<?php require('includes/loader.php'); ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?php echo $GLOBALS['website_title']; ?> Painel do Administrador</title>
<link rel="stylesheet" href="../aasp_includes/styles/default/style.css" />
<link rel="stylesheet" href="../aasp_includes/styles/wysiwyg.css" />
<script type="text/javascript" src="../javascript/jquery.js"></script>
</head>
<body>
<div id="overlay"></div>
<div id="loading"><img src="../aasp_includes/styles/default/images/ajax-loader.gif" /></div>
<div id="leftcontent">
<div id="menu_left">
<ul>
<li id="menu_head">Menu</li>
<li>Painel de Controle</li>
<ul class="hidden" <?php activeMenu('dashboard'); ?>>
<a href="?p=dashboard">Painel de Controle</a>
<!--<a href="?p=updates">Atualizações</a>-->
</ul>
<li>Páginas</li>
<ul class="hidden" <?php activeMenu('pages'); ?>>
<a href="?p=pages">Todas as Páginas</a>
<a href="?p=pages&s=new">Add Nova</a>
</ul>
<li>Notícias</li>
<ul class="hidden" <?php activeMenu('news'); ?>>
<a href="?p=news">Postar notícia</a>
<a href="?p=news&s=manage">Gerenciar notícias</a>
</ul>
<li>Loja</li>
<ul class="hidden" <?php activeMenu('shop'); ?>>
<a href="?p=shop">Visão Geral</a>
<a href="?p=shop&s=add">Add itens</a>
<a href="?p=shop&s=manage">Gerenciar itens</a>
<a href="?p=shop&s=tools">Ferramentas</a>
</ul>
<li>Doações</li>
<ul class="hidden" <?php activeMenu('donations'); ?>>
<a href="?p=donations">Visão Geral</a>
<a href="?p=donations&s=browse">Procurar</a>
</ul>
<li>Registros</li>
<ul class="hidden" <?php activeMenu('logs'); ?>>
<a href="?p=logs&s=voteshop">Loja de Votação</a>
<a href="?p=logs&s=donateshop">Loja de Doação</a>
<a href="?p=logs&s=admin">Painel do Administrador</a>
</ul>
<li>Interface</li>
<ul class="hidden" <?php activeMenu('interface'); ?>>
<a href="?p=interface">Modelo</a>
<a href="?p=interface&s=menu">Menu</a>
<a href="?p=interface&s=slideshow">Slideshow</a>
<a href="?p=interface&s=plugins">Plugins</a>
</ul>
<li>Usuários</li>
<ul class="hidden" <?php activeMenu('users'); ?>>
<a href="?p=users">Visão Geral</a>
<a href="?p=users&s=manage">Gerenciar Usuários</a>
</ul>
<li>Reinos</li>
<ul class="hidden" <?php activeMenu('realms'); ?>>
<a href="?p=realms">Novo reino</a>
<a href="?p=realms&s=manage">Gerenciar reino(s)</a>
</ul>
<li>Serviços</li>
<ul class="hidden" <?php activeMenu('services'); ?>>
<a href="?p=services&s=voting">Links de Votação</a>
<a href="?p=services&s=charservice">Serviços de Personagem</a>
</ul>
<li>Ferramentas</li>
<ul class="hidden" <?php activeMenu('tools'); ?>>
<a href="?p=tools&s=tickets">Tickets</a>
<a href="?p=tools&s=accountaccess">Acesso à Conta</a>
</ul>
<li onclick="window.location='?p=credits'">Créditos</li>
</ul>
</div>
</div>
<div id="header">
<div id="header_text">
<?php if(isset($_SESSION['cw_admin'])) { ?> Bem-vindo(a)
<b><?php echo $_SESSION['cw_admin']; ?> </b>
<a href="?p=logout"><i>(Sair)</i></a> |
<a href="<?php echo $GLOBALS['website_domain']; ?>" title="Visualizar seu Site">Visualizar seu Site</a>
<?php } else {
echo "Por favor, faça login.";
}?>
</div>
</div>
<div id="wrapper">
<div id="middlecontent">
<?php if(!isset($_SESSION['cw_admin'])) { ?>
<br/>
<center>
<h2>Por favor, faça login</h2>
<input type="text" placeholder="Nome de Usuário" id="login_username" style="border: 1px solid #ccc;"/><br/>
<input type="password" placeholder="Senha" id="login_password" style="border: 1px solid #ccc;"/><br/>
<input type="submit" value="Entrar" onclick="login('admin')"/> <br/>
<div id="login_status"></div>
</center>
<?php
}
else
{
?>
<div class="box_right">
<?php
if(!isset($_GET['p']))
$page = "dashboard";
else
{
$page = $_GET['p']; }
$pages = scandir('../aasp_includes/pages');
unset($pages[0],$pages[1]);
if (!file_exists('../aasp_includes/pages/'.$page.'.php'))
include('../aasp_includes/pages/404.php');
elseif(in_array($page.'.php',$pages))
include('../aasp_includes/pages/'.$page.'.php');
else
include('../aasp_includes/pages/404.php');
}
?>
<?php if($GLOBALS['forum']['type']=='phpbb' && $GLOBALS['forum']['autoAccountCreate']==TRUE && $page=='dashboard') { ?>
<div class="box_right">
<div class="box_right_title">Atividade Recente do forum</div>
<table width="100%">
<tr>
<th>Conta</th>
<th>Tópico</th>
<th>Mensagem</th>
<th>Tópico</th>
</tr>
<?php
$server->selectDB($GLOBALS['forum']['forum_db']);
$result = mysql_query("SELECT poster_id,post_text,post_time,topic_id FROM phpbb_posts ORDER BY post_id DESC LIMIT 10");
while($row = mysql_fetch_assoc($result))
{
$string = $row['post_text'];
//Lets get the username
$getUser = mysql_query("SELECT username FROM phpbb_users WHERE user_id='".$row['poster_id']."'");
$user = mysql_fetch_assoc($getUser);
//Get topic
$getTopic = mysql_query("SELECT topic_title FROM phpbb_topics WHERE topic_id='".$row['topic_id']."'");
$topic = mysql_fetch_assoc($getTopic);
?>
<tr class="center">
<td>
<a href="<?php echo $GLOBALS['website_domain'].
substr($GLOBALS['forum']['forum_path'],1) ?>memberlist.php?mode=viewprofile&u=<?php echo $row['poster_id']; ?>"
title="Visualizar perfil" target="_blank"><?php echo $user['username']; ?></a>
</td>
<td><?php echo $topic['topic_title']; ?></td>
<td><?php echo limit_characters(strip_tags($string),75);?>...</td>
<td><a href="<?php echo $GLOBALS['website_domain'].substr($GLOBALS['forum']['forum_path'],1); ?>viewtopic.php?t=<?php echo $row['topic_id']?>"
title="Visualizar este tópico" target="_blank">
Visualizar tópico</a></td>
</tr>
<?php } ?>
</table>
</div>
<?php } ?>
</div>
</div>
<?php if(isset($_SESSION['cw_admin'])) { ?>
<div id="rightcontent">
<div class="box_right">
<div class="box_right_title">Situação do Servidor</div>
<?php $server->serverStatus(); ?>
</div>
<div class="box_right">
<div class="box_right_title">Configurações do Site</div>
<table>
<tr valign="top">
<td>
Host do MySQL: <br/>
Usuário do MySQL: <br/>
Senha do MySQL: <br/>
</td>
<td>
<b>
<?php echo $GLOBALS['connection']['host'];?><br/><br/>
<?php echo $GLOBALS['connection']['user']; ?><br/><br/>
<?php echo substr($GLOBALS['connection']['password'],0,3); ?>****<br/>
</b>
</td>
<td>
Banco de Dados de Logon: <br/>
Banco de Dados do Site: <br />
Banco de Dados do Mundo: <br/>
Revisão do Banco de Dados:
</td>
<td>
<b>
<?php echo $GLOBALS['connection']['logondb']; ?><br/><br/>
<?php echo $GLOBALS['connection']['webdb']; ?><br/><br/>
<?php echo $GLOBALS['connection']['worlddb']; ?><br/><br/>
<?php
$server->selectDB('webdb');
$get = mysql_query("SELECT version FROM db_version");
$row = mysql_fetch_assoc($get);
echo $row['version']; ?>
</b>
</td>
</tr>
</table>
</div>
</div>
<?php } ?>
</div>
</div>
<?php include("../aasp_includes/javascript_loader.php");
if(!isset($_SESSION['cw_admin']))
{
?>
<script type="text/javascript">
document.onkeydown = function(event)
{
var key_press = String.fromCharCode(event.keyCode);
var key_code = event.keyCode;
if(key_code == 13)
{
login('admin')
}
}
</script>
<?php } ?>
</body>
</html>