=2){$STATUS="ok";} if (isset($LOGIN) && $LOGIN=="ok" && isset($PASS) && $PASS=="ok" && isset($STATUS) && $STATUS=="ok") { // Если пользователь найден в базе данных, регистрируем его идентификатор $_SESSION['sisevork_user'] = $login; $_SESSION['sisevork_status'] = $db_status; } else { $logged=1; } } if(!isset($lang) || isset($lang) && $lang!="rus" && $lang!="eng") {$lang="est"; $HEAD_TITLER="SEJ - Sillamäe Soojuselektrijaam";} //echo $CONSTant_query="select c_name, c_".$lang." from constants"; $CONSTant_query=mysqli_query($conn, "select c_name, c_".$lang." from constants"); $CONSTant_num=mysqli_num_rows($CONSTant_query); if($CONSTant_num!=0) { for($co=1; $co<=$CONSTant_num; $co++) { $CONSTant=mysqli_fetch_array($CONSTant_query); $CONST[$CONSTant["c_name"]]=$CONSTant["c_$lang"]; } } $startpage=first_pg($lang, $conn); if(!isset($pg)) { if($startpage[1]=="innerlink") { $startPG_query=mysqli_query($conn, "select * from innerlink_pages_$lang where m_id='".$startpage[0]."' limit 1"); $startPG=mysqli_fetch_array($startPG_query); echo ""; } else { $pg=$startpage[0]; } } if($startpage[1]=="innerlink") { $FLAG_NEWS_SHOW=news_show_first_page($lang, $startpage[0], $_SERVER['QUERY_STRING'], $conn); } else { if(isset($pg) && $pg==$startpage[0] && !isset($spg)) {$FLAG_NEWS_SHOW=1;} elseif(isset($spg) && $spg==$startpage[0] && !isset($tpg)){$FLAG_NEWS_SHOW=1;} elseif(isset($tpg) && $spg==$startpage[0]){$FLAG_NEWS_SHOW=1;} else {$FLAG_NEWS_SHOW=0;} } include("template2.inc"); //if(!isset($HTTP_SESSION_VARS['jphua']) || ($pg=="silpowstation" && $spg=="uldinfo")) {include("template21.inc"); $HTTP_SESSION_VARS['jphua']=1; }else{include("template2.inc");} ?>