[PHP] Player List, Vote List, VIP List,...

Message
Autor
enalan
Příspěvky: 1552
Věk: 26
Registrován: 13 led 2013, 14:36
Reputation: 0

Re: [PHP] Server Status Table / Extended, MC Player List ...

#121 Příspěvekod enalan » 08 čer 2013, 17:34

aha, škoda, ale díky :D
Ušetři na nákupech v eshopech se společností Plná Peněženka.
Web, který tě přiučím novým věcem - http://neobycejny-svet.cz/
Aktuální kontakt na mě - tom.cana@seznam.cz

Uživatelský avatar
Mysteria
Příspěvky: 9122
Registrován: 26 pro 2009, 15:40
Reputation: 7
Bydliště: Česká republika
Kontaktovat uživatele:

Re: [PHP] Server Status Table / Extended, MC Player List ...

#122 Příspěvekod Mysteria » 08 čer 2013, 17:51

Čas se začít vzdělávat. :)

enalan
Příspěvky: 1552
Věk: 26
Registrován: 13 led 2013, 14:36
Reputation: 0

Re: [PHP] Server Status Table / Extended, MC Player List ...

#123 Příspěvekod enalan » 08 črc 2013, 07:20

Proč mi nejde seznam hlasujících ? Vše jsem vyplň, a na webu se mi ukáže:
"Parse error: syntax error, unexpected 'timeout' (T_STRING) in /home/users/epicgaming/epic-gaming.hys.cz/web/Pluginy/Hlasy/index.php on line 43"
http://epic-gaming.hys.cz/Pluginy/Hlasy/index.php
Ušetři na nákupech v eshopech se společností Plná Peněženka.
Web, který tě přiučím novým věcem - http://neobycejny-svet.cz/
Aktuální kontakt na mě - tom.cana@seznam.cz

Smexhy
Příspěvky: 5602
Věk: 25
Registrován: 31 říj 2012, 15:50
Reputation: 20
Bydliště: Slovensko
Kontaktovat uživatele:

Re: [PHP] Server Status Table / Extended, MC Player List ...

#124 Příspěvekod Smexhy » 08 črc 2013, 08:06

No enalan to je celý tvoj web...len neporiadok a zmätok :D

enalan
Příspěvky: 1552
Věk: 26
Registrován: 13 led 2013, 14:36
Reputation: 0

Re: [PHP] Server Status Table / Extended, MC Player List ...

#125 Příspěvekod enalan » 08 črc 2013, 08:37

Nemám stále odpoveď jen offtopic..
Ušetři na nákupech v eshopech se společností Plná Peněženka.
Web, který tě přiučím novým věcem - http://neobycejny-svet.cz/
Aktuální kontakt na mě - tom.cana@seznam.cz

Uživatelský avatar
Mysteria
Příspěvky: 9122
Registrován: 26 pro 2009, 15:40
Reputation: 7
Bydliště: Česká republika
Kontaktovat uživatele:

Re: [PHP] Server Status Table / Extended, MC Player List ...

#126 Příspěvekod Mysteria » 08 črc 2013, 09:35

Co třeba hodit co je na 43. řádku? :)

enalan
Příspěvky: 1552
Věk: 26
Registrován: 13 led 2013, 14:36
Reputation: 0

Re: [PHP] Server Status Table / Extended, MC Player List ...

#127 Příspěvekod enalan » 08 črc 2013, 09:48

Tady toto:

Kód: Vybrat vše

# database. This will prevent any 'timeout' or 'invalid settings'
Ušetři na nákupech v eshopech se společností Plná Peněženka.
Web, který tě přiučím novým věcem - http://neobycejny-svet.cz/
Aktuální kontakt na mě - tom.cana@seznam.cz

Uživatelský avatar
Mysteria
Příspěvky: 9122
Registrován: 26 pro 2009, 15:40
Reputation: 7
Bydliště: Česká republika
Kontaktovat uživatele:

Re: [PHP] Server Status Table / Extended, MC Player List ...

#128 Příspěvekod Mysteria » 08 črc 2013, 10:12

To je komentář, tam nemůže bejt chyba, dej sem celej ten soubor. :)

enalan
Příspěvky: 1552
Věk: 26
Registrován: 13 led 2013, 14:36
Reputation: 0

Re: [PHP] Server Status Table / Extended, MC Player List ...

#129 Příspěvekod enalan » 08 črc 2013, 15:26

Zde
Spoiler: zobrazit

Kód: Vybrat vše

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="cs">
   <head>
      <meta charset="UTF-8" />
      <meta name="author" content="Mysteria" />
      <meta name="description" content="" />
      <meta name="keywords" content="" />
      <title>Seznam hlasujících hráčů pro CzechCraft Server List</title>
      <style>
         #hlasy { font-family: verdana, Geneva, Tahoma, sans-serif; font-size: 0.8em; border-collapse: collapse; }
         #hlasy thead tr { background-color: #fff; }
         #hlasy thead tr th { padding: 0.5px 5px; border: 1px solid black; }
         #hlasy tbody tr.lichy { background-color: white; }
         #hlasy tbody tr.sudy { background-color: white; }
         #hlasy tbody tr td { padding: 0.5px 5px; border: 1px solid black; }
      </style>
   </head>
   <body>
   <!--
   # Název: Seznam hlasujících hráčů pro CzechCraft Server List
   # Autor: Mysteria - http://www.mysty.cz
   # Verze: 1.00
   # Poslední update: 28. 3. 2013
   # Více informací: http://forum.fakaheda.eu/viewtopic.php?f=85&t=5946
   -->
<?php
# Zde nastav cestu ke XML souboru obsahujícího hlasy pro server
$XML = '# iConomy 6.0.8b
# @author Nijikokun <nijikokun@gmail.com>
# @license GPLv2
# @copyright Copyright AniGaiku LLC (C) 2010-2011
##
# Setup Notes
# - Seconds
# Basic Table:
# 1 minute = 60 seconds
# 1 hour = 1 minute * 60 = 3600 seconds
# 1 day = 1 hour * 24 = 86400 seconds
# 1 week = 1 day * 7 = 604800 seconds
# - Database
# Do not use remote databases from free sites, please use either a
# remote database from a personal hosted VPS or DEDI or a local
# database. This will prevent any 'timeout' or 'invalid settings'
# or 'cannot connect to database' issues. Thank you !
##

System:
Permissions:
Use:
# Should a user have the 'iConomy.holdings' to use /money
# By default this is false, so that people stop complaining that
# iConomy doesn't work. Yes, people actually report that.
# If you are one of those people, leave this false.
Holdings: false

Default:
Currency:
# Major is the first segment [Major].Minor

# Major ([Major].Minor) 1.00 Dollar (With Seperate 1 Dollar)
Major: [ 'Dollar', 'Dollars' ]

# Minor (Major.[Minor]) 0.23 Coins (With Seperate 0 Dollars, 23 Coins)
Minor: [ 'Coin', 'Coins' ]

Account:
# Default account balance when created
Holdings: 300.0

# Controls how money is formatted through methods
Formatting:
# Minor allows you to use the Minor amounts for amounts <1
# Example (true) 0.23 Coins and 1.23 Dollars (false) 0.23 Dollars and 1.23 Dollars
Minor: false

# Seperate allows your money to be shown in an alternative way,
# instead of 1.32 it will show as 1 Dollar 23 Coins
# !!! NOTICE: This only works if Minor is set to true !!!
Seperate: false # Example (true) 1 Dollar, 23 Coins (false) 1.23 Dollars (Only if Minor is true)

# Single shows your money in another alternative way.
# Instead of 1.23 Dollars you will see: 1 Dollar.
# If your money is 0.23 you will see 0 Dollars if Minor is false, 23 Coins if Minor is true.
# !!! Notice: This overrides seperate !!!
Single: false

# Logs all monetary transactions passed through iConomy
Logging:
Enabled: false

# Purges Default Balances at Loading
# Good way to keep unused accounts or default accounts wiped out and lower database usage.
Purging:
Enabled: true

# Controls amount of money gained at a set interval.
Interest:
Enabled: false

# Only give interest to players who are currently online?
Online: true

Announce:
# Send a message when the player gains interest?
Enabled: false

Interval:
# Interval is done in seconds, here is a easy reference table for commonly set intervals:
# 1 minute = 60 seconds
# 1 hour = 1 minute * 60 = 3600 seconds
# 1 day = 1 hour * 24 = 86400 seconds
# 1 week = 1 day * 7 = 604800 seconds
Seconds: 60

Amount:
# The balance to be met where we stop giving interest.
# 0.0 for no limit
Cutoff: 0.0

# Percentage of holdings to give / take (Negative to take) (Overrides Min/Max)
Percent: 0.0

# This is range based, to set a "flat" or "constant" rate, set each (Maximum and Minimum) to the same number.
# If the two numbers are different, it will be a random amount in-between the two.
Maximum: 1
Minimum: 2

Database:
# Databases Supported:
# Flatfile, FF, mini, minidb
# - These all equate to miniDB
##
# item, items, inventory, inventoryDB
# - These all equate to InventoryDB, which uses inventory for storage
##
# xp, exp, orb, xpdb, expdb, orbdb
# - These all equate to ExperienceDB, which relies on Experience for balance.
##
# mysql, mysqldb
# - These will attempt to connect to MySQL
##
# sqlite, sqlite2, sqlite3, sqlitedb
# - These will attempt to create & connect to SQLite
##
# postgre, postgreSQL, postgreDB
# - These will attempt to connect to PostgreSQL
Type: 'mysql'

# These are for InventoryDB only.
#
# InventoryDB is essentially Physical Money.
# It isn't logged in a database, its based on the users inventory
# and the two items selected below.
#
# MajorItem is the item or block ID of the major currency
# MinorItem is the item or block ID of the minor currency
# e.g. MajorItem: 266, MinorItem: 265 for Gold/Iron
MajorItem: 266
MinorItem: 265

# This controls the database name, by default it is iConomy
Table: 'iConomy'

# URL is for SQL Databases Only
##
# Path to iConomy folder is easy, it's the COMPLETE path.
# (Mine) G:\MineCraft\plugins\iConomy\
# Won't be the same as yours, but it usually looks like that.
##
# [H2DB Default] h2:path/to/iConomy/folder/iConomy;AUTO_RECONNECT=TRUE
# [SQLite Default] sqlite:path/to/iConomy/folder/iConomy.db
##
# Binary Databases use ip:port style connections.
# ip
# - is the connection identifier (internet protocol)
# - for ipv6 usually encased in brackets [::1]
# port
# - the port that the database is listening on
# - defaults: 3306 for mysql, postgre is either 5740 or 5432
##
# [MySQL Default] mysql://localhost:3306/119212_mysql_db
# [Postgre Default] postgresql://localhost:5740/iConomy
URL: 'mysql://localhost:3306/119212_mysql_db'

# Login details for binary databases
Username: '119212_mysql_db'
Password: 'heslo'

##############################################################
# !!! Conversion is not your database settings !!!
##############################################################
# Conversion allows you to convert your old 5.x to the new 6.x
# All is currently unused.
##############################################################
# URL is for MySQL only, H2DB doesn't use it.
##############################################################
Conversion:
# Set to True, After converting, change this back to false!
Enabled: True

# Database Type, H2DB or MySQL
Type: 'mysql'

# Database Table
Table: 'iConomy'

# Database URL without table at the end.
URL: 'http://www.czech-craft.eu/xml/4384.xml'

# Username / Password
# H2DB does not use this. MySQL Only.
Username: ''
Password: ''

# Unused ATM.
All: true';

$T2 = "\t\t";
$T3 = "\t\t\t";
$T4 = "\t\t\t\t";
$T5 = "\t\t\t\t\t";
date_default_timezone_set('Europe/Prague');
$hraci = array();
$pozice = 1;

$hlasy = new simplexmlelement($XML, NULL, TRUE);
foreach ($hlasy as $hlas) {
   $jmeno = (string)$hlas->nick;
   $cas = date("d. m. Y H:i:s", strtotime($hlas->cas));
   if (!isset($hraci[$jmeno])) {
      $hraci[$jmeno]['jmeno'] = $jmeno;
      $hraci[$jmeno]['pocetHlasu'] = 1;
      $hraci[$jmeno]['posledniHlasovani'] = $cas;
   } else {
      $hraci[$jmeno]['pocetHlasu']++;
      $hraci[$jmeno]['posledniHlasovani'] = $cas;
   }
}

foreach ($hraci as $hrac) {
   $radiciPole[] = $hrac['pocetHlasu'];
}
array_multisort($radiciPole, SORT_DESC, $hraci);

echo "$T2<table id=\"hlasy\">\n";
echo "$T3<thead>\n";
echo "$T4<tr>\n";
echo "$T5<th>Pořadí</th>\n";
echo "$T5<th>Přezdívka</th>\n";
echo "$T5<th>Počet hlasů</th>\n";
echo "$T5<th>Poslední hlasování</th>\n";
echo "$T4</tr>\n";
echo "$T3</thead>\n";
echo "$T3<tbody>\n";

foreach ($hraci as $hrac)
{
   if ($pozice % 2 === 1) { echo "$T4<tr class=\"lichy\">\n"; } else { echo "$T4<tr class=\"sudy\">\n"; }
   echo "$T5<td>$pozice</td>\n";
   echo "$T5<td>" . $hrac['jmeno'] . "</td>\n";
   echo "$T5<td>" . $hrac['pocetHlasu'] . "</td>\n";
   echo "$T5<td>" . $hrac['posledniHlasovani'] . "</td>\n";
   echo "$T4</tr>\n";
   $pozice++;
}
echo "$T3</tbody>\n";
echo "$T2</table>\n";
?>
   </body>
 </html>
Ušetři na nákupech v eshopech se společností Plná Peněženka.
Web, který tě přiučím novým věcem - http://neobycejny-svet.cz/
Aktuální kontakt na mě - tom.cana@seznam.cz

vojtamaniak
Příspěvky: 3512
Věk: 26
Registrován: 18 úno 2012, 21:02
Reputation: 11

Re: [PHP] Server Status Table / Extended, MC Player List ...

#130 Příspěvekod vojtamaniak » 08 črc 2013, 15:38

Proč tam sakra sereš iconomy config? :D
$XML má být v tomto tvaru:
$XML = 'http://czech-craft.eu/xml/IDNACZECHCRAFTU.xml';


Zpět na „Návody“

Kdo je online

Uživatelé prohlížející si toto fórum: Žádní registrovaní uživatelé a 12 hostů