$header = "Товары на модерации"; $GLOBALS['IERA_LINKS'][] = array('title' => $header, 'url' => _base_url . '/cabinet/productsonmoderation/'); $list = $Products->GetProductsOnModeration($_SESSION['member']['id_user']); $tpl->Assign('list', $list); $parsed_res = array('issuccess' => true, 'html' => $tpl->Parse($GLOBALS['PATH_tpl'] . 'products_on_moderation.tpl')); } elseif (isset($cabinet_page) && $cabinet_page == "promo_orders") { $header = "Заказы с промо-кодом"; $GLOBALS['IERA_LINKS'][] = array('title' => $header, 'url' => _base_url . '/cabinet/promo_orders/'); $orders = $Order->GetOrdersByPromoSupplier($_SESSION['member']['id_user']); $tpl->Assign('orders', $orders); $parsed_res = array('issuccess' => true, 'html' => $tpl->Parse($GLOBALS['PATH_tpl'] . 'promo_orders.tpl')); } elseif (isset($cabinet_page) && $cabinet_page == "promo_codes") { $header = "Промо-коды"; $GLOBALS['IERA_LINKS'][] = array('title' => $header, 'url' => _base_url . '/cabinet/promo_codes/'); if (isset($_POST['submit'])) { if ($Supplier->AddPromoCode($_POST['percent'], $_POST['name'])) { header('Location: /cabinet/promo_codes/'); } } elseif (isset($_POST['delete'])) { if ($Supplier->DeletePromoCode($_POST['id'])) { header('Location: /cabinet/promo_codes/'); } } elseif (isset($_POST['edit'])) { if ($Supplier->EditPromoCode($_POST['id'], $_POST['percent'], $_POST['name'])) { header('Location: /cabinet/promo_codes/'); } } $tpl->Assign('promo', $Supplier->GetPromoCodes($_SESSION['member']['id_user'])); $tpl->Assign('code', $Users->GetUsersByPromoSupplier($_SESSION['member']['id_user'])); $parsed_res = array('issuccess' => true, 'html' => $tpl->Parse($GLOBALS['PATH_tpl'] . 'promo_codes.tpl')); } elseif (isset($cabinet_page) && $cabinet_page == "editproduct") {