<th width="30px">id</th> <th width="60px" filter-type='ddl'>type</th> <th filter-type='ddl'>brand_id</th> <th>marking</th> <th>image</th> <th>label</th> <th width="30%">title</th> <th width="60px">price</th> <th width="60px">amount</th> </tr> </thead> <tbody> <?php foreach ($products as $product) { //DEBUG /* if ($product["id"] == 3){ G::logMessage("IN DB 11 look like >> '" . $product["title"] ."'"); $res = mb_detect_encoding($product["title"], array("UTF-8", "WINDOWS-1251")); $resUTF = iconv("WINDOWS-1251", "UTF-8", $product["title"]); $resWIN = iconv("UTF-8", "WINDOWS-1251", $product["title"]); G::logMessage("mb_detect_encoding('" . $product["title"] . "') = " . $res . "; >> to UTF=" . $resUTF . "; to WIN=" . $resWIN . ";"); } */ // echo RenderUtils::renderNodeTableRow($product); } ?> </tbody> </table> </div>
$data["result"] = $result; $data["errors"] = G::$pageData->getErrors(); $pages = PageUtils::getItemsList("pages"); $data["itemList"] = $pages; } else { $data["result"] = false; $data["errors"] = array("access denied"); } break; case "catalogue": init("admin/"); if (G::$user->isOrHigher(U_MODERATOR)) { $result = G::$pageData->updateCatalogue($_POST); if ($result) { $p_data = G::$pageData->data; $p_data["tr_data"] = RenderUtils::renderNodeTableRow($p_data); // data for admin edit $product = G::$pageData->data["current_product"]; //DEBUG G::logMessage("product => {$product}"); // if ($product) { $p_data["price_uah"] = $product->getPrice("UAH"); $p_data["price_usd"] = $product->getPrice("USD"); $p_data["content"] = $product->content; $images_data = $product->getImagesData(); $p_data["img_small"] = $images_data["small"]; $p_data["img_medium"] = $images_data["medium"]; $p_data["img_large"] = $images_data["large"]; $brand = G::$pageData->getBrand($product->brand_id); if ($brand) {