summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2023-04-10 22:41:19 +0300
committerAndrew Dolgov <[email protected]>2023-04-10 22:41:19 +0300
commitd9fecc7db448ef9fd49f7fad89b97471aad8d141 (patch)
tree6636cb10c266b597bb80633d80fb5e239cc9bb6e
parent8d23f5fece7c65204e5c69c578a5711311f7660d (diff)
use short php echo tags
-rw-r--r--index.php48
1 files changed, 24 insertions, 24 deletions
diff --git a/index.php b/index.php
index 479c737..c938dd0 100644
--- a/index.php
+++ b/index.php
@@ -125,16 +125,16 @@
<div class="collapse navbar-collapse" id="nav-collapse">
<ul class="nav navbar-nav">
- <li class="<?php echo $index_active ?>"><a href="index.php">All</a></li>
- <li class="<?php echo $fav_active ?>"><a href="index.php?mode=favorites">Favorites</a></li>
+ <li class="<?= $index_active ?>"><a href="index.php">All</a></li>
+ <li class="<?= $fav_active ?>"><a href="index.php?mode=favorites">Favorites</a></li>
<li><a href="offline.html">Local</a></li>
</ul>
<form class="navbar-form navbar-right">
<div class="input-group">
<input type="text" name="query" class="form-control" placeholder="Search for..."
- value="<?php echo htmlspecialchars($query) ?>">
- <input type="hidden" name="mode" value="<?php echo $mode ?>">
+ value="<?= htmlspecialchars($query) ?>">
+ <input type="hidden" name="mode" value="<?= $mode ?>">
<span class="input-group-btn">
<button type="submit" class="btn btn-default">Go</button>
</span>
@@ -168,8 +168,8 @@
<form class="form-inline separate-search" style="display : none">
<div class="input-group">
<input type="text" name="query" class="form-control" placeholder="Search for..."
- value="<?php echo htmlspecialchars($query) ?>">
- <input type="hidden" name="mode" value="<?php echo $mode ?>">
+ value="<?= htmlspecialchars($query) ?>">
+ <input type="hidden" name="mode" value="<?= $mode ?>">
<span class="input-group-btn">
<button type="submit" class="btn btn-default">Go</button>
</span>
@@ -294,14 +294,14 @@
$data_sth->execute([$line['id']]);
?>
- <div class="col-xxs-6 col-xs-3 col-sm-3 col-md-2" id="cell-<?php echo $line["id"] ?>">
+ <div class="col-xxs-6 col-xs-3 col-sm-3 col-md-2" id="cell-<?= $line["id"] ?>">
<?php if ($read_link) { ?>
- <a class="thumbnail <?php echo $cover_class ?>" href="<?php echo $read_link ?>">
+ <a class="thumbnail <?= $cover_class ?>" href="<?= $read_link ?>">
<?php } else { ?>
- <span class="thumbnail <?php echo $cover_class ?>">
+ <span class="thumbnail <?= $cover_class ?>">
<?php } ?>
- <img style="display : none" data-book-id="<?php echo $line['id'] ?>" data-cover-link="<?php echo $cover_link ?>">
+ <img style="display : none" data-book-id="<?= $line['id'] ?>" data-cover-link="<?= $cover_link ?>">
<?php if ($read_link) { ?>
</a>
@@ -310,19 +310,19 @@
<?php } ?>
<div class="caption">
- <div title="<?php echo htmlspecialchars($line['title']) ?>" class="<?php echo $title_class ?>">
+ <div title="<?= htmlspecialchars($line['title']) ?>" class="<?= $title_class ?>">
<?php if ($read_link) { ?>
- <a href="<?php echo $read_link ?>"><?php echo $line['title'] ?></a>
+ <a href="<?= $read_link ?>"><?= $line['title'] ?></a>
<?php } else { ?>
- <?php echo $line['title'] ?>
+ <?= $line['title'] ?>
<?php } ?>
</div>
- <div><a title="<?php echo htmlspecialchars($series_full) ?>" href="<?php echo $series_link ?>">
- <?php echo $series_full ?></a></div>
+ <div><a title="<?= htmlspecialchars($series_full) ?>" href="<?= $series_link ?>">
+ <?= $series_full ?></a></div>
- <div><a title="<?php echo htmlspecialchars($line["author_sort"]) ?>" href="<?php echo $author_link ?>">
- <?php echo $line["author_sort"] ?></a></div>
+ <div><a title="<?= htmlspecialchars($line["author_sort"]) ?>" href="<?= $author_link ?>">
+ <?= $line["author_sort"] ?></a></div>
</div>
@@ -355,16 +355,16 @@
?>
<li><a href="#" onclick="return App.showSummary(this)"
- data-book-id="<?php echo $line["id"] ?>">Summary</a></li>
+ data-book-id="<?= $line["id"] ?>">Summary</a></li>
<li><a href="#" onclick="return App.toggleFavorite(this)"
- data-is-fav="<?php echo $fav_attr ?>"
- class="fav_item" data-book-id="<?php echo $line["id"] ?>">
- <?php echo $toggle_fav_prompt ?></a></li>
+ data-is-fav="<?= $fav_attr ?>"
+ class="fav_item" data-book-id="<?= $line["id"] ?>">
+ <?= $toggle_fav_prompt ?></a></li>
<?php if ($line["epub_id"]) { ?>
<li><a href="#" onclick=""
- data-book-id="<?php echo $line["id"] ?>" class="offline_dropitem"></a></li>
+ data-book-id="<?= $line["id"] ?>" class="offline_dropitem"></a></li>
<li class="divider"></li>
<?php } ?>
@@ -392,13 +392,13 @@
<ul class="pager">
<?php if ($offset > 0) { ?>
- <li class="previous"><a href="?<?php echo $prev_link ?>">&larr; Previous</a></li>
+ <li class="previous"><a href="?<?= $prev_link ?>">&larr; Previous</a></li>
<?php } else { ?>
<li class="previous disabled"><a href="#">&larr; Previous</a></li>
<?php } ?>
<?php if ($rows == $limit) { ?>
- <li class="next"><a href="?<?php echo $next_link ?>">Next&rarr;</a></li>
+ <li class="next"><a href="?<?= $next_link ?>">Next&rarr;</a></li>
<?php } else { ?>
<li class="next disabled"><a href="#">Next&rarr;</a></li>
<?php } ?>