Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Return deck search to working order, clean up a bit #698

Merged
merged 1 commit into from
Aug 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 18 additions & 21 deletions gatherling/decksearch.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,26 +6,19 @@

require_once 'lib.php';

print_header('Deck Search');
?>
<script src="/styles/Chandra/js/sorttable.js"></script>

<div class="grid_10 suffix_1 prefix_1">
<div id="gatherling_main" class="box">
<div class="uppertitle group">Deck Search </div>

<?php
handleRequest();

?>

function main(): void {
ob_start();
?>
<script src="/styles/Chandra/js/sorttable.js"></script>
<div class="grid_10 suffix_1 prefix_1">
<div id="gatherling_main" class="box">
<div class="uppertitle group">Deck Search</div>
<?php handleRequest(); ?>
</div>
</div>
</div>

<?php print_footer(); ?>


<?php
<?php
echo page('Deck Search', ob_get_clean());
}

function handleRequest()
{
Expand Down Expand Up @@ -162,7 +155,7 @@ function showMostPlayedDecks()
echo '<td><a href="deck.php?mode=view&id=' . $deckid . '">' . $deckName . '</a></td>';
echo '<td>' . $archetype . '</td>';
echo '<td>' . $format . '</td>';
echo '<td>' . $created . '</td>';
echo '<td>' . time_element(strtotime($created), time()) . '</td>';
echo '</tr>';
}

Expand Down Expand Up @@ -308,7 +301,7 @@ function seriesDropMenu($series = null, $useAll = 0, $form_name = 'series')
echo "<option value=\"\">$title</option>";
while ($thisSeries = $result->fetch_assoc()) {
$name = $thisSeries['name'];
$selStr = (strcmp($name, $series) == 0) ? 'selected' : '';
$selStr = ($series && strcmp($name, $series) == 0) ? 'selected' : '';
echo "<option value=\"$name\" $selStr>$name</option>";
}
echo '</select>';
Expand Down Expand Up @@ -404,3 +397,7 @@ function displayDecksFromID($id_arr)
echo '<br />';
echo '<br />';
}

if (basename(__FILE__) == basename($_SERVER['PHP_SELF'])) {
main();
}
4 changes: 1 addition & 3 deletions gatherling/styles/ChandraNeue/css/stylesheet.css
Original file line number Diff line number Diff line change
Expand Up @@ -320,8 +320,6 @@ a.create_deck_link {
}
#table-decksearch th {
color: white;
text-shadow: black 0.1em 0.1em 0.2em;
font-family: Georgia,"Times New Roman","Bitstream Charter",Times,serif;
font-weight: normal;
padding: 7px 7px 8px;
text-align: left;
Expand Down Expand Up @@ -805,7 +803,7 @@ del {
}
.box p, .box ul, .box .uppertitle, .box table, .box form,
.box h1, .box h2, .box h3, .box h4, .box h5, .box h6,
.box img {
.box .series-logo img {
padding: 5px 10px;
}
.uppertitle {
Expand Down