$v) { eval("\$$k=\$_GET[\"$k\"];"); } foreach ($HTTP_POST_VARS as $k=>$v) { eval("\$$k=\$_POST[\"$k\"];"); } foreach ($_FILES as $k=>$v) { eval("\$$k='".$_FILES["$k"]["tmp_name"]."';"); } header ("Content-type: text/html; charset=UTF-8"); session_start(); if (@$page=="map") { echo implode ("", file("lapas_karte.html")); die; } function echolang($_rus,$_lat,$_eng,$_lang=''){ global $lang; if ($_lang=='') $_lang=$lang; if ($_lang=="rus") return $_rus; if ($_lang=="lat") return $_lat; if ($_lang=="eng") return $_eng; } function mqfa($sql){ $a=mysql_fetch_array(mysql_query($sql)); echo mysql_error(); return $a; } if (@$setlang) $_SESSION["lang"]=$setlang; $lang=@$_SESSION["lang"]; if (!@$lang) $lang="lat"; $_SESSION["lang"]=$lang; include "connect.php"; if (!@$page) $page=1; $ipp=5; function pre($s) { $s=strip_tags($s); $s=ereg_replace(" ([a-zA-Z]*@.*\\.lv)"," \\1",$s); $s=ereg_replace("\n([a-zA-Z]*@.*\\.lv)","\n\\1",$s); $s=str_replace("\n","
",$s); $s=str_replace("\r","",$s); return $s; } function popup($src,$w,$h,$method=1){ $is=getwh($src,$w,$h,$method); return ""; } function getwh($src, $w, $h, $method=0){ $a=array(); $a["w"]=0; $a["h"]=0; if (!file_exists($src) || is_dir($src)) return $a; $is=GetImageSize("$src"); if (!@$w) $w=$is[0]; if (!@$h) $h=$is[0]; $startw=$w; $starth=$h; if (@$w && @$h) { if ($w<$is[0] || $h<$is[1]) { if ($w/$is[0]>$h/$is[1]){ $w=round($h*($is[0]/$is[1])); } else { $h=round($w*($is[1]/$is[0])); } } else { $w=$is[0]; $h=$is[1]; } } elseif (@$w){ $h=round($w*($is[1]/$is[0])); } elseif (@$h){ $w=round($h*($is[0]/$is[1])); } else { $w=$is[0]; $h=$is[1]; } $dify=0; $difx=0; if (@$method!=1) { if ($w<$startw) { $dify=round(($h*($startw/$w)-$h)/2); $h=$h*($startw/$w); $w=$startw; } if ($h<$starth) { $difx=round(($w*($starth/$h)-$w)/2); $w=$w*($starth/$h); $h=$starth; } } else { $startw=$w; $starth=$h; } $a["w"]=$w; $a["h"]=$h; return $a; } ?> Jumiks
"; ?>Lat"; ?>"; ?>Rus"; ?>"; ?>Eng"; ?>
 
'; $r=mysql_query("select id from feedbacks order by id"); $i=0; while ($rec=mysql_fetch_array($r)){ $i++; echo ''; if ($i%4==0) echo ''; } echo '
 
'; } elseif ($section==16) { echo ''; $r=mysql_query("select name$lang as name, txt$lang as txt, id from goals order by id desc"); while ($rec=mysql_fetch_array($r)){ echo ''; } echo '
'.popup("goals/$rec[id].jpg",800,600).'
'.$rec["name"].'
'.$rec["txt"].'
'; } elseif ($section==14 || $section==15) { echo ''; if ($section==15) { if (!@$year) { $rec=mqfa("select max(year) as year from projects"); $year=$rec["year"]; } $r=mysql_query("select distinct year from projects where year>0 and name$lang<>'' order by year desc"); echo ' '; $r=mysql_query("select id, name$lang as name, desc$lang as descr, date_format(dat,'%d.%m.%Y') as dat from projects where year=$year and name$lang<>'' order by projects.dat desc"); } else { $r=mysql_query("select id, name$lang as name, desc$lang as descr, date_format(dat,'%d.%m.%Y') as dat from projects where year=0 and name$lang<>'' order by projects.dat desc"); } echo mysql_error(); while ($rec=mysql_fetch_array($r)){ $rec2=mqfa("select id from pics where project=$rec[id]"); echo ''; } echo '
'; while ($rec=mysql_fetch_array($r)){ if ($rec["year"]!=$year) echo " $rec[year] |"; else echo " $rec[year] |"; } echo '
'.$rec["name"].'
'; $r2=mysql_query("select id from pics where project=$rec[id]"); while ($rec2=mysql_fetch_array($r2)) { echo ''; } echo '
'.$rec["descr"].'
'; } elseif ($section==9) { $r=mysql_query("select intro$lang as intro, id, name$lang as name, txt$lang as txt from content where page=2 and id>9 order by id=12"); echo ''; while ($rec=mysql_fetch_array($r)){ echo ''; } $rec=mqfa("select txt$lang as txt from content where id=$section"); echo '
'."$rec[name]".'
'."$rec[intro]".'
'.echolang("Читать далее","Lasīt tālāk","Read more").'...
'.$rec["txt"].'
'; } elseif ($section==6) { echo ''; $r=mysql_query("select id, link$lang as link from partners"); $i=0; while ($rec=mysql_fetch_array($r)){ $i++; echo ''; if ($i%4==0) echo ''; } echo '
 
'; } elseif ($section==4 && $section==5) { $r=mysql_query("select id, name$lang as name, place$lang as place, phone, email from workers order by id"); echo ' '; $i=0; while ($rec=mysql_fetch_array($r)) { echo ''; $i++; if ($i%2==0) echo ''; else echo ''; } echo '
'.$rec["name"].'
'.$rec["place"].'
Tālrunis: '.$rec["phone"].'
'.$rec["email"].'
   
'; } elseif (($section==5 || $section==7 || $section==8 || $section==18) && !@$newid) { if (!@$startfrom) $startfrom=0; echo ''; $r=mysql_query("select intro$lang as intro, id, name$lang as name, txt$lang as txt, date_format(dat,'%d.%m.%Y') as dat from news where section=$section and name$lang<>'' order by id desc ".($section==18 && $startfrom>-1?"limit ".($startfrom).",".($startfrom+$ipp):"")); while ($rec=mysql_fetch_array($r)) { $rec["intro"]=strip_tags($rec["intro"]); echo ''; } echo '
'; if ($section==5 || $page==5) echo ''; echo '
'.$rec["name"].'
'.$rec["dat"].'
'.$rec["intro"].'
'.echolang("Читать далее","Lasīt tālāk","Read more").'...
'; } else { if (!@$newid) $rec=mqfa("select txt$lang as txt from content where id=$section"); else $rec=mqfa("select txt$lang as txt from news where id=$newid"); echo $rec["txt"]; } ?>
 
4 and id<>5 order by num"); $i=0; while ($rec=mysql_fetch_array($r)) { $i++; echo '"; if ($i '; } } ?>