<?php $list = delList(); if ($list) { foreach ($list as $item) { if ($lang['lang'] == 'en') { echo "<div>" . $item['titleen'] . "</div><a href=index.php?del=" . $item['id'] . ">" . $lang['delpage'] . "</a>"; } if ($lang['lang'] == 'ua') { echo "<div>" . $item['title'] . "</div><a href=index.php?del=" . $item['id'] . ">" . $lang['delpage'] . "</a>"; } } } if (!empty($_GET['del'])) { delMenu($_GET['del']); header("Location: index.php"); }
$menuName = $_POST["menuName"]; $menuDescription = $_POST["menuDescription"]; $menuCode = $_POST["menuCode"]; $menuRanking = $_POST["menuRanking"]; setMenu($menuID, $menuName, $menuDescription, $menuCode, $menuRanking, $mysqli); } if ($functionname == 'getMenu') { getMenu($mysqli); } if ($functionname == 'getMenuByID') { $menuID = $_POST["menuID"]; getMenuByID($menuID, $mysqli); } if ($functionname == 'delMenu') { $menuID = $_POST["menuID"]; delMenu($menuID, $mysqli); } /*MenuItem Item*/ if ($functionname == 'setMenuItem') { $menuItemID = $_POST["menuItemID"]; $menuMenuID = $_POST["menuMenuID"]; $menuItemName = $_POST["menuItemName"]; $menuItemDescription = $_POST["menuItemDescription"]; $menuItemCode = $_POST["menuItemCode"]; $menuItemRanking = $_POST["menuItemRanking"]; setMenuItem($menuItemID, $menuMenuID, $menuItemName, $menuItemDescription, $menuItemCode, $menuItemRanking, $mysqli); } if ($functionname == 'getMenuItem') { getMenuItem($mysqli); } if ($functionname == 'getMenuItemByID') {