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