free_sql2 ( "UPDATE `settings` SET `json`='" . $res['json'] . "' WHERE `mod`='" . $res['mod'] . "'" ); break; // чтение настроек case 'get_settings': $db->free_sql2 ( "ALTER TABLE `settings` ADD `json` text COLLATE 'utf8_general_ci' NULL;"); //берем данные unset($a); $a['mod']=$_POST['mod']; $massiv=$db->get_massiv('settings', $a, '', 1); if ($massiv[0]['json']) echo $massiv[0]['json']; else $db->free_sql2 ( "insert into `settings` (`mod`) VALUES ('" . $_POST['mod'] . "')"); break; default: } ?>