Skip to content
This repository was archived by the owner on May 18, 2021. It is now read-only.

Commit f3b0334

Browse files
author
cammygames
committed
Added In Support For SQL Phone Thanks erdknuffel
1 parent 5a1d59f commit f3b0334

File tree

3 files changed

+56
-0
lines changed

3 files changed

+56
-0
lines changed

config/db.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,13 @@
2121
*/
2222
define("alits_life_4", true);
2323

24+
/**
25+
Modules: Here you can enable any modules for the system that have been made to
26+
support people who use things like SQL Smart Phone
27+
*/
28+
define("sql_smartPhone",true);
29+
30+
2431
/**
2532
Change These To Reflect The Connection Info Of Your Game Server.
2633
This Allows the current players function to work.

views/editPlayer.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -441,6 +441,14 @@
441441
</div>
442442
</div>
443443
</div>
444+
<?php
445+
if (sql_smartPhone == TRUE && $_SESSION['user_level'] >= 2)
446+
{
447+
include("views/modules/sqlSmartPhone/module.php");
448+
}
449+
?>
450+
451+
444452
</div>
445453
<div class="col-md-4"></div>
446454
<div class="col-md-4">
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
<?php
2+
if ($_SESSION['user_level'] >= 2)
3+
{
4+
?>
5+
<div class='panel panel-default'>
6+
<div class='panel-heading'>
7+
<h3 class='panel-title'><i class='fa fa-envelope-o fa-fw'></i> Messages</h3>
8+
</div>
9+
<div class="panel-body">
10+
<div class="table-responsive">
11+
<table class="table table-bordered table-hover table-striped">
12+
<thead>
13+
<tr>
14+
<th>From</th>
15+
<th>To</th>
16+
<th>Message</th>
17+
<th>Time</th>
18+
</tr>
19+
</thead>
20+
<tbody>
21+
<?php
22+
$sql = 'SELECT * FROM `messages` WHERE `fromID` = "'.$pId.'" OR `toID` = "'.$pId.'" ORDER BY `time` DESC LIMIT 10';
23+
$result_of_query = $db_connection->query($sql);
24+
while($row = mysqli_fetch_assoc($result_of_query))
25+
{
26+
echo "<tr>";
27+
echo "<td>".$row["fromName"]."</td>";
28+
echo "<td>".$row["toName"]."</td>";
29+
echo "<td>".$row["message"]."</td>";
30+
echo "<td>".$row["time"]."</td>";
31+
echo "</tr>";
32+
};
33+
?>
34+
</tbody>
35+
</table>
36+
</div>
37+
</div>
38+
</div>
39+
<?php
40+
}
41+
?>

0 commit comments

Comments
 (0)