|
|
|
@ -37,12 +37,16 @@ if (defined("EDIT_MODE") && EDIT_MODE == true) {
|
|
|
|
|
max-width: <?php echo ($pubdata["landscape"] == 0 ? $pagesize["width"] : $pagesize["height"]); ?>;
|
|
|
|
|
min-height: <?php echo ($pubdata["landscape"] == 0 ? $pagesize["height"] : $pagesize["width"]); ?>;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.page-safe-line .bottom {
|
|
|
|
|
top: calc(<?php echo ($pubdata["landscape"] == 0 ? $pagesize["height"] : $pagesize["width"]); ?> - 5mm);
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|
|
|
|
|
|
<style nonce="<?php echo $SECURE_NONCE; ?>" media="all">
|
|
|
|
|
<?php
|
|
|
|
|
$styles = $database->select("tile_styles", ["styleid", "css"]);
|
|
|
|
|
$tiles = $database->select("tiles", ["tileid", "page", "styleid", "content", "width", "order"], ["pubid" => $pub, "ORDER" => "order"]);
|
|
|
|
|
$tiles = $database->select("tiles", ["tileid", "page", "styleid", "content", "width", "order"], ["pubid" => $pub, "ORDER" => ["page", "order"]]);
|
|
|
|
|
foreach ($styles as $style) {
|
|
|
|
|
?>
|
|
|
|
|
.tile-style-<?php echo $style["styleid"]; ?> {
|
|
|
|
@ -64,30 +68,48 @@ foreach ($tiles as $tile) {
|
|
|
|
|
?>
|
|
|
|
|
</style>
|
|
|
|
|
|
|
|
|
|
<div class="pub-content">
|
|
|
|
|
<div class="tile-bin">
|
|
|
|
|
<?php
|
|
|
|
|
foreach ($tiles as $tile) {
|
|
|
|
|
?>
|
|
|
|
|
<div class="tile" id="tile-<?php echo $tile["tileid"]; ?>" data-tileid="<?php echo $tile["tileid"]; ?>" data-page="<?php echo $tile["page"]; ?>" data-styleid="<?php echo $tile["styleid"]; ?>" data-width="<?php echo $tile["width"]; ?>" data-order="<?php echo $tile["order"]; ?>">
|
|
|
|
|
<?php
|
|
|
|
|
if (defined("EDIT_MODE") && EDIT_MODE == true) {
|
|
|
|
|
?><div class="btn-group btn-group-sm">
|
|
|
|
|
<button type="button" class="btn btn-default edit-btn" data-tile="<?php echo $tile["tileid"]; ?>"><i class="fa fa-pencil"></i> <?php lang("edit"); ?></button>
|
|
|
|
|
<button type="button" class="btn btn-default save-btn" data-tile="<?php echo $tile["tileid"]; ?>"><i class="fa fa-save"></i> <?php lang("save"); ?></button>
|
|
|
|
|
<button type="button" class="btn btn-default opts-btn" data-tile="<?php echo $tile["tileid"]; ?>" data-toggle="modal" data-target="#tile-options-modal"><i class="fa fa-gear"></i> <?php lang("options"); ?></button>
|
|
|
|
|
</div>
|
|
|
|
|
<?php } ?>
|
|
|
|
|
<div id="tile-<?php echo $tile["tileid"]; ?>-content" class="tile-style-<?php echo $tile["styleid"]; ?>">
|
|
|
|
|
<div class="tile-html"><?php echo $tile["content"]; ?></div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<?php
|
|
|
|
|
// Get a list of pages
|
|
|
|
|
$pages = [];
|
|
|
|
|
foreach ($tiles as $tile) {
|
|
|
|
|
if (!in_array($tile["page"], $pages)) {
|
|
|
|
|
$pages[] = $tile["page"];
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
foreach ($pages as $page) {
|
|
|
|
|
?>
|
|
|
|
|
<div class="pub-content">
|
|
|
|
|
<div class="page-safe-line">
|
|
|
|
|
<div class="bottom"></div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="tile-bin">
|
|
|
|
|
<?php
|
|
|
|
|
}
|
|
|
|
|
?>
|
|
|
|
|
foreach ($tiles as $tile) {
|
|
|
|
|
if ($tile["page"] == $page) {
|
|
|
|
|
?>
|
|
|
|
|
<div class="tile" id="tile-<?php echo $tile["tileid"]; ?>" data-tileid="<?php echo $tile["tileid"]; ?>" data-page="<?php echo $tile["page"]; ?>" data-styleid="<?php echo $tile["styleid"]; ?>" data-width="<?php echo $tile["width"]; ?>" data-order="<?php echo $tile["order"]; ?>">
|
|
|
|
|
<?php
|
|
|
|
|
if (defined("EDIT_MODE") && EDIT_MODE == true) {
|
|
|
|
|
?><div class="btn-group btn-group-sm">
|
|
|
|
|
<button type="button" class="btn btn-default edit-btn" data-tile="<?php echo $tile["tileid"]; ?>"><i class="fa fa-pencil"></i> <?php lang("edit"); ?></button>
|
|
|
|
|
<button type="button" class="btn btn-default save-btn" data-tile="<?php echo $tile["tileid"]; ?>"><i class="fa fa-save"></i> <?php lang("save"); ?></button>
|
|
|
|
|
<button type="button" class="btn btn-default opts-btn" data-tile="<?php echo $tile["tileid"]; ?>" data-toggle="modal" data-target="#tile-options-modal"><i class="fa fa-gear"></i> <?php lang("options"); ?></button>
|
|
|
|
|
</div>
|
|
|
|
|
<?php } ?>
|
|
|
|
|
<div id="tile-<?php echo $tile["tileid"]; ?>-content" class="tile-style-<?php echo $tile["styleid"]; ?>">
|
|
|
|
|
<div class="tile-html"><?php echo $tile["content"]; ?></div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<?php
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
?>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<?php
|
|
|
|
|
<?php
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$content = ob_get_clean();
|
|
|
|
|
|
|
|
|
|
if (defined("HTML_ME") || !defined("IN_NEWSPEN")) {
|
|
|
|
|