!C99Shell v. 2.5 [PHP 8 Update] [24.05.2025]!

Software: Apache/2.4.68 (Linux) PHP/7.4.33. PHP/7.4.33 

uname -a: Linux bjb2293782.nichost.ru 6.6.151-1.el8.x86_64 #1 SMP PREEMPT_DYNAMIC Mon Aug 10
11:16:02 MSK 2026 x86_64
 

uid=12584(bjb2293782) gid=12584(bjb2293782) groups=12584(bjb2293782)  

Safe-mode: OFF (not secure)

/home/bjb2293782/xn--80abaeoqbbrbgf8aea5a2a2z.xn--p1ai/docs/   drwxr-x---
Free 2711.07 GB of 4607.12 GB (58.85%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     index.php (25.92 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
require("design.php");

session_start();

TOP(0);
?>


<script src='https://pos.gosuslugi.ru/bin/script.min.js'></script> 
<style>
#js-show-iframe-wrapper{position:relative;display:flex;align-items:center;justify-content:center;width:100%;min-width:293px;max-width:100%;background:linear-gradient(138.4deg,#38bafe 26.49%,#2d73bc 79.45%);color:#fff;cursor:pointer}#js-show-iframe-wrapper .pos-banner-fluid *{box-sizing:border-box}#js-show-iframe-wrapper .pos-banner-fluid .pos-banner-btn_2{display:block;width:240px;min-height:56px;font-size:18px;line-height:24px;cursor:pointer;background:#0d4cd3;color:#fff;border:none;border-radius:8px;outline:0}#js-show-iframe-wrapper .pos-banner-fluid .pos-banner-btn_2:hover{background:#1d5deb}#js-show-iframe-wrapper .pos-banner-fluid .pos-banner-btn_2:focus{background:#2a63ad}#js-show-iframe-wrapper .pos-banner-fluid .pos-banner-btn_2:active{background:#2a63ad}@-webkit-keyframes fadeInFromNone{0%{display:none;opacity:0}1%{display:block;opacity:0}100%{display:block;opacity:1}}@keyframes fadeInFromNone{0%{display:none;opacity:0}1%{display:block;opacity:0}100%{display:block;opacity:1}}@font-face{font-family:LatoWebLight;src:url(https://pos.gosuslugi.ru/bin/fonts/Lato/fonts/Lato-Light.woff2) format("woff2"),url(https://pos.gosuslugi.ru/bin/fonts/Lato/fonts/Lato-Light.woff) format("woff"),url(https://pos.gosuslugi.ru/bin/fonts/Lato/fonts/Lato-Light.ttf) format("truetype");font-style:normal;font-weight:400}@font-face{font-family:LatoWeb;src:url(https://pos.gosuslugi.ru/bin/fonts/Lato/fonts/Lato-Regular.woff2) format("woff2"),url(https://pos.gosuslugi.ru/bin/fonts/Lato/fonts/Lato-Regular.woff) format("woff"),url(https://pos.gosuslugi.ru/bin/fonts/Lato/fonts/Lato-Regular.ttf) format("truetype");font-style:normal;font-weight:400}@font-face{font-family:LatoWebBold;src:url(https://pos.gosuslugi.ru/bin/fonts/Lato/fonts/Lato-Bold.woff2) format("woff2"),url(https://pos.gosuslugi.ru/bin/fonts/Lato/fonts/Lato-Bold.woff) format("woff"),url(https://pos.gosuslugi.ru/bin/fonts/Lato/fonts/Lato-Bold.ttf) format("truetype");font-style:normal;font-weight:400}@font-face{font-family:RobotoWebLight;src:url(https://pos.gosuslugi.ru/bin/fonts/Roboto/Roboto-Light.woff2) format("woff2"),url(https://pos.gosuslugi.ru/bin/fonts/Roboto/Roboto-Light.woff) format("woff"),url(https://pos.gosuslugi.ru/bin/fonts/Roboto/Roboto-Light.ttf) format("truetype");font-style:normal;font-weight:400}@font-face{font-family:RobotoWebRegular;src:url(https://pos.gosuslugi.ru/bin/fonts/Roboto/Roboto-Regular.woff2) format("woff2"),url(https://pos.gosuslugi.ru/bin/fonts/Roboto/Roboto-Regular.woff) format("woff"),url(https://pos.gosuslugi.ru/bin/fonts/Roboto/Roboto-Regular.ttf) format("truetype");font-style:normal;font-weight:400}@font-face{font-family:RobotoWebBold;src:url(https://pos.gosuslugi.ru/bin/fonts/Roboto/Roboto-Bold.woff2) format("woff2"),url(https://pos.gosuslugi.ru/bin/fonts/Roboto/Roboto-Bold.woff) format("woff"),url(https://pos.gosuslugi.ru/bin/fonts/Roboto/Roboto-Bold.ttf) format("truetype");font-style:normal;font-weight:400}@font-face{font-family:ScadaWebRegular;src:url(https://pos.gosuslugi.ru/bin/fonts/Scada/Scada-Regular.woff2) format("woff2"),url(https://pos.gosuslugi.ru/bin/fonts/Scada/Scada-Regular.woff) format("woff"),url(https://pos.gosuslugi.ru/bin/fonts/Scada/Scada-Regular.ttf) format("truetype");font-style:normal;font-weight:400}@font-face{font-family:ScadaWebBold;src:url(https://pos.gosuslugi.ru/bin/fonts/Scada/Scada-Bold.woff2) format("woff2"),url(https://pos.gosuslugi.ru/bin/fonts/Scada/Scada-Bold.woff) format("woff"),url(https://pos.gosuslugi.ru/bin/fonts/Scada/Scada-Bold.ttf) format("truetype");font-style:normal;font-weight:400}@font-face{font-family:Geometria;src:url(https://pos.gosuslugi.ru/bin/fonts/Geometria/Geometria.eot);src:url(https://pos.gosuslugi.ru/bin/fonts/Geometria/Geometria.eot?#iefix) format("embedded-opentype"),url(https://pos.gosuslugi.ru/bin/fonts/Geometria/Geometria.woff) format("woff"),url(https://pos.gosuslugi.ru/bin/fonts/Geometria/Geometria.ttf) format("truetype");font-weight:400;font-style:normal}@font-face{font-family:Geometria-ExtraBold;src:url(https://pos.gosuslugi.ru/bin/fonts/Geometria/Geometria-ExtraBold.eot);src:url(https://pos.gosuslugi.ru/bin/fonts/Geometria/Geometria-ExtraBold.eot?#iefix) format("embedded-opentype"),url(https://pos.gosuslugi.ru/bin/fonts/Geometria/Geometria-ExtraBold.woff) format("woff"),url(https://pos.gosuslugi.ru/bin/fonts/Geometria/Geometria-ExtraBold.ttf) format("truetype");font-weight:800;font-style:normal}
</style>

<style>
#js-show-iframe-wrapper{background:var(--pos-banner-fluid-87__background)}#js-show-iframe-wrapper .pos-banner-fluid .pos-banner-btn_2{width:100%;min-height:52px;background:#0d4cd3;color:#fff;font-size:16px;font-family:LatoWeb,sans-serif;font-weight:400;padding:0;line-height:1.2}#js-show-iframe-wrapper .pos-banner-fluid .pos-banner-btn_2:active,#js-show-iframe-wrapper .pos-banner-fluid .pos-banner-btn_2:focus,#js-show-iframe-wrapper .pos-banner-fluid .pos-banner-btn_2:hover{background:#e4ecfd}#js-show-iframe-wrapper .bf-87{position:relative;display:grid;grid-template-columns:var(--pos-banner-fluid-87__grid-template-columns);grid-template-rows:var(--pos-banner-fluid-87__grid-template-rows);width:100%;max-width:var(--pos-banner-fluid-87__max-width);box-sizing:border-box;grid-auto-flow:row dense}#js-show-iframe-wrapper .bf-87__decor{background:var(--pos-banner-fluid-87__bg-url) var(--pos-banner-fluid-87__bg-url-position) no-repeat;background-size:cover;background-color:#f8efec;position:relative}#js-show-iframe-wrapper .bf-87__logo-wrap{box-shadow:var(--pos-banner-fluid-87__logo-box-shadow)}#js-show-iframe-wrapper .bf-87__content{display:flex;flex-direction:column;padding:var(--pos-banner-fluid-87__content-padding);grid-row:var(--pos-banner-fluid-87__content-grid-row)}#js-show-iframe-wrapper .bf-87__description{display:flex;flex-direction:column;margin:var(--pos-banner-fluid-87__description-margin)}#js-show-iframe-wrapper .bf-87__text{margin:var(--pos-banner-fluid-87__text-margin);font-size:var(--pos-banner-fluid-87__text-font-size);line-height:1.3;font-family:LatoWeb,sans-serif;font-weight:700;color:#0b1f33}#js-show-iframe-wrapper .bf-87__text_small{font-size:var(--pos-banner-fluid-87__text-small-font-size);font-weight:400;margin:var(--pos-banner-fluid-87__text-small-margin)}#js-show-iframe-wrapper .bf-87__bottom-wrap{display:flex;flex-direction:row;align-items:center}#js-show-iframe-wrapper .bf-87__logo-wrap{position:absolute;top:var(--pos-banner-fluid-87__logo-wrap-top);left:0;padding:var(--pos-banner-fluid-87__logo-wrap-padding);background:#fff;border-radius:0 0 8px 0}#js-show-iframe-wrapper .bf-87__logo{width:var(--pos-banner-fluid-87__logo-width);margin-left:1px}#js-show-iframe-wrapper .bf-87__slogan{font-family:LatoWeb,sans-serif;font-weight:700;font-size:var(--pos-banner-fluid-87__slogan-font-size);line-height:1;color:#005ca9}#js-show-iframe-wrapper .bf-87__btn-wrap{width:100%;max-width:var(--pos-banner-fluid-87__button-wrap-max-width)}
</style >
<div id='js-show-iframe-wrapper'>
  <div class='pos-banner-fluid bf-87'>

    <div class='bf-87__decor'>
      <div class='bf-87__logo-wrap'>
        <img
          class='bf-87__logo'
          src='https://pos.gosuslugi.ru/bin/banner-fluid/gosuslugi-logo-blue.svg'
          alt='Госуслуги'
        />
        <div class='bf-87__slogan'>Решаем вместе</div >
      </div >
    </div >
    <div class='bf-87__content'>
      <div class='bf-87__description'>
          <span class='bf-87__text'>
            Хочется, чтобы библиотека стала лучше?
          </span >
        <span class='bf-87__text bf-87__text_small'>
            Сообщите, какие нужны изменения и получите ответ о решении
          </span >
      </div >

      <div class='bf-87__bottom-wrap'>
        <div class='bf-87__btn-wrap'>
          <!-- pos-banner-btn_2 не удалять; другие классы не добавлять -->
          <button
            class='pos-banner-btn_2'
            type='button'
          >Написать
          </button >
        </div >
      </div>
    </div >

  </div >
</div >
<script>
(function(){
"use strict";function ownKeys(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);if(t)r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable});n.push.apply(n,r)}return n}function _objectSpread(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};if(t%2)ownKeys(Object(n),true).forEach(function(t){_defineProperty(e,t,n[t])});else if(Object.getOwnPropertyDescriptors)Object.defineProperties(e,Object.getOwnPropertyDescriptors(n));else ownKeys(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function _defineProperty(e,t,n){if(t in e)Object.defineProperty(e,t,{value:n,enumerable:true,configurable:true,writable:true});else e[t]=n;return e}var POS_PREFIX_87="--pos-banner-fluid-87__",posOptionsInitialBanner87={background:"#FFFFFF","grid-template-columns":"100%","grid-template-rows":"264px auto","max-width":"1422px","text-font-size":"20px","text-small-font-size":"14px","text-margin":"0 0px 12px 0","description-margin":"0 0 24px 0","button-wrap-max-width":"245px","bg-url":"url('https://pos.gosuslugi.ru/bin/banner-fluid/83/banner-fluid-bg-83-0.svg')","bg-url-position":"center top","content-padding":"40px 24px 48px","logo-wrap-padding":"12px 14px 10px 12px","logo-width":"65px","logo-wrap-top":"0","slogan-font-size":"12px","logo-box-shadow":"none","text-small-margin":0},setStyles=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:POS_PREFIX_87;Object.keys(e).forEach(function(r){t.style.setProperty(n+r,e[r])})},removeStyles=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:POS_PREFIX_87;Object.keys(e).forEach(function(e){t.style.removeProperty(n+e)})};function changePosBannerOnResize(){var e=document.documentElement,t=_objectSpread({},posOptionsInitialBanner87),n=document.getElementById("js-show-iframe-wrapper"),r=n?n.offsetWidth:document.body.offsetWidth;if(r>300)t["bg-url"]="url('https://pos.gosuslugi.ru/bin/banner-fluid/83/banner-fluid-bg-83-1.svg')",t["grid-template-rows"]="244px auto";if(r>360)t["description-margin"]="0 0 20px 0",t["content-padding"]="20px 55px 20px 24px",t["button-wrap-max-width"]="118px";if(r>415)t["bg-url"]="url('https://pos.gosuslugi.ru/bin/banner-fluid/83/banner-fluid-bg-83-2.svg')",t["content-padding"]="36px 25px 52px 24px";if(r>568)t["bg-url"]="url('https://pos.gosuslugi.ru/bin/banner-fluid/83/banner-fluid-bg-83.svg')",t["text-font-size"]="24px",t["text-small-font-size"]="14px",t["grid-template-columns"]="53% 47%",t["grid-template-rows"]="332px",t["content-grid-row"]="1",t["content-padding"]="54px 28px",t["description-margin"]="0 0 24px 0",t["button-wrap-max-width"]="245px";if(r>783)t["bg-url"]="url('https://pos.gosuslugi.ru/bin/banner-fluid/83/banner-fluid-bg-83-3.svg')",t["grid-template-columns"]="1fr 1fr",t["grid-template-rows"]="268px",t["text-small-font-size"]="14px",t["content-padding"]="40px 24px 40px 50px",t["button-wrap-max-width"]="118px",t["text-font-size"]="24px";if(r>1098)t["bg-url"]="url('https://pos.gosuslugi.ru/bin/banner-fluid/83/banner-fluid-bg-83-4.svg')",t["grid-template-rows"]="300px",t["text-font-size"]="32px",t["text-small-font-size"]="18px",t["content-padding"]="42px 50px",t["logo-width"]="78px",t["slogan-font-size"]="15px",t["logo-wrap-padding"]="20px 16px 16px",t["text-small-margin"]="0px 150px 0px 0";if(r>1400)t["bg-url"]="url('https://pos.gosuslugi.ru/bin/banner-fluid/83/banner-fluid-bg-83-5.svg')",t["max-width"]="1422px",t["grid-template-columns"]="1fr 1fr",t["content-padding"]="34px 0px 34px 100px",t["logo-box-shadow"]="0px 1px 4px #E3EBFC, 0px 24px 48px rgba(230, 235, 245, 0.4)",t["text-small-margin"]="0",t["text-margin"]="0 140px 12px 0";setStyles(t,e)}changePosBannerOnResize(),window.addEventListener("resize",changePosBannerOnResize),window.onunload=function(){var e=document.documentElement,t=_objectSpread({},posOptionsInitialBanner87);window.removeEventListener("resize",changePosBannerOnResize),removeStyles(t,e)};
})()
</script>
<script>Widget("https://pos.gosuslugi.ru/form", 345613)
</script>

<hr>



<?php

$mysql 
mysqlopen();




LEFTCOLUMN();
CHANNELS();


MAINCOLUMN();
?>



<?php

$firstEvent 
true;

$canEdit false;
if (
AdminAuth(RIGHT_EDIT_EVENTS RIGHT_SUPER_ADMIN)) $canEdit true;

$sql "`title`<>'' AND ";
if (
$canEdit)
{
    
FILIALLISTINFO();
    print 
"<script src='eventeditor.js'></script>\n";
    
$sql='';
}

$canView AdminAuth();
$actual true;


$eventList = array();
$result mysqli_query($mysql,
    
"SELECT
        `id`,
        `title`,
        `date`,
        `duration`,
        `showDate`,
        `poster`,
        `desc`,
        `filial`,
        `impotant`,
        `category`,
        `place`,
        `price`,
        `scripts`,
        MONTH(`date`) as `month`,
        YEAR(`date`) as `year`
    FROM
        libEvents
    WHERE
        
$sql
        DATEDIFF(NOW(),`date`)<=0 AND
        `impotant`=0
    ORDER BY `date` ASC
    LIMIT 5"
);
if (
mysqli_errno($mysql)) die("ERROR: ".mysqli_error($mysql)." at line ".__LINE__." of file ".__FILE__."\n");
while(
$row mysqli_fetch_assoc($result))
{
    
array_push($eventList$row);
}
mysqli_free_result($result);



$result mysqli_query($mysql,
    
"SELECT
        `id`,
        `title`,
        `date`,
        `duration`,
        `showDate`,
        `poster`,
        `desc`,
        `filial`,
        `impotant`,
        `category`,
        `place`,
        `price`,
        `scripts`,
        MONTH(`date`) as `month`,
        YEAR(`date`) as `year`
    FROM
        libEvents
    WHERE
        
$sql
        DATEDIFF(NOW(),`date`)<=0 AND
        `impotant`=1
    ORDER BY `date` ASC
    "
);
if (
mysqli_errno($mysql)) die("ERROR: ".mysqli_error($mysql)." at line ".__LINE__." of file ".__FILE__."\n");
while(
$row mysqli_fetch_assoc($result))
{
    
array_push($eventList$row);
}
mysqli_free_result($result);

function 
SortEventFunc($a$b)
{
    if (
intval($a['impotant']) < intval($b['impotant'])) return 1;
    else
    if (
intval($a['impotant']) > intval($b['impotant'])) return -1;

    if (
$a['date'] < $b['date']) return -1;
    if (
$a['date'] > $b['date']) return 1;
    return 
0;
}

usort($eventList"SortEventFunc");

foreach(
$eventList as &$row)
{
    if (
strpos($row['desc'], "<script")!==false) continue;

    if (
$firstEvent)
    {
        
$firstEvent false;
        print 
"<h1>События</h1>";
        if (
$canEdit)
        {
            print 
"<center>[ <a href='#' onclick='newEvent();return false'>Новое событие</a> ]</center>\n";
            print 
"<center>[ <a href='eventparser.php'>Вставить офлайн-события из Word</a> ]</center><br>\n";
        }
    }


    
$id $row['id'];
    print 
"<table class=event cellspacing=0 cellpadding=><tr><td>\n";

    print 
"<div class=ellipseBlock data-maxheight=290>\n";

    if (
$row['poster']!=null && $row['poster']!='')
    {
        
$img "events/".$row['poster'];
        print 
"<a href='$img' target=_blank><img border=0 align=left class=eventImg src='$img'></a>";
    }
    
$title $row['title'];
    if (
$title==null || trim($title)==''$title="Новое событие";

    print 
"<h2>$title";
    

    if (
$canEdit)
    {
        print 
"<nobr>";
        print 
"<img class=editBtn title='Редактировать событие' src='edit.png' onclick='editEvent($id)'>";
        print 
"<img class=editBtn title='Удалить событие' src='del32x32.png' onclick='delEvent($id)'>";
        print 
"</nobr>";
    }
    
    
    print 
"</h2>";

    if (
$row['showDate']!=&& preg_match("/(\d+)\-(\d+)-(\d+).*?(\d+):(\d+):\d+/"$row['date'],$g))
    {
        print 
"<div class=eventDate>"$g[3].  "."  $g[2] . "." $g[1] . " <span>начало в</span> " $g[4] . ":" $g[5]. "</div>\n";
    }

    if (
$row['filial']!=-1)
        print 
"<div class=eventPlace>Место проведения: <a href='filial.php?filial=".$row['filial']."'>".$GLOBALS['filials'][$row['filial']]."</a></div>\n";
    else
    if (
$row['place']!=null && $row['place']!='')
        print 
"<div class=eventPlace>Место проведения: ".$row['place']."</div>\n";

    print 
"<p>"._para_($row['desc'])."</p>\n";

    if (
$row['category']>=0)
    print 
"<div class=eventCategory>Категория: ".$row['category']."+</div>\n";

    if (
$row['showDate']!=0)
    {
    
$duration intval($row['duration']);
    
$h intval($duration/60);
    
$m $duration%60;

    if (
$h>0)
    {
        
$duration "$h ч.";
        if (
$m 0$duration.=$m мин.";
    }
    else
        
$duration "$m мин.";

    print 
"<center>Продолжительность: $duration</center>\n";
    }


    if (isset(
$row['scripts']) & $row['scripts']!='')
    {
        print 
"<center>";
        print 
$row['scripts'];
        print 
"</center>";
    }

    if (
$row['price'] > 0.0)
    {
        print 
"<br>Цена входа: ".$row['price']." руб.<br><br>";
        if (
$actual) print "<center><input type=button class=dlgBtn value='Купить билет' onclick='doBuy(this, $id, 1)'></center><br>";

        if (
$canView)
        {
            print 
"<center><input type=button class=dlgBtn value='Список гостей' onclick='location=\"eventguest.php?event=$id\"'></center><br>";
        }
    }


    
$month $row['month'];
    
$year $row['year'];
    
$mInx $year 12 + ($month 1);

    
$url GetSiteURL() . "/events.php?monthinx=$mInx#evt$id";
    print 
"<div style='font-size:12px;margin-top:15px'>Постоянный URL события: <a href='$url'>$url</a></div>\n";

    print 
"</div>\n";
    print 
"<div class=ellipseControl style='display:none' onclick='ellipseClick(this)'>Читать полностью</div>\n";
    print 
"</td></tr></table>\n\n\n";
}
//mysqli_free_result($result);


if ($canEdit)
{
    if (
$firstEvent)
    {
        print 
"<h1>События</h1>";
        
$firstEvent false;
        print 
"<center>[ <a href='#' onclick='newEvent();return false'>Новое событие</a> ]</center><br>\n";
        print 
"<center>[ <a href='eventparser.php'>Вставить офлайн-события из Word</a> ]</center><br>\n";
    }
    
}

if (!
$firstEvent)
{
    print 
"<div class=more>[ <a href='events.php'>Другие события</a> ]</div><br><br>";
}
?>







<h1>Новости</h1>
<?php
$canEdit2 
false;
if (
AdminAuth(RIGHT_EDIT_NEWS, -1)) $canEdit2 true;

$sql "A.`title`<>'' AND ";
if (
$canEdit2)
{
    
$sql ='';
    print 
"<script src='newseditor.js'></script>\n";
    print 
"<center>[ <a href='#' onclick='newNews()'>Новая новость</a> ]</center>\n";
}


$news = array();

foreach(
$GLOBALS['filials'] as $filial=>$filialName)
{
    
$result mysqli_query($mysql,
    
"SELECT
        A.`id`                 as `id`,
        A.`title`             as `title`,
        A.`impotant`        as `impotant`,
        A.`date`            as `date`,
        A.`poster`            as `poster`,
        A.`video`            as `video`,
        A.`text`            as `text`,
        A.`filial`            as `filial`,
        libVideos.`id`        as `videoId`,
        libVideos.`visits`    as `visits`
    FROM
        libNews as A
        LEFT JOIN libVideos ON NOT(A.`video` IS NULL) AND A.`video`<>'' AND libVideos.`video`=A.`video`
    WHERE
        
$sql
        A.`filial`=
$filial AND
        DATEDIFF(NOW(),A.`date`) < 15
    ORDER BY `impotant` DESC,`date` DESC
    LIMIT 3"
);
    if (
mysqli_errno($mysql)) die("ERROR: ".mysqli_error($mysql)." at line ".__LINE__." of file ".__FILE__."\n");
    while(
$row mysqli_fetch_assoc($result))
    {
        
array_push($news$row);
    }
    
mysqli_free_result($result);
}

function 
NewsCompareFunc($a,$b)
{
    if (
$a['impotant'] < $b['impotant']) return 1;
    if (
$a['impotant'] > $b['impotant']) return -1;
    
    if (
$a['date'] < $b['date']) return 1;
    if (
$a['date'] > $b['date']) return -1;
}

usort($news"NewsCompareFunc");

if (isset(
$_SESSION['adminFilial']) && (intval($_SESSION['adminRights'] & RIGHT_EDIT_NEWS)!=0)) $myFilial $_SESSION['adminFilial']; else $myFilial = -100;

$videoCount 0;
foreach(
$news as $row)
{
    
$id $row['id'];

    
$canEdit $canEdit2 || $row['filial']==$myFilial;

    if (
$canEditFILIALLISTINFO();


    print 
"<table cellspacing=0 cellpadding=0 class=news><tr><td>\n";

    print 
"<div class=ellipseBlock data-maxheight=330>\n";

    

    
$cls '';
    if (
$row['impotant']) $cls ' class=impotantNews';

    print 
"<h2$cls><table width=100%><tr>";


    if (
preg_match("/(\d+)\-(\d+)-(\d+)/"$row['date'],$g))
    {
        print 
"<td class=newsDate nowrap width=1%>"$g[3].  "."  $g[2] . "." $g[1] . "</td>\n";
    }

    print 
"<td width=99% class=newsTitle>"._html_($row['title'])."</td>";


    if (
$canEdit)
    {
        print 
"<td nowrap width=1%>";
        print 
"<img class=editBtn title='Редактировать новость' src='edit.png' onclick='editNews($id)'>";
        print 
"<img class=editBtn title='Удалить новость' src='del32x32.png' onclick='delNews($id)'>";
        print 
"</td>";
    }
    
    
    print 
"</tr></table></h2>";


    if (
$row['poster']!=null && $row['poster']!='')
    {
        
$img "news/$id/".$row['poster'];
        print 
"<a href='$img' target=_blank><img border=0 align=left class=eventImg src='$img'></a>";
    }
    

    if (
$row['filial']!=-1)    print "<div class=eventPlace>Филиал: <a href='filial.php?filial=".$row['filial']."'>".$GLOBALS['filials'][$row['filial']]."</a></div>\n";


    print 
"<p>"._para_($row['text'])."</p>\n";





    if (
$row['video'] != null && $row['video']!='')
    {
        
$w 320;
        
$h intval($w 16);
        
$videoId intval($row['videoId']);

        if (
preg_match("/rutube/",$row['video']))
        {
            if (
preg_match("/video\/([^\/]*)/",$row['video'], $g))
            {
                
$url $g[1];
                print 
"<center><iframe class=video data-id=$videoId data-n=$videoCount width=$w height=$h src=\"https://rutube.ru/pl/?pl_id&pl_type&pl_video=$url\" frameborder=\"0\" allow=\"clipboard-write\" webkitAllowFullScreen mozallowfullscreen allowfullscreen></iframe></center>";
            }
        }
        else
        
/*
        if (preg_match("/iframe src=\"(https\:\/\/vk\.com\/[^\"]+)\"/", $row['video'], $g))
        {
            $url = $g[1];
            print "<center><iframe class=video data-id=$videoId data=n=$videoCount src=\"$url\" width=\"640\" height=\"400\" allow=\"encrypted-media; fullscreen; picture-in-picture;\" frameborder=\"0\" allowfullscreen></iframe></center>";
        }
        */
        //https://vk.com/video-226889968_456239028
    
if (preg_match("/https\:\/\/vk\.com\/.*video([^\_]+)_([^\&\%]+)/"$row['video'], $g) ||
        
preg_match("/https\:\/\/vkvideo\.ru\/.*video([^\_]+)_([^\&\%]+)/"$row['video'], $g))
    {
        
$oid $g[1];
        
$vid $g[2];

        print 
"<iframe src=\"https://vk.com/video_ext.php?oid=$oid&id=$vid&hd=2&js_api=1\" width=\"853\" height=\"480\" allow=\"autoplay; encrypted-media; fullscreen; picture-in-picture;\" frameborder=\"0\" allowfullscreen ></iframe>";
    }
        else
        if (
preg_match("/youtube/"$row['video']) ||
            
preg_match("/youtu\.be/"$row['video'])
        )
        {
            if (
preg_match("/\?v=([^\/\&]*)/"$row['video'], $g) ||
                
preg_match("/\/([^\/]*)$/",$row['video'], $g))
            {
                
                
                
$video $g[1];

                print 
"<center><iframe class=video data-id=$videoId data-n=$videoCount width=$w height=$h src=\"https://www.youtube.com/embed/$video\" frameborder=0 allowfullscreen></iframe></center>";
            }
        }    
        if (
$videoId!=0)
            print 
"<center>Количество просмотров: <span id=visits$videoCount>".$row['visits']."</span></center>";
        
$videoCount++;
    }


    
$dir = @opendir("news/$id");
    if (
$dir)
    {
        
$first true;
        while(
$file readdir($dir))
        {
            if (
$file!=$row['poster'])
            {
                if (
preg_match("/\.jpg$|\.jpeg$|\.gif$|\.png$/i"$file))
                {
                    if (
$first)
                    {
                        
$first false;
                        print 
"<center>\n";
                    }
                    
$img "news/$id/$file";
                    print 
"<a href='$img' target=_blank><img border=0 class=newsImg src='$img'></a>\n";
                }
            }
        }
        
closedir($dir);

        if (!
$first) print "</center>\n";
    }

    
    
$url GetSiteURL() . "/news.php?id=$id#news$id";

    print 
"<div style='font-size:12px;margin-top:15px'>Постоянный URL новости: <a href='$url'>$url</a></div>\n";
    
    print 
"</div>\n";
    print 
"<div class=ellipseControl style='display:none' onclick='ellipseClick(this)'>Читать полностью</div>\n";
    print 
"</td></tr></table>\n\n\n";

        
}

?>

<script>
focus();
visitsVideos=[];
lastIframe = null;

setInterval(function()
{
    var elm = document.activeElement;
    if (elm && elm.tagName == 'IFRAME' && elm.dataset.id && elm!=lastIframe)
    {
        lastIframe = elm;

           var n = elm.dataset.n;
           var id = elm.dataset.id;
           if (id!=0)
           {
               if (visitsVideos.indexOf(n) >=0) return;
               visitsVideos.push(n);
        
               sendXHR('api.php','action=videos:visit&id='+id,
                function(response)
                {
                    var span = document.getElementById('visits'+n);
                    span.innerHTML = response;
                });
        }
    }
},100);

</script>

<br>
<div class=more>[ <a href='news.php'>Другие новости</a> ]</div>

<br><br>

<?php
if ($firstEvent)
{
    print 
"<h1>События</h1>";
    print 
"<div class=more>[ <a href='events.php'>Архив событий</a> ]</div>";
}
?>


<br>
<center class=pushkin>
    <a href='https://www.culture.ru/pushkinskaya-karta#afisha' target=_blank><img class=banner22 src='728x90.jpg' width=315 height=39></a><br>
    <a href='https://disk.yandex.ru/d/ZZfZfq20RNVpPg' target=_blank><img class=banner22 src='pushkin.png' width=141 height=141 style='margin-top:30;margin-right:15'></a>
    <a href='https://drive.google.com/drive/folders/1WwD5ZzfpXYzT4T7X7qsPW7Nsg20_CdRT' target=_blank><img class=banner22 src='pushkin2.png' width=141 height=141 style='margin-top:30;margin-left:15'></a>
</center>



<center>
    <a href='https://новаябиблиотека.рф/feedback' target=_blank><img class=banner22 src='feedback.jpg' width=400 height=196></a>
    <a href='https://panel.simpleforms.ru/wnQM0YNP02SW6TKjE1yQ' target=_blank><img class=banner22 src='quality.jpg' width=200 height=196 style='margin-right:16px'></a>
</center>


<center><a href='https://новаябиблиотека.рф/' target=_blank><img class=banner22 src='newlibbanner.jpg' width=100% style='max-width:550px'></a></center>


<?php

MIDDLECOLUMN2
();
print 
"<center><table><tr><td>";
ACTUALLINKS('actualLinksH');
print 
"</tr></td></table></center>";
FAQ();


MIDDLECOLUMN();
CHANNELS("channelBlockH");
RIGHTCOLUMN();

ACTUALLINKS();
FAQ();

?>




<?php BOTTOM(); ?>

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ ok ]

:: Make Dir ::
 
[ ok ]
:: Make File ::
 
[ ok ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.005 ]--