$result){ if($position && trim($result)){ if(strpos($result, ":")===false) $_R[$REDIRECT_RULES[$position]] = trim($result); else{ $result = explode(":", $result); $_R[trim($result[0])] = trim($result[1]); } } } $_V = array_merge($_V, $_R); //////// END REDIRECT //////// PARSEURL[PARSESTR] $PARSEURL = parse_url("http://".$_SERVER["HTTP_HOST"].$_SERVER["REQUEST_URI"]); parse_str($PARSEURL['query'], $_S); $_V = array_merge($_V, $_S); //////// END PARSEURL[PARSESTR] $_SESSION['TEST'] = isset($_V['test']) ? $_V['test'] : ($_SESSION['TEST'] ? $_SESSION['TEST'] : 0); include_once(BASE."includes/log.php"); include_once(BASE."includes/autorization.php"); include_once(BASE."includes/variables.php"); //if($_SERVER['REMOTE_ADDR']!="212.143.222.186"){ if(!$_R['page']){//$_V['flash']=="flashtest" && header("location: http://www.elections-ices.org/russian/home/"); exit; if(preg_match("`e-ices.org`i", $_SERVER["HTTP_HOST"])){ header("location: http://www.e-ices.org/russian/home/"); exit; } ?> International expert Center for Electoral Systems
Ремонтные работы.
".$_P['script']." in folder blocks ".BR; //$_SESSION['F_PUBLIC_FILES'] = is_array($_SESSION['F_PUBLIC_FILES']) ? $_SESSION['F_PUBLIC_FILES'] : array(); //get_f_public_files(); $_SESSION['F_PUBLIC_FILES'] = array(); $base = BASE . "files/publications/"; $xfile = false; if($dir = @opendir($base)) while(($ffile = readdir($dir)) !== false) $_SESSION['F_PUBLIC_FILES'][] = $ffile; ############################### TRIGERS if($_V['artdelete'] && ADMIN==1){ mysql_query("DELETE FROM `news_postings` WHERE `id`=".$_V['artdelete'].""); mysql_query("DELETE FROM `news_comments` WHERE `idart`=".$_V['artdelete'].""); header("Location: " . THIS . LANG . "/" . PAGE . "/"); exit; } if($_V['deletenews']){// && ADMIN==1 mysql_query("DELETE FROM `news` WHERE `id`=".$_V['deletenews'].""); header("Location: " . THIS . LANG . "/" . PAGE . "/"); exit; } if($_V['shownews']){// && ADMIN==1 mysql_query("UPDATE `news` SET `visible`=ABS(`visible`-1) WHERE `id`=".$_V['shownews'].""); header("Location: " . THIS . LANG . "/" . PAGE . "/"); exit; } ############################### END TRIGERS ######################################################## ## TEST ## ######################################################## $result = mysql_query("SELECT * FROM `texts` WHERE `page`='keywords' AND `lang`='".$_SESSION['LANG']."' ") or die(mysql_error()); $keywords = mysql_fetch_assoc($result); mysql_free_result($result); if(ADMIN==1) $menu = array("home", "news", "comments", "smi", "publications", "-", "about", "experts", "authors", "partners", "galleries", "hotnews", "mails", "help"); else $menu = array("home", "news", "comments", "smi", "publications", "-", "about", "experts", "authors", "partners", "galleries", "", "", ""); $menu['english'] = array("Home", "", "", "", "Publications", "", "About us", "Experts", "", "Partners", "Galleries", "Strip", "E-mails", "help"); $menu['russian'] = array("ГЛАВНАЯ", "Новости", "Комментарии", "Мировые СМИ", "Публикации", "-", "О нас", "Эксперты", "Авторы", "Партнёры", "Галереи", "Строка", "Почта", "help"); $pagekey = array_search (PAGE, $menu); $pagekey = ($array_search!==false) ? $menu[LANG][$pagekey] : 404; $description = ""; if(PAGE=="news" && $_V['textid'] && is_numeric($_V['textid'])){ $pagekey = LANG == "russian" ? "Новости" : "News"; $result = mysql_query("SELECT * FROM `new_info` WHERE `id`='".$_V['textid']."' ") or die(mysql_error()); $titlestring = mysql_fetch_assoc($result); mysql_free_Result($result); $description = $titlestring['pre']; $titlestring = $titlestring['head']; $titlestring = strlen($titlestring) ? "".$titlestring." " : ""; } if(PAGE=="comments" && $_V['textid'] && is_numeric($_V['textid'])){ $result = mysql_query("SELECT * FROM `new_info` WHERE `id`='".$_V['textid']."' ") or die(mysql_error()); $titlestring = mysql_fetch_assoc($result); mysql_free_Result($result); $description = $titlestring['pre']; $titlestring = $titlestring['head']; $titlestring = strlen($titlestring) ? "".$titlestring." - " : ""; } if(PAGE=="publications" && $_V['textid'] && is_numeric($_V['textid'])){ $result = mysql_query("SELECT * FROM `new_info` WHERE `id`='".$_V['textid']."' ") or die(mysql_error()); $titlestring = mysql_fetch_assoc($result); mysql_free_Result($result); $description = $titlestring['pre']; $titlestring = $titlestring['head']; $titlestring = strlen($titlestring) ? "".$titlestring." - " : ""; } if(PAGE=="smi" && $_V['textid'] && is_numeric($_V['textid'])){ $result = mysql_query("SELECT * FROM `new_info` WHERE `id`='".$_V['textid']."' ") or die(mysql_error()); $titlestring = mysql_fetch_assoc($result); mysql_free_Result($result); $description = $titlestring['pre']; $titlestring = $titlestring['head']; $titlestring = strlen($titlestring) ? "".$titlestring." - " : ""; } if(PAGE=="calendar"){ $pagekey = LANG == "russian" ? " " : " "; $titlestring = "Календарь выборов по годам"; $titlestring = strlen($titlestring) ? "".$titlestring."" : ""; } if($_V['theme']){ $result = mysql_query("SELECT * FROM `tags` WHERE `id`='".$_V['theme']."' ") or die(mysql_error()); $titlestring = mysql_fetch_assoc($result); mysql_free_Result($result); $titlestring = $titlestring[LANG]; $titlestring = strlen($titlestring) ? "".$titlestring." - " : ""; } if($_V['author']){ $titlestring = trim(stripslashes($_V['author'])); $titlestring = strlen($titlestring) ? "".$titlestring." - " : ""; } $title = (LANG=="russian")?$titlestring." ".$pagekey." :: Экспертный центр ICES" : $titlestring.$pagekey." :: expert Center ICES"; if(PAGE=="home"){ $type=""; if($_V['type'] && ($_V['type']=="election" || $_V['type']=="politics")){ $type = " ".($_V['type']=="election"?"Выборы ":"Политика ")." "; } $REGIONS = array(); $result = mysql_query("SELECT `".LANG."` FROM `new_regions` WHERE `visibility`='1' AND `link`='".$_V['region']."' ORDER BY `id` ASC") or die(mysql_error()); $row = mysql_fetch_assoc($result); $region = $row[LANG]; mysql_free_result($result); $pagekey = LANG == "russian" ? "Политические новости и комментарии, выборы" : "news"; $title = (LANG=="russian")?$type.(($type && $region)?" - ":"").$region.(($type || $region)?" :: ":"")."Экспертный центр ICES - "." ".$pagekey:"expert Center ICES - ".$pagekey; } if(is_numeric($_V['theme']) && $_V['theme']){ $title = (LANG=="russian") ? $titlestring." :: Экспертный центр ICES" : $titlestring." :: expert Center ICES"; } if(PAGE=="allthemes"){ $title = (LANG=="russian") ? "Архив тем :: Экспертный центр ICES" : "Archive :: expert Center ICES"; } $REGIONS = array(); $result = mysql_query("SELECT * FROM `new_regions`") or die(mysql_error()); while($row = mysql_fetch_assoc($result)){ $REGIONS[$row['id']] = $row; } mysql_free_result($result); $THEMES = array(); $result = mysql_query("SELECT * FROM `new_theme`") or die(mysql_error()); while($row = mysql_fetch_assoc($result)){ $THEMES[$row['id']] = $row; } mysql_free_result($result); setlocale (LC_ALL, 'ru_RU.CP1251'); ?>