update_settings($_POST); break; case 'upload_main_img': //echo 'uploader'; $settings_mod = $db -> get_settings_json($_POST['mod']); unset($_POST['act']); $tmp_name = $db -> upload_img( $_FILES, 'pages', 'main_img'); $db -> resize_img($tmp_name, $settings_mod['w'], $settings_mod['h'], 80, false, 'pages'); $db -> resize_img($tmp_name, $settings_mod['p_w'], $settings_mod['p_h'], 80, true, 'pages'); unset($a); $a['id']=$_POST['id']; $json=$db->get_val('pages', $a, 'json'); $massiv=$db->from_j($db-> clear_json($json)); $massiv['main_img']=$tmp_name; $json=$db->to_j($massiv); $db->free_sql( "UPDATE `pages` SET `json` = '" . $json . "' WHERE `id` = " . $_POST['id'] ); echo $tmp_name; break; */ default: } ?>