Skip to content

Commit

Permalink
Update to v0.2.17
Browse files Browse the repository at this point in the history
- Fix Open Weather Map API Link. Preferences -> Contact.
- Remove Cover Image SrcSet extra image size causing some images to not display as intended.
- Add option to change available time for file downloads.
- Fix Summernote WYSIWYG Styling showing wrong colour when scrolling editable area.
- Add removing line breaks /r and /n characters causing unnecessary space between elements.
- Fix Inventory items showing options if reference ID happens to match the Inventory Items ID.
  • Loading branch information
Dennis Suitters committed Jun 21, 2022
1 parent 963c7d3 commit caa9a6c
Show file tree
Hide file tree
Showing 54 changed files with 133 additions and 97 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,11 @@
- Remove unnecessary comments.
- Change AVIF format images to WEBP, due to Safari (and Chrome, which is actually Safari on iOS and Mac) not having AVIF capabilities.
- Adjust "Maintenance", and "Coming Soon" pages to check if unavailable background could be AVIF, WEBP, JPG, JPEG, or PNG.

#### v0.2.17
- Fix Open Weather Map API Link. Preferences -> Contact.
- Remove Cover Image SrcSet extra image size causing some images to not display as intended.
- Add option to change available time for file downloads.
- Fix Summernote WYSIWYG Styling showing wrong colour when scrolling editable area.
- Add removing line breaks /r and /n characters causing unnecessary space between elements.
- Fix Inventory items showing options if reference ID happens to match the Inventory Items ID.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
![AuroraCMS](core/images/readmelogo.webp)
AuroraCMS the **Free** Australian Open Source [MIT](https://github.com/DiemenDesign/AuroraCMS/blob/master/LICENSE) licensed Content Management System, built primarily for Australian Businesses, built utilising [PHP](http://php.net/), PDO, [jQuery](http://jquery.com/) and [iCONS](https://github.com/DiemenDesign/iCONS). Built to take advantage of HTML5 and CSS3, with necessary SEO attributes that fit in with Google's recommendations, Micro-formats, JSON-LD, ARIA (A11Y), and general SEO Markup.

Current version is v0.2.16
Current version is v0.2.17

### Features
- AuroraCMS is a Quasi-MVC, Front End is completely MVC, with some AJAX Functions for Form Processing.
Expand Down Expand Up @@ -42,9 +42,9 @@ Current version is v0.2.16
- Determines Sales periods to current date to suggest edits a month in advance for items older than 11 months in a Dashboard widget, for Valentine's Day, Easter, Mother's Day, Father's Day, Black Friday, Halloween, Small Business Day, and Christmas.
- Front End parsing for Sales periods to promote items set with Sale periods for sales promotion.
- File Download options for electronic products, such as documents, ebooks.
- Download available directly from page when Order required isn't set.
- Option that file/s only available via Invoice, and time limit.
- Download link sent via Invoice when Invoice is Paid.
- Download available directly from page when Order required isn't set.
- Option that file/s only available via Invoice, and time limit.
- Download link sent via Invoice when Invoice is Paid.
- Newsletters.
- Proofs.
- User accessible area.
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v0.2.16
v0.2.17
75 changes: 42 additions & 33 deletions core/add_download.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @author Dennis Suitters <dennis@diemen.design>
* @copyright 2014-2019 Diemen Design
* @license http://opensource.org/licenses/MIT MIT License
* @version 0.2.16
* @version 0.2.17
* @link https://github.com/DiemenDesign/AuroraCMS
* @notes This PHP Script is designed to be executed using PHP 7+
*/
Expand Down Expand Up @@ -45,38 +45,47 @@
':ord'=>$iid+1
]);
echo'<script>'.
'window.top.window.$("#downloads").append(`<div class="row mt-1" id="l_'.$iid.'">'.
'<div class="form-row">'.
'<input type="text" name="t" value="'.$t.'" readonly>';
if($r==1){
echo'<div class="input-text">'.
'<label>Requires Order</label>&nbsp;<input type="checkbox" name="r" checked disabled>'.
'<label>&nbsp;and is Available for </label>';
if($a==3600)echo' 1 Hour';
if($a==7200)echo' 2 Hours';
if($a==14400)echo' 4 Hours';
if($a==28800)echo' 8 Hours';
if($a==86400)echo' 24 Hours';
if($a==172800)echo' 48 Hours';
if($a==604800)echo' 1 Week';
if($a==1209600)echo' 2 Weeks';
if($a==2592000)echo' 1 Month';
if($a==7776000)echo' 3 Months';
if($a==15552000)echo' 6 Months';
if($a==31536000)echo' 1 Year';
echo'</div>';
}
echo'</div>'.
'<div class="form-row">'.
'<input id="url'.$iid.'" name="url" type="text" value="'.$file.'" readonly>'.
'<form target="sp" action="core/purge.php">'.
'<input name="id" type="hidden" value="'.$iid.'">'.
'<input name="t" type="hidden" value="choices">'.
'<button class="trash" data-tooltip="tooltip" aria-label="Delete"><i class="i">trash</i></button>'.
'</form>'.
'</div>'.
'</div>`);'.
'</script>';
'window.top.window.$("#downloads").append(`<div class="row mt-1" id="l_'.$iid.'">'.
'<div class="form-row">'.
'<div class="input-text border-right-0 border-bottom-0">'.
'<label>Title:</label>'.
'</div>'.
'<input class="border-bottom-0 border-left-0" type="text" name="t" value="'.$t.'" placeholder="Uses Filename in place of title..." readonly>'.
'</div>';
if($r==1){
echo'<div class="form-row">'.
'<div class="input-text border-right-0 border-bottom-0">'.
'<label>Requires Order</label>&nbsp;<input type="checkbox" name="r" checked disabled>'.
'</div>'.
'<div class="input-text border-right-0 border-bottom-0 border-left-0 pr-0">'.
'<label>and&nbsp;is&nbsp;available&nbsp;for&nbsp;download&nbsp;for:</label>'.
'</div>'.
'<select class="border-bottom-0 border-left-0" id="downloada" name="a" onchange="update(\`'.$iid.'\`,\`choices\`,\`tie\`,$(this).val(),\`select\`);">'.
'<option value="0"'.($a==0?' selected':'').'>Forever</option>'.
'<option value="3600"'.($a==3600?' selected':'').'>1 Hour</option>'.
'<option value="7200"'.($a==7200?' selected':'').'>2 Hours</option>'.
'<option value="14400"'.($a==14400?' selected':'').'>4 Hours</option>'.
'<option value="28800"'.($a==28800?' selected':'').'>8 Hours</option>'.
'<option value="86400"'.($a==86400?' selected':'').'>24 Hours</option>'.
'<option value="172800"'.($a==172800?' selected':'').'>48 Hours</option>'.
'<option value="604800"'.($a==604800?' selected':'').'>1 Week</option>'.
'<option value="1209600"'.($a==1209600?' selected':'').'>2 Weeks</option>'.
'<option value="2592000"'.($a==2592000?' selected':'').'>1 Month</option>'.
'<option value="7776000"'.($a==7776000?' selected':'').'>3 Months</option>'.
'<option value="15552000"'.($a==15552000?' selected':'').'>6 Months</option>'.
'<option value="31536000"'.($a==31536000?' selected':'').'>1 Year</option>'.
'</select>'.
'</div>';
}
echo'<div class="form-row">'.
'<input id="url'.$iid.'" name="url" type="text" value="'.$file.'" readonly>'.
'<form target="sp" action="core/purge.php">'.
'<input name="id" type="hidden" value="'.$iid.'">'.
'<input name="t" type="hidden" value="choices">'.
'<button class="trash" data-tooltip="tooltip" aria-label="Delete"><i class="i">trash</i></button>'.
'</form>'.
'</div>'.
'</div>`);</script>';
}else{
echo'window.top.window.toastr["error"]("An error occured while uploading the file!");';
}
Expand Down
4 changes: 3 additions & 1 deletion core/css/stylesheet-icons.css

Large diffs are not rendered by default.

14 changes: 9 additions & 5 deletions core/downloads.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @author Dennis Suitters <dennis@diemen.design>
* @copyright 2014-2019 Diemen Design
* @license http://opensource.org/licenses/MIT MIT License
* @version 0.2.16
* @version 0.2.17
* @link https://github.com/DiemenDesign/AuroraCMS
* @notes This PHP Script is designed to be executed using PHP 7+
*/
Expand All @@ -26,11 +26,15 @@
$so->execute([':iid'=>$oc]);
if($so->rowCount()>0){
$ro=$so->fetch(PDO::FETCH_ASSOC);
$tichk=$ro['iid_ti'] + $r['tie'];
if($ti < $tichk){
if($r['tie']==0){
SendFileDownload($r['url']);
}else
echo'File has expired, or is no longer available';
}else{
$tichk=$ro['iid_ti'] + $r['tie'];
if($ti < $tichk){
SendFileDownload($r['url']);
}else
echo'File has expired, or is no longer available';
}
}else
echo'File has expired, or is no longer available';
}else
Expand Down
29 changes: 15 additions & 14 deletions core/email_order.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @author Dennis Suitters <dennis@diemen.design>
* @copyright 2014-2019 Diemen Design
* @license http://opensource.org/licenses/MIT MIT License
* @version 0.2.16
* @version 0.2.17
* @link https://github.com/DiemenDesign/AuroraCMS
* @notes This PHP Script is designed to be executed using PHP 7+
*/
Expand Down Expand Up @@ -116,19 +116,20 @@
$sd->execute([':id'=>$i['id']]);
if($sd->rowCount()>0){
while($rd=$sd->fetch(PDO::FETCH_ASSOC)){
$downloads.='<a href="'.URL.'downloads/'.$rd['url'].'?oc='.$r['iid'].'">'.($rd['title']!=''?$rd['title']:$rd['url']).'</a> (Available for ';
if($rd['tie']==3600)$downloads.=' 1 Hour';
if($rd['tie']==7200)$downloads.=' 2 Hours';
if($rd['tie']==14400)$downloads.=' 4 Hours';
if($rd['tie']==28800)$downloads.=' 8 Hours';
if($rd['tie']==86400)$downloads.=' 24 Hours';
if($rd['tie']==172800)$downloads.=' 48 Hours';
if($rd['tie']==604800)$downloads.=' 1 Week';
if($rd['tie']==1209600)$downloads.=' 2 Weeks';
if($rd['tie']==2592000)$downloads.=' 1 Month';
if($rd['tie']==7776000)$downloads.=' 3 Months';
if($rd['tie']==15552000)$downloads.=' 6 Months';
if($rd['tie']==31536000)$downloads.=' 1 Year';
$downloads.='<a href="'.URL.'downloads/'.$rd['url'].'?oc='.$r['iid'].'">'.($rd['title']!=''?$rd['title']:$rd['url']).'</a> (Available ';
if($rd['tie']==0)$downloads.=' forever';
if($rd['tie']==3600)$downloads.=' for 1 Hour';
if($rd['tie']==7200)$downloads.=' for 2 Hours';
if($rd['tie']==14400)$downloads.=' for 4 Hours';
if($rd['tie']==28800)$downloads.=' for 8 Hours';
if($rd['tie']==86400)$downloads.=' for 24 Hours';
if($rd['tie']==172800)$downloads.=' for 48 Hours';
if($rd['tie']==604800)$downloads.=' for 1 Week';
if($rd['tie']==1209600)$downloads.=' for 2 Weeks';
if($rd['tie']==2592000)$downloads.=' for 1 Month';
if($rd['tie']==7776000)$downloads.=' for 3 Months';
if($rd['tie']==15552000)$downloads.=' for 6 Months';
if($rd['tie']==31536000)$downloads.=' for 1 Year';
$downloads.=')<br />';
}
}
Expand Down
Empty file modified core/images/auroracms.webp
100644 → 100755
Empty file.
Empty file modified core/images/readmelogo.webp
100644 → 100755
Empty file.
Empty file modified core/images/sale-blackfriday.webp
100644 → 100755
Empty file.
Empty file modified core/images/sale-christmas.webp
100644 → 100755
Empty file.
Empty file modified core/images/sale-easter.webp
100644 → 100755
Empty file.
Empty file modified core/images/sale-fathersday.webp
100644 → 100755
Empty file.
Empty file modified core/images/sale-halloween.webp
100644 → 100755
Empty file.
Empty file modified core/images/sale-mothersday.webp
100644 → 100755
Empty file.
Empty file modified core/images/sale-valentine.webp
100644 → 100755
Empty file.
Empty file modified core/images/shareicon.webp
100644 → 100755
Empty file.
Empty file modified core/images/unavailable.webp
100644 → 100755
Empty file.
Empty file modified core/images/weather/weather-ash-night.webp
100644 → 100755
Empty file.
Empty file modified core/images/weather/weather-ash.webp
100644 → 100755
Empty file.
Empty file modified core/images/weather/weather-aurora.webp
100644 → 100755
Empty file.
Empty file modified core/images/weather/weather-clear-night.webp
100644 → 100755
Empty file.
Empty file modified core/images/weather/weather-clear.webp
100644 → 100755
Empty file.
Empty file modified core/images/weather/weather-clouds-night.webp
100644 → 100755
Empty file.
Empty file modified core/images/weather/weather-clouds.webp
100644 → 100755
Empty file.
Empty file modified core/images/weather/weather-dust-night.webp
100644 → 100755
Empty file.
Empty file modified core/images/weather/weather-dust.webp
100644 → 100755
Empty file.
Empty file modified core/images/weather/weather-fog-night.webp
100644 → 100755
Empty file.
Empty file modified core/images/weather/weather-fog.webp
100644 → 100755
Empty file.
Empty file modified core/images/weather/weather-rain-night.webp
100644 → 100755
Empty file.
Empty file modified core/images/weather/weather-rain.webp
100644 → 100755
Empty file.
Empty file modified core/images/weather/weather-snow-night.webp
100644 → 100755
Empty file.
Empty file modified core/images/weather/weather-snow.webp
100644 → 100755
Empty file.
Empty file modified core/images/weather/weather-squall-night.webp
100644 → 100755
Empty file.
Empty file modified core/images/weather/weather-squall.webp
100644 → 100755
Empty file.
Empty file modified core/images/weather/weather-thunderstorm-night.webp
100644 → 100755
Empty file.
Empty file modified core/images/weather/weather-thunderstorm.webp
100644 → 100755
Empty file.
Empty file modified core/images/weather/weather-tornado-night.webp
100644 → 100755
Empty file.
Empty file modified core/images/weather/weather-tornado.webp
100644 → 100755
Empty file.
Binary file modified core/js/summernote/font/summernote.eot
100755 → 100644
Binary file not shown.
1 change: 1 addition & 0 deletions core/js/summernote/font/summernote.hash
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
9fe8a4284ea6542e5b857380d2288fbd
Binary file modified core/js/summernote/font/summernote.ttf
100755 → 100644
Binary file not shown.
Binary file modified core/js/summernote/font/summernote.woff
100755 → 100644
Binary file not shown.
Binary file modified core/js/summernote/font/summernote.woff2
100755 → 100644
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@
}
return output;
}

var cleanHtmlPaste = function(input, badTags, keepTagContents, badAttributes, imagePlaceholder) {
var stringStripper = /(\n|\r| class=(")?Mso[a-zA-Z]+(")? ^p)/g;
var output = input.replace(stringStripper, '');
Expand Down
2 changes: 1 addition & 1 deletion core/js/summernote/summernote.min.css
100755 → 100644

Large diffs are not rendered by default.

5 changes: 2 additions & 3 deletions core/js/summernote/summernote.min.js
100755 → 100644

Large diffs are not rendered by default.

55 changes: 33 additions & 22 deletions core/layout/edit_content.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @author Dennis Suitters <dennis@diemen.design>
* @copyright 2014-2019 Diemen Design
* @license http://opensource.org/licenses/MIT MIT License
* @version 0.2.16
* @version 0.2.17
* @link https://github.com/DiemenDesign/AuroraCMS
* @notes This PHP Script is designed to be executed using PHP 7+
*/
Expand Down Expand Up @@ -853,7 +853,7 @@ function slugify(str){
<?php if($r['contentType']!='testimonials'){?>
<div class="tab1-3 border-top p-4" data-tabid="tab1-3" role="tabpanel">
<?php if($user['options'][1]==1){?>
<legend>Files for Downloads</legend>
<legend>Downloadable Media</legend>
<form class="row mb-3" target="sp" method="post" action="core/add_download.php" enctype="multipart/form-data">
<input name="id" type="hidden" value="<?=$r['id'];?>">
<div class="form-row">
Expand All @@ -868,10 +868,11 @@ function slugify(str){
<label for="downloadr">Requires Order</label>&nbsp;<input id="downloadr" type="checkbox" name="r" value="1">
</div>
<div class="input-text border-right-0 border-bottom-0 border-left-0 pr-0">
<label for="downloada">and&nbsp;is&nbsp;available&nbsp;for:</label>
<label for="downloada">and&nbsp;is&nbsp;available&nbsp;for&nbsp;download&nbsp;for:</label>
</div>
<select class="border-bottom-0 border-left-0" id="downloada" name="a">
<option value="3600" selected>1 Hour</option>
<option value="0" selected>Forever</option>
<option value="3600">1 Hour</option>
<option value="7200">2 Hours</option>
<option value="14400">4 Hours</option>
<option value="28800">8 Hours</option>
Expand All @@ -898,26 +899,36 @@ function slugify(str){
while($rd=$sd->fetch(PDO::FETCH_ASSOC)){?>
<div class="row mt-1" id="l_<?=$rd['id'];?>">
<div class="form-row">
<input type="text" name="t" value="<?=$rd['title'];?>" placeholder="Uses Filename in place of title..." readonly>
<?php if($r['contentType']=='inventory'){?>
<div class="input-text">
<label>Requires Order</label>&nbsp;<input type="checkbox" name="r"<?=$rd['password'][0]==1?' checked':''?> disabled>
<label>Available for </label>
<?php if($rd['tie']==3600)echo' 1 Hour';
if($rd['tie']==7200)echo' 2 Hours';
if($rd['tie']==14400)echo' 4 Hours';
if($rd['tie']==28800)echo' 8 Hours';
if($rd['tie']==86400)echo' 24 Hours';
if($rd['tie']==172800)echo' 48 Hours';
if($rd['tie']==604800)echo' 1 Week';
if($rd['tie']==1209600)echo' 2 Weeks';
if($rd['tie']==2592000)echo' 1 Month';
if($rd['tie']==7776000)echo' 3 Months';
if($rd['tie']==15552000)echo' 6 Months';
if($rd['tie']==31536000)echo' 1 Year';?>
<div class="input-text border-right-0 border-bottom-0">
<label>Title:</label>
</div>
<?php }?>
<input class="border-bottom-0 border-left-0" type="text" name="t" value="<?=$rd['title'];?>" placeholder="Uses Filename in place of title..." readonly>
</div>
<?php if($r['contentType']=='inventory'){?>
<div class="form-row">
<div class="input-text border-right-0 border-bottom-0">
<label>Requires Order</label>&nbsp;<input type="checkbox" name="r"<?=$rd['password'][0]==1?' checked':''?> disabled>
</div>
<div class="input-text border-right-0 border-bottom-0 border-left-0 pr-0">
<label>and&nbsp;is&nbsp;available&nbsp;for&nbsp;download&nbsp;for:</label>
</div>
<select class="border-bottom-0 border-left-0" id="downloada" name="a" onchange="update('<?=$rd['id'];?>','choices','tie',$(this).val(),'select');">
<option value="0"<?=($rd['tie']==0?' selected':'');?>>Forever</option>
<option value="3600"<?=($rd['tie']==3600?' selected':'');?>>1 Hour</option>
<option value="7200"<?=($rd['tie']==7200?' selected':'');?>>2 Hours</option>
<option value="14400"<?=($rd['tie']==14400?' selected':'');?>>4 Hours</option>
<option value="28800"<?=($rd['tie']==28800?' selected':'');?>>8 Hours</option>
<option value="86400"<?=($rd['tie']==86400?' selected':'');?>>24 Hours</option>
<option value="172800"<?=($rd['tie']==172800?' selected':'');?>>48 Hours</option>
<option value="604800"<?=($rd['tie']==604800?' selected':'');?>>1 Week</option>
<option value="1209600"<?=($rd['tie']==1209600?' selected':'');?>>2 Weeks</option>
<option value="2592000"<?=($rd['tie']==2592000?' selected':'');?>>1 Month</option>
<option value="7776000"<?=($rd['tie']==7776000?' selected':'');?>>3 Months</option>
<option value="15552000"<?=($rd['tie']==15552000?' selected':'');?>>6 Months</option>
<option value="31536000"<?=($rd['tie']==31536000?' selected':'');?>>1 Year</option>
</select>
</div>
<?php }?>
<div class="form-row">
<input id="url<?=$rd['id'];?>" name="url" type="text" value="<?=$rd['url'];?>">
<form target="sp" action="core/purge.php">
Expand Down
8 changes: 5 additions & 3 deletions core/layout/pref_contact.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @author Dennis Suitters <dennis@diemen.design>
* @copyright 2014-2019 Diemen Design
* @license http://opensource.org/licenses/MIT MIT License
* @version 0.2.12
* @version 0.2.17
* @link https://github.com/DiemenDesign/AuroraCMS
* @notes This PHP Script is designed to be executed using PHP 7+
*/?>
Expand Down Expand Up @@ -296,13 +296,15 @@ function fixWidthHelper(e,ui){
<div class="form-row">
<input class="textinput" id="country" data-dbid="1" data-dbt="config" data-dbc="country" type="text" value="<?=$config['country'];?>" placeholder="Enter a Country...">
<button class="save" id="savecountry" data-dbid="country" data-style="zoom-in" data-tooltip="tooltip" aria-label="Save"><i class="i">save</i></button>
</div>https://openweathermap.org/

</div>
<label id="prefgeo_weatherAPI" for="geo_weatherAPI"><?=$user['rank']>899?'<a class="permalink" href="'.URL.$settings['system']['admin'].'/preferences/contact#prefgeo_weatherAPI" data-tooltip="tooltip" aria-label="PermaLink to Preferences Open Weather API Key Field">&#128279;</a>':'';?>Open Weather API Key</label>
<div class="form-row">
<input class="textinput" id="geo_weatherAPI" data-dbid="1" data-dbt="config" data-dbc="geo_weatherAPI" type="text" value="<?=$config['geo_weatherAPI'];?>" placeholder="Enter an API Key from Open Weather...">
<button class="save" id="savegeo_weatherAPI" data-dbid="geo_weatherAPI" data-style="zoom-in" data-tooltip="tooltip" aria-label="Save"><i class="i">save</i></button>
</div>
<div class="form-row">
<small class="form-text text-right">Visit <a target="_blank" href="https://openweatermap.org/">Open Weather Map</a> for an API Key.</small>
</div>

<label id="prefMapAPIKey" for="mapapikey"><?=$user['rank']>899?'<a class="permalink" href="'.URL.$settings['system']['admin'].'/preferences/contact#prefMapAPIKey" data-tooltip="tooltip" aria-label="PermaLink to Preferences Map API Key Field">&#128279;</a>':'';?>Map Box API Key</label>
<div class="form-row">
Expand Down
2 changes: 1 addition & 1 deletion core/layout/widget-topkeywords.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @author Dennis Suitters <dennis@diemen.design>
* @copyright 2014-2019 Diemen Design
* @license http://opensource.org/licenses/MIT MIT License
* @version 0.2.10
* @version 0.2.16
* @link https://github.com/DiemenDesign/AuroraCMS
* @notes This PHP Script is designed to be executed using PHP 7+
*/
Expand Down
5 changes: 2 additions & 3 deletions core/parser_item.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @author Dennis Suitters <dennis@diemen.design>
* @copyright 2014-2019 Diemen Design
* @license http://opensource.org/licenses/MIT MIT License
* @version 0.2.16
* @version 0.2.17
* @link https://github.com/DiemenDesign/AuroraCMS
* @notes This PHP Script is designed to be executed using PHP 7+
*/
Expand Down Expand Up @@ -266,7 +266,6 @@
$cover=basename($page['cover']);
if(file_exists('media/'.$cover)){
$coverHTML=(file_exists('media/'.$cover)?'<img srcset="'.
(file_exists('media/'.basename($cover))?'media/lg/'.$cover.' '.$config['mediaMaxWidth'].'w,':'').
(file_exists('media/lg/'.basename($cover))?'media/lg/'.$cover.' 1000w,':'').
(file_exists('media/md/'.basename($cover))?'media/md/'.$cover.' 600w,':'').
(file_exists('media/sm/'.basename($cover))?'media/sm/'.$cover.' 400w,':'').
Expand Down Expand Up @@ -606,7 +605,7 @@
$item=preg_replace('~<brand>.*?<\/brand>~is','',$item);
}
if(stristr($item,'<choices')){
$scq=$db->prepare("SELECT * FROM `".$prefix."choices` WHERE `rid`=:id ORDER BY `title` ASC");
$scq=$db->prepare("SELECT * FROM `".$prefix."choices` WHERE `contentType`='option' AND `rid`=:id ORDER BY `title` ASC");
$scq->execute([':id'=>isset($r['id'])?$r['id']:$page['id']]);
if($scq->rowCount()>0){
$choices='<select class="choices form-control" onchange="$(\'.addCart\').data(\'cartchoice\',$(this).val());$(\'.choices\').val($(this).val());">'.
Expand Down
Loading

0 comments on commit caa9a6c

Please sign in to comment.