mirror of
https://github.com/itflow-org/itflow
synced 2026-03-21 04:55:39 +00:00
Updated Sharing to include Unlimited Time and the option to use 0 for unlimited views
This commit is contained in:
@@ -38,8 +38,8 @@ if (mysqli_num_rows($sql) !== 1 || !$row) {
|
|||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check item share is active & hasn't been viewed too many times
|
// Check item share is active & hasn't been viewed too many times but allow 0 views as that is consider infinite views
|
||||||
if ($row['item_active'] !== "1" || $row['item_views'] >= $row['item_view_limit']) {
|
if ($row['item_active'] !== "1" || ($row['item_view_limit'] > 0 && $row['item_views'] >= $row['item_view_limit'])) {
|
||||||
echo "<div class='alert alert-danger'>Item cannot be viewed at this time. Check with the person that sent you this link to ensure it is correct and has not expired.</div>";
|
echo "<div class='alert alert-danger'>Item cannot be viewed at this time. Check with the person that sent you this link to ensure it is correct and has not expired.</div>";
|
||||||
include("guest_footer.php");
|
include("guest_footer.php");
|
||||||
exit();
|
exit();
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
<div id="div_share_link_form">
|
<div id="div_share_link_form">
|
||||||
|
|
||||||
<label>Views / Expire <strong class="text-danger">*</strong></label>
|
<label>Views / Expire <strong class="text-danger">*</strong> <small class="text-secondary">Enter 0 for unlimited</small></label>
|
||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
<div class="col-4">
|
<div class="col-4">
|
||||||
<div class="input-group mb-3">
|
<div class="input-group mb-3">
|
||||||
@@ -36,6 +36,8 @@
|
|||||||
<option value="30 MINUTE">30 Minutes</option>
|
<option value="30 MINUTE">30 Minutes</option>
|
||||||
<option value="24 HOUR">24 Hours (1 Day)</option>
|
<option value="24 HOUR">24 Hours (1 Day)</option>
|
||||||
<option value="72 HOUR">72 Hours (3 Days)</option>
|
<option value="72 HOUR">72 Hours (3 Days)</option>
|
||||||
|
<option value="100 YEAR">NEVER</option>
|
||||||
|
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user