Fixed some PHP warnings

This commit is contained in:
Znote 2016-10-24 01:06:44 +02:00
parent 436d68f5d9
commit 01e4441b6b
14 changed files with 33 additions and 34 deletions

View File

@ -108,7 +108,7 @@ if (empty($_POST) === false) {
} }
// Teleport Player // Teleport Player
if (in_array($_POST['from'], ['all', 'only'])) { if (isset($_POST['from']) && in_array($_POST['from'], ['all', 'only'])) {
$from = $_POST['from']; $from = $_POST['from'];
if ($from === 'only') { if ($from === 'only') {
if (empty($_POST['player_name']) || !user_character_exist($_POST['player_name'])) { if (empty($_POST['player_name']) || !user_character_exist($_POST['player_name'])) {
@ -160,13 +160,13 @@ echo "Last cached on: ". getClock($basic['cached'], true) .".<br>";
</p> </p>
<ul> <ul>
<li> <li>
<b>Permanently Delete/erase character from database:</b> <b>Permanently delete/erase character from database:</b>
<form type="submit" action="" method="post"> <form type="submit" action="" method="post">
<input type="text" name="del_name" placeholder="Character name..."> <input type="text" name="del_name" placeholder="Character name...">
</form> </form>
</li> </li>
<li> <li>
<b>Ban/violate :3 character and/or his account:</b> <b>Ban character and/or account:</b>
<form action="" method="post"> <form action="" method="post">
<table style="background-color:lightblue;"> <table style="background-color:lightblue;">
<!-- row 1 --> <!-- row 1 -->

View File

@ -24,13 +24,13 @@
// ------------------------ \\ // ------------------------ \\
// phpmyadmin username for OT server: (DONT USE "root" if ur hosting to public.). // phpmyadmin username for OT server: (DONT USE "root" if ur hosting to public.).
$config['sqlUser'] = 'tfs10'; $config['sqlUser'] = 'tfs13';
// phpmyadmin password for OT server: // phpmyadmin password for OT server:
$config['sqlPassword'] = 'tfs10'; $config['sqlPassword'] = 'tfs13';
// The database name to connect to. (This is usually same as username). // The database name to connect to. (This is usually same as username).
$config['sqlDatabase'] = 'tfs10'; $config['sqlDatabase'] = 'tfs13';
// Hostname is usually localhost or 127.0.0.1. // Hostname is usually localhost or 127.0.0.1.
$config['sqlHost'] = '127.0.0.1'; $config['sqlHost'] = '127.0.0.1';
@ -464,7 +464,7 @@
// What client version and server port are you using on this OT? // What client version and server port are you using on this OT?
// Used for the Downloads page. // Used for the Downloads page.
$config['client'] = 1041; // 954 = tibia 9.54 $config['client'] = 1098; // 954 = tibia 9.54
// Download link to client. Recommended: // Download link to client. Recommended:
// Select download link from remere map editor website! // Select download link from remere map editor website!
@ -481,7 +481,7 @@
$config['page_admin_access'] = array( $config['page_admin_access'] = array(
//'otland0', //'otland0',
//'otland1', //'otland1',
'znote' 'testing'
); );
// Built-in FORUM // Built-in FORUM
@ -543,7 +543,7 @@
// Or host your own private one, here is the code: https://github.com/Znote/ZEOTSS // Or host your own private one, here is the code: https://github.com/Znote/ZEOTSS
$config['zeotss'] = array( $config['zeotss'] = array(
'enabled' => false, 'enabled' => false,
'visitors' => true, 'visitors' => false,
'debug' => false, 'debug' => false,
'server' => "http://zeotss.znote.eu/" 'server' => "http://zeotss.znote.eu/"
); );
@ -682,7 +682,7 @@
// Write your paypal address here, and what currency you want to recieve money in. // Write your paypal address here, and what currency you want to recieve money in.
$config['paypal'] = array( $config['paypal'] = array(
'enabled' => true, 'enabled' => false,
'email' => 'stefan_brannfjell@live.no', // Example: paypal@mail.com 'email' => 'stefan_brannfjell@live.no', // Example: paypal@mail.com
'currency' => 'EUR', 'currency' => 'EUR',
'points_per_currency' => 10, // 1 currency = ? points? [ONLY used to calculate bonuses] 'points_per_currency' => 10, // 1 currency = ? points? [ONLY used to calculate bonuses]
@ -764,7 +764,7 @@
/// Let players sell characters. /// Let players sell characters.
///////// /////////
$config['shop_auction'] = array( $config['shop_auction'] = array(
'characterAuction' => true, // Enable/disable this system 'characterAuction' => false, // Enable/disable this system
'requiredLevel' => 50, // Minimum level of sold character 'requiredLevel' => 50, // Minimum level of sold character
'leastValue' => 10, // Lowest donation points a char can be sold for. 'leastValue' => 10, // Lowest donation points a char can be sold for.
'leastTime' => 24, // In hours. False to disable. 'leastTime' => 24, // In hours. False to disable.

View File

@ -1 +0,0 @@
[{"time":"0","level":"8","killed_by":"Testing","is_player":"1","mostdamage_by":"Testing","mostdamage_is_player":"1","unjustified":"1","mostdamage_unjustified":"1","victim":"Znote"},{"time":"0","level":"8","killed_by":"Rat","is_player":"0","mostdamage_by":"Cave Rat","mostdamage_is_player":"0","unjustified":"0","mostdamage_unjustified":"0","victim":"Testing"}]

View File

@ -1 +0,0 @@
[{"title":"Quest Done!","desc":"Yaay! Finally!","date":"1370715254","image":"4!47qyHg!jpg"},{"title":"Testing stuff.","desc":"I am testing if this system still works.","date":"1370561230","image":"1!hqxwUn!png"}]

View File

@ -1 +1 @@
[[{"value":"15","name":"Test Warrior","vocation":"Knight"},{"value":"11","name":"Test Character","vocation":"Sorcerer"},{"value":"10","name":"Znote","vocation":"Sorcerer"}],[{"value":"20","name":"Test Warrior","vocation":"Knight"},{"value":"11","name":"Test Character","vocation":"Sorcerer"},{"value":"10","name":"Znote","vocation":"Sorcerer"}],[{"value":"35","name":"Znote","vocation":"Sorcerer"},{"value":"25","name":"Test Warrior","vocation":"Knight"},{"value":"12","name":"Test Character","vocation":"Sorcerer"}],[{"value":"30","name":"Test Warrior","vocation":"Knight"},{"value":"10","name":"Znote","vocation":"Sorcerer"},{"value":"10","name":"Test Character","vocation":"Sorcerer"}],[{"value":"12","name":"Test Warrior","vocation":"Knight"},{"value":"11","name":"Test Character","vocation":"Sorcerer"},{"value":"10","name":"Znote","vocation":"Sorcerer"}],[{"value":"32","name":"Test Warrior","vocation":"Knight"},{"value":"30","name":"Znote","vocation":"Sorcerer"},{"value":"14","name":"Test Character","vocation":"Sorcerer"}],[{"value":"23","name":"Test Character","vocation":"Sorcerer"},{"value":"17","name":"Test Warrior","vocation":"Knight"},{"value":"10","name":"Znote","vocation":"Sorcerer"}],[{"level":"13","value":"23200","name":"Test Warrior","vocation":"Knight"},{"level":"12","value":"17600","name":"Test Character","vocation":"Sorcerer"},{"level":"15","value":"4200","name":"Znote","vocation":"Sorcerer"}],[{"value":"8","name":"Test Character","vocation":"Sorcerer"},{"value":"5","name":"Znote","vocation":"Sorcerer"},{"value":"3","name":"Test Warrior","vocation":"Knight"}]] {"1":[{"id":"1","name":"Znote","vocation":"1","value":"10"}],"2":[{"id":"1","name":"Znote","vocation":"1","value":"10"}],"3":[{"id":"1","name":"Znote","vocation":"1","value":"10"}],"4":[{"id":"1","name":"Znote","vocation":"1","value":"10"}],"5":[{"id":"1","name":"Znote","vocation":"1","value":"10"}],"6":[{"id":"1","name":"Znote","vocation":"1","value":"10"}],"7":[{"id":"1","name":"Znote","vocation":"1","experience":"368300","value":"30"}],"8":[{"id":"1","name":"Znote","vocation":"1","value":"50"}],"9":[{"id":"1","name":"Znote","vocation":"1","value":"10"}]}

File diff suppressed because one or more lines are too long

View File

@ -1 +0,0 @@
[{"name":"Znote","id":"3"},{"name":"Mister Dude","id":"4"}]

View File

@ -1 +0,0 @@
[{"killed_by":"Testing","kills":"1"}]

View File

@ -1 +0,0 @@
[{"victim":"Znote","killed_by":"Testing","time":"0"}]

View File

@ -1 +1 @@
[{"id":"1","title":"TFS 1.0!","text":"TFS 1.0 for Znote AAC is under developement!","date":"1376877999","name":"Znote"}] [{"id":"1","title":"Test","text":"Hello there!","date":"1477257256","name":"Znote"}]

View File

@ -1 +0,0 @@
{"God":[{"group_id":"6","name":"Znote","online":0}]}

View File

@ -1 +1 @@
[{"name":"Test Warrior","level":"13","experience":"23200"},{"name":"Test Character","level":"12","experience":"17600"},{"name":"Znote","level":"15","experience":"4200"},{"name":"Testing Character","level":"8","experience":"4200"}] [{"name":"Znote","level":"29","experience":"337980"}]

View File

@ -1 +0,0 @@
[{"name":"Znote","Deaths":"1"},{"name":"Testing","Deaths":"1"}]

View File

@ -98,23 +98,30 @@ if ($scores) {
<?php if ($type === 7) echo "<td>Points</td>"; ?> <?php if ($type === 7) echo "<td>Points</td>"; ?>
</tr> </tr>
<?php <?php
for ($i = 0; $i < count($scores[$type]); $i++) { for ($i = 0; $i < count($scores[$type]); $i++) {
if (pageCheck($i, $page, $rowsPerPage)) { if ($scores[$type] === false) {
$profile_data = user_character_data($scores[$type][$i]['id'], 'account_id');
$account_data = user_znote_account_data($profile_data['account_id'], 'flag');
if ($config['country_flags'] === true && count($account_data['flag']) > 1) $flag = '<img src="flags/' . $account_data['flag'] . '.png"> ';
else $flag = '';
?> ?>
<tr> <tr>
<td><?php echo $i+1; ?></td> <td colspan="5">Nothing to show here yet.</td>
<td><?php echo $flag; ?><a href="characterprofile.php?name=<?php echo $scores[$type][$i]['name']; ?>"><?php echo $scores[$type][$i]['name']; ?></a></td>
<td><?php echo vocation_id_to_name($scores[$type][$i]['vocation']); ?></td>
<td><?php echo $scores[$type][$i]['value']; ?></td>
<?php if ($type === 7) echo "<td>". $scores[$type][$i]['experience'] ."</td>"; ?>
</tr> </tr>
<?php <?php
} else {
if (pageCheck($i, $page, $rowsPerPage)) {
$profile_data = user_character_data($scores[$type][$i]['id'], 'account_id');
$account_data = user_znote_account_data($profile_data['account_id'], 'flag');
if ($config['country_flags'] === true && count($account_data['flag']) > 1) $flag = '<img src="flags/' . $account_data['flag'] . '.png"> ';
else $flag = '';
?>
<tr>
<td><?php echo $i+1; ?></td>
<td><?php echo $flag; ?><a href="characterprofile.php?name=<?php echo $scores[$type][$i]['name']; ?>"><?php echo $scores[$type][$i]['name']; ?></a></td>
<td><?php echo vocation_id_to_name($scores[$type][$i]['vocation']); ?></td>
<td><?php echo $scores[$type][$i]['value']; ?></td>
<?php if ($type === 7) echo "<td>". $scores[$type][$i]['experience'] ."</td>"; ?>
</tr>
<?php
}
} }
} }
?> ?>