Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > Web Development
You last visited: Today at 03:47

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[WIP] Minecraftwebinterface by Evolutio

Discussion on [WIP] Minecraftwebinterface by Evolutio within the Web Development forum part of the Coders Den category.

Reply
 
Old   #1
 
elite*gold: 1
Join Date: May 2011
Posts: 203
Received Thanks: 50
[WIP] Minecraftwebinterface by Evolutio

Hey Leute, ich bin es nochmal.
Ich habe in dem letzten Monat ein Webinterface erstellt für einen Minecraftserver. Das Webinterface Unterstüzt folgendes:
> Passwörter werden in SHA256 gespeichert, da MD5 zu unsicher wird :/
> Item Shop (direkte Anbindung mit dem Server d.h. Items sind innerhalb einer Sekunde da nach bezahlung)
> Die bezahlung erfolgt über das IngameGeld z.B. iConomy
> Inventar anzeige des jeweiligen Spielers (nur wenn der Spieler selber eingeloggt ist)
> Profil mit Anzeige des Derzeitigen Skinnes (Kopfbereich wenn man es in der Config ändert, kann es auch der ganze Skin sein)
> Newsseite (falss News länger sind als X, wird ein Link angegeben (Weiterlesen) )
> News hinzufügen
> News löschen
> sehr komplexes und sehr multifunktionales Keysystem
> Pluginverwaltung

Screenshoots:
Nicht wundern, ich habe die jetzt einfach mal mit einer foreach eingefügt, damit man etwas sieht







Evolutio is offline  
Old 10/03/2012, 12:06   #2
 
NotEnoughForYou's Avatar
 
elite*gold: 0
Join Date: Jun 2010
Posts: 3,406
Received Thanks: 2,024
Sieht ganz gut aus, auch wenn das Design verbesserungswürdig ist. Gibt es eine Möglichkeit sich den Code mal anzusehen ?
NotEnoughForYou is offline  
Old 10/03/2012, 12:08   #3
 
elite*gold: 1
Join Date: May 2011
Posts: 203
Received Thanks: 50
Ich bin nicht so Designtechnisch begabt :P
den ganzen oder nur von bestimmten teilen?
Evolutio is offline  
Old 10/03/2012, 12:09   #4
 
NotEnoughForYou's Avatar
 
elite*gold: 0
Join Date: Jun 2010
Posts: 3,406
Received Thanks: 2,024
Ist dir überlassen, wie viel du Preis geben willst. Wollte nur einen kleinen Eindruck vom "Stil" bekommen.
NotEnoughForYou is offline  
Old 10/03/2012, 12:13   #5
 
elite*gold: 1
Join Date: May 2011
Posts: 203
Received Thanks: 50
Das ist alles Hardcode mit ein paar Funktionen :P

Alle $_GET['wasauchimmer'] habe ich mit mysql_real_escape_string gemacht.

Hier mal meine Pluginverwaltung, da ich immer "templates" habe und die kopiere, schaut jede Datei gleich aus bis auf in den div "content"

PHP Code:
<?php
session_name
("webinterface");
session_start();

include (
'config/config.php');

$verbindung mysql_connect("$db_server""$db_login"$db_pass")
or die(
"Verbindung zur Datenbank konnte nicht hergestellt werden");
mysql_select_db("webinterface") or die("Keine Verbindung zur Datenbank");

if ( @
$_SESSION['webinterface']['login'] ) { 
    
$result mysql_query("SELECT * FROM `user` WHERE username = '".$_SESSION['webinterface']['login']."';");
    
$daten mysql_fetch_array($result);

    
$userID mysql_real_escape_string($daten['id']);
    
$username =  mysql_real_escape_string($daten['username']);
    
$avatar mysql_real_escape_string($daten['avatar']);
    
$email mysql_real_escape_string($daten['email']);
    
$rights =  mysql_real_escape_string($daten['rights']);
    
$rang mysql_real_escape_string($daten['rang']);
    
$game_rang mysql_real_escape_string($daten['game_rang']);
    
$money mysql_real_escape_string($daten['money']);
}

if(isset(
$_POST['upload'])){

    
$file_name basename($_FILES['file']['name']);

    if (empty(
$_POST["file"])) $msg["error"][] = "Bitte eine Datei auswählen!";
    if (
move_uploaded_file(@$_FILES['file']['tmp_name'], $plugin_dir.$file_name)){
        echo 
'<meta http-equiv="refresh" content=0"; url="plugins.php" />';
   } 
}

?>
<?php 
if(@$username) { ?>
<!DOCTYPE html>
<!--[if lt IE 7]>      <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]>         <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]>         <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
    <head>
<?php include 'includes/head.php'?>
    </head>
    <body>
        <!--[if lt IE 7]>
            <p class="chromeframe">You are using an outdated browser. <a href="http://browsehappy.com/">Upgrade your browser today</a> or <a href="http://www.google.com/chromeframe/?redirect=true">install Google Chrome Frame</a> to better experience this site.</p>
        <![endif]-->

        <div id="navi">
            <?php include 'includes/navi.php'?>
        </div>

        <div id="page">
            <div id="sub_header">
                <?php include ('config/function.class.php'); if(@$username) { ?>
                    Willkommen zurück <span><?php echo $username?>!</span>
                    <span class="rang">Rang: <?php echo @user_group($rights); ?></span>
                    <span class="money">Geld: <?php echo $money?></span>
                <?php ?>
            </div>

            <?php include 'includes/nav_left.php'?>

            <div id="content">
                <div class="inner">
                    <form action="plugins.php" enctype="multipart/form-data" method="post">
                        <input type="file" name="file" />
                        <input type="submit" name="upload" value="Plugin hochladen" />
                    </form>
                </div>
            </div>

            <div id="content">
                <div class="inner">
                    <?php if($rights 0) { ?>
                        Zugriff Verweigert
                    <?php } else {
                        echo 
'<table><thead><tr><th>Aktivierte Plugins in '.$plugin_dir.'</th></tr></thead></table><br />';
                    }

                    if ( isset(
$_POST['submit']) )
                    {
                        if(@
$_POST['delete'] > 1) {
                            foreach(@
$_POST['delete'] as $f => $v) { 
                                
unlink($plugin_dir.$f); 
                                echo 
'Das Plugin '.$f.' wurde gelöscht<br />';
                            }
                        }
                        if(@
$_POST['deactivate'] > 1) {
                            foreach(@
$_POST['deactivate'] as $f => $v) { 
                                
rename($plugin_dir.$f$deactivatet_plugins.$f); 
                                echo 
'Das Plugin '.$f.' wurde deaktiviert<br />';
                            }
                        }
                        echo 
'<meta http-equiv="refresh" content="3" />';
                    }

                    
$tb "";
                    
$i 0;
                    
$tb .= '<form method="post">';
                    
$tb .= '<center><table border="1" style="border-collapse: collapse;" width="500">'
                    
$tb .= '<thead><tr><th width="200">Plugin</th><th width="200">Deaktivieren</th><th width="200">Löschen</th></tr></thead>';
                    if (
$handle opendir($plugin_dir)) {
                        while (
false !== ($file readdir($handle))) {
                            if (
$file != "." && $file != "..") {
                                
$i ++;
                                
$tb .= '<tr><td><span>'.$file.'</span></td><td><input type="checkbox" name="deactivate['.$file.']" /> Ja</td><td><input type="checkbox" name="delete['.$file.']" /> Ja</td></tr>';
                            }
                        }
                    }
                    
$tb .= '</table>
                    <div class="newsdel"><input style="width: 98%;" type="submit" id="user-input" name="submit" value="Plugins löschen/deaktivieren" /></div></p>
                    </form></center>'
;
                    if ( !isset(
$_POST['submit']) )
                    {
                        if ( @
$i >= ) { echo $tb; }
                        else { echo 
"<table><thead><tr><th><center>Es sind keine Plugins vorhanden!</center></th></tr></thead></table>"; }
                    }
                    
?>
                </div>
            </div>

            <div id="content">
                <div class="inner">
                    <?php if($rights 0) { ?>
                        Zugriff Verweigert
                    <?php } else {
                        echo 
'<table><thead><tr><th>Deaktivierte Plugins in '.$deactivatet_plugins.'</th></tr></thead></table><br />';
                    }

                    if ( isset(
$_POST['submits']) )
                    {
                        if(@
$_POST['delete'] > 1) {
                            foreach(@
$_POST['delete'] as $f => $v) { 
                                
unlink($deactivatet_plugins.$f); 
                                echo 
'Das Plugin '.$f.' wurde gelöscht<br />';
                            }
                        }

                        if(@
$_POST['activate'] > 1) {
                            foreach(@
$_POST['activate'] as $f => $v) { 
                                
rename($deactivatet_plugins.$f$plugin_dir.$f); 
                                echo 
'Das Plugin '.$f.' wurde aktiviert<br />';
                            }
                        }
                        echo 
'<meta http-equiv="refresh" content="3" />';
                    }

                    
$tb "";
                    
$i 0;
                    
$tb .= '<form method="post">';
                    
$tb .= '<center><table border="1" style="border-collapse: collapse;" width="500">'
                    
$tb .= '<thead><tr><th width="200">Plugin</th><th width="200">Aktivieren</th><th width="200">Löschen</th></tr></thead>';
                    if (
$handle opendir($deactivatet_plugins)) {
                        while (
false !== ($file readdir($handle))) {
                            if (
$file != "." && $file != "..") {
                                
$i ++;
                                
$tb .= '<tr><td><span>'.$file.'</span></td><td><input type="checkbox" name="activate['.$file.']" /> Ja</td><td><input type="checkbox" name="delete['.$file.']" /> Ja</td></tr>';
                            }
                        }
                    }
                    
$tb .= '</table>
                    <div class="newsdel"><input style="width: 98%;" type="submit" id="user-input" name="submits" value="Plugins löschen/aktivieren" /></div></p>
                    </form></center>'
;
                    if ( !isset(
$_POST['submit']) )
                    {
                        if ( @
$i >= ) { echo $tb; }
                        else { echo 
"<table><thead><tr><th><center>Es sind keine Plugins vorhanden!</center></th></tr></thead></table>"; }
                    }
                    
?>
                </div>
            </div>
        </div>
        <?php include 'includes/footer.php'?>
    </body>
</html>
<?php } else { echo 'Zugriff verweigert!'; echo '<meta http-equiv="refresh" content="1; URL=index.php" />'; } ?>
Evolutio is offline  
Old 10/03/2012, 12:22   #6
 
NotEnoughForYou's Avatar
 
elite*gold: 0
Join Date: Jun 2010
Posts: 3,406
Received Thanks: 2,024
In deinem Script sind ein paar Schönheitsfehler drin und ich finde es ein wenig unübersichtlich, aber ansonsten sieht das ganz okay aus. Ich würde mir aber an deiner Stelle für so ein "großes" Projekt OOP anschauen.
NotEnoughForYou is offline  
Old 10/03/2012, 12:30   #7
 
elite*gold: 1
Join Date: May 2011
Posts: 203
Received Thanks: 50
Die schönehitsfehler kommen später raus

OOP ist so ne Sache bei mir
Ich mache gerade ein Praktikum als Programmierer (960std) und lerne dort schon sehr viel.

In nächster zeit, werde ich mir aber OOP generu angucken
Evolutio is offline  
Reply


Similar Threads Similar Threads
[Release]MC-Webinterface lite by Evolutio
09/28/2013 - Minecraft Mods, Textures, Skins & Maps - 14 Replies
Hallo, Ich Release heute mal eine abgespackte Version von meinem MC-Webinterface. Features: Bans hinzufügen (ip + Spieler ban) Server.log einsehen Server starten Server stoppen
Dekaron Evolutio Char for sale
01/08/2012 - Dekaron Trading - 2 Replies
PM me for information 235 ak. bump
[Root] 24/7 Minecraftserver by Evolutio [Bukkit]
03/28/2011 - Minecraft Server Advertising - 4 Replies
Heyho, ich habe mir mal einen Minecraft Server erstellt, der auf einem root läuft. Root Daten: Hardware CPU: Intel(R) Core(TM) i5-2500 CPU @ 3.30GHz (4 Cores) RAM: 16033 MB Uplink: 1000 Mbit Was soll das für ein Server werden?



All times are GMT +1. The time now is 03:47.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.