diff --git a/cp/app/Controllers/SystemController.php b/cp/app/Controllers/SystemController.php index db30cad..51f506a 100644 --- a/cp/app/Controllers/SystemController.php +++ b/cp/app/Controllers/SystemController.php @@ -653,7 +653,9 @@ class SystemController extends Controller $premium_pricing = $db->selectRow('SELECT * FROM premium_domain_pricing WHERE tld_id = ?', [ $tld['id'] ]); $premium_categories = $db->select('SELECT * FROM premium_domain_categories'); - + $promotions = $db->select('SELECT * FROM promotion_pricing WHERE tld_id = ?', + [ $tld['id'] ]); + // Mapping of regex patterns to script names $regexToScriptName = [ '/^(?!-)(?!.*--)[A-Z0-9-]{1,63}(? 'ASCII', @@ -681,6 +683,7 @@ class SystemController extends Controller 'tld_restore' => $tld_restore, 'premium_pricing' => $premium_pricing, 'premium_categories' => $premium_categories, + 'promotions' => $promotions, 'currentUri' => $uri ]); } else { diff --git a/cp/resources/views/admin/system/manageTld.twig b/cp/resources/views/admin/system/manageTld.twig index 3728085..56a0279 100644 --- a/cp/resources/views/admin/system/manageTld.twig +++ b/cp/resources/views/admin/system/manageTld.twig @@ -190,6 +190,82 @@ + +
+
+
Manage Promotions
+
+
+
+ + + + + + + + + + + + + + {% for promo in promotions %} + + + + + + + + + + {% else %} + + + + {% endfor %} + +
IDPromotion NameStart DateEnd DateDiscount (%)Discount AmountDescription
{{ promo.id }}{{ promo.promo_name }}{{ promo.start_date }}{{ promo.end_date }}{{ promo.discount_percentage ? promo.discount_percentage ~ '%' : 'N/A' }}{{ promo.discount_amount ? promo.discount_amount : 'N/A' }}{{ promo.description ? promo.description : 'N/A' }}
No promotions found.
+
+
Create New Promotion
+
+ {{ csrf.field | raw }} + +
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ +
+