Latest working copy. Cleanup

This commit is contained in:
Hash Borgir 2022-03-27 04:38:03 -06:00
parent d8a30fcb83
commit d997ef1ed6
7 changed files with 77998 additions and 94399 deletions

File diff suppressed because one or more lines are too long

View File

@ -182,6 +182,9 @@
max-height: 128px;
}
table {
width: 100%;
}
</style>
<script src="res/jquery-3.5.1.min.js"></script>
@ -196,6 +199,13 @@
$('.utable').dataTable();
$('.gemtable').dataTable();
$('.rtable').dataTable();
userAgent = window.navigator.userAgent
if(userAgent.includes("Windows") == true) {
$('.itemimage').css("margin-left","40px");
}
});
</script>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -125,7 +125,7 @@ if ($cmd == "genDocUniqueItems") {
<td class='item' 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">
</div>
<div class="item_stats" style="">
@ -263,10 +263,9 @@ EOT;
];
// 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);
// process each cube row here
foreach ($res as $r) {
$desc = str_replace('+', '<br>+<br>', $r['description']);
@ -487,7 +486,7 @@ EOT;
// Type code sare not in $strings (tbl files)
// Type codes are in ItemTypes in itemtypes.Code
// Type code's string name entry is in itemtypes.ItemType table--
$htmlRow = "<tr>";
$htmlRow .= "<td class='desc'>" . $output['desc'] . "</td>";
@ -642,11 +641,11 @@ EOT;
$htmlRow .= "</td>";
$htmlRow .= "</tr>";
// echo $htmlRow;
// ob_flush();
// echo $htmlRow;
// ob_flush();
$htmlFinal .= $htmlRow;
//ob_flush();
// ob_flush();
unset($output);
}// end each row loop
@ -694,9 +693,6 @@ if ($cmd == "genDocGems") {
ON g.code = s.Key";
$res = array_filter(PDO_FetchAll($sql));
//ddump($res);
foreach ($res as $r) {
for ($i = 1; $i <= 3; $i++) {
$params = [
@ -774,7 +770,7 @@ if ($cmd == "genDocGems") {
$htmlFinal .= $htmltop;
echo $htmltop;
ob_flush();
$table = '<table border=1 class="gemtable">
$table = '<table border=1 class="gemtable">
<thead>
<tr>
<th>Name</th>
@ -791,7 +787,6 @@ if ($cmd == "genDocGems") {
$htmlFinal .= $table;
ob_flush();
// $gems are all the gems, processed, now display them
foreach ($gems as $g) {
@ -842,42 +837,29 @@ if ($cmd == "genDocGems") {
$htmlRow .= "</tr>";
$htmlFinal .= $htmlRow;
echo $htmlRow;
ob_flush();
echo $htmlRow;
ob_flush();
}
$htmlFinal .= $tableBottom . $htmlbottom;
echo $tableBottom . $htmlbottom;
ob_flush();
echo $tableBottom . $htmlbottom;
ob_flush();
ob_start();
ob_start();
file_put_contents("$dir/gems.html", $htmlFinal);
header("Location: /docs/{$_SESSION['modname']}/gems.html");
}
/*
*
*
* @cmd = genDocRunewords
*
*/
// generate runewords
if ($cmd == 'genDocRunewords') {
// ddump($_SESSION);
//ddump($isc);
$sql = 'SELECT * FROM runes';
$runes = array_filter(PDO_FetchAll($sql));
$sql = 'SELECT code,invfile from misc';
$rune_inv_codes = array_filter(PDO_FetchAssoc($sql));
// ddump($rune_inv_codes);
$sql = 'SELECT * FROM strings';
$strings = array_filter(PDO_FetchAssoc($sql));
@ -951,24 +933,14 @@ if ($cmd == 'genDocRunewords') {
$rune_count = count($rr);
$rune_count_duplicates = array_count_values($rr);
// echo "<pre>";
// var_dump($rune_count_duplicates);
$rcd = null;
foreach ($rune_count_duplicates as $k => $v) {
// rune * count
$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++) {
if ($rune["T1Code{$i}"] != '') {
$params = [
"string1" => $isc[$rune["T1Code{$i}"]]["string1"],
"string2" => $isc[$rune["T1Code{$i}"]]["string2"],
@ -990,61 +962,44 @@ if ($cmd == 'genDocRunewords') {
}
$props = array_unique($props);
// for each $rune, echo props
// echo "<pre>";
// var_dump($props);
$rr_img = array_filter($rr_img);
$img_s = '';
foreach ($rr_img as $k) {
$img_s .= "<img class='rune-img' src='img/items/{$k}.png'>";
}
//ddump($img_s);
$tableRowsRunes .= <<<EOT
<tr class="rw">
<td>
<p class="rw-name gold">$name</p>
<p class="rw-type">$itype1<br> $itype2<br> $itype3<br> $itype4<br> $itype5<br> $itype6</p>
</td>
<td>
<p class="rw-rune">
<p>$img_s</p>
$rcd[0] <br>
$rcd[1] <br>
$rcd[2] <br>
$rcd[3] <br>
$rcd[4] <br>
$rcd[5] <br>
<!--<p class="rw-count">$rune_count</p>-->
</p></td>
<td>
<ul class="rprops blue">
<li style="font-size: 140%;margin: 5px;" class="gold">$name</li>
<li> $props[1] </li>
<li> $props[2] </li>
<li> $props[3] </li>
<li> $props[4] </li>
<li> $props[5] </li>
<li> $props[6] </li>
<li> $props[7] </li>
</ul>
</td>
</tr>
EOT;
<tr class="rw">
<td>
<p class="rw-name gold">$name</p>
<p class="rw-type">$itype1<br> $itype2<br> $itype3<br> $itype4<br> $itype5<br> $itype6</p>
</td>
<td>
<p class="rw-rune">
<p>$img_s</p>
$rcd[0] <br>
$rcd[1] <br>
$rcd[2] <br>
$rcd[3] <br>
$rcd[4] <br>
$rcd[5] <br>
<!--<p class="rw-count">$ rune_count</p>-->
</p></td>
<td>
<ul class="rprops blue">
<li style="font-size: 140%;margin: 5px;" class="gold">$name</li>
<li> $props[1] </li>
<li> $props[2] </li>
<li> $props[3] </li>
<li> $props[4] </li>
<li> $props[5] </li>
<li> $props[6] </li>
<li> $props[7] </li>
</ul>
</td>
</tr>
EOT;
}
echo $htmltop;
echo $tableTop;
echo $tableRowsRunes;

View File

@ -96,9 +96,6 @@ option {
border: #ccc;
}
.row {
padding: 0 10px;
}
.col-2,
.col-3,

View File

@ -184,6 +184,9 @@ $htmltop = <<<EOT
max-height: 128px;
}
table {
width: 100%;
}
</style>
<script src="res/jquery-3.5.1.min.js"></script>
@ -198,6 +201,13 @@ $htmltop = <<<EOT
$('.utable').dataTable();
$('.gemtable').dataTable();
$('.rtable').dataTable();
userAgent = window.navigator.userAgent
if(userAgent.includes("Windows") == true) {
$('.itemimage').css("margin-left","40px");
}
});
</script>