Просмотр файла modile/moduls/page/index.php

Размер файла: 1.36Kb
<?php
Defined('INDEX_S_S') or die ('Доступ запрещен!!!');

 if (is_file($cms.'moduls/page/base/pages.txt'))
 {
  $prasd_file = @file($cms.'moduls/page/base/pages.txt');
  $prasd_count = count($prasd_file);

   if ($_GET['page_line'] == '')
   {

    $pg_1 = $prasd_count-1;
    echo '<span class="ramka">Доступны '.$prasd_count.' страниц</span><br>';
    echo '<div class="menu">';
    while ($pg_1 >= 0)
    {
     $prasd_pr = explode('|',$prasd_file[$pg_1]);
     if (trim($prasd_pr[0]) != 'none')
     echo '<a class="stroka" href="/?page=moduls&id_m=pages&page_line='.$pg_1.'">'.$prasd_pr[0].'</a>';
     --$pg_1;
    }
    echo '</div>';
   }
   else
   {
   	$pg_pr = explode('|',$prasd_file[$_GET['page_line']]);
    echo
    '
    <div class="mess1" align="right">'.$pg_pr[0].' - '.$pg_pr[1].' - '.$pg_pr[2].'</div>
    <div class="mess2" align="center">'.$pg_pr[3].'</div>
    ';
    if ($pg_pr[6] != '')
    {
     $pg_pr_k = $pg_pr[6];
    }
    if ($pg_pr[5] != '')
    {
     $pg_pr_d = $pg_pr[5];
    }
    if ($pg_pr[4] != '0'  and is_file($cms.'moduls/page/my_php/'.trim($pg_pr[4]).'.php'))
    {
     include($cms.'moduls/page/my_php/'.trim($pg_pr[4]).'.php');
    }

   }


 }
 else
 {
  echo '<span class="error">Файл баз двнных модуля не найден..</span>';
 }

?>