Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- if(!defined('panel'))
- die('Nope.');
- if(!isset($_SESSION['user']) && !isset(Config::$_url[1])) echo '<meta http-equiv="refresh" content="0;URL=\''.Config::$_PAGE_URL.'login\'/>';
- if(isset(Config::$_url[1])) $user = (int)Config::$_url[1];
- if(!isset(Config::$_url[1])) echo '<meta http-equiv="refresh" content="0;URL=\''.Config::$_PAGE_URL.'\'/>';
- $q = Config::$g_con->prepare('SELECT * FROM `users` WHERE `name` = ?');
- $q->execute(array(Config::$_url[1]));
- if(!$q->rowCount()) {
- echo '
- <section class="content">
- <title>This user doesn\'t exist</title>
- <div class="breadcrumbs" id="breadcrumbs">
- <ul class="breadcrumb">
- <li>
- <i class="ace-icon fa fa-home home-icon"></i>
- <a href="<?php echo Config::$_PAGE_URL; ?>">Home</a>
- </li>
- <li class="active">This user doesn\'t exist</li>
- </ul><!-- /.breadcrumb -->
- </div>
- <div class="page-content"><div class="row-fluid"><div class="span12">
- <div class="alert alert-danger">This user doesn\'t exist.</div></section>';
- return;
- }
- $data = $q->fetch(PDO::FETCH_OBJ);
- //include 'inc/config.php';
- $respect = $data->Level*3+3;
- ?>
- <section class='content'>
- <?php
- if(isset($_POST['jail'])) {
- if(isset($_SESSION['user']) && Config::getData('users','Admin',$_SESSION['user']) >= 1)
- if(!$_POST['reason'] && !$_POST['duration']) echo '<div class="alert alert-danger">Ai lasat campuri necompletate.</div>';
- else {
- if(isset($_SESSION['user']) && Config::getData('users','Admin',$_SESSION['user']) >= 1)
- echo '<div class="alert alert-success">Jucatorul a primit jail cu succes.</div>';
- if($_POST['duration']) {
- $duration = $_POST['duration'];
- }
- if(isset($_SESSION['user']) && Config::getData('users','Admin',$_SESSION['user']) >= 1)
- $q = Config::$g_con->prepare('INSERT INTO `panelactions` (`complaintid`, `actiontime`, `actionid`, `playerid`, `playername`, `giverid`, `givername`, `reason`) VALUES (?, ?, ?, ?, ?, ?, ?, ?)');
- $q->execute(array(0,$duration,3,Config::getID('users','id',Config::$_url[1]),Config::getID('users','name',Config::$_url[1]),Config::getData('users','id',$_SESSION['user']),Config::getData('users','name',$_SESSION['user']),$_POST['reason']));
- $q = Config::$g_con->prepare('UPDATE `users` SET `Jailed` = ? AND `JailTime` = ? WHERE `id` = ?');
- $q->execute(array(2,Config::getID('users','JailTime',Config::$_url[1])+$duration,Config::getID('users','id',Config::$_url[1])));
- echo '<meta http-equiv="refresh" content="2">';
- }
- }
- if(isset($_POST['ban'])) {
- if(isset($_SESSION['user']) && Config::getData('users','Admin',$_SESSION['user']) >= 1)
- if(!$_POST['reason'] && !$_POST['duration']) echo '<div class="alert alert-danger">Ai lasat campuri necompletate.</div>';
- else {
- echo '<div class="alert alert-success">Jucatorul a primit ban cu succes.</div>';
- if($_POST['duration'] == 0) {
- $permanentban = 1;
- $duration = 0;
- } else {
- $permanentban = 0;
- $duration = $_POST['duration'];
- }
- if(isset($_SESSION['user']) && Config::getData('users','Admin',$_SESSION['user']) >= 1)
- $q = Config::$g_con->prepare('INSERT INTO `panelactions` (`complaintid`, `actiontime`, `actionid`, `playerid`, `playername`, `giverid`, `givername`, `reason`) VALUES (?, ?, ?, ?, ?, ?, ?, ?)');
- $q->execute(array(0,$duration,1,Config::getID('users','id',Config::$_url[1]),Config::getID('users','name',Config::$_url[1]),Config::getData('users','id',$_SESSION['user']),Config::getData('users','name',$_SESSION['user']),$_POST['reason']));
- $q = Config::$g_con->prepare('INSERT INTO `bans` (
- `IP`,
- `Active`,
- `Permanent`,
- `IPBan`,
- `Time`,
- `PlayerName`,
- `Days`,
- `AdminName`,
- `Reason`
- ) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)');
- $q->execute(array(
- Config::getID('users','IP',Config::$_url[1]),
- 1,
- $permanentban,
- $_POST['banip'],
- (time()+$duration*86400),
- Config::getID('users','name',Config::$_url[1]),
- $duration,
- Config::getData('users','name',$_SESSION['user']),
- $_POST['reason']
- ));
- if($_POST['duration'] == 0) {
- $durata = "permanent";
- } else {
- $durata = "". $_POST['duration'] ." days";
- }
- echo '<meta http-equiv="refresh" content="2">';
- }
- }
- if(isset($_POST['warn'])) {
- if(isset($_SESSION['user']) && Config::getData('users','Admin',$_SESSION['user']) >= 1)
- if(!$_POST['reason'] && !$_POST['duration']) echo '<div class="alert alert-danger">Ai lasat campuri necompletate.</div>';
- else {
- echo '<div class="alert alert-success">Jucatorul a primit warn cu succes.</div>';
- if($_POST['duration']) {
- $duration = 0;
- } else { $duration = 0; }
- $q = Config::$g_con->prepare('INSERT INTO `panelactions` (`complaintid`, `actiontime`, `actionid`, `playerid`, `playername`, `giverid`, `givername`, `reason`) VALUES (?, ?, ?, ?, ?, ?, ?, ?)');
- $q->execute(array(0,$duration,4,Config::getID('users','id',Config::$_url[1]),Config::getID('users','name',Config::$_url[1]),Config::getData('users','id',$_SESSION['user']),Config::getData('users','name',$_SESSION['user']),$_POST['reason']));
- $q = Config::$g_con->prepare('UPDATE `users` SET `Warnings` = ? WHERE `id` = ?');
- $q->execute(array(Config::getID('users','Warnings',Config::$_url[1])+1,Config::getID('users','id',Config::$_url[1])));
- echo '<meta http-equiv="refresh" content="2">';
- }
- }
- if(isset($_POST['mute'])) {
- if(isset($_SESSION['user']) && Config::getData('users','Admin',$_SESSION['user']) >= 1)
- if(!$_POST['reason'] && !$_POST['duration']) echo '<div class="alert alert-danger">Ai lasat campuri necompletate.</div>';
- else {
- if(isset($_SESSION['user']) && Config::getData('users','Admin',$_SESSION['user']) >= 1)
- echo '<div class="alert alert-success">Jucatorul a primit mute cu succes.</div>';
- if($_POST['duration']) {
- $duration = $_POST['duration'];
- }
- $q = Config::$g_con->prepare('INSERT INTO `panelactions` (`complaintid`, `actiontime`, `actionid`, `playerid`, `playername`, `giverid`, `givername`, `reason`) VALUES (?, ?, ?, ?, ?, ?, ?, ?)');
- $q->execute(array(0,$duration,5,Config::getID('users','id',Config::$_url[1]),Config::getID('users','name',Config::$_url[1]),Config::getData('users','id',$_SESSION['user']),Config::getData('users','name',$_SESSION['user']),$_POST['reason']));
- $q = Config::$g_con->prepare('UPDATE `users` SET `Muted` = ? AND `MuteTime` = ? WHERE `id` = ?');
- $q->execute(array(1,Config::getID('users','MuteTime',Config::$_url[1])+$duration,Config::getID('users','id',Config::$_url[1])));
- echo '<meta http-equiv="refresh" content="2">';
- }
- }
- ?>
- <?php
- $q = Config::$g_con->prepare('SELECT * FROM `bans` WHERE `PlayerName` = ? AND `Active` = 1 LIMIT 1');
- $q->execute(array($data->name));
- if($q->rowCount())
- while($row = $q->fetch(PDO::FETCH_OBJ)) {
- $date = $row->BanTimeDate;
- if($row->Permanent == 1) {
- $expira = "Contul este banat permanent (banul nu va expira automat)";
- } else {
- $expira = "Banul expira pe data de <b>". gmdate("Y-m-d H:i:s", $row->Time) ."</b>";
- }
- $numeadmin = $row->AdminName; $motiv = $row->Reason;
- echo "
- <div class='alert alert-danger'>
- <b>This account is banned.</b><br/><br/>
- Banat de: <b>$numeadmin</b> pe data de <b>$date</b>, motivul banului: <b>$motiv</b>.<br/>
- $expira.</div> ";
- }
- ?>
- <div class = "row">
- <div class="col-md-12">
- <div class="col-md-3">
- <div class="box box-primary">
- <div class="box-body">
- <div class="col-xs-12" style="padding-bottom: 5%;">
- <div class="" style="display:block; white-space: nowrap;">
- <div class="col-md-12">
- <center>
- <div>
- <img class="imgA1" src="https://jadepanel.nephrite.ro/images/avatare/<?php echo Config::getID('users','Model',$data->name); ?>.png" width="170px" alt="profile picture">
- </div>
- <h3 class="profile-username" style="<?php echo (!$data->Status ? "color:#E02424" : "color:#5EEB2F"); ?>"><?php echo (!$data->Status ? "<i class='fa fa-circle text-danger'></i> " : "<i class='fa fa-circle text-success'></i> "); ?> <?php echo $data->name; ?> </h3>
- </center>
- </div>
- <div class="col-md-12 col-lg-12">
- <center>
- <?php if($data->Admin >= 6) { ?>
- <span class="label bg-green"> <font style="font-family:verdana;"><i class="fa fa-shield" data-toggle="tooltip" data-original-title="owner"></i> owner </font></span><br>
- <?php } else if($data->Admin < 6 && $data->Admin > 0 ) { ?>
- <span class="label bg-black"> <font style="font-family:verdana;"><i class="fa fa-shield" data-toggle="tooltip" data-original-title="admin level: <?php $data->Admin?>"></i> admin </font></span><br>
- <?php } else if($data->Helper < 4 && $data->Helper > 0 ) { ?>
- <span class="label bg-black"><font style="font-family:verdana;"><i class="fa fa-comment"></i> helper</font></span>
- <?php } if($data->Beta == 1) { ?>
- <span class="label bg-red"><font style="font-family:verdana;"><i class="fa fa-bug"></i> beta tester</font></span><br>
- <?php } if($data->Premium == 1) { ?>
- <span class="label bg-yellow"><font style="font-family:verdana;"><i class="fa fa-star"></i> premium user</font></span><br>
- <?php } else if($data->Premium == 2 ) { ?>
- <span class="label bg-yellow"><font style="font-family:verdana;"><i class="fa fa-star"></i> vip user</font></span><br>
- <?php } if($data->CRank == 7) { ?>
- <span class="label" style="background: #00aa00"><font style="font-family:verdana;"><a href="<?php echo Config::$_PAGE_URL; ?>clan/<?php echo $data->Clan ?>" style="color: #FFF"><i class="fa fa-group"></i> clan owner</a></font></span><br/>
- <br><a href="<?php Config::$_PAGE_URL ?>createcomplaint/<?php echo $data->id?>" target="_blank" class="btn btn-danger btn-block"><b>reclama player</b></a>
- <?php }?>
- </center>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- <div class="nav-tabs-custom col-md-8">
- <ul class="nav nav-tabs">
- <li class="active"><a href="#maininfo" data-toggle="tab" aria-expanded="false"><i class = "fa fa-bullseye"></i> Main Info</a></li>
- <li class=""><a href="#timeline" data-toggle="tab" aria-expanded="false"><i class = "fa fa-feed"></i> Faction History</a></li>
- <li class=""><a href="#properties" data-toggle="tab" aria-expanded="false"><i class = "fa fa-usd"></i> Properties</a></li>
- <li class=""><a href="#vehicles" data-toggle="tab" aria-expanded="false"><i class = "fa fa-car"></i> Vehicles</a></li>
- <?php if(isset($_SESSION['user']) && Config::getData('users','Admin',$_SESSION['user']) >= 1) { ?>
- <li class=""><a href="#admintools" data-toggle="tab" aria-expanded="false"><i class = "fa fa-fw fa-wrench"></i> Admin Tools</a></li>
- <?php } if(isset($_SESSION['user']) && Config::getData('users','Admin',$_SESSION['user']) >= 1) { ?>
- <li class=""><a href="#ppunish" data-toggle="tab" aria-expanded="false"><i class = "fa fa-fw fa-wrench"></i> Player Punish</a></li>
- <?php } if(isset($_SESSION['user']) && Config::getData('users','Admin',$_SESSION['user']) >= 3) { ?>
- <li class=""><a href="#piplogs" data-toggle="tab" aria-expanded="false"><i class = "fa fa-fw fa-wrench"></i> Player IP Logs</a></li>
- <?php } ?>
- </ul>
- <div class="tab-content">
- <div class="tab-pane active" id="maininfo">
- <div class="box-body table-responsive no-padding">
- <table class="table table-striped">
- <tbody>
- <ul class="list-group">
- <li class="list-group-item">
- <b>Faction</b> <a class="pull-right"><?php echo Config::$factions[$data->Member] ?><?php if($data->Member >=1) { ?>, rank <?php echo $data->Rank; ?> <?php } ?></a>
- </li>
- <li class="list-group-item">
- <b>Level</b> <a class="pull-right"><?php echo $data->Level; ?></a>
- </li>
- <li class="list-group-item">
- <b>Played Hours</b> <a class="pull-right"><?php echo $data->ConnectedTime; ?></a>
- </li>
- <?php if($data->Clan>0) { ?>
- <li class="list-group-item">
- <b>Clan</b> <a href="<?php echo Config::$_PAGE_URL; ?>clan/<?php echo $data->Clan ?>" class="pull-right"><?php echo Config::getClan('clans','clanName',$data->Clan)?>, rank <?php echo $data->CRank?></a>
- </li>
- <?php }?>
- <li class="list-group-item">
- <b>Phone number</b> <a class="pull-right"> <?php echo $data->PhoneNr; ?></a>
- </li>
- <li class="list-group-item">
- <b>Joined</b> <a class="pull-right"><?php echo $data->RegisterDate ?></a>
- </li>
- <li class="list-group-item">
- <b>Last Online</b> <a class="pull-right"><?php echo $data->lastOn; ?></a>
- </li>
- <li class="list-group-item">
- <b>Faction Punish</b> <a class="pull-right"><?php echo $data->FPunish; ?></a>
- </li>
- <li class="list-group-item">
- <b>Warnings</b> <a class="pull-right"><?php echo $data->Warnings; ?>/3</a>
- </li>
- <li class="list-group-item">
- <b>Job</b> <a class="pull-right"><?php echo Config::$jobs[$data->Job]; ?></a>
- </li>
- <?php if(isset($_SESSION['user']) && ($data->name) == Config::getData('users','name',$_SESSION['user'])) { ?>
- <li class="list-group-item">
- <b>Premium</b> <a class="pull-right"><?php echo (!$data->Premium ? "No ($data->PremiumPoints premium points)" : "Yes ($data->PremiumPoints premium points)"); ?></a>
- </li>
- <?php } if(isset($_SESSION['user'])&& ($data->name) != Config::getData('users','name',$_SESSION['user']) && Config::getData('users','Admin',$_SESSION['user']) > 5) { ?>
- <li class="list-group-item">
- <b>Premium</b> <a class="pull-right"><?php echo (!$data->Premium ? "No ($data->PremiumPoints premium points)" : "Yes ($data->PremiumPoints premium points)"); ?></a>
- </li>
- <?php } if(isset($_SESSION['user'])&& ($data->name) != Config::getData('users','name',$_SESSION['user']) && Config::getData('users','Admin',$_SESSION['user']) > 5) { ?>
- <li class="list-group-item">
- <b>IP</b> <a class="pull-right"><?php echo $data->IP; ?></a>
- </li>
- <?php } if(isset($_SESSION['user']) && ($data->name) == Config::getData('users','name',$_SESSION['user'])) { ?>
- <li class="list-group-item">
- <b>Email</b> <a class="pull-right"><?php if($data->Email == "email@yahoo.com") { echo "(UNCONFIRMED)"; } else echo $data->Email; ?> <a href="<?php echo Config::$_PAGE_URL; ?>changemail"><i class="ace-icon fa fa-edit"></i></a></a>
- </li>
- <?php } if(isset($_SESSION['user'])&& ($data->name) != Config::getData('users','name',$_SESSION['user']) && Config::getData('users','Admin',$_SESSION['user']) > 5) { ?>
- <li class="list-group-item">
- <b>Email</b> <a class="pull-right"><?php if($data->Email == "email@yahoo.com") { echo "(UNCONFIRMED)"; } else echo $data->Email; ?></a>
- </li>
- <?php } if(isset($_SESSION['user']) && ($data->name) == Config::getData('users','name',$_SESSION['user'])) { ?>
- <li class="list-group-item">
- <b>Money</b> <a class="pull-right">$<?php echo number_format($data->Money,0,'.','.'); ?> / $<?php echo number_format($data->Bank,0,'.','.'); ?></a>
- </li>
- <?php } if(isset($_SESSION['user'])&& ($data->name) != Config::getData('users','name',$_SESSION['user']) && Config::getData('users','Admin',$_SESSION['user']) > 5) { ?>
- <li class="list-group-item">
- <b>Money</b> <a class="pull-right">$<?php echo number_format($data->Money,0,'.','.'); ?> / $<?php echo number_format($data->Bank,0,'.','.'); ?></a>
- </li>
- <?php } ?>
- </ul>
- </tbody>
- </table>
- </div>
- </div>
- <div class="tab-pane" id="timeline">
- <div class="box-body table-responsive no-padding">
- <table class="table table-striped">
- <tbody> <ul class="timeline timeline-danger">
- <?php
- $s = Config::$g_con->prepare('SELECT * FROM `faction_logs` WHERE `player` = ? ORDER BY `id` DESC');
- $s->execute(array(Config::getID('users','id',$data->name)));
- while($flog = $s->fetch(PDO::FETCH_OBJ))
- { ?>
- <?php if(isset($_SESSION['user']) && Config::getData('users','Admin',$_SESSION['user']) >= 3){ ?>
- <?php if($flog->deleted == 1 && isset($_SESSION['user']) && Config::getData('users','Admin',$_SESSION['user']) >= 3) { ?>
- <?php } else { ?>
- <?php } ?>
- <li>
- <i data-toggle="tooltip" title="" class="fa fa-chevron-circle-up bg-blue" data-original-title="<?php echo $flog->time; ?>"></i>
- <div class="timeline-item">
- <div class="timeline-body">
- <?php echo $flog->Text; ?>
- <?php if(isset($_SESSION['user']) && Config::getData('users','Admin',$_SESSION['user']) >= 3) { ?>
- <a href="<?php echo Config::$_PAGE_URL; ?>editfh/<?php echo $flog->id; ?>" class="ace-icon fa fa-edit" title="Edit FH"></a>
- </div>
- </div>
- </li>
- <?php } ?>
- <?php } else { ?>
- <?php if($flog->deleted == 0) { ?>
- <li>
- <i data-toggle="tooltip" title="" class="fa fa-chevron-circle-up bg-blue" data-original-title="<?php echo $flog->time; ?>"></i>
- <div class="timeline-item">
- <div class="timeline-body">
- <?php echo $flog->Text; ?>
- </div>
- </div>
- </li>
- <?php } ?>
- <?php } ?>
- <?php } ?>
- <li>
- <i class="fa fa-clock-o bg-gray"></i>
- </li>
- </ul>
- </tbody>
- </table>
- </div>
- </div>
- <div class="tab-pane" id="properties">
- <div class="box-body">
- <div class="info-box">
- <br><left><span class="info-box-number"><small>
- <?php
- if($data->House == 999) {
- if(!isset($_SESSION['user']))
- echo 'This user doesn\'t have a house.';
- else if(isset($_SESSION['user']) && ($_SESSION['user'] === $user))
- echo 'You don\'t have a house.';
- else
- echo 'This user doesn\'t have a house.';
- } else {
- $s = Config::$g_con->prepare('SELECT * FROM `houses` WHERE `Owner` = ?');
- $s->execute(array($data->name));
- while($house = $s->fetch(PDO::FETCH_OBJ))
- { ?>
- <div class="box box-primary">
- <div class="box-header">
- <h3 class="box-title">
- House
- </h3>
- </div>
- <div class="box-body table-responsive">
- <table class="table table-condensed table-hover">
- <thead>
- <tr>
- <td>#ID</td>
- <td>Rent</td>
- <td>Price</td>
- <td>Type</td>
- <td>Options</td>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td><b><?php echo $house->ID ?></b></td>
- <td><b>$<?php echo number_format($house->Rent,0,'.','.') ?></b></td>
- <td><b><?php if($house->Owned==0) { ?>$<?php echo number_format($row->Value,0,'.','.') ?><?php }?>
- <?php if($house->Owned==1) { ?>Not for sale<?php }?></b></td>
- <td><b><?php if($house->InteriorType==0) { ?>Small<?php }?>
- <?php if($house->InteriorType==1) { ?>Medium<?php }?>
- <?php if($house->InteriorType==2) { ?>Big<?php }?></b></td>
- <td><a type="button" data-toggle="modal" data-target="#modal<?php echo $house->ID ?>">Display on map</a>
- <div id="modal<?php echo $house->ID ?>" class="modal fade" role="dialog">
- <div class="modal-dialog">
- <div class="modal-content">
- <div class="modal-header">
- <button type="button" class="close" data-dismiss="modal">×</button>
- <h4 class="modal-title">House <?php echo $house->ID ?></h4>
- </div>
- <div class="modal-body">
- <img src="<?php echo Config::$_PAGE_URL; ?>map?x=<?php echo $house->Entrancex ?>&y=<?php echo $house->Entrancey ?>" alt="Smiley face" height="600" width="570">
- </div>
- <div class="modal-footer">
- <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
- </div>
- </div>
- </div>
- </div></td>
- </tr>
- </tbody>
- </table>
- </div>
- </div>
- <?php }}?>
- </small></span></center>
- </div>
- <div class="">
- <div class="info-box">
- <div class = "">
- <?php
- if($data->Bizz == 255) {
- if(!isset($_SESSION['user']))
- echo '<b>This user doesn\'t have a business.</b>';
- else if(isset($_SESSION['user']) && ($_SESSION['user'] === $user))
- echo '<b>You don\'t have a business.</b>';
- else
- echo '<b>This user doesn\'t have a business.</b>';
- } else {
- $s = Config::$g_con->prepare('SELECT * FROM `bizz` WHERE `Owner` = ?');
- $s->execute(array($data->name));
- while($bizz = $s->fetch(PDO::FETCH_OBJ))
- { ?>
- <b><div class="box box-primary">
- <div class="box-header">
- <h3 class="box-title">
- Business
- </h3>
- </div>
- <div class="box-body table-responsive">
- <table class="table table-condensed table-hover">
- <thead>
- <tr>
- <td>#ID</td>
- <td>Fee</td>
- <td>Price</td>
- <td>Options</td>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td><b><?php echo $bizz->ID ?></b></td>
- <td><b>$<?php echo number_format($bizz->EntranceCost,0,'.','.') ?></b></td>
- <td><b><?php echo $bizz->BuyPrice ?></b></td>
- <td><a type="button" data-toggle="modal" data-target="#modalb<?php echo $bizz->ID ?>">Display on map</a>
- <div id="modalb<?php echo $bizz->ID ?>" class="modal fade" role="dialog">
- <div class="modal-dialog">
- <div class="modal-content">
- <div class="modal-header">
- <button type="button" class="close" data-dismiss="modal">×</button>
- <h4 class="modal-title">House <?php echo $bizz->ID ?></h4>
- </div>
- <div class="modal-body">
- <img src="<?php echo Config::$_PAGE_URL; ?>map?x=<?php echo $bizz->EntranceX ?>&y=<?php echo $bizz->EntranceY ?>" alt="Smiley face" height="600" width="570">
- </div>
- <div class="modal-footer">
- <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
- </div>
- </div>
- </div>
- </div></td>
- </tr>
- </tbody>
- </table>
- </div>
- <center></center>
- </div></b>
- <?php }
- }
- ?>
- </div>
- </div>
- </div>
- </div>
- </div>
- <div class="tab-pane" id="vehicles">
- <div class="box-body table-responsive no-padding">
- <table class="table table-striped">
- <tbody>
- <?php
- $q = Config::$g_con->prepare('SELECT * FROM `cars` WHERE `Owner` = ?');
- $q->execute(array($data->name));
- if(!$q->rowCount()) {
- if(!isset($_SESSION['user']))
- echo '<p>This user has no vehicles.</p>';
- else if(isset($_SESSION['user']) && ($_SESSION['user'] === $user))
- echo '<p>You have no vehicles.</p>';
- else
- echo '<p>No personal vehicles owned.</p>';
- } else {
- echo '
- <table class="table table-striped">
- <thead>
- <tr>
- <th>Image</th>
- <th class="hidden-480">Vehicle Name</th>
- <th class="hidden-100">Info</th>
- <th class="center">GPS</th>
- </tr>
- </thead>
- <tbody>';
- $s = Config::$g_con->prepare('SELECT * FROM `cars` WHERE `Owner` = ?');
- $s->execute(array($data->name));
- while($car = $s->fetch(PDO::FETCH_OBJ))
- { ?>
- <?php if(Config::$_VIPCARS == 0) { ?>
- <tr class>
- <td class="center">
- <img src="<?php echo Config::$_PAGE_URL ?>assets/images/vehicles/Vehicle_<?php echo $car->Model ?>.jpg" alt="490" style="height: 65px"/>
- </td>
- <td>
- <?php echo Config::$namevehicles[$car->Model]; ?>
- </td>
- <td>
- Odometter: <b><?php echo number_format($car->KM,0,'.','.') ?> km</b><br>
- Colors: <span style="color: <?php echo Config::$vehColors[$car->ColorOne] ?>; font-weight: bold;"><?php echo $car->ColorOne ?></span>, <span style="color: <?php echo Config::$vehColors[$car->ColorTwo] ?>; font-weight: bold;"><?php echo $car->ColorTwo ?></span><br>
- Age: <b><?php echo $car->days; ?> days</b><br>
- Insurance Price: <b><?php echo $car->Inscarprice; ?> $</b><br>
- </td>
- <td>
- <a type="button" data-toggle="modal" data-target="#modalv<?php echo $car->ID ?>">display on map</a>
- <div id="modalv<?php echo $car->ID ?>" class="modal fade" role="dialog">
- <div class="modal-dialog">
- <div class="modal-content">
- <div class="modal-header">
- <button type="button" class="close" data-dismiss="modal">×</button>
- <h4 class="modal-title">Vehicle <?php echo $car->ID ?></h4>
- </div>
- <div class="modal-body">
- <img src="<?php echo Config::$_PAGE_URL; ?>map?x=<?php echo $car->Locationx ?>&y=<?php echo $car->Locationy ?>" alt="Smiley face" height="600" width="570">
- </div>
- <div class="modal-footer">
- <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
- </div>
- </div>
- </div>
- </div>
- </td>
- </tr>
- <?php } else { ?>
- <?php if($car->VIP >= 1) { ?>
- <tr class="danger">
- <?php } else { ?>
- <tr>
- <?php } ?>
- <td class="center">
- <img src="<?php echo Config::$_PAGE_URL ?>assets/images/vehicles/Vehicle_<?php echo $car->Model ?>.jpg" alt="490" style="height: 65px"/>
- </td>
- <td>
- <?php echo Config::$namevehicles[$car->Model]; ?>
- <?php if($car->VIP >=1) { ?>
- <p>
- <br>
- <b class="text-warning">VIP</b>
- <br>
- <?php if(!is_null($car->VipText)) { ?>
- Text:
- <?php echo $car->VipText;?>
- <?php } } ?>
- </p>
- </td>
- <td>
- Odometter: <b><?php echo number_format($car->KM,0,'.','.') ?> km</b><br>
- Colors: <span style="color: <?php echo Config::$vehColors[$car->ColorOne] ?>; font-weight: bold;"><?php echo $car->ColorOne ?></span>, <span style="color: <?php echo Config::$vehColors[$car->ColorTwo] ?>; font-weight: bold;"><?php echo $car->ColorTwo ?></span><br>
- Age: <b><b><?php
- $then = gmdate("Y-m-d", $car->BuyTime);
- $then = strtotime($then);
- $now = time();
- $difference = $now - $then;
- $days = floor($difference / (60*60*24) );
- echo $days;
- ?> days</b><br>
- Insurance Price: <b><?php echo $car->Inscarprice; ?> $</b><br>
- </td>
- <td>
- <a type="button" data-toggle="modal" data-target="#modalv<?php echo $car->ID ?>">display on map</a>
- <div id="modalv<?php echo $car->ID ?>" class="modal fade" role="dialog">
- <div class="modal-dialog">
- <div class="modal-content">
- <div class="modal-header">
- <button type="button" class="close" data-dismiss="modal">×</button>
- <h4 class="modal-title">Vehicle <?php echo $car->ID ?></h4>
- </div>
- <div class="modal-body">
- <img src="<?php echo Config::$_PAGE_URL; ?>map?x=<?php echo $car->Locationx ?>&y=<?php echo $car->Locationy ?>" alt="Smiley face" height="600" width="570">
- </div>
- <div class="modal-footer">
- <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
- </div>
- </div>
- </div>
- </div><br>
- </td>
- </tr>
- <?php } ?>
- <?php }
- echo '
- </tbody>
- </table>';
- } ?>
- </tbody>
- </table>
- </div>
- </div>
- <div class="tab-pane" id="admintools">
- <div class="box-body table-responsive no-padding">
- <table class="table table-striped">
- <tbody>
- <ul>
- <div class="box box-primary">
- <div class="box-header">
- <h3 class="box-title">
- Actions
- </h3>
- </div>
- <form method="POST" action="" disabled>
- <div class="box-body table-responsive">
- <div class="col-sm-5"> Reason: <br/>
- <input name="reason" type="text" class="col-xs-10 col-sm-10" />
- </div>
- <div class="col-sm-5"> Time: <br/>
- <input name="duration" type="text" class="col-xs-10 col-sm-10" />
- </div>
- <div class="col-sm-10"><br />
- Time 0 pentru permanent<br />
- Tip:<br>
- <select name="banip" class="col-xs-10 col-sm-10">
- <option value="0">Cont</option>
- <option value="1">IP</option>
- </select>
- </div>
- <div class="col-sm-10"><br />
- <input type="submit" name="warn" class="btn btn-small btn-purple" value="warn"/>
- <input type="submit" name="ban" class="btn btn-small btn-danger" value="ban"/>
- <input type="submit" name="mute" class="btn btn-small btn-grey" value="mute"/>
- <input type="submit" name="jail" class="btn btn-small btn-pink" value="jail"/>
- </div>
- </div>
- </form>
- <li><a href="<?php echo Config::$_PAGE_URL;?>playerlogs/<?php echo Config::$_url[1];?>">View player logs</a><br>
- <li><a href="<?php echo Config::$_PAGE_URL;?>kicklogs/<?php echo Config::$_url[1];?>">View kicks log</a>
- <li><a href="<?php echo Config::$_PAGE_URL;?>chatlog/<?php echo Config::$_url[1];?>">View chat log</a>
- <li><a href="<?php echo Config::$_PAGE_URL;?>unbanp/<?php echo Config::$_url[1];?>">unban</a> (only player are banned, abuse of this function are sanctionated)<br>
- <li><a href="<?php echo Config::$_PAGE_URL;?>kick/<?php echo Config::$_url[1];?>">kick</a>
- </div>
- </ul>
- </tbody>
- </table>
- </div>
- </div>
- <div class="tab-pane" id="ppunish">
- <div class="box box-primary">
- <div class="box-header">
- <h3 class="box-title">
- Punish logs
- </h3>
- </div>
- <div class="box-body table-responsive">
- <table class="table table-condensed table-hover">
- <thead>
- <tr>
- <td>ID SQL</td>
- <td>Action</td>
- <td>Admin</td>
- <td>Reason</td>
- <td>Time</td>
- </tr>
- </thead>
- <tbody>
- <tr>
- <?php
- $q = Config::$g_con->prepare('SELECT * FROM `punishlogs` WHERE `playername` = ? ORDER BY `id` DESC');
- $q->execute(array($data->name));
- while($row = $q->fetch(PDO::FETCH_OBJ)) {
- echo "<tr>
- <td>{$row->id}</td>";?>
- <td>
- <?php if($row->actionid==2) { ?> ban <?php } ?>
- <?php if($row->actionid==1) { ?> permanent ban <?php } ?>
- <?php if($row->actionid==6) { ?> jail <?php } ?>
- <?php if($row->actionid==5) { ?> warn <?php } ?>
- <?php if($row->actionid==7) { ?> mute <?php } ?>
- <?php if($row->actionid==8) { ?> relase jail <?php } ?>
- <?php if($row->actionid==3) { ?> permanent ban IP <?php } ?>
- <?php if($row->actionid==4) { ?> ban IP <?php } ?>
- </td>
- <?php echo"
- <td><a href='".Config::$_PAGE_URL.'profile/'.$row->givername."'>{$row->givername}</a></td>
- <td>{$row->reason}</td>
- <td>{$row->time}</td>
- <td>";
- } ?>
- </tr>
- </tbody>
- </table>
- </div>
- <center></center>
- </div>
- </div>
- <div class="tab-pane" id="piplogs">
- <div class="box box-primary">
- <div class="box-header">
- <h3 class="box-title">
- IP logs
- </h3>
- </div>
- <div class="box-body table-responsive">
- <table class="table table-condensed table-hover">
- <thead>
- <tr>
- <td>ID Sesiune</td>
- <td>IP</td>
- <td>Time</td>
- </tr>
- </thead>
- <tbody>
- <?php
- $q = Config::$g_con->prepare('SELECT * FROM `playerconnections` WHERE `playerid` = ? ORDER BY `id` DESC LIMIT 20');
- $q->execute(array($data->id));
- while($row = $q->fetch(PDO::FETCH_OBJ)) {
- echo "<tr>
- <td>{$row->id}</td>
- <td>{$row->ip}</td>
- <td>{$row->time2}</td>
- <td>";
- } ?>
- </tbody>
- </table>
- </div>
- <center></center>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </section>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement