Advertisement
Guest User

Untitled

a guest
Aug 30th, 2019
218
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 36.90 KB | None | 0 0
  1.  
  2.  
  3. <?php
  4.  
  5. if(!defined('panel'))
  6.  
  7. die('Nope.');
  8.  
  9. if(!isset($_SESSION['user']) && !isset(Config::$_url[1])) echo '<meta http-equiv="refresh" content="0;URL=\''.Config::$_PAGE_URL.'login\'/>';
  10.  
  11. if(isset(Config::$_url[1])) $user = (int)Config::$_url[1];
  12.  
  13. if(!isset(Config::$_url[1])) echo '<meta http-equiv="refresh" content="0;URL=\''.Config::$_PAGE_URL.'\'/>';
  14.  
  15. $q = Config::$g_con->prepare('SELECT * FROM `users` WHERE `name` = ?');
  16.  
  17. $q->execute(array(Config::$_url[1]));
  18.  
  19. if(!$q->rowCount()) {
  20.  
  21. echo '
  22. <section class="content">
  23. <title>This user doesn\'t exist</title>
  24.  
  25. <div class="breadcrumbs" id="breadcrumbs">
  26.  
  27. <ul class="breadcrumb">
  28.  
  29. <li>
  30.  
  31. <i class="ace-icon fa fa-home home-icon"></i>
  32.  
  33. <a href="<?php echo Config::$_PAGE_URL; ?>">Home</a>
  34.  
  35. </li>
  36.  
  37. <li class="active">This user doesn\'t exist</li>
  38.  
  39. </ul><!-- /.breadcrumb -->
  40.  
  41. </div>
  42.  
  43. <div class="page-content"><div class="row-fluid"><div class="span12">
  44.  
  45. <div class="alert alert-danger">This user doesn\'t exist.</div></section>';
  46.  
  47. return;
  48.  
  49. }
  50.  
  51. $data = $q->fetch(PDO::FETCH_OBJ);
  52.  
  53.  
  54.  
  55. //include 'inc/config.php';
  56.  
  57. $respect = $data->Level*3+3;
  58.  
  59. ?>
  60.  
  61.  
  62. <section class='content'>
  63. <?php
  64. if(isset($_POST['jail'])) {
  65. if(isset($_SESSION['user']) && Config::getData('users','Admin',$_SESSION['user']) >= 1)
  66. if(!$_POST['reason'] && !$_POST['duration']) echo '<div class="alert alert-danger">Ai lasat campuri necompletate.</div>';
  67. else {
  68. if(isset($_SESSION['user']) && Config::getData('users','Admin',$_SESSION['user']) >= 1)
  69. echo '<div class="alert alert-success">Jucatorul a primit jail cu succes.</div>';
  70. if($_POST['duration']) {
  71. $duration = $_POST['duration'];
  72. }
  73. if(isset($_SESSION['user']) && Config::getData('users','Admin',$_SESSION['user']) >= 1)
  74. $q = Config::$g_con->prepare('INSERT INTO `panelactions` (`complaintid`, `actiontime`, `actionid`, `playerid`, `playername`, `giverid`, `givername`, `reason`) VALUES (?, ?, ?, ?, ?, ?, ?, ?)');
  75. $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']));
  76.  
  77. $q = Config::$g_con->prepare('UPDATE `users` SET `Jailed` = ? AND `JailTime` = ? WHERE `id` = ?');
  78. $q->execute(array(2,Config::getID('users','JailTime',Config::$_url[1])+$duration,Config::getID('users','id',Config::$_url[1])));
  79.  
  80. echo '<meta http-equiv="refresh" content="2">';
  81. }
  82. }
  83. if(isset($_POST['ban'])) {
  84. if(isset($_SESSION['user']) && Config::getData('users','Admin',$_SESSION['user']) >= 1)
  85. if(!$_POST['reason'] && !$_POST['duration']) echo '<div class="alert alert-danger">Ai lasat campuri necompletate.</div>';
  86. else {
  87. echo '<div class="alert alert-success">Jucatorul a primit ban cu succes.</div>';
  88. if($_POST['duration'] == 0) {
  89. $permanentban = 1;
  90. $duration = 0;
  91. } else {
  92. $permanentban = 0;
  93. $duration = $_POST['duration'];
  94. }
  95. if(isset($_SESSION['user']) && Config::getData('users','Admin',$_SESSION['user']) >= 1)
  96.  
  97.  
  98. $q = Config::$g_con->prepare('INSERT INTO `panelactions` (`complaintid`, `actiontime`, `actionid`, `playerid`, `playername`, `giverid`, `givername`, `reason`) VALUES (?, ?, ?, ?, ?, ?, ?, ?)');
  99. $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']));
  100.  
  101. $q = Config::$g_con->prepare('INSERT INTO `bans` (
  102. `IP`,
  103. `Active`,
  104. `Permanent`,
  105. `IPBan`,
  106. `Time`,
  107. `PlayerName`,
  108. `Days`,
  109. `AdminName`,
  110. `Reason`
  111. ) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)');
  112. $q->execute(array(
  113. Config::getID('users','IP',Config::$_url[1]),
  114. 1,
  115. $permanentban,
  116. $_POST['banip'],
  117. (time()+$duration*86400),
  118. Config::getID('users','name',Config::$_url[1]),
  119. $duration,
  120. Config::getData('users','name',$_SESSION['user']),
  121. $_POST['reason']
  122. ));
  123.  
  124.  
  125. if($_POST['duration'] == 0) {
  126. $durata = "permanent";
  127. } else {
  128. $durata = "". $_POST['duration'] ." days";
  129. }
  130.  
  131. echo '<meta http-equiv="refresh" content="2">';
  132. }
  133.  
  134. }
  135. if(isset($_POST['warn'])) {
  136. if(isset($_SESSION['user']) && Config::getData('users','Admin',$_SESSION['user']) >= 1)
  137. if(!$_POST['reason'] && !$_POST['duration']) echo '<div class="alert alert-danger">Ai lasat campuri necompletate.</div>';
  138. else {
  139. echo '<div class="alert alert-success">Jucatorul a primit warn cu succes.</div>';
  140. if($_POST['duration']) {
  141. $duration = 0;
  142. } else { $duration = 0; }
  143.  
  144.  
  145. $q = Config::$g_con->prepare('INSERT INTO `panelactions` (`complaintid`, `actiontime`, `actionid`, `playerid`, `playername`, `giverid`, `givername`, `reason`) VALUES (?, ?, ?, ?, ?, ?, ?, ?)');
  146. $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']));
  147.  
  148. $q = Config::$g_con->prepare('UPDATE `users` SET `Warnings` = ? WHERE `id` = ?');
  149. $q->execute(array(Config::getID('users','Warnings',Config::$_url[1])+1,Config::getID('users','id',Config::$_url[1])));
  150.  
  151. echo '<meta http-equiv="refresh" content="2">';
  152.  
  153. }
  154.  
  155. }
  156. if(isset($_POST['mute'])) {
  157. if(isset($_SESSION['user']) && Config::getData('users','Admin',$_SESSION['user']) >= 1)
  158. if(!$_POST['reason'] && !$_POST['duration']) echo '<div class="alert alert-danger">Ai lasat campuri necompletate.</div>';
  159. else {
  160. if(isset($_SESSION['user']) && Config::getData('users','Admin',$_SESSION['user']) >= 1)
  161. echo '<div class="alert alert-success">Jucatorul a primit mute cu succes.</div>';
  162. if($_POST['duration']) {
  163. $duration = $_POST['duration'];
  164. }
  165.  
  166.  
  167. $q = Config::$g_con->prepare('INSERT INTO `panelactions` (`complaintid`, `actiontime`, `actionid`, `playerid`, `playername`, `giverid`, `givername`, `reason`) VALUES (?, ?, ?, ?, ?, ?, ?, ?)');
  168. $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']));
  169.  
  170. $q = Config::$g_con->prepare('UPDATE `users` SET `Muted` = ? AND `MuteTime` = ? WHERE `id` = ?');
  171. $q->execute(array(1,Config::getID('users','MuteTime',Config::$_url[1])+$duration,Config::getID('users','id',Config::$_url[1])));
  172.  
  173. echo '<meta http-equiv="refresh" content="2">';
  174.  
  175. }
  176. }
  177. ?>
  178. <?php
  179.  
  180.  
  181. $q = Config::$g_con->prepare('SELECT * FROM `bans` WHERE `PlayerName` = ? AND `Active` = 1 LIMIT 1');
  182.  
  183.  
  184. $q->execute(array($data->name));
  185.  
  186. if($q->rowCount())
  187.  
  188. while($row = $q->fetch(PDO::FETCH_OBJ)) {
  189.  
  190. $date = $row->BanTimeDate;
  191.  
  192. if($row->Permanent == 1) {
  193.  
  194. $expira = "Contul este banat permanent (banul nu va expira automat)";
  195.  
  196. } else {
  197.  
  198. $expira = "Banul expira pe data de <b>". gmdate("Y-m-d H:i:s", $row->Time) ."</b>";
  199.  
  200. }
  201.  
  202. $numeadmin = $row->AdminName; $motiv = $row->Reason;
  203.  
  204. echo "
  205.  
  206. <div class='alert alert-danger'>
  207.  
  208. <b>This account is banned.</b><br/><br/>
  209.  
  210. Banat de: <b>$numeadmin</b> pe data de <b>$date</b>, motivul banului: <b>$motiv</b>.<br/>
  211.  
  212. $expira.</div> ";
  213.  
  214. }
  215. ?>
  216. <div class = "row">
  217. <div class="col-md-12">
  218. <div class="col-md-3">
  219. <div class="box box-primary">
  220. <div class="box-body">
  221. <div class="col-xs-12" style="padding-bottom: 5%;">
  222. <div class="" style="display:block; white-space: nowrap;">
  223. <div class="col-md-12">
  224. <center>
  225. <div>
  226. <img class="imgA1" src="https://jadepanel.nephrite.ro/images/avatare/<?php echo Config::getID('users','Model',$data->name); ?>.png" width="170px" alt="profile picture">
  227. </div>
  228. <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>
  229. </center>
  230. </div>
  231. <div class="col-md-12 col-lg-12">
  232. <center>
  233. <?php if($data->Admin >= 6) { ?>
  234. <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>
  235. <?php } else if($data->Admin < 6 && $data->Admin > 0 ) { ?>
  236. <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>
  237. <?php } else if($data->Helper < 4 && $data->Helper > 0 ) { ?>
  238. <span class="label bg-black"><font style="font-family:verdana;"><i class="fa fa-comment"></i> helper</font></span>
  239. <?php } if($data->Beta == 1) { ?>
  240. <span class="label bg-red"><font style="font-family:verdana;"><i class="fa fa-bug"></i> beta tester</font></span><br>
  241. <?php } if($data->Premium == 1) { ?>
  242. <span class="label bg-yellow"><font style="font-family:verdana;"><i class="fa fa-star"></i> premium user</font></span><br>
  243. <?php } else if($data->Premium == 2 ) { ?>
  244. <span class="label bg-yellow"><font style="font-family:verdana;"><i class="fa fa-star"></i> vip user</font></span><br>
  245. <?php } if($data->CRank == 7) { ?>
  246. <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/>
  247. <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>
  248. <?php }?>
  249. </center>
  250. </div>
  251. </div>
  252. </div>
  253. </div>
  254. </div>
  255. </div>
  256. <div class="nav-tabs-custom col-md-8">
  257. <ul class="nav nav-tabs">
  258. <li class="active"><a href="#maininfo" data-toggle="tab" aria-expanded="false"><i class = "fa fa-bullseye"></i> Main Info</a></li>
  259. <li class=""><a href="#timeline" data-toggle="tab" aria-expanded="false"><i class = "fa fa-feed"></i> Faction History</a></li>
  260. <li class=""><a href="#properties" data-toggle="tab" aria-expanded="false"><i class = "fa fa-usd"></i> Properties</a></li>
  261. <li class=""><a href="#vehicles" data-toggle="tab" aria-expanded="false"><i class = "fa fa-car"></i> Vehicles</a></li>
  262. <?php if(isset($_SESSION['user']) && Config::getData('users','Admin',$_SESSION['user']) >= 1) { ?>
  263. <li class=""><a href="#admintools" data-toggle="tab" aria-expanded="false"><i class = "fa fa-fw fa-wrench"></i> Admin Tools</a></li>
  264. <?php } if(isset($_SESSION['user']) && Config::getData('users','Admin',$_SESSION['user']) >= 1) { ?>
  265. <li class=""><a href="#ppunish" data-toggle="tab" aria-expanded="false"><i class = "fa fa-fw fa-wrench"></i> Player Punish</a></li>
  266. <?php } if(isset($_SESSION['user']) && Config::getData('users','Admin',$_SESSION['user']) >= 3) { ?>
  267. <li class=""><a href="#piplogs" data-toggle="tab" aria-expanded="false"><i class = "fa fa-fw fa-wrench"></i> Player IP Logs</a></li>
  268. <?php } ?>
  269. </ul>
  270. <div class="tab-content">
  271. <div class="tab-pane active" id="maininfo">
  272. <div class="box-body table-responsive no-padding">
  273. <table class="table table-striped">
  274. <tbody>
  275. <ul class="list-group">
  276. <li class="list-group-item">
  277. <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>
  278. </li>
  279. <li class="list-group-item">
  280. <b>Level</b> <a class="pull-right"><?php echo $data->Level; ?></a>
  281. </li>
  282. <li class="list-group-item">
  283. <b>Played Hours</b> <a class="pull-right"><?php echo $data->ConnectedTime; ?></a>
  284. </li>
  285. <?php if($data->Clan>0) { ?>
  286. <li class="list-group-item">
  287. <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>
  288. </li>
  289. <?php }?>
  290. <li class="list-group-item">
  291. <b>Phone number</b> <a class="pull-right"> <?php echo $data->PhoneNr; ?></a>
  292. </li>
  293. <li class="list-group-item">
  294. <b>Joined</b> <a class="pull-right"><?php echo $data->RegisterDate ?></a>
  295. </li>
  296. <li class="list-group-item">
  297. <b>Last Online</b> <a class="pull-right"><?php echo $data->lastOn; ?></a>
  298. </li>
  299. <li class="list-group-item">
  300. <b>Faction Punish</b> <a class="pull-right"><?php echo $data->FPunish; ?></a>
  301. </li>
  302. <li class="list-group-item">
  303. <b>Warnings</b> <a class="pull-right"><?php echo $data->Warnings; ?>/3</a>
  304. </li>
  305. <li class="list-group-item">
  306. <b>Job</b> <a class="pull-right"><?php echo Config::$jobs[$data->Job]; ?></a>
  307. </li>
  308. <?php if(isset($_SESSION['user']) && ($data->name) == Config::getData('users','name',$_SESSION['user'])) { ?>
  309. <li class="list-group-item">
  310. <b>Premium</b> <a class="pull-right"><?php echo (!$data->Premium ? "No ($data->PremiumPoints premium points)" : "Yes ($data->PremiumPoints premium points)"); ?></a>
  311. </li>
  312. <?php } if(isset($_SESSION['user'])&& ($data->name) != Config::getData('users','name',$_SESSION['user']) && Config::getData('users','Admin',$_SESSION['user']) > 5) { ?>
  313. <li class="list-group-item">
  314. <b>Premium</b> <a class="pull-right"><?php echo (!$data->Premium ? "No ($data->PremiumPoints premium points)" : "Yes ($data->PremiumPoints premium points)"); ?></a>
  315. </li>
  316. <?php } if(isset($_SESSION['user'])&& ($data->name) != Config::getData('users','name',$_SESSION['user']) && Config::getData('users','Admin',$_SESSION['user']) > 5) { ?>
  317. <li class="list-group-item">
  318. <b>IP</b> <a class="pull-right"><?php echo $data->IP; ?></a>
  319. </li>
  320. <?php } if(isset($_SESSION['user']) && ($data->name) == Config::getData('users','name',$_SESSION['user'])) { ?>
  321. <li class="list-group-item">
  322. <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>
  323. </li>
  324. <?php } if(isset($_SESSION['user'])&& ($data->name) != Config::getData('users','name',$_SESSION['user']) && Config::getData('users','Admin',$_SESSION['user']) > 5) { ?>
  325. <li class="list-group-item">
  326. <b>Email</b> <a class="pull-right"><?php if($data->Email == "email@yahoo.com") { echo "(UNCONFIRMED)"; } else echo $data->Email; ?></a>
  327. </li>
  328. <?php } if(isset($_SESSION['user']) && ($data->name) == Config::getData('users','name',$_SESSION['user'])) { ?>
  329. <li class="list-group-item">
  330. <b>Money</b> <a class="pull-right">$<?php echo number_format($data->Money,0,'.','.'); ?> / $<?php echo number_format($data->Bank,0,'.','.'); ?></a>
  331. </li>
  332. <?php } if(isset($_SESSION['user'])&& ($data->name) != Config::getData('users','name',$_SESSION['user']) && Config::getData('users','Admin',$_SESSION['user']) > 5) { ?>
  333. <li class="list-group-item">
  334. <b>Money</b> <a class="pull-right">$<?php echo number_format($data->Money,0,'.','.'); ?> / $<?php echo number_format($data->Bank,0,'.','.'); ?></a>
  335. </li>
  336. <?php } ?>
  337. </ul>
  338. </tbody>
  339. </table>
  340. </div>
  341. </div>
  342. <div class="tab-pane" id="timeline">
  343. <div class="box-body table-responsive no-padding">
  344. <table class="table table-striped">
  345. <tbody> <ul class="timeline timeline-danger">
  346. <?php
  347. $s = Config::$g_con->prepare('SELECT * FROM `faction_logs` WHERE `player` = ? ORDER BY `id` DESC');
  348. $s->execute(array(Config::getID('users','id',$data->name)));
  349. while($flog = $s->fetch(PDO::FETCH_OBJ))
  350. { ?>
  351. <?php if(isset($_SESSION['user']) && Config::getData('users','Admin',$_SESSION['user']) >= 3){ ?>
  352. <?php if($flog->deleted == 1 && isset($_SESSION['user']) && Config::getData('users','Admin',$_SESSION['user']) >= 3) { ?>
  353. <?php } else { ?>
  354. <?php } ?>
  355. <li>
  356. <i data-toggle="tooltip" title="" class="fa fa-chevron-circle-up bg-blue" data-original-title="<?php echo $flog->time; ?>"></i>
  357. <div class="timeline-item">
  358. <div class="timeline-body">
  359. <?php echo $flog->Text; ?>
  360. <?php if(isset($_SESSION['user']) && Config::getData('users','Admin',$_SESSION['user']) >= 3) { ?>
  361. <a href="<?php echo Config::$_PAGE_URL; ?>editfh/<?php echo $flog->id; ?>" class="ace-icon fa fa-edit" title="Edit FH"></a>
  362. </div>
  363. </div>
  364. </li>
  365. <?php } ?>
  366. <?php } else { ?>
  367. <?php if($flog->deleted == 0) { ?>
  368. <li>
  369. <i data-toggle="tooltip" title="" class="fa fa-chevron-circle-up bg-blue" data-original-title="<?php echo $flog->time; ?>"></i>
  370. <div class="timeline-item">
  371. <div class="timeline-body">
  372. <?php echo $flog->Text; ?>
  373. </div>
  374. </div>
  375. </li>
  376. <?php } ?>
  377. <?php } ?>
  378. <?php } ?>
  379. <li>
  380. <i class="fa fa-clock-o bg-gray"></i>
  381. </li>
  382. </ul>
  383. </tbody>
  384. </table>
  385. </div>
  386. </div>
  387. <div class="tab-pane" id="properties">
  388. <div class="box-body">
  389. <div class="info-box">
  390. <br><left><span class="info-box-number"><small>
  391. <?php
  392.  
  393. if($data->House == 999) {
  394.  
  395. if(!isset($_SESSION['user']))
  396.  
  397. echo 'This user doesn\'t have a house.';
  398.  
  399. else if(isset($_SESSION['user']) && ($_SESSION['user'] === $user))
  400.  
  401. echo 'You don\'t have a house.';
  402.  
  403. else
  404.  
  405. echo 'This user doesn\'t have a house.';
  406.  
  407. } else {
  408.  
  409. $s = Config::$g_con->prepare('SELECT * FROM `houses` WHERE `Owner` = ?');
  410.  
  411. $s->execute(array($data->name));
  412.  
  413. while($house = $s->fetch(PDO::FETCH_OBJ))
  414.  
  415. { ?>
  416. <div class="box box-primary">
  417. <div class="box-header">
  418. <h3 class="box-title">
  419. House
  420. </h3>
  421. </div>
  422. <div class="box-body table-responsive">
  423. <table class="table table-condensed table-hover">
  424. <thead>
  425. <tr>
  426. <td>#ID</td>
  427. <td>Rent</td>
  428. <td>Price</td>
  429. <td>Type</td>
  430. <td>Options</td>
  431. </tr>
  432. </thead>
  433. <tbody>
  434. <tr>
  435. <td><b><?php echo $house->ID ?></b></td>
  436. <td><b>$<?php echo number_format($house->Rent,0,'.','.') ?></b></td>
  437. <td><b><?php if($house->Owned==0) { ?>$<?php echo number_format($row->Value,0,'.','.') ?><?php }?>
  438.  
  439. <?php if($house->Owned==1) { ?>Not for sale<?php }?></b></td>
  440. <td><b><?php if($house->InteriorType==0) { ?>Small<?php }?>
  441.  
  442. <?php if($house->InteriorType==1) { ?>Medium<?php }?>
  443. <?php if($house->InteriorType==2) { ?>Big<?php }?></b></td>
  444. <td><a type="button" data-toggle="modal" data-target="#modal<?php echo $house->ID ?>">Display on map</a>
  445. <div id="modal<?php echo $house->ID ?>" class="modal fade" role="dialog">
  446. <div class="modal-dialog">
  447. <div class="modal-content">
  448. <div class="modal-header">
  449. <button type="button" class="close" data-dismiss="modal">&times;</button>
  450. <h4 class="modal-title">House <?php echo $house->ID ?></h4>
  451. </div>
  452. <div class="modal-body">
  453. <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">
  454. </div>
  455. <div class="modal-footer">
  456. <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
  457. </div>
  458. </div>
  459. </div>
  460. </div></td>
  461. </tr>
  462. </tbody>
  463. </table>
  464. </div>
  465. </div>
  466. <?php }}?>
  467. </small></span></center>
  468. </div>
  469. <div class="">
  470. <div class="info-box">
  471. <div class = "">
  472. <?php
  473.  
  474. if($data->Bizz == 255) {
  475.  
  476. if(!isset($_SESSION['user']))
  477.  
  478. echo '<b>This user doesn\'t have a business.</b>';
  479.  
  480. else if(isset($_SESSION['user']) && ($_SESSION['user'] === $user))
  481.  
  482. echo '<b>You don\'t have a business.</b>';
  483.  
  484. else
  485.  
  486. echo '<b>This user doesn\'t have a business.</b>';
  487.  
  488. } else {
  489.  
  490. $s = Config::$g_con->prepare('SELECT * FROM `bizz` WHERE `Owner` = ?');
  491.  
  492. $s->execute(array($data->name));
  493.  
  494. while($bizz = $s->fetch(PDO::FETCH_OBJ))
  495.  
  496. { ?>
  497.  
  498. <b><div class="box box-primary">
  499. <div class="box-header">
  500. <h3 class="box-title">
  501. Business
  502. </h3>
  503. </div>
  504. <div class="box-body table-responsive">
  505. <table class="table table-condensed table-hover">
  506. <thead>
  507. <tr>
  508. <td>#ID</td>
  509. <td>Fee</td>
  510. <td>Price</td>
  511. <td>Options</td>
  512. </tr>
  513. </thead>
  514. <tbody>
  515. <tr>
  516. <td><b><?php echo $bizz->ID ?></b></td>
  517. <td><b>$<?php echo number_format($bizz->EntranceCost,0,'.','.') ?></b></td>
  518. <td><b><?php echo $bizz->BuyPrice ?></b></td>
  519. <td><a type="button" data-toggle="modal" data-target="#modalb<?php echo $bizz->ID ?>">Display on map</a>
  520. <div id="modalb<?php echo $bizz->ID ?>" class="modal fade" role="dialog">
  521. <div class="modal-dialog">
  522. <div class="modal-content">
  523. <div class="modal-header">
  524. <button type="button" class="close" data-dismiss="modal">&times;</button>
  525. <h4 class="modal-title">House <?php echo $bizz->ID ?></h4>
  526. </div>
  527. <div class="modal-body">
  528. <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">
  529. </div>
  530. <div class="modal-footer">
  531. <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
  532. </div>
  533. </div>
  534. </div>
  535. </div></td>
  536. </tr>
  537. </tbody>
  538. </table>
  539. </div>
  540. <center></center>
  541. </div></b>
  542. <?php }
  543.  
  544. }
  545.  
  546. ?>
  547. </div>
  548. </div>
  549. </div>
  550. </div>
  551. </div>
  552. <div class="tab-pane" id="vehicles">
  553. <div class="box-body table-responsive no-padding">
  554. <table class="table table-striped">
  555. <tbody>
  556. <?php
  557.  
  558. $q = Config::$g_con->prepare('SELECT * FROM `cars` WHERE `Owner` = ?');
  559.  
  560. $q->execute(array($data->name));
  561.  
  562. if(!$q->rowCount()) {
  563.  
  564. if(!isset($_SESSION['user']))
  565.  
  566. echo '<p>This user has no vehicles.</p>';
  567.  
  568. else if(isset($_SESSION['user']) && ($_SESSION['user'] === $user))
  569.  
  570. echo '<p>You have no vehicles.</p>';
  571.  
  572. else
  573.  
  574. echo '<p>No personal vehicles owned.</p>';
  575.  
  576. } else {
  577.  
  578. echo '
  579.  
  580. <table class="table table-striped">
  581.  
  582. <thead>
  583.  
  584. <tr>
  585.  
  586. <th>Image</th>
  587.  
  588. <th class="hidden-480">Vehicle Name</th>
  589.  
  590. <th class="hidden-100">Info</th>
  591.  
  592. <th class="center">GPS</th>
  593.  
  594. </tr>
  595.  
  596. </thead>
  597.  
  598. <tbody>';
  599.  
  600. $s = Config::$g_con->prepare('SELECT * FROM `cars` WHERE `Owner` = ?');
  601.  
  602. $s->execute(array($data->name));
  603.  
  604. while($car = $s->fetch(PDO::FETCH_OBJ))
  605. { ?>
  606. <?php if(Config::$_VIPCARS == 0) { ?>
  607. <tr class>
  608. <td class="center">
  609. <img src="<?php echo Config::$_PAGE_URL ?>assets/images/vehicles/Vehicle_<?php echo $car->Model ?>.jpg" alt="490" style="height: 65px"/>
  610. </td>
  611. <td>
  612. <?php echo Config::$namevehicles[$car->Model]; ?>
  613. </td>
  614. <td>
  615. Odometter: <b><?php echo number_format($car->KM,0,'.','.') ?> km</b><br>
  616. 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>
  617. Age: <b><?php echo $car->days; ?> days</b><br>
  618. Insurance Price: <b><?php echo $car->Inscarprice; ?> $</b><br>
  619. </td>
  620. <td>
  621. <a type="button" data-toggle="modal" data-target="#modalv<?php echo $car->ID ?>">display on map</a>
  622. <div id="modalv<?php echo $car->ID ?>" class="modal fade" role="dialog">
  623. <div class="modal-dialog">
  624. <div class="modal-content">
  625. <div class="modal-header">
  626. <button type="button" class="close" data-dismiss="modal">&times;</button>
  627. <h4 class="modal-title">Vehicle <?php echo $car->ID ?></h4>
  628. </div>
  629. <div class="modal-body">
  630. <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">
  631. </div>
  632. <div class="modal-footer">
  633. <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
  634. </div>
  635. </div>
  636. </div>
  637. </div>
  638. </td>
  639. </tr>
  640. <?php } else { ?>
  641. <?php if($car->VIP >= 1) { ?>
  642. <tr class="danger">
  643. <?php } else { ?>
  644. <tr>
  645. <?php } ?>
  646. <td class="center">
  647. <img src="<?php echo Config::$_PAGE_URL ?>assets/images/vehicles/Vehicle_<?php echo $car->Model ?>.jpg" alt="490" style="height: 65px"/>
  648. </td>
  649. <td>
  650. <?php echo Config::$namevehicles[$car->Model]; ?>
  651. <?php if($car->VIP >=1) { ?>
  652. <p>
  653. <br>
  654. <b class="text-warning">VIP</b>
  655. <br>
  656. <?php if(!is_null($car->VipText)) { ?>
  657. Text:
  658. <?php echo $car->VipText;?>
  659. <?php } } ?>
  660. </p>
  661. </td>
  662. <td>
  663. Odometter: <b><?php echo number_format($car->KM,0,'.','.') ?> km</b><br>
  664. 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>
  665. Age: <b><b><?php
  666. $then = gmdate("Y-m-d", $car->BuyTime);
  667.  
  668. $then = strtotime($then);
  669.  
  670. $now = time();
  671.  
  672. $difference = $now - $then;
  673.  
  674. $days = floor($difference / (60*60*24) );
  675.  
  676. echo $days;
  677. ?> days</b><br>
  678. Insurance Price: <b><?php echo $car->Inscarprice; ?> $</b><br>
  679. </td>
  680. <td>
  681. <a type="button" data-toggle="modal" data-target="#modalv<?php echo $car->ID ?>">display on map</a>
  682. <div id="modalv<?php echo $car->ID ?>" class="modal fade" role="dialog">
  683. <div class="modal-dialog">
  684. <div class="modal-content">
  685. <div class="modal-header">
  686. <button type="button" class="close" data-dismiss="modal">&times;</button>
  687. <h4 class="modal-title">Vehicle <?php echo $car->ID ?></h4>
  688. </div>
  689. <div class="modal-body">
  690. <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">
  691. </div>
  692. <div class="modal-footer">
  693. <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
  694. </div>
  695. </div>
  696. </div>
  697. </div><br>
  698. </td>
  699. </tr>
  700. <?php } ?>
  701. <?php }
  702. echo '
  703. </tbody>
  704. </table>';
  705. } ?>
  706. </tbody>
  707. </table>
  708. </div>
  709. </div>
  710.  
  711.  
  712. <div class="tab-pane" id="admintools">
  713. <div class="box-body table-responsive no-padding">
  714. <table class="table table-striped">
  715. <tbody>
  716. <ul>
  717. <div class="box box-primary">
  718. <div class="box-header">
  719. <h3 class="box-title">
  720. Actions
  721. </h3>
  722. </div>
  723. <form method="POST" action="" disabled>
  724. <div class="box-body table-responsive">
  725. <div class="col-sm-5"> Reason: <br/>
  726. <input name="reason" type="text" class="col-xs-10 col-sm-10" />
  727. </div>
  728. <div class="col-sm-5"> Time: <br/>
  729. <input name="duration" type="text" class="col-xs-10 col-sm-10" />
  730. </div>
  731. <div class="col-sm-10"><br />
  732. Time 0 pentru permanent<br />
  733. Tip:<br>
  734. <select name="banip" class="col-xs-10 col-sm-10">
  735. <option value="0">Cont</option>
  736. <option value="1">IP</option>
  737. </select>
  738. </div>
  739. <div class="col-sm-10"><br />
  740. <input type="submit" name="warn" class="btn btn-small btn-purple" value="warn"/>
  741. <input type="submit" name="ban" class="btn btn-small btn-danger" value="ban"/>
  742. <input type="submit" name="mute" class="btn btn-small btn-grey" value="mute"/>
  743. <input type="submit" name="jail" class="btn btn-small btn-pink" value="jail"/>
  744. </div>
  745. </div>
  746. </form>
  747. <li><a href="<?php echo Config::$_PAGE_URL;?>playerlogs/<?php echo Config::$_url[1];?>">View player logs</a><br>
  748. <li><a href="<?php echo Config::$_PAGE_URL;?>kicklogs/<?php echo Config::$_url[1];?>">View kicks log</a>
  749. <li><a href="<?php echo Config::$_PAGE_URL;?>chatlog/<?php echo Config::$_url[1];?>">View chat log</a>
  750. <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>
  751. <li><a href="<?php echo Config::$_PAGE_URL;?>kick/<?php echo Config::$_url[1];?>">kick</a>
  752. </div>
  753. </ul>
  754. </tbody>
  755. </table>
  756. </div>
  757. </div>
  758.  
  759. <div class="tab-pane" id="ppunish">
  760. <div class="box box-primary">
  761. <div class="box-header">
  762. <h3 class="box-title">
  763. Punish logs
  764. </h3>
  765. </div>
  766. <div class="box-body table-responsive">
  767. <table class="table table-condensed table-hover">
  768. <thead>
  769. <tr>
  770. <td>ID SQL</td>
  771.  
  772. <td>Action</td>
  773.  
  774. <td>Admin</td>
  775.  
  776. <td>Reason</td>
  777.  
  778. <td>Time</td>
  779. </tr>
  780. </thead>
  781. <tbody>
  782. <tr>
  783. <?php
  784.  
  785. $q = Config::$g_con->prepare('SELECT * FROM `punishlogs` WHERE `playername` = ? ORDER BY `id` DESC');
  786.  
  787. $q->execute(array($data->name));
  788.  
  789. while($row = $q->fetch(PDO::FETCH_OBJ)) {
  790.  
  791. echo "<tr>
  792.  
  793. <td>{$row->id}</td>";?>
  794. <td>
  795. <?php if($row->actionid==2) { ?> ban <?php } ?>
  796. <?php if($row->actionid==1) { ?> permanent ban <?php } ?>
  797. <?php if($row->actionid==6) { ?> jail <?php } ?>
  798. <?php if($row->actionid==5) { ?> warn <?php } ?>
  799. <?php if($row->actionid==7) { ?> mute <?php } ?>
  800. <?php if($row->actionid==8) { ?> relase jail <?php } ?>
  801. <?php if($row->actionid==3) { ?> permanent ban IP <?php } ?>
  802. <?php if($row->actionid==4) { ?> ban IP <?php } ?>
  803. </td>
  804. <?php echo"
  805.  
  806. <td><a href='".Config::$_PAGE_URL.'profile/'.$row->givername."'>{$row->givername}</a></td>
  807.  
  808. <td>{$row->reason}</td>
  809.  
  810. <td>{$row->time}</td>
  811.  
  812. <td>";
  813.  
  814.  
  815. } ?>
  816. </tr>
  817. </tbody>
  818. </table>
  819. </div>
  820. <center></center>
  821. </div>
  822. </div>
  823.  
  824. <div class="tab-pane" id="piplogs">
  825. <div class="box box-primary">
  826. <div class="box-header">
  827. <h3 class="box-title">
  828. IP logs
  829. </h3>
  830. </div>
  831. <div class="box-body table-responsive">
  832. <table class="table table-condensed table-hover">
  833. <thead>
  834. <tr>
  835. <td>ID Sesiune</td>
  836.  
  837. <td>IP</td>
  838.  
  839. <td>Time</td>
  840. </tr>
  841. </thead>
  842. <tbody>
  843. <?php
  844.  
  845. $q = Config::$g_con->prepare('SELECT * FROM `playerconnections` WHERE `playerid` = ? ORDER BY `id` DESC LIMIT 20');
  846.  
  847. $q->execute(array($data->id));
  848.  
  849. while($row = $q->fetch(PDO::FETCH_OBJ)) {
  850.  
  851. echo "<tr>
  852.  
  853. <td>{$row->id}</td>
  854.  
  855. <td>{$row->ip}</td>
  856.  
  857. <td>{$row->time2}</td>
  858.  
  859. <td>";
  860.  
  861.  
  862. } ?>
  863. </tbody>
  864. </table>
  865. </div>
  866. <center></center>
  867. </div>
  868. </div>
  869. </div>
  870. </div>
  871. </div>
  872. </div>
  873.  
  874. </section>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement