Example #1
0
<?php

setlocale(LC_CTYPE, 'fr_FR.UTF-8');
mb_internal_encoding('UTF-8');
session_start();
include_once 'api/config.php';
include_once 'api/dev.php';
include_once 'api/fonctions.php';
include_once 'api/app.php';
$dev = new dev($mysql_hostname, $mysql_username, $mysql_password, $mysql_database);
$json = new jsonapi($json_hostname, $json_port, $json_username, $json_password, $json_salt);
$verbinding = @fsockopen($dev->getDvar('game_ip'), $dev->getDvar('game_port'), $errno, $errstr, 1);
?>
<!DOCTYPE html>
<html>
  <head>
    <title>LunarLemons - Serveur Minecraft</title>
    <meta charset="utf-8">
    <meta name="language" content="fr">
    <meta name="keywords" content="Minecraft;server;serveur;1.7.10;mods;moddé;forge;modding;forum;shop;store;items;lunarlemons;mc">
    <link rel="stylesheet" href="css/style.css" />
  </head>
  <body>
    <div id="background"></div>
    <div id="header">
      <div id="logo_title">
        <img id="logo" src="./ressources/logo.png" />
        <div id="title_desc">
          <div id="title">LUNARLEMONS</div>
          <div id="desc">Serveur minecraft moddé</div>
        </div>
Example #2
0
<?php

setlocale(LC_CTYPE, 'fr_FR.UTF-8');
mb_internal_encoding('UTF-8');
session_start();
include_once '../api/config.php';
include_once '../api/dev.php';
include_once '../api/fonctions.php';
include_once '../api/app.php';
$dev = new dev($mysql_hostname, $mysql_username, $mysql_password, $mysql_database);
$json = new jsonapi($json_hostname, $json_port, $json_username, $json_password, $json_salt);
$verbinding = @fsockopen($dev->getDvar('game_ip'), $dev->getDvar('game_port'), $errno, $errstr, 1);
if (isset($_GET['id']) && is_numeric($_GET['id'])) {
} else {
    die('Internal Error');
}
if (isset($_SESSION['user'])) {
    if ($dev->isConnected($_SESSION['user']['username'], $_SESSION['user']['password'], $_SESSION['user']['session_id'])) {
        if ($verbinding) {
            $db = new PDO('mysql:host=' . $mysql_hostname . ';dbname=' . $mysql_database, $mysql_username, $mysql_password);
            $sql_req = "SELECT * FROM `web_shop` WHERE `id`=" . $_GET['id'] . ";";
            $req = $db->prepare($sql_req);
            $req->execute();
            $req->setFetchMode(PDO::FETCH_ASSOC);
            if ($req->rowCount() > 0) {
                $row = $req->fetch();
                if ($row['price'] <= $dev->getAccountInfo($dev->getId($_SESSION['user']['username']))['balance']) {
                    if ($json->call('players.name', array($_SESSION['user']['username']))[0]['success']['ip'] != 'offline') {
                        $command = $row['command'];
                        $command = str_replace('[playername]', $_SESSION['user']['username'], $command);
                        $json->call('server.run_command', array($command));
Example #3
0
<?php

setlocale(LC_CTYPE, 'fr_FR.UTF-8');
mb_internal_encoding('UTF-8');
include_once '../../api/config.php';
include_once '../../api/dev.php';
include_once '../../api/fonctions.php';
$dev = new dev($mysql_hostname, $mysql_username, $mysql_password, $mysql_database);
$json = new jsonapi($json_hostname, $json_port, $json_username, $json_password, $json_salt);
$source = $_GET['source'];
$uuid = $source == 'game' ? $dev->getId($_GET['uuid']) : $_GET['uuid'];
$db = new PDO('mysql:host=' . $mysql_hostname . ';dbname=' . $mysql_database, $mysql_username, $mysql_password);
$sql_req = "SELECT * FROM `web_friends` WHERE `uuid1`='" . $uuid . "' ORDER BY `status`;";
$req = $db->prepare($sql_req);
$req->execute();
$req->setFetchMode(PDO::FETCH_ASSOC);
//var_dump($req->errorInfo());
$friends = array();
$asked = array();
$array_default = array();
if ($req->rowCount() > 0) {
    while ($row = $req->fetch()) {
        array_push($array_default, $row);
        if ($row['status'] == 2) {
            array_push($asked, $row);
        } else {
            array_push($friends, $row);
        }
    }
}
switch ($source) {