- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
<?php
$mon=array("1","2","3","4","5","6","7","8","9","10","11","12"); // здесь ахтунг, да?
if($_REQUEST["lang"]=="ru")
$mon=array("1.Январь","2.Февраль","3.Март","4.Апрель","5.Май","6.Июнь","7.Июль","8.Август","9.Сентябрь","10.Октябрь","11.Ноябрь","12.Декабрь");
if($_REQUEST["lang"]=="en")
$mon=array("1.January","2.February","3.March","4.April","5.May","6.June","7.July","8.August","9.September","10.October","11.November","12.December");
$wk=array("1","2","3","4","5","6","7");
if($_REQUEST["lang"]=="ru")
$wk=array("Пн","Вт","Ср","Чт","Пт","Сб","Вс");
if($_REQUEST["lang"]=="en")
$wk=array("Mon","Tue","Wed","Thu","Fri","Sat","Sun");
function writearray($name,$array,$bscripttags)
{
if($bscripttags)echo("<script language='javascript'>");
echo("$name=new Array('");
echo(implode("','",$array));
echo("');");
if($bscripttags)echo("</script>");
}
echo("<script language='javascript'>");
echo("function mon(){");
writearray("var monarr",$mon,false);
echo("return monarr;}");
echo("function wk(){");
writearray("var wkarr",$wk,false);
echo("return wkarr;}");
echo("</script>");
?>
запостил все, что бы был понятен контекст, но я сам не понимаю, зачем мне когда-то нужно было писать то, что написано во 2ой строке ))