Hi,
PHPMaker 2018.
I have a text field named as "photos" which accepts multiple photos uploading. (upload path for photos is : "pagephotos/")
I want to show the images as a gallery in a custom file. my table structure and custom file codes as below:
//// database table pages
CREATE TABLE pages
(
PageID
int(11) NOT NULL,
PageType
tinyint(1) NOT NULL DEFAULT '1',
PageKey
varchar(100) COLLATE utf8_unicode_ci NOT NULL,
PageTitle
varchar(255) COLLATE utf8_unicode_ci NOT NULL,
PageContent
text COLLATE utf8_unicode_ci NOT NULL,
photos
text COLLATE utf8_unicode_ci, // stores multiple photos for each record
PostDate
datetime NOT NULL,
PageView
bigint(20) DEFAULT '0'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ROW_FORMAT=COMPACT;
//////custom file codes: page.php
<?php
$MyRow = ew_ExecuteRow("SELECT * FROM pages WHERE PageKey = '".$_GET['PageKey']."'");
?>
<div class="box">
<div class="box-header with-border">
<h2 class="box-title"><?php echo $MyRow['PageTitle']; ?></h2>
<div class="box-tools pull-right">
<!-- Collapse Button -->
<button type="button" class="btn btn-box-tool" data-widget="collapse">
<i class="fa fa-minus"></i>
</button>
</div>
<!-- /.box-tools -->
</div>
<!-- /.box-header -->
<div class="box-body">
<?php
$paginate = new Pagebreak();
$paginate->splitText($MyRow['PageContent']);
$paginate->setPage();
$paginate->getContent();
$paginate->getPageLinks();
?>
</div>
<!-- /.box-body -->
<div class="box-footer">Last Edit: <?php echo $MyRow['PostDate']; ?> Hits: <?php echo $MyRow['PageView']; ?>
</div>
<!-- box-footer -->
</div>
<!-- /.box -->
please add the required codes to my existing file (page.php)
thank you for your help.
Mansour