mirror of
https://github.com/Znote/ZnoteAAC.git
synced 2025-04-29 02:39:21 +02:00
parent
5a80034915
commit
0fae6d6e5f
@ -1,7 +1,7 @@
|
||||
<?php require_once 'engine/init.php'; include 'layout/overall/header.php';
|
||||
|
||||
if(!isset($_SESSION['csrf_token'])){
|
||||
$_SESSION['csrf_token']=bin2hex(random_bytes_compat(5,$crypto_strong));
|
||||
$_SESSION['csrf_token'] = bin2hex(random_bytes_compat(5, $crypto_strong));
|
||||
if(!$crypto_strong){
|
||||
// we don't really care, the csrf token doesn't really have to be cryptographically strong.
|
||||
}
|
||||
@ -48,8 +48,7 @@ if (empty($_POST) === false) {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// delete character:
|
||||
// Delete character:
|
||||
if (empty($_POST['del_name']) === false) {
|
||||
if (user_character_exist($_POST['del_name'])) {
|
||||
user_delete_character(user_character_id($_POST['del_name']));
|
||||
|
@ -22,7 +22,7 @@ $hideStatus = array(3, 4, 5);
|
||||
|
||||
// Fetch data from SQL
|
||||
$reportsData = mysql_select_multi('SELECT id, name, posx, posy, posz, report_description, date, status FROM znote_player_reports ORDER BY id DESC;');
|
||||
// If sql data is not empty
|
||||
// If SQL data is not empty
|
||||
if ($reportsData !== false) {
|
||||
// Order reports array by ID for easy reference later on.
|
||||
$reports = array();
|
||||
@ -120,7 +120,7 @@ if (!empty($_POST)) {
|
||||
if ($rid == $reportId)
|
||||
$report = $reports[$sid][$reportId];
|
||||
|
||||
// Create html form
|
||||
// Create HTML form
|
||||
?>
|
||||
<div style="width: 300px; margin: auto;">
|
||||
<form action="admin_reports.php" method="POST">
|
||||
@ -162,7 +162,7 @@ if (!empty($_POST)) {
|
||||
<?php
|
||||
}
|
||||
|
||||
// If sql data is not empty
|
||||
// If SQL data is not empty
|
||||
if ($reportsData !== false) {
|
||||
// Render HTML
|
||||
?>
|
||||
|
@ -86,7 +86,7 @@ if ($auction['characterAuction']) {
|
||||
if (!empty($soldIds)) {
|
||||
mysql_update("
|
||||
UPDATE `znote_auction_player`
|
||||
SET `sold`=1
|
||||
SET `sold` = 1
|
||||
WHERE `id` IN(".implode(',', $soldIds).")
|
||||
LIMIT ".COUNT($soldIds).";
|
||||
");
|
||||
@ -279,7 +279,7 @@ if ($auction['characterAuction']) {
|
||||
$account = mysql_select_single("
|
||||
SELECT `points`
|
||||
FROM `znote_accounts`
|
||||
WHERE `account_id`={$this_account_id}
|
||||
WHERE `account_id` = {$this_account_id}
|
||||
AND `points` >= {$character['price']}
|
||||
LIMIT 1;
|
||||
");
|
||||
@ -565,7 +565,7 @@ if ($auction['characterAuction']) {
|
||||
$time = time();
|
||||
// If original account is the one trying to get it back,
|
||||
// and bidding period is over,
|
||||
// and its not labelled as sold
|
||||
// and its not labeled as sold
|
||||
// and nobody has bid on it
|
||||
$character = mysql_select_single("
|
||||
SELECT `player_id`
|
||||
@ -650,7 +650,7 @@ if ($auction['characterAuction']) {
|
||||
// end name validation
|
||||
if (empty($errors)) {
|
||||
// Make sure you have access to claim this zaid character.
|
||||
// And that you havent already claimed it.
|
||||
// And that you haven't already claimed it.
|
||||
// And that the character isn't online...
|
||||
$character = mysql_select_single("
|
||||
SELECT
|
||||
@ -715,7 +715,7 @@ if ($auction['characterAuction']) {
|
||||
<table class="auction_error">
|
||||
<tr class="yellow">
|
||||
<td>#</td>
|
||||
<td>Issues occured while claiming your name</td>
|
||||
<td>Issues occurred while claiming your name</td>
|
||||
</tr>
|
||||
<?php foreach($errors as $i => $error): ?>
|
||||
<tr>
|
||||
|
@ -42,6 +42,7 @@ function mysql_znote_escape_string($escapestr) {
|
||||
global $connect;
|
||||
return mysqli_real_escape_string($connect, $escapestr);
|
||||
}
|
||||
|
||||
// Select single row from database
|
||||
function mysql_select_single($query) {
|
||||
global $connect;
|
||||
|
@ -433,7 +433,6 @@ function update_player_guildnick($cid, $nick) {
|
||||
$cid = (int)$cid;
|
||||
$nick = sanitize($nick);
|
||||
if (!empty($nick)) {
|
||||
|
||||
mysql_update("UPDATE `players` SET `guildnick`='$nick' WHERE `id`=$cid");
|
||||
} else {
|
||||
mysql_update("UPDATE `players` SET `guildnick`='' WHERE `id`=$cid");
|
||||
|
@ -28,7 +28,7 @@ $rarity = array(
|
||||
}
|
||||
obj.innerHTML += ' ' + name;
|
||||
}
|
||||
</script>
|
||||
</script>
|
||||
|
||||
<?php
|
||||
if(isset($_GET['lootrate']))
|
||||
|
@ -17,20 +17,20 @@
|
||||
$hyphen = '-';
|
||||
$conjunction = ' and ';
|
||||
$separator = ', ';
|
||||
$negative = 'negative ';
|
||||
$negative= 'negative ';
|
||||
$decimal = ' point ';
|
||||
$dictionary = array(
|
||||
0 => 'zero',
|
||||
1 => 'First',
|
||||
2 => 'Second',
|
||||
3 => 'Third',
|
||||
4 => 'Fourth',
|
||||
5 => 'Fifth',
|
||||
6 => 'Sixth',
|
||||
7 => 'Seventh',
|
||||
8 => 'Eighth',
|
||||
9 => 'Ninth',
|
||||
10 => 'Tenth',
|
||||
1 => 'first',
|
||||
2 => 'second',
|
||||
3 => 'third',
|
||||
4 => 'fourth',
|
||||
5 => 'fifth',
|
||||
6 => 'sixth',
|
||||
7 => 'seventh',
|
||||
8 => 'eighth',
|
||||
9 => 'ninth',
|
||||
10 => 'tenth',
|
||||
11 => 'eleventh',
|
||||
12 => 'twelve',
|
||||
13 => 'thirteen',
|
||||
@ -148,4 +148,4 @@ $count++; ?></td>
|
||||
|
||||
<?php
|
||||
} else echo '<h1>No frags yet.</h1>';
|
||||
include 'layout/overall/footer.php'; ?>
|
||||
include 'layout/overall/footer.php'; ?>
|
||||
|
@ -1,10 +1,10 @@
|
||||
<a class="twitter-timeline" href="https://twitter.com/ZnoteAAC" data-widget-id="353297614114021376">Tweets from @ZnoteAAC</a>
|
||||
<script>
|
||||
!function(d,s,id){
|
||||
!function(d,s,id){
|
||||
var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';
|
||||
if(!d.getElementById(id)){
|
||||
js=d.createElement(s);js.id=id;js.src=p+"://platform.twitter.com/widgets.js";
|
||||
fjs.parentNode.insertBefore(js,fjs);
|
||||
}
|
||||
}(document,"script","twitter-wjs");
|
||||
}(document,"script","twitter-wjs");
|
||||
</script>
|
||||
|
Loading…
x
Reference in New Issue
Block a user