mirror of
https://gitlab.com/hashborgir/d2tools.git
synced 2025-04-28 07:15:37 +00:00
Latest working copy. Cleanup
This commit is contained in:
parent
d8a30fcb83
commit
d997ef1ed6
File diff suppressed because one or more lines are too long
@ -182,6 +182,9 @@
|
|||||||
max-height: 128px;
|
max-height: 128px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
table {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<script src="res/jquery-3.5.1.min.js"></script>
|
<script src="res/jquery-3.5.1.min.js"></script>
|
||||||
@ -196,6 +199,13 @@
|
|||||||
$('.utable').dataTable();
|
$('.utable').dataTable();
|
||||||
$('.gemtable').dataTable();
|
$('.gemtable').dataTable();
|
||||||
$('.rtable').dataTable();
|
$('.rtable').dataTable();
|
||||||
|
|
||||||
|
|
||||||
|
userAgent = window.navigator.userAgent
|
||||||
|
if(userAgent.includes("Windows") == true) {
|
||||||
|
$('.itemimage').css("margin-left","40px");
|
||||||
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
57
genDocs.php
57
genDocs.php
@ -125,7 +125,7 @@ if ($cmd == "genDocUniqueItems") {
|
|||||||
<td class='item' style=''>
|
<td class='item' style=''>
|
||||||
<div class="center item_desc" style="">
|
<div class="center item_desc" style="">
|
||||||
|
|
||||||
<div style="margin-left: 40px; height: 116px;background: url(img/items/bg.png) center top no-repeat;">
|
<div class="itemimage" style="height: 116px;background: url(img/items/bg.png) center top no-repeat;">
|
||||||
<img style="" class="item img-fluid" src="img/items/{$item["invfile"]}.png">
|
<img style="" class="item img-fluid" src="img/items/{$item["invfile"]}.png">
|
||||||
</div>
|
</div>
|
||||||
<div class="item_stats" style="">
|
<div class="item_stats" style="">
|
||||||
@ -263,10 +263,9 @@ EOT;
|
|||||||
];
|
];
|
||||||
|
|
||||||
// get all cube rows
|
// get all cube rows
|
||||||
$sql = "SELECT * FROM cubemain WHERE enabled=1 LIMIT 500,500";
|
$sql = "SELECT * FROM cubemain WHERE enabled=1";
|
||||||
$res = PDO_FetchAll($sql);
|
$res = PDO_FetchAll($sql);
|
||||||
|
|
||||||
|
|
||||||
// process each cube row here
|
// process each cube row here
|
||||||
foreach ($res as $r) {
|
foreach ($res as $r) {
|
||||||
$desc = str_replace('+', '<br>+<br>', $r['description']);
|
$desc = str_replace('+', '<br>+<br>', $r['description']);
|
||||||
@ -646,7 +645,7 @@ EOT;
|
|||||||
// ob_flush();
|
// ob_flush();
|
||||||
|
|
||||||
$htmlFinal .= $htmlRow;
|
$htmlFinal .= $htmlRow;
|
||||||
//ob_flush();
|
// ob_flush();
|
||||||
unset($output);
|
unset($output);
|
||||||
}// end each row loop
|
}// end each row loop
|
||||||
|
|
||||||
@ -694,9 +693,6 @@ if ($cmd == "genDocGems") {
|
|||||||
ON g.code = s.Key";
|
ON g.code = s.Key";
|
||||||
$res = array_filter(PDO_FetchAll($sql));
|
$res = array_filter(PDO_FetchAll($sql));
|
||||||
|
|
||||||
//ddump($res);
|
|
||||||
|
|
||||||
|
|
||||||
foreach ($res as $r) {
|
foreach ($res as $r) {
|
||||||
for ($i = 1; $i <= 3; $i++) {
|
for ($i = 1; $i <= 3; $i++) {
|
||||||
$params = [
|
$params = [
|
||||||
@ -791,7 +787,6 @@ if ($cmd == "genDocGems") {
|
|||||||
$htmlFinal .= $table;
|
$htmlFinal .= $table;
|
||||||
ob_flush();
|
ob_flush();
|
||||||
|
|
||||||
|
|
||||||
// $gems are all the gems, processed, now display them
|
// $gems are all the gems, processed, now display them
|
||||||
foreach ($gems as $g) {
|
foreach ($gems as $g) {
|
||||||
|
|
||||||
@ -856,28 +851,15 @@ if ($cmd == "genDocGems") {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
// generate runewords
|
||||||
*
|
|
||||||
*
|
|
||||||
* @cmd = genDocRunewords
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
if ($cmd == 'genDocRunewords') {
|
if ($cmd == 'genDocRunewords') {
|
||||||
|
|
||||||
// ddump($_SESSION);
|
|
||||||
//ddump($isc);
|
|
||||||
|
|
||||||
$sql = 'SELECT * FROM runes';
|
$sql = 'SELECT * FROM runes';
|
||||||
$runes = array_filter(PDO_FetchAll($sql));
|
$runes = array_filter(PDO_FetchAll($sql));
|
||||||
|
|
||||||
$sql = 'SELECT code,invfile from misc';
|
$sql = 'SELECT code,invfile from misc';
|
||||||
$rune_inv_codes = array_filter(PDO_FetchAssoc($sql));
|
$rune_inv_codes = array_filter(PDO_FetchAssoc($sql));
|
||||||
|
|
||||||
// ddump($rune_inv_codes);
|
|
||||||
|
|
||||||
|
|
||||||
$sql = 'SELECT * FROM strings';
|
$sql = 'SELECT * FROM strings';
|
||||||
$strings = array_filter(PDO_FetchAssoc($sql));
|
$strings = array_filter(PDO_FetchAssoc($sql));
|
||||||
|
|
||||||
@ -951,24 +933,14 @@ if ($cmd == 'genDocRunewords') {
|
|||||||
$rune_count = count($rr);
|
$rune_count = count($rr);
|
||||||
$rune_count_duplicates = array_count_values($rr);
|
$rune_count_duplicates = array_count_values($rr);
|
||||||
|
|
||||||
// echo "<pre>";
|
|
||||||
// var_dump($rune_count_duplicates);
|
|
||||||
|
|
||||||
$rcd = null;
|
$rcd = null;
|
||||||
foreach ($rune_count_duplicates as $k => $v) {
|
foreach ($rune_count_duplicates as $k => $v) {
|
||||||
// rune * count
|
// rune * count
|
||||||
$rcd[] = "$k <span class='numrunes blue'>x</span> <span style='font-size: 2em;'>$v</span>";
|
$rcd[] = "$k <span class='numrunes blue'>x</span> <span style='font-size: 2em;'>$v</span>";
|
||||||
}
|
}
|
||||||
|
|
||||||
// echo "<pre>";
|
|
||||||
// var_dump($rcd);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
for ($i = 1; $i <= 7; $i++) {
|
for ($i = 1; $i <= 7; $i++) {
|
||||||
|
|
||||||
if ($rune["T1Code{$i}"] != '') {
|
if ($rune["T1Code{$i}"] != '') {
|
||||||
|
|
||||||
$params = [
|
$params = [
|
||||||
"string1" => $isc[$rune["T1Code{$i}"]]["string1"],
|
"string1" => $isc[$rune["T1Code{$i}"]]["string1"],
|
||||||
"string2" => $isc[$rune["T1Code{$i}"]]["string2"],
|
"string2" => $isc[$rune["T1Code{$i}"]]["string2"],
|
||||||
@ -990,24 +962,12 @@ if ($cmd == 'genDocRunewords') {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$props = array_unique($props);
|
$props = array_unique($props);
|
||||||
|
|
||||||
// for each $rune, echo props
|
|
||||||
// echo "<pre>";
|
|
||||||
// var_dump($props);
|
|
||||||
|
|
||||||
|
|
||||||
$rr_img = array_filter($rr_img);
|
$rr_img = array_filter($rr_img);
|
||||||
|
|
||||||
$img_s = '';
|
$img_s = '';
|
||||||
foreach ($rr_img as $k) {
|
foreach ($rr_img as $k) {
|
||||||
$img_s .= "<img class='rune-img' src='img/items/{$k}.png'>";
|
$img_s .= "<img class='rune-img' src='img/items/{$k}.png'>";
|
||||||
}
|
}
|
||||||
|
|
||||||
//ddump($img_s);
|
|
||||||
|
|
||||||
$tableRowsRunes .= <<<EOT
|
$tableRowsRunes .= <<<EOT
|
||||||
|
|
||||||
|
|
||||||
<tr class="rw">
|
<tr class="rw">
|
||||||
<td>
|
<td>
|
||||||
<p class="rw-name gold">$name</p>
|
<p class="rw-name gold">$name</p>
|
||||||
@ -1022,10 +982,8 @@ if ($cmd == 'genDocRunewords') {
|
|||||||
$rcd[3] <br>
|
$rcd[3] <br>
|
||||||
$rcd[4] <br>
|
$rcd[4] <br>
|
||||||
$rcd[5] <br>
|
$rcd[5] <br>
|
||||||
<!--<p class="rw-count">$rune_count</p>-->
|
<!--<p class="rw-count">$ rune_count</p>-->
|
||||||
|
|
||||||
</p></td>
|
</p></td>
|
||||||
|
|
||||||
<td>
|
<td>
|
||||||
<ul class="rprops blue">
|
<ul class="rprops blue">
|
||||||
<li style="font-size: 140%;margin: 5px;" class="gold">$name</li>
|
<li style="font-size: 140%;margin: 5px;" class="gold">$name</li>
|
||||||
@ -1039,12 +997,9 @@ if ($cmd == 'genDocRunewords') {
|
|||||||
</ul>
|
</ul>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
EOT;
|
||||||
|
|
||||||
EOT;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
echo $htmltop;
|
echo $htmltop;
|
||||||
echo $tableTop;
|
echo $tableTop;
|
||||||
echo $tableRowsRunes;
|
echo $tableRowsRunes;
|
||||||
|
@ -96,9 +96,6 @@ option {
|
|||||||
border: #ccc;
|
border: #ccc;
|
||||||
}
|
}
|
||||||
|
|
||||||
.row {
|
|
||||||
padding: 0 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.col-2,
|
.col-2,
|
||||||
.col-3,
|
.col-3,
|
||||||
|
@ -184,6 +184,9 @@ $htmltop = <<<EOT
|
|||||||
max-height: 128px;
|
max-height: 128px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
table {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<script src="res/jquery-3.5.1.min.js"></script>
|
<script src="res/jquery-3.5.1.min.js"></script>
|
||||||
@ -198,6 +201,13 @@ $htmltop = <<<EOT
|
|||||||
$('.utable').dataTable();
|
$('.utable').dataTable();
|
||||||
$('.gemtable').dataTable();
|
$('.gemtable').dataTable();
|
||||||
$('.rtable').dataTable();
|
$('.rtable').dataTable();
|
||||||
|
|
||||||
|
|
||||||
|
userAgent = window.navigator.userAgent
|
||||||
|
if(userAgent.includes("Windows") == true) {
|
||||||
|
$('.itemimage').css("margin-left","40px");
|
||||||
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user