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; 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

View File

@ -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']);
@ -642,11 +641,11 @@ EOT;
$htmlRow .= "</td>"; $htmlRow .= "</td>";
$htmlRow .= "</tr>"; $htmlRow .= "</tr>";
// echo $htmlRow; // echo $htmlRow;
// 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 = [
@ -774,7 +770,7 @@ if ($cmd == "genDocGems") {
$htmlFinal .= $htmltop; $htmlFinal .= $htmltop;
echo $htmltop; echo $htmltop;
ob_flush(); ob_flush();
$table = '<table border=1 class="gemtable"> $table = '<table border=1 class="gemtable">
<thead> <thead>
<tr> <tr>
<th>Name</th> <th>Name</th>
@ -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) {
@ -842,42 +837,29 @@ if ($cmd == "genDocGems") {
$htmlRow .= "</tr>"; $htmlRow .= "</tr>";
$htmlFinal .= $htmlRow; $htmlFinal .= $htmlRow;
echo $htmlRow; echo $htmlRow;
ob_flush(); ob_flush();
} }
$htmlFinal .= $tableBottom . $htmlbottom; $htmlFinal .= $tableBottom . $htmlbottom;
echo $tableBottom . $htmlbottom; echo $tableBottom . $htmlbottom;
ob_flush(); ob_flush();
ob_start(); ob_start();
file_put_contents("$dir/gems.html", $htmlFinal); file_put_contents("$dir/gems.html", $htmlFinal);
header("Location: /docs/{$_SESSION['modname']}/gems.html"); header("Location: /docs/{$_SESSION['modname']}/gems.html");
} }
/* // 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,61 +962,44 @@ 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">
<td>
<tr class="rw"> <p class="rw-name gold">$name</p>
<td> <p class="rw-type">$itype1<br> $itype2<br> $itype3<br> $itype4<br> $itype5<br> $itype6</p>
<p class="rw-name gold">$name</p> </td>
<p class="rw-type">$itype1<br> $itype2<br> $itype3<br> $itype4<br> $itype5<br> $itype6</p> <td>
</td> <p class="rw-rune">
<td> <p>$img_s</p>
<p class="rw-rune"> $rcd[0] <br>
<p>$img_s</p> $rcd[1] <br>
$rcd[0] <br> $rcd[2] <br>
$rcd[1] <br> $rcd[3] <br>
$rcd[2] <br> $rcd[4] <br>
$rcd[3] <br> $rcd[5] <br>
$rcd[4] <br> <!--<p class="rw-count">$ rune_count</p>-->
$rcd[5] <br> </p></td>
<!--<p class="rw-count">$rune_count</p>--> <td>
<ul class="rprops blue">
</p></td> <li style="font-size: 140%;margin: 5px;" class="gold">$name</li>
<li> $props[1] </li>
<td> <li> $props[2] </li>
<ul class="rprops blue"> <li> $props[3] </li>
<li style="font-size: 140%;margin: 5px;" class="gold">$name</li> <li> $props[4] </li>
<li> $props[1] </li> <li> $props[5] </li>
<li> $props[2] </li> <li> $props[6] </li>
<li> $props[3] </li> <li> $props[7] </li>
<li> $props[4] </li> </ul>
<li> $props[5] </li> </td>
<li> $props[6] </li> </tr>
<li> $props[7] </li> EOT;
</ul>
</td>
</tr>
EOT;
} }
echo $htmltop; echo $htmltop;
echo $tableTop; echo $tableTop;
echo $tableRowsRunes; echo $tableRowsRunes;

View File

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

View File

@ -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>