summaryrefslogtreecommitdiff
path: root/html/pages/admin
diff options
context:
space:
mode:
authorMatthijs Kuiper <info@matthijskuiper.nl>2018-01-10 20:08:33 +0100
committerMatthijs Kuiper <info@matthijskuiper.nl>2018-01-10 20:08:33 +0100
commit861e3230f0154e6a5942698adedf18d5eb0e0b8a (patch)
tree904f4efa242804c12f6989bd825b93534ef0a599 /html/pages/admin
parentfdd379c949056fb3a2198039e452f6aae600ef35 (diff)
Move imaegs to assets folder
Diffstat (limited to 'html/pages/admin')
-rw-r--r--html/pages/admin/acelog.php14
-rw-r--r--html/pages/admin/aclog.php4
-rw-r--r--html/pages/admin/editgamestype.php46
-rw-r--r--html/pages/admin/editweapons.php8
-rw-r--r--html/pages/admin/main.php4
-rw-r--r--html/pages/admin/utdclog.php25
6 files changed, 51 insertions, 50 deletions
diff --git a/html/pages/admin/acelog.php b/html/pages/admin/acelog.php
index a9c80c0..31f98e8 100644
--- a/html/pages/admin/acelog.php
+++ b/html/pages/admin/acelog.php
@@ -12,7 +12,7 @@ function InvertSort($curr_field, $order, $sort) {
function SortPic($curr_field, $order, $sort) {
if ($curr_field != $order) return;
- $fname = 'images/s_'. strtolower($sort) .'.png';
+ $fname = 'assets/images/s_'. strtolower($sort) .'.png';
if (!file_exists($fname)) return;
return('&nbsp;<img src="'. $fname .'" border="0" width="11" height="9" alt="" title="('.strtolower($sort).'ending)">');
}
@@ -147,7 +147,7 @@ if (empty($filename)) {
$fp = my_fopen('logs/ace/'.$filename, 'rb', $compression = NULL);
if (!$fp) die("Error opening file");
-
+
while (($line = my_fgets($fp, 5000, $compression)) !== FALSE) {
$info = preg_split('/\s/', $line, 3);
$info[2] = preg_replace('/[\r\n]+/', '', $info[2]);
@@ -242,7 +242,7 @@ if (empty($filename)) {
$d_size = file_size_info(filesize('logs/ace/'. $log));
echo $d_size['size'] .' '. $d_size['type'];
echo '</td><td class="'.$class.'" align="center">';
- echo '<a href="admin.php?key='.$adminkey.'&amp;action='.$action.'&amp;filename='.urlencode($log).'&amp;del=1"><img src="images/del.png" border="0" width="16" height="16" title="Delete" alt="Delete" /></a>';
+ echo '<a href="admin.php?key='.$adminkey.'&amp;action='.$action.'&amp;filename='.urlencode($log).'&amp;del=1"><img src="assets/images/del.png" border="0" width="16" height="16" title="Delete" alt="Delete" /></a>';
echo '</td></tr>';
}
}
@@ -256,7 +256,7 @@ if (!empty($filename)) {
<tr>
<td class="smheading" align="center" width="95%" colspan="4">'.$filename.'</td>
<td class="smheading" align="center" width="5%" align="right">';
- echo '<a href="admin.php?key='.$adminkey.'&amp;action='.$action.'&amp;filename='.urlencode($filename).'&amp;del=1"><img src="images/del.png" border="0" width="16" height="16" title="Delete" alt="Delete" /></a>';
+ echo '<a href="admin.php?key='.$adminkey.'&amp;action='.$action.'&amp;filename='.urlencode($filename).'&amp;del=1"><img src="assets/images/del.png" border="0" width="16" height="16" title="Delete" alt="Delete" /></a>';
echo '</td>
</tr>';
if (substr($filename, strlen($filename) - strlen($import_ace_screenshot_extension)) == $import_ace_screenshot_extension
@@ -269,10 +269,10 @@ if (!empty($filename)) {
else {
$fp = my_fopen('logs/ace/'.$filename, 'rb', $compression = NULL);
if (!$fp) die("Error opening file");
-
+
$i = 0;
echo '<tr><td class="grey" colspan="5"><span style="font-family: monospace;">';
-
+
while (($line = my_fgets($fp, 5000, $compression)) !== FALSE) {
/*
$i++;
@@ -299,7 +299,7 @@ if (!empty($filename)) {
echo '<tr>
<td class="smheading" align="center" width="95%" colspan="4">'.$Screenshot.'</td>
<td class="smheading" align="center" width="5%" align="right">';
- echo '<a href="admin.php?key='.$adminkey.'&amp;action='.$action.'&amp;filename='.preg_replace('/\+/', '%20', urlencode($Screenshot)).'&amp;del=1"><img src="images/del.png" border="0" width="16" height="16" title="Delete" alt="Delete" /></a>';
+ echo '<a href="admin.php?key='.$adminkey.'&amp;action='.$action.'&amp;filename='.preg_replace('/\+/', '%20', urlencode($Screenshot)).'&amp;del=1"><img src="assets/images/del.png" border="0" width="16" height="16" title="Delete" alt="Delete" /></a>';
echo '</td>
</tr>';
diff --git a/html/pages/admin/aclog.php b/html/pages/admin/aclog.php
index 2d78b77..d057c9f 100644
--- a/html/pages/admin/aclog.php
+++ b/html/pages/admin/aclog.php
@@ -70,7 +70,7 @@ if (empty($filename)) {
echo $d_size['size'] .' '. $d_size['type'];
echo '</td><td class="'.$class.'" align="center">';
- echo '<a href="admin.php?key='.$adminkey.'&amp;action='.$action.'&amp;filename='.urlencode($log).'&amp;del=1"><img src="images/del.png" border="0" width="16" height="16" title="Delete" alt="Delete" /></a>';
+ echo '<a href="admin.php?key='.$adminkey.'&amp;action='.$action.'&amp;filename='.urlencode($log).'&amp;del=1"><img src="assets/images/del.png" border="0" width="16" height="16" title="Delete" alt="Delete" /></a>';
echo '</td></tr>';
}
}
@@ -83,7 +83,7 @@ if (!empty($filename)) {
<tr>
<td class="smheading" align="center" width="95%" colspan="3">'.$filename.'</td>
<td class="smheading" align="center" width="5%" align="right">';
- echo '<a href="admin.php?key='.$adminkey.'&amp;action='.$action.'&amp;filename='.urlencode($filename).'&amp;del=1"><img src="images/del.png" border="0" width="16" height="16" title="Delete" alt="Delete" /></a>';
+ echo '<a href="admin.php?key='.$adminkey.'&amp;action='.$action.'&amp;filename='.urlencode($filename).'&amp;del=1"><img src="assets/images/del.png" border="0" width="16" height="16" title="Delete" alt="Delete" /></a>';
echo '</td>
</tr>';
diff --git a/html/pages/admin/editgamestype.php b/html/pages/admin/editgamestype.php
index 26bff62..0b8ac30 100644
--- a/html/pages/admin/editgamestype.php
+++ b/html/pages/admin/editgamestype.php
@@ -1,6 +1,6 @@
<?php
if (empty($import_adminkey) or isset($_REQUEST['import_adminkey']) or $import_adminkey != $adminkey) die('bla');
-
+
$sql_server = "SELECT id, servername, serverip FROM uts_match GROUP BY servername, serverip ORDER BY servername ASC";
$q_server = mysql_query($sql_server) or die(mysql_error());
$servernames = array('0' => '');
@@ -27,15 +27,15 @@ if (isset($_REQUEST['submit'])) {
mutator = '". my_addslashes($_REQUEST['mutator']) ."',
gid = '". my_addslashes($_REQUEST['gid']) ."'
") or die(mysql_error());
-
+
if (isset($_REQUEST['update'])) {
echo'<br><table border="0" cellpadding="0" cellspacing="0" width="600">
<tr>
<td class="smheading" align="center" colspan="2">Updating...</td>
</tr>
-
-
-
+
+
+
<tr>
<td class="smheading" align="left" width="200">Updating Player Records</td>';
$where = 'WHERE 1';
@@ -49,27 +49,27 @@ if (isset($_REQUEST['submit'])) {
if ($_REQUEST['mutator'] != '*') {
$where .= " AND m.mutators LIKE '%".my_addslashes($_REQUEST['mutator'])."%'";
}
-
+
mysql_query("UPDATE uts_player p, uts_match m SET p.gid = '". my_addslashes($_REQUEST['gid']) ."' $where AND m.id = p.matchid;") or die(mysql_error());
echo'<td class="grey" align="left" width="400">Done (updated '.mysql_affected_rows().' records)</td>
</tr>
-
-
-
-
+
+
+
+
<tr>
<td class="smheading" align="left" width="200">Updating Matches</td>';
mysql_query("UPDATE uts_match m SET m.gid = '". my_addslashes($_REQUEST['gid']) ."' $where;") or die(mysql_error());
echo'<td class="grey" align="left" width="400">Done (updated '.mysql_affected_rows().' matches)</td>
</tr>
-
-
-
-
-
+
+
+
+
+
<tr>
<td class="smheading" align="left" width="200">Re-Calcuating Rankings</td>';
-
+
if ($_REQUEST['gamename'] != '*') {
$gids[] = $_REQUEST['gid'];
$where = "WHERE gid IN (".implode(',', $gids).")";
@@ -77,7 +77,7 @@ if (isset($_REQUEST['submit'])) {
$where = 'WHERE 1';
}
mysql_query("DELETE FROM uts_rank $where;") or die(mysql_error());
-
+
$sql_nrank = "SELECT SUM(p.gametime) AS time, p.pid, p.gid, SUM(p.rank) AS rank, COUNT(p.matchid) AS matches FROM uts_player p, uts_pinfo pi $where AND pi.id = p.pid AND pi.banned <> 'Y' GROUP BY p.gid, p.pid";
$q_nrank = mysql_query($sql_nrank) or die(mysql_error());
$num_ranks = 0;
@@ -138,7 +138,7 @@ while ($r_gamestype = mysql_fetch_array($q_gamestype)) {
echo '<td class="'.$class.'">&nbsp;'.htmlentities($gamedisplaynames[$r_gamestype['gid']]).'</td>';
echo '<td class="'.$class.'" align="center">';
echo '<a href="'.$_SERVER['PHP_SELF'].'?action='.$action.'&amp;key='.$adminkey.'&amp;del='.$r_gamestype['id'].'">';
- echo '<img src="images/del.png" border="0" width="16" height="16" title="Delete" alt="Delete" />';
+ echo '<img src="assets/images/del.png" border="0" width="16" height="16" title="Delete" alt="Delete" />';
echo '</a>';
echo '</td>';
echo '</tr>';
@@ -168,7 +168,7 @@ echo '<td class="smheading" width="170">If server =</td>';
echo '<td class="'.$class.'">';
echo '<select class="searchform" name="serverip">';
foreach($serverips as $id => $bla) {
- echo '<option value="'.$serverips[$id].'">'. $serverips[$id];
+ echo '<option value="'.$serverips[$id].'">'. $serverips[$id];
if (!empty($servernames[$id])) echo ' ('. $servernames[$id] .')';
echo '</option>';
}
@@ -182,7 +182,7 @@ echo '<td class="'.$class.'">';
echo '<select class="searchform" name="gamename">';
foreach($gamenames as $id => $bla) {
if ($gamenames[$id] == '(user defined)') continue;
- echo '<option value="'.$gamenames[$id].'">'. $gamenames[$id];
+ echo '<option value="'.$gamenames[$id].'">'. $gamenames[$id];
if (!empty($gamedisplaynames[$id])) echo ' ('. $gamedisplaynames[$id] .')';
echo '</option>';
}
@@ -198,11 +198,11 @@ echo '</td></tr>';
echo '<tr><td class="smheading" nowrap>==&gt; assume gametype:</td>';
echo '<td class="'.$class.'">';
-
+
echo '<select class="searchform" name="gid">';
foreach($gamenames as $id => $bla) {
if ($gamenames[$id] == '*') continue;
- echo '<option value="'.$id.'">'. $gamenames[$id];
+ echo '<option value="'.$id.'">'. $gamenames[$id];
if (!empty($gamedisplaynames[$id])) echo ' ['. $gamedisplaynames[$id] .']';
echo '</option>';
}
@@ -224,5 +224,5 @@ echo'</form>
<td class="smheading" align="center" colspan="2"><a class="grey" href="./admin.php?key='.$_REQUEST[key].'">Go Back To Admin Page</a></td>
</tr>
</table>';
-
+
?>
diff --git a/html/pages/admin/editweapons.php b/html/pages/admin/editweapons.php
index dec6b64..e7b3251 100644
--- a/html/pages/admin/editweapons.php
+++ b/html/pages/admin/editweapons.php
@@ -1,6 +1,6 @@
<?php
if (empty($import_adminkey) or isset($_REQUEST['import_adminkey']) or $import_adminkey != $adminkey) die('bla');
-
+
if (isset($_REQUEST['submit'])) {
foreach($_REQUEST['image'] as $id => $bla) {
mysql_query(" UPDATE uts_weapons
@@ -17,7 +17,7 @@ echo'<br><table border="0" cellpadding="0" cellspacing="0" width="600">
</tr>
<tr>
<td class="smheading">Name</td>
- <td class="smheading" align="center" '.OverlibPrintHint('', 'Image to display instead of the weapon\'s name<br>Should exist in images/weapons/<br>Leave empty to display the weapon name').'>Image</td>
+ <td class="smheading" align="center" '.OverlibPrintHint('', 'Image to display instead of the weapon\'s name<br>Should exist in assets/images/weapons/<br>Leave empty to display the weapon name').'>Image</td>
<td class="smheading" '.OverlibPrintHint('', 'Use this number to set the weapons order to your liking').'>Order</td>
<td class="smheading" '.OverlibPrintHint('', 'If checked, this weapon won\'t be shown (including kills, shots, acc, ...)').'>Hide</td>
</tr>
@@ -39,7 +39,7 @@ while ($r_weapons = mysql_fetch_array($q_weapons)) {
echo '<table border="0" cellspacing="0" cellpadding="0" width="100%"><tr><td width="60%">';
echo '<input class="searchform" type="text" name="image['.$r_weapons['id'].']" value="'.$r_weapons['image'].'">';
echo '</td><td width="40%" align="center">';
- if (!empty($r_weapons['image'])) echo ' <img src="images/weapons/'. $r_weapons['image'] .'" border="0">';
+ if (!empty($r_weapons['image'])) echo ' <img src="assets/images/weapons/'. $r_weapons['image'] .'" border="0">';
echo' </td></tr></table></td>';
echo '<td class="'.$class.'"><input class="searchform" type="text" name="sequence['.$r_weapons['id'].']" value="'.$r_weapons['sequence'].'" size="3" maxlength="3"></td>';
echo '<td class="'.$class.'"><input class="searchform" type="checkbox" name="hide['.$r_weapons['id'].']" '.($r_weapons['hide'] == 'Y' ? 'checked' : '').'></td>';
@@ -54,5 +54,5 @@ echo'</form>
<tr>
<td class="smheading" align="center" colspan="4"><a class="grey" href="./admin.php?key='.$_REQUEST[key].'">Go Back To Admin Page</a></td>
</tr></table>';
-
+
?>
diff --git a/html/pages/admin/main.php b/html/pages/admin/main.php
index e2c191e..697909a 100644
--- a/html/pages/admin/main.php
+++ b/html/pages/admin/main.php
@@ -51,14 +51,14 @@ foreach($tables as $table) {
echo'<tr>
<td class="smheading" align="left" width="200">';
if (substr($table['name'], 0, 9) == 'uts_temp_' and strlen($table['name']) == 17) {
- echo '<a href="admin.php?key='. urlencode($adminkey) .'&amp;action=main&amp;droptable='.htmlentities($table['name']).'"><img src="images/del.png" border="0" width="16" height="16" title="Click to drop this table" alt="Delete" /></a><em>'.$table['name'].'</em>';
+ echo '<a href="admin.php?key='. urlencode($adminkey) .'&amp;action=main&amp;droptable='.htmlentities($table['name']).'"><img src="assets/images/del.png" border="0" width="16" height="16" title="Click to drop this table" alt="Delete" /></a><em>'.$table['name'].'</em>';
} else {
echo $table['name'];
}
echo '</td>
<td class="'.$class.'" align="right">'.nf($table['rows']).' rows</td>
<td class="'.$class.'" align="right">'.$d_size['size'] .' '. $d_size['type'].'</td>
- <td class="'.$class.'" width="'.($max_width + 5).'"><img border="0" src="images/bars/h_bar'. ($i % 16 + 1) .'.png" height="10" width="'.(int)($table['size'] / $max_size * $max_width).'" alt="'. $title .'" title="'. $title .'"></td>
+ <td class="'.$class.'" width="'.($max_width + 5).'"><img border="0" src="assets/images/bars/h_bar'. ($i % 16 + 1) .'.png" height="10" width="'.(int)($table['size'] / $max_size * $max_width).'" alt="'. $title .'" title="'. $title .'"></td>
</tr>';
}
diff --git a/html/pages/admin/utdclog.php b/html/pages/admin/utdclog.php
index b81f8d4..53ef2cd 100644
--- a/html/pages/admin/utdclog.php
+++ b/html/pages/admin/utdclog.php
@@ -61,9 +61,9 @@ if (empty($filename)) {
$d_size = file_size_info(filesize('logs/utdc/'. $log));
echo $d_size['size'] .' '. $d_size['type'];
echo '</td><td class="'.$class.'" align="center">';
- echo '<a href="admin.php?key='.$adminkey.'&amp;action='.$action.'&amp;filename='.urlencode($log).'&amp;del=1"><img src="images/del.png" border="0" width="16" height="16" title="Delete" alt="Delete" /></a>';
+ echo '<a href="admin.php?key='.$adminkey.'&amp;action='.$action.'&amp;filename='.urlencode($log).'&amp;del=1"><img src="assets/images/del.png" border="0" width="16" height="16" title="Delete" alt="Delete" /></a>';
echo '</td></tr>';
- }
+ }
}
}
@@ -74,7 +74,7 @@ if (!empty($filename)) {
<tr>
<td class="smheading" align="center" width="95%" colspan="3">'.$filename.'</td>
<td class="smheading" align="center" width="5%" align="right">';
- echo '<a href="admin.php?key='.$adminkey.'&amp;action='.$action.'&amp;filename='.urlencode($filename).'&amp;del=1"><img src="images/del.png" border="0" width="16" height="16" title="Delete" alt="Delete" /></a>';
+ echo '<a href="admin.php?key='.$adminkey.'&amp;action='.$action.'&amp;filename='.urlencode($filename).'&amp;del=1"><img src="assets/images/del.png" border="0" width="16" height="16" title="Delete" alt="Delete" /></a>';
echo '</td>
</tr>';
if (substr($filename, -4) == '.enc') {
@@ -85,10 +85,10 @@ if (!empty($filename)) {
else {
$fp = my_fopen('logs/utdc/'.$filename, 'rb', $compression = NULL);
if (!$fp) die("Error opening file");
-
+
$i = 0;
echo '<tr><td class="grey" colspan="4"><span style="font-family: monospace;">';
-
+
while (($line = my_fgets($fp, 5000, $compression)) !== FALSE) {
/*
$i++;
@@ -113,15 +113,16 @@ if (!empty($filename)) {
if ($filename == '.htaccess' or $filename == 'index.htm') continue;
if ((substr($file, -4) == '.enc') and
((substr($filename, strlen($filename)-(23 + $extra), 19) == substr($file, strlen($file)-23, 19)) or ((substr($filename, strlen($filename)-(23 + $extra), 17) == substr($file, strlen($file)-23, 17)) and (abs(intval(substr($file, strlen($file)- 6, 2)) - intval(substr($filename, strlen($filename)-(6 + $extra), 17))) <=3)))) {
- echo '<tr>
+ echo '<tr>
<td class="smheading" align="center" width="95%" colspan="3">'.$file.'</td>
- <td class="smheading" align="center" width="5%" align="right">';
- echo '<a href="admin.php?key='.$adminkey.'&amp;action='.$action.'&amp;filename='.urlencode($file).'&amp;del=1"><img src="images/del.png" border="0" width="16" height="16" title="Delete" alt="Delete" /></a>';
- echo '</td>
- </tr>';
-
+ <td class="smheading" align="center" width="5%" align="right">
+ <a href="admin.php?key='.$adminkey.'&amp;action='.$action.'&amp;filename='.urlencode($file).'&amp;del=1">
+ <img src="assets/images/del.png" border="0" width="16" height="16" title="Delete" alt="Delete" />
+ </a>
+ </td>
+ </tr>';
echo '<tr><td class="grey" colspan="4"><span style="font-family: monospace;">';
- echo '<a href = "pages/admin/utdcshot.php?filename='.urlencode($file).'" target = "_blank"><img src = "pages/admin/utdcshot.php?filename='.urlencode($file).'" width = 100% border = 0></a>';
+ echo '<a href="pages/admin/utdcshot.php?filename='.urlencode($file).'" target="_blank"><img src="pages/admin/utdcshot.php?filename='.urlencode($file).'" width="100%" border="0"></a>';
echo '</span></td></tr>';
}
}