Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Dec 27, 2018. It is now read-only.

Commit 25088e9

Browse files
author
Nick Smith
committed
updates
1 parent 6156f4d commit 25088e9

10 files changed

Lines changed: 439 additions & 448 deletions

File tree

admin/achievements-install/index.php

Lines changed: 14 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,12 @@
3939
}
4040

4141
$bool = strtolower($_GET['alert']);
42-
4342
$bool = ($bool=='yes' or $bool=='true' or $bool=='correct'
44-
or $bool=='on' or $bool=='right' or $bool=='positive'
45-
or $bool=='yup' or $bool=='uh-huh' or $bool=='sure'
46-
or $bool===true);
43+
or $bool=='on' or $bool=='right' or $bool=='positive'
44+
or $bool=='yup' or $bool=='uh-huh' or $bool=='sure'
45+
or $bool===true);
4746

48-
if($bool === TRUE)
49-
{
47+
if($bool === TRUE) {
5048
?>
5149
<div style="clear:both; text-align:left;">
5250
<table>
@@ -102,28 +100,24 @@
102100
if($query2) {}
103101
else {echo mysqli_error($link); echo '$query2';}
104102

105-
$row = 1;
106-
$handle = fopen ("achievements.txt","r");
103+
$row = 1;
104+
$handle = fopen ("achievements.txt","r");
107105
while ( ($data = fgetcsv ($handle, 1000, ":")) !== FALSE ) {
108-
$num = count ($data);
109-
110-
if((strpos($data[0],"#")!==false) or (!isset($data[0]))) {
111-
112-
}
113-
else {
114-
$data[7] = str_replace(' ', '*', $data[7]);
115-
$reward = explode('*',$data[7]);
116-
if ($reward[2] == '' or !isset($reward[2])) {
117-
$reward[2] = ''.$reward[1].'';
106+
$num = count ($data);
107+
108+
if((strpos($data[0],"#")!==false) or (!isset($data[0]))) {
109+
} else {
110+
$data[7] = str_replace(' ', '*', $data[7]);
111+
$reward = explode('*',$data[7]);
112+
if ($reward[2] == '' or !isset($reward[2])) {
113+
$reward[2] = ''.$reward[1].'';
118114
}
119115
else {
120116
$reward[0] = ''.$reward[0].' '.$reward[1].'';
121117
$temp = explode(' ', $reward[0]);
122118
$reward[0] = $temp[1];
123119
}
124-
125120
$iquery = mysqli_query($link, "INSERT INTO ".WS_CONFIG_ACHIEVEMENTS." (ws_a_name, ws_a_points, ws_a_category, ws_a_stat, ws_a_value, ws_a_description, ws_a_reward, ws_a_amount) VALUES ('$data[1]', '$data[2]', '$data[3]', '$data[4]', '$data[5]', '$data[6]', '$reward[0]', '$reward[2]')");
126-
127121
echo'
128122
<div class="content_maintable_stats" style="padding-top: 5px; padding-bottom: 5px; clear:both; text-align:left;">
129123
<table>

admin/configsetup.php

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@
99
// http://stackoverflow.com/questions/1779205/create-temporary-file-and-auto-removed
1010

1111
// always sanitize user input
12-
$fileId = filter_input(INPUT_GET, 'fileId', FILTER_SANITIZE_NUMBER_INT);
13-
$token = filter_input(INPUT_GET, 'token', FILTER_UNSAFE_RAW);
14-
$referer = filter_input(INPUT_SERVER, 'HTTP_REFERER', FILTER_SANITIZE_URL);
15-
$script = filter_input(INPUT_SERVER, 'SCRIPT_NAME', FILTER_SANITIZE_URL);
12+
$fileId = filter_input(INPUT_GET, 'fileId', FILTER_SANITIZE_NUMBER_INT);
13+
$token = filter_input(INPUT_GET, 'token', FILTER_UNSAFE_RAW);
14+
$referer = filter_input(INPUT_SERVER, 'HTTP_REFERER', FILTER_SANITIZE_URL);
15+
$script = filter_input(INPUT_SERVER, 'SCRIPT_NAME', FILTER_SANITIZE_URL);
1616

1717
// mush session_id and fileId into an access token
1818
$secret = 'i can haz salt?';
@@ -80,22 +80,21 @@
8080
$SERVERIP=$_SERVER['SERVER_ADDR'];
8181

8282
function dirlist($dir, $bool = "dirs"){
83-
$truedir = $dir;
84-
$dir = scandir($dir);
85-
if($bool == "files") {
86-
$direct = 'is_dir';
87-
} elseif($bool == "dirs") {
88-
$direct = 'is_file';
89-
}
90-
foreach($dir as $k => $v) {
91-
if(($direct($truedir.$dir[$k])) || $dir[$k] == '.' || $dir[$k] == '..' || $dir[$k] == 'show-player' || $dir[$k] == 'creature-stats' || $dir[$k] == 'index.php') {
92-
unset($dir[$k]);
93-
}
94-
}
95-
$dir = array_values($dir);
96-
return $dir;
83+
$truedir = $dir;
84+
$dir = scandir($dir);
85+
if($bool == "files") {
86+
$direct = 'is_dir';
87+
} elseif($bool == "dirs") {
88+
$direct = 'is_file';
89+
}
90+
foreach($dir as $k => $v) {
91+
if(($direct($truedir.$dir[$k])) || $dir[$k] == '.' || $dir[$k] == '..' || $dir[$k] == 'show-player' || $dir[$k] == 'creature-stats' || $dir[$k] == 'index.php') {
92+
unset($dir[$k]);
93+
}
94+
}
95+
$dir = array_values($dir);
96+
return $dir;
9797
}
98-
9998
?>
10099
<script type="text/javascript">
101100
function noNumbers(e){

admin/download.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22
$filename = 'config.php';
33
$cache_limiter = session_cache_limiter('public');
44
if (file_exists($filename)) {
5-
header('Content-Description: File Transfer');
6-
header('Content-Type: application/php');
7-
header('Content-Disposition: attachment; filename='.basename($filename));
8-
header('Content-Transfer-Encoding: binary');
9-
header("Expires: $cache_limiter");
10-
header('Cache-Control: must-revalidate');
11-
header('Pragma: public');
12-
header('Content-Length: ' . filesize($filename));
5+
header('Content-Description: File Transfer');
6+
header('Content-Type: application/php');
7+
header('Content-Disposition: attachment; filename='.basename($filename));
8+
header('Content-Transfer-Encoding: binary');
9+
header("Expires: $cache_limiter");
10+
header('Cache-Control: must-revalidate');
11+
header('Pragma: public');
12+
header('Content-Length: ' . filesize($filename));
1313
ob_clean();
1414
flush();
1515
readfile($filename);

admin/index.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,9 +133,9 @@ function googleTranslateElementInit(){new google.translate.TranslateElement({pag
133133
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
134134
})();
135135
</script>
136-
<script>
137-
$(document).foundation();
138-
</script>
136+
<script>
137+
$(document).foundation();
138+
</script>
139139
</body>
140140
</html>
141141
<?php } ?>

0 commit comments

Comments
 (0)