Register for your free account! | Forgot your password?

Go Back   elitepvpers > Other Online Games > Browsergames
You last visited: Today at 10:03

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

Advertisement



Shakes & Fidget Server - Code & Anleitung

Discussion on Shakes & Fidget Server - Code & Anleitung within the Browsergames forum part of the Other Online Games category.

Closed Thread
 
Old 07/04/2014, 14:01   #46
 
elite*gold: 0
Join Date: Jul 2011
Posts: 88
Received Thanks: 18
this is char ű not -- or \ '
Heroic9614 is offline  
Old 07/06/2014, 12:25   #47
 
elite*gold: 3
Join Date: Dec 2009
Posts: 172
Received Thanks: 37
Wie kommt man ins Admin Menü ?
Palego. is offline  
Old 07/06/2014, 12:30   #48
 
elite*gold: 0
Join Date: Jul 2011
Posts: 88
Received Thanks: 18
Server-Master


Heroic9614 is offline  
Old 07/06/2014, 12:34   #49
 
elite*gold: 3
Join Date: Dec 2009
Posts: 172
Received Thanks: 37
Danke für deine Hilfe

Die Seite ist momentan aufgrund von Wartungsarbeiten nicht verfügbar.

Dies steht da obwohl eig alles läuft xD
Palego. is offline  
Old 07/06/2014, 12:53   #50
 
UND3RW0RLD's Avatar
 
elite*gold: 1
Join Date: Jun 2011
Posts: 1,464
Received Thanks: 1,065
Dieser Code erzeugt deine Ausgabe
PHP Code:
    if (!$GLOBALS["SITE_ONLINE"])
    {
        die(
"Die Seite ist momentan aufgrund von Wartungsarbeiten nicht verfügbar.<br>");
    } 
-> root/adminui/backend/config.php
PHP Code:
    // Power-Switch
    
$GLOBALS["SITE_ONLINE"] = TRUE
Warum schreibst du mir eigentlich ERST eine PM bevor du den Thread bedienst.. -.- Ich hasse sowas..
UND3RW0RLD is offline  
Old 07/06/2014, 13:12   #51
 
elite*gold: 0
Join Date: Jul 2012
Posts: 44
Received Thanks: 3
Hi.. i have problem with black screen..

my vps:
Debian 7.0 x86_64
8x CPU
8gb ram

and im using Lighttpd .. but it is better then Apache2

I did everything according to the instructions
eskocze is offline  
Old 07/06/2014, 13:22   #52
 
UND3RW0RLD's Avatar
 
elite*gold: 1
Join Date: Jun 2011
Posts: 1,464
Received Thanks: 1,065
obviously a problem with lighttpd. ^^

sry but i didnt even tried it, so i can't help. the requirements say: apache2 ^^

Quote:
Originally Posted by ǝnd1ǝss-ɯonǝʎ View Post
Minimum Requirements:
  • Apache2, PHP5, MySQL
  • VPS
  • 4 GB of RAM, dual-core processor ~ 2 GHz
  • A resource package
  • PHP / SQL knowledge

Recommended Requirements:
  • Apache2, PHP5, tuned MySQL server which acts only on MyISAM
  • Debian 7.5 or Gentoo
  • Dedicated server (root or managed)
  • 16 GB RAM, quad core processor ~ 3 GHz
  • PHP / SQL / JS / AJAX knowledge
  • A resource package
UND3RW0RLD is offline  
Old 07/06/2014, 14:19   #53
 
elite*gold: 3
Join Date: Dec 2009
Posts: 172
Received Thanks: 37
Danke für die Hilfe

noch eine frage muss ich leider stellen wo änder ich den Forum link so das es auf ein anderes Forum geroutet wird ?
Palego. is offline  
Old 07/06/2014, 14:24   #54
 
UND3RW0RLD's Avatar
 
elite*gold: 1
Join Date: Jun 2011
Posts: 1,464
Received Thanks: 1,065
Alter!`? Fahr die Kiste bloß wieder runter..
UND3RW0RLD is offline  
Old 07/06/2014, 15:40   #55
 
elite*gold: 3
Join Date: Dec 2009
Posts: 172
Received Thanks: 37
Könntest du mir vll trotzdem bitte die antwort geben?
Palego. is offline  
Old 07/06/2014, 16:00   #56
 
UND3RW0RLD's Avatar
 
elite*gold: 1
Join Date: Jun 2011
Posts: 1,464
Received Thanks: 1,065
client_cfg.php

PHP Code:
1    de
2    http
://img.playa-games.com/res/sfgame/
3    http://img.playa-games.com/res/sfgame/
7    domain.com
8    http
://domain.com/
9    0
10    http
://www.elitepvpers.com    
11    http://domain.com/support.php
12    http://www.gamepsf.de/
13    http://domain.com/rules.html
14    http://domain.com/shop.php
17    3
18    domain
21    3
23    1
25    http
://domain.com/req.php?req=%1&random=%2
29    support@domain.com
30    http
://domain.com/papaya44.swf
31    http://domain.com/papaya_cfg.php
32    1
34    2
35    http
://domain.com/spenden.php
36    gamestaff@domain.com
42    1
43    1337
48    http
://domain.com/res/sfgame_low/
46    de/ar/cs/da/en/es/fr/el/hu/it/ja/nl/pl/pt/pt-br/ru/sv/tr
47    german
/arabic/czech/danish/english/spanish/french/greek/hungarian/italian/japanese/dutch/polish/portuguese/brazilian portuguese/russian/swedish/turkish

26    166
;;http://domain.com/cid/cid.php?cid=%cid%&action=166&playerid=%playerid%&mushbought=%mushbought%&bid=<bid>&token=<token>&serverid=3&gameid=1
26    1;;http://domain.com/cid/cid.php?cid=%cid%&action=1&playerid=%playerid%&mushbought=%mushbought%&bid=<bid>&token=<token>&serverid=3&gameid=1
//26    188;;http://domain.com/cid/cid.php?cid=%cid%&action=188&playerid=%playerid%&mushbought=%mushbought%&bid=<bid>&token=<token>&serverid=3&gameid=1 
PHP Code:
12    http://www.gamepsf.de/ 
UND3RW0RLD is offline  
Thanks
1 User
Old 07/06/2014, 16:15   #57
 
elite*gold: 3
Join Date: Dec 2009
Posts: 172
Received Thanks: 37
Ach ich dummi xD total übersehen xD

Danke dir
Palego. is offline  
Old 07/06/2014, 18:06   #58
 
UND3RW0RLD's Avatar
 
elite*gold: 1
Join Date: Jun 2011
Posts: 1,464
Received Thanks: 1,065
Lightbulb Update

SQL-class (by Zero, Cerberus and me)

Features: FOR ACP AND EXTERNALS ONLY!!
  • high security and performance
  • Error-Handler
  • Function to output the last query
  • abort if error
  • query-compiler
  • query-counter
  • query in arrays
  • queries cannot called global anymore (protected)
  • lots more

includes/class_MySQL.php
PHP Code:
<?php
class MySQL
{
   
/**
     * gobale MySQL-Definition.
     *
     * @access protect
     * @var    string
     */
    
protected $mysql null;

   
/**
     * Server der MySQL-Datenbank.
     *
     * @access protect
     * @var    string
     */
    
protected $mysqlHost null;

   
/**
     * Port des MySQL-Servers.
     *
     * @access protect
     * @var    string
     */
    
protected $mysqlPort null;

   
/**
     * User-Name der MySQL-Datenbank.
     *
     * @access protect
     * @var    string
     */
    
protected $mysqlUser null;

   
/**
     * Passwort der MySQL-Datenbank.
     *
     * @access protect
     * @var    string
     */
    
protected $mysqlPassword null;

   
/**
     * Name der MySQL-Datenbank.
     *
     * @access protect
     * @var    string
     */
    
protected $mysqlDatabase null;

   
/**
     * Techniker-Mail-Adresse.
     *
     * @access protect
     * @var    string
     */
    
protected $mysqlTechMail null;

   
/**
     * MySQL-Verbindung.
     *
     * @access protect
     * @var    resource
     */
    
protected $connectionHandle null;

    
/**
    * Anzeigen und Stoppen bei SQL-Fehlern
    *
    * @access protect
    * @var      boolean
    */
    
protected $reporterror true;

   
/**
     * Zähler für die SQL-Abfragen.
     *
     * @access protect
     * @var    integer
     */
    
protected $sqlcounter 0;

   
/**
     * Anzahl der Zeilen innerhalb der Abfrage.
     *
     * @access protect
     * @var    integer
     */
    
protected $rowcount 0;

   
/**
     * Zeitpsanne der SQL-Abfragen.
     *
     * @access protect
     * @var    integer
     */
    
protected $dbtime 0;

   
/**
     * Gesamtzeit aller SQL-Abfragen.
     *
     * @access protect
     * @var    float
     */
    
protected $starttime 0;

   
/**
     * fertige SQL-Abfrage.
     *
     * @access private
     * @var    string
     */
   
private $sql_query '';

   
/**
     * Nachkomma-Stellen.
     *
     * @access private
     * @var    integer
     */
   
private $rounded 4;


   
/**
     * MySQL-Klasse erstellen
     *
     * @access    public
     * @return    boolean
     * @param      registry    Registry object
     */
    
public function __construct()
    {
        require_once(
'./config.php');

        if( 
is_array($config['Database']) )
        {
            
$this -> mysqlHost     $config['Database']['servername'];
            
$this -> mysqlPort     $config['Database']['port'];
            
$this -> mysqlUser     $config['Database']['username'];
            
$this -> mysqlPassword $config['Database']['password'];
            
$this -> mysqlDatabase $config['Database']['dbname'];
            
$this -> mysqlTechMail $config['Database']['technicalemail'];
        }
        else
        {
            
trigger_error("MySQL::Config fail to load Data"E_USER_ERROR);
        }

        
$this -> db_connect();

        if (!
$this -> connectionHandle)
        {
            
$this -> db_error('Keine Verbindung zur Datenbank möglich');

            
$this -> mysql FALSE;
        }

        if(!@
mysql_select_db($this -> mysqlDatabase,
                             
$this -> connectionHandle))
        {
            
$this -> db_error('Keine Verbindung zur Datenbank möglich');

            
$this -> mysql FALSE;
        }

        
$this -> starttime $this -> microtime_float();
    }

   
/**
     * MySQL-Verbindung herstellen
     *
     * @access    private
     */
    
private function db_connect()
    {
        
$link mysql_connect($this -> mysqlHost ':' $this -> mysqlPort,
                              
$this -> mysqlUser,
                              
$this -> mysqlPassword);

        
restore_error_handler();

        
$this -> connectionHandle $link;
    }


   
/**
     * MySQL-Klasse und MySQL-Verbindung löschen
     *
     * @access    public
     */
    
public function __destruct()
    {
        if (
$this -> connectionHandle)
        {
            if (!@
mysql_close($this -> connectionHandle))
            {
                
$this -> db_error('Datenbank kann nicht geschlossen werden!');
            }
        }
    }


   
/**
     * Klassenzeitmessung
     *
     * @access    private
     * @return    float
     */
    
private function microtime_float()
    {
        list(
$usec$sec) = explode(" "microtime());
        return (
floatval($usec) + floatval($sec));
    }

    
/**
      * Datenfilter für Eingabedaten
      *
      * @param    mixed
      *   $value    mixed   zu überprüfende Daten
      * @return    mixed      gefilterte und überprüfte Daten
      */
    
private function validate_value($value)
    {
        if ( 
is_null($value) )
        {
            return 
'NULL';
        }
        else if ( 
is_string($value) )
        {
            return 
"'" mysql_escape_string($value) . "'";
        }
        else if ( 
is_numeric($value) AND (floatval($value) == $value) )
        {
            return 
floatval($value);
        }
        else if ( 
is_bool($value) )
        {
            return 
$value 0;
        }
        else
        {
            return 
"'" mysql_escape_string($value) . "'";
        }
    }

   
/**
     * ergänzt die MySQL-Abfrage um die Condition
     *
     * @access        private
     * @param         mixed
     *  $condition      string   String-Condition zur Ergänzung
     *  $condition      array    Array mit Operator=>Condition als Daten
     * @return        null
     */
    
private function add_condition($condition NULL)
    {
        if( 
is_null($condition) )
        {
            return 
TRUE;
        }

        if( 
is_string($condition) )
        {
            
$cond_array = array('WHERE''ORDER');
            
$condition  trim($condition);

            if( 
$condition != '' )
            {
                
$first strtouppersubstr($condition05) );
                
$first trim($first);

                if( 
in_array($first$cond_arrayTRUE) )
                {
                    
$this -> sql_query .= ' ' $condition;
                }
                else
                {
                    
$this -> sql_query .= ' WHERE ' $condition;
                }
            }
        }
        elseif( 
is_array($condition) AND count($condition) )
        {
            
$new_cond '';

            foreach(
$condition AS $operator => $cond)
            {
                
$new_cond .= strtoupper($operator) . ' ' $cond ' ';
            }

            
$this -> sql_query .= ' WHERE ' trim($new_cond);
        }
    }


   
/**
     * MySQL-Abfrage aus übergebenem Datenarray erstellen
     *
     * @access    private
     * @param     mixed
     *  $type       string   Typ der Abfrage
     *  $array      array    Array mit Abfrage-Werten
     * @return    string     fertige SQL-Abfrage; bei Fehlern FALSE
     */
    
private function compile_sql($type ''$array NULL)
    {
        
$allow_action = array('INSERT''INSERT_SELECT''UPDATE''SELECT');

        
$type strtoupper($type);

        if ( 
$type == "" OR !is_array($array) OR !in_array($type$allow_action) )
        {
            return 
FALSE;
        }

        
$fields = array();
        
$values = array();

        if ( (
$type == 'INSERT') OR ($type == 'INSERT_SELECT') )
        {
            foreach (
$array AS $key => $val)
            {
                
$fields[] = $key;
                
$values[] = $this -> validate_value($val);
            }

            if (
$type == 'INSERT')
            {
                
$this -> sql_query ' (`' implode('`, `'$fields) . '`) VALUES (' implode(', '$values) . ')';
            }
            else
            {
                
$this -> sql_query ' (`' implode('`, `'$fields) . '`) SELECT ' implode(', '$values) . ' ';
            }
        }
        else if ( (
$type == 'UPDATE') OR ($type == 'SELECT') )
        {
            foreach (
$array AS $key => $val)
            {
                if (
$type == 'UPDATE')
                {
                    
$values[] = "`" $key "` = " $this -> validate_value($val);
                }
                else
                {
                    
$values[] = substr($this -> validate_value($val), 1strlen$this -> validate_value($val) )-);
                }
            }
//            $this -> sql_query = implode( ($type == 'SELECT') ? ', ' : ' AND ', $values );
            
$this -> sql_query implode', '$values );
        }
        else
        {
            return 
FALSE;
        }
    }


   
/**
     * normale MySQL-Abfrage ausführen
     *
     * @access    private
     * @param     string
     *  $sql        string   SQL-Abfrage
     * @return    resource oder bei Fehlern FALSE
     */
    
private function query()
    {
        
$time  $this -> microtime_float();

        if (
$result = @ mysql_query($this -> sql_query$this -> connectionHandle))
        {
            
$this -> dbtime     += $this -> microtime_float() - $time;
            
$this -> sqlcounter ++;
            
$this -> rowcount   ++;

            return 
$result;

            
mysql_free_result($result);
        }
        else
        {
            
$this -> db_error();

            
$this -> sql_query '';
        }
    }

   
/**
     * Anzahl von Datensätzen ermitteln
     *
     * @access    public
     * @param     string
     *  $table      string   Name der Tabelle
     *  $cond       string   Parameter für die Abfrage
     * @return    integer    Anzahl der Datensätze; bei Fehlern FALSE
     */
    
public function queryCount($table ''$cond NULL)
    {
        if ( (
$table == '') )
        {
            return 
FALSE;
        }
        else
        {
            
$this -> sql_query 'SELECT COUNT(*) FROM ' $table;

            
$this -> add_condition($cond);

            if ( 
$result $this -> query() )
            {
                if( 
mysql_num_rows($result) )
                {
                    
$row mysql_fetch_array($result);

                    return 
$row[0];
                }
                else
                {
                    return 
FALSE;
                }
            }
        }
    }


   
/**
     * einzelne SELECT-MySQL-Abfrage ausführen und Array zurückliefern
     *
     * @access    public
     * @param     string
     *  $table      string   Name der Tabelle
     *  $array      array    Array mit Tabellen-Namen
     *  $cond       string   Parameter für die Abfrage
     * @return    array      SQL-Ergebniss; bei Fehlern FALSE
     */
    
public function queryObjectArray($table ''$array NULL$cond NULL)
    {
        if ( !
is_array($array) OR ($table == '') )
        {
            return 
FALSE;
        }
        else
        {
            
$this -> compile_sql('SELECT'$array);

            
$this -> sql_query 'SELECT ' $this -> sql_query ' FROM ' $table;

            
$this -> add_condition($cond);

            if ( 
$result $this -> query() )
            {
                if (
mysql_num_rows($result))
                {
                    while (
$row mysql_fetch_array($result))
                    {
                        
$result_array[] = $row;
                    }

                    
$this -> rowcount += count($result_array);

                    return 
$result_array;
                }
                else
                {
                    return 
FALSE;
                }
            }
        }
    }


   
/**
     * einzelne SELECT-MySQL-Abfrage ausführen
     *
     * @access    public
     * @param     string
     *   $table     string    Name der Tabelle
     *   $value     string    Name des Feldes
     *   $cond      string    Parameter für die Abfrage
     * @return    string      SQL-Ergebniss; bei Fehlern FALSE
     */
    
public function querySingleItem($table ''$value ''$cond NULL)
    {
        if ( (
$value == '') OR ($table == '') )
        {
            return 
FALSE;
        }
        else
        {
            
$array = array();
            
$array[] = $value;

            
$this -> compile_sql('SELECT'$array);

            
$this -> sql_query 'SELECT ' $this -> sql_query ' FROM ' $table;

            
$this -> add_condition($cond);

            if ( (
strpos($this -> sql_query'LIMIT') == 0) AND (strpos($this -> sql_query'limit') == 0) )
            {
                
$this -> sql_query .= ' LIMIT 1';
            }

            if ( 
$result $this -> query() )
            {
                if( 
mysql_num_rows($result) )
                {
                    
$row mysql_fetch_array($result);

                    return 
$row[0];
                }
                else
                {
                    return 
FALSE;
                }
            }
        }
    }

   
/**
     * einzelne SELECT-MySQL-Abfrage ausführen
     *
     * @access    public
     * @param     string
     *  $table      string   Name der Tabelle
     *  $array      array    Array mit Zellen-Namen
     *  $cond       string   Parameter für die Abfrage
     * @return    mixed      Array oder bei Fehlern FALSE
     */
    
public function querySingleArray($table ''$array NULL$cond NULL)
    {
        if ( !
is_array($array) OR ($table == '') )
        {
            return 
FALSE;
        }
        else
        {
            if (
$array[0] == '*')
            {
                
$this -> sql_query '*';
            }
            else
            {
                
$this -> compile_sql('SELECT'$array);
            }

            
$this -> sql_query 'SELECT ' $this -> sql_query ' FROM ' $table;

            
$this -> add_condition($cond);

            if ( 
$result $this -> query() )
            {
                if( 
mysql_num_rows($result) )
                {
                    return 
mysql_fetch_array($result);
                }
                else
                {
                    return 
FALSE;
                }
            }
        }
    }

   
/**
     * Tabellen-Struktur abfragen
     *
     * @access    public
     * @param     string
     *  $table      string   Name der Tabelle
     * @return    mixed      Array oder bei Fehlern FALSE
     */
    
public function describe_Table($table '')
    {
        if ( 
trim($table) == '' )
        {
            return 
FALSE;
        }

        
$result_array = array();

        
$this -> sql_query 'SHOW FULL COLUMNS FROM ' $table;

        if ( 
$result $this -> query() )
        {
            if( 
mysql_num_rows($result) )
            {
                while (
$row mysql_fetch_array($result))
                {
                    
$result_array[] = $row;
                }

                
$this -> rowcount += count($result_array);

                return 
$result_array;
            }
            else
            {
                return 
FALSE;
            }
        }
    }


   
/**
     * einzelnes MySQL-Komando ausführen
     * INSERT, DELETE, etc.
     *
     * @access    public
     * @param     string
     *  $sql        string   SQL-Abfrage
     * @return    boolean
     */
    
public function execute($sql)
    {
        if ( 
trim($sql) == '' )
        {
            return 
FALSE;
        }
        else
        {
            
$this -> sql_query trim($sql);
        }

        if ( 
$this -> query() )
        {
            return 
TRUE;
        }
        else
        {
            return 
FALSE;
        }
    }


   
/**
     * Anzeige der ID des zuletzt eingefügten Datensatzes
     *
     * @access    public
     * @param     string
     *  $table      string   Name der Tabelle
     * @return    integer    bei Fehlern FALSE
     */
    
public function insertID($table "")
    {
        if ( 
trim($table) != "" )
        {
            
$this -> sql_query 'SELECT LAST_INSERT_ID() FROM ' $table;
            
$res $this -> query();

            return 
mysql_num_rows($res); // + 1;
        
}
        else
        {
            return 
FALSE;
        }
    }


   
/**
     * Anzeige der ID des letzten Datensatzes
     *
     * @access    public
     * @param     string
     *  $table      string   Name der Tabelle
     * @return    integer    bei Fehlern FALSE
     */
    
public function tableCount($table "")
    {
        if (
trim($table) != "")
        {
            
$this -> sql_query 'SELECT COUNT(*) FROM ' $table;
            
$res $this -> query();
            
$row mysql_fetch_array($res);

            return 
$row[0];
        }
        else
        {
            return 
FALSE;
        }
    }


   
/**
     * liefert die größte ID innerhalb der Tabelle
     *
     * @access    public
     * @param     string
     *  $field      string   Name des Abfragefeldes
     *  $table      string   Name des Tabelle
     * @return    integer    bei Fehlern FALSE
     */
    
public function maxID($field "id"$table "")
    {
        if ( (
trim($field) != "") AND  (trim($table) != "") )
        {
            
$this -> sql_query 'SELECT MAX(' $field ') FROM ' $table;
            
$res $this -> query();
            
$row mysql_fetch_array($res);

            return 
$row[0];
        }
        else
        {
            return 
FALSE;
        }
    }


   
/**
     * liefert die kleinste ID innerhalb der Tabelle
     *
     * @access    public
     * @param     string
     *  $field      string   Name des Abfragefeldes
     *  $table      string   Name des Tabelle
     * @return    integer    bei Fehlern -1
     */
    
public function minID($field "id"$table "")
    {
        if ( (
trim($field) != "") AND  (trim($table) != "") )
        {
            
$this -> sql_query 'SELECT MIN(' $field ') FROM ' $table;
            
$res $this -> query();
            
$row mysql_fetch_array($res);

            return 
$row[0];
        }
        else
        {
            return 
FALSE;
        }
    }


   
/**
     * SQL-Injection-Geschütztes einfügen einer Tabellenzeile
     *
     * @access    public
     * @param     string
     *  $array      array    Datenarray mit den Einfügedaten
     *  $table      string   Name der Tabelle
     * @return    boolean    bei Fehlern FALSE sonst ID des Datensatzes
     */
    
public function insertRow($array null$table "")
    {
        if ( 
is_array($array) AND trim($table) != '' AND count($array) > )
        {
            
$this -> compile_sql('INSERT'$array);

            
$this -> sql_query 'INSERT INTO ' $table ' ' $this -> sql_query;

            
$this -> query();

            return 
$this -> insertID($table);
        }
        else
        {
            return 
FALSE;
        }
    }


   
/**
     * SQL-Injection-Geschütztes updaten einer Tabellenzeile
     *
     * @access    public
     * @param     string
     *  $array      array    Datenarray mit den Einfügedaten
     *  $table      string   Name der Tabelle
     *  $condition  string   Zusätzliche Parameter zum udaten
     * @return    boolean    bei Fehlern FALSE
     */
    
public function updateRow($array null$table ""$condition NULL)
    {
        if ( 
is_array($array) AND trim($table) != '' AND count($array) > )
        {
            
$this -> compile_sql('UPDATE'$array);

            
$this -> sql_query 'UPDATE ' $table ' SET ' $this -> sql_query;

            
$this -> add_condition($condition);

            
$this -> query();

            return 
TRUE;
        }
        else
        {
            return 
FALSE;
        }
    }


   
/**
     * Anzeige der Laufzeitinformationen
     *
     * @access    public
     * @return    string
     */
    
public function showStatistics()
    {
        
$totalTime $this -> microtime_float() - $this -> starttime;

        return 
'<div style="width: 100%; text-align: center;">' $this -> rowcount ' Zeile(n) / ' $this -> sqlcounter ' Abfrage(n) - ' .
               
round$totalTime$this -> rounded ) . ' Sekunden (' round( ($totalTime $this -> dbtime), $this -> rounded ) .
               
' Sekunden PHP / ' round$this -> dbtime$this -> rounded ) . ' Sekunden SQL)</div>';
    }


   
/**
     * Anzeigen der letzten SQL-Abfrage in kompilierter Form
     *
     * @access    public
     */
    
public function get_mysql_query()
    {
        return 
$this -> sql_query;
    }


    
/**
      * Returns the text of the error message from previous database operation
      *
      * @return    string
      */
    
function error()
    {
        if (
$this -> connectionHandle === null)
        {
            
$this -> error '';
        }
        else
        {
            
$this -> error mysql_error($this -> connectionHandle);
        }
        return 
$this -> error;
    }

    
/**
      * Returns the numerical value of the error message from previous database operation
      *
      * @return    integer
      */
    
function errno()
    {
        if (
$this -> connectionHandle === null)
        {
            
$this -> errno 0;
        }
        else
        {
            
$this -> errno mysql_errno($this -> connectionHandle);
        }
        return 
$this -> errno;
    }

    
/**
      * Switches database error display ON
      */
    
function show_errors()
    {
        
$this -> reporterror true;
    }

    
/**
      * Switches database error display OFF
      */
    
function hide_errors()
    {
        
$this -> reporterror false;
    }

   
/**
     * Rücksetzen der Laufzeitinformationen
     *
     * @access    public
     */
    
public function resetStatistics()
    {
        
$this -> sqlcounter 0;
        
$this -> rowcount   0;
        
$this -> dbtime     0;
        
$this -> starttime  $this -> microtime_float();
    }


   
/**
     * Erzeugt eine komplette Error-Meldung
     *
     * @access    public
     */
    
public function db_error($errortext '')
    {
        if (
$this -> connectionHandle)
        {
            
$this -> error $this -> error($this -> connectionHandle);
            
$this -> errno $this -> errno($this -> connectionHandle);
        }

        if (
$errortext == '')
        {
            
$this -> sql_query "Fehlerhafte SQL:\r\n" trim($this -> sql_query) . ';';
            
$errortext =& $this -> sql_query;
        }

        
$technicalemail =& $this -> mysqlTechMail;
        
$mysqlversion   'Unknown';
        
$requestdate    date('l, d.m.Y @ H:i:s', ( defined(TIMENOW) ? TIMENOW time() ) );
        
$date           date('l, d.m.Y @ H:i:s');
        
$scriptpath     str_replace('&''&'$_SERVER['REQUEST_URI']);
        
$referer        $_SERVER['PHP_SELF'];
        
$ipaddress      $_SERVER['REMOTE_ADDR'];
        
$classname      get_class($this);

        if ( 
$this -> connectionHandle )
        {
            
$this -> hide_errors();
            list(
$mysqlversion) = @ mysql_fetch_array(@ mysql_query('SELECT VERSION() AS version'));
            
$this->show_errors();
        }

        eval(
'$message = "' str_replace('"''\"'file_get_contents('database_error_message.html')) . '";');

        
$message '<textarea rows="20" cols="100" wrap="off" id="message">' htmlspecialchars($message) . '</textarea>';

        eval(
'$message = "' str_replace('"''\"'file_get_contents('database_error_page.html')) . '";');

        die(
$message);
    }
}
?>
includes/config.php
PHP Code:
<?php
  $config
['Database']['dbtype']         = 'mysql';
  
$config['Database']['dbname']         = 'Datenbankname';
  
$config['Database']['servername']     = 'localhost';
  
$config['Database']['port']           = 3306;
  
$config['Database']['username']       = 'Datenbankuser';
  
$config['Database']['password']       = 'Datenbankpasswort';
  
$config['Database']['technicalemail'] = '';
?>
includes/database_error_message.html
HTML Code:
Datenbankfehler:

$errortext

MySQL-Fehler  : $this->error
Fehler-Nr.    : $this->errno
Fehler-Zeit   : $requestdate
Datum         : $date
Skript        : http://$_SERVER[HTTP_HOST]$scriptpath
Referrer      : $referer
IP-Adresse    : $ipaddress
Klassenname   : $classname
MySQL-Version : $mysqlversion
includes/database_error_page.html
HTML Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
    <title>Datenbankfehler</title>
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
    <meta name="ROBOTS" content="NOINDEX,NOFOLLOW,NOARCHIVE" />
    <link rel="stylesheet" type="text/css" href="../../css/error.css" />
</head>
<body>
<table cellpadding="3" cellspacing="5" id="container">
<tr>
	<td id="bodytitle" width="100%">Datenbankfehler</td>
</tr>
<tr>
	<td class="bodytext" colspan="2">Es trat ein Problem mit der Datenbank auf.</td>
</tr>
<tr>
	<td colspan="2"><hr /></td>
</tr>
<tr>
	<td class="bodytext" colspan="2">
		Versuchen Sie Folgendes:
		<ul>
			<li>Laden Sie die Seite über die <a href="#" onclick="window.location = window.location;">Aktualisieren</a> Schaltfläche in Ihrem Browser neu.</li>
			<li>&Ouml;ffnen Sie die <a href="/">$_SERVER[HTTP_HOST]</a> Homepage und versuchen Sie eine andere Seite zu öffnen.</li>
			<li>Klicken Sie auf <a href="javascript:history.back(1)">Zurück</a>, um einen anderen Link zu versuchen.</li>
		</ul>
	</td>
</tr>
<tr>
	<td class="bodytext" colspan="2">Der technische Administrator von $_SERVER[HTTP_HOST] wurde über den Fehler informiert. Falls das Problem jedoch weiterhin auftritt, können Sie ihn auch <a href="mailto:$technicalemail">kontaktieren</a>.</td>
</tr>
<tr>
	<td class="bodytext" colspan="2">&nbsp;<br />Wir entschuldigen uns für die Unannehmlichkeiten.</td>
</tr>
</table>

<p>$message</p>

</body>
</html>
css/error.css
Code:
body {
    margin           : auto;
    text-align       : center;
    background-color : #FF0000;
}

p {
    border            : solid 2px #808080;
    border-top-width  : 1px;
    border-left-width : 1px;
    border-top-color  : #C0C0C0;
    border-left-color : #C0C0C0;
    margin-left       : 100px;
    margin-right      : 100px;
    padding           : 10px;
    background-color  : #0000FF;
    color             : #FFFFFF;
    text-align        : left;
}
How to use it?

Multi-Dimensional-Array (everything)
PHP Code:
$db -> queryObjectArray('Tabelle', array('*'), 'ORDER BY id, name ASC'); 
Multi-Dimensional-Array (single columns)
PHP Code:
$db -> queryObjectArray('tabelle', array('spalte1','spalte2')); 
Simple Array (wildcard)
PHP Code:
$db -> querySingleArray('tabelle', array('*'), "WHERE id= " $id " LIMIT 1"); 
Simple Array (single columns)
PHP Code:
$db -> querySingleArray('tabelle', array('spalte1''spalte2'), "WHERE id= " $id " LIMIT 1"); 
Columncount
PHP Code:
$db -> queryCount('tabelle'"WHERE name = " $name); 
Last inserted id
PHP Code:
$$mySite -> db -> insertID("tabelle"); 
Execute (z.B. DELETE)
PHP Code:
$db -> execute('DELETE'); 
Update a row
PHP Code:
$db -> updateRow($data-array, "tabelle""id = " $id); 
last query
PHP Code:
echo $db -> get_mysql_query(); 

_____________________

UPDATE
Replace
PHP Code:
        if( is_string($condition) ) 
        { 
            
$cond_array = array('WHERE''ORDER'); 
with
PHP Code:
        if( is_string($condition) ) 
        { 
            
$cond_array = array('WHERE''ORDER''JOIN''LEFT''RIGHT'); 
UND3RW0RLD is offline  
Thanks
4 Users
Old 07/07/2014, 10:12   #59
 
elite*gold: 0
Join Date: Jul 2014
Posts: 3
Received Thanks: 1
Hallo,
erstmal super Arbeit. Mein absoluter Respect.
Ich wollte hier daheim einen lokalen Server für die Kinder machen.
Eind vorweg... ich habe einige wenige Kenntnisse in solchen Sachen. Habe die Anleitung soweit befolgt und das ganze auf einen lokalen Rechner kopiert, der mit xampp läuft.
Nach all dem Einstellen und Aufruf von "localhost" schaut auch soweit alles paletti aus. Jedoch nach Versuch einen neuen Acc zu erstellen, kommt die Meldung: "Die Verbindung zum Server ist unterbrochen. Möglicherweise besteht keine Verbindung..."
Wer könnte mir helfen, den lokalen Server zum laufen zu bringen, evtl. auch mit Team Viewer.
Vielen Dank

Edit:
ǝnd1ǝss-ɯonǝʎ hat mir nun per Team Viewer geholfen. Nun läuft anscheinend auch der Server, jedoch ist ein Login nicht möglich. Acc erstellen funktioniert (in Datenbank wird der Acc auch gespeichert).
Im Admin Menü werden die Accs ebenfalls angezeigt und ich kann diese auch bearbeiten.

Nun fehlt nur noch beim Login die Weiterleitung ins Game selber. Im Spezialshop kann ich komischerweise einkaufen. Offensichtlich bin ich eingeloggt, das Anmeldefenster geht aber nicht weg.

Noch zur Info. Ich hatte vor diesem Server einen ganz alten laufen, der lief auch. Jedoch waren die Fildes von 2011 und es gab keine Extras, so wie es bei diesem Server ist. Mein alter Server hatte nicht einmal Epics.
Wäre echt nett, wenn jemand weiss, was da los ist.

Ach ja, und vielen Dank ǝnd1ǝss-ɯonǝʎ
syrun is offline  
Old 07/07/2014, 14:20   #60
 
elite*gold: 0
Join Date: Jul 2014
Posts: 9
Received Thanks: 0


how to change this links?
petyanbi4 is offline  
Closed Thread

Tags
download, guide, privat server, proper version, shakes & fidget


Similar Threads Similar Threads
10€ Shakes and Fidget Code
10/14/2012 - Browsergames Trading - 0 Replies
Hi, verkaufe hier ne 10er PSC die nur für Shakes and Fidget benutzt werden kann. No permission Gruß
Shakes and Fidget Code
04/20/2012 - elite*gold Trading - 0 Replies
Huhu, Thread: hier der Thread Mfg
Shakes & Fidget Pilze Code
04/08/2012 - elite*gold Trading - 1 Replies
Hey kurz knapp Code für 10 Pilze, 26 e*Gold hier die Treasure! No permission
[S]Shakes und Fidget Code
11/23/2010 - elite*gold Trading - 7 Replies
Suche Shakes und Fidget Code für 150 Pilze. Natürlich unbenutzt! gogo :)
Shakes&Fidget Code 50e*gold
11/22/2010 - elite*gold Trading - 3 Replies
hier ist die Treasure: No permission



All times are GMT +1. The time now is 10:04.


Powered by vBulletin®
Copyright ©2000 - 2026, 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 ©2026 elitepvpers All Rights Reserved.