$arts['count'] = $rows->count; $arts['arts'] = array_reverse($rows->arts); } } echo json_encode($arts); break; case 'prices': $data = file_get_contents('php://input'); $data = json_decode($data, true); $prices = $dg->prices($data); echo json_encode($prices); exit; break; case 'svg': $data = $_POST; $svg = $dg->getSVG($data); echo json_encode($svg); exit; break; case 'addCart': header('Content-Type: text/html; charset=UTF-8'); $data = file_get_contents('php://input'); $data = json_decode($data, true); $content = $dg->addCart($data); echo json_encode($content); exit; break; case 'fonts': $file = ROOT . DS . 'data' . DS . 'fonts.json'; $fonts = array('status' => 1, 'fonts' => array()); if (file_exists($file)) {