Данные из формы в iframe передаются в виде "абракадабры" (если кирилица)

Yura

Новичок
Данные из формы в iframe передаются в виде "абракадабры" (если кирилица)

Есть скрипт фотогалереи. В файле addphoto.php есть такие строчки кода:
header("Content-type: text/html; charset=windows-1251");
if ($vars["sess"]["admin"]["auth"] && $vars["get"]["photogallery_id"]):
include "include/functions.php";
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=windows-1251">
<link href="<?=$DirShift;?>admin/css/admin.css" rel="stylesheet">
<title>Изображения фотогалереи</title>
</head>
<body>
<script language="JavaScript">
var ZSID = "<?=$_GET["ZSID"];?>";
var ZGALID = "<?=$_GET["photogallery_id"];?>";
</script>
...

<tr>
<td nowrap>Заголовок изображения:</td>
<td><input type="text" name="ftitle" style="width:100%;"></td>
</tr>
<tr>
<td nowrap>Большое изображение:<br>&nbsp;<br>Маленькое изображение:</td>
<td><iframe name="fileupload" style="width:100%; height:55px; margin:0px; padding:0px;" frameborder="0"></iframe></td>
</tr>
....


<script language="JavaScript">
<!--
function InitF()
{
fileupload.document.write('<html><head>');
fileupload.document.write('<meta http-equiv="Content-Type" content="text/html; charset=windows-1251">');
fileupload.document.write('</HEAD>');
fileupload.document.write('<BODY scroll="NO" style="margin:0px; padding:0px; background:#F7F7F7;">');
fileupload.document.write('<table cellPadding="0" cellspacing="0" border="0" width="100%" style="background:#F7F7F7;">');
fileupload.document.write('<form action="uploadphotogalery.php?ZSID='+ZSID+'&photogallery_id='+ZGALID+'" id="frm" method="POST" enctype="multipart/form-data">');
fileupload.document.write('<tr><td><input type="file" style="width:100%; height:20px; margin: 2px 0px 2px 0px; border:1px solid black;" name="imgfile_big" value=""></td></tr>');
fileupload.document.write('<tr><td><input type="file" style="width:100%; height:20px; margin: 2px 0px 2px 0px; border:1px solid black;" name="imgfile_small" value="" onChange="parent.fresize.checked=false;"></td></tr>');
fileupload.document.write('<input type="hidden" name="imgfile_title"><input type="hidden" name="imgfile_titlegenerate"><input type="hidden" name="imgfile_resize"><input type="hidden" name="imgfile_resizewidth">');
fileupload.document.write('</form></table></body></html>');
}
function FUploadPhoto () {
fileupload.frm.imgfile_title.value = ftitle.value;
fileupload.frm.imgfile_titlegenerate.value = ftitlegenerate.value;
fileupload.frm.imgfile_resize.value = fresize.value;
fileupload.frm.imgfile_resizewidth.value = fresizewidth.value;
fileupload.frm.submit ();
}

InitF();
//-->
</script>

</body>
</html>
<?
endif;
?>


В файл uploadphotogalery.php передается значение imgfile_title в виде "абракадабры", если оно написано русскими буквами. Где может быть проблема?
 
Сверху